:root {
    /* Paleta Premium extraída del nuevo logo corporativo */
    --primary: #7CE0D3;       /* Verde agua claro (Letra T) */
    --primary-dark: #2BA396;  /* Verde oscuro (Letra E) */
    --secondary: #39C0B3;     /* Tono intermedio para degradados fluidos */
    
    --bg-dark: #070b19;
    --bg-card: rgba(20, 25, 45, 0.4);
    --text-light: #ffffff;
    --text-muted: #94a3b8;
    
    /* Tipografías */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Efecto Glow actualizado al nuevo verde agua (RGB: 124, 224, 211) */
    --glow-shadow: 0 0 20px rgba(124, 224, 211, 0.3);
}

/* --- LOADER (PANTALLA DE CARGA) --- */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-dark); /* Fondo oscuro corporativo */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999; /* Por encima de absolutamente todo */
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.loader-logo {
    width: 180px; 
    animation: pulseLoader 1.5s infinite ease-in-out;
}

/* Círculo de carga giratorio (Spinner) */
.loader-spinner {
    width: 45px;
    height: 45px;
    border: 4px solid rgba(124, 224, 211, 0.1); /* Borde casi transparente */
    border-top: 4px solid var(--primary); /* Borde principal verde agua */
    border-radius: 50%;
    animation: spinLoader 1s linear infinite;
    box-shadow: var(--glow-shadow);
}

/* Animaciones del Loader */
@keyframes spinLoader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseLoader {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* Clase para desaparecer suavemente el loader */
.loader-container.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Bloquea el scroll del usuario mientras dura la pantalla de carga */
body.no-scroll {
    overflow: hidden !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-gradient {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar Reactivo */
nav {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: transparent;
    transition: all 0.4s ease;
    padding: 15px 0;
}

nav.scrolled {
    background: rgba(7, 11, 25, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 10px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-primary-small {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 10px 24px;
    border-radius: 30px;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: var(--glow-shadow);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 120px 0 60px;
}

.hero-bg {
    position: absolute;
    top: -5%; left: -5%; width: 110%; height: 110%;
    background-size: cover;
    background-position: center;
    animation: kenburns 20s ease-in-out infinite alternate;
    z-index: -2;
}


/* --- ESTILOS PARA LOS LOGOS EN EL NAVBAR --- */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    object-fit: contain;
}

/* Logo principal (Conserva sus colores originales) */
.logo-main {
    display: block;
    height: 115px; /* El tamaño grande que deseas */
    
    /* TRUCO: Márgenes negativos para que no empuje el menú hacia abajo */
    margin-top: -25px;    /* Sube el logo */
    margin-bottom: -35px; /* Evita que estire la barra hacia abajo */
    
    transition: all 0.3s ease;
}

/* Logo secundario (Letras negras convertidas a blanco por CSS) */
.logo-scrolled {
    display: none;
    height: 35px; /* Altura más pequeña para el logo horizontal */
    
    /* Convierte los píxeles negros en blancos brillantes */
    filter: brightness(0) invert(1); 
    transition: all 0.3s ease;
}

/* --- EFECTO AL HACER SCROLL --- */
/* Oculta el logo grande */
nav.scrolled .logo-main {
    display: none;
}

/* Muestra el logo de solo letras */
nav.scrolled .logo-scrolled {
    display: block;
}

@keyframes kenburns {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Redujimos la opacidad a 0.65 y 0.4 para que la foto destaque más */
    background: linear-gradient(135deg, rgba(3, 5, 13, 0.65) 0%, rgba(7, 11, 25, 0.4) 100%);
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.2);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 25px;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 16px 36px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: var(--glow-shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 210, 255, 0.4);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 16px 36px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(0, 210, 255, 0.05);
}

/* --- Nuevas Tarjetas Compactas de Expertos --- */
.experts-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.glass-card {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.03) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shine 6s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.floating {
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

/* --- EN LA SECCIÓN NORMAL DE TU CSS (NO EN EL MEDIA QUERY) --- */

.bio-card-inner {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 25px;
    align-items: start;
    padding: 25px; 
}

/* Y justo debajo agregas esto para que el contenedor externo no estorbe en PC */
.bio-card-compact {
    width: 100%;
}

.profile-pic-small {
    /* Aumentamos el tamaño de 80px a 110px */
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
    box-shadow: var(--glow-shadow);
    background-color: var(--bg-dark); /* Fondo oscuro por si la imagen tarda en cargar */
    flex-shrink: 0; /* Evita que el contenedor aplaste la foto si falta espacio */
}

.bio-info h2 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    line-height: 1.2;
    margin-bottom: 5px;
}

.bio-info .subtitle {
    font-size: 0.85rem;
    margin-bottom: 12px;
    color: var(--primary);
    font-weight: 500;
}

.credentials-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.credentials-list li {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
}

.credentials-list i {
    color: var(--primary);
    font-size: 0.9rem;
    min-width: 15px;
    margin-top: 2px;
}

.credentials-list b {
    color: var(--text-light);
    font-weight: 500;
}

/* Servicios Section */
.services-section {
    padding: 120px 0;
    background: radial-gradient(circle at top right, rgba(0, 150, 199, 0.05) 0%, var(--bg-dark) 50%);
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Tarjetas Glassmorphism Services */
.service-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    min-height: 320px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 210, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 210, 255, 0.1) inset;
}

.card-front, .card-back {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-front {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.card-back {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    background: linear-gradient(180deg, rgba(0, 210, 255, 0.05) 0%, rgba(0,0,0,0) 100%);
}

.service-card:hover .card-front {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
}

.service-card:hover .card-back {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.icon-wrapper {
    width: 80px; height: 80px;
    background: rgba(0, 210, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: all 0.3s;
}

.service-card:hover .icon-wrapper {
    background: var(--primary);
    box-shadow: var(--glow-shadow);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary);
    transition: all 0.3s;
}

.service-card:hover .service-icon {
    color: #fff;
}

.card-front h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
}

.card-back p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.highlight-text {
    color: var(--primary);
    font-weight: 600;
}

/* Alianzas Parallax */
.alliances-section {
    position: relative;
    padding: 80px 0;
    overflow: hidden;
}

.alliance-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
}

.alliance-overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    /* Redujimos el 0.85 a 0.5 para que la foto tenga más luz */
    background: rgba(7, 11, 25, 0.7); 
    z-index: 2;
}

.relative-z {
    position: relative;
    z-index: 3;
}

.alliance-title {
    text-align: center;
    font-family: var(--font-heading);
    margin-bottom: 40px;
    font-size: 1.5rem;
    color: var(--primary);
}

/* Contenedor de Logos */
.logos-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap; /* ¡CLAVE! Fuerza a que todos estén en una sola línea */
    gap: 3%; /* Usamos porcentaje para que el espacio se adapte al tamaño del monitor */
    margin-top: 40px;
    width: 100%;
}
/* Efecto Premium para las imágenes de los logos */
.alliance-logo {
    height: auto;
    max-height: 75px; /* Altura ideal para que quepan todos */
    width: 100%; /* Permite que se encojan automáticamente si falta espacio */
    max-width: 140px; /* Evita que los logos anchos (como CONAVI o SHF) empujen a los demás */
    object-fit: contain; 
    
    /* Estado Normal */
    filter: grayscale(100%) opacity(60%) brightness(200%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Estado Hover: Vuelven a su color original y saltan ligeramente */
.alliance-logo:hover {
    filter: grayscale(0%) opacity(100%) brightness(100%);
    transform: scale(1.1) translateY(-5px);
}

/* Responsive para celulares y tablets */
@media (max-width: 992px) {
    .logos-flex {
        flex-wrap: wrap; /* En celulares SÍ permitimos que bajen de línea */
        gap: 30px;
    }
    .alliance-logo {
        max-height: 55px; /* Los reducimos un poco */
        max-width: 110px;
    }
}

/* Logo en el Footer */
.footer-logo {
    height: 155px; 
    margin-bottom: 0px;
    object-fit: contain;
}

/* Footer */
.footer-section {
    background-color: #040710;
    padding: 80px 0 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Footer Grid - 4 Columnas */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 50px;
    text-align: left;
}

.footer-col p {
    color: var(--text-muted);
    margin-top: 0px; /* Ajustado para que pegue bien con el logo grande */
    max-width: 300px;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col h3 {
    margin-bottom: 25px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-light);
    position: relative;
    padding-bottom: 12px;
}

/* Línea decorativa debajo de los títulos del footer */
.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Redes Sociales */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    color: var(--bg-dark);
    transform: translateY(-4px);
    box-shadow: var(--glow-shadow);
}

/* Listas de Enlaces y Horarios */
.links-col ul, .info-list {
    list-style: none;
}

.links-col li {
    margin-bottom: 15px;
}

.links-col a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.links-col a i {
    font-size: 0.75rem;
    color: var(--primary);
    transition: transform 0.3s;
}

.links-col a:hover {
    color: var(--primary);
}

.links-col a:hover i {
    transform: translateX(6px);
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.info-list i {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 2px;
}

/* Contacto Directo */
.contact-link {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 20px;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.contact-icon-bg {
    width: 45px; height: 45px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all 0.3s;
    flex-shrink: 0;
}

.contact-link:hover {
    color: var(--text-light);
}

.contact-link:hover .contact-icon-bg {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--glow-shadow);
}

.email-text {
    word-break: break-all;
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.copyright {
    text-align: left;
    color: rgba(255,255,255,0.3);
    font-size: 0.9rem;
}

.legal-links a {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.legal-links a:hover {
    color: var(--primary);
}

/* --- RESPONSIVE GENERAL --- */

/* Tablets Horizontales */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr; 
    }
}

/* Tablets Verticales y Celulares Grandes */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-text { margin-top: 50px; }
    .hero-desc { margin: 0 auto 40px; }
    .hero-buttons { justify-content: center; }
    .nav-links { display: none; }

    /* --- CORRECCIONES CRÍTICAS PARA MÓVIL --- */
    
    /* 1. Logo más grande y vistoso */
    .logo-main {
        height: 115px; /* Aumentamos el tamaño significativamente */
        margin-top: -10px; 
    }
    /* 3. Título principal equilibrado (Más chico) */
    .main-title {
        font-size: 2.2rem; /* Reducimos para que respire mejor */
        line-height: 1.2;
        margin-bottom: 20px;
        padding: 0 10px; /* Evita que las letras toquen los bordes */
    }
    /* 4. Párrafo descriptivo legible (Blanco y con sombra) */
    .hero-desc {
        color: #ffffff !important; /* Forzamos el color blanco puro */
        font-size: 1.05rem;
        font-weight: 300; /* Letra un poco más ligera para verse elegante */
        margin: 0 auto 35px;
        padding: 0 15px;
        line-height: 1.6;
        /* El truco final: una sombra oscura detrás del texto para separarlo del fondo */
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8); 
    }
    /* 2. Oscurecer la imagen de fondo solo en celular para dar contraste */
    .hero-overlay {
        /* Hacemos la capa oscura más intensa (0.88 de opacidad) */
        background: rgba(4, 7, 16, 0.7) !important; 
    }
    .nav-content {
        justify-content: center; /* Centramos el logo ya que los links están ocultos */
    }

    /* 2. Arreglamos los botones del Hero */
    .hero-buttons { 
        flex-direction: column; /* Apilamos un botón sobre el otro */
        align-items: center;
        gap: 15px; /* Espacio entre los botones */
    }

    .hero-buttons a {
        width: 100%; /* Hacemos que ocupen el ancho disponible */
        max-width: 280px; /* Pero con un límite para que no se vean gigantes */
        justify-content: center;
    }
    
    .bio-card-compact {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }
    .credentials-list li {
        justify-content: center;
    }
    
    /* Logos de Alianzas Responsive */
    .logos-flex {
        flex-wrap: wrap;
        gap: 30px;
    }
    .alliance-logo {
        max-height: 55px;
        max-width: 110px;
    }
    /* --- TÍTULOS DE SECCIONES (Servicios, Acompañamiento, etc.) --- */
    
    .section-header {
        padding: 0 15px; /* Le da respiración a los lados al bloque completo */
        margin-bottom: 40px; /* Separación con las tarjetas que van debajo */
    }

    .section-title {
        font-size: 1.9rem; /* Reducimos el tamaño gigante a algo muy elegante */
        line-height: 1.3;  /* Espacio entre los renglones para que no se apelmace */
        margin-bottom: 15px;
    }

    /* Si tienes una clase específica para el párrafo de abajo, normalmente es .section-subtitle o similar. 
       Aquí abarcamos los párrafos dentro del header de la sección: */
    .section-header p {
        font-size: 1rem;
        line-height: 1.6;
        color: var(--text-muted);
        padding: 0 10px;
        margin: 0 auto;
    }
    /* --- ALIANZAS INSTITUCIONALES (Móvil) --- */
    .alliance-title {
        font-size: 1.8rem; 
        margin-bottom: 40px;
        padding: 0 15px;
    }

    /* ¡Cambiamos Flexbox por CSS Grid para un control perfecto! */
    .logos-flex {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Obliga a crear exactamente 2 columnas iguales */
        gap: 45px 15px; /* Espaciado: 45px arriba/abajo, 15px a los lados */
        justify-items: center; /* Centra el logo horizontalmente en su mitad de la pantalla */
        align-items: center;   /* Centra el logo verticalmente */
        padding: 0 15px;
    }
    
    .alliance-logo {
        width: 100%; 
        max-width: 135px; /* Ningún logo podrá ser más ancho que esto */
        height: 75px;     /* Forzamos a que todos tengan la misma altura máxima */
        object-fit: contain; /* Hace que la imagen encaje perfecto en ese tamaño sin deformarse */
        margin: 0;
    }
    /* --- CORRECCIÓN DE FONDOS (PARALLAX BUG EN MÓVILES) --- */
    .hero-bg, 
    .alliance-bg {
        /* Desactiva el efecto fixed en celulares para evitar el zoom masivo */
        background-attachment: scroll !important; 
        
        /* Centra la imagen para que se vea la mejor parte (las manos/teclado) */
        background-position: center center !important; 
        
        /* Asegura que cubra el espacio sin deformarse */
        background-size: cover !important; 
    }


    /* --- AJUSTE DE ESPACIOS MUERTOS ENTRE SECCIONES (MÓVIL) --- */
    
    /* 1. Reducimos el espacio inferior del Hero (donde termina el slider) */
    .hero-section {
        padding-bottom: 30px !important;
        min-height: auto !important; /* Evita que el hero fuerce alturas innecesarias */
    }

    /* 2. Reducimos el espacio superior e inferior de todas tus secciones (Servicios, etc.) */
    section, 
    .services-section,
    .alliances-section {
        padding-top: 50px !important;   /* Reduce el enorme hueco negro de arriba */
        padding-bottom: 50px !important; /* Reduce el hueco de abajo */
    }

    /* 3. Aseguramos que los títulos no tengan márgenes extra ocultos */
    .section-header {
        margin-top: 0 !important;
        margin-bottom: 30px !important; /* Acerca un poco más el título a las tarjetas de servicios */
    }

}

/* Celulares Pequeños */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    /* ¡AQUÍ ESTÁ LA MAGIA! Ocultamos los Enlaces Rápidos en móviles */
    .links-col {
        display: none;
    }
    .footer-col p { 
        margin: 10px auto 20px; 
    }
    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .social-links {
        justify-content: center;
    }
    .links-col a, .info-list li, .contact-link {
        justify-content: center;
    }
    .footer-bottom {
        justify-content: center;
        text-align: center;
    }
    .copyright {
        text-align: center;
    }
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Retraso escalonado para tarjetas */
.services-grid .service-card:nth-child(1) { transition-delay: 0.1s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.2s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.3s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.4s; }
















/* --- Botón Scroll to Top --- */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-dark);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    text-decoration: none;
    z-index: 999;
    
    /* Estado inicial: Oculto y un poco hacia abajo */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Clase que se agregará con JavaScript al hacer scroll */
.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Efecto al pasar el mouse (Hover) */
.scroll-top-btn:hover {
    background-color: var(--primary);
    color: var(--bg-dark);
    box-shadow: var(--glow-shadow);
    transform: translateY(-5px); /* Pequeño salto hacia arriba */
}

/* Ajuste para celulares */
@media (max-width: 768px) {
    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}













/* --- RESPONSIVE Y SLIDER MÓVIL --- */
@media (max-width: 992px) {
    /* (Tus reglas anteriores del hero se quedan igual...) */
    .hero-content { grid-template-columns: 1fr; text-align: center; overflow: hidden; }
    .hero-text { margin-top: 50px; }
    .hero-desc { margin: 0 auto 40px; }
    
    /* --- SLIDER "FULL BLEED" (De borde a borde de la pantalla) --- */
    .experts-column {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        
        /* EL TRUCO MATEMÁTICO: Forzamos al contenedor a salirse del límite 
           lateral de su padre y ocupar la pantalla completa */
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        
        margin-top: 30px;
        padding-bottom: 30px;
        gap: 0; 
        
        -ms-overflow-style: none;  
        scrollbar-width: none;  
    }
    
    .experts-column::-webkit-scrollbar {
        display: none;
    }
    
    .bio-card-compact {
        /* Cada tarjeta mide ahora EXACTAMENTE lo mismo que la pantalla del celular (100vw) */
        flex: 0 0 100vw; 
        max-width: 100vw; 
        scroll-snap-align: center; 
        
        /* Padding para separar visualmente la tarjeta real del borde del teléfono, 
           lo que a su vez le da espacio a la sombra para existir sin cortarse */
        box-sizing: border-box; 
        padding: 15px 25px; /* Ajusta el '25px' si quieres la tarjeta más ancha o más delgada */
    }

    .bio-card-inner {
        /* Apilamos la foto y el texto verticalmente para el celular */
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        
        box-sizing: border-box;
        padding: 40px 20px;
        width: 100%;
    }

    /* --- TEXTOS Y CREDENCIALES (Móvil) --- */
    .bio-info {
        width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    
    .bio-info h2 { 
        font-size: 1.3rem; 
        margin-top: 15px; 
        white-space: normal; 
        line-height: 1.3;
    }
    
    .bio-info h3 { 
        font-size: 0.95rem; 
        white-space: normal;
        line-height: 1.4;
        margin-bottom: 20px;
    }
    
    .credentials-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .credentials-list li {
        display: flex;
        flex-direction: column; 
        align-items: center;
        text-align: center;
        font-size: 0.85rem;
        white-space: normal;
        line-height: 1.4;
        gap: 5px;
    }

    .credentials-list li i {
        font-size: 1.2rem;
        color: var(--primary);
        margin-bottom: 3px;
    }
}