/* CRONOLOGÍA */
.cronologia-section {
    padding: 80px 20px 100px;
    background: #f0f4fa;
    overflow: hidden;
}

.timeline-label {
    color: #033E81;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-title {
    color: #033E81;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 60px;
}

.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #033E81, #4EAE33);
    transform: translateX(-50%);
    border-radius: 4px;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: #033E81;
    border: 4px solid #4EAE33;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 5px rgba(3,62,129,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: translateX(-50%) scale(1.3);
    box-shadow: 0 0 0 8px rgba(78,174,51,0.2);
}

.timeline-content {
    background: white;
    border-radius: 14px;
    padding: 24px 28px;
    width: calc(50% - 50px);
    box-shadow: 0 6px 30px rgba(3,62,129,0.1);
    border-left: 4px solid #033E81;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.timeline-content:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(3,62,129,0.18);
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: 28px;
    width: 0;
    height: 0;
    border-style: solid;
}

.timeline-item.left {
    display: flex;
    align-items: center;
    margin-bottom: 60px;
    position: relative;
    width: 100%;
    justify-content: flex-start;
}

.timeline-item.left .timeline-content {
    border-left: none;
    border-right: 4px solid #033E81;
    margin-left: 0;
}

.timeline-item.left .timeline-content::after {
    right: -12px;
    border-width: 10px 0 10px 12px;
    border-color: transparent transparent transparent white;
    filter: drop-shadow(2px 0 2px rgba(3,62,129,0.1));
}

.timeline-item.right {
    display: flex;
    align-items: center;
    margin-bottom: 60px;
    position: relative;
    width: 100%;
    justify-content: flex-end;
}

.timeline-item.right .timeline-content {
    border-left: 4px solid #4EAE33;
    margin-right: 0;
}

.timeline-item.right .timeline-content::after {
    left: -12px;
    border-width: 10px 12px 10px 0;
    border-color: transparent white transparent transparent;
    filter: drop-shadow(-2px 0 2px rgba(3,62,129,0.1));
}

.timeline-year {
    display: inline-block;
    background: linear-gradient(135deg, #033E81, #4EAE33);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.timeline-event-title {
    color: #033E81;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.timeline-event-desc {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .timeline-line {
        left: 24px;
    }

    .timeline-dot {
        left: 24px;
    }

    .timeline-item.left,
    .timeline-item.right {
        justify-content: flex-end;
    }

    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        width: calc(100% - 60px);
        border-left: 4px solid #033E81;
        border-right: none;
    }

    .timeline-item.left .timeline-content::after {
        left: -12px;
        right: auto;
        border-width: 10px 12px 10px 0;
        border-color: transparent white transparent transparent;
    }

    .timeline-title {
        font-size: 1.6rem;
    }
}

/* VARIABLES GLOBALES */
:root {
    --azul:       #033E81;
    --verde:      #4EAE33;
    --verde-claro:#7bd65a;
    --celeste:    #4fc3f7;
}

* { font-family: 'Outfit', sans-serif; box-sizing: border-box; }
body { overflow-x: hidden; }

/* NAV */
@keyframes pulso {
    0%   { filter: drop-shadow(0 0 2px rgba(255,255,255,0.2)); }
    50%  { filter: drop-shadow(0 0 12px rgba(79,195,247,0.8)); }
    100% { filter: drop-shadow(0 0 2px rgba(255,255,255,0.2)); }
}

.jagel, .main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #033E81;
    padding: 0 32px;
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.header-cinta {
    width: 100%;
    display: block;
    height: 6px;
    object-fit: cover;
    object-position: center;
}

.jagel.scrolled, .main-header.scrolled {
    background: rgba(3,62,129,0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.28);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    max-width: 1400px;
    margin: 0 auto;
    transition: height 0.3s ease;
}

.jagel.scrolled .header-inner, .main-header.scrolled .header-inner { height: 56px; }

.header-logo img {
    height: 40px;
    width: auto;
    transition: height 0.3s ease, filter 0.3s ease;
    animation: pulso 3s infinite;
}

.jagel.scrolled .header-logo img, .main-header.scrolled .header-logo img { height: 34px; }

.header-logo img:hover {
    animation: none;
    filter: drop-shadow(0 0 18px rgba(79,195,247,1));
    transform: scale(1.04);
}

.main-nav { display: flex; align-items: center; }

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
}

.nav-item { position: relative; }

.main-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,0.88) !important;
    padding: 8px 13px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.main-nav .nav-link:hover,
.main-nav .nav-item.active > .nav-link {
    color: white !important;
    background: rgba(255,255,255,0.13);
}

.nav-arrow { font-size: 0.6rem; transition: transform 0.3s ease; opacity: 0.7; }
.nav-item.has-dropdown:hover .nav-arrow { transform: rotate(180deg); opacity: 1; }

.nav-link.nav-cta {
    background: #4EAE33;
    color: white !important;
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 700;
    margin-left: 6px;
}

.nav-link.nav-cta:hover {
    background: #3c9228 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(78,174,51,0.45);
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.16);
    padding: 10px;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.97);
    transition: all 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
    pointer-events: none;
    border: 1px solid rgba(0,0,0,0.06);
}

.nav-item.has-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 14px;
    z-index: 1;
}

.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: white;
    border-left: 1px solid rgba(0,0,0,0.06);
    border-top: 1px solid rgba(0,0,0,0.06);
    transform: rotate(45deg);
}

.nav-item.has-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.drop-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #1a1a2e;
    transition: all 0.2s ease;
}

.drop-link:hover { background: #f2f6ff; transform: translateX(4px); color: #033E81; }

.drop-icon {
    display: none !important;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    background: rgba(3,62,129,0.09);
    color: #033E81;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.drop-link:hover .drop-icon            { background: #033E81; color: white; }
.drop-icon.green                        { background: rgba(78,174,51,0.1); color: #4EAE33; }
.drop-link:hover .drop-icon.green       { background: #4EAE33; color: white; }

.drop-title { font-size: 0.88rem; font-weight: 700; color: #1a1a2e; line-height: 1.2; display: block; }
.drop-sub   { font-size: 0.73rem; color: #999; display: block; margin-top: 1px; }
.drop-divider { height: 1px; background: #f0f2f5; margin: 6px 4px; }

/* NESTED DROPDOWN — expande hacia abajo dentro del mismo dropdown */
.drop-link.has-sub {
    flex-wrap: wrap;
    cursor: pointer;
    user-select: none;
}
.drop-link.has-sub .sub-dropdown {
    width: 100%;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding: 0;
}
.drop-link.has-sub.sub-open .sub-dropdown {
    max-height: 200px;
}
.drop-link.has-sub.sub-open .sub-chevron { transform: rotate(180deg); }
.sub-chevron { transition: transform 0.3s; }
.sub-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #1a1a2e;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    margin: 2px 0;
}
.sub-link:hover { background: #f2f6ff; color: #033E81; }

.header-search { display: flex; align-items: center; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
    margin-right: 10px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 992px) {
    .jagel, .main-header { padding: 0 16px; }
    .nav-toggle  { display: flex; }

    .header-logo img { height: 32px; }
    .jagel.scrolled .header-logo img, .main-header.scrolled .header-logo img { height: 28px; }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #022f63;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .main-nav.open { max-height: 700px; box-shadow: 0 20px 40px rgba(0,0,0,0.35); }

    .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 12px 16px 20px; }
    .main-nav .nav-link { padding: 12px 14px; justify-content: space-between; border-radius: 10px; }

    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(255,255,255,0.07);
        border: none;
        border-radius: 10px;
        box-shadow: none;
        padding: 6px;
        margin: 2px 0 6px 8px;
        display: none;
        pointer-events: auto;
    }

    .nav-dropdown::before { display: none; }

    .nav-item.has-dropdown.mob-open .nav-dropdown { display: block; }
    .nav-item.has-dropdown.mob-open .nav-arrow    { transform: rotate(180deg); }

    .drop-link                            { color: rgba(255,255,255,0.85); }
    .drop-link:hover                      { background: rgba(255,255,255,0.1); color: white; transform: none; }
    .drop-title                           { color: white; }
    .drop-sub                             { color: rgba(255,255,255,0.5); }
    .drop-icon                            { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); }
    .drop-link:hover .drop-icon,
    .drop-link:hover .drop-icon.green     { background: rgba(255,255,255,0.2); color: white; }
    .drop-divider                         { background: rgba(255,255,255,0.12); }

    .sub-link { color: rgba(255,255,255,0.8); padding: 8px 10px; }
    .sub-link:hover { background: rgba(255,255,255,0.1); color: white; }

    .nav-link.nav-cta { margin: 6px 0 0; justify-content: center; border-radius: 10px; }

    .header-search { margin-left: auto; margin-right: 10px; }
    .search-input.active { width: 150px; }
}

/* BUSCADOR */
.search-container { display: flex; align-items: center; }

.search-input {
    width: 0;
    opacity: 0;
    border: none;
    border-radius: 50px;
    padding: 8px 15px;
    font-size: 14px;
    outline: none;
    transition: width 0.4s ease, opacity 0.4s ease;
    background: #f1f3f5;
}

.search-input.active {
    width: 250px;
    opacity: 1;
    border: 2px solid #033E81;
    box-shadow: 0 4px 15px rgba(3,62,129,0.2);
    margin-right: 8px;
}

.search-btn {
    background: #033E81;
    border: none;
    border-radius: 50px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.search-btn:hover  { transform: scale(1.1); }
.search-btn i      { color: white; font-size: 16px; }

/* FRASE IMPACTO */
.circulo-fondo { position: absolute; border-radius: 50%; opacity: 0.15; animation: flotarCirculo 6s infinite ease-in-out; }

.c1 { width:400px; height:400px; background: radial-gradient(circle, #4fc3f7, transparent); top:-150px; left:-100px; animation-delay:0s; }
.c2 { width:300px; height:300px; background: radial-gradient(circle, #4EAE33, transparent); bottom:-100px; right:-50px; animation-delay:2s; }
.c3 { width:200px; height:200px; background: radial-gradient(circle, #4fc3f7, transparent); top:50%; right:15%; animation-delay:1s; }
.c4 { width:150px; height:150px; background: radial-gradient(circle, #4EAE33, transparent); top:20%; left:20%; animation-delay:3s; }

@keyframes flotarCirculo {
    0%   { transform: translateY(0px) scale(1); }
    50%  { transform: translateY(-30px) scale(1.1); }
    100% { transform: translateY(0px) scale(1); }
}

.frase-subtitulo {
    color: #4fc3f7;
    font-size: 1rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 25px;
    opacity: 0;
    animation: bajarTexto 1s ease 0.2s forwards;
}

.frase-principal {
    color: white;
    font-family: 'Raleway', sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.5;
    max-width: 900px;
    margin: 0 auto 30px;
    min-height: 140px;
}

.frase-principal::after { content: '|'; color: #4fc3f7; animation: parpadeo 0.8s infinite; }

@keyframes parpadeo { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.frase-linea {
    width: 0;
    height: 3px;
    background: linear-gradient(to right, #4fc3f7, #4EAE33);
    margin: 0 auto 35px;
    border-radius: 10px;
    animation: lineaCrecer 1.5s ease 0.5s forwards;
}

@keyframes lineaCrecer { to { width: 100px; } }

.frase-boton {
    display: inline-block;
    padding: 14px 45px;
    background: transparent;
    color: white;
    border: 2px solid rgba(79,195,247,0.6);
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 1px;
    opacity: 0;
    animation: bajarTexto 1s ease 1s forwards;
    transition: all 0.3s ease;
}

.frase-boton:hover {
    background: rgba(79,195,247,0.15);
    border-color: #4fc3f7;
    color: #4fc3f7;
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(79,195,247,0.2);
}

@keyframes bajarTexto {
    from { opacity: 0; transform: translateY(25px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* SECCIÓN CARRUSEL */
.carrusel-seccion {
    background: #f0f4f8;
    padding: 0;
}

.carrusel-wrap {
    padding: 0;
}

.carrusel-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 40px;
}

.carrusel-stats {
    display: flex;
    align-items: center;
    gap: 0;
    padding-top: 8px;
    border-top: 1px solid #dde3ec;
    margin-top: 8px;
}

.carrusel-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 3px;
}

.carrusel-stat-num {
    font-size: 1.5rem;
    font-weight: 900;
    color: #033E81;
    line-height: 1;
}

.carrusel-stat-label {
    font-size: 0.72rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.carrusel-stat-divider {
    width: 1px;
    height: 36px;
    background: #dde3ec;
    flex-shrink: 0;
}

.carrusel-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.carrusel-linea {
    width: 5px;
    height: 48px;
    background: linear-gradient(180deg, #033E81, #4EAE33);
    border-radius: 4px;
    flex-shrink: 0;
}

.carrusel-titulo {
    color: #033E81;
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 900;
    line-height: 1.2;
    margin: 0;
    flex: 0 0 auto;
}

.carrusel-titulo span {
    color: #4EAE33;
}

.carrusel-sub {
    color: #666;
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 0;
    flex: 1 1 0;
    min-width: 0;
    border-left: 1px solid #dde3ec;
    padding-left: 32px;
}

.carrusel-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #033E81;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.carrusel-cta:hover {
    background: #4EAE33;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(78,174,51,0.35);
}

/* CARRUSEL */
.carousel-3d-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 21 / 9;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(3,62,129,0.18);
}

.carousel-3d { position: relative; width: 100%; height: 100%; }

.card-3d {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.75s ease;
    pointer-events: none;
}

.card-3d img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    image-rendering: auto;
}

.card-3d.active { opacity: 1; z-index: 2; pointer-events: auto; }
.card-3d.next,
.card-3d.prev   { opacity: 0; }

.card-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 32px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: white;
    z-index: 3;
}
.card-overlay h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; }

.btn-3d-prev, .btn-3d-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 50%;
    width: 52px; height: 52px;
    font-size: 18px;
    color: white;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}
.btn-3d-prev { left: 16px; }
.btn-3d-next { right: 16px; }
.btn-3d-prev:hover, .btn-3d-next:hover {
    background: rgba(255,255,255,0.38);
    transform: translateY(-50%) scale(1.1);
}

.dots-3d {
    position: absolute;
    bottom: 16px; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 8px;
    z-index: 10;
}
.dot-3d {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: all 0.3s ease;
}
.dot-3d.active { background: white; width: 28px; border-radius: 4px; }

/* ESTADÍSTICAS */
.stat-card {
    padding: 30px 20px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    transition: transform 0.3s ease, background 0.3s ease;
    height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.stat-card:hover { transform: translateY(-8px); background: rgba(255,255,255,0.15); }
.stat-icono  { font-size: 2.5rem; margin-bottom: 15px; }
.stat-numero { font-size: 2.8rem; font-weight: 900; color: white; margin: 0; line-height: 1; }
.stat-label  { color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-top: 8px; letter-spacing: 1px; }

/* FOOTER */
footer { background: #1a1a2e; color: #adb5bd; }
footer a { color: #adb5bd; text-decoration: none; transition: all 0.3s ease; }
footer a:hover { color: white; padding-left: 5px; }

footer .bi-facebook:hover,
footer .bi-instagram:hover,
footer .bi-whatsapp:hover { background: rgba(255,255,255,0.25) !important; transform: translateY(-3px); }

.footer-ola { background: white; line-height: 0; }

/* HERO */
.hero {
    min-height: 70vh;
    background: var(--azul);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.particula { position: absolute; border-radius: 50%; animation: flotarP infinite ease-in-out; pointer-events: none; }

@keyframes flotarP {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50%       { transform: translateY(-40px) scale(1.1); opacity: 1; }
}

.p1 { width:400px; height:400px; background: radial-gradient(circle, rgba(3,62,129,0.25), transparent); top:-100px; left:-100px; animation-duration:8s; }
.p2 { width:300px; height:300px; background: radial-gradient(circle, rgba(78,174,51,0.2), transparent); bottom:-80px; right:-80px; animation-duration:6s; animation-delay:2s; }
.p3 { width:200px; height:200px; background: radial-gradient(circle, rgba(79,195,247,0.15), transparent); top:40%; right:10%; animation-duration:5s; animation-delay:1s; }
.p4 { width:150px; height:150px; background: radial-gradient(circle, rgba(123,214,90,0.15), transparent); top:20%; left:15%; animation-duration:7s; animation-delay:3s; }
.p5 { width:100px; height:100px; background: radial-gradient(circle, rgba(3,62,129,0.2), transparent); bottom:30%; left:25%; animation-duration:4s; animation-delay:0.5s; }

.hero-content { position: relative; z-index: 2; }

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(79,195,247,0.15);
    border: 1px solid rgba(79,195,247,0.3);
    color: var(--celeste);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 30px;
    opacity: 0;
    animation: entrar 0.8s ease forwards;
}

.hero-titulo {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 20px;
    opacity: 0;
    animation: entrar 0.8s ease 0.2s forwards;
}

.hero-titulo .linea1 { color: white; display: block; }
.hero-titulo .linea2 {
    display: block;
    background: linear-gradient(135deg, var(--celeste), var(--verde-claro));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitulo {
    color: rgba(255,255,255,0.6);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 40px;
    font-weight: 300;
    opacity: 0;
    animation: entrar 0.8s ease 0.4s forwards;
}

.hero-stats { display: flex; justify-content: center; gap: 40px; animation: entrar 0.8s ease 0.6s forwards; opacity: 0; }
.hero-stat  { text-align: center; }

.hero-stat-num {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--celeste), var(--verde-claro));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label { color: rgba(255,255,255,0.5); font-size: 0.8rem; letter-spacing: 1px; }

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
    letter-spacing: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: bajarScroll 2s infinite ease-in-out;
}

@keyframes bajarScroll {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
    50%       { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

@keyframes entrar {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* SCROLL REVEAL */
.reveal         { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* FILTROS */
.filtros-sticky {
    background: white;
    padding: 18px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 68px;
    z-index: 100;
    border-bottom: 2px solid #f0f4f8;
}

.filtro-btn {
    padding: 8px 20px;
    border-radius: 50px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.filtro-btn.activo, .filtro-btn:hover { background: var(--azul); border-color: var(--azul); color: white; }

.buscador-wrap   { position: relative; }
.buscador-wrap i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #aaa; }

.buscador-agencias {
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    padding: 10px 20px 10px 40px;
    outline: none;
    width: 100%;
    font-family: 'Outfit', sans-serif;
    transition: border 0.3s;
}

.buscador-agencias:focus { border-color: var(--azul); box-shadow: 0 0 0 4px rgba(3,62,129,0.1); }

/* FLIP CARDS */
.agencias-grid { background: #f0f4f8; padding: 80px 0; }

.flip-container { perspective: 1000px; height: 600px; }

.flip-card {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
}

.flip-container:hover .flip-card { transform: rotateY(180deg); }

.flip-front, .flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
}

.flip-front {
    background: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.flip-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    color: white;
}

.flip-back-icono { font-size: 3rem; margin-bottom: 15px; animation: flotarIconoB 2s infinite ease-in-out; }

@keyframes flotarIconoB {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.flip-back h4 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.flip-back p  { font-size: 0.85rem; opacity: 0.8; margin-bottom: 20px; }

.flip-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.flip-back-btn:hover { background: white; color: var(--azul); }

.flip-hint { align-self: flex-end; font-size: 0.7rem; color: #bbb; display: flex; align-items: center; gap: 4px; padding-bottom: 2px; }

.ag-cinta {
    width: 100%;
    display: block;
    height: 18px;
    object-fit: cover;
    object-position: center;
    margin-top: auto;
    border-radius: 0 0 20px 20px;
}

.ag-img-wrap {
    position: relative;
    width: 100%;
    height: 430px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.ag-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.flip-card:hover .ag-img { transform: scale(1.05); }

.ag-badge {
    position: absolute;
    top: 10px; left: 10px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.ag-tipo-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.ag-info { padding: 20px 22px 18px; background: #fff; flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; }
.ag-nombre { font-size: 1.2rem; font-weight: 800; color: #033E81; margin: 0; line-height: 1.2; }
.ag-detalle { display: flex; align-items: flex-start; gap: 8px; font-size: 0.92rem; color: #444; line-height: 1.5; }
.ag-detalle i { margin-top: 2px; flex-shrink: 0; font-size: 0.8rem; }

/* TIMELINE */
.timeline-section {
    background: var(--azul);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.timeline-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
}

.timeline-titulo { text-align: center; color: white; font-size: 2.5rem; font-weight: 900; margin-bottom: 60px; position: relative; z-index: 2; }
.timeline-titulo span { background: linear-gradient(135deg, var(--celeste), var(--verde-claro)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.timeline { position: relative; z-index: 2; }

.timeline::before {
    content: '';
    position: absolute;
    left: 50%; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--celeste), var(--verde-claro));
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: calc(50% + 40px);
    margin-bottom: 50px;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.7s ease;
}

.timeline-item.derecha { justify-content: flex-start; padding-right: 0; padding-left: calc(50% + 40px); transform: translateX(50px); }
.timeline-item.visible  { opacity: 1; transform: translateX(0); }

.timeline-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 20px 25px;
    max-width: 320px;
    position: relative;
    transition: background 0.3s ease;
}

.timeline-card:hover { background: rgba(255,255,255,0.15); }

.timeline-punto { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--celeste); right: -48px; top: 20px; box-shadow: 0 0 0 4px rgba(79,195,247,0.3); }
.timeline-item.derecha .timeline-punto { right: auto; left: -48px; background: var(--verde-claro); box-shadow: 0 0 0 4px rgba(123,214,90,0.3); }

.timeline-num { font-size: 0.75rem; color: var(--celeste); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.timeline-item.derecha .timeline-num { color: var(--verde-claro); }
.timeline-nombre { color: white; font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.timeline-info { color: rgba(255,255,255,0.6); font-size: 0.85rem; display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }

/* MAPA */
.mapa-section  { background: white; padding: 80px 0; }
.mapa-titulo   { text-align: center; font-size: 2.5rem; font-weight: 900; color: var(--azul); margin-bottom: 10px; }
.mapa-titulo span { background: linear-gradient(135deg, var(--azul), var(--verde)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mapa-wrap     { position: relative; border-radius: 24px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.15); margin-top: 40px; }
.mapa-iframe   { width: 100%; height: 450px; border: none; }
.mapa-overlay-pin { position: absolute; background: white; border-radius: 12px; padding: 12px 16px; box-shadow: 0 8px 25px rgba(0,0,0,0.15); cursor: pointer; transition: all 0.3s ease; z-index: 5; }
.mapa-overlay-pin:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.2); }
.pin-nombre { font-weight: 700; font-size: 0.85rem; color: var(--azul); }
.pin-dir    { font-size: 0.75rem; color: #888; }

/* RESPONSIVE */
@media (max-width: 1200px) {
    .carousel-3d-wrapper { aspect-ratio: 21 / 9; height: auto; }
    .carrusel-info { flex: 0 0 160px; }
    .carrusel-info { flex-direction: column; gap: 16px; }
    .carrusel-sub  { border-left: none; padding-left: 0; }
}

@media (max-width: 992px) {
    .frase-principal    { font-size: 1.8rem; min-height: 90px; }
    .frase-subtitulo    { letter-spacing: 3px; }
    .carousel-3d-wrapper { aspect-ratio: 21 / 9; height: auto; }
    .carrusel-layout { grid-template-columns: 1fr; gap: 36px; }
    .carrusel-seccion { padding: 70px 0; }
    .stat-numero { font-size: 2.8rem; }
    .hero { min-height: 55vh; }
    .mapa-iframe { height: 380px; }
}

@media (max-width: 768px) {
    .jagel, .main-header { padding: 0 12px; }
    .header-inner { height: 60px; }
    .header-logo img { height: 28px; }
    .jagel.scrolled .header-logo img, .main-header.scrolled .header-logo img { height: 24px; }
    .search-input.active { width: 140px; font-size: 13px; }
    .frase-subtitulo { letter-spacing: 2px; font-size: 0.75rem; }
    .frase-principal { font-size: 1.4rem; min-height: 70px; line-height: 1.5; }
    .frase-boton { padding: 12px 28px; font-size: 0.85rem; }
    .carousel-3d-wrapper { aspect-ratio: 21 / 9; height: auto; }
    .carrusel-seccion    { padding: 55px 0; }
    .btn-3d-prev         { left: 8px; width: 42px; height: 42px; font-size: 14px; }
    .btn-3d-next         { right: 8px; width: 42px; height: 42px; font-size: 14px; }
    .card-overlay        { padding: 18px; }
    .card-overlay h2     { font-size: 1.2rem; margin-bottom: 4px; }
    .card-overlay p      { font-size: 0.82rem; margin-bottom: 8px; }
    .stat-numero { font-size: 2.2rem; }
    .stat-label  { font-size: 0.78rem; }
    .stat-card   { padding: 22px 14px; }
    .stat-icono  { font-size: 2rem; margin-bottom: 10px; }
    .hero { min-height: 48vh; }
    .hero-subtitulo { font-size: 0.92rem; }
    .hero-stats     { flex-wrap: wrap; gap: 15px; justify-content: center; }
    .hero-stat-num  { font-size: 1.8rem; }
    .timeline::before { left: 20px; }
    .timeline-titulo  { font-size: 1.8rem; }
    .timeline-item,
    .timeline-item.derecha {
        padding-left: 60px;
        padding-right: 0;
        justify-content: flex-start;
    }
    .timeline-punto,
    .timeline-item.derecha .timeline-punto { left: 12px; right: auto; }
    .timeline-card { max-width: 100%; }
    .flip-container { height: 420px; }
    .ag-img-wrap    { height: 260px; }
    .ag-nombre      { font-size: 1.05rem; }
    .ag-detalle     { font-size: 0.85rem; }
    .filtros-sticky { top: 56px; }
    .mapa-iframe  { height: 300px; }
    .mapa-titulo  { font-size: 1.8rem; }

    #frase-impacto { height: auto !important; min-height: 480px; padding: 80px 16px !important; }
    h2 { font-size: 1.6rem !important; }
    h3 { font-size: 1.3rem !important; }
    section { padding-top: 60px !important; padding-bottom: 60px !important; }
}

@media (max-width: 480px) {
    .jagel, .main-header { padding: 0 10px; }
    .header-inner { height: 56px; }
    .header-logo img { height: 24px; }
    .jagel.scrolled .header-logo img, .main-header.scrolled .header-logo img { height: 22px; }
    .search-input.active { width: 120px; font-size: 12px; padding: 6px 10px; }
    .frase-principal { font-size: 1.15rem; min-height: 60px; }
    .frase-subtitulo { letter-spacing: 1.5px; font-size: 0.7rem; }
    #frase-impacto   { height: auto !important; min-height: 380px; padding: 70px 14px !important; }
    .carousel-3d-wrapper { aspect-ratio: 21 / 9; height: auto; }
    .carrusel-titulo { font-size: 1.7rem; }
    .card-overlay h2     { font-size: 1rem; }
    .card-overlay p      { display: none; }
    .stat-card   { padding: 18px 10px; border-radius: 14px; }
    .stat-numero { font-size: 1.9rem; }
    .stat-icono  { font-size: 1.7rem; margin-bottom: 8px; }
    .hero       { min-height: 42vh; }
    .hero-stats { gap: 10px; }
    .hero-stat-num   { font-size: 1.5rem; }
    .hero-stat-label { font-size: 0.7rem; }
    .filtros-sticky  { top: 56px; padding: 12px 0; }
    .filtro-btn      { padding: 6px 14px; font-size: 0.78rem; }
    .flip-container { height: 380px; }
    .ag-img-wrap    { height: 220px; }
    .timeline-titulo { font-size: 1.5rem; margin-bottom: 40px; }
    .timeline-card   { padding: 16px 18px; }
    .mapa-iframe  { height: 250px; }
    .mapa-titulo  { font-size: 1.5rem; }
    h2 { font-size: 1.4rem !important; }
    h3 { font-size: 1.2rem !important; }
    section { padding-top: 50px !important; padding-bottom: 50px !important; }
}

/* TÁCTIL — flip cards con click */
@media (hover: none) {
    .flip-container:hover .flip-card { transform: none; }
    .flip-container.flipped .flip-card { transform: rotateY(180deg); }
}

/* ===== BOTONES FLOTANTES REDES SOCIALES ===== */
.social-flotante {
    position: fixed;
    bottom: 30px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

.social-flotante a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-flotante a:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
}

.social-flotante .btn-whatsapp { background: #25D366; }
.social-flotante .btn-facebook { background: #1877F2; }

/* ============================================
   RESPONSIVE GLOBAL — Móvil y Tablet
   ============================================ */

/* Botones flotantes más pequeños en móvil */
@media (max-width: 768px) {
    .social-flotante { bottom: 16px; right: 14px; gap: 8px; }
    .social-flotante a { width: 42px; height: 42px; font-size: 1.1rem; }
}

/* ---- HEROES SPLIT-SCREEN (ahorro, historia) ---- */
.hero-split {
    min-height: 85vh;
    display: flex;
    overflow: hidden;
    padding-top: 68px;
}
.hero-split-left {
    flex: 1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 6% 60px 8%;
    position: relative;
    z-index: 2;
    margin-right: -60px;
}
.hero-split-right {
    flex: 1.1;
    position: relative;
    min-height: 100%;
    overflow: hidden;
}

@media (max-width: 900px) {
    .hero-split {
        flex-direction: column;
        min-height: auto;
    }
    .hero-split-left {
        margin-right: 0;
        padding: 80px 6% 50px;
        width: 100%;
    }
    .hero-split-right {
        width: 100%;
        height: 320px;
        flex: none;
    }
}

@media (max-width: 576px) {
    .hero-split-left { padding: 70px 5% 40px; }
    .hero-split-right { height: 240px; }
}

/* ---- GALERÍA PROGRAMAS (about.html) ---- */
@media (max-width: 768px) {
    .edu-galeria { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
    .edu-galeria { grid-template-columns: 1fr !important; }
}

/* ---- TABS EDUCACIÓN ---- */
@media (max-width: 576px) {
    .edu-tabs { gap: 8px; }
    .edu-tab { padding: 10px 12px; font-size: 0.8rem; }
    .edu-tab img { width: 28px; height: 28px; }
}

/* ---- TABLA TASAS ---- */
@media (max-width: 768px) {
    .tabla-tasas { font-size: 0.82rem; }
    .tabla-tasas thead th,
    .tabla-tasas tbody td { padding: 10px 12px; }
    .tasa-valor { font-size: 1rem; }
}

/* ---- STAT CARDS (inicio) ---- */
@media (max-width: 576px) {
    .stat-card { height: auto !important; padding: 22px 14px !important; }
    .stat-numero { font-size: 1.6rem !important; }
}

/* ---- FOOTER ---- */
@media (max-width: 768px) {
    footer .row.g-4 { gap: 10px !important; }
}

/* ---- TIMELINE (historia) ---- */
@media (max-width: 768px) {
    .tl-img-circle { width: 160px !important; height: 160px !important; }
}




