
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* 1. Fondo completo de la pantalla de carga */
#pantalla-carga {
    position: fixed; /* 🌟 Congela la pantalla encima de todo */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff; /* Tapará todo con fondo blanco */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* 🌟 Obliga a que se ponga encima del menú y de cualquier otro elemento */
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* 2. Contenedor interno del logo */
.loader-contenido {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* 3. Estilo del logo (Efecto sutil de respiración) */
.loader-logo {
   width: 100%;
    max-width: 250px; /* 🌟 Esto controla el tamaño real en pantalla. Cambia 250px por el tamaño que quieras */
    height: auto;     /* Mantiene la proporción para que no se deforme */
    display: block;
    margin: 0 auto;   /* Asegura que esté centrado */
    animation: latidoLogo 1.5s ease-in-out infinite;
}

/* 4. Barra de carga minimalista debajo del logo (Opcional pero recomendado) */
.loader-linea {
    width: 100px;
    height: 3px;
    background-color: #e0e0e0;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.loader-linea::after {
    content: '';
    position: absolute;
    left: -50%;
    height: 100%;
    width: 50%;
    background-color: #5b7bb0; /* El color azul que estás usando */
    animation: cargandoBarra 1.2s linear infinite;
}

/* 🌟 ANIMACIONES CSS */
@keyframes latidoLogo {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.04); opacity: 1; }
}

@keyframes cargandoBarra {
    0% { left: -50%; }
    100% { left: 100%; }
}

/* Clase que ocultará todo de forma fluida */
#pantalla-carga.oculto {
    opacity: 0;
    visibility: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: white;
    
}

.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 20px 8%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 3px solid #e0e0e0;
    box-sizing: border-box;

    position: sticky;
    top: 0;
    z-index: 1000;

    transition: top 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.navbar.scroll-abajo {
    top: -120px; 
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    color: #1a252f;
    letter-spacing: 1px;
    justify-content: flex-start;
}

.logo1 {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}


.nav-menu {
    display: flex;
    gap: 10px; 
    align-items: center;
    justify-content: center;
}

.nav-menu .nav-link {
    text-decoration: none;
    color: #1c2842; 
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px; 
    border-radius: 20px; 
    letter-spacing: 0.5px;
    background-color: transparent;
    transition: background-color 0.3s cubic-bezier(0.25, 1, 0.5, 1), color 0.3s ease;
}


.nav-menu .nav-link:hover,
.nav-menu .nav-link.active {
    background-color: #eaf2fc; 
    color: #161d3a;
}


.nav-socials {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-left: 15px;
    border-left: 1px solid #e0e0e0;
    justify-self: end;
}

.nav-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.nav-icon:hover {
    transform: scale(1.18);
}

.nav-img {
    width: 18px;
    height: auto;
    object-fit: contain;
    filter: brightness(0);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.nav-icon:hover .nav-img {
    opacity: 1;
}

.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    justify-self: end; /* Se alinea a la derecha en móviles */
    z-index: 1001;
}

.hamburger-btn .bar {
    width: 100%;
    height: 3px;
    background-color: #1c2842;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ===================================================
   6. DISEÑO RESPONSIVE (MÓVIL Y TABLETS < 768px)
   =================================================== */
@media (max-width: 768px) {
    .navbar {
        /* Cambiamos el grid de 3 columnas a 2 columnas en móviles (Logo y Hamburguesa) */
        grid-template-columns: 1fr auto;
        padding: 15px 5%;
    }

    /* Ocultamos las redes sociales de la cabecera en móvil para no saturar espacio */
    .nav-socials {
        display: none;
    }

    /* Activamos el botón de tres líneas */
    .hamburger-btn {
        display: flex;
    }

    /* Convertimos el menú en la cortina desplegable */
    .nav-menu {
        position: absolute;
        top: 100%; /* Despliega justo abajo de la línea gris del navbar */
        left: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
        
        /* Estado oculto por defecto con animación de bajada */
        opacity: 0;
        pointer-events: none;
        transform: translateY(-15px);
        transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
        z-index: 999;
    }

    /* Ajustamos los links para que ocupen filas completas en celulares */
    .nav-menu .nav-link {
        width: 100%;
        text-align: center;
        padding: 16px 0;
        border-radius: 0; /* Convertimos a bloque limpio e industrial */
    }

    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        background-color: #f4f8fd; /* Fondo rectangular más cómodo para el dedo */
    }

    /* 🌟 CLASE MÁGICA: Abre la cortina del menú móvil */
    .nav-menu.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    /* 🌟 ANIMACIÓN DE LAS TRES RAYAS A "X" */
    .hamburger-btn.active .bar:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }
    
    .hamburger-btn.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-btn.active .bar:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    .logo-animado-home {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}
}

/* ===================================================
   7. SECCIONES, LOGOS GRANDES Y FOOTER
   =================================================== */
.logogrande {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    background-color: #fcfcfc;
}

.logo2 {
    width: 480px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.logo-animado-home {
    width: 100%;
    max-width: 750px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.footer {
    background-color: #161d3a;
    color: #ffffff;
    padding: 60px 8% 30px 8%;
    font-family: 'Poppins', sans-serif;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.desc-col {
    flex: 1.5;
}

.footer-logo {
    height: 150px;
    width: auto;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.desc-col p {
    font-size: 14px;
    color: #e0e0e0;
    max-width: 270px; 
    line-height: 1.6; 

}

.footer-col h3 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 25px;
    color: #ffffff;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: #b38f4f;
}

.action-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 25px;
}

.btn-solicita {
    position: relative;
    background-color: #ffffff;
    color: #161d3a;
    text-decoration: none;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 4px; 
    text-align: center;
    width: 100%;
    max-width: 260px;
    cursor: pointer;
    overflow: hidden;
    display: inline-block;
    box-sizing: border-box;
    z-index: 1;
    will-change: transform; 
    

    transition: background-color 0.3s ease, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease, color 0.3s ease;
    

    animation: pulseAnimationBlanco 2s infinite;
}

.btn-solicita::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background-color: #ffffff;
    border-radius: 8px;
    z-index: -1;
    transition: background-color 0.3s ease;
}

.btn-solicita:hover {
    transform: translateY(-8px); 
    color: #161d3a;
    animation-play-state: paused; 
    box-shadow: 0 10px 20px rgba(22, 29, 58, 0.15);
}

.btn-solicita:hover::after {
    background-color: #e0e0e0;
}

@keyframes pulseAnimationBlanco {
    0% {
        transform: scale(1);
        /* Genera un destello blanco sutil muy pegado al botón */
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        transform: scale(1.02); /* El botón crece ligeramente */
        /* Expande el halo blanco hacia afuera en el fondo oscuro y lo desvanece */
        box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); 
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes flotarTitulo {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px); /* Sube 6px a la mitad del ciclo */
    }
}
.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons .icon {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    background: transparent !important;
    border: none !important;
    transition: transform 0.2s ease;
}

.social-icons .icon:hover {
    transform: scale(1.2);
}

.social-img {
    width: 22px;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.footer-bottom {
    margin-top: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-line {
    flex: 1;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
}

.footer-legal {
    display: flex;
    gap: 30px;
    padding-left: 20px;
}

.footer-legal a {
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.footer-legal a:hover {
    color: #b38f4f;
}

/* ===================================================
   8. SECCIÓN DE ESTADÍSTICAS Y LLAMADO A LA ACCIÓN
   =================================================== */
.stats-section {
    background-color: #ffffff;
    padding: 60px 8%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.stats-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
    width: 100%;
    max-width: 1100px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}
/* ===================================================*/


.stats-container .stat-item {
    cursor: pointer; /* Cambia el cursor a mano para invitar a interactuar */
    
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform; 
}

.stats-container .stat-item:hover {
    /* Eleva el bloque hacia arriba 8 píxeles */
    transform: translateY(-8px); 
}


.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 700;
    color: #161d3a;
    white-space: nowrap;
}

.stat-text {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #161d3a;
    letter-spacing: 1.5px;
    line-height: 1.4;
    text-transform: uppercase;
}

.stats-action {
    display: flex;
    justify-content: center;
    width: 100%;
}

.btn-consultar {
    background-color: #161d3a;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 14px 40px;
    border-radius: 0px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    position: relative;
    animation: pulseAnimation 2s infinite;
}

.btn-consultar:hover {
    background-color: #232d54;
    transform: translateY(-2px);
}


.modal-legal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 25, 44, 0.6);
    backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #ffffff;
    padding: 20px 30px 30px 30px; 
    border-radius: 8px;
    width: 90%;
    max-width: 650px;
    max-height: 80vh; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
    display: flex;
    flex-direction: column;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaaaaa;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    z-index: 10;
}

.close-modal:hover {
    color: #1c2842;
}

.modal-titulo-fijo {
    color: #1c2842; 
    font-size: 24px;
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 15px; 
    padding-bottom: 10px;
    border-bottom: 2px solid #eaf2fc; 
}

.modal-body-text {
    overflow-y: auto; 
    flex-grow: 1;    
    padding-right: 10px;
    text-align: left;
    color: #333333;
    font-size: 15px;
    line-height: 1.6;
}

.modal-body-text h3 {
    color: #1c2842; 
    margin-top: 20px;
    font-size: 16px;
}

/* ===================================================
   10. ANIMACIONES COMPLEMENTARIAS (KEYFRAMES)
   =================================================== */
@keyframes slideDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.page-transition {
    animation: fadeInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

@keyframes pulseAnimation {
    0% {
        box-shadow: 0 0 0 0 rgba(28, 40, 66, 0.5);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(28, 40, 66, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(28, 40, 66, 0);
    }
}