/* ==========================================================================
   VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================================================== */
:root {
    --text-color: #000000;
    --text-muted: #222222;
    --font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;

    /* Fondo principal blanco hueso ligeramente amarillento */
    --bg-color: #fbf9f4;
    
    /* TODOS LOS BOTONES ROJOS CON LETRA BLANCA */
    --red-button: #d3282b;
    --red-button-hover: #b51f22;
    
    --panel-blue: #0c3866;
    --panel-blue-text: #ffffff;

    /* LÍNEA DE CARGA EN HOVER */
    --hover-loading-line: #fbf9f4;
    
    --line-delicate: #0c3866;
    --border-color: rgba(0, 0, 0, 0.12);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    width: 100%;
    overflow-x: hidden;
}

body {
    position: relative;
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
}

/* Capa fija al fondo: Ajusta la foto completa y le aplica el desenfoque directo */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 85vh;
    background-image: url('assets/elfondo.jpg');
    background-size: cover;           /* Mantiene la foto encuadrada abarcando todo el visor */
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(12px) brightness(0.50); /* 85Difuminado uniforme en el fondo */
    transform: scale(1.08);            /* Elimina bordes blancos recortados por el blur */
    z-index: -1;                      /* Permanece detrás de todo el sitio */
}

/* Limpieza de capas individuales para que no dupliquen el filtro */
.section-bg-wrapper,
.about-section,
.nueva-seccion {
    background: transparent !important;
}

.section-bg-overlay,
.section-bg-img {
    display: none !important;
}

/* ==========================================================================
   2. ANIMACIÓN PAUSADA DE ELEVACIÓN PARA SECCIONES Y TARJETAS
   ========================================================================== */
/* Estado inicial: desplazado 80px hacia abajo y transparente */
.reveal,
.card-animada-scroll,
.about-image-wrapper,
.about-card {
    opacity: 0;
    transform: translateY(80px);
    /* Se aumentó el tiempo a 1.8s para una aparición muy suave */
    transition: transform 1.8s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform, opacity;
}

/* Estado final al hacer scroll: se elevan limpiamente a su posición */
.reveal.en-vista,
.card-animada-scroll.en-vista,
.about-image-wrapper.en-vista,
.about-card.en-vista,
.en-vista {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Escalado progresivo para que no suban todas al mismo tiempo */
.feature-card:nth-child(1) { transition-delay: 0.1s; }
.feature-card:nth-child(2) { transition-delay: 0.3s; }
.feature-card:nth-child(3) { transition-delay: 0.5s; }

/* En teléfonos la imagen se adapta en cobertura total */
@media (max-width: 768px) {
    body {
        background-size: cover;
    }
}

/* ==========================================================================
   ESPACIADORES / SEPARADORES INVISIBLES REUTILIZABLES
   ========================================================================== */
.spacer {
    width: 100%;
    height: 1rem;
    pointer-events: none;
    visibility: hidden;
    margin: 30px; /*SUPER UTIL JUGAR CON ESTO -/-/_/_/_/_/_/_/_/_/_//_/_/_/_/_//_/_/_/_//_/_/_/_//_/_/_/_//_/_/_//_/_/_/_//_/_/_//_/_/_/_//_*/
}

.spacer.spacer-sm { height: 2rem; }
.spacer.spacer-md { height: 5rem; }
.spacer.spacer-lg { height: 8rem; }

@media (min-width: 768px) {
    .spacer { height: 7rem; }
    .spacer.spacer-sm { height: 5rem; }
    .spacer.spacer-md { height: 10rem; }
    .spacer.spacer-lg { height: 15rem; }
}

/* ==========================================================================
   LÍNEAS Y TÍTULOS
   ========================================================================== */
.section-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    word-wrap: break-word;
}

.title-line::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--line-delicate);
    margin-top: 8px;
}

.title-center::after {
    margin-left: auto;
    margin-right: auto;
}

.title-white {
    color: #ffffff !important;
}

.title-white::after {
    background-color: #38b6ff;
}

/* ==========================================================================
   BOTONES ROJOS CON TEXTO BLANCO EN MAYÚSCULAS
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.85rem 1.4rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #ffffff !important;
    background-color: var(--red-button);
    text-decoration: none;
    text-align: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    z-index: 1;
    max-width: 100%;
}

.btn:hover {
    background-color: var(--red-button-hover);
}

.btn-cut {
    clip-path: polygon(0 0, 100% 0, 93% 100%, 0% 100%);
    border-radius: 0 !important;
}

.btn-rounded {
    border-radius: 4px !important;
}

.btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--hover-loading-line);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease-in-out;
    z-index: 2;
}

.btn:hover::after {
    transform: scaleX(1);
}

/* ==========================================================================
   PANELES AZULES
   ========================================================================== */
.blue-panel {
    background-color: var(--panel-blue);
    color: var(--panel-blue-text);
    padding: 1.8rem 1.25rem;
    border-radius: 0 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.panel-subtitle {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #81b3e6;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.panel-title {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.panel-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e0e8f0;
    margin-bottom: 1.25rem;
}

/* ==========================================================================
   HEADER & NAVBAR (RESPONSIVO MÓVIL + ESCRITORIO CORREGIDO)
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(251, 249, 244, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.75rem 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.header.revealed {
    transform: translateY(0);
    opacity: 1;
}

.header.scroll-hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-text {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.3px;
    color: var(--text-color);
}

.logo-img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--panel-blue);
    flex-shrink: 0;
}

/* Estilos GLOBALES de la lista de navegación (Reset) */
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    transition: color 0.25 ease;
}

.nav-link:hover {
    color: var(--red-button);
}

.nav-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-color);
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 2px;
    background-color: var(--text-color);
    left: 0;
    transition: transform 0.3s ease, top 0.3s ease;
}
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

.nav-toggle.open .hamburger {
    background-color: transparent;
}
.nav-toggle.open .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}
.nav-toggle.open .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* -- VISTA MÓVIL (< 768px) -- */
@media (max-width: 767px) {
    .nav-menu {
        position: absolute;
        top: calc(100% + 0.75rem);
        left: -1.5rem;
        right: -1.5rem;
        width: calc(100% + 3rem);
        background-color: rgba(251, 249, 244, 0.98);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        flex-direction: column;
        align-items: stretch;
        padding: 0.8rem 0;
        border-bottom: 3px solid var(--panel-blue);
        box-shadow: 0 12px 25px rgba(0,0,0,0.18);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-link {
        display: block;
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }

    .nav-link:active, .nav-link:hover {
        background-color: rgba(12, 56, 102, 0.08);
    }
}

/* -- VISTA ESCRITORIO (>= 768px) -- */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .nav-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        flex-direction: row;
        gap: 1.8rem;
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0;
    }

    .nav-link {
        padding: 0.4rem 0;
        position: relative;
    }

    /* Indicador sutil e inferior en hover para escritorio */
    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--red-button);
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.3s ease;
    }

    .nav-link:hover::after {
        transform: scaleX(1);
        transform-origin: left;
    }
}

/* ==========================================================================
   ESTRUCTURA DE SECCIONES & HERO
   ========================================================================== */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1rem;
    width: 70%;
}

.section-compact .section-container {
    padding: 2rem 0.25rem !important;
}

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6.5rem 1rem 2.5rem 1rem;
    overflow: hidden;
    width: 100%;
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(251, 249, 244, 0.22);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 650px;
    width: 100%;
}

.badge {
    display: inline-block;
    background-color: var(--panel-blue);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.hero-title {
    font-size: clamp(1.rem, 6vw, 3rem);
    line-height: 1.25;
    margin-bottom: 1rem;
    color: var(--text-color);
    word-wrap: break-word;
}

.hero-description {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   FONDOS DIFUMINADOS Y EFECTO CRISTAL (GLASSMORPHISM)
   ========================================================================== */
.section-bg-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.section-bg-img {
    display: none;
}

.section-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* EFECTO CRISTAL TRASLÚCIDO (GLASSMORPHISM) */
    background: rgba(255, 255, 255, 0.35); 
    backdrop-filter: blur(12px) saturate(190%);
    -webkit-backdrop-filter: blur(12px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.relative-z {
    position: relative;
    z-index: 3;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem auto;
    padding: 0 0.5rem;
}

.section-subtitle-text {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.action-margin {
    margin-top: 1.25rem;
}

.nosotros-grid, .toldos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: center;
}

.nosotros-img-container {
    width: 100%;
    height: 260px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.nosotros-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   CARRUSEL ROTATIVO DINÁMICO
   ========================================================================== */
.carousel-wrapper-lateral {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1rem 0;
}

.carousel-viewport {
    width: 100%;
    overflow: hidden;
    padding: 1.2rem 0;
}

.carousel-track {
    display: flex;
    align-items: center;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.carousel-card {
    flex: 0 0 200px;
    height: 250px;
    margin: 0 10px;
    position: relative;
    text-decoration: none;
    border-radius: 0px !important; /*12px*/
    overflow: hidden;
    transition: transform 0.6s ease, opacity 0.6s ease, box-shadow 0.6s ease;
    opacity: 0.55;
    transform: scale(0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.carousel-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-card.center {
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    z-index: 5;
    border: 2px solid var(--panel-blue);
}

.carousel-card.card-large {
    flex: 0 0 230px;
    height: 280px;
}

.carousel-card.card-large.center {
    transform: scale(1.1);
}

.card-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(12, 56, 102, 0.92);
    color: #ffffff;
    padding: 0.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.carousel-side-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--red-button);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    border-radius: 0 !important;
}

.carousel-side-btn.prev-btn { left: 0px; }
.carousel-side-btn.next-btn { right: 0px; }

.carousel-side-btn:hover {
    background-color: var(--red-button-hover);
}

.center-action {
    text-align: center;
    margin-top: 1rem;
}

/* ==========================================================================
   SERVICIOS
   ========================================================================== */
.services-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: center;
    margin-top: 1.5rem;
}

.service-card {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-radius: 0 !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12, 56, 102, 0.92) 0%, transparent 65%);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.service-card-overlay h3 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
}

.service-card.center-card {
    border: 2px solid var(--panel-blue);
}

/* ==========================================================================
   CONTACTO CTA & FOOTER
   ========================================================================== */
.cta-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 1.5rem auto;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.text-center {
    text-align: center;
}

.footer {
    background-color: var(--panel-blue);
    color: #ffffff;
    text-align: center;
    padding: 1.75rem 1rem;
    font-size: 0.85rem;
}

/* ==========================================================================
   ANIMACIONES DE REVELADO
   ========================================================================== */
.reveal-left, .reveal-right, .reveal-top, .reveal-bottom {
    opacity: 0;
    transition: transform 2.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 2.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

@media (max-width: 767px) {
    .reveal-left, .reveal-right { transform: translateY(30px); }
    .reveal-top { transform: translateY(-30px); }
    .reveal-bottom { transform: translateY(30px); }
}

@media (min-width: 768px) {
    .reveal-left { transform: translateX(-60px); }
    .reveal-right { transform: translateX(60px); }
    .reveal-top { transform: translateY(-60px); }
    .reveal-bottom { transform: translateY(60px); }
}

.reveal-left.active, 
.reveal-right.active, 
.reveal-top.active, 
.reveal-bottom.active {
    opacity: 1;
    transform: translate(0, 0);
}

/* ==========================================================================
   REGLAS GENERALES ESCRITORIO / DESKTOP (768px+)
   ========================================================================== */
@media (min-width: 768px) {
    .logo-text { font-size: 1.1rem; }
    .logo-img { width: 36px; height: 36px; }

    .nosotros-grid, .toldos-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .nosotros-img-container {
        height: 100%;
        min-height: 380px;
    }

    .services-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .carousel-card {
        flex: 0 0 240px;
        height: 290px;
    }

    .carousel-card.card-large {
        flex: 0 0 270px;
        height: 330px;
    }

    .carousel-side-btn {
        width: 42px;
        height: 42px;
        font-size: 1.25rem;
    }
}

/* EFECTO DE DESPLAZAMIENTO FLUIDO TIPO PANDORA */
section {
    position: sticky;
    top: 0;
    min-height: 100vh; /*min-height: 100vh;*/
    will-change: transform, opacity;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

/* ==========================================================================
   TRANSICIONES LENTAS Y SECUENCIALES (#persianas / .bg-hueso)
   ========================================================================== */

/* 1. ELEVACIÓN LENTA DEL FONDO CONTENEDOR */
#persianas.bg-hueso,
.bg-hueso {
    background-color: rgba(245, 242, 235, 0.7) !important; 
    backdrop-filter: blur(8px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(8px) saturate(180%) !important;
    
    opacity: 0;
    transform: translateY(80px);
    /* Duración aumentada a 1.8s para un ascenso fluido y muy pausado */
    transition: transform 1.8s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform, opacity;
}

.bg-hueso .section-bg-img,
.bg-hueso .section-bg-overlay {
    display: none !important;
}

.bg-hueso.en-vista {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* 2. ESTADO INICIAL DE LOS ELEMENTOS INTERNOS */
.bg-hueso .section-header,
.bg-hueso .carousel-card,
.bg-hueso .btn-cut {
    opacity: 0;
    transform: translateY(50px);
    /* Subida individual pausada de 1.4 segundos por elemento */
    transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* 3. SECUENCIA ESCALONADA CON MAYOR ESPERA (DELAYS) */
.bg-hueso.en-vista .section-header {
    transition-delay: 0.6s !important; /* El título espera a que el fondo haya subido casi completo */
    opacity: 1;
    transform: translateY(0);
}

/* Las cartas del carrusel emergen una tras otra con 0.2s de diferencia */
.bg-hueso.en-vista .carousel-card:nth-child(1) { transition-delay: 0.8s !important; opacity: 1; transform: translateY(0); }
.bg-hueso.en-vista .carousel-card:nth-child(2) { transition-delay: 1.0s !important; opacity: 1; transform: translateY(0); }
.bg-hueso.en-vista .carousel-card:nth-child(3) { transition-delay: 1.2s !important; opacity: 1; transform: translateY(0); }
.bg-hueso.en-vista .carousel-card:nth-child(4) { transition-delay: 1.4s !important; opacity: 1; transform: translateY(0); }
.bg-hueso.en-vista .carousel-card:nth-child(5) { transition-delay: 1.6s !important; opacity: 1; transform: translateY(0); }

.bg-hueso.en-vista .btn-cut {
    transition-delay: 1.8s !important; /* El botón es lo último en aparecer */
    opacity: 1;
    transform: translateY(0);
}





/* ==========================================================================
   ANIMACIONES DE REVELADO ALTERNADO (TOP / BOTTOM)
   ========================================================================== */

/* Elementos que bajan desde arriba */
.reveal-top {
    opacity: 0;
    transform: translateY(-70px);
    transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform, opacity;
}

/* Elementos que suben desde abajo */
.reveal-bottom {
    opacity: 0;
    transform: translateY(70px);
    transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform, opacity;
}

/* Estado activo para ambos */
.reveal-top.en-vista,
.reveal-bottom.en-vista {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Retrasos intercalados para el carrusel de Toldos */
#carouselToldos .carousel-card:nth-child(1) { transition-delay: 0.2s !important; }
#carouselToldos .carousel-card:nth-child(2) { transition-delay: 0.4s !important; }
#carouselToldos .carousel-card:nth-child(3) { transition-delay: 0.6s !important; }
#carouselToldos .carousel-card:nth-child(4) { transition-delay: 0.8s !important; }


/* ==========================================================================
   VARIABLE Y ESTILOS PARA EL RECTÁNGULO AZUL CON CORTE DIAGONAL
   ========================================================================== */
:root {
    /* Ajusta aquí el color Azul y la Transparencia (0.85):
       0.95 -> Muy sólido / 0.85 -> Equilibrado / 0.60 -> Muy transparente */
    --bg-azul-encabezado: rgba(15, 38, 70, 0.85); 
}

.header-panel-azul {
    background-color: var(--bg-azul-encabezado) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* RECTÁNGULO CON CORTE DIAGONAL EN EL EXTREMO DERECHO */
    clip-path: polygon(0 0, calc(100% - 35px) 0, 100% 100%, 0 100%);
    
    padding: 25px 45px 25px 30px;
    max-width: 750px;
    margin: 0 auto 2.5rem auto;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Forzar contraste claro en los textos dentro del panel azul */
.header-panel-azul .panel-subtitle,
.header-panel-azul .section-title,
.header-panel-azul .section-subtitle-text {
    color: #ffffff !important;
}

/* ANIMACIÓN LENTA DESDE LA IZQUIERDA */
.reveal-left {
    opacity: 0;
    transform: translateX(-90px); /* Distancia inicial a la izquierda */
    transition: transform 1.8s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform, opacity;
}

.reveal-left.en-vista {
    opacity: 1 !important;
    transform: translateX(0) !important;
}





/* ==========================================================================
   DESPLEGABLES (DROPDOWNS) Y MÓVIL ACORDEÓN
   ========================================================================== */

/* Estructura base de elementos y enlaces principales */
.nav-menu .nav-item {
    position: relative;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

/* Subrayado activo/hover en enlaces principales */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: #122c55;
    transition: width 0.3s ease;
}

.nav-item:hover .nav-link::after {
    width: 100%;
}

.nav-link:hover {
    color: #122c55 !important;
}

/* Flecha del botón principal */
.nav-link .arrow {
    font-size: 0.75rem;
    padding: 2px 6px;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.25s ease;
}

.nav-item.dropdown:hover .arrow,
.nav-item.dropdown.active-dropdown .arrow {
    transform: rotate(180deg);
}

/* Base limpia para listas de submenú */
.dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-menu li {
    width: 100%;
    list-style: none;
}

/* =========================================================
   VERSIÓN ESCRITORIO (DEKSTOP >= 769px)
   ========================================================= */
@media (min-width: 769px) {
    .dropdown-menu {
        display: none;
        position: absolute;
        top: 100% !important;
        left: 0;
        margin-top: 0 !important;
        min-width: 230px;
        background-color: var(--bg-hueso, #f5f0eb) !important;
        border-radius: 0 !important;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-top: 2px solid #1a1a1a;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
        padding: 10px 0;
        z-index: 1100;
        
        /* Aparición instantánea sin animaciones ni retrasos */
        transition: none !important;
        animation: none !important;
    }

    /* Puente invisible para evitar que el menú se cierre al bajar el cursor */
    .dropdown-menu::before {
        content: '';
        position: absolute;
        top: -15px;
        left: 0;
        width: 100%;
        height: 15px;
        background: transparent;
    }

    /* Despliegue al pasar el cursor o al activar la clase */
    .nav-item.dropdown:hover .dropdown-menu,
    .nav-item.dropdown.active-dropdown .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        transition: none !important;
    }

    /* Estilos de los enlaces del desplegable */
    .dropdown-menu li a,
    .dropdown-menu a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 24px;
        font-size: 0.95rem;
        font-weight: 500;
        color: #1a1a1a !important;
        text-decoration: none;
        transition: none !important;
    }

    /* Hover en cada ítem */
    .dropdown-menu li a:hover,
    .dropdown-menu a:hover {
        background-color: rgba(0, 0, 0, 0.04);
        color: #000000 !important;
    }

    /* Icono indicador '›' alineado a la derecha */
    .dropdown-menu a::after,
    .dropdown-menu li a::after {
        content: "›";
        font-size: 1.2rem;
        line-height: 1;
        color: #1a1a1a;
        margin-left: 15px;
    }

    /* Oculta los chevrons inline si existen en el HTML */
    .dropdown-menu .chevron {
        display: none;
    }
}

/* =========================================================
   VERSIÓN MÓVIL (MOBILE <= 768px)
   ========================================================= */
@media (max-width: 768px) {
    .dropdown-menu {
        display: none;
        position: static;
        width: 100%;
        background: rgba(255, 255, 255, 0.05);
        border: none;
        border-radius: 6px;
        margin-top: 6px;
        padding: 4px 0;
        box-shadow: none;
    }

    /* Apertura de acordeón en móvil */
    .nav-item.dropdown.active-dropdown .dropdown-menu {
        display: block !important;
    }

    .dropdown-menu li a,
    .dropdown-menu a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 16px;
        font-size: 0.8rem;
        color: inherit;
        text-decoration: none;
    }
}

/* ==========================================================================
   ENCABEZADO CENTRADO & CARRUSEL UNIDIRECCIONAL
   ========================================================================== */

.section-instalaciones {
    padding: 10px 1px;
    position: relative;
}

/* Estructura del Título (Basada en la imagen de referencia) */
.section-header-centered {
    text-align: center;
    max-width: 850px;
    margin: 0 auto 45px auto;
}

.section-header-centered .section-subtitle {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #b82525; /* Cambia a tu color de acento/rojo corporativo si es necesario */
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-header-centered .section-title-centered {
    font-size: 2.3rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.25;
    margin-bottom: 14px;
}

.section-header-centered .section-description {
    font-size: 1.05rem;
    color: #666666;
    margin: 0;
    line-height: 1.5;
}

/* Carrusel Infinito Contenedor */
.infinite-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

.infinite-carousel-track {
    display: flex;
    width: 100%;
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.carousel-slide img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}

/* Responsivo para Pantallas Pequeñas */
@media (max-width: 768px) {
    .section-instalaciones {
        padding: 50px 15px;
    }

    .section-header-centered .section-title-centered {
        font-size: 1.0rem;
    }

    .section-header-centered .section-description {
        font-size: 0.95rem;
    }

    .carousel-slide img {
        height: 280px;
    }
}

/* ==========================================================================
   SECCIÓN DE TARJETAS EN ZIGZAG
   ========================================================================== */

.cards-zigzag-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 950px;
    margin: 30px auto;
    padding: 0 15px;
}

/* Estructura base de cada carta */
.card-zigzag-item {
    display: flex;
    align-items: stretch;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 24px rgba(246, 244, 244, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-zigzag-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(246, 244, 244, 0.07);
}

/* Contenedor de la Imagen */
.card-img-box {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 160px;
    object-fit: cover; 
}

.card-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.card-zigzag-item:hover .card-img-box img {
    transform: scale(1.05);
}

/* Panel/Fondito de texto */
.card-info-box {
    flex: 1.2;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--bg-hueso, #f5f0eb); /* Fondito usando la variable o tono suave */
    border-left: 4px solid #f5f0eb;
}

.card-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #040404;
    margin: 0 0 8px 0;
    letter-spacing: 0.5px;
}

.card-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #090909;
    margin: 0;
}

/* =========================================================
   VERSIÓN ESCRITORIO (DEKSTOP >= 769px) -> EFECTO ZIGZAG
   ========================================================= */
@media (min-width: 769px) {
    .cards-zigzag-container {
        gap: 32px;
    }

    .card-zigzag-item {
        min-height: 220px;
    }

    /* Invierte el orden de la 2ª carta para crear el zigzag */
    .card-zigzag-item:nth-child(even) {
        flex-direction: row-reverse;
    }

    /* Cambia la línea decorativa de lado al invertir */
    .card-zigzag-item:nth-child(even) .card-info-box {
        border-left: none;
        border-right: 4px solid #f4f5f7;
    }
}

/* =========================================================
   VERSIÓN MÓVIL (MOBILE <= 768px) -> FONDITO A LA DERECHA
   ========================================================= */
@media (max-width: 768px) {
    .cards-zigzag-container {
        gap: 16px;
        padding: 0 10px;
    }

    .card-zigzag-item {
        flex-direction: row; /* Imagen a la izquierda, fondito a la derecha */
        min-height: 130px;
        border-radius: 10px;
    }

    .card-img-box {
        flex: 0 0 42%; /* 42% del ancho para la foto */
        min-height: 130px;
    }

    .card-info-box {
        flex: 0 0 58%; /* 58% para el fondito con título y texto */
        padding: 12px 14px;
        border-left: 3px solid #f6f7f9;
    }

    .card-title {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }

    .card-text {
        font-size: 0.78rem;
        line-height: 1.35;
        /* Limita a 3 líneas de texto para mantener proporción */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ==========================================================================
   SECCIÓN NUESTROS SERVICIOS / PORTAFOLIO DE LOGOS
   ========================================================================== */

.section-servicios-logos {
    padding: 80px 20px;
    background: transparent; /* Permite ver el fondo nativo de la página */
    position: relative;
}

/* Encabezado Centrado */
.services-header-centered {
    text-align: center;
    max-width: 860px;
    margin: 0 auto 50px auto;
    background: transparent; /* Sin fondos bg-hueso */
}

.services-badge {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #e52e2e; /* Rojo corporativo del subtítulo superior */
    text-transform: uppercase;
    margin-bottom: 16px;
}

.services-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: #ffffff; /* Ajusta a #1a1a1a si el fondo de tu web es claro */
    line-height: 1.2;
    margin-bottom: 22px;
}

.services-description {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #cccccc; /* Ajusta según el tono de tu fondo */
    margin: 0 auto;
    background: transparent;
}

/* Contenedor del Carrusel de Logos */
/* ==========================================================================
   CARRUSEL DE LOGOS (ANCHO COMPLETO - ESCRITORIO Y MÓVIL)
   ========================================================================== */

.logos-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    padding: 15px 0;
    /* Difuminado mínimo del 2% en las orillas para aprovechar todo el ancho visible */
    mask-image: linear-gradient(to right, transparent 0%, black 2%, black 98%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 2%, black 98%, transparent 100%);
}

/* --- Ajuste para Vista de Teléfono (Celulares <= 768px) --- */
@media (max-width: 768px) {
    /* Quita los rellenos laterales del contenedor principal para que los logos lleguen de borde a borde */
    .section-servicios-logos .section-container {
        padding-left: 0;
        padding-right: 0;
    }

    .logos-carousel-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 10px 0;
        /* En celulares elimina el difuminado por completo para no restar espacio a las imágenes */
        mask-image: none;
        -webkit-mask-image: none;
    }
}

.logos-carousel-track {
    display: flex;
    gap: 18px;
    width: max-content;
    will-change: transform;
}

/* Estilo de Tarjetas Pequeñas (Igual a la imagen) */
.logo-card {
    flex: 0 0 170px;
    height: 105px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.logo-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

.logo-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: brightness(0.9) contrast(1.1);
}

/* Responsivo para Móviles */
@media (max-width: 768px) {
    .section-servicios-logos {
        padding: 50px 15px;
    }

    .services-title {
        font-size: 1.8rem;
    }

    .services-description {
        font-size: 0.95rem;
    }

    .logo-card {
        flex: 0 0 135px;
        height: 85px;
        padding: 12px;
        border-radius: 10px;
    }
}
/* ==========================================================================
   LOGOS SIN CUADRO / TAMAÑO AMPLIADO
   ========================================================================== */

/* 1. Eliminación total del cuadro/fondo del contenedor */
.logo-card {
    flex: 0 0 240px;          /* Ancho asignado a cada logo */
    height: 160px;            /* Altura suficiente para ver detalles pequeños */
    background: transparent;  /* Sin cuadro ni color de fondo */
    border: none;             /* Sin bordes */
    box-shadow: none;         /* Sin sombras en la tarjeta */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;           /* Espaciado mínimo lateral */
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

/* 2. La imagen se expande al máximo para verse grande y legible */
.logo-card img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;       /* Mantiene proporciones sin deformar */
    display: block;
    /* Sombra directa sobre el logo para destacar el texto sobre cualquier fondo */
    filter: drop-shadow(0px 4px 10px rgba(0, 0, 0, 0.3)); 
}

/* Efecto hover ligero únicamente sobre el logo */
.logo-card:hover {
    transform: scale(1.08);
}

/* =========================================================
   AJUSTES MÓVIL (PANTALLAS PEQUEÑAS)
   ========================================================= */
@media (max-width: 768px) {
    .logo-card {
        flex: 0 0 180px;       /* Ancho mayor en teléfonos */
        height: 130px;         /* Altura ampliada en móviles */
        padding: 0 5px;
    }

    .logo-card img {
        width: 100%;
        height: 100%;
    }
}
/* ==========================================================================
   ESTILOS DE SECCIÓN TOLDOS & CARRUSEL DE 2 IMÁGENES
   ========================================================================== */

.section-toldos-full {
    width: 100%;
    overflow-x: hidden;
    padding: 40px 0 0 0;
    margin-left: 10px;
    margin-right: 10px;
}

/* Header azul */
.header-panel-azul-full {
    width: 100%;
    background-color: #122c55;
    padding: 30px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.header-panel-azul-full .panel-subtitle {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #e2c08d;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.header-panel-azul-full .section-title {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.header-panel-azul-full .section-subtitle-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

/* --- Contenedor Principal del Carrusel (Ancho completo 100vw) --- */
.dual-carousel-wrapper {
    position: relative;
    display: flex;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 480px; /* Altura fija para evitar que se apilen las imágenes */
    overflow: hidden;
    background-color: #000;
}

/* --- Cada Columna toma exactamente el 50% sin espacios --- */
.dual-carousel-col {
    position: relative;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

/* --- Diapositivas (Obligadas a ocupar la totalidad de su columna) --- */
.dual-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1;
}

.dual-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    z-index: 2;
}

/* Clases de animación vertical */
.slide-exit-up {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
}

.slide-exit-down {
    transform: translateY(100%) !important;
    opacity: 0 !important;
}

.slide-next-prep-up {
    transform: translateY(100%) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.slide-next-prep-down {
    transform: translateY(-100%) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.dual-slide a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.dual-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dual-slide .card-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 10px;
    background: linear-gradient(to top, rgba(18, 44, 85, 0.95) 0%, rgba(18, 44, 85, 0) 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-align: center;
    box-sizing: border-box;
}

/* --- Botón Flotante Semi-transparente --- */
.btn-floating-cta {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background-color: rgba(229, 46, 46, 0.65); /* Color rojo semi-transparente */
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 14px 28px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    backdrop-filter: blur(4px); /* Difuminado suave de fondo */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Estado Hover: Menos transparente (Sólido) */
.btn-floating-cta:hover {
    background-color: rgba(229, 46, 46, 1); /* Rojo 100% sólido */
    opacity: 1;
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

/* Adaptación para Celulares */
@media (max-width: 768px) {
    .dual-carousel-wrapper {
        height: 320px; /* Reducción de altura en celulares */
    }

    .btn-floating-cta {
        bottom: 15px;
        font-size: 0.78rem;
        padding: 10px 18px;
    }

    .dual-slide .card-caption {
        font-size: 0.75rem;
        padding: 12px 5px;
    }
}

html {
    scroll-behavior: smooth;
}



