@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Variables de marca — mismos tonos que static/css/panel.css, copiadas aquí
   para que el sitio público no dependa del CSS del panel interno (tienen
   identidades visuales separadas). */
:root {
    --brackets-navy: #0F1B3D;
    --brackets-navy-dark: #0A1229;
    --brackets-red: #D31E24;
    --brackets-red-dark: #B01319;
    --brackets-white: #FFFFFF;
    --brackets-bg: #F8F9FA;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    padding-top: 5rem;
}

/* Navbar */
.navbar-brackets {
    background-color: var(--brackets-navy);
}

.navbar-brackets .navbar-brand img {
    height: 36px;
}

.navbar-brackets .nav-link {
    font-weight: 500;
}

.navbar-brackets .nav-link.active {
    color: #fff;
    border-bottom: 2px solid var(--brackets-red);
}

.navbar-brackets .nav-link-acceso {
    font-weight: 400;
    opacity: 0.55;
}

.navbar-brackets .nav-link-acceso:hover {
    opacity: 0.9;
}

/* Footer */
.footer-brackets {
    background-color: var(--brackets-navy-dark);
    color: #C7CBD6;
}

.footer-brackets .footer-logo {
    height: 40px;
}

.footer-brackets h6 {
    color: #fff;
}

.footer-brackets a.footer-link {
    color: #C7CBD6;
    text-decoration: none;
}

.footer-brackets a.footer-link:hover {
    color: #fff;
}

.footer-brackets .footer-social a {
    font-size: 1.5rem;
}

/* Botón flotante de WhatsApp: círculo verde fijo en la esquina inferior
   derecha, visible en todas las páginas del sitio público */
.whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    font-size: 1.75rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.whatsapp-float:hover {
    background-color: #1DA851;
    color: #fff;
    transform: scale(1.08);
}

/* Utilidad para que una sección ocupe todo el ancho de la ventana aunque
   esté dentro de <main class="container">, sin tener que tocar base.html */
.full-bleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* HERO de la página de inicio: carrusel de fondo con overlay oscuro y
   título grande de dos líneas superpuesto */
.hero-section {
    position: relative;
    /* z-index: 0 (con position: relative) crea un contexto de apilamiento
       propio para esta sección, para que el overlay único y el texto de
       cada slide (aunque estén anidados a distinta profundidad) se
       comparen entre sí de forma predecible sin depender del resto de
       la página. */
    z-index: 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background-color: var(--brackets-navy);
    overflow: hidden;
}

.hero-section .carousel,
.hero-section .carousel-inner,
.hero-section .carousel-item {
    position: absolute;
    inset: 0;
    height: 100%;
}

/* Wrapper de cada slide (banner.enlace_url) — puede ser <a> o <div> según
   el slide tenga o no enlace, ver inicio.html. No se toca `display` en
   .carousel-item para no pisar el none/block que alterna Bootstrap al
   cambiar de slide. Ya no centra por sí mismo (ver .hero-content, que
   ahora se posiciona absoluto sobre este wrapper y hace el centrado). */
.hero-section .hero-slide {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.hero-section a.hero-slide:hover {
    color: inherit;
}

.hero-section .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
}

/* Overlay único de todo el hero (un solo div en el markup, ver inicio.html),
   por encima del carrusel/imagen pero por debajo del texto superpuesto. */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: rgba(15, 27, 61, 0.45);
}

.hero-section .hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 700;
    line-height: 1.1;
}

.hero-section .hero-subtitulo {
    font-size: 1.15rem;
    color: #D8DCE8;
    max-width: 480px;
}

.btn-hero {
    background-color: var(--brackets-red);
    color: #fff;
    border: none;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    border-radius: 4px;
}

.btn-hero:hover {
    background-color: var(--brackets-red-dark);
    color: #fff;
}

/* Franja destacada de estadísticas */
.franja-stats {
    background-color: var(--brackets-navy-dark);
    color: #fff;
}

.franja-stats .stat-numero {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brackets-red);
}

.franja-stats .stat-etiqueta {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
    color: #C7CBD6;
}

/* Sección partida (imagen + texto) */
.split-section img,
.split-section .split-placeholder {
    border-radius: 12px;
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
}

.split-section .split-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #EEF1F6;
    color: #8993A8;
}

/* Sección y tarjetas de pilares */
.pilares-section {
    background-color: #F4F6FA;
}

.pilar-card {
    height: 100%;
    padding: 2.5rem 1.5rem;
    text-align: center;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(15, 27, 61, 0.06);
}

.pilar-card .pilar-icono {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(211, 30, 36, 0.1);
    color: var(--brackets-red);
    font-size: 2rem;
}

/* Encabezado simple de páginas internas (Sobre Nosotros, Contacto, etc.) */
.pagina-header {
    background-color: var(--brackets-navy);
    color: #fff;
}

/* Línea de tiempo de "Nuestra Historia": dos columnas alternadas alrededor
   de una línea central vertical. En móvil colapsa a una sola columna. */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 30px auto;
    padding: 20px 0;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--brackets-red);
    opacity: 0.3;
    transform: translateX(-50%);
}
.timeline-item {
    position: relative;
    width: 45%;
    padding: 0 30px 40px;
}
.timeline-item.left {
    left: 0;
    text-align: right;
}
.timeline-item.right {
    left: 55%;
    text-align: left;
}
.timeline-item::before {
    content: '';
    position: absolute;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--brackets-red);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--brackets-red);
}
.timeline-item.left::before { right: -7px; }
.timeline-item.right::before { left: -7px; }
.timeline-content {
    display: inline-block;
    max-width: 100%;
    background-color: #fff;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 10px rgba(15, 27, 61, 0.06);
}
.timeline-year {
    color: var(--brackets-red);
    font-weight: 700;
    font-size: 1.1rem;
}
.timeline-title {
    color: var(--brackets-navy);
    font-weight: 600;
    margin: 4px 0 6px;
}

@media (max-width: 768px) {
    .timeline::before { left: 20px; }
    .timeline-item,
    .timeline-item.left,
    .timeline-item.right {
        width: 100%;
        left: 0;
        text-align: left;
        padding: 0 0 32px 45px;
    }
    .timeline-item.left::before,
    .timeline-item.right::before {
        left: 13px;
        right: auto;
    }
}

/* Página de contacto */
.contact-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15,27,61,0.06);
}
.contact-info-item i {
    font-size: 22px;
    color: var(--brackets-red);
}
.sucursal-card {
    height: 100%;
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(15,27,61,0.06);
}
.sucursal-card .map-wrapper {
    border-radius: 10px;
    overflow: hidden;
    margin-top: 14px;
}
.form-success {
    background: var(--brackets-green-soft, #DCF3E7);
    color: #1F8A5A;
    border-radius: 10px;
    padding: 16px 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Catálogo público */
.category-pill {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: #fff;
    color: var(--brackets-navy);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #E0DDD6;
    margin: 0 6px 10px 0;
}
.category-pill.active {
    background: var(--brackets-red);
    color: #fff;
    border-color: var(--brackets-red);
}

.product-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15,27,61,0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(15,27,61,0.12);
}
.product-card .product-image {
    aspect-ratio: 1 / 1;
    background: #F0EEE9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-card .product-image i {
    font-size: 40px;
    color: #C9C6BE;
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #A9B2C3;
    font-size: 2.5rem;
}

.product-card-body {
    padding: 1.1rem 1.25rem 1.35rem;
}

/* Imagen grande de la página de detalle de producto */
.detalle-imagen-wrapper {
    aspect-ratio: 1 / 1;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background-color: #EEF1F6;
}

.detalle-imagen-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Galería pública */
.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15,27,61,0);
    transition: background 0.2s ease;
}
.gallery-item:hover::after {
    background: rgba(15,27,61,0.25);
}
.gallery-item .zoom-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.gallery-item:hover .zoom-icon {
    opacity: 1;
}

.lightbox-modal .modal-dialog {
    max-width: 700px;
}
.lightbox-modal .modal-body img {
    max-height: 75vh;
    width: 100%;
    object-fit: contain;
}

.lightbox-counter {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
}

/* Ajustes generales de tamaños de fuente y espaciados en pantallas
   pequeñas (celulares y tablets en vertical) */
@media (max-width: 768px) {
    body {
        padding-top: 4.25rem;
    }

    .hero-section {
        min-height: 60vh;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-section .hero-subtitulo {
        font-size: 1rem;
    }

    .franja-stats .stat-numero {
        font-size: 1.75rem;
    }

    .franja-stats .stat-etiqueta {
        font-size: 0.7rem;
    }

    .pilar-card {
        padding: 1.75rem 1.25rem;
    }

    .split-section img,
    .split-section .split-placeholder {
        min-height: 220px;
    }

    .pagina-header {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
}
