/* Generales */
body.amip-framework {
  font-family: var(--amip-font-primary);
  -webkit-font-smoothing: antialiased;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.text-primary { color: var(--amip-primary) !important; }
.bg-primary { background-color: var(--amip-primary) !important; }
.bg-secondary { background-color: var(--amip-secondary) !important; }

/* Botones */
.btn-primary {
  background-color: var(--amip-accent);
  border-color: var(--amip-accent);
  color: #fff;
  font-weight: 600;
  transition: all var(--amip-transition-fast);
}
.btn-primary:hover {
  background-color: var(--amip-accent-hover);
  border-color: var(--amip-accent-hover);
  transform: translateY(-2px);
}

/* Modifiers del Header */
.amip-header {
  transition: transform var(--amip-transition-smooth);
}
.amip-header.scrolled {
  box-shadow: var(--amip-shadow-lg) !important;
}

/* Programas Académicos (Tarjetas) */
.amip-programs .card {
  border: none;
  border-radius: var(--amip-border-radius);
  box-shadow: var(--amip-shadow-sm);
  transition: transform var(--amip-transition-smooth), box-shadow var(--amip-transition-smooth);
}
.amip-programs .card:hover {
  transform: translateY(-5px);
  box-shadow: var(--amip-shadow-lg);
}

/* Stats */
.amip-stats {
  border-top: 4px solid var(--amip-accent);
}

/* Back to Top */
#amip-back-to-top {
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#amip-back-to-top.visible {
  opacity: 1;
  visibility: visible;
}


/* Contenedor principal para manejar el ancho y los bordes */
.berea-top-bar-wrapper {
    background-color: transparent;
    padding: 0 20px; /* Espaciado lateral para que no toque los bordes de la pantalla */
}

.berea-top-bar {
    background-color: #07233D; /* Azul oscuro institucional */
    color: #FFFFFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    border-radius: 0 0 20px 20px; /* Aquí logramos las esquinas inferiores redondeadas */
    font-family: 'Inter', sans-serif; /* Ajusta a la tipografía de tu proyecto */
    font-size: 13px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Enlaces generales de la Top Bar */
.berea-top-bar a {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.berea-top-bar a:hover {
    color: #E2B753; /* Tono dorado/mostaza al pasar el mouse */
}

/* --- Estilos por columna --- */

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-center {
    display: flex;
    align-items: center;
    gap: 30px; /* Separación entre el correo y el teléfono */
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Estilos para los íconos (Asumiendo FontAwesome) */
.berea-icon {
    color: #E2B753; /* Tono dorado/mostaza de la imagen */
    margin-right: 6px;
    font-size: 14px;
}

/* Ícono de búsqueda (Lupa) */
.search-icon {
    font-size: 16px;
    cursor: pointer;
}





/* ========================================================================
   SECCIÓN: HERO (INSTITUTO BEREA)
   ======================================================================== */
.hero-berea-wrapper {
    position: relative;
    width: 100%;
    min-height: 80vh; /* Ocupa el 80% de la altura de la pantalla */
    display: flex;
    align-items: center;
    overflow: hidden; 
    background-color: #071b36; /* Color de respaldo */
}

/* La imagen actúa como un fondo cover real */
.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    z-index: 1;
}

/* El degradado fundamental del diseño: de azul oscuro sólido a transparente */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(7, 27, 54, 1) 0%, rgba(7, 27, 54, 0.85) 40%, rgba(7, 27, 54, 0) 100%);
    z-index: 2;
}

/* Contenedor de textos por encima del gradiente */
.hero-content {
    position: relative;
    z-index: 3;
    color: #ffffff;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Tipografía del Hero */
.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.text-gold {
    color: #d4a350; /* El color dorado/mostaza de tu diseño */
}

.hero-lead {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
    max-width: 90%;
    line-height: 1.6;
    color: #e0e6ed;
}

/* Botones */
.hero-buttons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.btn-gold {
    background-color: #d4a350;
    color: #ffffff;
    border: 2px solid #d4a350;
    font-weight: 600;
    padding: 0.8rem 2.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background-color: #b88a3d;
    border-color: #b88a3d;
    color: #ffffff;
}

.hero-berea-wrapper .btn-outline-light {
    font-weight: 600;
    padding: 0.8rem 2.5rem;
    border: 2px solid #ffffff;
    border-radius: 4px;
    background: transparent;
    transition: all 0.3s ease;
}

.hero-berea-wrapper .btn-outline-light:hover {
    background-color: #ffffff;
    color: #071b36;
}

/* Flecha animada */
.hero-scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 1.5rem;
    z-index: 3;
    animation: bounceHero 2s infinite;
    opacity: 0.6;
}

@keyframes bounceHero {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -10px); }
    60% { transform: translate(-50%, -5px); }
}

/* ========================================================================
   MEDIA QUERIES (TABLET Y MÓVIL) - Flex adaptativo
   ======================================================================== */
@media (max-width: 991.98px) {
    /* Tablet */
    .hero-title {
        font-size: 3rem;
    }
    .hero-overlay {
        /* En tablet oscurecemos más área para asegurar lectura */
        background: linear-gradient(90deg, rgba(7, 27, 54, 0.95) 0%, rgba(7, 27, 54, 0.6) 100%);
    }
}

@media (max-width: 767.98px) {
    /* Móvil */
    .hero-berea-wrapper {
        min-height: 70vh;
        text-align: left; /* Mantenemos alineación a la izquierda según tu mockup */
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-lead {
        font-size: 1rem;
        max-width: 100%;
    }
    .hero-overlay {
        /* En móvil casi todo oscuro para que se lea perfectamente el texto */
        background: linear-gradient(0deg, rgba(7,27,54,0.9) 0%, rgba(7,27,54,0.7) 100%);
    }
    .hero-buttons {
        flex-direction: column; /* Apilamos los botones como en tu diseño móvil */
        gap: 1rem;
    }
    .hero-buttons .btn {
        width: 100%; /* Botones de ancho completo */
        text-align: center;
    }
}

/* ========================================================================
   SECCIÓN: PROGRAMAS ACADÉMICOS
   ======================================================================== */

/* Subrayado dorado sutil debajo del título principal en index.php */
.amip-programs h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    color: #071b36 !important; /* Azul oscuro del diseño */
}

.amip-programs h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: #d4a350; /* Dorado */
}

/* Paleta de colores para los niveles */
.bg-berea-green { background-color: #0b5e3c !important; }
.text-berea-green { color: #0b5e3c !important; }

.bg-berea-blue { background-color: #124c75 !important; }
.text-berea-blue { color: #124c75 !important; }

.bg-berea-gold { background-color: #c18b32 !important; }
.text-berea-gold { color: #c18b32 !important; }

/* Estilos de la tarjeta */
.program-card {
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05) !important;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}

/* Círculo para los íconos grandes */
.icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Línea de metadatos (Asignaturas, meses, etc) */
.program-meta {
    font-size: 0.75rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    gap: 0.5rem;
}

.program-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Enlaces "Ver más" */
.program-link {
    transition: opacity 0.2s ease;
    font-size: 0.9rem;
}

.program-link:hover {
    opacity: 0.8;
}

/* Responsivo para móviles: apilar los metadatos si no caben */
@media (max-width: 575.98px) {
    .program-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* ========================================================================
   SECCIÓN: FRANJA DE ESTADÍSTICAS (STATS BAR)
   ======================================================================== */
   
/* Forzamos el color azul oscuro y damos espacio interno */
.amip-stats {
    background-color: #071b36 !important; 
    padding: 4rem 0 !important; 
}

/* Flexbox para alinear perfectamente cada ítem en su columna */
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Íconos dorados */
.stat-icon {
    font-size: 2.8rem;
    color: #d4a350; 
    margin-bottom: 0.5rem;
    line-height: 1;
}

/* Números grandes y blancos */
.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

/* Texto descriptivo en mayúsculas pequeñas */
.stat-text {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #e0e6ed;
    letter-spacing: 1px;
}

/* Responsividad de Estadísticas */
@media (max-width: 767.98px) {
    .amip-stats {
        padding: 3rem 0 !important;
    }
    .stat-icon {
        font-size: 2.2rem;
    }
    .stat-number {
        font-size: 2.5rem;
    }
    .stat-text {
        font-size: 0.8rem;
        text-align: center;
    }
    .stat-item:nth-child(3),
    .stat-item:nth-child(4) {
        margin-bottom: 0;
    }
}

/* ========================================================================
   SECCIÓN: ¿POR QUÉ BEREA? (CARACTERÍSTICAS)
   ======================================================================== */

/* Aseguramos el color azul oscuro para el texto principal */
.text-berea-dark {
    color: #071b36 !important;
}

/* La línea cafecita/dorada debajo del título (Infalible) */
.why-berea-title {
    position: relative;
    display: inline-block;
    padding-bottom: 15px; /* Espacio entre el texto y la línea */
}

.why-berea-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px; /* Ancho de la línea */
    height: 3px; /* Grosor de la línea */
    background-color: #c18b32; /* El tono cafecito/dorado de la imagen */
    border-radius: 2px;
}

/* Forzamos el color verde oscuro para los íconos */
.berea-icon-green {
    color: #386b4a !important; /* Un verde oscuro desaturado que hace match con tu imagen */
}

/* Círculo contenedor de cada ícono */
.feature-icon {
    width: 55px;
    height: 55px;
    background-color: #f4f6f8; /* Gris muy clarito de fondo */
    border: 1px solid rgba(0,0,0,0.03); /* Un bordecito casi imperceptible */
}

/* Pequeña línea separadora debajo de cada subtítulo de ítem */
.feature-divider {
    width: 35px;
    height: 2px;
    background-color: #071b36;
    opacity: 0.3;
}

/* Textos descriptivos (Párrafos) */
.feature-item p {
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Responsividad ¿Por qué Berea? */
@media (max-width: 991.98px) {
    .feature-item {
        margin-bottom: 1.5rem;
    }
}

/* ========================================================================
   SECCIÓN: BANNER DE VIDEO
   ======================================================================== */

.video-banner-wrapper {
    position: relative;
    /* Aquí está la ruta exacta de la imagen que me compartiste */
    background-image: url('/images/headers/instituto-teologico-berea-amip-mas-de-itb.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    padding: 6rem 0; /* Le da la altura al banner */
    overflow: hidden;
}

/* Capa de degradado: Negro suave a la izquierda -> Transparente a la derecha */
.video-banner-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient de 90 grados (de izquierda a derecha) */
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 45%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

/* Aseguramos que los textos y el ícono estén por encima del degradado */
.video-banner-wrapper .container-xxl {
    position: relative;
    z-index: 2;
}

/* Estilos de Tipografía */
.video-title {
    font-size: 2.5rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.video-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    line-height: 1.5;
}

/* Estilos del botón Play */
.play-button-link {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.play-button-link:hover {
    transform: scale(1.05); /* Pequeño efecto de zoom al pasar el mouse */
    opacity: 0.8;
    color: #ffffff;
}

.play-icon {
    font-size: 4rem; /* Tamaño grande para el círculo de play */
    line-height: 1;
    font-weight: 300; /* Hace que el trazo del círculo se vea más fino y elegante */
}

/* ========================================================================
   RESPONSIVIDAD (MÓVILES Y TABLETS)
   ======================================================================== */
@media (max-width: 767.98px) {
    .video-banner-wrapper {
        padding: 4rem 0;
    }
    
    /* En móviles, oscurecemos un poco más la derecha para garantizar lectura si el texto se apila */
    .video-banner-wrapper::before {
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 100%);
    }
    
    .video-title {
        font-size: 1.8rem;
    }
    
    .play-icon {
        font-size: 3rem;
    }
}

/* ========================================================================
   AMIP FRAMEWORK - HOJA DE ESTILOS INSTITUCIONAL (CONSOLIDADO)
   ======================================================================== */

/* 1. SECCIÓN: PROGRAMAS ACADÉMICOS */
.amip-programs h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    color: #071b36 !important;
}
.amip-programs h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: #d4a350;
}
.bg-berea-green { background-color: #0b5e3c !important; }
.text-berea-green { color: #0b5e3c !important; }
.bg-berea-blue { background-color: #124c75 !important; }
.text-berea-blue { color: #124c75 !important; }
.bg-berea-gold { background-color: #c18b32 !important; }
.text-berea-gold { color: #c18b32 !important; }
.program-card {
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05) !important;
}
.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}
.icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.program-meta {
    font-size: 0.75rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    gap: 0.5rem;
}
.program-link { transition: opacity 0.2s ease; font-size: 0.9rem; }
@media (max-width: 575.98px) { .program-meta { flex-direction: column; gap: 8px; } }

/* 2. SECCIÓN: FRANJA DE ESTADÍSTICAS (STATS BAR) */
.amip-stats { background-color: #071b36 !important; padding: 4rem 0 !important; }
.stat-item { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stat-icon { font-size: 2.8rem; color: #d4a350; margin-bottom: 0.5rem; line-height: 1; }
.stat-number { font-size: 3.5rem; font-weight: 700; line-height: 1; color: #ffffff; margin-bottom: 0.2rem; }
.stat-text { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; color: #e0e6ed; letter-spacing: 1px; }

/* 3. SECCIÓN: ¿POR QUÉ BEREA? (CARACTERÍSTICAS) */
.text-berea-dark { color: #071b36 !important; }
.why-berea-title { position: relative; display: inline-block; padding-bottom: 15px; }
.why-berea-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: #c18b32;
    border-radius: 2px;
}
.berea-icon-green { color: #386b4a !important; }
.feature-icon {
    width: 55px; height: 55px;
    background-color: #f4f6f8;
    border: 1px solid rgba(0,0,0,0.03);
}
.feature-divider { width: 35px; height: 2px; background-color: #071b36; opacity: 0.3; }
.feature-item p { font-size: 0.85rem; line-height: 1.4; }

/* 4. SECCIÓN: BANNER DE VIDEO */
.video-banner-wrapper {
    position: relative;
    background-image: url('https://subakneria.com/images/headers/instituto-teologico-berea-amip-mas-de-itb.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    padding: 6rem 0;
    overflow: hidden;
}
.video-banner-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}
.video-banner-wrapper .container-xxl { position: relative; z-index: 2; }
.video-title { font-size: 2.5rem; line-height: 1.2; color: #ffffff; }
.video-subtitle { font-size: 1.15rem; color: #ffffff; opacity: 0.9; }
.play-icon { font-size: 4rem; line-height: 1; color: #ffffff; }

/* 5. ESTILOS EDITORIALES PARA ARTÍCULOS */
.com-content-article { margin: 0 20px; padding-bottom: 3rem; color: #333; line-height: 1.8; font-size: 1.1rem; }
.com-content-article h1 {
    color: #071b36; font-weight: 800; font-size: 2.5rem;
    padding-left: 15px; border-left: 6px solid #d4a350;
    margin-bottom: 2.5rem; line-height: 1.1;
}
.com-content-article h2 { color: #071b36; font-weight: 700; margin: 3rem 0 1.5rem; text-transform: uppercase; letter-spacing: 0.5px; font-size: 1.6rem; }
.com-content-article h3 { color: #0b5e3c; font-weight: 600; margin: 2rem 0 1rem; font-size: 1.3rem; }
.com-content-article ul { list-style: none; padding-left: 0; margin: 2rem 0; }
.com-content-article ul li { position: relative; padding-left: 2.5rem; margin-bottom: 1.2rem; line-height: 1.7; }
.com-content-article ul li::before {
    font-family: 'bootstrap-icons';
    content: "\f26a"; /* bi-check2-circle */
    position: absolute; left: 0; top: 2px;
    color: #0b5e3c; font-size: 1.3rem;
}

/* 6. PIE DE PÁGINA (Footer) */
.amip-footer .text-white-50 { color: rgba(255,255,255,0.5) !important; }

/* 7. RESPONSIVIDAD GENERAL */
@media (max-width: 767.98px) {
    .amip-stats { padding: 3rem 0 !important; }
    .video-banner-wrapper { padding: 4rem 0; }
    .video-title { font-size: 1.8rem; }
}
@media (min-width: 1400px) {
    .com-content-article { margin: 0 auto; max-width: 1200px; }
}


/* ========================================================================
   ESTILO BOTÓN MATRICÚLATE (HEADER)
   ======================================================================== */

.btn-gold-nav {
    background-color: #d4a350; /* Dorado institucional */
    border-radius: 6px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn-gold-nav:hover {
    background-color: #b88a3a; /* Un toque más oscuro al pasar el cursor */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212, 163, 80, 0.3);
    color: #ffffff;
}

/* Ajuste responsivo para el botón Matricúlate */
.btn-gold-nav {
    padding: 8px 15px; /* Padding más pequeño para móvil */
    font-size: 0.8rem; /* Fuente más pequeña para móvil */
}

/* En pantallas medianas y grandes, recuperamos el tamaño normal */
@media (min-width: 992px) {
    .btn-gold-nav {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}

/* ========================================================================
   AJUSTE RESPONSIVO PARA EL BOTÓN DE MENÚ (TOGGLER) Y HEADER
   ======================================================================== */

@media (max-width: 991.98px) {
    /* 1. Aseguramos que el contenedor general respete los bordes de la pantalla */
    .amip-header .container, 
    .amip-header .container-fluid,
    .navbar .container,
    .navbar .container-fluid {
        flex-wrap: nowrap !important; /* Mantiene todo en una línea */
        padding-right: 20px !important; /* Fuerza un margen derecho para que nada quede al ras */
    }

    /* 2. Regla de oro para el ícono cuadrado del menú */
    .navbar-toggler {
        flex-shrink: 0 !important; /* Impide absolutamente que Flexbox aplaste o reduzca este botón */
        margin-left: 15px; /* Le da un respiro respecto al botón "Matricúlate" */
    }
}

/* 3. Ajuste extra para celulares pequeños (evita que el botón compita con el logo) */
@media (max-width: 575.98px) {
    .btn-gold-nav {
        padding: 5px 10px; /* Reducimos aún más el relleno del botón en celulares */
        font-size: 0.7rem; /* Reducimos sutilmente la fuente */
        letter-spacing: 0; /* Quitamos el espaciado de letras para ganar milímetros valiosos */
    }
    
    .navbar-toggler {
        margin-left: 10px; /* Ajustamos la separación en pantallas mínimas */
        padding: 4px 8px; /* Hacemos el cuadradito del menú un poco más compacto */
    }
}