/* ============================================= */
/* ====== 1. FUENTES Y ESTILOS GLOBALES ====== */
/* ============================================= */
@import url('https://fonts.cdnfonts.com/css/avenir');
@import url('https://fonts.cdnfonts.com/css/roboto');

:root {
    --primary-color: #007bff;
    --primary-dark: #2c3e50;
    --secondary-color: #5a6268;
    --nav-bg: #3f3f3f;       /* Gris oscuro de la barra */
    --nav-active: #aeb950;   /* Verde activo */
    --nav-hover: #5a5a5a;    /* Gris hover */
}

body {
    font-family: 'Avenir', sans-serif;
}

p {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: #0056b3;
    text-decoration: none;
}

h4 {
    font-family: 'Roboto', sans-serif;   
    color: #20485d;
    font-size: 20px;
    font-weight: 400;
}

/* Utilidades */
.pt-6 { padding-top: 5rem !important; }
.fw-bold1 { font-family: 'Roboto', sans-serif; font-weight: bolder !important; color: #20485d; }
.parrafo { color: #20485d; font-size: 20px; }
.sinraya a { text-decoration: none; color: #20485d; font-size: 20px; }

/* ============================================= */
/* ====== 2. NAVEGACIÓN (PROFESIONAL) ====== */
/* ============================================= */

/* Contenedor principal de la barra */
.top-nav {
    background-color: var(--nav-bg);
    position: relative;
    z-index: 1000; /* Alto z-index para que el menú flote sobre todo */
    min-height: 50px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Sombra suave para separar del banner */
}

/* Estilos base para TODOS los enlaces del menú */
.navbar-nav .nav-link,
.main-navigation li a {
    color: white !important;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: block;
}

/* --- VISTA ESCRITORIO (Pestañas Estilo Carpeta) --- */
@media (min-width: 992px) {
    .top-nav {
        height: 50px; 
        padding: 0;
    }
    
    .navbar-collapse {
        height: 100%;
        align-items: flex-end; /* Alinea las pestañas al fondo */
    }

    .main-navigation {
        display: flex;
        flex-direction: row;
        margin: 0;
        padding: 0;
        list-style: none;
        height: 100%;
    }

    /* Diseño de la Pestaña */
    .main-navigation li a {
        background-color: transparent;
        margin-right: 2px; /* Pequeño espacio entre pestañas */
        padding: 0 20px;   /* Padding lateral */
        border-radius: 8px 8px 0 0; /* Solo bordes superiores redondeados */
        height: 40px;      /* Altura de la pestaña */
        line-height: 40px; /* Centrado vertical del texto */
        margin-top: 10px;  /* Empuja hacia abajo para alinearse */
        opacity: 0.9;
    }

    /* Hover en escritorio */
    .main-navigation li a:hover {
        background-color: var(--nav-hover);
        opacity: 1;
    }

    /* Item Activo (Verde) */
    .main-navigation li.current-menu-item a {
        background-color: var(--nav-active);
        height: 45px; /* La pestaña activa crece un poco hacia arriba */
        margin-top: 5px;
        line-height: 45px;
        opacity: 1;
    }
    
    /* Botón HOME especial (si existe) */
    .home-tab-link {
        background-color: #bdcb30;
        margin-right: 5px;
        border-radius: 8px 8px 0 0;
        height: 45px;
        margin-top: 5px;
        padding: 0 20px;
        display: flex;
        align-items: center;
    }
}

/* --- VISTA MÓVIL CORREGIDA (Lista Vertical Limpia) --- */
@media (max-width: 991.98px) {
    /* 1. Ajuste de la barra superior */
    .top-nav {
        height: auto !important;
        padding: 10px 0;
        background-color: #343437; /* Asegurar fondo gris oscuro */
    }

    /* 2. Contenedor del menú desplegable */
    .navbar-collapse {
        background-color: #2c2c2f; /* Fondo ligeramente más oscuro para el menú */
        width: 100%;
        margin-top: 10px;
        border-top: 1px solid rgba(255,255,255,0.1); /* Línea separadora sutil arriba */
    }

    /* 3. Forzar lista vertical (¡Importante!) */
    .main-navigation, 
    .navbar-nav {
        display: flex;
        flex-direction: column !important; /* Obliga a apilarse verticalmente */
        width: 100%;
        padding: 0;
        margin: 0;
    }

    /* 4. Estilo de CADA botón en el celular */
    .main-navigation li,
    .navbar-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05); /* Línea entre opciones */
        margin: 0; /* Quitar márgenes raros */
    }

    .main-navigation li a,
    .navbar-nav li a {
        display: block !important; /* Ocupar todo el ancho */
        padding: 15px 20px !important; /* Espacio cómodo para el dedo */
        color: white !important;
        text-align: left; /* Texto a la izquierda */
        
        /* Resetear estilos de pestaña de escritorio */
        border-radius: 0 !important; 
        background-color: transparent !important; 
        margin: 0 !important;
        height: auto !important;
        line-height: normal !important;
    }

    /* 5. Color al tocar o pasar el dedo */
    .main-navigation li a:hover,
    .main-navigation li a:active {
        background-color: rgba(255,255,255,0.1) !important;
        padding-left: 25px !important; /* Pequeña animación de movimiento */
    }

    /* 6. Item Activo (Verde) en móvil */
    .main-navigation li.current-menu-item a {
        background-color: #aeb950 !important; /* Fondo verde sólido */
        color: white !important;
        font-weight: bold;
    }

    /* 7. Ocultar el botón "HOME" extra si se duplica */
    .home-tab-link {
        display: none !important;
    }

    /* 8. Arreglar el botón Hamburguesa */
    .navbar-toggler {
        margin-right: 0;
        border: 1px solid rgba(255,255,255,0.3);
    }
}

/* ============================================= */
/* ====== 3. BANNER (LAYERED) ====== */
/* ============================================= */

.layered-banner {
    position: relative; 
    background-image: url('../images/banner-completo-home.jpg');
    background-size: cover;
    background-position: center;
    height: 450px;
    color: white;
}

.banner-text {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-text h1 {
    font-size: 8rem;
    font-weight: 700;
    line-height: 1;
}

.banner-text p {
    font-size: 1.2rem;
}

.banner-graphics {
    position: relative;
    height: 100%;
}

.logo-agencia {
    position: absolute;
    top: 40px;
    right: 0px;
    width: 150px;
}

.ilustracion-ninos {
    position: absolute;
    bottom: 0;
    right: 200px; 
    width: 480px; 
    max-width: 100%;
}

/* Responsividad del Banner */
@media (max-width: 997.98px) {
    .layered-banner {
        height: auto;
        padding-top: 60px;
        padding-bottom: 20px;
    }

    .banner-text-responsive {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .banner-text-responsive h1 { font-size: 3.5rem; }
    .banner-text-responsive p { font-size: 1rem; }
    
    .banner-graphics-responsive-wrapper {
        height: 250px;
        display: flex;
        justify-content: center;
        align-items: flex-end;
    }

    .ilustracion-ninos {
       position: relative;
       width: 80%;
       max-width: 300px;
       bottom: 0;
       right: 0;
    }
    
    .logo-agencia {
        position: absolute;
        top: 0;
        right: 15px;
        width: 100px;
    }
}

.banner-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ============================================= */
/* ====== 4. COMPONENTES: INICIATIVAS & TARJETAS ====== */
/* ============================================= */

.initiatives-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
}

.initiatives-column {
    flex: 1;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.initiatives-column.left { align-items: flex-end; }
.initiatives-column.right { align-items: flex-start; }

.initiatives-column.left .initiative-card {
    text-align: right;
    flex-direction: row-reverse;
}

.initiative-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.initiative-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.initiative-school {
    font-size: 0.95rem;
    color: #95a5a6;
    margin-top: 4px;
}

.initiative-list .list-group-item {
    border: none;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}
.initiative-list .list-group-item:last-child { border-bottom: none; }
.initiative-list .list-group-item a { text-decoration: none; color: var(--primary-dark); }
.initiative-list .list-group-item a:hover { color: var(--primary-color); }

/* Responsividad Componentes */
@media (max-width: 991.98px) {
    .initiatives-layout {
        flex-direction: column;
        align-items: center;
    }
    .initiatives-column.left, .initiatives-column.right {
        align-items: flex-start;
        text-align: left;
    }
    .initiatives-column.left .initiative-card { flex-direction: row; }
}

/* ============================================= */
/* ====== 5. COMPONENTES: VIDEO & BOTONES ====== */
/* ============================================= */

/* Video */
.video-container { position: relative; cursor: pointer; }
.video-play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    color: rgba(255, 0, 0, 0.9);
    transition: transform 0.2s ease-in-out, color 0.2s;
}
.video-container:hover .video-play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    color: rgba(255, 0, 0, 1);
}

/* Botones */
.btn-ver-mas {
    background-color: #20485d;
    color: white;
    padding: 6px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    margin-top: 10px;
    display: inline-block;
}
.btn-ver-mas:hover { background-color: #2c3e50; color: white; }

.btn-descarga {
    display: inline-block;
    background-color: #90b437;
    color: #fff !important;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Avenir', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    border: 2px solid transparent;
}
.btn-descarga:hover {
    background-color: #ffffff;
    color: #90b437 !important;
    border-color: #90b437;
    transform: translateY(-2px);
}
.btn-descarga::before {
    content: "\f019";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

/* Volver arriba */
#back-to-top {
    position: fixed;
    bottom: 25px; right: 25px;
    background-color: #90b437;
    color: white;
    width: 40px; height: 40px;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-size: 1.2rem;
    z-index: 100;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#back-to-top.show { opacity: 1; visibility: visible; }
#back-to-top:hover { background-color: #6db560; color: white; }

/* ============================================= */
/* ====== 6. FOOTER ====== */
/* ============================================= */

.footer-area {
    background-color: #343437;
    color: #ffffff;
    padding: 50px 0 20px 0;
    font-size: 0.9rem;
    background-size: cover;
    background-repeat: no-repeat;
}
.footer-area a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-area a:hover { color: #ffffff; }

.footer-logo { display: block; margin-bottom: 15px; }
.footer-address { color: #ffffff; line-height: 1.6; }
.footer-col-logo .footer-address { margin-left: 0; margin-right: auto; max-width: 220px; }

.widget-title, footer .widget h4.wp-block-heading {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.footer-contact-list { list-style: none; padding: 0; margin: 0; }
.footer-contact-list li { margin-bottom: 12px; }
.footer-contact-list li i { margin-right: 10px; color: #ffffff; width: 20px; text-align: center; }

.footer-social-icons a { display: inline-block; color: #ffffff; font-size: 1.3rem; margin-right: 15px; }
.footer-social-icons a:last-child { margin-right: 0; }

.footer-divider { border-top: 1px solid #ffffff; margin: 20px 0 30px 0; }
.footer-bottom-row { text-align: center; }
.footer-policy-link { margin-bottom: 15px; }
.footer-policy-link a { color: #ffffff; font-size: 0.85rem; }
.footer-copyright-row { margin-top: 20px; text-align: center; font-size: 0.8rem; color: #ffffff; }

@media (min-width: 992px) {
    .footer-bottom-row { text-align: left; }
}

/* ============================================= */
/* ====== 7. ELEMENTOS ESPECÍFICOS / OTROS ====== */
/* ============================================= */

/* Encabezados de Iniciativa (Número + Título) */
.initiative-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}
.circle-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px; height: 35px;
    background-color: #8cb792;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.initiative-text-block { display: flex; flex-direction: column; }
.titulo-pagina { text-align: left; font-weight: bold; color: #20485d; font-style: normal; font-size: 28px; }
.initiative-school-name { font-family: 'Roboto', sans-serif; color: #5a6268; margin: 5px 0 0 0; font-size: 18px; }

/* Sidebar */
.sidebar-widget { border: 1px solid #e9ecef; }
.sidebar-widget h4 { font-size: 1.25rem; }
.sidebar-widget ul li { padding: 0.5rem 0; }
.sidebar-widget ul li a { color: #333; text-decoration: none; }
.sidebar-widget ul li a:hover { color: var(--primary-color); }

/* WPBakery Fix */
.page-builder-content .vc_row-fluid { margin-left: auto; margin-right: auto; }