/* 
  EL EDUCADOR S.A.S - CORPORATE STYLES
  ===================================== 
  Manual de Imagen Aplicado 
*/

:root {
    /* Brand Colors Extracted exactly from the PDF */
    --c-yellow: #FFF13C;
    /* Pantone 102 C */
    --c-lightblue: #00AEEC;
    /* Pantone 306 C */
    --c-red: #CD3539;
    /* Pantone 2347 C */
    --c-orange: #EAB545;
    /* Medium YC RGB Match */
    --c-darkblue: #404890;
    /* Pantone 2728 C */
    --c-darkred: #923031;
    /* Dark Pantone */

    /* Whitespace Base / Neutrals */
    --c-black: #0F172A;
    --c-gray-900: #1E293B;
    --c-gray-600: #64748B;
    --c-gray-200: #E2E8F0;
    --c-white: #FFFFFF;
    --c-bg: #FAFAFA;
    /* Elegant soft white for background */

    /* Typography */
    /* Century Gothic implementation for Headings as instructed by manual */
    --font-heading: 'Century Gothic', 'Tw Cen MT', 'Avant Garde', sans-serif;
    /* Quicksand implementation for bodies */
    --font-body: 'Quicksand', sans-serif;

    /* Micro-Interactions Timing Function */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset Engine */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 100%; /* 16px base para móviles/tablets */
    max-width: 100vw;
    overflow-x: hidden;
}

/* Escalado Inteligente removido para usar 16px base estándar */

body {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--c-gray-600);
    background-color: var(--c-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Typography Scale */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--c-black);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 4rem;
}

@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 1550px;
    }
}

@media (min-width: 1800px) {
    .container {
        max-width: 1750px;
    }
}

/* UI Elements: High End Buttons */
.btn {
    display: inline-block;
    padding: 1.1rem 2.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 3px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo), background-color 0.3s;
    border: none;
    white-space: nowrap; /* Evita que el texto del botón salte de línea */
}

.btn-primary {
    background-color: var(--c-white);
    color: var(--c-darkblue);
    /* Corporate Contrast */
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 25px -10px rgba(255, 255, 255, 0.3);
    background-color: var(--c-bg);
}

.btn-outline {
    background-color: transparent;
    color: var(--c-darkblue);
    border: 1px solid var(--c-darkblue);
}

.btn-outline:hover {
    background-color: var(--c-darkblue);
    color: var(--c-white);
}

.full-width {
    width: 100%;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--c-darkblue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.link-arrow span {
    margin-left: 0.7rem;
    transition: transform 0.3s var(--ease-out-expo);
}

.link-arrow:hover span {
    transform: translateX(8px);
}

/* Solid White NavBar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.5rem 0;
    z-index: 1000;
    background: #FFFFFF;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: padding 0.4s var(--ease-out-expo), box-shadow 0.4s;
}

.navbar.scrolled {
    padding: 0.25rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--c-darkblue);
    letter-spacing: -0.05em;
}

.brand-logo {
    height: 90px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-links a.hover-underline {
    position: relative;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--c-gray-900);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-links a.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--c-red);
    transition: width 0.4s var(--ease-out-expo);
}

.nav-links a.hover-underline:hover::after {
    width: 100%;
}

/* HERO SECTION - Agency Whitespace */
.hero {
    position: relative;
    min-height: auto; /* Removido el 85vh para evitar márgenes gigantes en pantallas grandes */
    display: flex;
    align-items: center;
    padding-top: 160px; /* Incrementado para librar el logo grande */
    padding-bottom: 50px;
    background-color: var(--c-black);
    background-image: url('foto_hero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-inner {
    min-height: 40vh;
    padding-top: 120px;
    background-color: var(--c-darkblue);
}

.hero-inner .hero-title {
    font-size: 3rem;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Capa de oscurecimiento cristalino (Overlay) */
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(0, 71, 187, 0.6) 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero-content {
        grid-template-columns: 1.1fr 1fr; /* Columna de texto un poco más ancha que la del video */
        gap: 4rem;
    }
}

@media (min-width: 1440px) {
    .hero-content {
        grid-template-columns: 1.2fr 1fr;
        gap: 6rem;
    }
}

.hero-title {
    /* Tipografía fluida: se adapta proporcionalmente pero nunca es gigantesca */
    font-size: clamp(2.5rem, 4vw, 3.2rem); 
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--c-white);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 1.5vw, 1.25rem);
    max-width: 90%;
    margin-bottom: 2rem;
    color: var(--c-gray-200);
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.hero-cta .link-arrow {
    color: var(--c-yellow);
}

/* Micro Copy B2B */
.hero-microcopy {
    margin-top: 1rem;
    display: flex;
    gap: 1.5rem;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--c-gray-200);
    letter-spacing: 0.05em;
    opacity: 0.85;
}

.hero-microcopy span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Hero Video Box (Columna Derecha) */
.hero-video-wrapper {
    margin-top: 0; /* Ya no necesita margen porque el grid lo separa */
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: perspective(1000px) rotateY(-5deg); /* Efecto 3D sutil hacia el centro */
    transition: transform 0.5s var(--ease-out-expo);
}

.hero-video-wrapper:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

.hero-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* CORPORATE TRUST SIGNALS */
.trust-section {
    padding: 2.5rem 0 1.5rem 0; /* Inferior reducido */
    background-color: var(--c-white);
    border-top: 1px solid var(--c-gray-200);
    border-bottom: 1px solid var(--c-gray-200);
}

.text-center {
    text-align: center;
}

.trust-label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--c-red);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 4rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-num {
    font-size: 5rem;
    color: var(--c-darkblue);
    margin-bottom: 0px;
    line-height: 1;
}

.stat-desc {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--c-gray-900);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1rem;
}

/* CAROUSEL B2B LOGOS */
.institutions-slider-box {
    margin-top: 3.5rem;
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 1rem 0 0.5rem 0; /* Inferior comprimido */
    border-top: 1px solid var(--c-gray-200);
}

.slider-label {
    font-family: var(--font-heading);
    color: var(--c-gray-600);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 3rem;
}

.slider-track {
    display: flex;
    gap: 5rem;
    align-items: center;
    width: max-content;
    animation: scroll-left 25s linear infinite;
}

.inst-img {
    height: 55px; /* Altura estandarizada para todos los logos */
    width: auto;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.5); /* Efecto B2B Gris */
    transition: filter 0.3s var(--ease-out-expo), transform 0.3s var(--ease-out-expo);
}

.inst-img:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* Override para logos pequeños que necesitan más altura */
.inst-img--large {
    height: 112.5px;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 2.5rem)); } /* El 50% menos la mitad del gap para el loop perfecto */
}

/* SOLUTIONS MATRIX - Opción C: 4 Columnas (Header + 3 Cards) */
.solutions {
    padding: 2.5rem 0;
    background-color: #F0F4FF;
}

/* Grid principal: columna encabezado + columna de cards */
.solutions-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .solutions-layout {
        /* Fija un ancho de lectura cómodo para el texto, y le da TODO el espacio restante a las tarjetas */
        grid-template-columns: 350px 1fr;
    }
}

@media (min-width: 1600px) {
    .solutions-layout {
        grid-template-columns: 450px 1fr;
        gap: 5rem;
    }
}

.section-header {
    max-width: unset;
    margin-bottom: 0;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--c-black);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-header p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Grid de las 3 cards */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* --- BASE CARD (Vertical - 3 columnas) --- */
.solution-card {
    background-color: var(--c-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px -10px rgba(0, 71, 187, 0.12);
    transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo);
    border-top: 5px solid transparent;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

@media (hover: hover) {
    .solution-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 25px 50px -12px rgba(0, 71, 187, 0.2);
    }
}

/* --- VARIANTES DE COLOR (Borde Superior) --- */
.solution-card--blue   { border-top-color: var(--c-darkblue); }
.solution-card--yellow { border-top-color: var(--c-orange); }
.solution-card--red    { border-top-color: var(--c-red); }

/* --- IMAGEN (Altura fija, ancho completo) --- */
.card-image-box {
    width: 100%;
    height: 220px;
    min-width: unset;
    min-height: unset;
    position: relative;
    overflow: hidden;
    background-color: var(--c-gray-200);
    flex-shrink: 0;
}

.product-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}

@media (hover: hover) {
    .solution-card:hover .product-photo {
        transform: scale(1.08);
    }
}

}

.card-overlay-cta:hover {
    background: rgba(255,255,255,0.15);
    border-color: white;
}

/* --- CUERPO DE CARD (Flex Grow) --- */
.card-body {
    padding: 1.5rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.4rem;
}

.card-body h3 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
    color: var(--c-darkblue);
}

.solution-card--yellow .card-body h3 { color: var(--c-orange); }
.solution-card--red    .card-body h3 { color: var(--c-red); }

.card-body p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.card-body .link-arrow {
    margin-top: auto; /* Empuja el botón al fondo de la tarjeta */
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    padding-top: 0.5rem;
}

/* B2B LEAD OPTIMIZED FUNNEL */
.contact-section {
    padding: 2.5rem 0 8rem 0;
    background-color: var(--c-white);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem; /* Reducido de 8rem a 4rem para dar más espacio a los lados */
    align-items: center;
}

.contact-info h2 {
    font-size: 4rem;
    margin-bottom: 2rem;
    color: var(--c-darkblue);
}

.contact-info p {
    font-size: 1.2rem;
}

.contact-details {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--c-gray-200);
}

.contact-details p {
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--c-gray-900);
}

.form-wrapper {
    background-color: var(--c-bg);
    padding: 3.5rem; /* Reducido de 5rem a 3.5rem para liberar espacio interno */
    border-radius: 8px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.1);
    position: relative;
}

.form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--c-darkblue), var(--c-red));
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.b2b-form .form-group {
    margin-bottom: 1.2rem;
}

.b2b-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    align-items: start;
    margin-bottom: 1.2rem; /* Añadido para mantener distancia uniforme con la siguiente fila */
}

.b2b-form .form-row .form-group {
    margin-bottom: 0;
}

.b2b-form label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-gray-900);
    margin-bottom: 0.4rem;
}

.b2b-form input,
.b2b-form textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid var(--c-gray-200);
    border-radius: 0;
    /* Boxy look for corporate */
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    background-color: var(--c-white);
    resize: none;
    transition: border-color 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}

.b2b-form input:focus,
.b2b-form textarea:focus {
    outline: none;
    border-color: var(--c-lightblue);
    box-shadow: inset 4px 0 0 0 var(--c-lightblue);
}

.form-msg {
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    background: rgba(0, 174, 237, 0.1);
    color: var(--c-darkblue);
    padding: 1rem;
    display: none;
    border-left: 3px solid var(--c-lightblue);
}

.form-msg.success {
    display: block;
}

/* Form Submit Button Override for Contrast */
.b2b-form .btn-primary,
.section-header .btn-primary {
    background-color: var(--c-darkblue);
    color: var(--c-white);
}

.b2b-form .btn-primary:hover,
.section-header .btn-primary:hover {
    background-color: var(--c-lightblue);
    color: var(--c-white);
    box-shadow: 0 10px 20px -5px rgba(0, 174, 237, 0.4);
}

.b2b-form .btn-primary:active,
.section-header .btn-primary:active {
    color: var(--c-yellow);
    transform: translateY(0); /* Remove hover lift on click */
    box-shadow: none;
}

/* FOOTER CORPORATIVO */
.footer {
    background-color: var(--c-black);
    color: var(--c-gray-200);
    padding-top: 2.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 3rem;
    padding-bottom: 2.5rem;
}

.footer-col h4 {
    color: var(--c-white);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-col h4 svg {
    color: var(--c-yellow);
}

.footer-col p {
    font-size: 0.95rem;
    line-height: 1.4; /* Reducido para agrupar mejor el texto */
    margin-bottom: 0.8rem; /* Reducido */
    color: rgba(255, 255, 255, 0.7); /* Contraste corregido para legibilidad WCAG */
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem; /* Interlineado de lista más compacto */
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-col ul li a:hover {
    color: var(--c-yellow); /* Branding Premium */
}

.brand-col .footer-logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--c-white);
    margin-bottom: 1rem;
    letter-spacing: -0.05em;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; /* SVG un poco más grandes y cómodos para clics */
    height: 40px;
    background-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
}

.social-links a:hover {
    background-color: var(--c-yellow);
    color: var(--c-darkblue); /* Contraste oscuro dentro del círculo amarillo */
    transform: translateY(-3px);
}

.contact-col p {
    margin-bottom: 0.5rem; /* Interlineado de contacto más compacto */
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.contact-icon {
    color: var(--c-yellow);
    flex-shrink: 0;
    margin-top: 2px;
}

.sub-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    background-color: #080C16;
}

.sub-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5); /* Menor jerarquía, pero legible */
}

.disclaimer-garantia {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    max-width: 800px;
    line-height: 1.4;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* HERO INTERNO (Subpáginas) */
.hero-inner {
    min-height: 40vh;
    padding-top: 120px;
    background-color: var(--c-darkblue);
}

.hero-inner .hero-title {
    font-size: 3rem;
}

/* PORTFOLIO GALLERY LAYOUT */
.gallery-section {
    position: relative;
}

.gallery-row {
    display: flex;
    gap: 4rem;
    align-items: center;
    margin-bottom: 6rem;
}

.gallery-row-reverse {
    flex-direction: row-reverse;
}

.gallery-img {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    aspect-ratio: 4/3;
}

.gallery-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s var(--ease-out-expo);
}

@media (hover: hover) {
    .gallery-row:hover .gallery-img img {
        transform: scale(1.05);
    }
}

.gallery-text {
    flex: 1;
}

.gallery-text h3 {
    color: var(--c-darkblue);
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.gallery-text p {
    color: var(--c-gray-600);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.gallery-text ul {
    list-style: none;
    padding: 0;
    color: var(--c-gray-900);
    font-weight: 500;
}

.gallery-text ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.gallery-text ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--c-lightblue);
    font-weight: bold;
}

@media (max-width: 900px) {
    .gallery-row, 
    .gallery-row-reverse {
        flex-direction: column;
        gap: 2rem;
        margin-bottom: 4rem;
    }
}

/* CARRUSEL DE PROYECTOS (PORTAFOLIO) */
.project-carousel-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 80vh;
    min-height: 450px;
    overflow: hidden;
    background-color: var(--c-black);
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s var(--ease-out-expo), transform 5s ease-out;
    transform: scale(1.05);
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 16, 58, 0.9) 0%, rgba(0, 16, 58, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
}

.carousel-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 2.5rem;
}

.carousel-title {
    color: var(--c-white);
    font-size: 3.5rem;
    max-width: 800px;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.carousel-desc {
    color: var(--c-gray-200);
    font-size: 1.2rem;
    max-width: 700px;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.carousel-tags {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.carousel-tags span {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--c-white);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    backdrop-filter: blur(5px);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 4;
    transition: background 0.3s, transform 0.3s;
    backdrop-filter: blur(5px);
}

.carousel-btn:hover {
    background: var(--c-red);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 2rem;
}

.next-btn {
    right: 2rem;
}

.carousel-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
    z-index: 4;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.carousel-dots .dot.active {
    background: var(--c-red);
    transform: scale(1.3);
}

/* PORTFOLIO CARDS GRID (Reconfiguración) */
.portfolio-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1024px) {
    .portfolio-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .carousel-title {
        font-size: 2.5rem;
    }
}

/* CASOS DE ESTUDIO (PORTAFOLIO V2) */
.case-study-row {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.case-study-reverse {
    flex-direction: row-reverse;
}


.case-study-title, .case-text h2 {
    font-size: 2.5rem;
}

.case-text {
    flex: 1;
    min-width: 0;
    max-width: 48%; /* BARRERA DEFINITIVA para que nunca empuje la galería */
}

.case-gallery {
    flex: 1.2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 250px 250px;
    gap: 1rem;
}

/* HOVER OVERLAY "Ver en detalle" */
.img-zoom-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.img-zoom-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease, filter 0.6s ease;
    image-rendering: high-quality;
}

@media (hover: hover) {
    .img-zoom-wrapper:hover img {
        transform: scale(1.03);
        filter: brightness(0.6);
    }
}

.zoom-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30%);
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    z-index: 10;
}

.zoom-overlay span {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--c-yellow);
    color: var(--c-darkblue);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 24px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

@media (hover: hover) {
    .img-zoom-wrapper:hover .zoom-overlay {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.case-img-main {
    grid-column: 1 / -1;
    grid-row: 1 / 2;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Etiquetas de caso de estudio */
.case-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: hidden; /* El JS hará el scroll por nosotros */
    white-space: nowrap;
    
    padding-top: 5px; 
    padding-bottom: 12px; 
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px; 
    margin-right: -10px;
    
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.case-tags::-webkit-scrollbar {
    display: none;
}

.case-tags span,
.case-tags a {
    display: inline-block;
    background-color: var(--c-red);
    color: var(--c-white);
    border: 1px solid var(--c-red);
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.case-tags a {
    cursor: pointer;
}

@media (hover: hover) {
    .case-tags a:hover {
        background-color: var(--c-darkblue);
        color: var(--c-white);
        border-color: var(--c-darkblue);
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    }
}

.case-img-secondary {
    grid-column: 1 / -1;
    grid-row: 2 / 3;
    display: flex;
    gap: 1rem;
}

.case-img-secondary .img-zoom-wrapper {
    width: calc(50% - 0.5rem);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

@media (max-width: 1024px) {
    .case-study-row, .case-study-reverse {
        flex-direction: column;
        align-items: stretch;
        gap: 2.5rem; /* Reduce el gap vertical masivo de 5rem a 2.5rem en móviles */
        overflow: hidden;
    }
    .case-text {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    .case-gallery {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .case-gallery {
        grid-template-rows: 250px 150px;
        gap: 1rem;
    }
    .case-img-secondary {
        gap: 1rem;
    }
    
    .case-text h2 {
        font-size: 1.8rem;
        hyphens: none;
    }

    .case-tags {
        /* Animación ping-pong: va a la izquierda y regresa suavemente para mostrar etiquetas ocultas */
        animation: scroll-ping-pong 7s ease-in-out infinite alternate;
        /* Remueve el scroll manual mientras se anima automáticamente */
        overflow-x: visible; 
        width: max-content;
    }
}

@keyframes scroll-ping-pong {
    0%, 5% { transform: translateX(0); }
    95%, 100% { transform: translateX(calc(-100% + 80vw)); }
}

/* LIGHTBOX MODAL PREMIUM */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 5, 20, 0.95);
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.lightbox-content-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
}

.lightbox-img {
    max-height: 90vh;
    max-width: 90vw;
    object-fit: contain;
    border-radius: 8px;
    animation: zoomIn 0.4s var(--ease-out-expo);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

/* Panel de texto flotante elegante */
.lightbox-text-panel {
    position: absolute;
    bottom: 5vh;
    left: 5vw;
    max-width: 450px;
    background: rgba(0, 16, 58, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    animation: slideUpFade 0.5s var(--ease-out-expo) 0.2s backwards;
    color: var(--c-white);
    transition: all 0.4s ease-in-out;
}

@media (hover: hover) {
    .lightbox-text-panel:hover {
        background: rgba(0, 16, 58, 0.95);
        backdrop-filter: blur(15px);
        transform: translateY(-5px);
        box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    }
}

.lightbox-text-panel h2 {
    color: var(--c-white);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    opacity: 0.50;
    transition: opacity 0.4s;
}

.lightbox-text-panel p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    opacity: 0.50;
    transition: opacity 0.4s;
}

.lightbox-text-panel:hover h2,
.lightbox-text-panel:hover p {
    opacity: 1;
}

.lightbox-text-panel p strong {
    color: var(--c-yellow);
}

/* Botones y controles */
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--c-white);
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    z-index: 10000;
}

.lightbox-close:hover {
    color: var(--c-yellow);
    transform: scale(1.1);
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: none;
    color: var(--c-white);
    font-size: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s, transform 0.2s;
}

.lightbox-btn:hover {
    background: var(--c-yellow);
    color: var(--c-darkblue);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: 2vw; }
.lightbox-next { right: 2vw; }

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes slideUpFade {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
    .lightbox-text-panel {
        bottom: 0;
        left: 0;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        padding: 1rem;
    }
    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* ARCHITECTURAL ANIMATIONS */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.2s var(--ease-out-expo) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s var(--ease-out-expo), transform 1.2s var(--ease-out-expo);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

/* --- MOBILE RESPONSIVE LOGIC --- */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    /* Mantener sobre el navbar */
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--c-darkblue);
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
}

/* Tablets & Mobile High End Reflow */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    .contact-container {
        display: flex;
        flex-direction: column-reverse;
        gap: 4rem;
    }

    .solutions {
        padding: 2.5rem 0;
    }

    .trust-section {
        padding: 2.5rem 0;
    }

    /* Menú Móvil Full Screen Elegante */
    .nav-links {
        position: fixed;
        right: -100%;
        /* Oculto inicialmente */
        top: 0;
        flex-direction: column;
        background-color: var(--c-white);
        width: 100%;
        height: 100vh;
        justify-content: center;
        align-items: center;
        transition: right 0.5s var(--ease-out-expo);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        gap: 2.5rem;
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: block;
    }

    /* Animación del ícono X */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Ajustes Hero Header */
    .hero {
        padding-top: 160px;
        text-align: center;
    }

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

    @media (max-width: 480px) {
        .hero-title {
            font-size: 1.8rem;
        }
    }

    .hero-bg {
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        opacity: 1;
    }

    .hero-subtitle {
        margin: 0 auto 1.5rem auto;
        font-size: 1.15rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-microcopy {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    /* Cuadrículas Colapsando a 1x1 */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    /* Solucion layout: apila encabezado sobre cards */
    .solutions-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-header {
        margin-bottom: 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    /* Cards de soluciones: colapsan a 1 columna en móvil */
    .solutions-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .solution-card {
        flex-direction: column;
        border-left: none;
        border-top: 5px solid transparent;
    }

    .solution-card--blue   { border-top-color: var(--c-darkblue); }
    .solution-card--yellow { border-top-color: var(--c-orange); }
    .solution-card--red    { border-top-color: var(--c-red); }

    .card-image-box {
        width: 100%;
        min-width: unset;
        height: 200px;
    }

    .b2b-form .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Reflow de Textos en Contacto */
    .contact-info h2 {
        font-size: 2.8rem;
        text-align: center;
    }

    .contact-info p {
        text-align: center;
    }

    .contact-details {
        text-align: center;
        padding-top: 2rem;
        margin-top: 2rem;
    }

    .form-wrapper {
        padding: 2rem;
    }

    /* Textos genéricos centralizados */
    .section-header {
        text-align: center;
        margin-bottom: 4rem;
    }

    .section-header h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.5rem;
    }

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

    .stat-num {
        font-size: 4rem;
    }
}

/* BLOQUE DE ESCALA REFINADA ELIMINADO PARA MANTENER FLUIDEZ */

/* Overlay de +2 Fotos */
.more-photos-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 16, 58, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    z-index: 5;
    pointer-events: none;
    transition: background-color 0.4s ease;
}
@media (hover: hover) {
    .img-zoom-wrapper:hover .more-photos-overlay {
        background-color: rgba(0, 16, 58, 0.85);
    }
}


/* Custom Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 16, 58, 0.8);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
