/* Club sites - shared structure. Colours come from the club (--club-primary, --club-accent set on <html>);
   type and surfaces from the theme stylesheet loaded after this one. Mobile first. */

:root {
    --surface: #ffffff;
    --surface-alt: #f4f2ec;
    --ink: #1c2321;
    --ink-soft: #4b5552;
    --line: #e1ddd3;
    --on-primary: #ffffff;
    --on-accent: #1c2321;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-heading: var(--font-body);
    --heading-weight: 700;
    --radius: 10px;
    --gap: clamp(1rem, 3vw, 2rem);
    --section-space: clamp(3rem, 8vw, 6rem);
    --wrap: 72rem;
    --header-height: 4.5rem;
    --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 24px rgb(0 0 0 / .08);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-height) + 1rem); }

body {
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font: 400 1.0625rem/1.65 var(--font-body);
    padding-bottom: 4.25rem; /* room for the mobile action bar */
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--club-primary); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--club-accent); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--font-heading); font-weight: var(--heading-weight); line-height: 1.15; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .6rem 1rem; background: var(--ink); color: #fff; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; }
.muted { color: var(--ink-soft); }
.eyebrow { font-size: .875rem; color: var(--ink-soft); }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.wrap--narrow { --wrap: 46rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 2.9rem; padding: .7rem 1.4rem;
    border: 2px solid transparent; border-radius: var(--btn-radius, 999px);
    font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
    text-transform: var(--btn-case, none); letter-spacing: var(--btn-spacing, normal);
    transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--primary { background: var(--club-primary); color: var(--on-primary); }
.btn--accent { background: var(--club-accent); color: var(--on-accent); }
.btn--light { background: #fff; color: var(--club-primary); }
.btn--ghost { border-color: currentColor; color: #fff; background: rgb(0 0 0 / .15); }
.btn--large { min-height: 3.4rem; padding-inline: 2rem; font-size: 1.1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Blocks ---------- */
.blk { padding-block: var(--section-space); }
.blk + .blk { padding-top: 0; }
.blk--hero, .blk--callToAction { padding-block: 0; }
.blk--hero + .blk, .blk--callToAction + .blk { padding-top: var(--section-space); }
.blk + .blk--callToAction { padding-top: 0; }
.blk__heading { margin-bottom: .5em; }
.blk__intro { max-width: 40rem; color: var(--ink-soft); font-size: 1.15rem; margin-bottom: 2rem; }

.prose > :last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 4px solid var(--club-accent); font-size: 1.15rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); }
.prose img { border-radius: var(--radius); }

/* Hero */
.hero { position: relative; display: grid; align-items: end; color: #fff; background: var(--club-primary); overflow: hidden; isolation: isolate; }
.hero--tall { min-height: min(88vh, 46rem); }
.hero--medium { min-height: min(60vh, 32rem); }
.hero--short { min-height: 20rem; }
.hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero__overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(0 0 0 / .65), rgb(0 0 0 / .15) 55%, rgb(0 0 0 / .05)); }
.hero__content { padding-block: clamp(3rem, 10vw, 6rem); }
.hero__heading { max-width: 18ch; margin-bottom: .35em; text-shadow: 0 2px 20px rgb(0 0 0 / .25); text-transform: var(--hero-case, none); }
.hero__sub { max-width: 38rem; font-size: clamp(1.1rem, 2.4vw, 1.35rem); margin-bottom: 1.75rem; opacity: .95; }

/* Image and text */
.split { display: grid; gap: var(--gap); align-items: center; }
.split__media img, .split__media .map { width: 100%; border-radius: var(--radius); }
.split__media img { aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 48rem) {
    .split { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); }
    .split--image-right .split__media { order: 2; }
}

/* Call to action */
.cta { padding-block: clamp(2.5rem, 6vw, 4rem); }
.cta--primary { background: var(--club-primary); color: var(--on-primary); }
.cta--accent { background: var(--club-accent); color: var(--on-accent); }
.cta--light { background: var(--surface-alt); }
.cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta__heading { margin: 0; }
.cta__text { margin: .5rem 0 0; opacity: .9; }

/* Cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
.card--link:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__image { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card__body { padding: 1.25rem; }
.card__body > :last-child { margin-bottom: 0; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */

/* Gallery */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.gallery figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: .4rem; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; cursor: pointer; font-weight: 600; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--club-primary); transition: transform .2s ease; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { padding-bottom: 1.1rem; margin: 0; color: var(--ink-soft); }

/* News */
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.news-list__item { padding: 1.5rem; background: var(--surface-alt); border-radius: var(--radius); }
.news-list__item time { font-size: .85rem; color: var(--ink-soft); }
.news-list__item h3 { margin: .35rem 0 .5rem; }
.news-list__item h3 a { color: var(--ink); text-decoration: none; }
.news-list__item h3 a:hover { color: var(--club-primary); text-decoration: underline; }
.news-list__item p { margin: 0; color: var(--ink-soft); }
.news-article__date { color: var(--ink-soft); }

/* Book now */
.book-now { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: calc(var(--radius) * 1.5); background: var(--surface-alt); border-left: 6px solid var(--club-accent); }
/* Where the button sits: beside the text (below it on a phone), or below it at the left, centre or right */
.book-now--side { flex-wrap: nowrap; }
.book-now--side > div { flex: 1 1 auto; min-width: 0; }
.book-now--side > .btn { flex: none; }
@media (max-width: 40rem) { .book-now--side { flex-wrap: wrap; } }
.book-now--below, .book-now--centre, .book-now--right { flex-direction: column; align-items: flex-start; }
.book-now--below > div, .book-now--right > div { align-self: stretch; }
.book-now--centre { align-items: center; text-align: center; }
.book-now--right { align-items: flex-end; }
.book-now .blk__heading { margin-bottom: .25em; }
.book-now p { margin: 0; color: var(--ink-soft); }

/* Contact */
.contact-list { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.25rem; margin: 1.5rem 0 0; }
.contact-list dt { font-weight: 600; }
.contact-list dd { margin: 0; }
.map { display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; }
.contact-form-wrap { max-width: 48rem; }
.blk--contactForm { scroll-margin-top: calc(var(--header-height) + 1rem); }
.contact-form fieldset { display: grid; gap: 1.25rem; border: 0; margin: 0; padding: 0; min-width: 0; }
.contact-form label { display: block; font-weight: 600; margin-bottom: .35rem; }
.contact-form input:not([type=hidden]), .contact-form textarea { width: 100%; padding: .75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; }
.contact-form textarea { resize: vertical; }
.contact-form button { justify-self: start; }
.contact-form__trap { display: none; }
.contact-form__errors { border-left: 4px solid #b42318; padding: 1rem; margin-bottom: 1.5rem; }
.contact-form__success { border-left: 4px solid var(--club-primary); padding: 1rem; background: var(--surface-alt); }

.error-page { text-align: center; }

/* ---------- Mobile action bar ---------- */
.action-bar {
    position: fixed; inset: auto 0 0 0; z-index: 60;
    display: flex; gap: 1px; background: var(--line);
    box-shadow: 0 -4px 16px rgb(0 0 0 / .08);
    padding-bottom: env(safe-area-inset-bottom);
}
.action-bar:empty { display: none; }
.action-bar__item { flex: 1; display: grid; place-items: center; min-height: 3.6rem; background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; }
.action-bar__item--primary { background: var(--club-accent); color: var(--on-accent); }
@media (min-width: 60rem) {
    .action-bar { display: none; }
    body { padding-bottom: 0; }
}
body.no-action-bar { padding-bottom: 0; }

/* ---------- Preview ---------- */
.preview-banner { position: sticky; top: 0; z-index: 70; padding: .4rem 1rem; background: #fde68a; color: #422006; font: 600 .85rem/1.4 var(--font-body); text-align: center; }
.is-preview .site-header { top: 1.9rem; }
.is-preview [data-block-id] { position: relative; }
.is-preview [data-block-id]:hover { outline: 2px dashed rgb(59 130 246 / .6); outline-offset: -2px; cursor: pointer; }
.is-preview [data-block-id].is-selected { outline: 3px solid #3b82f6; outline-offset: -3px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Picture shapes, one-third images, logos */
.cards--portrait .card__image { aspect-ratio: 4 / 5; object-position: top; }
.cards--square .card__image { aspect-ratio: 1; }
@media (min-width: 48rem) {
    .split--width-third { grid-template-columns: 1fr 2fr; }
    .split--width-third.split--image-right { grid-template-columns: 2fr 1fr; }
}
.logos { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); align-items: center; }
.logos__item { display: grid; place-items: center; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.logos__item img { max-height: 5rem; width: auto; object-fit: contain; }


/* ---------- Cookie consent (only on sites with tracking) ---------- */
.consent {
    position: fixed; inset: auto 0 0 0; z-index: 80;
    padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgb(0 0 0 / .12);
}
.consent[hidden] { display: none; }
.consent__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.consent__text { margin: 0; max-width: 44rem; font-size: .95rem; }
.consent__text strong { display: block; margin-bottom: .15rem; }
.consent__actions { display: flex; gap: .5rem; }
.consent__actions .btn--light { border-color: var(--line); color: var(--ink); background: var(--surface-alt); }
@media (max-width: 59.99rem) {
    /* Above the mobile action bar, and buttons full width */
    .consent { bottom: 3.6rem; }
    .consent__actions { width: 100%; }
    .consent__actions .btn { flex: 1; }
}
.site-footer__consent { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Embeds ---------- */
.embed iframe { display: block; width: 100%; border: 0; border-radius: var(--radius); background: var(--surface-alt); }
.embed--short iframe { height: 20rem; }
.embed--medium iframe { height: 32rem; }
.embed--tall iframe { height: 48rem; }
.embed--video iframe { height: auto; aspect-ratio: 16 / 9; }

/* ---------- File viewer: the club's images and PDFs open over the page (fileViewer.ts) ---------- */
.has-file-viewer { overflow: hidden; }

.file-viewer {
    width: min(96vw, 70rem);
    height: min(92vh, 60rem);
    max-width: none;
    max-height: none;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: #2b2f2e;
    color: #fff;
    box-shadow: 0 24px 64px rgb(0 0 0 / .45);
    overflow: hidden;
}
.file-viewer[open] { display: flex; flex-direction: column; }
.file-viewer::backdrop { background: rgb(12 16 15 / .72); }

.file-viewer__bar { display: flex; align-items: center; gap: .75rem; padding: .6rem .6rem .6rem 1rem; background: #1f2322; }
.file-viewer__title { flex: 1; min-width: 0; contain: inline-size; margin: 0; font: 600 1rem/1.3 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-viewer__actions { display: flex; align-items: center; gap: .35rem; flex-shrink: 0; }
.file-viewer__action {
    display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 .85rem; border-radius: 999px;
    color: #fff; font-size: .9rem; font-weight: 600; text-decoration: none; background: rgb(255 255 255 / .1);
}
.file-viewer__action:hover { background: rgb(255 255 255 / .2); text-decoration: none; }
.file-viewer__close {
    width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; cursor: pointer;
    background: rgb(255 255 255 / .1); color: #fff; font-size: 1.6rem; line-height: 1;
}
.file-viewer__close:hover { background: rgb(255 255 255 / .2); }

.file-viewer__body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.file-viewer__pdf { width: 100%; height: 100%; }
.file-viewer__pdf iframe { display: block; }
.file-viewer__image {
    max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
    /* Checkerboard so a transparent image with light content still shows */
    background: repeating-conic-gradient(#e9ecef 0% 25%, #fff 0% 50%) 50% / 24px 24px;
}
.file-viewer__message { padding: 2rem; text-align: center; }

/* An image: the viewer fits around it. fileViewer.ts sizes the image - a small one is enlarged to the viewer's minimum
   size, a large one shrunk to fit the screen. The title (contain above) never widens it. PDFs keep the large size. */
.file-viewer:not(.is-pdf) { width: fit-content; height: fit-content; max-width: 96vw; max-height: 92vh; }
.file-viewer:not(.is-pdf) .file-viewer__body { flex: none; }
.file-viewer:not(.is-pdf) .file-viewer__image { max-width: none; max-height: none; }

@media (max-width: 40rem) {
    .file-viewer.is-pdf { width: 100vw; height: 100dvh; border-radius: 0; }
    .file-viewer:not(.is-pdf) { max-width: 100vw; }
    .file-viewer__action { padding: 0 .6rem; font-size: .85rem; }
}

/* PDF pages drawn by gmPdfViewer (shared with the 18Holes admin, where site.css holds the same rules) */
.gm-pdf-viewer { width: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #525659; padding: 12px; text-align: center; }
.gm-pdf-page { width: 100%; max-width: 850px; margin: 0 auto 12px; background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .4); }
.gm-pdf-page:last-child { margin-bottom: 0; }
.gm-pdf-page canvas { display: block; width: 100%; height: 100%; }
.gm-pdf-status { color: #fff; margin: 2rem 0; }


/* ---------- Hero background video ---------- */
/* Sits over the image and under the overlay; sized like object-fit: cover for a 16:9 player */
.hero__video { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; container-type: size; }
.hero__video iframe { position: absolute; top: 50%; left: 50%; width: max(100cqw, 177.78cqh); height: max(100cqh, 56.25cqw); transform: translate(-50%, -50%); border: 0; }
@media (prefers-reduced-motion: reduce) {
    .hero__video { display: none; }
}

/* ---------- Notice ---------- */
.notice { padding: 1.1rem 1.25rem; border-radius: var(--radius); border: 1px solid var(--line); border-left: 6px solid var(--club-primary); background: var(--surface-alt); }
.notice--important { border-left-color: #b45309; background: #fff7e6; color: #3d2a05; }
.notice__heading { font-size: 1.25rem; margin: 0 0 .35em; }
.notice__text, .notice__link { margin: 0; }
.notice__link { margin-top: .5rem; font-weight: 600; }
.notice--important a { color: inherit; }
/* Preview only: a notice outside its dates */
.notice--off { opacity: .6; border-style: dashed; }
.notice__off { margin: 0 0 .5rem; font-size: .85rem; font-weight: 600; }
.blk--notice { padding-block: 1.5rem; }
.blk--notice + .blk { padding-top: 0; }
.blk--hero + .blk--notice { padding-top: 1.5rem; }
.blk--notice + .blk--hero, .blk--notice + .blk--callToAction { margin-top: 0; }

/* ---------- Course status ---------- */
.course-status { padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.5); background: var(--surface); }
.course-status__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin-bottom: 1rem; }
.course-status__heading { font-size: 1.5rem; margin: 0; }
.course-status__date { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.course-status__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.status { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem .45rem .5rem; border-radius: 999px; font-weight: 600; background: var(--surface-alt); }
.status__mark { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; color: #fff; font-size: .95rem; line-height: 1; }
.status--good .status__mark { background: #15803d; }
.status--bad { background: #fdecec; color: #7f1d1d; }
.status--bad .status__mark { background: #b91c1c; }
.course-status__note { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* ---------- Logos: scrolling strip ---------- */
.logo-strip { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent); }
.logo-strip__track { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; width: max-content; animation: logo-strip calc(var(--logo-count, 8) * 3.5s) linear infinite; }
.logo-strip:hover .logo-strip__track, .logo-strip:focus-within .logo-strip__track { animation-play-state: paused; }
.logo-strip .logos__item { flex: none; width: 11rem; height: 7rem; }
/* The track holds the logos twice; half its width (plus half a gap) is one full set */
@keyframes logo-strip { to { transform: translateX(calc(-50% - .5rem)); } }
@media (prefers-reduced-motion: reduce) {
    /* No movement: the strip scrolls by hand, and the repeated set isn't needed */
    .logo-strip { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
    .logo-strip__track { padding-inline: 1rem; }
    .logo-strip .logos__item[aria-hidden="true"] { display: none; }
}

/* ---------- Course tour ---------- */
.holes { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.hole { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; scroll-margin-top: calc(var(--header-height) + 1rem); }
.hole__image { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hole__body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem; }
.hole__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; margin-bottom: .6rem; }
.hole__number { color: var(--club-primary); }
.hole__name { font-family: var(--font-body); font-weight: 500; font-size: 1rem; color: var(--ink-soft); }
.hole__facts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0 0 .9rem; }
.hole__facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.hole__facts dd { margin: 0; font-weight: 600; }
.hole__text { color: var(--ink-soft); }
.hole__sponsor { display: flex; align-items: center; gap: .6rem; margin: auto 0 0; padding-top: .9rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-soft); }
.hole__sponsor img { max-height: 2.25rem; width: auto; }

/* ---------- Site-wide area ---------- */
/* The page's last block already ends with its own space (a banner ends flush, so the space here is all there is) */
.site-shared { padding-top: var(--section-space); border-top: 1px solid var(--line); }
.site-shared .blk:first-child { padding-top: 0; }
.site-shared .blk:last-child { padding-bottom: 0; }
.site-shared-note { margin: 1rem auto 0; padding: .6rem .9rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-soft); font-size: .9rem; }

/* ---------- Event calendar ---------- */
/* The same calendar members see in 18Holes (Clubs > Competitions), in the club site's colours.
   Each competition is drawn by events.ts; --comp-colour is the colour of who it is for. */
.events { --fc-border-color: var(--line); --fc-today-bg-color: color-mix(in srgb, var(--club-accent) 14%, transparent);
    --fc-button-bg-color: var(--club-primary); --fc-button-border-color: var(--club-primary); --fc-button-text-color: var(--on-primary);
    --fc-button-hover-bg-color: color-mix(in srgb, var(--club-primary) 85%, #000); --fc-button-hover-border-color: color-mix(in srgb, var(--club-primary) 85%, #000);
    --fc-button-active-bg-color: color-mix(in srgb, var(--club-primary) 75%, #000); --fc-button-active-border-color: color-mix(in srgb, var(--club-primary) 75%, #000);
    --fc-list-event-hover-bg-color: var(--surface-alt); --fc-neutral-bg-color: var(--surface-alt); --fc-page-bg-color: var(--surface); }
.events__bar { display: flex; justify-content: flex-end; padding: 0 .25rem .5rem; }
.events__bar[hidden] { display: none; }
.events__toggle { border: 0; background: none; padding: .25rem 0; color: var(--club-primary); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.events__calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.events .fc { font-family: var(--font-body); }
.events .fc .fc-toolbar.fc-header-toolbar { margin: 0; padding: .75rem 1rem; }
.events .fc .fc-toolbar-title { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: 1.4rem; }
.events .fc .fc-button { text-transform: none; font-weight: 600; box-shadow: none; }
.events .fc .fc-button:focus-visible { outline: 3px solid var(--club-accent); outline-offset: 2px; }
.events .fc .fc-scrollgrid { border-left: 0; border-right: 0; border-bottom: 0; }
.events .fc .fc-col-header-cell-cushion, .events .fc .fc-daygrid-day-number { color: var(--ink); text-decoration: none; }
.events .fc .fc-daygrid-day { cursor: pointer; }
.events .fc .fc-list { border: 0; border-top: 1px solid var(--line); }
.events .fc .fc-list-day-cushion a { color: var(--ink); text-decoration: none; }

/* FullCalendar paints every event blue; the pill below takes over */
.events .fc-daygrid-event, .events .fc-daygrid-event:hover { background: transparent; border: 0; margin-top: 2px; }
.comp-pill { width: 100%; padding: .1rem .4rem; border-left: 3px solid var(--comp-colour, #adb5bd); border-radius: 3px;
    background: color-mix(in srgb, var(--comp-colour, #adb5bd) 14%, #fff); color: #343a40; font-size: .8rem; font-weight: 500; line-height: 1.35;
    white-space: normal; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; cursor: pointer; }
@media (max-width: 35.99rem) {
    /* Phone-width day cells are too narrow to wrap words sensibly: one line, cut off */
    .comp-pill { display: block; white-space: nowrap; text-overflow: ellipsis; padding: .1rem .2rem; font-size: .7rem; }
    .events .fc .fc-toolbar-title { font-size: 1.15rem; }
    .events .fc .fc-button { padding: .25rem .55rem; font-size: .85rem; }
}
@media (hover: hover) {
    .events .fc-daygrid-event:hover .comp-pill { background: color-mix(in srgb, var(--comp-colour, #adb5bd) 26%, #fff); }
}

/* List view. Every competition is all-day, so the time column only ever said "all-day" */
.events .fc-list-event-time { display: none; }
.events .fc-list-event td { cursor: default; }

/* The calendar's previous/next arrows come from an icon font embedded in FullCalendar's CSS, which browsers reject
   here, so the arrows showed blank. Draw them as plain text arrows in the site's own font instead. */
.events .fc .fc-icon { font-family: inherit !important; font-size: 1.5em; line-height: 1; font-weight: 700; }
.events .fc .fc-icon-chevron-left::before { content: "\2039"; }
.events .fc .fc-icon-chevron-right::before { content: "\203A"; }
.comp-list-title { font-weight: 600; color: inherit; }
.comp-list-type { color: var(--ink-soft); font-size: .85rem; margin-left: .35rem; }
.comp-list-teetimes { margin-left: .5rem; color: var(--ink-soft); font-size: .8rem; white-space: nowrap; }
.comp-list-teetimes::before { content: "Tee times "; }
.comp-unnamed { font-style: italic; color: var(--ink-soft); }
.comp-list-notes { margin-top: .15rem; color: var(--ink-soft); font-size: .85rem; white-space: pre-line; }

/* Day box: clicking a day shows its competitions in full, above the day */
.events .fc-daygrid-day.comp-day-selected { background: color-mix(in srgb, var(--club-primary) 10%, transparent); }
.comp-day-box { position: absolute; z-index: 60; width: min(320px, calc(100vw - 16px)); background: #fff; color: var(--ink); border: 1px solid rgb(0 0 0 / .15); border-radius: .4rem; box-shadow: 0 .5rem 1.25rem rgb(0 0 0 / .18); }
.comp-day-box::after { content: ""; position: absolute; left: var(--arrow-left, 50%); bottom: -7px; width: 12px; height: 12px; background: #fff;
    border-right: 1px solid rgb(0 0 0 / .15); border-bottom: 1px solid rgb(0 0 0 / .15); transform: translateX(-50%) rotate(45deg); }
.comp-day-box.comp-day-box-below::after { top: -7px; bottom: auto; border: 0; border-left: 1px solid rgb(0 0 0 / .15); border-top: 1px solid rgb(0 0 0 / .15); }
.comp-day-box-head { display: flex; justify-content: space-between; align-items: center; padding: .45rem .5rem .45rem .75rem; border-bottom: 1px solid var(--line); font-size: .9rem; font-weight: 600; }
.comp-day-box-close { border: 0; background: none; padding: 0 .35rem; color: var(--ink-soft); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.comp-day-box-list { list-style: none; margin: 0; padding: .35rem .5rem; max-height: 45vh; overflow-y: auto; overscroll-behavior: contain; }
.comp-day-box-list li, .events__upcoming ul li { margin: .3rem 0; padding: .4rem .6rem; border-left: 3px solid var(--comp-colour, #adb5bd); border-radius: 3px;
    background: color-mix(in srgb, var(--comp-colour, #adb5bd) 10%, #fff); font-size: .9rem; line-height: 1.4; }

/* Without scripts: the coming competitions as a plain list */
.events__upcoming, .events__upcoming ul { list-style: none; margin: 0; padding: 0; }
.events__upcoming { padding: 1rem; display: grid; gap: .75rem; }
.events__upcoming time { font-weight: 700; }
.events__calendar > .muted { margin: 0; padding: 1rem; }

.booking-frame { display: block; width: 100%; min-height: 80vh; border: 0; margin-block: 1.5rem; }

/* Section pages (a menu item with sub-pages): the pages of the section in a side menu, beside the content.
   On a phone the menu comes first, above any banner. */
.section-layout { display: grid; grid-template-columns: minmax(1rem, 1fr) minmax(12rem, 15rem) minmax(0, 57rem) minmax(1rem, 1fr); align-items: start; }
.section-banner { grid-column: 1 / -1; grid-row: 1; }
/* The menu and the page line up with the rest of the site (72rem wide, centred), whatever the screen width */
.section-menu { grid-column: 2; grid-row: 2; position: sticky; top: calc(var(--header-height, 4rem) + 1rem); margin: 2rem 0; background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.section-content { grid-column: 3; grid-row: 2; min-width: 0; padding: 2rem 0 2rem 2.5rem; }
.section-layout--side .section-content .wrap { width: 100%; }
.section-menu__parent { font-family: var(--font-heading); font-weight: var(--heading-weight) !important; }
.section-menu ul { list-style: none; margin: 0; padding: 0; }
.section-menu a { display: block; padding: .55rem .6rem; border-radius: calc(var(--radius) * .6); color: var(--ink); text-decoration: none; font-weight: 500; }
.section-menu a:hover { background: var(--surface); }
.section-menu a[aria-current="page"] { background: var(--club-primary); color: #fff; font-weight: 700; }
/* "Links above the page" (and every section page on a phone): the menu is a row of links above the content */
.section-layout--top { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
.section-layout--top .section-menu { grid-column: 1; grid-row: 2; top: auto; position: static; margin: 1.5rem auto 0; width: min(100% - 2rem, var(--wrap)); }
.section-layout--top .section-banner { grid-column: 1; grid-row: 1; }
.section-layout--top .section-content { grid-column: 1; grid-row: 3; padding: 1rem 0 2rem; }
.section-layout--top .section-menu ul { display: flex; flex-wrap: wrap; gap: .4rem; }
.section-layout--top .section-menu a { display: inline-block; padding: .4rem .7rem; border: 1px solid var(--line); background: var(--surface); }
@media (max-width: 47.99rem) {
    .section-layout { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
    .section-layout .section-menu { grid-column: 1; grid-row: auto; order: -1; position: static; margin: 1rem 1rem 0; width: auto; }
    .section-layout .section-banner { grid-column: 1; grid-row: auto; order: 0; }
    .section-layout .section-content { grid-column: 1; grid-row: auto; order: 1; padding: 1rem 0 2rem; }
    .section-layout--side .section-content .wrap { width: min(100% - 2rem, var(--wrap)); }
    .section-menu ul { display: flex; flex-wrap: wrap; gap: .4rem; }
    .section-menu a { display: inline-block; padding: .4rem .7rem; border: 1px solid var(--line); background: var(--surface); }
}

/* ---------- Site design: header, phone menu and footer ----------
   Built from each site's design data (Views/Shared/Design). The site chooses the rows, the parts in them, their
   options and backgrounds; these rules draw every combination. Nothing here is specific to one club. */

/* Backgrounds a row, the phone menu or the footer can use. Parts take their colours from these. */
.bg-surface { background: var(--surface); color: var(--ink); --part-link: var(--club-primary); --part-line: var(--line); --part-hover: var(--surface-alt); --part-panel: var(--surface); }
.bg-alt { background: var(--surface-alt); color: var(--ink); --part-link: var(--club-primary); --part-line: var(--line); --part-hover: color-mix(in srgb, var(--ink) 7%, var(--surface-alt)); --part-panel: var(--surface-alt); }
.bg-primary { background: var(--club-primary); color: var(--on-primary); --part-link: var(--on-primary); --part-line: rgb(255 255 255 / .22); --part-hover: rgb(255 255 255 / .12); --part-panel: var(--club-primary); }
.bg-accent { background: var(--club-accent); color: var(--on-accent); --part-link: var(--on-accent); --part-line: rgb(0 0 0 / .15); --part-hover: rgb(0 0 0 / .08); --part-panel: var(--club-accent); }
.bg-dark { background: #141917; color: #fff; --part-link: #fff; --part-line: rgb(255 255 255 / .18); --part-hover: rgb(255 255 255 / .1); --part-panel: #141917; }

/* Phones and computers: 60rem is where the main menu replaces the menu button */
@media (max-width: 59.99rem) { .only-desktop { display: none !important; } }
@media (min-width: 60rem) { .only-phone { display: none !important; } }

/* Header */
.site-header { position: relative; z-index: 50; box-shadow: 0 1px 0 var(--line); }
.site-header.is-sticky { position: sticky; top: 0; }
.hdr-row--compact { --row-height: 2.75rem; }
.hdr-row--normal { --row-height: 4.5rem; }
.hdr-row--tall { --row-height: 5.75rem; }
.hdr-row__inner { display: flex; align-items: center; gap: 1rem; min-height: var(--row-height, 4.5rem); padding-block: .35rem; }
.hdr-slot { display: flex; align-items: center; gap: .5rem 1.25rem; min-width: 0; }
.hdr-slot--right { margin-left: auto; justify-content: flex-end; flex-wrap: wrap; }
/* With something in the centre, it stays centred whatever is beside it */
.hdr-row__inner--centred { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.hdr-row__inner--centred .hdr-slot--center { justify-content: center; }
.hdr-row__inner--centred .hdr-slot--right { margin-left: 0; }
.hdr-row .part--phone, .hdr-row .part--email, .hdr-row .part-text--small { font-size: .85rem; }
.hdr-row a:not(.btn) { color: inherit; }

/* Logo */
.part-logo { display: flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; min-width: 0; }
.part-logo__img { width: auto; height: var(--logo-height, 3rem); max-width: min(30rem, 60vw); object-fit: contain; }
.part-logo--small { --logo-height: 2.25rem; }
.part-logo--medium { --logo-height: 3rem; }
.part-logo--large { --logo-height: 3.75rem; }
.part-logo--xlarge { --logo-height: 4.75rem; }
.part-logo__name { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: 1.15rem; line-height: 1.2; }
@media (max-width: 59.99rem) {
    .part-logo--large, .part-logo--xlarge { --logo-height: 3.25rem; }
    .part-logo__img { max-width: calc(100vw - 7.5rem); }
}

/* Main menu (computers) */
.part-menu__list, .part-menu__sub, .phone-menu__list, .phone-menu__sub, .part-social, .part-pagelinks { list-style: none; margin: 0; padding: 0; }
.part-menu__list { display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem; }
.part-menu__item { position: relative; }
.part-menu__item > a { display: block; padding: .5rem .75rem; color: inherit; text-decoration: none; font-weight: 500; border-radius: var(--radius); white-space: nowrap; }
.part-menu__item > a:hover { background: var(--part-hover); }
.part-menu a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-underline-offset: .35em; }
.bg-surface .part-menu__item > a[aria-current="page"], .bg-alt .part-menu__item > a[aria-current="page"] { color: var(--club-primary); }
.part-menu--caps .part-menu__item > a { text-transform: uppercase; font-size: .78rem; font-weight: 600; letter-spacing: .04em; padding-inline: .6rem; }
.part-menu__sub {
    position: absolute; top: 100%; left: 0; z-index: 60; min-width: 14rem; padding: .5rem;
    background: var(--part-panel); border: 1px solid var(--part-line); border-radius: var(--radius); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s ease, transform .15s ease;
}
.part-menu__item:hover .part-menu__sub, .part-menu__item:focus-within .part-menu__sub { opacity: 1; visibility: visible; transform: none; }
.part-menu__sub a { display: block; padding: .55rem .75rem; color: inherit; text-decoration: none; border-radius: 6px; text-transform: none; letter-spacing: normal; font-size: .95rem; }
.part-menu__sub a:hover { background: var(--part-hover); }
/* A long menu on a narrower computer screen: smaller, so it fits (it wraps rather than hides if it still doesn't) */
@media (min-width: 60rem) and (max-width: 80rem) {
    .part-menu__item > a { padding-inline: .5rem; font-size: .95rem; }
    .part-menu--caps .part-menu__item > a { font-size: .7rem; padding-inline: .4rem; letter-spacing: .02em; }
}

/* Menu button (phones) */
.nav-toggle { display: inline-grid; place-items: center; width: 2.9rem; height: 2.9rem; border: 1px solid var(--part-line, var(--line)); border-radius: var(--radius); background: transparent; color: inherit; cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 1.25rem; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s ease; }
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Phone menu: drops down under the whole header. Room at the end so the last page clears the Book / Call bar. */
.phone-menu { display: none; }
@media (max-width: 59.99rem) {
    .phone-menu.is-open {
        display: block; position: absolute; inset: 100% 0 auto 0;
        padding: .5rem 1rem 5rem; max-height: calc(100dvh - var(--header-height)); overflow-y: auto;
        border-top: 1px solid var(--part-line); box-shadow: var(--shadow);
    }
}
.phone-menu__top { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; padding: .75rem .25rem; border-bottom: 1px solid var(--part-line); }
.phone-menu__list > li > a, .phone-menu__sub a { display: block; padding: .8rem .25rem; color: inherit; text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--part-line); }
.phone-menu__sub a { padding-left: 1.25rem; font-weight: 400; }
.phone-menu a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-underline-offset: .3em; }
.phone-menu a:not(.btn) { color: inherit; }

/* Small parts */
.part-link { color: var(--part-link, var(--club-primary)); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; text-decoration: none; cursor: pointer; }
.part-link:hover { text-decoration: underline; }
.part-text { margin: 0; }
.hdr-row .part-text { white-space: nowrap; }
.part-text--small { font-size: .85rem; }
.part-status-text { font-size: .8rem; font-weight: 600; }
.part-status-text.is-closed { font-weight: 700; }
/* The day's note sits centred under the two statuses and wraps within their width (it never widens the part):
   the statuses set the grid's width, and the note's zero width with a 100% minimum takes exactly that */
.part--courseStatus { display: inline-grid; justify-items: center; row-gap: .25rem; }
.part-status-note { width: 0; min-width: 100%; font-size: .72rem; font-style: italic; line-height: 1.35; text-align: center; opacity: .7; overflow-wrap: anywhere; }
.part-social { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.part-social a { display: inline-flex; align-items: center; gap: .4rem; color: inherit; }
/* Book a Round in the header: a compact button that sits on any background */
.hdr-row .part-book { min-height: 0; padding: .55rem 1.1rem; font-size: .78rem; letter-spacing: .05em; line-height: 1.2; white-space: nowrap; }
.phone-menu .part-book { width: 100%; }

/* Course status: one quiet pill with the course and cart status, each a small dot and its words. Red words only
   where they read well (light rows); on a coloured row the dot carries the colour and the words keep the row's ink. */
.course-chips { display: inline-flex; align-items: center; gap: 0; padding: .3rem .8rem; border: 1px solid var(--part-line, var(--line)); border-radius: 999px; font-size: .8rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.course-chip { display: inline-flex; align-items: center; gap: .4rem; }
.course-chip + .course-chip { margin-left: .7rem; padding-left: .7rem; border-left: 1px solid var(--part-line, var(--line)); }
.course-chip__dot { width: .55rem; height: .55rem; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 2px color-mix(in srgb, #16a34a 22%, transparent); flex: none; }
.course-chip--bad .course-chip__dot { background: #dc2626; box-shadow: 0 0 0 2px color-mix(in srgb, #dc2626 22%, transparent); }
.bg-surface .course-chip--bad, .bg-alt .course-chip--bad, .blk .course-chip--bad { color: #b42318; }

/* Footer */
.site-footer { margin-top: var(--section-space); padding-block: 3rem 1.5rem; }
.site-footer a { color: inherit; }
.site-footer__grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.site-footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.part-clubname { margin: 0; font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: 1.3rem; }
.part-footertext { margin: 0; opacity: .85; font-size: .95rem; }
.part-pagelinks { display: grid; gap: .4rem; }
.site-footer__credit { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--part-line); font-size: .85rem; opacity: .75; }
