@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;800&family=Inter:wght@300;400;600&display=swap');

:root {
    --primary: #0a2540; /* Azul Marino */
    --gold: #c5a059;    /* Dorado */
    --white: #ffffff;
    --light-gray: #f4f5f7;
}

body { font-family: 'Inter', sans-serif; color: #444; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; color: var(--primary); }

/* HERO SECTION */
/* --- 1. BARRA SUPERIOR (TOP BAR) --- */
.top-bar {
    background-color: #051424; /* Un tono más oscuro que el azul corporativo */
    color: #ffffff;
    padding: 8px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.top-bar a {
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
    margin-left: 15px;
}
.top-bar a:hover { color: var(--acbir-gold); }
.top-bar i { margin-right: 5px; }

/* --- 2. HERO SECTION CON SLIDER --- */
.hero-section {
    position: relative;
    height: 90vh;
    overflow: hidden; /* Para que las imágenes no se salgan */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* El Slider debe ir detrás del texto */
.hero-slider-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.carousel-item, .carousel-item img {
    height: 90vh;
    width: 100%;
    object-fit: cover; /* Asegura que la imagen llene el espacio sin deformarse */
}

/* Filtro oscuro sobre el slider para que se lean las letras */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 37, 64, 0.6); /* Azul oscuro semitransparente */
    z-index: 2;
}

/* Contenido (Texto y Buscador) por encima de todo */
.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
}

.hero-title {
    color: #ffffff !important; /* BLANCO PURO */
    font-weight: 800;
  
}

.hero-subtitle {
    color: #ffffff !important; /* BLANCO PURO */

  
}

/* --- 3. BUSCADOR MÁS DELGADO --- */
.hero-search {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px; /* Reduje el padding superior/inferior */
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    max-width: 850px;
    margin: 30px auto 0;
}

/* BARRA FLOTANTE DE ESTADÍSTICAS (Efecto 3D) */
.stats-floating-bar {
    position: relative;
    margin-top: -80px; /* Esto hace que se monte sobre el Hero */
    z-index: 10;
    margin-bottom: 80px;
}
.stat-box {
    background: white;
    padding: 40px 20px;
    text-align: center;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border-bottom: 5px solid var(--gold);
}
.stat-box:hover { transform: translateY(-10px); }
.stat-number { font-size: 3rem; font-weight: 800; color: var(--gold); display: block; }
.stat-label { font-size: 1.1rem; font-weight: 600; color: var(--primary); text-transform: uppercase; }

/* SERVICIOS */
.service-card {
    background: white;
    padding: 40px 30px;
    border: 1px solid #eee;
    border-radius: 10px;
    transition: 0.4s;
    position: relative;
    overflow: hidden;
}
.service-card:hover {
    background: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.service-card i { font-size: 3rem; color: var(--gold); margin-bottom: 20px; transition: 0.3s; }
.service-card:hover i { color: white; }
.service-card h4 { transition: 0.3s; }
.service-card:hover h4, .service-card:hover p { color: white; }

/* PARALLAX DESCANSO */
.parallax-break {
    background: linear-gradient(rgba(197, 160, 89, 0.9), rgba(197, 160, 89, 0.8)), url('../img/parallax1.webp');
    background-attachment: fixed;
    background-size: cover;
    padding: 100px 0;
    color: white;
    text-align: center;
    margin: 80px 0;
}

/* SECCIONES INTERACTIVAS (Directorio y Socios) */
.cta-split-section { padding: 80px 0; }
.cta-image {
    border-radius: 20px;
    box-shadow: 20px 20px 0px var(--gold); /* Efecto de marco desplazado */
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* --- COLORES CORPORATIVOS --- */
:root {
    --acbir-blue: #0a2540; /* Azul Oscuro Institucional */
    --acbir-gold: #c5a059; /* Dorado */
}

/* 1. HEADER AZUL SÓLIDO */
.navbar-acbir {
    background-color: var(--acbir-blue) !important;
    border-bottom: 4px solid var(--acbir-gold);
}
.navbar-acbir .nav-link {
    color: #ffffff !important; /* Texto blanco */
}
.navbar-acbir .nav-link:hover {
    color: var(--acbir-gold) !important;
}

/* 2. FOOTER AZUL SÓLIDO */
.footer-acbir, .footer-main {
    background-color: var(--acbir-blue) !important;
    color: #ffffff !important;
    border-top: 6px solid var(--acbir-gold);
}

/* 3. ESTILOS DE SERVICIOS (Creote Style) */
.service-box {
    border: 1px solid #f0f0f0;
    border-bottom: 3px solid transparent; /* Invisible por defecto */
    transition: all 0.4s ease;
}

.service-box:hover {
    transform: translateY(-10px); /* Efecto de flotación */
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
    border-bottom-color: var(--acbir-gold); /* Borde dorado al pasar mouse */
}

.service-box:hover .icon-wrapper i {
    transform: scale(1.1); /* Icono crece un poco */
    transition: 0.3s;
}

/* Enlace "Leer más" */
.btn-link-gold {
    color: var(--acbir-blue);
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
}
.btn-link-gold:hover {
    color: var(--acbir-gold);
    letter-spacing: 1px; /* Efecto de estiramiento */
}


/* --- ESTILOS DE DIRECTORIO INSTITUCIONAL --- */
.page-header-institutional {
    background: linear-gradient(rgba(10, 37, 64, 0.9), rgba(10, 37, 64, 0.8)), url('../img/hero-machala.jpg');
    background-position: center;
    background-size: cover;
    padding: 120px 0 80px;
    text-align: center;
    color: white;
    margin-bottom: 60px;
}

/* =========================================
   1. IMPORTACIÓN DE FUENTES Y VARIABLES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;700;800&family=Playfair+Display:wght@700&family=Inter:wght@300;400;600&display=swap');

:root {
    --acbir-blue: #0a2540;   /* Azul Corporativo Oscuro */
    --acbir-gold: #c5a059;   /* Dorado Principal */
    --acbir-gold-dark: #a68545;
    --text-dark: #1a1a1a;
    --text-light: #6c757d;
    --white: #ffffff;
    --light-bg: #f4f5f7;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
    background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--acbir-blue);
}

a { text-decoration: none; }

/* =========================================
   2. BARRA SUPERIOR (TOP BAR)
   ========================================= */
.top-bar {
    background-color: #051424; /* Casi negro */
    color: var(--white);
    padding: 10px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.top-bar i { color: var(--acbir-gold); margin-right: 6px; }
.top-bar span { margin: 0 10px; opacity: 0.3; }

.top-social a {
    color: #ccc;
    margin-left: 15px;
    transition: 0.3s;
}
.top-social a:hover { color: var(--acbir-gold); }

/* =========================================
   3. HEADER / NAVBAR (AZUL SÓLIDO)
   ========================================= */
.navbar-acbir {
    background-color: var(--acbir-blue) !important;
    border-bottom: 4px solid var(--acbir-gold);
    padding: 0px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.navbar-acbir .navbar-brand img {
    filter: brightness(0) invert(1); /* Vuelve blanco el logo si es oscuro */
}

.navbar-acbir .nav-link {
    color: #ffffff !important;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 0 15px !important;
    transition: 0.3s;
}

.navbar-acbir .nav-link:hover {
    color: var(--acbir-gold) !important;
}

/* =========================================
   4. HERO SECTION (SLIDER)
   ========================================= */
.hero-section {
    position: relative;
    height: 90vh; /* Altura pantalla casi completa */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Slider de Fondo */
.hero-slider-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.carousel-item { height: 90vh; }
.carousel-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* Capa Oscura */
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(10,37,64,0.7), rgba(10,37,64,0.5));
    z-index: 2;
}

/* Contenido Hero */
.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    margin-top: -50px; /* Sube un poco el contenido visualmente */
}

.hero-title {
    color: #ffffff;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.letter-spacing-2 { letter-spacing: 2px; }

/* Buscador Flotante */
.hero-search {
    background: rgba(255, 255, 255, 0.98);
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    max-width: 850px;
    margin: 40px auto 0;
}

.btn-gold {
    background-color: var(--acbir-gold);
    color: #fff;
    border: none;
    transition: 0.3s;
}
.btn-gold:hover {
    background-color: var(--acbir-blue);
    color: #fff;
}

/* =========================================
   5. BARRA FLOTANTE (ESTADÍSTICAS)
   ========================================= */
.stats-floating-bar {
    position: relative;
    margin-top: -60px; /* Efecto de solapamiento */
    z-index: 10;
    margin-bottom: 80px;
}

.stat-box {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-bottom: 4px solid var(--acbir-gold);
    transition: transform 0.3s;
}

.stat-box:hover { transform: translateY(-5px); }

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--acbir-gold);
    line-height: 1;
    margin-bottom: 5px;
}

/* =========================================
   6. SERVICIOS (GRID)
   ========================================= */
.service-box {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-bottom: 3px solid transparent;
    transition: all 0.4s ease;
    height: 100%;
}

.service-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-bottom-color: var(--acbir-gold);
}

.icon-wrapper i { transition: 0.3s; }
.service-box:hover .icon-wrapper i { transform: scale(1.15); }

.btn-link-gold {
    color: var(--acbir-blue);
    font-weight: 700;
    font-size: 0.9rem;
    transition: 0.3s;
}
.btn-link-gold:hover {
    color: var(--acbir-gold);
    letter-spacing: 0.5px;
}

/* =========================================
   7. ESTILOS DE DIRECTORIO (TARJETAS)
   ========================================= */
.page-title-section {
    background-color: var(--acbir-blue); /* Fallback */
    position: relative;
    color: white;
    text-align: center;
}

.director-card-horizontal {
    background: #ffffff;
    /* Forma de píldora asimétrica para modernidad */
    border-radius: 100px 20px 20px 100px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #f2f2f2;
    transition: 0.3s;
    height: 100%;
}

.director-card-horizontal:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--acbir-gold);
}

/* Foto Redonda */
.director-avatar-wrapper {
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--acbir-gold);
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.2);
}

.director-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;       /* Mantiene el relleno del círculo */
    object-position: top;    /* <--- ESTA ES LA CLAVE: Alinea la foto arriba */
}

/* Info Derecha */
.director-info-box {
    flex-grow: 1;
    padding-left: 20px;
    padding-right: 15px;
}

.director-role {
    color: var(--acbir-gold);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 4px;
}

.director-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--acbir-blue);
    margin-bottom: 8px;
    line-height: 1.1;
}

.director-contact a {
    color: #b0b0b0;
    margin-right: 12px;
    font-size: 1.1rem;
    transition: 0.2s;
}
.director-contact a:hover { color: #25d366; } /* WhatsApp Color */

/* Variación: Liderazgo (Presidente/Vice) */
.leadership-card {
    border-radius: 150px 30px 30px 150px; /* Más grande */
    padding: 20px;
    border-left: 6px solid var(--acbir-gold);
}
.leadership-card .director-avatar-wrapper {
    width: 160px; height: 160px;
}
.leadership-card .director-name {
    font-size: 1.8rem;
}

/* =========================================
   8. FOOTER
   ========================================= */
.footer-acbir {
    background-color: var(--acbir-blue) !important;
    color: #fff;
    padding: 70px 0 30px;
    border-top: 8px solid var(--acbir-gold);
    margin-top: 80px;
}

.footer-acbir h5 {
    color: var(--acbir-gold);
    margin-bottom: 25px;
    font-weight: 700;
}

.footer-acbir ul li { margin-bottom: 10px; }
.footer-acbir a { color: rgba(255,255,255,0.7); transition: 0.3s; }
.footer-acbir a:hover { color: var(--acbir-gold); }



/* =========================================
   ESTILOS PÁGINA NOSOTROS
   ========================================= */

/* Bloques de Misión y Visión */
.mv-box {
    background: #fff;
    padding: 50px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-top: 5px solid var(--acbir-gold);
    height: 100%;
    transition: 0.3s;
}
.mv-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

/* Línea de Tiempo Vertical */
.timeline-section {
    position: relative;
    padding: 60px 0;
}

/* Línea central */
.timeline-section::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 100%;
    background: #e9ecef;
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 60px;
    position: relative;
    width: 50%;
}

/* Alineación Izquierda/Derecha */
.timeline-item.left { left: 0; padding-right: 40px; text-align: right; }
.timeline-item.right { left: 50%; padding-left: 40px; text-align: left; }

/* Punto en la línea */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--acbir-gold);
    border: 4px solid #fff;
    border-radius: 50%;
    top: 0;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.3);
    z-index: 1;
}
.timeline-item.left::after { right: -10px; }
.timeline-item.right::after { left: -10px; }

.timeline-content {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.timeline-year {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--acbir-blue);
    display: block;
    margin-bottom: 10px;
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .timeline-section::before { left: 20px; }
    .timeline-item { width: 100%; padding-left: 50px; text-align: left !important; }
    .timeline-item.left { left: 0; padding-right: 0; }
    .timeline-item.right { left: 0; }
    .timeline-item.left::after, .timeline-item.right::after { left: 11px; }
}

/* =========================================
   HISTORIA INTERACTIVA (DINÁMICA)
   ========================================= */

/* Contenedor Principal */
.history-dynamic-section {
    background-color: #fff;
    padding: 80px 0;
}

/* Barra de Navegación de Años */
.history-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 50px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.history-year-btn {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ccc; /* Color inactivo */
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efecto rebote suave */
    position: relative;
}

.history-year-btn:hover {
    color: var(--acbir-gold);
    transform: translateY(-3px);
}

/* Estado Activo (Año seleccionado) */
.history-year-btn.active {
    color: var(--acbir-gold);
    font-size: 2rem; /* Se hace más grande */
    text-shadow: 0 5px 15px rgba(197, 160, 89, 0.3);
}

.history-year-btn.active::after {
    content: '';
    position: absolute;
    bottom: -22px; /* Alineado con la línea del borde */
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 15px;
    background: var(--acbir-gold);
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--acbir-gold);
}

/* Paneles de Contenido */
.history-panel {
    display: none; /* Ocultos por defecto */
    animation: slideUpFade 0.6s ease forwards;
}

.history-panel.active {
    display: block; /* Solo el activo se muestra */
}

/* Animación de entrada */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos dentro del panel */
.history-img-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 20px 20px 0px var(--acbir-gold); /* Efecto marco desplazado */
    margin-bottom: 20px;
}

.history-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: 0.5s;
}

.history-panel:hover .history-img {
    transform: scale(1.05);
}



/* =========================================
   PÁGINA DE CONTACTO
   ========================================= */

/* Caja de Información (Izquierda) */
.contact-info-box {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    height: 100%;
}

.contact-icon-wrapper {
    width: 60px;
    height: 60px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    transition: 0.3s;
}

.contact-item:hover .contact-icon-wrapper {
    background: var(--acbir-gold);
    color: white;
}

.contact-item i { font-size: 1.5rem; color: var(--acbir-blue); }
.contact-item:hover i { color: white; }

/* Caja del Formulario (Derecha) */
.contact-form-box {
    background: #fff;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-top: 5px solid var(--acbir-gold);
}

.form-control-acbir {
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 8px;
    background: #f9f9f9;
    transition: 0.3s;
}

.form-control-acbir:focus {
    background: #fff;
    border-color: var(--acbir-gold);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1);
}

/* Mapa */
.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 5px solid #fff;
}


.navbar-acbir .navbar-brand img {
    /* Estado Normal: Totalmente blanco */
    filter: brightness(0) invert(1); 
    transition: all 0.4s ease; /* Suaviza el cambio */
}

.navbar-acbir .navbar-brand:hover img {
    /* Estado Hover: Colores originales y un poquito más grande */
    filter: none; 
    transform: scale(1.05); 
}


/* =========================================
   EFECTO LOGO FOOTER
   ========================================= */
.footer-logo {
    /* Estado Normal: Totalmente blanco para que resalte sobre el fondo azul */
    filter: brightness(0) invert(1);
    transition: all 0.4s ease; /* Transición suave */
    display: inline-block; /* Asegura que la transformación funcione bien */
}

.footer-logo:hover {
    /* Estado Hover: Recupera sus colores originales y hace un pequeño zoom */
    filter: none;
    transform: scale(1.1); /* Un poquito más grande que el del menú */
    cursor: pointer;
}