:root {
    --primary-color: #1E90FF;
    --secondary-color: #2e6be6;
    --background-color: #F0F8FF;
    --navbar-bg: rgba(28, 112, 186, 0.656);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--background-color); font-family: 'Lato', sans-serif; }

/* ── NAV ── */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--navbar-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 10px 40px;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: 80px;
}
.logo-container .logo { height: 80px; width: auto; }
.nav-center { display: flex; flex-grow: 1; justify-content: flex-end; }
.nav-bottom ul { display: flex; list-style: none; gap: 30px; }
.nav-bottom ul li a {
    text-decoration: none;
    font-family: 'Trebuchet MS', cursive;
    font-size: 20px;
    color: var(--background-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}
.nav-bottom ul li a:hover,
.nav-bottom ul li a.active { color: #a8d4ff; transform: scale(1.10); }

/* ── HERO ── */
.hist-hero {
    position: relative;
    padding: 70px 20px 90px;
    text-align: center;
    overflow: hidden;
}

.hist-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("../img/imagen(14).png") center/cover no-repeat;
    z-index: 0;
}

.hist-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(5, 20, 45, 0.45) 0%,
        rgba(5, 20, 45, 0.65) 50%,
        rgba(5, 20, 45, 0.30) 100%
    );
    z-index: 1;
}

.hist-hero .wave {
    position: absolute;
    bottom: -1px; left: 0;
    width: 100%; z-index: 3; line-height: 0;
}
.hist-hero .wave svg { display: block; width: 100%; }

.hist-hero-content {
    position: relative;
    z-index: 4;
    animation: fadeUp 0.9s ease both;
}

.hist-hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    color: #d6ecff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 5px 18px;
    border-radius: 20px;
    margin-bottom: 18px;
    border: 1px solid rgba(255,255,255,0.25);
}

.hist-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.65);
    margin-bottom: 12px;
}

.hist-hero p {
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: rgba(255,255,255,0.92);
    font-style: italic;
    text-shadow: 0 1px 10px rgba(0,0,0,0.55);
}

.hist-hero-divider {
    width: 60px; height: 2px;
    background: rgba(255,255,255,0.55);
    margin: 16px auto;
    border-radius: 2px;
}

/* ── SECCIÓN ── */
.hist-section {
    max-width: 860px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

/* ── INTRO ── */
.hist-intro { margin-bottom: 44px; }
.hist-intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #E6F1FB;
    color: #0C447C;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
    border: 0.5px solid #B5D4F4;
}
.hist-intro-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: #0c447c;
    margin-bottom: 12px;
}
.hist-intro-body {
    font-size: 1rem;
    color: #555;
    line-height: 1.85;
    max-width: 680px;
}

/* ── LÍNEA DE TIEMPO ── */
.hist-timeline {
    position: relative;
    margin-bottom: 44px;
}

.hist-timeline-item {
    position: relative;
    display: flex;
    gap: 20px;
    padding-bottom: 36px;
}
.hist-timeline-item:last-child { padding-bottom: 0; }

.hist-timeline-item::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 46px;
    bottom: -36px;
    width: 2px;
    background: rgba(30,144,255,0.18);
}
.hist-timeline-item:last-child::before { display: none; }

.hist-timeline-dot {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #0C447C;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 0 4px #F0F8FF;
}

.hist-timeline-content { padding-top: 4px; }

.hist-timeline-year {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0C447C;
    margin-bottom: 4px;
}
.hist-timeline-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 6px;
}
.hist-timeline-body {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.75;
    max-width: 560px;
}

/* ── TARJETA (JUNTA DIRECTIVA) ── */
.hist-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(30,144,255,0.12);
    box-shadow: 0 4px 24px rgba(30,144,255,0.08);
    overflow: hidden;
    animation: fadeUp 0.5s ease both;
    margin-bottom: 32px;
}

.hist-card-header {
    background: #E6F1FB;
    border-bottom: 1px solid #B5D4F4;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.hist-card-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: #0C447C;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}
.hist-card-label {
    font-size: 11px;
    color: #185FA5;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.hist-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #0C447C;
}

.hist-card-body {
    padding: 8px 24px 18px;
}

.hist-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(30,144,255,0.07);
}
.hist-row:last-child { border-bottom: none; }
.hist-row-icon {
    color: #378ADD;
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}
.hist-row-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 2px;
}
.hist-row-value {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
}

/* ── CITA ── */
.hist-quote {
    background: #E6F1FB;
    border-left: 4px solid #0C447C;
    border-radius: 0 12px 12px 0;
    padding: 22px 26px;
    margin-bottom: 32px;
    font-style: italic;
    color: #0c447c;
    font-size: 0.98rem;
    line-height: 1.8;
}
.hist-quote i.fa-quote-left {
    margin-right: 8px;
    opacity: 0.5;
}

/* ── ESTADÍSTICA ── */
.hist-stat {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #fff;
    border: 1px solid rgba(30,144,255,0.12);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(30,144,255,0.08);
}
.hist-stat-icon {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: #0C447C;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.hist-stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0C447C;
    margin-bottom: 4px;
}
.hist-stat-label {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.6;
    max-width: 500px;
}

/* ── FOOTER ── */
.ft {
    background: #0c447c;
    color: #b5d4f4;
    font-size: 14px;
    padding: 56px 40px 0;
}
.ft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto 48px;
}
.ft-col h4 { color: #fff; font-size: 15px; font-weight: 500; margin: 0 0 16px; }
.ft-logo { font-size: 18px; font-weight: 500; color: #fff; margin: 0 0 10px; }
.ft-tagline { color: #85b7eb; font-size: 13px; line-height: 1.6; margin: 0 0 20px; }
.ft-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ft-col ul li a { color: #b5d4f4; text-decoration: none; font-size: 14px; transition: color 0.2s; }
.ft-col ul li a:hover { color: #fff; }
.ft-contact-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; color: #b5d4f4; font-size: 14px; }
.ft-divider { border: none; border-top: 1px solid rgba(133,183,235,0.2); margin: 0; }
.ft-bottom {
    max-width: 1100px; margin: 0 auto;
    padding: 20px 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
    font-size: 12px; color: #85b7eb;
}
.ft-badge {
    background: rgba(133,183,235,0.12);
    color: #85b7eb;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    border: 1px solid rgba(133,183,235,0.25);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    nav { padding: 10px 16px; }
    .nav-bottom ul { gap: 14px; }
    .nav-bottom ul li a { font-size: 15px; }
    .hist-section { padding: 40px 16px 60px; }
    .hist-timeline-item { gap: 14px; }
    .hist-timeline-item::before { left: 18px; }
    .hist-timeline-dot { width: 38px; height: 38px; font-size: 14px; }
    .hist-stat { flex-direction: column; text-align: center; }
}

@media (max-width: 1366px) {
    nav { padding: 10px 28px; }
    .nav-bottom ul { gap: 20px; }
    .nav-bottom ul li a { font-size: 17px; }
}
 
/* ── TABLETA: 768px–1024px (768x1024, 810x1080, 820x1180) ── */
@media (max-width: 1024px) {
    nav { padding: 10px 22px; }
    .nav-bottom ul { gap: 16px; }
    .nav-bottom ul li a { font-size: 15px; }
 
    .hist-hero { padding: 60px 24px 76px; }
    .hist-section { padding: 48px 28px 70px; }
    .hist-timeline-body { max-width: 460px; }
}
 
/* ── Transición tableta → móvil ── */
@media (max-width: 768px) {
    nav { padding: 8px 18px; }
    .hist-hero { padding: 56px 20px 70px; }
}
 
/* ── MÓVIL: hasta 640px ── */
@media (max-width: 640px) {
    nav { padding: 10px 16px; }
    .nav-bottom ul { gap: 14px; }
    .nav-bottom ul li a { font-size: 15px; }
    .hist-section { padding: 40px 16px 60px; }
    .hist-timeline-item { gap: 14px; }
    .hist-timeline-item::before { left: 18px; }
    .hist-timeline-dot { width: 38px; height: 38px; font-size: 14px; }
    .hist-stat { flex-direction: column; text-align: center; }
}
 
/* ── Ajuste fino para los móviles más angostos (360px–393px) ── */
@media (max-width: 400px) {
    .nav-bottom ul { gap: 12px; }
    .nav-bottom ul li a { font-size: 13px; }
    .hist-hero { padding: 48px 16px 60px; }
    .hist-card-header { padding: 14px 18px; }
    .hist-card-body { padding: 6px 18px 14px; }
    .hist-quote { padding: 18px 20px; }
    .hist-timeline-year { font-size: 0.95rem; }
}
 
/* ── HAMBURGUESA ── */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px;
    z-index: 1100;
}
.hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger.abierto span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.abierto span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.abierto span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ── MENÚ MÓVIL ── */
.nav-mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: rgba(12, 68, 124, 0.97);
    backdrop-filter: blur(8px);
    z-index: 999;
    padding: 20px 0 28px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}
.nav-mobile-menu.abierto {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.nav-mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.nav-mobile-menu ul li { width: 100%; text-align: center; }
.nav-mobile-menu ul li a {
    display: block;
    text-decoration: none;
    font-family: 'Trebuchet MS', cursive;
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    transition: background 0.2s, color 0.2s;
}
.nav-mobile-menu ul li:last-child a { border-bottom: none; }
.nav-mobile-menu ul li a:hover,
.nav-mobile-menu ul li a.active {
    background: rgba(255,255,255,0.08);
    color: #a8d4ff;
}

/* ── Activar hamburguesa a partir de 820px ── */
@media (max-width: 820px) {
    .nav-bottom { display: none; }
    .hamburger  { display: flex; }
}

/* ── Nav altura reducida en móvil pequeño ── */
@media (max-width: 480px) {
    .nav-mobile-menu { top: 70px; }
}
@media (max-width: 360px) {
    .nav-mobile-menu { top: 64px; }
}