html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: 'Montserrat', sans-serif;
}

main {
    padding-top: var(--header-height);
}

/* ============================================
   Financiación, Becas y Convenios — UANORTE
   Paleta institucional: azul #0000ff / cian #32dbfd
   ============================================ */

:root {
    --fb-azul: #0000ff;
    --fb-azul-oscuro: #0000ff;
    --fb-cian: #32dbfd;
    --fb-morado: #674ea7;
    --fb-gris: #464646;
    --fb-gris-claro: #464646;
    --fb-bg: #ffffff;
    --fb-radius: 16px;
    --fb-shadow: 0 8px 30px rgba(0, 0, 60, 0.08);
    --fb-font-title: 'Gilroy-Bold', 'Montserrat', sans-serif;
}

main {
    background: var(--fb-bg);
}

/* ============ HERO ============ */
.fb-hero {
    background: linear-gradient(120deg, var(--fb-azul-oscuro) 0%, var(--fb-azul) 45%, var(--fb-cian) 100%);
    padding: clamp(48px, 8vw, 88px) 24px clamp(56px, 9vw, 96px);
    color: #fff;
}

.fb-hero__inner {
    max-width: 1700px;
    margin: 0 auto;
}

.fb-hero__icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #fff;
}

.fb-hero__title {
    font-family: var(--fb-font-title);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.4rem);
    margin: 0 0 18px;
    line-height: 1.1;
}

.fb-hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    max-width: 850px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 40px;
    font-weight: 400;
}

.fb-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(28px, 6vw, 64px);
}

.fb-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fb-stat__num {
    font-family: var(--fb-font-title);
    font-weight: 700;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    color: var(--fb-cian);
    text-align: center;
}

.fb-stat__label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

/* ============ SECCIONES GENERALES ============ */
.fb-section {
    max-width: 1750px;
    margin: 0 auto;
    padding: clamp(40px, 6vw, 64px) 24px;
}

.fb-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.fb-section__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--fb-azul);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 16px;
}

.fb-section__header h2 {
    font-family: var(--fb-font-title);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 700;
    color: var(--fb-gris);
    margin: 0;
}

/* ============ TARJETAS DE FINANCIACIÓN ============ */
.fb-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.fb-cards--single {
    grid-template-columns: minmax(280px, 620px);
}

.fb-card {
    background: #fff;
    border-radius: var(--fb-radius);
    box-shadow: var(--fb-shadow);
    border-top: 5px solid var(--fb-azul);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fb-card--blue   { border-top-color: var(--fb-azul); }
.fb-card--cyan   { border-top-color: var(--fb-cian); }
.fb-card--purple { border-top-color: var(--fb-morado); }

.fb-card__logo {
    background: #f5f6f9;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
}

.fb-card__logo img {
    max-height: 70px;
    width: auto;
    object-fit: contain;
}

.fb-card__body {
    padding: 22px 26px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-grow: 1;
}

.fb-card__title {
    font-family: var(--fb-font-title);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--fb-gris);
}

.fb-card__title--blue { color: var(--fb-azul); }
.fb-card__title--cyan { color: #17b9d6; }

.fb-card__text {
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--fb-gris-claro);
    margin: 0;
    flex-grow: 1;
}

.fb-card__contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid #eef0f4;
}

.fb-card__link {
    font-size: 0.92rem;
    color: var(--fb-gris);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.fb-card__link--action {
    color: var(--fb-azul);
    font-weight: 600;
}

.fb-card__link i {
    font-size: 0.9rem;
    width: 14px;
    text-align: center;
}

/* ============ BENEFICIOS DEL CONVENIO (tarjeta de Convenios) ============ */
.fb-card__benefits {
    margin-top: 4px;
}

.fb-card__benefits-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--fb-gris);
    margin: 0 0 8px;
}

.fb-card__benefits ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fb-card__benefits li {
    font-size: 0.92rem;
    color: var(--fb-gris-claro);
    line-height: 1.5;
    padding-left: 18px;
    position: relative;
}

.fb-card__benefits li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--fb-cian);
}

/* ============ MEDIOS DE PAGO / ASESORÍA ============ */
.fb-section--pay {
    padding-top: 0;
}

.fb-pay {
    background: #fff;
    border-radius: var(--fb-radius);
    box-shadow: var(--fb-shadow);
    display: grid;
    grid-template-columns: 1fr 1.3fr 1fr;
    align-items: stretch;
    overflow: hidden;
}

.fb-pay__poster {
    position: relative;
    background: #f5f6f9;
    border: none;
    padding: 0;
    margin: 0;
    cursor: zoom-in;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 260px;
}

.fb-pay__poster img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 18px;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

.fb-pay__poster:hover img {
    transform: scale(1.04);
}

.fb-pay__zoom {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    pointer-events: none;
}

.fb-pay__info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    border-left: 1px solid #eef0f4;
    border-right: 1px solid #eef0f4;
}

/* ============ LIGHTBOX ============ */
.fb-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 20, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    z-index: 2000;
}

.fb-lightbox.is-open {
    display: flex;
}

.fb-lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.fb-lightbox__close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.fb-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.24);
}

.fb-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 2rem;
    font-weight: 700;
    color: var(--fb-azul);
}

.fb-pay__title {
    font-family: var(--fb-font-title);
    font-size: clamp(1.3rem, 2.6vw, 1.6rem);
    font-weight: 700;
    margin: 0;
    color: var(--fb-gris);
}

.fb-pay__text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--fb-gris-claro);
    margin: 0 0 10px;
    font-weight: 400;
}

.fb-pay__contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fb-pay__divider {
    height: 1px;
    background: #eef0f4;
    margin: 18px 0 4px;
}

.fb-pay__staff {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fb-pay__staff-role {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--fb-azul);
}

.fb-pay__staff-name {
    font-family: var(--fb-font-title);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--fb-gris);
    margin-bottom: 6px;
}

/* ============ CTA FINAL ============ */
.fb-section--cta {
    padding-top: 0;
    padding-bottom: clamp(56px, 8vw, 88px);
}

.fb-cta {
    background: linear-gradient(120deg, #eef2ff 0%, #e6fbff 100%);
    border: 1px solid #dde6ff;
    border-radius: var(--fb-radius);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.fb-cta__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--fb-azul);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 18px;
}

.fb-cta__text {
    flex: 1 1 320px;
}

.fb-cta__text h3 {
    font-family: var(--fb-font-title);
    font-size: 1.1rem;
    margin: 0 0 6px;
    color: var(--fb-gris);
}

.fb-cta__text p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--fb-gris-claro);
    line-height: 1.5;
    font-weight: 400;
}

.fb-cta__btn {
    background: var(--fb-azul);
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 13px 24px;
    border-radius: 10px;
    white-space: nowrap;
    transition: background 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fb-cta__btn:hover {
    background: var(--fb-azul-oscuro);
}

/* =============== RESPONSIVE =============== */

@media (max-width: 900px) {
    .fb-cards {
        grid-template-columns: 1fr;
    }
    .fb-cards--single {
        grid-template-columns: 1fr;
    }
    .fb-pay {
        grid-template-columns: 1fr;
    }
    .fb-pay__info {
        order: 1;
        border-left: none;
        border-right: none;
        border-bottom: 1px solid #eef0f4;
    }
    .fb-pay__poster {
        order: 2;
        min-height: 220px;
    }
    .fb-pay__poster img {
        max-height: 320px;
    }
}

@media (max-width: 720px) {
    .fb-hero__stats {
        gap: 24px;
    }
    .fb-cta {
        flex-direction: column;
        align-items: flex-start;
    }
    .fb-cta__btn {
        width: 100%;
        justify-content: center;
    }
    .fb-pay__info {
        padding: 28px;
    }
}