/* ===================================================================
   Jamiathul Faththah Arabic College — Global Stylesheet
   =================================================================== */

:root {
    --navy: #0f2050;
    --navy-deep: #0a1638;
    --navy-light: #16306e;
    --gold: #c9992f;
    --gold-light: #e0b84e;
    --cream: #f6f1e8;
    --ink: #1c2230;
    --ink-soft: #5b6272;
    --border-soft: #e6e2d8;
    font-family: 'Georgia', 'Times New Roman', serif;
    --admin-appbar-height: 64px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: #fff;
}

h1, h2, h3, .brand-title {
    font-family: 'Georgia', 'Times New Roman', serif;
}

a {
    text-decoration: none;
}

.content {
    padding-top: 0;
}

/* ---------- Page shell ---------- */
.page-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-content {
    flex: 1;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header / Nav ---------- */
.site-header {
    background: var(--navy);
    border-bottom: 1px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    padding: 4px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
}

.brand-subtitle {
    color: var(--gold-light);
    font-size: 0.7rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

    .main-nav a {
        color: #dfe3ee;
        font-size: .92rem;
        font-weight: 600;
        padding: 8px 14px;
        border-radius: 6px;
    }

        .main-nav a:hover {
            color: #fff;
            background: rgba(255,255,255,.08);
        }

        .main-nav a.active {
            color: var(--gold-light);
        }

.nav-cta {
    background: var(--gold);
    color: var(--navy-deep) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

    .nav-toggle span {
        width: 24px;
        height: 2px;
        background: #fff;
        display: block;
    }

@media (max-width: 860px) {
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--navy);
        flex-direction: column;
        align-items: stretch;
        padding: 8px 16px 16px;
        border-bottom: 1px solid var(--gold);
    }

        .main-nav.open {
            display: flex;
        }

        .main-nav a {
            padding: 12px 8px;
        }
}

/* ---------- Hero ---------- */
.hero {
    background: var(--navy);
    color: #fff;
    padding: 56px 24px 0;
}

.hero-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px;
    align-items: center;
    padding-bottom: 48px;
}

.hero-eyebrow {
    color: var(--gold-light);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .82rem;
}

.hero h1 {
    font-size: 2.6rem;
    margin: 12px 0 10px;
    line-height: 1.15;
    color: #fff;
}

.hero-arabic {
    color: var(--gold-light);
    font-size: 1.3rem;
    margin: 0 0 16px;
}

.hero .lede {
    color: #cdd4e6;
    font-size: 1.02rem;
    line-height: 1.6;
    max-width: 46ch;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.stat-row {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 24px;
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 32px;
}

    .stat-row .stat {
        text-align: center;
    }

    .stat-row .num {
        display: block;
        font-size: 1.9rem;
        font-weight: 700;
        color: var(--gold-light);
        font-family: 'Georgia', serif;
    }

    .stat-row .label {
        display: block;
        font-size: .78rem;
        letter-spacing: .05em;
        text-transform: uppercase;
        color: #b9c1d9;
        margin-top: 4px;
    }

@media (max-width: 760px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero .lede {
        max-width: none;
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 4px;
    font-weight: 700;
    font-size: .92rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .15s ease;
}

.btn-primary {
    background: var(--gold);
    color: var(--navy-deep);
}

    .btn-primary:hover {
        background: var(--gold-light);
    }

.btn-outline {
    background: transparent;
    border-color: #fff;
    color: #fff;
}

    .btn-outline:hover {
        background: rgba(255,255,255,.1);
    }

.btn-dark {
    background: var(--navy);
    color: #fff;
}

    .btn-dark:hover {
        background: var(--navy-light);
    }

/* ---------- Sections ---------- */
.section {
    padding: 64px 0;
}

.section-alt {
    background: var(--cream);
}

.section-header {
    max-width: 640px;
    margin: 0 auto 40px;
}

    .section-header.center {
        text-align: center;
    }

.eyebrow {
    color: var(--gold);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .78rem;
}

.section-header h2, .section-header h1 {
    color: var(--navy);
    margin: 10px 0 12px;
}

.section-header p {
    color: var(--ink-soft);
    line-height: 1.6;
}

.star-divider {
    text-align: center;
    color: var(--gold);
    margin: 8px 0 40px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
}

.card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 26px;
    box-shadow: 0 1px 3px rgba(15,32,80,.06);
}

    .card h3 {
        color: var(--navy);
        font-size: 1.05rem;
        margin: 0 0 10px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .card p {
        color: var(--ink-soft);
        font-size: .92rem;
        line-height: 1.55;
        margin: 0;
    }

.bank-card {
    background: var(--navy);
    color: #fff;
    border-radius: 10px;
    padding: 28px 32px;
    margin-bottom: 8px;
}

    .bank-card dl {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 6px 18px;
        margin: 14px 0 0;
    }

    .bank-card dt {
        color: #9fb0d6;
        font-size: .82rem;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .bank-card dd {
        margin: 0;
        font-weight: 600;
    }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--navy-deep);
    color: #cdd4e6;
    padding: 40px 24px 20px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    padding: 4px;
}

.footer-name {
    margin: 0;
    color: #fff;
    font-weight: 700;
}

.footer-place {
    margin: 2px 0 0;
    font-size: .85rem;
    color: #9fb0d6;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

    .footer-links a {
        color: #cdd4e6;
        font-size: .88rem;
    }

        .footer-links a:hover {
            color: var(--gold-light);
        }

.footer-copy {
    max-width: 1140px;
    margin: 18px auto 0;
    text-align: center;
    font-size: .78rem;
    color: #7f8bab;
}

/* ---------- Admin panel ---------- */
.admin-appbar {
    background: var(--navy) !important;
    height: var(--admin-appbar-height);
    min-height: var(--admin-appbar-height);
}

    .admin-appbar .mud-toolbar {
        height: 100%;
        min-height: var(--admin-appbar-height) !important;
        display: flex;
        align-items: center;
    }

.admin-main-content {
    background: #f8f7f4;
    min-height: 100vh;
    padding-top: var(--admin-appbar-height);
}

.receipt-preview {
    border: 1px dashed var(--border-soft);
    border-radius: 8px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: .86rem;
    background: #fff;
}

    .receipt-preview table {
        width: 100%;
        border-collapse: collapse;
        margin: 8px 0;
    }

    .receipt-preview td {
        padding: 2px 0;
    }

    .receipt-preview hr {
        border: none;
        border-top: 1px dashed #ccc;
        margin: 8px 0;
    }

/* ---------- Misc / template leftovers ---------- */
h1:focus {
    outline: none;
}

.btn-link {
    color: var(--navy);
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: .6rem 1.25rem .7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: .75rem;
        top: .5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1.5rem;
    color: #fff;
    border-radius: 6px;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: .6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--gold);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * .8), 500%;
            transition: stroke-dasharray .05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto .2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

@media print {
    .site-header, .site-footer, .mud-appbar, .no-print {
        display: none !important;
    }
}

.star-icon {
    width: 30px;
    height: 30px;
}

/* ===================================================================
   Admission Application Form
   =================================================================== */

/* ---- Mini hero ---- */
.admission-hero {
    background: var(--navy);
    color: #fff;
    padding: 48px 24px;
    position: relative;
    overflow: hidden;
}

    .admission-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 85% 20%, rgba(201,153,47,.18), transparent 55%);
        pointer-events: none;
    }

.admission-hero-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.admission-hero .eyebrow {
    color: var(--gold-light);
}

.admission-hero h1 {
    color: #fff;
    margin: 10px 0 14px;
    font-size: 2.1rem;
    line-height: 1.2;
}

.admission-hero p {
    color: #cdd4e6;
    line-height: 1.6;
    max-width: 56ch;
    margin: 0 auto;
}

.admission-hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 26px;
}

/* ---- Two column layout ---- */
.admission-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 36px;
    align-items: start;
    padding: 56px 0;
}

@media (max-width: 940px) {
    .admission-layout {
        grid-template-columns: 1fr;
        padding: 40px 0;
    }

    .admission-sidebar {
        order: -1;
    }
}

/* ---- Sidebar ---- */
.admission-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 84px;
}

@media (max-width: 940px) {
    .admission-sidebar {
        position: static;
    }
}

.admission-info-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(15,32,80,.06);
}

    .admission-info-card h3 {
        display: flex;
        align-items: center;
        gap: 10px;
        color: var(--navy);
        font-size: 1rem;
        margin: 0 0 14px;
    }

.admission-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--cream);
    color: var(--gold);
    flex-shrink: 0;
    font-size: 1rem;
}

.admission-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .admission-checklist li {
        position: relative;
        padding-left: 24px;
        margin-bottom: 10px;
        font-size: .87rem;
        color: var(--ink-soft);
        line-height: 1.5;
    }

        .admission-checklist li:last-child {
            margin-bottom: 0;
        }

        .admission-checklist li::before {
            content: "✓";
            position: absolute;
            left: 0;
            top: 0;
            color: var(--gold);
            font-weight: 700;
        }

.admission-info-card .admission-hint {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
}

.admission-download-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: .88rem;
    color: var(--navy);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 13px 16px;
    background: var(--cream);
    text-align: center;
}

    .admission-download-link:hover {
        background: #efe9da;
    }

/* ---- Main form card ---- */
.admission-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 38px;
    box-shadow: 0 1px 3px rgba(15,32,80,.06);
}

@media (max-width: 640px) {
    .admission-card {
        padding: 22px;
    }
}

.admission-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--navy);
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.12rem;
    margin: 38px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
}

    .admission-section-title:first-child {
        margin-top: 0;
    }

.admission-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--navy);
    color: var(--gold-light);
    font-family: 'Georgia', serif;
    font-size: .92rem;
    font-weight: 700;
}

.admission-form-row {
    margin-bottom: 20px;
}

    .admission-form-row .form-label {
        font-weight: 600;
        color: var(--ink);
        font-size: .88rem;
        margin-bottom: 6px;
    }

.admission-hint {
    font-size: .8rem;
    color: var(--ink-soft);
    margin-top: 5px;
}

.required-asterisk {
    color: #b3261e;
    margin-right: 3px;
}

.form-control, .form-select {
    border: 1px solid var(--border-soft);
    padding: 10px 13px;
    font-size: .93rem;
}

    .form-control:focus, .form-select:focus {
        border-color: var(--gold);
        box-shadow: 0 0 0 3px rgba(201,153,47,.18);
    }

/* ---- Pill-style radio buttons ---- */
.pill-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.pill-radio {
    position: relative;
    cursor: pointer;
}

.pill-radio-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.pill-radio-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 24px;
    border: 1.5px solid var(--border-soft);
    background: #fff;
    font-size: .87rem;
    font-weight: 600;
    color: var(--ink-soft);
    transition: all .15s ease;
}

    .pill-radio-label::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 50%;
        border: 1.5px solid var(--border-soft);
        flex-shrink: 0;
        transition: all .15s ease;
    }

.pill-radio-input:checked + .pill-radio-label {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

    .pill-radio-input:checked + .pill-radio-label::before {
        background: var(--gold-light);
        border-color: var(--gold-light);
    }

.pill-radio-input:focus-visible + .pill-radio-label {
    box-shadow: 0 0 0 3px rgba(201,153,47,.35);
}

/* ---- Toggle / highlight blocks ---- */
.admission-toggle-block {
    background: var(--cream);
    border: 1px dashed var(--border-soft);
    border-radius: 10px;
    padding: 20px 22px;
    margin: 8px 0 22px;
}

.admission-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

    .admission-check input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin-top: 2px;
        flex-shrink: 0;
        accent-color: var(--navy);
    }

    .admission-check label {
        font-size: .92rem;
        color: var(--ink);
        line-height: 1.5;
    }

.admission-declaration {
    background: var(--cream);
    border-left: 3px solid var(--gold);
    border-radius: 6px;
    padding: 18px 22px;
    font-size: .92rem;
    color: var(--ink);
    line-height: 1.65;
    margin-bottom: 18px;
}

.admission-submit-bar {
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid var(--border-soft);
}

.btn-outline-navy {
    display: inline-block;
    background: transparent;
    border: 1.5px solid var(--navy);
    color: var(--navy);
    padding: 12px 26px;
    border-radius: 4px;
    font-weight: 700;
    font-size: .92rem;
    cursor: pointer;
    transition: all .15s ease;
}

    .btn-outline-navy:hover {
        background: var(--navy);
        color: #fff;
    }

.btn-text {
    display: inline-block;
    background: none;
    border: none;
    color: var(--navy);
    font-weight: 700;
    font-size: .88rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 10px 4px;
}

    .btn-text:hover {
        color: var(--gold);
    }

/* ---- Success state ---- */
.admission-success {
    text-align: center;
    padding: 24px 8px 8px;
}

.admission-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--cream);
    color: var(--gold);
    font-size: 1.8rem;
    margin-bottom: 18px;
}

.admission-success h3 {
    color: var(--navy);
    margin: 0 0 10px;
}

.admission-success p {
    color: var(--ink-soft);
    line-height: 1.6;
    max-width: 46ch;
    margin: 0 auto;
}

.admission-success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 22px;
}

/* ===================================================================
   Gallery
   =================================================================== */

.section-header.center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Filters ---- */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: -8px 0 36px;
}

.gallery-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 24px;
    border: 1.5px solid var(--border-soft);
    background: #fff;
    color: var(--ink-soft);
    font-size: .87rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}

    .gallery-filter-btn:hover {
        border-color: var(--gold);
        color: var(--navy);
    }

    .gallery-filter-btn.active {
        background: var(--navy);
        border-color: var(--navy);
        color: #fff;
    }

.gallery-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: rgba(15,32,80,.08);
    color: var(--navy);
    font-size: .74rem;
    font-weight: 700;
}

.gallery-filter-btn.active .gallery-filter-count {
    background: rgba(255,255,255,.18);
    color: #fff;
}

/* ---- Grid ---- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.gallery-tile {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: var(--cream);
    box-shadow: 0 1px 3px rgba(15,32,80,.08);
}

    .gallery-tile img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .35s ease;
    }

    .gallery-tile:hover img, .gallery-tile:focus-visible img {
        transform: scale(1.06);
    }

.gallery-tile-overlay {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 28px 14px 12px;
    background: linear-gradient(to top, rgba(10,22,56,.88), rgba(10,22,56,0));
    opacity: 0;
    transition: opacity .2s ease;
}

.gallery-tile:hover .gallery-tile-overlay,
.gallery-tile:focus-visible .gallery-tile-overlay {
    opacity: 1;
}

.gallery-tile-caption {
    color: #fff;
    font-size: .87rem;
    font-weight: 600;
    text-align: left;
}

.gallery-tile-zoom {
    color: var(--gold-light);
    font-size: 1rem;
    flex-shrink: 0;
}

.gallery-tile:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ---- Lightbox ---- */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(10,16,36,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: gallery-fade-in .18s ease;
}

@keyframes gallery-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.gallery-lightbox-content {
    max-width: min(920px, 92vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: gallery-scale-in .2s ease;
}

@keyframes gallery-scale-in {
    from {
        transform: scale(.96);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.gallery-lightbox-content img {
    max-width: 100%;
    max-height: 74vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.gallery-lightbox-caption {
    text-align: center;
    color: #fff;
}

    .gallery-lightbox-caption strong {
        display: block;
        font-size: 1.05rem;
        margin-bottom: 4px;
    }

    .gallery-lightbox-caption span {
        color: #b9c1d9;
        font-size: .82rem;
        letter-spacing: .03em;
        text-transform: uppercase;
    }

.gallery-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}

    .gallery-lightbox-close:hover {
        background: rgba(255,255,255,.2);
    }

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}

    .gallery-lightbox-nav:hover {
        background: rgba(255,255,255,.2);
    }

.gallery-lightbox-prev {
    left: 20px;
}

.gallery-lightbox-next {
    right: 20px;
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .gallery-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .gallery-lightbox-prev {
        left: 8px;
    }

    .gallery-lightbox-next {
        right: 8px;
    }

    .gallery-lightbox-close {
        top: 10px;
        right: 10px;
    }
}
