/* ============================================================
   VARIABLES
   ============================================================ */
:root {
    --BlauUB:   #006ED1;
    --Blanc:    #ffffff;
    --GrisText: #363636;
    --GrisFons: #625E55;
    --BlauCel:  #E4F0FE;

    /* Border-radius scale */
    --radius-xs:   0.25rem;
    --radius-sm:   0.375rem;
    --radius-md:   0.5rem;
    --radius-lg:   0.75rem;
    --radius-xl:   1rem;
    --radius-card: 1.5rem;
    --radius-pill: 5rem;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Chivo', sans-serif;
    color: var(--GrisText);
    line-height: 1.5;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   WRAPPER
   ============================================================ */
.wrapper,
.page__wrapper {
    max-width: 95rem;
    margin: 0 auto;
    padding: 0 2.5rem;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    background: var(--Blanc);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
}

.header__logos {
    display: flex;
    align-items: center;
    gap: 2.75rem;
}

.header__logo {
    height: 3rem;
    width: auto;
}

.header__logo:last-child {
    height: 4rem;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    min-height: 40rem;
    background-image: url('https://www.il3.ub.edu/oferta/rrhh/img/iStock-2228787529.webp');
    background-size: 60%;
    background-position: right;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 40%, rgba(255, 255, 255, 0) 55%);
}

.hero .wrapper {
    position: relative;
    z-index: 1;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.hero__content {
    max-width: 50%;
}

.hero__title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: var(--BlauUB);
}

.hero__text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 2.25rem;
    color: var(--GrisText);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-block;
    padding: 0.875rem 2.25rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 0.125rem solid transparent;
}

.btn--primary {
    background-color: var(--BlauUB);
    color: var(--Blanc);
    border-color: var(--BlauUB);
    text-transform: uppercase;
    font-weight: 500;
}

.btn--primary:hover {
    background-color: #2d6bb5;
    border-color: #2d6bb5;
}


/* ============================================================
   SECTIONS
   ============================================================ */
.section {
    padding: 4rem 0;
}

.section--white {
    background-color: var(--Blanc);
}

.section--grey {
    background-color: var(--GrisFons);
    color: var(--Blanc);
}

.section--blue {
    background-color: var(--BlauUB);
    color: var(--Blanc);
}

/* Shared section header: tag + h2 + intro text column */
.section-header__content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Shared intro paragraph that sits below h2 in section headers.
   Color inherits from the section (white on dark, dark on light). */
.section-intro {
    font-size: 1rem;
    max-width: 100%;
    line-height: 1.5;
    opacity: 0.85;
}

/* ============================================================
   LAYOUT GRIDS
   ============================================================ */
.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.75rem;
    align-items: center;
}

.grid-6col {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3rem;
}

/* ============================================================
   BLUE BOX  (Section White — Left column)
   ============================================================ */
.section--testimonial {
    padding: 2rem 0;
}

.blue-box {
    background-color: var(--BlauUB);
    margin-top: -15rem;
    color: var(--Blanc);
    border-radius: 0 var(--radius-xl);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 1;
}

.blue-box__quote {
    font-size: 1rem;
    font-weight: 400;
}

.blue-box__author {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    font-size: 0.875rem;
}

/* ============================================================
   ICONS GRID  (Section White — Right column)
   ============================================================ */
.icons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.icon-item__icon {
    width: 4.75rem;
    height: 4.75rem;
    border-radius: 50%;
    background-color: var(--BlauCel);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--BlauUB);
    flex-shrink: 0;
}

.icon-item__icon img {
    mix-blend-mode: multiply;
}

.icon-item__label {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    color: #333;
}

/* ============================================================
   VIDEO
   ============================================================ */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.15);
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-poster-wrap {
    cursor: pointer;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    color: var(--BlauUB);
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    padding-left: 0.15rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.video-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--Blanc);
}


/* ============================================================
   SECTION TITLE  (h2 compartido — solo cambia el color)
   ============================================================ */
h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.625rem);
    font-weight: 700;
    line-height: 1.2;
}

/* ============================================================
   CONTENT COLUMN  (Section Grey — Right column)
   ============================================================ */
.content-col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.content-col__header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tag {
    display: inline-block;
    font-family: 'Chivo', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
}

.content-col__text {
    font-size: 1.25rem;
    font-weight: 400;
}

/* ============================================================
   ICON LIST  (Section Grey — Right column)
   ============================================================ */
.icon-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.icon-list__item {
    display: flex;
    align-items: flex-start;
    gap: 1.125rem;
}

.icon-list__icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background-color: var(--Blanc);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--Blanc);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.icon-list__text {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 0.25rem;
}

.icon-list__title {
    font-size: 1rem;
    font-weight: 700;
}

.icon-list__subtitle {
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ============================================================
   SECCIÓN RETOS ACTUALES
   ============================================================ */
.retos-header {
    margin-bottom: 2.5rem;
}

.tag--blue {
    color: var(--BlauUB);
}

.retos-card {
    background-color: var(--BlauCel);
    border-radius: 0 var(--radius-card);
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.retos-card__icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--BlauUB);
    flex-shrink: 0;
}

.retos-card__icon img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.retos-card__title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--GrisText);
}

/* ============================================================
   EXPERTOS VÍDEOS SECTION
   ============================================================ */
.expertos-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 2rem;
}


.expertos-carousel {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.carousel-controls {
    display: flex;
    gap: 0.5rem;
}

.carousel-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 2px solid var(--Blanc);
    background: transparent;
    color: var(--Blanc);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.carousel-btn:hover:not(:disabled) {
    background: var(--Blanc);
    color: var(--BlauUB);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.expertos-track-wrap {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.expertos-track-wrap::-webkit-scrollbar {
    display: none;
}

.expertos-track {
    display: flex;
    gap: 3rem;
}

.experto-col {
    flex: 0 0 calc((100% - 5 * 1.25rem) / 6);
    border: 1px solid var(--Blanc);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
}

.experto-col__title {
    padding: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--Blanc);
}


/* ============================================================
   RESPONSIVE — 768px
   ============================================================ */
@media (max-width: 768px) {
    .two-cols {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero {
        min-height: 32.5rem;
    }

    .hero__content {
        max-width: 100%;
    }

    .hero::before {
        background: rgba(0, 0, 0, 0.55);
    }

    .icons-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    .grid-6col {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .expertos-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .blue-box {
        padding: 2rem;
        min-height: auto;
    }

    .blue-box__quote {
        margin-bottom: 1.75rem;
    }

    /* Programas: switch to carousel */
    .programas-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .programas-track-wrap {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .programa-card,
    .programa-card--empty {
        flex: 0 0 100%;
    }

    .programa-card--empty {
        display: none;
    }

    .programas-carousel-controls {
        display: flex;
    }
}

/* ============================================================
   RESPONSIVE — 480px
   ============================================================ */
@media (max-width: 480px) {
    .wrapper {
        padding: 0 1rem;
    }

    .section {
        padding: 3rem 0;
    }

    .header__logos {
        gap: 1.25rem;
    }

    .header__logo {
        height: 2.25rem;
    }

    .hero__title {
        font-size: 1.75rem;
    }

    .hero__text {
        font-size: 1rem;
    }

    .btn {
        padding: 0.75rem 1.75rem;
        font-size: 0.95rem;
    }

    .icons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .blue-box {
        padding: 1.5rem;
    }

    .icon-list__icon {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.1rem;
    }
}

/* ============================================================
   SECCIÓN PROGRAMAS
   ============================================================ */
.section--programas {
    padding-top: 4rem;
    padding-bottom: 5rem;
}

.programas-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 2.5rem;
}


/* Track */
.programas-track-wrap {
    overflow: hidden;
    scrollbar-width: none;
}

.programas-track-wrap::-webkit-scrollbar {
    display: none;
}

.programas-track {
    display: flex;
    gap: 3rem;
}

/* Cards */
.programa-card,
.programa-card--empty {
    flex: 0 0 calc((100% - 5 * 3rem) / 6);
    min-width: 0;
}

.programa-card {
    background-color: var(--BlauCel);
    border-radius: 0 var(--radius-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.programa-card__body {
    padding: 1.5rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    flex: 1;
}

.programa-card__tag {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--Blanc);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

.programa-card__tag--master {
    background-color: #C0392B;
}

.programa-card__tag--experto {
    background-color: #27AE60;
}

.programa-card__title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--BlauUB);
    line-height: 1.3;
}

.programa-card__text {
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--GrisText);
}

.programa-card__img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.programa-card__footer {
    padding: 1rem 1.25rem;
}

.programa-card__btn {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--BlauUB);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-block;
    transition: opacity 0.2s ease;
}

.programa-card:hover .programa-card__btn {
    opacity: 0.7;
}

/* Carousel controls — hidden on desktop */
.programas-carousel-controls {
    display: none;
    gap: 0.5rem;
    margin-top: 1.75rem;
}

.programas-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 2px solid var(--BlauUB);
    background: transparent;
    color: var(--BlauUB);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.programas-btn:hover:not(:disabled) {
    background: var(--BlauUB);
    color: var(--Blanc);
}

.programas-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ============================================================
   SECCIÓN METODOLOGÍA / ICON GRID
   ============================================================ */
.section--celeste {
    background-color: var(--BlauCel);
}

.metodologia-header {
    margin-bottom: 3rem;
}

.metodologia-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.875rem;
}

.metodologia-item__icon-wrap {
    background-color: var(--Blanc);
    border-radius: 50%;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metodologia-item__icon {
    width: 4rem;
    height: 4rem;
    object-fit: contain;
}

.metodologia-item__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--BlauUB);
}

.metodologia-item__text {
    font-size: 1rem;
    line-height: 1.55;
    color: var(--GrisText);
}

/* ── VIDEO MODAL ──────────────────────────────── */
.video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.video-modal--open {
    display: flex;
}

.video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    cursor: pointer;
}

.video-modal__box {
    position: relative;
    z-index: 1;
    width: min(860px, 92vw);
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.6);
    animation: modal-in 0.22s ease;
}

@keyframes modal-in {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

.video-modal__player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
}

.video-modal__player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-modal__close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background 0.15s, opacity 0.15s;
    z-index: 999;
}

.video-modal__close:hover {
    background: rgba(0, 0, 0, 0.85);
    opacity: 1;
}

body.modal-open {
    overflow: hidden;
}

.video-modal__fallback {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: #111;
}

.video-modal__thumb {
    width: 100%;
    max-width: 540px;
    border-radius: var(--radius-sm);
    opacity: 0.85;
}

.video-modal__fallback-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.video-modal__fallback-msg p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================================
   RESPONSIVE ADDITIONS — Mobile enhancements
   (These rules extend and override the breakpoints above)
   ============================================================ */

/* Prevent any element from causing horizontal scroll */
body {
    overflow-x: hidden;
}

/* ── ≤ 768 px ── */
@media (max-width: 768px) {

    /* Header logos: switch to max-height + max-width so wide
       images never overflow the container */
    .header__logo {
        height: auto;
        max-height: 2.75rem;
        max-width: 44%;
    }

    .header__logo:last-child {
        max-height: 3.5rem;
        max-width: 44%;
    }

    .header__logos {
        gap: 1.5rem;
    }

    /* Hero: cover image, white text against dark overlay */
    .hero {
        background-size: cover;
        background-position: center top;
        min-height: 26rem;
    }

    .hero .wrapper {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .hero__title {
        color: var(--Blanc);
        font-size: clamp(1.375rem, 5vw, 1.875rem);
    }

    .hero__text {
        color: rgba(255, 255, 255, 0.9);
        font-size: 1.05rem;
    }

    /* Hero CTA: full-width on mobile */
    .hero .btn--primary {
        display: block;
        text-align: center;
        width: 100%;
        max-width: 24rem;
    }

    /* Blue box: remove negative margin on stacked layout */
    .blue-box {
        margin-top: 0;
    }

    .section--testimonial {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    /* Icons grid: 2×2 on mobile is cleaner than 4×1 */
    .icons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Content col text */
    .content-col__text {
        font-size: 1rem;
    }

    /* Hide retos filler cell */
    .retos-card--empty {
        display: none;
    }

    /* Retos grid: 2 cols on tablet */
    .section--retos .grid-6col {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Metodologia grid: 2 cols on tablet */
    .section--metodologia .grid-6col {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Metodologia header */
    .metodologia-header {
        margin-bottom: 2rem;
    }

    /* Fundae: remove gap so grey + blue blocks sit flush */
    .fundae-grid {
        gap: 0;
    }

    /* Smaller hero image height */
    .fundae-grey__img {
        height: 12rem;
    }

    /* Programas: peek-carousel on mobile.
       Base styles are defined later in the file so we must
       override them here (after all base rules). */
    .programas-track-wrap {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .programas-track {
        gap: 1.5rem;
    }

    .programa-card {
        flex: 0 0 85%;
        scroll-snap-align: start;
    }

    .programa-card--empty {
        display: none;
    }

    .programas-carousel-controls {
        display: flex;
    }

    /* Programas header spacing */
    .programas-header {
        margin-bottom: 2rem;
    }

    /* Tag font size */
    .tag {
        font-size: 0.8125rem;
    }

    /* Section intro */
    .section-intro {
        font-size: 0.9375rem;
    }

    /* Video modal: tighter on tablet */
    .video-modal__box {
        width: min(600px, 96vw);
    }
}

/* ============================================================
   SECTION: FORMULARIO
   ============================================================ */
.section--formulario {
    background-color: var(--BlauUB);
    color: var(--Blanc);
    padding: 5rem 0;
}

/* Grid: intro (2fr) + form card (3fr) */
.formulario-grid {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    align-items: start;
}

/* ── Left: intro ── */
.formulario-intro {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 0.5rem;
}

.formulario-intro .tag {
    color: rgba(255, 255, 255, 0.75);
}

.formulario-intro__title {
    font-size: clamp(1.25rem, 2.5vw, 1.875rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--Blanc);
}

.formulario-intro__text {
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.85);
}

/* Trust list */
.formulario-trust {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-top: 0.5rem;
}

.formulario-trust__item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.formulario-trust__icon {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* ── Right: form card ── */
.formulario-card {
    background: var(--Blanc);
    border-radius: 0 var(--radius-card);
    padding: 2.5rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.18);
}

/* ── Form layout ── */
.formulario-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row--2col {
    flex-direction: row;
    gap: 1.25rem;
}

.form-row--2col .form-group {
    flex: 1;
    min-width: 0;
}

.form-row--checks {
    gap: 0.875rem;
    margin-top: 0.25rem;
}

.form-row--submit {
    margin-top: 0.25rem;
    align-items: flex-start;
}

/* ── Form group ── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--GrisText);
    line-height: 1.3;
}

.form-required {
    color: var(--BlauUB);
    font-weight: 700;
}

.form-input {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--GrisText);
    background: #f7f9fc;
    border: 1.5px solid #d8e3ef;
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    appearance: none;
}

.form-input::placeholder {
    color: #aab4c0;
    font-weight: 400;
}

.form-input:focus {
    border-color: var(--BlauUB);
    background: var(--Blanc);
    box-shadow: 0 0 0 3px rgba(0, 110, 209, 0.12);
}

.form-textarea {
    resize: vertical;
    min-height: 7rem;
    line-height: 1.55;
}

/* ── Custom checkboxes ── */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
    position: relative;
}

.form-check__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form-check__box {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    border: 1.5px solid #c0cfe0;
    border-radius: var(--radius-xs);
    background: #f7f9fc;
    margin-top: 0.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.form-check__box::after {
    content: '';
    display: block;
    width: 0.35rem;
    height: 0.6rem;
    border: 2px solid var(--Blanc);
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-0.05rem);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.form-check__input:checked + .form-check__box {
    background: var(--BlauUB);
    border-color: var(--BlauUB);
}

.form-check__input:checked + .form-check__box::after {
    opacity: 1;
}

.form-check__input:focus-visible + .form-check__box {
    box-shadow: 0 0 0 3px rgba(0, 110, 209, 0.18);
}

.form-check__label {
    font-size: 0.8125rem;
    color: #555;
    line-height: 1.45;
}

.form-check__link {
    color: var(--BlauUB);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.form-check__link:hover {
    opacity: 0.75;
}

/* ── Submit button ── */
.btn--form-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    background: var(--BlauUB);
    color: var(--Blanc);
    border: 2px solid var(--BlauUB);
    border-radius: var(--radius-sm);
    padding: 0.875rem 2.25rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.btn--form-submit:hover {
    background: #005bb5;
    border-color: #005bb5;
}

@media (max-width: 480px) {
    /* Hero */
    .hero {
        min-height: 22rem;
    }

    .hero .wrapper {
        padding-top: 2.25rem;
        padding-bottom: 2.25rem;
    }

    .hero__title {
        font-size: 1.5rem;
    }

    .hero__text {
        font-size: 1rem;
        margin-bottom: 1.75rem;
    }

    .hero .btn--primary {
        max-width: 100%;
    }

    /* Header logos */
    .header__logo {
        max-height: 2.25rem;
        max-width: 44%;
    }

    .header__logo:last-child {
        max-height: 2.75rem;
        max-width: 44%;
    }

    .header__logos {
        gap: 1.25rem;
    }

    /* Blue box */
    .blue-box {
        gap: 1.25rem;
    }

    /* Sections */
    .section {
        padding: 2.5rem 0;
    }

    /* Tags */
    .tag {
        font-size: 0.75rem;
    }

    /* Section intro */
    .section-intro {
        font-size: 0.9rem;
    }

    /* Retos header */
    .retos-header {
        margin-bottom: 1.75rem;
    }

    /* Grid gaps */
    .grid-6col {
        gap: 1rem;
    }

    /* Retos card */
    .retos-card {
        padding: 1.5rem 1rem;
    }

    /* Metodologia header */
    .metodologia-header {
        margin-bottom: 1.75rem;
    }

    /* Metodologia item */
    .metodologia-item {
        gap: 0.625rem;
    }

    /* Expertos */
    .experto-col {
        flex: 0 0 90%;
    }

    .expertos-track {
        gap: 1rem;
    }

    .expertos-carousel {
        gap: 1.5rem;
    }

    /* Icon grid items */
    .icon-item__icon {
        width: 3.75rem;
        height: 3.75rem;
        font-size: 1.5rem;
    }

    .icon-item__label {
        font-size: 0.8rem;
    }

    /* Icon list */
    .icon-list {
        gap: 1.25rem;
    }

    .icon-list__icon {
        width: 3rem;
        height: 3rem;
    }

    /* Two-cols gap */
    .two-cols {
        gap: 2rem;
    }

    /* Fundae */
    .fundae-grey__img {
        height: 10.5rem;
    }

    .fundae-grey__content {
        padding: 0.5rem 0.25rem;
    }

    .fundae-blue {
        padding: 1.75rem 1.25rem;
        gap: 1.25rem;
    }

    .fundae-features {
        gap: 0.75rem;
    }

    .fundae-feature__label {
        font-size: 0.75rem;
    }

    .fundae-blue__btn {
        font-size: 0.8125rem;
        text-align: center;
    }

    .fundae-logo {
        height: 2rem;
    }

    /* Programas */
    .programa-card {
        flex: 0 0 90%;
    }

    .programas-track {
        gap: 1rem;
    }

    .programas-header {
        margin-bottom: 1.5rem;
    }

    /* Video modal: bottom-sheet on small screens */
    .video-modal {
        align-items: flex-end;
    }

    .video-modal__box {
        width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    /* Formulario */
    .form-row--2col {
        flex-direction: column;
    }

    .formulario-card {
        padding: 1.5rem 1.25rem;
        border-radius: 0 var(--radius-xl);
    }

    .section--formulario {
        padding: 3rem 0;
    }

    .btn--form-submit {
        font-size: 0.875rem;
        padding: 0.8rem 1.75rem;
    }
}

/* ── ≤ 375 px (very small phones) ── */
@media (max-width: 375px) {

    .wrapper {
        padding: 0 0.875rem;
    }

    .header__logo {
        max-height: 1.875rem;
        max-width: 44%;
    }

    .header__logo:last-child {
        max-height: 2.375rem;
        max-width: 44%;
    }

    .header__logos {
        gap: 1rem;
    }

    .hero {
        min-height: 18rem;
    }

    .hero .wrapper {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .hero__title {
        font-size: 1.3rem;
    }

    .hero__text {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }

    .section {
        padding: 2rem 0;
    }

    .section--testimonial {
        padding: 2rem 0;
    }

    .grid-6col {
        gap: 0.875rem;
    }

    .retos-card {
        padding: 1.25rem 0.875rem;
        gap: 0.75rem;
    }

    .retos-card__icon {
        width: 3.25rem;
        height: 3.25rem;
        font-size: 1.5rem;
    }

    .retos-card__title {
        font-size: 0.8rem;
    }

    .metodologia-item__icon {
        width: 3rem;
        height: 3rem;
    }

    .experto-col {
        flex: 0 0 88%;
    }

    .expertos-track {
        gap: 0.75rem;
    }

    .icon-list__icon {
        width: 2.5rem;
        height: 2.5rem;
    }

    .icon-list__item {
        gap: 0.875rem;
    }

    .blue-box {
        padding: 1.25rem;
        gap: 1rem;
    }

    .blue-box__quote {
        font-size: 0.9rem;
    }

    .icons-grid {
        gap: 1.25rem;
    }

    .programas-carousel-controls,
    .carousel-controls {
        gap: 0.375rem;
    }

    /* Fundae */
    .fundae-grey__img {
        height: 9rem;
    }

    .fundae-grey__content {
        padding: 0.25rem 0;
    }

    .fundae-blue {
        padding: 1.5rem 1rem;
        gap: 1rem;
    }

    .fundae-features {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .fundae-feature {
        flex-direction: row;
        text-align: left;
        gap: 0.875rem;
        width: 100%;
    }

    .fundae-feature__label {
        font-size: 0.8125rem;
    }
}

/* ============================================================
   SECTION: BONIFICACIÓN FUNDAE
   ============================================================ */

/* 6-column grid: grey=3 cols · blue=2 cols · white=1 col */
.fundae-grid {
    display: grid;
    grid-template-columns: 3fr 2fr 1fr;
    gap: 3rem;
    max-width: 95rem;
    margin: 0 auto;
    min-height: 28rem;
}

/* ── Grey block (3 cols) ── */
.fundae-grey {
    background-color: var(--GrisFons);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: stretch;
    padding: 1.25rem;
    gap: 1.25rem;
}

.fundae-grey__img {
    width: 55%;
    object-fit: cover;
    object-position: 25% center;
    flex-shrink: 0;
    border-radius: var(--radius-lg);
}

.fundae-grey__content {
    flex: 0 0 45%;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.fundae-grey__title {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--Blanc);
}

.fundae-grey__text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--Blanc);
    opacity: 0.85;
}

/* ── Blue block (2 cols) ── */
.fundae-blue {
    background-color: var(--BlauUB);
    border-radius: var(--radius-xl);
    color: var(--Blanc);
    padding: 3rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 1.75rem;
}

.fundae-blue__header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fundae-blue__title {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--Blanc);
}

.fundae-blue__subtitle {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.75);
}

.fundae-blue__text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
    margin-top: 0.25rem;
}

/* ── 3 features row ── */
.fundae-features {
    display: flex;
    gap: 1.5rem;
}

.fundae-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    text-align: center;
}


.fundae-feature__label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--Blanc);
    line-height: 1.3;
}

/* ── Button ── */
.fundae-blue__btn {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--Blanc);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.fundae-blue__btn:hover {
    opacity: 0.75;
    background: transparent;
    color: var(--Blanc);
    border-color: transparent;
}

/* ── Separator ── */
.fundae-separator {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin: 0;
    width: 100%;
    align-self: stretch;
}

/* ── FUNDAE logo ── */
.fundae-logo {
    height: 2.5rem;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    /* Layout */
    .wrapper {
        padding: 0 1.5rem;
    }

    .icons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .two-cols {
        gap: 2.5rem;
    }

    .experto-col {
        flex: 0 0 calc((100% - 2 * 1.25rem) / 3);
    }

    .grid-6col {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    /* Formulario */
    .formulario-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    /* Fundae */
    .fundae-grid {
        grid-template-columns: 1fr 1fr;
        min-height: auto;
    }

    .fundae-grey {
        grid-column: 1 / -1;
        min-height: 18rem;
    }

    .fundae-grey__img {
        width: 55%;
    }

    .fundae-blue {
        grid-column: 1 / 2;
    }
}

@media (max-width: 768px) {
    /* Expertos: single-card peek-carousel — must come after the 1024px block */
    .experto-col {
        flex: 0 0 85%;
    }

    .expertos-track {
        gap: 1.5rem;
    }

    /* Formulario */
    .formulario-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .section--formulario {
        padding: 3.5rem 0;
    }

    .formulario-card {
        padding: 2rem;
    }

    /* Fundae */
    .fundae-grid {
        grid-template-columns: 1fr;
    }

    .fundae-grey {
        flex-direction: column;
    }

    .fundae-grey__img {
        width: 100%;
        height: 14rem;
    }

    .fundae-grey__content {
        padding: 0.5rem 0.25rem;
    }

    .fundae-blue {
        grid-column: 1 / -1;
        padding: 2rem;
    }

    .fundae-features {
        gap: 1rem;
    }
}

/* ============================================================
   FOOTER OVERRIDES
   ============================================================ */

/* ─── Base (all breakpoints) ─── */
.footer.page__footer {
    overflow: hidden;
}

.footer__legal a {
    color: #fff;
}

.footer__logos .logos {
    display: flex;
    align-items: center;
    gap: 0;
}

.footer__logos .logo__link {
    filter: brightness(0) invert(1);
}

.footer__logos .logo--barcelona img {
    height: 5rem;
    width: auto;
}

.footer.page__footer::before {
    background: #006ed1;
    z-index: 1;
    right: 0;
}

.footer.page__footer::after {
    background: rgba(0, 0, 0, 0.1);
    display: block;
    bottom: 0;
    width: auto;
    transform: none;
}

/* ─── Desktop (≥ 64em / 1024px) — DO NOT EDIT ─── */
@media (min-width: 64em) {
    .footer.page__footer {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }

    .footer.page__footer::before {
        top: 10.875rem;
    }

    .footer.page__footer::after {
        left: calc(50% - 46.5rem);
        right: 0;
        top: 11rem;
    }

    .footer__quicklinks {
        text-align: right;
    }
}

/* ─── Tablet (47.5em–63.9375em / 760px–1023px) ─── */
@media (min-width: 47.5em) and (max-width: 63.9375em) {
    .footer.page__footer {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .footer.page__footer::before {
        top: 7.5rem;
    }

    .footer.page__footer::after {
        left: 0;
        right: 0;
        top: 7.5rem;
    }

    .footer__quicklinks {
        text-align: right;
    }
}

/* ─── Mobile (< 47.5em / < 760px) ─── */
@media (max-width: 47.4375em) {
    .footer.page__footer {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .footer.page__footer::before {
        top: 5rem;
    }

    .footer.page__footer::after {
        left: 0;
        right: 0;
        top: 5rem;
    }

    .footer__quicklinks {
        text-align: left;
    }
}

/* ============================================================
   FORM VALIDATION — error states
   ============================================================ */
.form-error {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #d0021b;
    margin-top: 0.3rem;
    line-height: 1.3;
}

.form-error--check {
    margin-top: 0.15rem;
    margin-bottom: 0.25rem;
    padding-left: 1.75rem;
}

.form-input--error {
    border-color: #d0021b;
    background-color: #fff8f8;
}

.form-input--error:focus {
    border-color: #d0021b;
    box-shadow: 0 0 0 3px rgba(208, 2, 27, 0.12);
}

.form-check--error .form-check__box {
    border-color: #d0021b;
}
