:root {
    --bg: #f7f4ef;
    --surface: #ffffff;
    --surface-soft: #f0eee8;
    --ink: #1a1a1a;
    --muted: #65615b;
    --line: #ded8cf;
    --accent: #c92f2f;
    --accent-dark: #9f2424;
    --shadow: 0 18px 45px rgba(26, 26, 26, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
}

body.is-lightbox-open {
    overflow: hidden;
}

a {
    color: inherit;
}

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

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.narrow {
    max-width: 820px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: var(--surface);
    border-radius: 6px;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 650;
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 6px;
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
}

.hero {
    min-height: 670px;
    display: grid;
    align-items: center;
    background:
        linear-gradient(105deg, rgba(26, 26, 26, 0.9), rgba(26, 26, 26, 0.64)),
        url("/assets/images/og-default-image.jpg") center / cover;
    color: var(--surface);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 48px;
    align-items: end;
    padding: 86px 0;
}

.hero-copy {
    max-width: 740px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #ffb0a8;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    margin-top: 0;
    line-height: 1.12;
}

h1 {
    margin-bottom: 20px;
    font-size: clamp(2.7rem, 5vw, 5.7rem);
    letter-spacing: 0;
}

h2 {
    margin-bottom: 18px;
    font-size: 2.35rem;
}

.lead {
    max-width: 680px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.2rem;
}

.hero-actions,
.footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-dark);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.34);
}

.event-panel {
    background: rgba(255, 255, 255, 0.95);
    color: var(--ink);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.event-panel div {
    padding: 22px;
    border-bottom: 1px solid var(--line);
}

.event-panel div:last-child {
    border-bottom: 0;
}

.event-panel span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.event-panel strong {
    display: block;
    margin-top: 4px;
    font-size: 1.05rem;
}

.section {
    padding: 96px 0;
}

.ad-band {
    padding: 24px 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.ad-slot {
    display: grid;
    place-items: center;
    min-height: 96px;
    border: 1px dashed #bdb5aa;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.muted {
    background: var(--surface-soft);
}

.section-heading {
    max-width: 720px;
    margin-bottom: 34px;
}

.feature-list,
.value-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.feature-list span {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    padding: 10px 12px;
    color: var(--muted);
    font-weight: 700;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.value-grid article,
.support-card,
.contact-person {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
}

.value-grid strong {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
}

.value-grid span {
    color: var(--muted);
}

.program-grid,
.partner-grid,
.event-grid,
.club-grid,
.location-switcher,
.admin-sections,
.admin-lists-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.program-card,
.partner-card,
.event-card,
.club-card,
.admin-panel,
.form-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.program-card {
    padding: 24px;
}

.event-grid,
.club-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.event-card,
.club-card {
    padding: 24px;
}

.event-date {
    margin: 0 0 10px;
    color: var(--accent);
    font-weight: 900;
}

.status-pill {
    display: inline-flex;
    margin-top: 10px;
    border: 1px solid rgba(201, 47, 47, 0.24);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 900;
}

.meta-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.meta-links a {
    color: var(--accent);
    font-weight: 800;
}

.location-switcher {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.location-switcher a {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 18px;
    text-decoration: none;
}

.location-switcher a.is-active {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 2px rgba(201, 47, 47, 0.18);
}

.location-switcher span {
    color: var(--muted);
}

.program-card span {
    color: var(--accent);
    font-weight: 900;
}

.program-card h3 {
    margin: 16px 0 10px;
    font-size: 1.18rem;
}

.program-card p,
.partner-card p,
.event-card p,
.club-card p,
.contact-grid p,
.empty-state {
    color: var(--muted);
}

.partner-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.partner-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(310px, 380px);
    gap: 18px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 4px 4px 18px;
    scroll-snap-type: inline mandatory;
    scrollbar-color: var(--accent) var(--surface-soft);
}

.partner-scroll::-webkit-scrollbar {
    height: 10px;
}

.partner-scroll::-webkit-scrollbar-track {
    background: var(--surface-soft);
    border-radius: 999px;
}

.partner-scroll::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 999px;
}

.partner-card {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 18px;
    padding: 20px;
    min-height: 170px;
    scroll-snap-align: start;
}

.partner-card img,
.partner-placeholder {
    width: 84px;
    height: 84px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.partner-placeholder {
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 2rem;
    font-weight: 900;
}

.partner-card h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.partner-card a {
    color: var(--accent);
    font-weight: 800;
}

.partner-role {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.support-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
    gap: 36px;
    align-items: start;
}

.map-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.55fr) minmax(340px, 1fr);
    gap: 32px;
    align-items: start;
}

.map-panel {
    position: relative;
}

.club-map {
    min-height: 460px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-unavailable {
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--surface-soft);
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.club-map-marker {
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(201, 47, 47, 0.18);
}

.club-map-marker span {
    width: 16px;
    height: 16px;
    display: block;
    border: 3px solid #fff;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 4px 14px rgba(26, 26, 26, 0.3);
}

.map-club-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.map-club-list article {
    display: grid;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 14px;
}

.map-club-list span {
    color: var(--muted);
}

.map-empty {
    margin-top: 14px;
}

.album-block {
    margin-top: 26px;
}

.album-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.album-heading h3 {
    margin-bottom: 0;
}

.album-heading span {
    color: var(--muted);
    font-weight: 800;
}

.photo-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 320px);
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 4px 4px 18px;
    scroll-snap-type: inline mandatory;
    scrollbar-color: var(--accent) var(--surface-soft);
}

.photo-scroll::-webkit-scrollbar {
    height: 10px;
}

.photo-scroll::-webkit-scrollbar-track {
    background: var(--surface-soft);
    border-radius: 999px;
}

.photo-scroll::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 999px;
}

.photo-scroll a {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-soft);
    box-shadow: 0 8px 24px rgba(26, 26, 26, 0.08);
    scroll-snap-align: start;
}

.photo-scroll img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.photo-scroll a:hover img {
    transform: scale(1.04);
}

.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    place-items: center;
    gap: 16px;
    padding: 28px;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
}

.photo-lightbox[hidden] {
    display: none;
}

.photo-lightbox figure {
    display: grid;
    gap: 12px;
    max-width: min(1100px, 100%);
    max-height: 92vh;
    margin: 0;
}

.photo-lightbox img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.photo-lightbox figcaption {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
    text-align: center;
}

.photo-lightbox button {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    font: inherit;
}

.photo-lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 1.8rem;
    line-height: 1;
}

.photo-lightbox-prev,
.photo-lightbox-next {
    width: 54px;
    height: 72px;
    border-radius: 8px;
    font-size: 3rem;
    line-height: 1;
}

.support-cards {
    display: grid;
    gap: 16px;
}

.support-card h3,
.contact-person h3 {
    margin-bottom: 8px;
    font-size: 1.12rem;
}

.support-card p,
.contact-person p {
    margin-bottom: 0;
    color: var(--muted);
}

.contact-person {
    margin-top: 24px;
}

.contact-person a {
    color: var(--accent);
    font-weight: 800;
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
    gap: 42px;
    align-items: start;
}

.form-panel {
    display: grid;
    gap: 16px;
    padding: 28px;
}

.form-panel.compact {
    box-shadow: none;
}

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

.content-editor .full-span,
.content-editor button {
    grid-column: 1 / -1;
}

.query-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}

.query-form .full-span {
    grid-column: 1 / -1;
}

.query-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.query-heading {
    margin-top: 8px;
}

.rich-toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.rich-toolbar button {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-soft);
    padding: 8px 10px;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.rich-editor {
    min-height: 150px;
    border: 1px solid #cfc8bd;
    border-radius: 6px;
    background: #fff;
    padding: 12px 13px;
    font: inherit;
    outline: none;
}

.rich-editor:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(201, 47, 47, 0.13);
}

label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-weight: 750;
}

.registration-panel {
    display: grid;
    gap: 14px;
}

.registration-mode-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.registration-mode-tabs button {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: 850;
    min-height: 104px;
    padding: 14px;
    text-align: left;
    display: grid;
    align-content: start;
    gap: 6px;
}

.registration-mode-tabs button strong {
    font-size: 1rem;
}

.registration-mode-tabs button span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 650;
    line-height: 1.35;
}

.registration-mode-tabs button.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.registration-mode-tabs button.is-active span {
    color: rgba(255, 255, 255, 0.78);
}

.organization-field.is-hidden,
.supporter-field.is-hidden,
.visitor-field.is-hidden {
    display: none;
}

.participant-groups {
    display: grid;
    gap: 18px;
    margin-bottom: 28px;
}

.participant-group {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 18px;
}

.admin-export-btn {
    color: var(--ink);
    border-color: var(--line);
    background: var(--surface-soft);
}

.search-box {
    display: grid;
    max-width: 520px;
    margin-top: 20px;
}

.map-search {
    margin-bottom: 20px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cfc8bd;
    border-radius: 6px;
    padding: 12px 13px;
    color: var(--ink);
    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(201, 47, 47, 0.13);
}

.notice {
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 6px;
    font-weight: 800;
}

.success {
    background: #e8f6ee;
    color: #196339;
}

.error {
    background: #fdecec;
    color: #8f1d1d;
}

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
    background:
        linear-gradient(105deg, rgba(26, 26, 26, 0.88), rgba(26, 26, 26, 0.64)),
        url("https://images.unsplash.com/photo-1555597673-b21d5c935865?q=80&w=1600&auto=format&fit=crop") center / cover;
}

.login-panel {
    width: min(460px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 30px;
}

.login-brand {
    margin-bottom: 28px;
}

.site-footer {
    background: var(--ink);
    color: #fff;
    padding: 28px 0;
}

.footer-grid {
    justify-content: space-between;
}

.footer-grid p {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
}

.admin-main {
    padding-top: 42px;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.admin-tabs button {
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: var(--surface-soft);
    color: var(--muted);
    padding: 12px 16px;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.admin-tabs button.is-active {
    background: var(--surface);
    color: var(--accent);
}

.admin-tab-panel {
    display: none;
}

.admin-tab-panel.is-active {
    display: block;
}

.admin-sections.admin-tab-panel.is-active {
    display: grid;
}

.admin-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    margin-bottom: 24px;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) minmax(300px, 1fr);
    gap: 24px;
    align-items: start;
}

.admin-panel {
    padding: 24px;
}

.admin-panel.wide {
    grid-column: 1 / -1;
}

.admin-list {
    display: grid;
    gap: 10px;
}

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

.admin-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.admin-list-item span {
    display: block;
    color: var(--muted);
}

.text-button {
    border: 0;
    background: transparent;
    color: var(--accent);
    font-weight: 900;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.compact-actions {
    justify-content: flex-start;
    gap: 6px;
}

.text-button.danger {
    color: #9f2626;
}

.approval-pending {
    background: #fff3cf;
    color: #7a5300;
}

.approval-accepted {
    background: #dff3e7;
    color: #126238;
}

.approval-rejected {
    background: #f8dddd;
    color: #8c2424;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .hero-grid,
    .support-grid,
    .map-layout,
    .contact-grid,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .registration-mode-tabs {
        grid-column: auto;
    }

    .program-grid,
    .partner-grid,
    .event-grid,
    .club-grid,
    .location-switcher,
    .admin-sections,
    .admin-lists-grid,
    .query-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .value-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .container {
        width: min(100% - 28px, 1120px);
    }

    .registration-mode-tabs {
        grid-template-columns: 1fr;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav {
        min-height: 64px;
    }

    .nav-links {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        padding: 14px 20px;
        border-top: 1px solid var(--line);
    }

    .hero {
        min-height: 720px;
    }

    .hero-grid {
        padding: 58px 0;
    }

    h1 {
        font-size: 2.55rem;
    }

    h2 {
        font-size: 1.9rem;
    }

    .section {
        padding: 68px 0;
    }

    .program-grid,
    .partner-grid,
    .event-grid,
    .club-grid,
    .location-switcher,
    .admin-sections,
    .admin-lists-grid,
    .query-form {
        grid-template-columns: 1fr;
    }

    .content-editor {
        grid-template-columns: 1fr;
    }

    .partner-card {
        grid-template-columns: 72px 1fr;
    }

    .partner-scroll {
        grid-auto-columns: minmax(280px, 86vw);
    }

    .photo-scroll {
        grid-auto-columns: minmax(240px, 84vw);
    }

    .photo-lightbox {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 8px;
        padding: 18px 10px;
    }

    .photo-lightbox-prev,
    .photo-lightbox-next {
        width: 42px;
        height: 58px;
        font-size: 2.25rem;
    }

    .photo-lightbox-close {
        top: 10px;
        right: 10px;
    }

    .partner-card img,
    .partner-placeholder {
        width: 72px;
        height: 72px;
    }
}
