/* =========================================================
   ECAP — STYLES
   ========================================================= */

:root {
    --blue: #101D30;
    --blue-dark: #0A1422;

    --ink: #101114;
    --muted: #6E7077;

    --background: #FFFFFF;
    --surface: #F5F5F7;

    --border: rgba(16, 29, 48, 0.10);

    --container: 1240px;

    --font-body: "Inter", sans-serif;
}


/* =========================================================
   RESET
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    background: var(--background);
    color: var(--ink);

    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}


/* =========================================================
   LAYOUT
   ========================================================= */

.container {
    width: min(
        calc(100% - 40px),
        var(--container)
    );

    margin-inline: auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: relative;
    z-index: 100;

    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 82px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: block;
    flex: 0 0 auto;
}

.brand img {
    width: 185px;
    height: auto;
}

.desktop-nav {
    display: none;
}

.menu-button {
    width: 42px;
    height: 42px;

    padding: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;

    border: 0;
    background: transparent;

    cursor: pointer;
}

.menu-button span {
    width: 21px;
    height: 1px;

    background: var(--ink);
}

/* MOBILE NAV */

.mobile-nav {
    max-height: 0;
    overflow: hidden;

    background: rgba(255, 255, 255, 0.98);

    border-top: 1px solid transparent;

    opacity: 0;

    transition:
        max-height 240ms cubic-bezier(.2, .7, .2, 1),
        opacity 180ms ease,
        border-color 180ms ease;
}

.mobile-nav.is-open {
    max-height: 180px;

    opacity: 1;

    border-top-color: var(--border);
}

.mobile-nav-inner {
    display: flex;
    flex-direction: column;
}

.mobile-nav a {
    padding: 20px 0;

    border-bottom: 1px solid var(--border);

    color: var(--ink);

    font-size: 0.95rem;
    font-weight: 500;
}

.mobile-nav a:last-child {
    border-bottom: 0;
}


/* HAMBURGER → X */

.menu-button span {
    transition:
        transform 200ms ease,
        opacity 160ms ease;
}

.menu-button[aria-expanded="true"] span:first-child {
    transform: translateY(3.5px) rotate(45deg);
}

.menu-button[aria-expanded="true"] span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
}


/* =========================================================
   HOME HERO · CAROUSEL
   ========================================================= */

.home-hero {
    position: relative;

    width: 100%;
    height: clamp(560px, 72vh, 760px);

    overflow: hidden;

    background: var(--blue-dark);
    color: #fff;

    touch-action: pan-y;
}


/* TRACK */

.home-hero-track {
    position: relative;

    width: 100%;
    height: 100%;
}


/* SLIDE */

.home-hero-slide {
    position: absolute;
    inset: 0;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 900ms cubic-bezier(.2, .7, .2, 1),
        visibility 900ms;
}

.home-hero-slide.is-active {
    opacity: 1;
    visibility: visible;

    z-index: 2;
}


/* BACKGROUND */

.home-hero-bg {
    position: absolute;
    inset: 0;

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    transform: scale(1.015);

    transition:
        transform 8s cubic-bezier(.2, .7, .2, 1);
}

.home-hero-slide.is-active .home-hero-bg {
    transform: scale(1);
}


/*
   IMÁGENES TEMPORALES

   Después reemplazamos estas tres rutas
   por las fotos definitivas.
*/

.home-hero-bg-join {
    background-image:
        url("../img/hero/hero-sumate.png");
}

.home-hero-bg-future {
    background-image:
        url("../img/hero/hero-futuro.png");
}

.home-hero-bg-activities {
    background-image:
        url("../img/hero/hero-actividades.png");
}


/* OVERLAY */

.home-hero-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(5, 10, 18, 0.72) 0%,
            rgba(5, 10, 18, 0.46) 46%,
            rgba(5, 10, 18, 0.08) 100%
        );
}


/* CONTENT */

.home-hero-content {
    position: relative;
    z-index: 3;

    height: 100%;

    display: flex;
    align-items: center;
}

.home-hero-copy {
    max-width: 850px;

    padding: 70px 0 90px;
}


/* EYEBROW */

.home-hero-eyebrow {
    margin: 0 0 22px;

    color: rgba(255, 255, 255, 0.72);

    font-size: 0.78rem;
    font-weight: 600;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}


/* TITLE */

.home-hero h1,
.home-hero h2 {
    max-width: 850px;

    margin: 0;

    color: #fff;

    font-size: clamp(3rem, 10vw, 5.6rem);
    font-weight: 600;
    line-height: 0.96;

    letter-spacing: -0.06em;
}


/* DESCRIPTION */

.home-hero-description {
    max-width: 590px;

    margin: 28px 0 0;

    color: rgba(255, 255, 255, 0.78);

    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
}


/* ACTION */

.home-hero-action {
    position: relative;

    width: fit-content;

    margin-top: 32px;

    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: #fff;

    font-size: 0.92rem;
    font-weight: 500;
}

.home-hero-action::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -5px;

    width: 100%;
    height: 1px;

    background: currentColor;

    transform: scaleX(0);
    transform-origin: right;

    transition: transform 180ms ease;
}

.home-hero-action:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.home-hero-action span {
    transition: transform 180ms ease;
}

.home-hero-action:hover span {
    transform: translateX(3px);
}


/* CONTROLS */

.home-hero-controls {
    position: absolute;
    z-index: 10;

    left: 50%;
    bottom: 28px;

    transform: translateX(-50%);

    display: flex;
    align-items: center;

    gap: 9px;
}

.home-hero-dot {
    width: 7px;
    height: 7px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.42);

    cursor: pointer;

    transition:
        background 180ms ease,
        transform 180ms ease;
}

.home-hero-dot:hover {
    background: rgba(255, 255, 255, 0.72);
}

.home-hero-dot.is-active {
    background: #fff;
    transform: scale(1.15);
}

/* ARROWS */

.home-hero-arrow {
    position: absolute;
    z-index: 10;

    top: 50%;

    width: 48px;
    height: 72px;

    padding: 0;

    display: none;
    align-items: center;
    justify-content: center;

    border: 0;

    background: transparent;
    color: rgba(255, 255, 255, 0.52);

    cursor: pointer;

    transform: translateY(-50%);

    transition:
        color 180ms ease,
        opacity 180ms ease;
}

.home-hero-arrow span {
    display: block;

    font-size: 3rem;
    font-weight: 200;
    line-height: 1;
}

.home-hero-arrow-prev {
    left: 18px;
}

.home-hero-arrow-next {
    right: 18px;
}

.home-hero-arrow:hover {
    color: #fff;
}

.home-hero-arrow:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* MOBILE */

@media (max-width: 767px) {

    .home-hero {
        height: min(720px, calc(100svh - 82px));
        min-height: 590px;
    }

    .home-hero-content {
        align-items: flex-end;
    }

    .home-hero-copy {
        max-width: 100%;

        padding: 70px 0 92px;
    }

    .home-hero h1,
    .home-hero h2 {
        max-width: 620px;

        font-size: clamp(3rem, 13vw, 4.6rem);
    }

    .home-hero-description {
        max-width: 480px;

        margin-top: 22px;

        font-size: 0.94rem;
    }

    .home-hero-action {
        margin-top: 27px;
    }

    .home-hero-overlay {
        background:
            linear-gradient(
                180deg,
                rgba(5, 10, 18, 0.05) 10%,
                rgba(5, 10, 18, 0.30) 45%,
                rgba(5, 10, 18, 0.88) 100%
            );
    }

    .home-hero-controls {
        bottom: 28px;
    }

}


/* DESKTOP */

@media (min-width: 768px) {

    .home-hero {
        height: clamp(620px, 74vh, 790px);
    }

    .home-hero-copy {
        padding: 90px 0 110px;
    }

    .home-hero h1,
    .home-hero h2 {
        font-size: clamp(4.6rem, 6.5vw, 6.2rem);
    }

    .home-hero-description {
        font-size: 1.05rem;
    }

    .home-hero-arrow {
    display: flex;
    }

}


/* =========================================================
   FEATURED ACTIVITY
   Sólo existe si PHP encuentra una actividad destacada
   ========================================================= */

.featured-section {
    padding: 80px 0;

    background: var(--surface);
}

.featured-activity {
    overflow: hidden;

    display: grid;

    background: #FFFFFF;

    border-radius: 24px;
}

.featured-media {
    min-height: 320px;

    overflow: hidden;

    background: #E8E8EA;
}

.featured-media img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 600ms cubic-bezier(.2, .7, .2, 1);
}

.featured-activity:hover .featured-media img {
    transform: scale(1.015);
}

.featured-placeholder {
    width: 100%;
    min-height: 320px;
    height: 100%;

    background: var(--blue);
}

.featured-content {
    padding: 38px 30px 42px;
}

.featured-label {
    margin: 0 0 24px;

    color: var(--muted);

    font-size: 0.8rem;
    font-weight: 500;
}

.featured-content h2 {
    max-width: 620px;

    margin: 0;

    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.featured-description {
    max-width: 570px;

    margin: 24px 0 0;

    color: var(--muted);

    font-size: 1rem;
    line-height: 1.6;
}

.featured-meta {
    margin: 28px 0 0;

    color: var(--muted);

    font-size: 0.86rem;
    line-height: 1.5;
}

.text-link {
    position: relative;

    display: inline-block;

    margin-top: 28px;

    color: var(--blue);

    font-size: 0.95rem;
    font-weight: 500;
}

.text-link::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -4px;

    width: 100%;
    height: 1px;

    background: currentColor;

    transform: scaleX(0);
    transform-origin: right;

    transition: transform 180ms ease;
}

.featured-activity:hover .text-link::after {
    transform: scaleX(1);
    transform-origin: left;
}


/* =========================================================
   ACTIVITIES
   ========================================================= */

.activities-section {
    padding: 82px 0 105px;

    background: var(--surface);
}

.section-heading {
    margin-bottom: 44px;

    scroll-margin-top: 120px;
}

.section-heading h2 {
    max-width: 800px;

    margin: 0;

    font-size: clamp(2.35rem, 9vw, 3.7rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.055em;
}

.activities-grid {
    display: grid;

    gap: 52px;
}


/* =========================================================
   ACTIVITY ITEM
   ========================================================= */

.activity-item {
    min-width: 0;
}

.activity-link {
    display: block;
}

.activity-image {
    position: relative;
    overflow: hidden;

    width: 100%;
    aspect-ratio: 16 / 10;

    border-radius: 22px;
}

.activity-date-overlay {
    position: absolute;
    z-index: 2;

    left: 36px;
    bottom: 36px;

    display: flex;
    align-items: flex-end;

    color: #fff;

    pointer-events: none;
}

.activity-date-overlay .fallback-day {
    font-size: clamp(10rem, 8vw, 7rem);
    font-weight: 500;
    line-height: 0.78;
    letter-spacing: -0.075em;

    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.activity-date-overlay .fallback-month {
    margin-left: 13px;
    margin-bottom: 2px;

    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.08em;

    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 640px) {
    .activity-date-overlay {
        left: 24px;
        bottom: 24px;
    }
}

.activity-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 600ms cubic-bezier(.2, .7, .2, 1);
}

.activity-link:hover .activity-image img {
    transform: scale(1.015);
}

/* =========================================================
   ACTIVITY IMAGE FALLBACK
   Mientras una actividad no tenga imagen
   ========================================================= */

.activity-image-fallback {
    width: 100%;
    height: 100%;

    padding: 28px;

    display: flex;
    align-items: flex-end;

    background: var(--blue);
    color: #FFFFFF;
}

.fallback-day {
    font-size: clamp(4.5rem, 20vw, 7rem);
    font-weight: 500;
    line-height: 0.78;
    letter-spacing: -0.075em;
}

.fallback-month {
    margin-left: 13px;

    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}


/* =========================================================
   ACTIVITY COPY
   ========================================================= */

.activity-copy {
    padding: 22px 3px 0;
}

.activity-copy h3 {
    max-width: 600px;

    margin: 0 0 17px;

    font-size: clamp(1.45rem, 6vw, 2rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.activity-copy p {
    margin: 5px 0;

    color: var(--muted);

    font-size: 0.9rem;
    line-height: 1.45;
}

.activity-copy .activity-teacher {
    margin: 0 0 16px;

    color: var(--ink);

    font-size: 0.98rem;
    font-weight: 500;
    line-height: 1.4;
}

/* =========================================================
   ESTADO DE ACTIVIDAD
   ========================================================= */

.activity-copy p.activity-status {
    width: fit-content;

    margin: 18px 0 20px;
    padding: 10px 14px;

    border-radius: 8px;

    background: rgba(16, 29, 48, 0.07);
    color: var(--blue);

    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.25;

    letter-spacing: -0.01em;
}

/* Estados sin disponibilidad */

.activity-copy p.activity-status.is-full,
.activity-copy p.activity-status.is-closed,
.activity-copy p.activity-status.is-running {
    background: rgba(16, 17, 20, 0.055);
    color: var(--muted);
}

/* =========================================================
   PAST ACTIVITIES
   ========================================================= */

.past-activities-section {
    padding: 88px 0 105px;
    background: #FFFFFF;
}

.past-activities-heading {
    margin-bottom: 42px;
}

.past-activities-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}


/* CARD */

.activity-item-past {
    overflow: hidden;

    background: #FFFFFF;

    border: 1px solid var(--border);
    border-radius: 20px;

    transition:
        border-color 250ms ease,
        box-shadow 250ms ease,
        transform 250ms ease;
}

.activity-item-past:hover {
    border-color: rgba(16, 29, 48, 0.18);

    box-shadow:
        0 14px 36px rgba(16, 29, 48, 0.08);

    transform: translateY(-3px);
}


/* IMAGE */

.activity-item-past .activity-image {
    aspect-ratio: 16 / 10;

    border-radius: 0;

    background: #E8E8EA;
}

.activity-item-past .activity-image img {
    filter: grayscale(100%);
    opacity: 0.72;

    transition:
        filter 450ms cubic-bezier(.2, .7, .2, 1),
        opacity 450ms cubic-bezier(.2, .7, .2, 1),
        transform 600ms cubic-bezier(.2, .7, .2, 1);
}

.activity-item-past:hover .activity-image img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.025);
}


/* DATE */

.activity-item-past .activity-date-overlay {
    left: 20px;
    bottom: 20px;
}

.activity-item-past .activity-date-overlay .fallback-day {
    font-size: clamp(4.6rem, 6vw, 5.8rem);
    line-height: 0.76;
}

.activity-item-past .activity-date-overlay .fallback-month {
    margin-left: 9px;
    margin-bottom: 0;

    font-size: 0.82rem;
    letter-spacing: 0.07em;
}


/* CONTENT */

.activity-item-past .activity-copy {
    padding: 24px 22px 26px;
}

.activity-item-past .activity-copy h3 {
    margin-bottom: 14px;

    font-size: 1.22rem;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.activity-item-past .activity-copy .activity-teacher {
    margin-bottom: 16px;

    font-size: 0.9rem;
}


/* STATUS */

.activity-item-past .activity-copy p.activity-status {
    margin: 16px 0 18px;
    padding: 8px 10px;

    background: var(--surface);
    color: var(--muted);

    font-size: 0.74rem;
}


/* META */

.activity-item-past .activity-copy > p:not(.activity-teacher) {
    font-size: 0.82rem;
}


/* TABLET */

@media (min-width: 640px) {

    .past-activities-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* DESKTOP */

@media (min-width: 1024px) {

    .past-activities-section {
        padding: 105px 0 120px;
    }

    .past-activities-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 24px;
    }

}

/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty-state {
    margin: 0;

    color: var(--muted);

    font-size: 1rem;
    line-height: 1.6;
}


/* =========================================================
   ABOUT ECAP
   ========================================================= */

.about-section {
    padding: 100px 0;

    background: #FFFFFF;
}

.about-grid {
    display: grid;

    gap: 48px;
}

.about-title h2 {
    max-width: 650px;

    margin: 0;

    font-size: clamp(2.6rem, 10vw, 4.5rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.about-copy {
    max-width: 570px;
}

.about-copy p {
    margin: 0;

    color: #3F4146;

    font-size: 1.05rem;
    line-height: 1.68;
}

.about-copy p + p {
    margin-top: 22px;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    padding: 58px 0;

    background: var(--blue);
    color: #FFFFFF;
}

.footer-inner {
    display: flex;
    flex-direction: column;

    gap: 38px;
}

.footer-logo {
    width: 190px;
}

.footer-inner p {
    margin: 0;

    color: rgba(255, 255, 255, 0.52);

    font-size: 0.75rem;
}


/* =========================================================
   TABLET / DESKTOP
   ========================================================= */

@media (min-width: 768px) {

    .container {
        width: min(
            calc(100% - 80px),
            var(--container)
        );
    }


    /* HEADER */

    .header-inner {
        min-height: 96px;
    }

    .brand img {
        width: 220px;
    }

    .menu-button {
        display: none;
    }

    .mobile-nav {
    display: none;
    }

    .desktop-nav {
        display: flex;
        align-items: center;

        gap: 38px;

        font-size: 0.86rem;
        font-weight: 500;
    }

    .desktop-nav a {
        position: relative;
    }

    .desktop-nav a::after {
        content: "";

        position: absolute;
        left: 0;
        bottom: -6px;

        width: 100%;
        height: 1px;

        background: currentColor;

        transform: scaleX(0);
        transform-origin: right;

        transition: transform 180ms ease;
    }

    .desktop-nav a:hover::after {
        transform: scaleX(1);
        transform-origin: left;
    }

    .nav-access {
        color: var(--blue);
    }

    /* FEATURED */

    .featured-section {
        padding: 110px 0;
    }

    .featured-activity {
        min-height: 540px;

        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr);
    }

    .featured-media {
        min-height: 540px;
    }

    .featured-content {
        padding: 64px;

        display: flex;
        flex-direction: column;
        justify-content: center;
    }


    /* ACTIVITIES */

    .activities-section {
        padding: 105px 0 135px;
    }

    .section-heading {
        margin-bottom: 58px;
    }

    .activities-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        column-gap: 34px;
        row-gap: 72px;
    }

    .activity-image-fallback {
        padding: 36px;
    }

    .activity-copy {
        padding-top: 24px;
    }


    /* ABOUT */

    .about-section {
        padding: 135px 0 145px;
    }

    .about-grid {
        grid-template-columns:
            minmax(0, 1.15fr)
            minmax(320px, 0.85fr);

        align-items: start;

        gap: 100px;
    }


    /* FOOTER */

    .footer-inner {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1180px) {

    .featured-content {
        padding: 76px;
    }

    .activities-grid {
        column-gap: 40px;
    }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* =========================================================
   ACTIVITY DETAIL
   ========================================================= */

.activity-intro {
    padding: 72px 0 64px;
}

.activity-eyebrow {
    margin: 0 0 28px;

    color: var(--muted);

    font-size: 0.9rem;
    font-weight: 500;
}

.activity-title {
    max-width: 1100px;

    margin: 0;

    font-size: clamp(3rem, 7vw, 6.8rem);
    font-weight: 600;
    line-height: 0.94;
    letter-spacing: -0.065em;
}

.activity-teachers {
    margin-top: 38px;
}

.activity-teachers p {
    margin: 0;

    font-size: 1.15rem;
    font-weight: 500;
}

.activity-meta {
    margin-top: 42px;

    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;

    color: var(--muted);

    font-size: 0.95rem;
}

.activity-intro .primary-action {
    margin-top: 34px;
}

/* =========================================================
   ACTIVITY · BIOS
   ========================================================= */

.activity-bios {
    padding: 0 0 96px;
}

.activity-bios .container {
    padding-top: 52px;
    border-top: 1px solid var(--border);
}

.activity-bios-title {
    margin: 0 0 36px;

    font-size: clamp(1.55rem, 2vw, 1.9rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.activity-bio {
    max-width: 900px;

    display: grid;
    grid-template-columns: 150px minmax(0, 620px);
    gap: 44px;
    align-items: start;
}

.activity-bio-photo {
    grid-column: 1;
    grid-row: 1;

    width: 150px;
    height: 150px;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    overflow: hidden;
}

.activity-bio-photo img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center bottom;
}

.activity-bio p {
    grid-column: 2;
    grid-row: 1;

    max-width: 620px;
    margin: 0;

    color: var(--muted);

    font-size: 1rem;
    line-height: 1.7;
}

.activity-bio + .activity-bio {
    margin-top: 44px;
    padding-top: 44px;

    border-top: 1px solid var(--border);
}


/* =========================================================
   ACTIVITY · PRIMARY ACTION
   ========================================================= */

.primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 52px;
    padding: 0 28px;

    background: var(--blue);
    color: #fff;

    border-radius: 999px;

    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1;

    text-decoration: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.primary-action:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.primary-action:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.primary-action-disabled {
    background: #E8E8EA;
    color: var(--muted);

    opacity: 1;

    cursor: default;
    pointer-events: none;
}

.primary-action-disabled:hover {
    background: #E8E8EA;
    color: var(--muted);

    opacity: 1;
    transform: none;
}

/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 768px) {

    .activity-intro {
        padding: 96px 0 76px;
    }

    .activity-title {
        max-width: 1150px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {

    .activity-intro {
        padding: 52px 0 52px;
    }

    .activity-eyebrow {
        margin-bottom: 24px;
    }

    .activity-title {
        font-size: clamp(3rem, 13.5vw, 4.25rem);
        line-height: 0.96;
    }

    .activity-teachers {
        margin-top: 30px;
    }

    .activity-meta {
        margin-top: 34px;

        flex-direction: column;
        gap: 5px;
    }

    .activity-intro .primary-action {
        margin-top: 30px;
    }

}

/* =========================================================
   REGISTRATION
   ========================================================= */

.registration-page {
    min-height: calc(100vh - 96px);
    padding: 72px 0 120px;
    background: #fff;
}

/* =========================================================
   BACK
   ========================================================= */

.registration-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 70px;

    color: var(--muted);

    font-size: 0.9rem;
    font-weight: 500;

    transition: color 160ms ease;
}

.registration-back span {
    font-size: 1.1rem;
    line-height: 1;
}

.registration-back:hover {
    color: var(--ink);
}

/* =========================================================
   FORM SECTION
   ========================================================= */

.registration-form-section {
    padding-top: 62px;

    border-top: 1px solid var(--border);
}

.registration-form-heading {
    display: grid;
    gap: 14px;

    margin-bottom: 48px;
}

.registration-form-heading h2 {
    margin: 0;

    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.registration-form-heading p {
    max-width: 580px;

    margin: 0;

    color: var(--muted);

    font-size: 0.98rem;
    line-height: 1.6;
}


/* =========================================================
   FORM GRID
   ========================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
    row-gap: 30px;
}

.form-field {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.form-field label {
    margin-bottom: 10px;

    color: var(--ink);

    font-size: 0.82rem;
    font-weight: 500;
}


/* =========================================================
   INPUTS
   ========================================================= */

.form-field input {
    width: 100%;
    height: 58px;

    padding: 0 17px;

    border: 1px solid rgba(16, 29, 48, 0.18);
    border-radius: 10px;

    background: #fff;
    color: var(--ink);

    font-family: var(--font-body);
    font-size: 0.98rem;

    outline: none;

    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

.form-field input:hover {
    border-color: rgba(16, 29, 48, 0.30);
}

.form-field input:focus {
    border-color: var(--blue);

    box-shadow:
        0 0 0 3px rgba(16, 29, 48, 0.07);
}

.form-field input::placeholder {
    color: #999ca3;
}


/* =========================================================
   DNI
   ========================================================= */

.dni-field {
    position: relative;
}

.dni-field input {
    padding-right: 100px;

    background: var(--surface);
    color: var(--muted);
}

.dni-change {
    position: absolute;

    top: 50%;
    right: 17px;

    transform: translateY(-50%);

    color: var(--blue);

    font-size: 0.78rem;
    font-weight: 600;
}

.dni-change::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -3px;

    width: 100%;
    height: 1px;

    background: currentColor;

    transform: scaleX(0);
    transform-origin: right;

    transition: transform 160ms ease;
}

.dni-change:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}


/* =========================================================
   SEARCHABLE UNIVERSITY
   ========================================================= */

.search-select {
    position: relative;
}

.search-results {
    position: absolute;
    z-index: 50;

    top: calc(100% + 8px);
    left: 0;

    width: 100%;
    max-height: 290px;

    overflow-y: auto;

    padding: 6px;

    background: #fff;

    border: 1px solid var(--border);
    border-radius: 12px;

    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.10);
}

.search-result-item {
    width: 100%;

    padding: 13px 12px;

    display: block;

    border: 0;
    border-radius: 7px;

    background: transparent;
    color: var(--ink);

    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.4;

    text-align: left;

    cursor: pointer;

    transition: background 140ms ease;
}

.search-result-item:hover {
    background: var(--surface);
}

.search-empty {
    padding: 13px 12px;

    color: var(--muted);

    font-size: 0.85rem;
    line-height: 1.5;
}


/* =========================================================
   PROFESSIONAL AREAS
   ========================================================= */

.professional-fields {
    margin: 62px 0 0;
    padding: 0;

    border: 0;
}

.professional-fields legend {
    padding: 0;

    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.professional-fields > p {
    margin: 9px 0 0;

    color: var(--muted);

    font-size: 0.86rem;
}

.professional-options {
    margin-top: 28px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    column-gap: 48px;
}


/* OPTION */

.professional-option {
    min-height: 54px;

    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: center;
    gap: 13px;

    border-bottom: 1px solid var(--border);

    cursor: pointer;
}

.professional-option input {
    width: 17px;
    height: 17px;

    margin: 0;

    accent-color: var(--blue);

    cursor: pointer;
}

.professional-option span {
    color: #34363b;

    font-size: 0.9rem;
    line-height: 1.4;
}

.professional-option:hover span {
    color: var(--ink);
}


/* =========================================================
   CONSENT
   ========================================================= */

.consent-area {
    max-width: 700px;

    margin-top: 48px;
}

.check-field {
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: start;
    gap: 13px;

    cursor: pointer;
}

.check-field input {
    width: 17px;
    height: 17px;

    margin: 2px 0 0;

    accent-color: var(--blue);

    cursor: pointer;
}

.check-field span {
    color: var(--muted);

    font-size: 0.86rem;
    line-height: 1.5;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.registration-actions {
    margin-top: 42px;

    display: flex;
    justify-content: flex-start;
}

.form-submit {
    min-height: 52px;

    padding: 0 26px;

    border: 0;
    border-radius: 999px;

    background: var(--blue);
    color: #fff;

    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;

    cursor: pointer;

    transition:
        background 160ms ease,
        transform 160ms ease;
}

.form-submit:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

.form-submit:active {
    transform: translateY(0);
}


/* =========================================================
   ERROR
   ========================================================= */

.form-global-error {
    min-height: 20px;

    margin-top: 18px;

    color: #9c2e2e;

    font-size: 0.82rem;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .registration-page {
        padding: 56px 0 90px;
    }

    .registration-back {
        margin-bottom: 54px;
    }

    .registration-form-section {
        padding-top: 48px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {

    .registration-page {
        min-height: calc(100vh - 82px);

        padding: 38px 0 72px;
    }


    /* BACK */

    .registration-back {
        margin-bottom: 46px;

        font-size: 0.84rem;
    }

    /* FORM */

    .registration-form-section {
        padding-top: 40px;
    }

    .registration-form-heading {
        margin-bottom: 36px;
    }

    .registration-form-heading h2 {
        font-size: 2rem;
    }

    .registration-form-heading p {
        font-size: 0.9rem;
    }

    .form-grid {
        grid-template-columns: 1fr;

        gap: 22px;
    }

    .form-field input {
        height: 56px;
    }


    /* PROFESSIONAL */

    .professional-fields {
        margin-top: 48px;
    }

    .professional-fields legend {
        font-size: 1.2rem;
    }

    .professional-options {
        grid-template-columns: 1fr;

        margin-top: 22px;
    }

    .professional-option {
        min-height: 52px;
    }


    /* CONSENT */

    .consent-area {
        margin-top: 40px;
    }


    /* ACTION */

    .registration-actions {
        margin-top: 36px;
    }

    .form-submit {
        width: 100%;
    }

}

/* =========================================================
   REGISTRATION · FLOW
   ========================================================= */

.registration-page {
    min-height: calc(100vh - 96px);
    padding: 64px 0 100px;
}


/* BACK */

.registration-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 48px;

    color: var(--muted);

    font-size: 0.86rem;
    font-weight: 500;

    transition: color 160ms ease;
}

.registration-back:hover {
    color: var(--ink);
}


/* =========================================================
   STEP 1 · DNI
   ========================================================= */

.registration-identification {
    max-width: 620px;
}

.registration-identification-content {
    padding-top: 24px;
}

.registration-identification h1 {
    max-width: 600px;

    margin: 0;

    font-family: var(--font-display);
    font-size: clamp(2.7rem, 5vw, 4.4rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.05em;
}

.registration-identification-content > p {
    max-width: 520px;

    margin: 20px 0 0;

    color: var(--muted);

    font-size: 1rem;
    line-height: 1.6;
}

.dni-start-form {
    max-width: 480px;

    margin-top: 42px;
}

.field-error {
    min-height: 20px;

    margin-top: 8px;

    color: #9c2e2e;

    font-size: 0.8rem;
}


/* =========================================================
   STEP 2 · DATA
   ========================================================= */

.registration-form-section {
    padding: 0;
    border: 0;
}

.registration-form-top {
    margin-bottom: 48px;
}

.registration-form-top .registration-back {
    margin-bottom: 0;
}

.registration-form-heading {
    margin-bottom: 48px;
}

.registration-form-heading h1 {
    margin: 0;

    font-family: var(--font-display);
    font-size: clamp(2.6rem, 4.5vw, 4rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.05em;
}

.registration-form-heading p {
    max-width: 600px;

    margin: 18px 0 0;

    color: var(--muted);

    font-size: 0.96rem;
    line-height: 1.6;
}


/* DNI BLOQUEADO */

.form-field .readonly-input {
    background: var(--surface);
    color: var(--ink);

    font-weight: 600;

    cursor: default;
}

.form-field .readonly-input:focus {
    border-color: rgba(16, 29, 48, 0.18);
    box-shadow: none;
}


/* CONSENTS */

.consent-area {
    margin-top: 48px;

    display: grid;
    gap: 16px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {

    .registration-page {
        min-height: calc(100vh - 82px);

        padding: 38px 0 72px;
    }

    .registration-back {
        margin-bottom: 38px;
    }

    .registration-identification-content {
        padding-top: 10px;
    }

    .registration-identification h1 {
        font-size: 2.65rem;
    }

    .dni-start-form {
        margin-top: 34px;
    }

    .registration-form-top {
        margin-bottom: 38px;
    }

    .registration-form-heading {
        margin-bottom: 36px;
    }

    .registration-form-heading h1 {
        font-size: 2.45rem;
    }

}

/* =========================================================
   UNIVERSITY SEARCH
   ========================================================= */

.search-input-wrap {
    position: relative;
}

.search-input-wrap input {
    padding-left: 48px;
}

.search-input-icon {
    position: absolute;
    z-index: 2;

    top: 50%;
    left: 17px;

    width: 19px;
    height: 19px;

    transform: translateY(-50%);

    fill: none;
    stroke: var(--muted);
    stroke-width: 1.7;
    stroke-linecap: round;

    pointer-events: none;

    transition: stroke 160ms ease;
}

.search-input-wrap:focus-within .search-input-icon {
    stroke: var(--blue);
}

.search-input-wrap input::placeholder {
    color: #999ca3;
    font-weight: 400;
}

.existing-person {
    max-width: 520px;
    margin-top: 42px;
}

.existing-person h2 {
    margin: 0;

    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.existing-person > p {
    margin: 16px 0 0;

    color: var(--muted);
    line-height: 1.6;
}

.existing-email {
    margin-top: 30px;
    padding: 20px 0;

    display: flex;
    flex-direction: column;
    gap: 6px;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.existing-email span {
    color: var(--muted);
    font-size: 0.82rem;
}

.existing-email strong {
    font-size: 1rem;
    font-weight: 600;
}

.secondary-text-action {
    margin: 24px 0 0;
    padding: 0;

    display: block;

    border: 0;
    background: transparent;

    color: var(--muted);

    font: inherit;
    font-size: 0.84rem;
    font-weight: 500;

    cursor: pointer;
}

.secondary-text-action:hover {
    color: var(--ink);
}

.inline-submit {
    width: fit-content;
    margin-top: 28px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   REGISTRATION SUCCESS
   ========================================================= */

.registration-success {
    width: 100%;
    max-width: 720px;

    padding-top: 40px;
}

.success-mark {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 34px;

    border: 1px solid var(--border);
    border-radius: 50%;

    color: var(--blue);

    font-size: 1.15rem;
    font-weight: 600;
}

.success-eyebrow {
    margin: 0 0 18px;

    color: var(--blue);

    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.registration-success h1 {
    margin: 0;

    color: var(--ink);

    font-size: clamp(3rem, 7vw, 5.4rem);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.success-text {
    max-width: 620px;

    margin: 32px 0 0;

    color: var(--ink);

    font-size: 1.15rem;
    line-height: 1.55;
}

.success-secondary {
    max-width: 580px;

    margin: 12px 0 0;

    color: var(--muted);

    font-size: 0.95rem;
    line-height: 1.6;
}

.success-action {
    width: fit-content;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 38px;

    text-decoration: none;
}


@media (min-width: 900px) {

    .registration-success {
        padding-top: 70px;
    }

}

@media (max-width: 640px) {

    .activity-bios {
        padding-bottom: 64px;
    }

    .activity-bios .container {
        padding-top: 38px;
    }

    .activity-bios-title {
        margin-bottom: 28px;
        font-size: 1.5rem;
    }

    .activity-bio {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 22px;
        align-items: start;
    }

    .activity-bio-photo {
        width: 92px;
        height: 92px;
    }

    .activity-bio p {
        font-size: 0.94rem;
        line-height: 1.65;
    }

}

/* =========================================================
   NAV · SUMATE A ECAP
   ========================================================= */

@media (min-width: 768px) {

    .desktop-nav .nav-join {
        display: inline-flex;
        align-items: center;
        gap: 10px;

        padding: 12px 17px;

        background: var(--blue);
        color: #fff;

        border-radius: 8px;

        transition:
            background-color 180ms ease,
            transform 180ms ease;
    }

    .desktop-nav .nav-join::after {
        display: none;
    }

    .desktop-nav .nav-join span {
        transition: transform 180ms ease;
    }

    .desktop-nav .nav-join:hover {
        background: var(--blue-dark);
        transform: translateY(-1px);
    }

    .desktop-nav .nav-join:hover span {
        transform: translateX(3px);
    }
}


/* MOBILE */

.mobile-nav .nav-join-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;

    font-weight: 600;
}

.mobile-nav .nav-join-mobile span {
    font-size: 1.1rem;
    transition: transform 180ms ease;
}

.mobile-nav .nav-join-mobile:hover span {
    transform: translateX(3px);
}

/* Detalle: contenido centrado y perfil docente en una misma columna editorial. */
.activity-detail .activity-intro > .container,
.activity-detail .detail-description > .container,
.activity-detail .activity-bios > .container {
    width: min(960px, calc(100% - 48px));
    max-width: 960px;
    margin-inline: auto;
}
.activity-detail .detail-description { padding: 48px 0 56px; }
.activity-detail .detail-content-grid { display: grid; gap: 24px; }
.activity-detail .detail-description h2,
.activity-detail .activity-bios-title {
    margin: 0;
    font-size: clamp(1.55rem, 2vw, 1.9rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.035em;
}
.activity-detail .detail-body { max-width: 76ch; color: var(--muted); }
.activity-detail .activity-bios { padding: 0 0 88px; }
.activity-detail .activity-bios > .container { padding-top: 40px; }
.activity-detail .activity-bios-title { margin-bottom: 32px; }
.activity-detail .activity-bio {
    max-width: none;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}
.activity-detail .activity-bio--text-only { display: block; max-width: 76ch; }
.activity-detail .activity-bio-copy { grid-column: 2; grid-row: 1; min-width: 0; }
.activity-detail .activity-bio-photo {
    width: 240px;
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #f5f6f8;
    overflow: hidden;
    grid-column: 1;
    grid-row: 1;
}
.activity-detail .activity-bio-photo img { object-fit: cover; object-position: center 20%; }
.activity-detail .activity-bio p,
.activity-detail .detail-body p {
    max-width: none;
    margin: 0;
    font-size: 1rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
}
.activity-detail .activity-bio p + p,
.activity-detail .detail-body p + p { margin-top: 1em; }
.activity-detail .activity-bio-name { margin: 0 0 16px; }
@media (max-width: 700px) {
    .activity-detail .detail-description > .container,
    .activity-detail .activity-bios > .container { width: calc(100% - 40px); }
    .activity-detail .detail-description { padding: 32px 0 36px; }
    .activity-detail .activity-bios { padding-bottom: 56px; }
    .activity-detail .activity-bios > .container { padding-top: 32px; }
    .activity-detail .activity-bio--with-photo { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .activity-detail .activity-bio-copy { grid-column: 1; grid-row: 2; }
    .activity-detail .activity-bio-photo { width: 180px; }
}

/* Cabecera del detalle: escala legible y alineación con el contenido. */
.activity-detail .activity-intro { padding: 56px 0 0; }
.activity-detail .activity-title {
    max-width: 960px;
    font-size: clamp(2rem, 4.2vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}
@media (max-width: 700px) {
    .activity-detail .activity-intro > .container { width: calc(100% - 40px); }
    .activity-detail .activity-intro { padding-top: 36px; }
}

/* Próximas actividades: fecha en el espacio inferior derecho de la placa. */
.activity-item:not(.activity-item-past) .activity-image {
    container-type: inline-size;
}
.activity-item:not(.activity-item-past) .activity-date-overlay {
    left: auto;
    right: 6%;
    bottom: 10%;
}
.activity-item:not(.activity-item-past) .activity-date-overlay .fallback-day {
    font-size: clamp(2.5rem, 18cqw, 9rem);
}
.activity-item:not(.activity-item-past) .activity-date-overlay .fallback-month {
    font-size: clamp(0.65rem, 3cqw, 1.2rem);
    margin-left: 0.55em;
    margin-bottom: 0;
}
