:root {
    --brand-yellow: #ffcc00;
    --brand-yellow-dark: #e6b800;
    --brand-black: #161616;
    --brand-black-soft: #1f1f1f;
    --brand-white: #ffffff;
    --text-color: #212121;
    --text-muted: #6b6b6b;
    --border-color: #e5e5e5;
    --radius: 8px;
    --max-width: 1160px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--brand-black);
    background-image: url('/img/bg-map.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.01em;
}

img {
    max-width: 100%;
}

/* ---------- Header ---------- */

.site-header {
    background-color: var(--brand-black);
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0px, rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 14px);
    color: var(--brand-white);
    border-bottom: 3px solid var(--brand-yellow);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.site-logo {
    display: flex;
    align-items: center;
    white-space: nowrap;
    color: var(--brand-white);
    font-weight: 800;
    font-size: 1.2rem;
}

.site-logo img {
    height: 44px;
    width: auto;
    display: block;
}

.site-phone {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-left: 1.25rem;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--brand-yellow);
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: 2px solid var(--brand-yellow);
    border-radius: 6px;
    color: var(--brand-yellow);
    padding: 0.4rem;
    cursor: pointer;
}

.site-header__inner nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.site-header__inner nav a {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.site-header__inner nav a:hover {
    color: var(--brand-yellow);
    border-color: var(--brand-yellow);
}

.site-header__inner nav a.nav-cta {
    background: var(--brand-yellow);
    color: var(--brand-black);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border-bottom: none;
}

.site-header__inner nav a.nav-cta:hover {
    background: var(--brand-yellow-dark);
    color: var(--brand-black);
}

/* ---------- Nav dropdown ---------- */

.nav-dropdown {
    position: relative;
}

.nav-dropdown__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-dropdown__toggle:hover,
.nav-dropdown.is-open .nav-dropdown__toggle {
    color: var(--brand-yellow);
    border-color: var(--brand-yellow);
}

.nav-dropdown__toggle svg {
    transition: transform 0.15s ease;
}

.nav-dropdown.is-open .nav-dropdown__toggle svg {
    transform: rotate(180deg);
}

.nav-dropdown__menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    padding: 0.4rem;
    border-radius: var(--radius);
    background: var(--brand-black-soft);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-md);
    z-index: 60;
}

.nav-dropdown.is-open .nav-dropdown__menu {
    display: block;
}

.site-header__inner nav .nav-dropdown__menu a {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    border-bottom: none;
    white-space: nowrap;
}

.site-header__inner nav .nav-dropdown__menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--brand-yellow);
}

/*
 * 920px, not 700px. Measured: logo + phone (307) + the five nav items (509)
 * + padding and gaps (64) = 880px to fit on one line, with the CTA visible
 * (the widest case — it is hidden on the home page only). The old 700px
 * breakpoint left a 701–879px band where the desktop nav was still switched
 * on but no longer fit, so "Подати заявку" wrapped onto a second row. The
 * headroom above 880 covers a longer phone number set in the admin.
 */
@media (max-width: 920px) {
    .nav-toggle {
        display: inline-flex;
    }
    .site-phone {
        padding-left: 0.25rem;
    }

    .site-header__inner #site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding-top: 0.75rem;
        margin-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .site-header__inner #site-nav.is-open {
        display: flex;
    }

    .site-header__inner {
        flex-wrap: wrap;
    }

    .site-header__inner #site-nav a {
        width: 100%;
        padding: 0.6rem 0;
    }

    .site-header__inner #site-nav a.nav-cta {
        width: 100%;
        margin-top: 0.5rem;
        text-align: center;
    }

    /* In the burger menu the dropdown expands inline instead of floating —
       a popup positioned over a column of links is unusable on a phone. */
    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown__toggle {
        width: 100%;
        justify-content: space-between;
        padding: 0.6rem 0;
    }

    .nav-dropdown__menu {
        position: static;
        transform: none;
        min-width: 0;
        margin: 0 0 0.25rem;
        padding: 0.25rem 0 0.25rem 0.75rem;
        background: none;
        border: none;
        border-left: 2px solid var(--brand-yellow);
        border-radius: 0;
        box-shadow: none;
    }
}

main {
    flex: 1 0 auto;
}

/* ---------- Footer ---------- */

.site-footer {
    flex-shrink: 0;
    background-color: var(--brand-black);
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0px, rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 14px);
    color: rgba(255, 255, 255, 0.75);
    margin-top: 4rem;
    border-top: 3px solid var(--brand-yellow);
}

.site-footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand-yellow);
    color: var(--brand-black);
    transition: background 0.15s ease, transform 0.15s ease;
}

.footer-social a:hover {
    background: var(--brand-white);
    transform: translateY(-2px);
}

/* ---------- Layout helpers ---------- */

.container {
    max-width: var(--max-width);
    width: calc(100% - 3rem);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 2.5rem 1.5rem;
    margin: 2.5rem auto;
    background: var(--brand-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.section.auth-panel {
    max-width: 480px;
}

.section > *:first-child {
    margin-top: 0;
}

.section *:last-child {
    margin-bottom: 0;
}

.section h1 {
    font-size: 2rem;
    margin-bottom: 1.25rem;
}

.section > h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 0.5rem;
    border-left: 5px solid var(--brand-yellow);
    padding-left: 0.75rem;
}

/* ---------- Hero ---------- */

.hero {
    background: linear-gradient(135deg, var(--brand-black) 0%, var(--brand-black-soft) 100%);
    color: var(--brand-white);
    padding: 5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(135deg, rgba(255, 204, 0, 0.06) 0px, rgba(255, 204, 0, 0.06) 2px, transparent 2px, transparent 34px),
        radial-gradient(circle at 50% 0%, rgba(255, 204, 0, 0.12), transparent 60%);
}

.hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 3px;
    background: var(--brand-yellow);
}

.hero > .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--brand-white);
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    margin: 0 0 0.75rem;
}

.hero h1 span {
    color: var(--brand-yellow);
}

.hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 auto 1.75rem;
    max-width: 560px;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    padding: 0.8rem 1.75rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
    background: var(--brand-yellow);
    color: var(--brand-black);
}

.btn-primary:hover {
    background: var(--brand-yellow-dark);
    box-shadow: var(--shadow-sm);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* ---------- Cards ---------- */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    display: block;
    background: var(--brand-white);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

a.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    /* Crop from the bottom, not both edges — matters most for vertical
       photos (gallery covers) squeezed into this short, wide box. */
    object-position: center top;
    display: block;
    background: #f2f2f2;
}

.card--portrait img {
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    /* Crop from the bottom, not the top — keeps the head in frame even when
       the photo's own proportions don't match the card. */
    object-position: center top;
}

.card-body {
    padding: 1.1rem;
}

.card-body h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.card-body p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.card-date {
    margin: 0 0 0.35rem !important;
    color: var(--text-muted);
    font-size: 0.8rem !important;
    font-weight: 600;
}

/* ---------- News slider ---------- */

.news-slider {
    position: relative;
    margin-top: 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.news-slider__track {
    display: flex;
    transition: transform 0.5s ease;
    /* Let JS claim horizontal drags for swipe navigation, but still let the
       page scroll vertically through the slider without a fight. */
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
}

.news-slider__track:active {
    cursor: grabbing;
}

.news-slider__slide {
    position: relative;
    flex: 0 0 100%;
    display: block;
    aspect-ratio: 16 / 9;
    background: #111;
}

.news-slider__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Crop from the bottom, not both edges — a vertical photo squeezed into
       this wide box would otherwise lose the top of the frame, usually
       exactly where a person's head is. */
    object-position: center top;
    display: block;
}

.news-slider__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    /* Extra bottom padding keeps the excerpt clear of the dots row. */
    padding: 1.25rem 1.5rem 2.5rem;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent);
    color: var(--brand-white);
}

.news-slider__caption h3 {
    margin: 0.2rem 0 0;
    font-size: 1.15rem;
}

.news-slider__excerpt {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-slider__date {
    color: var(--brand-yellow);
    font-size: 0.8rem;
    font-weight: 700;
}

.news-slider__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.75rem;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

.news-slider__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
}

.news-slider__dot.is-active {
    background: var(--brand-yellow);
}

/* ---------- Prose / content ---------- */

.prose {
    line-height: 1.75;
    font-size: 1.02rem;
}

.prose img {
    border-radius: var(--radius);
    margin: 1rem 0;
}

.prose figure {
    margin: 1rem 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
}

.prose table td,
.prose table th {
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
}

.prose table th {
    background: #f7f7f7;
    text-align: left;
}

/* Video embeds inserted by the editor's YouTube button. The wrapper keeps the
   iframe responsive; Shorts get a portrait ratio and a capped width. */
.video-embed {
    position: relative;
    width: 100%;
    margin: 1.5rem 0;
    padding-top: 56.25%;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--brand-black);
}

.video-embed--vertical {
    padding-top: 0;
    aspect-ratio: 9 / 16;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- Pagination ---------- */

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin: 2.5rem 0 0;
    padding: 0;
    list-style: none;
}

.pagination__link,
.pagination__current,
.pagination__gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--brand-white);
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pagination__link:hover {
    border-color: var(--brand-yellow);
    background: var(--brand-yellow);
}

.pagination__current {
    background: var(--brand-black);
    border-color: var(--brand-black);
    color: var(--brand-white);
    cursor: default;
}

.pagination__gap {
    border-color: transparent;
    background: transparent;
    color: var(--text-muted);
    cursor: default;
}

.pagination__link--disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pagination__summary {
    margin-top: 0.75rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---------- Trainer profile ---------- */

.trainer-profile {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-top: 1.5rem;
}

.trainer-profile img {
    max-width: 240px;
    max-height: 300px;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.trainer-profile > div {
    flex: 1;
    min-width: 260px;
}

.trainer-position {
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0;
}

/* ---------- Forms ---------- */

.plain-form {
    max-width: 640px;
    margin-top: 1.5rem;
}

.plain-form.plain-form--wide {
    max-width: 100%;
}

.plain-form .form-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.plain-form .form-columns fieldset {
    flex: 1;
    min-width: 280px;
}

.plain-form fieldset {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 0 0 1.5rem;
}

.plain-form legend {
    font-weight: 700;
    padding: 0 0.5rem;
}

.plain-form label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.plain-form .form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.plain-form .form-row label {
    flex: 1;
    min-width: 200px;
}

.plain-form input,
.plain-form select,
.plain-form textarea {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.plain-form input:focus,
.plain-form select:focus,
.plain-form textarea:focus {
    outline: none;
    border-color: var(--brand-yellow-dark);
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.25);
}

.plain-form .btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
}

.plain-form .checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 400;
}

.plain-form .checkbox-field input[type="checkbox"] {
    display: inline-block;
    width: auto;
    margin-top: 0.2rem;
}

/* ---------- Alerts ---------- */

.alert {
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    margin: 1rem 0;
}

.alert-success {
    background: #e6f7e6;
    color: #206020;
    border: 1px solid #b6e0b6;
}

.alert-error {
    background: #fdeaea;
    color: #a02020;
    border: 1px solid #f0b6b6;
}

.alert-error ul {
    margin: 0;
    padding-left: 1.25rem;
}

/* ---------- Document links in page content ---------- */

.prose .file-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-yellow);
    border-radius: var(--radius);
    background: #fafafa;
    font-weight: 600;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.prose .file-link::before {
    content: '📄';
    font-size: 1.1rem;
}

.prose .file-link:hover {
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.prose .file-link__size {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 0.35rem;
}

/* ---------- Training schedule ---------- */

.schedule__location {
    margin: 1.75rem 0 0.5rem;
    font-size: 1.1rem;
    text-align: center;
}

.schedule {
    /* Seven weekday columns never fit a phone — scroll the table itself
       rather than letting it stretch the page sideways. */
    overflow-x: auto;
    margin-bottom: 1rem;
}

.schedule table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.schedule th,
.schedule td {
    border: 1px solid var(--border-color);
    padding: 0.55rem 0.7rem;
    text-align: center;
    white-space: nowrap;
    font-size: 0.95rem;
}

.schedule thead th {
    background: var(--brand-black);
    color: var(--brand-white);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.schedule__group {
    font-weight: 800;
    color: var(--brand-black);
    background: #fafafa;
}

.schedule__birth-year {
    display: block;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.schedule__trainer {
    font-weight: 600;
}

.schedule__trainer a {
    color: var(--brand-black);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--brand-yellow);
    text-decoration-thickness: 2px;
}

.schedule__trainer a:hover {
    color: var(--brand-yellow-dark);
}

.schedule__time {
    font-variant-numeric: tabular-nums;
}

/* An empty weekday cell should read as "no session", not as missing data. */
.schedule__time:empty::after {
    content: '—';
    color: #ccc;
}

.schedule tbody tr:nth-child(even) td {
    background: #fcfcfc;
}

.schedule tbody tr:nth-child(even) .schedule__group {
    background: #f5f5f5;
}

/* ---------- Enrollment success schedule ---------- */

.success-schedule {
    margin: 1rem 0 1.5rem;
    overflow-x: auto;
}

.success-schedule table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

.success-schedule th,
.success-schedule td {
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    text-align: left;
    white-space: nowrap;
}

.success-schedule th {
    background: #f7f7f7;
}

/* ---------- Student card ---------- */

.student-card {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.student-card img {
    max-width: 160px;
    max-height: 200px;
    border-radius: var(--radius);
}

.student-card__number {
    color: var(--text-muted);
    font-weight: 600;
}

.ui-plain-table {
    border-collapse: collapse;
    margin-top: 1rem;
    width: 100%;
}

.ui-plain-table td {
    padding: 0.45rem 1rem 0.45rem 0;
    border-bottom: 1px solid #eee;
}

.ui-plain-table td:first-child {
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}

/* ---------- Gallery masonry ---------- */

.photo-masonry {
    column-count: 3;
    column-gap: 1rem;
    margin: 1.5rem 0;
}

.photo-masonry__item {
    display: block;
    break-inside: avoid;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: zoom-in;
}

.photo-masonry__item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.2s ease;
}

.photo-masonry__item:hover img {
    transform: scale(1.03);
}

/* ---------- Lightbox ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem 1.5rem;
    background: rgba(10, 10, 10, 0.92);
    touch-action: pan-y;
}

.lightbox[hidden] {
    display: none;
}

.lightbox__image {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    -webkit-user-select: none;
    user-select: none;
}

.lightbox__caption {
    color: var(--brand-white);
    text-align: center;
    max-width: 640px;
    margin: 0;
}

.lightbox__counter {
    position: absolute;
    top: 1rem;
    left: 1.25rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--brand-white);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
    background: rgba(255, 255, 255, 0.28);
}

.lightbox__close {
    top: 1rem;
    right: 1.25rem;
}

.lightbox__prev,
.lightbox__next {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__prev {
    left: 1rem;
}

.lightbox__next {
    right: 1rem;
}

@media (max-width: 700px) {
    .photo-masonry {
        column-count: 2;
    }

    .lightbox {
        padding: 3.5rem 0.75rem;
    }

    .lightbox__prev {
        left: 0.4rem;
    }

    .lightbox__next {
        right: 0.4rem;
    }
}

@media (max-width: 420px) {
    .photo-masonry {
        column-count: 1;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
    .section {
        padding: 2rem 1.25rem;
    }

    .hero {
        padding: 3.5rem 1.25rem;
    }

    .student-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .trainer-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .ui-plain-table {
        font-size: 0.9rem;
    }
}
