/* =====================================================================
   Living History Events — Site-wide stylesheet
   ===================================================================== */

/* ---------------------------------------------------------------------
   Self-hosted Montserrat (previously loaded from fonts.googleapis.com —
   moved local to remove the extra third-party DNS/TLS round-trip that
   was render-blocking every page). Same Montserrat files, SIL Open Font
   License — see assets/fonts/LICENSE-montserrat.txt. font-display:swap
   matches the &display=swap the Google Fonts URL used to request, so
   text still renders immediately in a fallback font while these load.
   --------------------------------------------------------------------- */
@font-face {
    font-family: 'Montserrat';
    src: url('/assets/fonts/montserrat-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/assets/fonts/montserrat-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/assets/fonts/montserrat-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


:root {
    --color-primary: #4B5320;   /* olive green — "LIVING HISTORY" */
    --color-text: #1a1a1a;
    --color-grey: #6e6e6e;      /* strapline */
    --color-border: #e2e2e2;
    --color-bg: #ffffff;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;

    --header-height: 88px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
}

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

/* Inline links within body text need a stronger signal than colour
   alone that they're clickable — several currently have no visual
   distinction at all beyond this. A more specific rule elsewhere
   (e.g. .explore-links__row a) still correctly overrides this, since
   a class selector always beats a plain element one. */
p a {
    text-decoration: underline;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---------------------------------------------------------------------
   Header
   --------------------------------------------------------------------- */
.site-header {
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
}

.site-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Branding (logo + name + tagline) */
.branding {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.branding__logo {
    height: 56px;
    width: auto;
    flex-shrink: 0;
}

.branding__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.branding__name {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 1.5rem;
    line-height: 1.1;
    white-space: nowrap;
}

.branding__name-primary {
    font-weight: 500; /* medium */
    color: var(--color-primary);
}

.branding__name-secondary {
    font-weight: 400; /* normal */
    color: #000000;
}

.branding__tagline {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--color-grey);
    white-space: nowrap;
}

/* ---------------------------------------------------------------------
   Primary nav (desktop)
   --------------------------------------------------------------------- */
.primary-nav__list {
    display: flex;
    align-items: center;
    gap: 32px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
}

.primary-nav__list > li > a {
    padding: 8px 0;
}

.primary-nav__list > li > a:hover,
.primary-nav__list > li > a:focus-visible {
    color: var(--color-primary);
}

.primary-nav__account {
    display: flex;
    align-items: center;
    gap: 10px;
}

.primary-nav__account-name {
    color: var(--color-grey);
    font-size: 0.85rem;
}

.primary-nav__logout {
    display: flex;
    align-items: center;
    color: var(--color-text);
}

.primary-nav__logout:hover,
.primary-nav__logout:focus-visible {
    color: var(--color-primary);
}

/* "Add" submenu — desktop hover/click dropdown */
.primary-nav__has-submenu {
    position: relative;
}

.primary-nav__submenu-toggle {
    font: inherit;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 0;
    color: inherit;
}

.primary-nav__submenu-toggle:hover,
.primary-nav__submenu-toggle:focus-visible {
    color: var(--color-primary);
}

.primary-nav__submenu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: none;
    z-index: 20;
}

.primary-nav__has-submenu.is-open .primary-nav__submenu {
    display: block;
}

.primary-nav__submenu li a {
    display: block;
    padding: 10px 16px;
    font-weight: 400;
    white-space: nowrap;
}

.primary-nav__submenu li a:hover,
.primary-nav__submenu li a:focus-visible {
    background: #f5f5f0;
    color: var(--color-primary);
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-toggle__bar {
    display: block;
    height: 2px;
    width: 24px;
    background: var(--color-text);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Keyboard focus visibility (accessibility floor) */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Default (desktop) — hidden */
.primary-nav__mobile-only {
    display: none;
}

/* ---------------------------------------------------------------------
   Mobile — off-canvas hamburger menu
   --------------------------------------------------------------------- */
@media (max-width: 768px) {
    .branding__tagline {
        display: none; /* reduce clutter at narrow widths */
    }
    
    .branding__logo {
        height: 40px;
    }

    .branding__name {
        font-size: 1.05rem;
    }

    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 200; /* stays above the drawer and backdrop so it always works as a close button too */
    }
    
    .primary-nav__mobile-only {
        display: block;
    }

    .site-header {
        z-index: 200;
    }

    /* The drawer itself — hidden off-screen to the right by default */
    .primary-nav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100dvh;
        width: min(280px, 80vw);
        background: var(--color-bg);
        box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
        transform: translateX(100%);
        transition: transform 0.25s ease;
        z-index: 150;
        padding: 96px 24px 24px;
        overflow-y: auto;
    }

    .primary-nav.is-open {
        transform: translateX(0);
    }

    /* Dimmed backdrop behind the drawer */
    .nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 140;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .nav-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .primary-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .primary-nav__list > li > a,
    .primary-nav__submenu-toggle {
        display: block;
        width: 100%;
        padding: 14px 0;
        text-align: left;
        border-bottom: 1px solid var(--color-border);
    }

    .primary-nav__has-submenu {
        position: static;
    }

    .primary-nav__submenu {
        position: static;
        display: none;
        border: none;
        box-shadow: none;
        padding-left: 16px;
        min-width: 0;
    }

    .primary-nav__has-submenu.is-open .primary-nav__submenu {
        display: block;
    }
}

/* ---------------------------------------------------------------------
   Hero (homepage)
   --------------------------------------------------------------------- */
.hero {
    background: var(--color-primary);
    padding-top: 56px;
    overflow: hidden;
}

.hero__inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.hero__heading {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 2rem;
    line-height: 1.2;
    margin: 0 0 12px;
    color: #ffffff;
}

.hero__heading-accent {
    color: #F2E8C9; /* warm cream — keeps contrast against the olive background */
}

.hero__subheading {
    font-family: var(--font-body);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 480px;
    margin: 0 auto 28px;
}

.hero__cta-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--color-text);
    color: #ffffff;
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 14px 36px;
    border-radius: 4px;
}

.btn:hover,
.btn:focus-visible {
    background: #333333;
}

.btn--small {
    padding: 8px 20px;
    font-size: 0.75rem;
}

.btn--full {
    width: 100%;
    padding: 12px 20px;
}

.btn--outline {
    background: transparent;
    border: 1.5px solid var(--color-text);
    color: var(--color-text);
}

.btn--outline:hover,
.btn--outline:focus-visible {
    background: var(--color-text);
    color: #ffffff;
}

.hero__art {
    display: block;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    height: auto;
}

@media (max-width: 600px) {
    .hero__heading {
        font-size: 1.5rem;
    }
}

/* ---------------------------------------------------------------------
   Generic page header (events.php, groups.php, etc.)
   --------------------------------------------------------------------- */
.page-header {
    position: relative;
    background-color: #2a2e18; /* fallback while the image loads / if it 404s */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 56px 24px;
}

.page-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header__title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin: 0 0 6px;
    color: #ffffff;
}

.page-header__subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.view-toggle {
    display: inline-flex;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.12);
}

.view-toggle__option {
    padding: 8px 20px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: #ffffff;
}

.view-toggle__option:hover,
.view-toggle__option:focus-visible {
    background: rgba(255, 255, 255, 0.22);
}

.view-toggle__option.is-active {
    background: var(--color-primary);
    color: #ffffff;
}

.view-toggle__option.is-active:hover,
.view-toggle__option.is-active:focus-visible {
    background: #3a4118;
}

/* ---------------------------------------------------------------------
   Listing pages — filter bar, empty state, pagination
   --------------------------------------------------------------------- */
.listing {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.filter-bar select {
    font-family: var(--font-body);
    font-size: 0.9rem;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: #fff;
    color: var(--color-text);
}

.filter-bar__clear {
    font-size: 0.85rem;
    color: var(--color-grey);
    text-decoration: underline;
}

.filter-bar__clear:hover,
.filter-bar__clear:focus-visible {
    color: var(--color-primary);
}

.listing__empty {
    color: var(--color-grey);
    padding: 32px 0;
}

.listing__empty a {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Empty saved-events state (my-events.php) — adds an optional CTA
   button below the message, e.g. pointing an empty Upcoming list at
   Browse Events rather than leaving the visitor with just a sentence. */
.listing__empty-state {
    text-align: center;
    padding: 32px 0;
}

.listing__empty-state .listing__empty {
    padding: 0 0 16px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.pagination__link {
    color: var(--color-primary);
    font-weight: 500;
}

.pagination__link:hover,
.pagination__link:focus-visible {
    text-decoration: underline;
}

.pagination__status {
    color: var(--color-grey);
}

/* ---------------------------------------------------------------------
   Featured Events / Featured Groups (homepage teasers)
   --------------------------------------------------------------------- */
#featured-events {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 0;
    scroll-margin-top: 80px;
}

#featured-groups {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin: 0 0 24px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.section-cta {
    text-align: center;
    margin-top: 32px;
}

.event-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.event-card:hover,
.event-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--color-primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.event-card__image {
    height: 150px;
    background: #ececec;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-grey);
    font-size: 0.8rem;
}

.event-card__body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.event-card__title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 500;
    margin: 0;
}

.event-card__meta {
    font-size: 0.85rem;
    color: var(--color-grey);
    margin: 0;
}

.event-card__tag {
    align-self: flex-start;
    background: #eef0e4;
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 4px 10px;
    border-radius: 12px;
    margin-top: 4px;
}

.event-card__rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
}

.event-card__rating-count {
    font-weight: 400;
    color: var(--color-grey);
}

/* ---------------------------------------------------------------------
   Detail page layout — shared by group.php and event.php.
   Rules are dual-selectored (.group-* and generic .detail-page*) so each
   page uses semantically correct class names in its own markup without
   duplicating any CSS.
   --------------------------------------------------------------------- */
.group-banner,
.detail-page__banner {
    width: 100%;
    height: 280px;
    background: #ececec;
}

.group-banner__img,
.detail-page__banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.group-banner__placeholder,
.detail-page__banner-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-grey);
    font-size: 0.9rem;
}

.group-detail,
.detail-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 64px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.group-detail__heading-row,
.detail-page__heading-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.group-detail__title,
.detail-page__title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin: 0;
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 4px 10px;
    border-radius: 12px;
}

.badge--verified,
.badge--upcoming {
    background: #e6f0e0;
    color: #3a5a1f;
}

.badge--unverified,
.badge--past {
    background: #f0f0f0;
    color: var(--color-grey);
}

.badge--cancelled {
    background: #fbe4e2;
    color: #9b2c22;
}

.group-detail__tags,
.detail-page__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 24px;
}

.group-detail__description,
.detail-page__description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text);
    max-width: 65ch;
}

.group-detail__description--empty,
.detail-page__description--empty {
    color: var(--color-grey);
    font-style: italic;
}

.event-card__description {
    font-size: 0.85rem;
    color: var(--color-grey);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.detail-facts {
    margin-top: 32px;
}

.detail-facts__heading {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-grey);
    margin: 0 0 12px;
}

.detail-facts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px 24px;
    margin: 0;
}

.detail-facts__item dt {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--color-grey);
    margin-bottom: 2px;
}

.detail-facts__item dd {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-facts__item dd svg {
    flex-shrink: 0;
}

.detail-facts__item--wide {
    grid-column: 1 / -1;
}

.event-map-section {
    margin-top: 32px;
}

.event-map {
    height: 320px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    position: relative; /* combined with z-index, contains Leaflet's internal
                            controls/popups so they can never render above
                            the site's sticky header */
    z-index: 0;
}

.weather-section {
    margin-top: 32px;
}

.weather-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.weather-day {
    flex: 1;
    min-width: 80px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}

.weather-day__label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--color-grey);
}

.weather-day__icon {
    width: 40px;
    height: 40px;
}

.weather-day__temps {
    font-size: 0.85rem;
    color: var(--color-text);
}

.weather-day__temps strong {
    font-weight: 600;
}

.reviews-section {
    margin-top: 32px;
}

.reviews-empty {
    color: var(--color-grey);
    font-size: 0.9rem;
}

.reviews-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.reviews-summary__average {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 500;
    line-height: 1;
}

.reviews-summary__detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reviews-summary__count {
    font-size: 0.8rem;
    color: var(--color-grey);
}

.stars {
    display: inline-flex;
    gap: 1px;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-item {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 16px;
}

.review-item:last-child {
    border-bottom: none;
}

.review-item__header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.review-item__meta {
    font-size: 0.8rem;
    color: var(--color-grey);
}

.review-item__text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text);
    margin: 0;
    max-width: 65ch;
}

.reviews-note {
    font-size: 0.8rem;
    color: var(--color-grey);
    font-style: italic;
    margin-top: 16px;
}

.report-link {
    color: var(--color-grey);
    text-decoration: underline;
    text-decoration-color: var(--color-border);
    font-size: 0.8rem;
}

.report-link:hover,
.report-link:focus-visible {
    color: #a33;
    text-decoration-color: #a33;
}

.added-banner {
    background: #e6f0e0;
    color: #3a5a1f;
    padding: 14px 24px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    text-align: center;
}

.add-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.add-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.add-form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.add-form__group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
}

.add-form input[type="text"],
.add-form input[type="email"],
.add-form input[type="url"],
.add-form input[type="number"],
.add-form input[type="date"],
.add-form input[type="time"],
.add-form select,
.add-form textarea {
    font-family: var(--font-body);
    font-size: 0.9rem;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: #fff;
    color: var(--color-text);
    width: 100%;
}

.add-form textarea {
    resize: vertical;
}

.add-form__fieldset {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 16px 20px;
}

.add-form__fieldset legend {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-grey);
    padding: 0 6px;
}

.add-form__checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.add-form__checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 400;
}

@media (max-width: 600px) {
    .add-form__row {
        grid-template-columns: 1fr;
    }
}

.calendar-menu {
    position: relative;
}

.calendar-menu__toggle {
    width: 100%;
}

.calendar-menu__options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 10;
    overflow: hidden;
}

.calendar-menu.is-open .calendar-menu__options {
    display: block;
}

.calendar-menu__options a {
    display: block;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 500;
}

.calendar-menu__options a:hover,
.calendar-menu__options a:focus-visible {
    background: #f5f5f0;
    color: var(--color-primary);
}

.attendance-panel {
    margin-top: 32px;
    background: #f5f6ef;
    border-left: 4px solid var(--color-primary);
    border-radius: 8px;
    padding: 24px;
}

.attendance-panel__heading {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin: 0 0 16px;
    color: var(--color-text);
}

.attendance-panel__empty {
    margin: 0;
    color: var(--color-grey);
    font-size: 0.9rem;
}

.attendance-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.attendance-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 10px 14px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.attendance-item:hover,
.attendance-item:focus-visible {
    transform: translateX(4px);
    border-color: var(--color-primary);
}

.attendance-item__image {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #ececec;
}

.attendance-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.attendance-item__name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attendance-item__meta {
    font-size: 0.8rem;
    color: var(--color-grey);
}

.attendance-item__status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.attendance-item__status--confirmed {
    color: #3a5a1f;
}

.attendance-item__status--pending {
    color: #a67c00;
}

@media (max-width: 500px) {
    .attendance-item__meta {
        display: none; /* keep rows compact on narrow screens */
    }
}

.group-detail__sidebar-col,
.detail-page__sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 96px; /* clears the sticky header */
}

.group-detail__sidebar,
.detail-page__sidebar {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ---------------------------------------------------------------------
   Detail-page prev/next/back nav — generic, reused on event.php too
   --------------------------------------------------------------------- */
.detail-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.85rem;
}

.detail-nav__link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
}

.detail-nav__link:hover,
.detail-nav__link:focus-visible {
    color: var(--color-primary);
}

.detail-nav__link--disabled {
    color: #cccccc;
    pointer-events: none;
}

.detail-nav__back {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-grey);
    white-space: nowrap;
}

.detail-nav__back:hover,
.detail-nav__back:focus-visible {
    color: var(--color-primary);
}

.sidebar-heading {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-grey);
    margin: 12px 0 2px;
}

.sidebar-heading:first-child {
    margin-top: 0;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.social-link:hover,
.social-link:focus-visible {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.sidebar-empty {
    color: var(--color-grey);
    font-size: 0.85rem;
    margin: 0;
}

@media (max-width: 768px) {
    .group-detail,
    .detail-page {
        grid-template-columns: 1fr;
    }

    .group-detail__sidebar-col,
    .detail-page__sidebar-col {
        position: static;
    }

    .detail-nav {
        font-size: 0.8rem;
    }
}

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--color-border);
    margin-top: 48px;
    padding: 24px;
    font-size: 0.85rem;
    color: var(--color-grey);
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    #featured-events {
        margin-bottom: 32px;
    }
}

/* ---------------------------------------------------------------------
   Interactive star-rating input (event.php) — a set of radio buttons
   styled as stars via the classic reversed-flexbox trick, so hover and
   selection are CSS-only and work without JS; JS only fires the actual
   AJAX save on change. Distinct from the read-only .stars display used
   elsewhere (review list, card ratings).
   --------------------------------------------------------------------- */
.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    border: none;
    padding: 0;
    margin: 0 0 8px;
}

.rating-input legend {
    position: absolute;
    left: -9999px;
}

.rating-input input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.rating-input label {
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--color-border);
    transition: color 0.15s ease;
}

.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
    color: #D4A017;
}

.rating-input input:focus-visible + label {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.rating-input__status {
    font-size: 0.85rem;
    color: var(--color-grey);
    margin: 0 0 20px;
    min-height: 1.2em;
}

.review-form-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.hint {
    font-size: 0.8rem;
    color: var(--color-grey);
    font-weight: normal;
}
/* ---------------------------------------------------------------------
   Static content pages — About, Terms, Privacy, For Organisers,
   For Groups, Contact. Deliberately simple and reusing existing tokens
   (colors, fonts, spacing) rather than introducing new visual language,
   consistent with Section 15's "design deferred, structure first".
   --------------------------------------------------------------------- */
.static-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

.static-page__title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin: 0 0 12px;
    color: var(--color-text);
}

.static-page__intro {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--color-grey);
    margin: 0 0 40px;
    max-width: 65ch;
}

.static-page__section {
    margin-bottom: 40px;
}

.static-page__section-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--color-primary);
    margin: 0 0 12px;
}

.static-page p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text);
    max-width: 70ch;
    margin: 0 0 16px;
}

.static-page ul,
.static-page ol {
    margin: 0 0 16px;
    padding-left: 22px;
    max-width: 70ch;
}

.static-page li {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 8px;
}

.static-page__meta {
    font-size: 0.8rem;
    color: var(--color-grey);
    font-style: italic;
    margin-top: 48px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

/* Persuasive benefit grid — used by For Organisers / For Groups */
.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 24px 0 40px;
}

.benefit-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
}

.benefit-card__title {
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 500;
    margin: 0 0 8px;
    color: var(--color-text);
}

.benefit-card__text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-grey);
    margin: 0;
}

.static-page__cta-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 32px 0 8px;
}

@media (max-width: 600px) {
    .static-page__title {
        font-size: 1.5rem;
    }
}

/* Visually hides the contact form's honeypot field from sighted users
   while keeping it in the DOM for bots to (hopefully) fill in. */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------------------------------------------------------------------
   Benefit rows — full-width stacked layout, used by For Organisers /
   For Groups instead of .benefit-grid. A wrapping grid leaves an
   orphaned item on its own line whenever the count doesn't evenly fill
   a row at the current width (e.g. 4 items at 3-per-row); stacking
   avoids that entirely regardless of item count or screen width.
   --------------------------------------------------------------------- */
.benefit-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 24px 0 40px;
}

.benefit-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px 24px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.benefit-row:hover {
    transform: translateX(4px);
    border-color: var(--color-primary);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.benefit-row__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #eef0e4;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-row__body {
    flex: 1;
    min-width: 0;
}

.benefit-row__title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 500;
    margin: 0 0 4px;
    color: var(--color-text);
}

.benefit-row__text {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--color-grey);
    margin: 0;
}

@media (max-width: 600px) {
    .benefit-row {
        padding: 16px 18px;
        gap: 14px;
    }

    .benefit-row__icon {
        width: 38px;
        height: 38px;
    }
}

/* Bold colour-block CTA section — same colour pairing already proven on
   the homepage hero (dark button on the olive-green brand colour). */
.cta-banner {
    background: var(--color-primary);
    border-radius: 12px;
    padding: 40px 32px;
    text-align: center;
    margin: 48px 0 8px;
}

.cta-banner__title {
    font-family: var(--font-heading);
    color: #ffffff;
    font-size: 1.4rem;
    margin: 0 0 8px;
}

.cta-banner .cta-banner__text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    margin: 0 0 24px;
}

@media (max-width: 600px) {
    .cta-banner {
        padding: 32px 20px;
    }
}

/* ---------------------------------------------------------------------
   Personal story section (About page) — text alongside a photo, rather
   than the wide background-image hero used on For Organisers/For
   Groups. A personal photo does more to build connection here than a
   generic banner would.
   --------------------------------------------------------------------- */
.story-section {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
    margin: 8px 0 48px;
}

.story-photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    /* Soft tinted fallback so a missing image shows as an intentional-
       looking placeholder rather than a broken-image icon. */
    background-color: #eef0e4;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--color-border);
}

.story-photo__caption {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--color-grey);
    text-align: center;
}

@media (max-width: 768px) {
    .story-section {
        grid-template-columns: 1fr;
    }

    .story-photo {
        max-width: 280px;
        margin: 0 auto;
    }
}

.cta-banner__buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Outline button variant for dark backgrounds (e.g. inside .cta-banner).
   The existing .btn--outline uses near-black text/border, which fails
   WCAG AA contrast (2.12:1) against the olive-green banner — this uses
   white instead, which comfortably passes (8.21:1). */
.btn--outline-light {
    background: transparent;
    border: 1.5px solid #ffffff;
    color: #ffffff;
}

.btn--outline-light:hover,
.btn--outline-light:focus-visible {
    background: #ffffff;
    color: var(--color-primary);
}

/* Event page disclaimer — deliberately its own class rather than
   reusing .static-page__meta (Privacy/Terms), which has different
   spacing/border/italic styling suited to that context, not this one. */
.event-disclaimer {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--color-grey);
    margin-top: 16px;
}

.event-disclaimer strong {
    font-weight: 600;
}

/* ---------------------------------------------------------------------
   FAQ accordion — built on native <details>/<summary> rather than a
   JS-driven widget: works with zero JavaScript, is keyboard-operable
   and screen-reader-friendly by default, and the browser handles the
   expand/collapse state itself with nothing to break.
   --------------------------------------------------------------------- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 40px;
}

.faq-item {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0 20px;
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 0;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1rem;
    color: var(--color-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    line-height: 1;
    color: var(--color-primary);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item__answer {
    margin: 0;
    padding: 0 0 18px;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--color-grey);
}

.faq-item__answer a {
    color: var(--color-primary);
}

/* ---------------------------------------------------------------------
   Cookie consent banner. Both actions use the existing .btn/.btn--outline
   classes at equal size — deliberately not a big "Accept" button next to
   a small "Reject" link, which UK ICO guidance treats as a dark pattern.
   --------------------------------------------------------------------- */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    padding: 20px 24px;
}

.cookie-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-banner__text {
    flex: 1;
    min-width: 240px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-text);
    margin: 0;
}

.cookie-banner__text a {
    color: var(--color-primary);
}

.cookie-banner__actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-banner__actions .btn,
.cookie-banner__actions .btn--outline {
    white-space: nowrap;
}

@media (max-width: 600px) {
    .cookie-banner__inner {
        flex-direction: column;
        align-items: stretch;
        max-width: 100%;
    }

    .cookie-banner__text {
        min-width: 0;
        overflow-wrap: break-word;
    }

    .cookie-banner__actions {
        justify-content: stretch;
    }

    .cookie-banner__actions button {
        flex: 1;
        min-width: 0;
        white-space: normal;
    }
}

/* ---------------------------------------------------------------------
   Events map view (events.php) — a large, full-page-feeling map rather
   than a small inset, per the original request. height uses vh so it
   scales sensibly across screen sizes; Leaflet itself already handles
   touch/pinch gestures on mobile with no extra work needed here.
   --------------------------------------------------------------------- */
.events-map__note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--color-grey);
    margin: 0 0 16px;
}

.events-map {
    height: 70vh;
    min-height: 420px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    position: relative; /* contains Leaflet's internal controls/popups,
                            same reasoning as .event-map on event.php */
}

.events-map .leaflet-popup-content {
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.5;
}

.events-map .leaflet-popup-content a {
    color: var(--color-primary);
}

@media (max-width: 600px) {
    .events-map {
        height: 60vh;
        min-height: 320px;
    }

    .events-map__note {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---------------------------------------------------------------------
   Claim-event picker list (claim-event.php) — deliberately plain,
   matching the site's existing link/list conventions rather than
   introducing a new visual pattern for what's a simple, occasional-use
   feature.
   --------------------------------------------------------------------- */
.claim-event-list {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    border-top: 1px solid var(--color-border);
}

.claim-event-list li {
    border-bottom: 1px solid var(--color-border);
}

.claim-event-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 4px;
    color: var(--color-text);
    text-decoration: none;
}

.claim-event-list a:hover,
.claim-event-list a:focus-visible {
    color: var(--color-primary);
}

.claim-event-list__year {
    font-size: 0.85rem;
    color: var(--color-grey);
}

#event-search {
    font-family: var(--font-body);
    font-size: 0.9rem;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: #fff;
    color: var(--color-text);
    width: 100%;
}

/* ---------------------------------------------------------------------
   Similar-events check panel (add-event.php) — a warning-toned but
   non-blocking notice, matching the site's existing error-banner
   colour treatment rather than introducing a new one.
   --------------------------------------------------------------------- */
.similar-events-panel {
    margin-top: 10px;
    padding: 12px 14px;
    background: #fff8e6;
    border: 1px solid #f0d78c;
    border-radius: 6px;
}

.similar-events-panel__heading {
    margin: 0 0 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #8a5a00;
}

.similar-events-panel__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.similar-events-panel__list li {
    padding: 6px 0;
    border-top: 1px solid #f0d78c;
}

.similar-events-panel__list li:first-child {
    border-top: none;
}

.similar-events-panel__list a {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}

.similar-events-panel__list a:hover,
.similar-events-panel__list a:focus-visible {
    text-decoration: underline;
}

.similar-events-panel__meta {
    display: block;
    font-size: 0.8rem;
    color: var(--color-grey);
    margin-top: 2px;
}

/* ---------------------------------------------------------------------
   Event photo gallery, upload modal, and lightbox (event.php) — the
   site's first true modal/overlay pattern, so these introduce a new
   z-index tier (1000+) to sit above absolutely everything else,
   matching the same tier the cookie banner already uses.
   --------------------------------------------------------------------- */
.photo-gallery {
    margin-top: 32px;
}

.photo-gallery__empty {
    color: var(--color-grey);
    font-size: 0.9rem;
    margin: 12px 0;
}

.photo-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.photo-gallery__thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    background: #eee;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.photo-gallery__thumb:hover,
.photo-gallery__thumb:focus-visible {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.photo-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Upload modal */
.photo-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.photo-modal__box {
    background: var(--color-bg);
    border-radius: 10px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.photo-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.photo-modal__header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.photo-modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-grey);
    padding: 4px 8px;
}

.photo-modal__close:hover {
    color: var(--color-text);
}

.photo-modal__dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 16px;
    border: 2px dashed var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--color-grey);
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.photo-modal__dropzone:hover {
    border-color: var(--color-primary);
    background: #fafaf8;
}

.photo-modal__error {
    background: #fdecea;
    color: #a33;
    border: 1px solid #f3b4b3;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin: 12px 0;
}

/* Lightbox */
.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.photo-lightbox__inner {
    display: flex;
    max-width: 1100px;
    max-height: 90vh;
    width: 100%;
    background: var(--color-bg);
    border-radius: 8px;
    overflow: hidden;
}

.photo-lightbox__inner img {
    flex: 2;
    max-width: 70%;
    object-fit: contain;
    background: #000;
}

.photo-lightbox__panel {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

.photo-lightbox__caption {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text);
}

.photo-lightbox__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-grey);
}

.photo-lightbox__close,
.photo-lightbox__nav {
    position: fixed;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text);
}

.photo-lightbox__close:hover,
.photo-lightbox__nav:hover {
    background: #fff;
}

.photo-lightbox__close {
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    line-height: 1;
}

.photo-lightbox__nav--prev {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

.photo-lightbox__nav--next {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

@media (max-width: 700px) {
    .photo-lightbox__inner {
        flex-direction: column;
        max-height: 95vh;
        overflow-y: auto;
    }

    .photo-lightbox__inner img {
        max-width: 100%;
        max-height: 50vh;
    }

    .photo-lightbox__nav--prev {
        left: 10px;
    }

    .photo-lightbox__nav--next {
        right: 10px;
    }
}

/* ---------------------------------------------------------------------
   Landing-page intro paragraph (events.php, /events/{period-or-region})
   — genuine unique content per landing page, not just a filtered view
   with a different URL. Matches .static-page__intro's treatment.
   --------------------------------------------------------------------- */
.listing-intro {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 0;
}

.listing-intro p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--color-grey);
    max-width: 75ch;
    margin: 0;
}

/* ---------------------------------------------------------------------
   Explore by Period / Region links (events.php) — deliberately plain
   text links, not pill buttons. Sitting right next to the filter-bar's
   dropdowns, a pill-styled version would look like a second, competing
   control doing the same job; placed here at the bottom and styled as
   understated "further reading" links, it reads as a distinct thing —
   crawlable pages to browse, not another way to filter this one.
   --------------------------------------------------------------------- */
.explore-links {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 24px 40px;
}

.explore-links__row {
    font-size: 0.9rem;
    color: var(--color-grey);
    line-height: 1.8;
    margin: 8px 0;
}

.explore-links__label {
    font-weight: 500;
    color: var(--color-text);
    margin-right: 4px;
}

.explore-links__row a {
    color: var(--color-grey);
    text-decoration: underline;
    text-decoration-color: var(--color-border);
    text-underline-offset: 2px;
}

.explore-links__row a:hover,
.explore-links__row a:focus-visible {
    color: var(--color-primary);
    text-decoration-color: var(--color-primary);
}

/* ---------------------------------------------------------------------
   Attendance panel additions — group.php's owner-only Add/Remove
   controls, and event.php's static "coming soon" example treatment.
   --------------------------------------------------------------------- */
.attendance-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.attendance-item {
    position: relative;
}

.attendance-item__remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-grey);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attendance-item__remove:hover {
    background: #fdecea;
    border-color: #f3b4b3;
    color: #a33;
}

/* The event-attendance picker reuses .claim-event-list's list/border
   styling, but uses <label><input type="radio"> instead of <a> — this
   gives the label the same flex layout .claim-event-list a already
   has, since that rule specifically targets <a> and wouldn't apply
   to a label-wrapped radio button otherwise. */
.attendance-event-picker label {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 10px 4px;
    cursor: pointer;
}

.attendance-event-picker input[type="radio"] {
    width: auto;
    flex-shrink: 0;
}

/* event.php's static example — greyed out to clearly signal this
   isn't live/interactive data, with an explicit "Example" tag as a
   second, unambiguous signal beyond just the muted colour. */
.attendance-panel__intro {
    font-size: 0.9rem;
    color: var(--color-grey);
    line-height: 1.6;
    margin: 8px 0 16px;
    max-width: 65ch;
}

.attendance-item--example {
    opacity: 0.55;
    pointer-events: none;
    filter: grayscale(60%);
}

.attendance-item__example-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--color-text);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 999px;
    z-index: 1;
}
