/* /css/styles.css
 *
 * Frontend stylesheet for SonaCMS public-facing pages.
 *
 * DESIGN GOAL: mimic the Editor.js editing surface as closely as possible,
 * so the published page is a faithful WYSIWYG match of what the author sees
 * in the backend editor. That means adopting Editor.js's own baseline:
 *   - system sans-serif font stack (not a serif override)
 *   - 16px base, ~1.6 line-height on body text
 *   - native heading scale
 *   - tight, consistent block spacing
 * ...while preserving the site's 1280px content width.
 *
 * Organised as:
 *   1. Reset & base
 *   2. Layout
 *   3. Typography / Editor.js block rendering
 *   4. Utility
 */

/* ─── 1. Reset & base ─────────────────────────────────────────────────────── */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    /* Guard against a horizontal scrollbar from full-bleed coloured sections.
       The full-width technique uses 100vw, which can be a hair wider than the
       visible area (100vw includes the scrollbar width); this contains it. */
    overflow-x: hidden;
}

/* Editor.js's default font stack — matching it here is what makes the
   frontend text reflow identically to the editor. */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol";
    color: #1d202b;              /* Editor.js default text colour */
    background: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

p {
    padding-top: 0.4em;
    padding-bottom: 0.4em;
}

/* NOTE: namgolf brand override — Oswald for h1/h2, not in core. */
h1, h2 {
    font-family: "Oswald", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

/* ─── 2. Layout ───────────────────────────────────────────────────────────── */

.site-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

/* NOTE: namgolf brand override — blue header, no border. Core default
   (border-bottom, no background) was here before; keeping namgolf's version
   since this file lives in the namgolf build. Flag if this should flip. */
.site-header {
    padding: 24px 0;
    background-color: #07ACEC;
}

.site-main {
    padding: 0px 0 20px;
}

.site-footer {
    padding: 0px 0;
    font-size: 0.875em;
    color: #888;
}
.footer_wrap {
    margin-top: 20px;
    font-style: bold;
    text-align: center;
    color: #FFFFFF;
    padding: 20px;
    background-color: #6BB447;
    font-family: "Oswald", sans-serif;
    font-size: 1.4em;
}

/* ─── 3. Typography / Editor.js block rendering ──────────────────────────── */

/*
 * These classes mirror the block types saved by Editor.js. Each rendered
 * block is wrapped in a .cms-block div by the PHP renderer, with a
 * type-specific class alongside (e.g. .cms-block--paragraph).
 *
 * Values below intentionally track Editor.js's own rendered defaults so the
 * published output matches the editing surface.
 */

.cms-content {
    max-width: 1280px;
    margin: 0 auto;
    margin-top: 40px;
    font-size: 1em;           /* 16px, same as the editor */
    line-height: 1.6;
    color: #1d202b;
}

.cms-content.cms-content--full {
    max-width: 100%;
}

/* When the page opens with a full-bleed coloured section (like the homepage's
   green tiles band), cancel the content's 40px top margin so the section butts
   directly against the hero. Without this, that margin exposes a white strip
   between the hero and the section. Normal pages, which open with text, keep
   the 40px breathing room. Two selectors cover both markup cases: the section
   as a direct first child, or wrapped in the first .cms-block. */
.cms-content:has(> .cms-section:first-child),
.cms-content:has(> .cms-block:first-child .cms-section) {
    margin-top: 0;
}

/* Editor.js gives each block ~0.4em vertical rhythm. Match that rather than
   the large 1.5em gaps a typical article layout would use. */
.cms-block {
    margin: 0 0 0.6em;
}

/* Paragraph — Editor.js renders plain <p> at base size / 1.6 line-height */
.cms-block--paragraph p,
.cms-content p {
    font-size: 1em;
    line-height: 1.6;
    color: #1d202b;
}

/* Headers — Editor.js uses the browser's native heading scale (bold),
   not a custom serif scale. Reproduce the UA defaults explicitly so they
   render identically regardless of the visitor's browser. */
.cms-block--header h1,
.cms-block--header h2,
.cms-block--header h3,
.cms-block--header h4,
.cms-block--header h5,
.cms-block--header h6,
.cms-content h1,
.cms-content h2,
.cms-content h3,
.cms-content h4,
.cms-content h5,
.cms-content h6 {
    font-weight: 700;
    line-height: 1.25;
    color: #1d202b;
    /* margin: 0.6em 0 0.3em; */
}

.cms-block--header h1, .cms-content h1 { font-size: 2.6em !important; }  /* namgolf override */
.cms-block--header h2, .cms-content h2 { font-size: 2.6em; }             /* namgolf override */
.cms-block--header h3, .cms-content h3 { font-size: 1.17em; }    /* ~19px */
.cms-block--header h4, .cms-content h4 { font-size: 1em; }       /* 16px */
.cms-block--header h5, .cms-content h5 { font-size: 0.83em; }    /* ~13px */
.cms-block--header h6, .cms-content h6 { font-size: 0.67em; }    /* ~11px */



/* namgolf brand override — small yellow bar under content h2 headings,
   left-aligned (sits at the h2's left edge, on its own line beneath the text).
   Block ::after with no auto side-margins stays left, matching the left-aligned
   heading. Scoped to content h2s so it doesn't attach to h2s inside tiles/cards. */
.cms-block--header h2::after,
.cms-content h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    margin-top: 8px;
    background: yellow;
}

/* List — Editor.js indents lists ~1.6em and uses base body sizing */
.cms-block--list ul,
.cms-block--list ol,
.cms-content ul,
.cms-content ol {
    padding-left: 1.6em;
    font-size: 1em;
    line-height: 1.6;
    color: #1d202b;
}

.cms-block--list li,
.cms-content li {
    margin-bottom: 0.2em;
}

/* Quote — Editor.js quote block: subtle left rule, slightly muted */
.cms-block--quote blockquote,
.cms-content blockquote {
    border-left: 3px solid #e0e0e0;
    margin: 0;
    padding: 6px 16px;
    color: #3a3a3a;
    font-size: 1em;
    line-height: 1.6;
}

.cms-block--quote cite,
.cms-content blockquote cite {
    display: block;
    margin-top: 8px;
    font-size: 0.85em;
    font-style: normal;
    color: #888;
}

/* Image — Editor.js image block: full width of the content column,
   optional caption below in muted small text */
.cms-block--image figure {
    margin: 0;
}

.cms-block--image img {
    width: 100%;
    border-radius: 3px;
}

.cms-block--image figcaption {
    margin-top: 6px;
    font-size: 0.85em;
    color: #888;
    text-align: center;
}

/* Video embed (custom VideoEmbedTool) — 16:9 responsive */
.cms-block--video .video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 3px;
}

.cms-block--video .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Button (custom ButtonTool) */
.cms-block--button {
    margin: 1em 0;
}

.cms-block--button a {
    display: inline-block;
    padding: 12px 28px;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 600;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

.cms-block--button a.cms-button--primary {
    background: #1d202b;
    color: #ffffff;
    border: 2px solid #1d202b;
}

.cms-block--button a.cms-button--primary:hover {
    background: #383d4f;
    border-color: #383d4f;
}

.cms-block--button a.cms-button--secondary {
    background: transparent;
    color: #1d202b;
    border: 2px solid #1d202b;
}

.cms-block--button a.cms-button--secondary:hover {
    background: #1d202b;
    color: #ffffff;
}

/* Columns (editorjs-columns) */
.cms-block--columns .cms-columns,
.cms-columns {
    display: grid;
    gap: 40px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.cms-block--columns .cms-column,
.cms-column {
    min-width: 0;
}

/* Inline formatting inside blocks — match Editor.js inline tools */
.cms-content a {
    color: #1b7a8c;
    text-decoration: underline;
}

.cms-content b,
.cms-content strong {
    font-weight: 700;
}

.cms-content i,
.cms-content em {
    font-style: italic;
}

.cms-content u {
    text-decoration: underline;
}

/* Editor.js inline-code tool renders <code> with a subtle chip style */
.cms-content code {
    background: #f2f4f7;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: Menlo, Monaco, Consolas, monospace;
}

/* ─── 4. Utility ──────────────────────────────────────────────────────────── */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .site-wrap {
        padding: 0 24px;
    }

    .cms-block--columns .cms-columns,
    .cms-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .site-wrap {
        padding: 0 16px;
    }
}

/* Frontend licensing footer line */
.site-footer__license {
    font-size: 0.85em;
    color: #888;
    text-align: center;
    padding: 0;
}

.site-footer__license a {
    color: #1b7a8c;
    text-decoration: none;
}

.site-footer__license a:hover {
    text-decoration: underline;
}

/* Author tile (custom AuthorTool) */
.cms-block--author {
    margin: 1.5em 0;
}

.cms-author-tile {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fafbfc;
}

.cms-author-tile__pic {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
}

.cms-author-tile__pic img {
    width: 100px !important;
    height: 100px !important;
    min-width: 100px;
    max-width: 100px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.cms-author-tile__body {
    flex: 1;
    min-width: 0;
}

.cms-author-tile__name {
    display: block;
    font-size: 1.15em;
    font-weight: 700;
    color: #1d202b;
    text-decoration: none;
}

a.cms-author-tile__name:hover {
    color: #1b7a8c;
    text-decoration: underline;
}

/* Reset the global p padding for tile text so lines sit tight together */
.cms-author-tile__title,
.cms-author-tile__desc {
    padding-top: 0;
    padding-bottom: 0;
}

.cms-author-tile__title {
    margin: 2px 0 6px;
    font-size: 0.9em;
    color: #1b7a8c;
    font-weight: 600;
}

.cms-author-tile__desc {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.6;
    color: #555;
}

@media (max-width: 600px) {
    .cms-author-tile {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Keep the pic centred and correctly sized when stacked */
    .cms-author-tile__pic {
        margin: 0 auto;
        flex: 0 0 100px;
    }

    /* Reassert padding reset — the global p padding can otherwise creep back
       in and space the name/title/description apart on mobile */
    .cms-author-tile__title,
    .cms-author-tile__desc {
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* Text alignment (from the editor's alignment tune) */
.cms-align-left    { text-align: left; }
.cms-align-center  { text-align: center; }
.cms-align-right   { text-align: right; }
.cms-align-justify { text-align: justify; }

/* Code block (custom CodeTool) */
.cms-block--code {
    margin: 1.2em 0;
}

.cms-block--code pre {
    margin: 0;
    padding: 16px 18px;
    background: #1d202b;
    color: #e6edf3;
    border-radius: 6px;
    overflow-x: auto;
    line-height: 1.55;
}

.cms-block--code code {
    display: block;
    background: none;
    padding: 0;
    border-radius: 0;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 0.875em;
    color: inherit;
    white-space: pre;
    tab-size: 4;
}

/* Hero banner (from the page's Hero Image / Title / Subtitle fields) */
.site-hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Dark overlay so the title/subtitle stay legible over any image.
   Designers can remove or restyle this freely. */
.site-hero__overlay {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 420px; /* namgolf override */
    padding: 60px 24px;
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
}

.site-hero__title {
    margin: 0;
    font-size: 3.6em; /* namgolf override */
    font-weight: 700;
    line-height: 1.15;
    max-width: 900px;
}

/* namgolf brand override — short centred yellow bar under the hero title.
   Uses ::after as a block element; auto side margins centre it beneath the
   (already-centred) title text. */
.site-hero__title::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    margin: 16px auto 0;
    background: yellow;
}

.site-hero__subtitle {
    margin: 12px 0 0;
    font-size: 2em;
    font-weight: 400;
    line-height: 1.4;
    max-width: 720px;
    padding: 0;
}

/* Tablet — trim the hero height and scale text down a step */
@media (max-width: 900px) {
    .site-hero__overlay {
        min-height: 300px;
        padding: 50px 22px;
    }
    .site-hero__title { font-size: 3em; }
    .site-hero__subtitle { font-size: 1.6em; }
}

/* Mobile — compact banner, comfortable text, keep the image focal point
   toward the top so faces/subjects aren't cropped out of frame */
@media (max-width: 600px) {
    .site-hero {
        background-position: center top;
    }
    .site-hero__overlay {
        min-height: 220px;
        padding: 36px 18px;
        /* Slightly stronger scrim on mobile — text sits over a smaller area
           so contrast matters more */
        background: rgba(0, 0, 0, 0.45);
    }
    .site-hero__title {
        font-size: 2.5em;
        line-height: 1.2;
    }
    .site-hero__subtitle {
        font-size: 1.4em;
        margin-top: 10px;
    }
}

/* Very small phones — tighten once more so nothing overflows */
@media (max-width: 380px) {
    .site-hero__overlay {
        min-height: 190px;
        padding: 28px 14px;
    }
    .site-hero__title { font-size: 2em; }
    .site-hero__subtitle { font-size: 0.92em; }
}

/* Gallery grid (custom GalleryTool) — uniform square-crop thumbnails */
.cms-block--gallery {
    margin: 1.5em 0;
}

.cms-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.cms-gallery__item {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 4px;
    cursor: zoom-in;
}

.cms-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.cms-gallery__item:hover img {
    transform: scale(1.05);
}

/* Lightbox images — cue that they're clickable */
.cms-block--image a.cms-lightbox,
figure a.cms-lightbox {
    display: block;
    cursor: zoom-in;
}

/* Lightbox overlay */
.cms-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.88);
    padding: 40px;
}

.cms-lightbox-overlay.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cms-lightbox-overlay__figure {
    margin: 0;
    max-width: 92%;
    max-height: 92%;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: zoom-out;
}

.cms-lightbox-overlay__img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.cms-lightbox-overlay__caption {
    margin-top: 12px;
    color: #eaeaea;
    font-size: 0.9em;
    text-align: center;
    max-width: 700px;
}

.cms-lightbox-overlay__close {
    position: absolute;
    top: 18px;
    right: 26px;
    font-size: 2.4em;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    opacity: 0.8;
}

.cms-lightbox-overlay__close:hover {
    opacity: 1;
}

/* Prev / Next navigation arrows */
.cms-lightbox-overlay__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}

.cms-lightbox-overlay__nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.cms-lightbox-overlay__prev { left: 20px; }
.cms-lightbox-overlay__next { right: 20px; }

@media (max-width: 600px) {
    .cms-lightbox-overlay { padding: 16px; }
    .cms-lightbox-overlay__nav {
        width: 44px;
        height: 44px;
        font-size: 1.6em;
    }
    .cms-lightbox-overlay__prev { left: 8px; }
    .cms-lightbox-overlay__next { right: 8px; }
}


/* Publish date (shown when a page opts in via "Show publish date") */
.page-date {
    text-align: center;
    color: #888;
    font-style: italic;
    font-weight: bold;
    font-size: 0.9em;
    margin-top: 1em;
    margin-bottom: 1em;
    padding: 0;
}

/* Download block (custom DownloadTool) — styled download button/link */
.cms-block--download {
    margin: 1.2em 0;
}

.cms-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #f2f5f6;
    border: 1px solid #d4dcde;
    border-radius: 6px;
    text-decoration: none;
    color: #1d202b;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cms-download:hover {
    background: #e7f0f1;
    border-color: #1b7a8c;
}

.cms-download__icon {
    font-size: 1.3em;
    line-height: 1;
    color: #1b7a8c;
}

.cms-download__meta {
    color: #6a7a7f;
    font-size: 0.85em;
}

/* Coloured sections (from Section Start / Section End marker blocks).
   These are the preset backgrounds — redefine the colours to match your brand.
   A section spans every block between a "Section Start" and "Section End". */
.cms-section {
    /* Full-bleed: break out of the 1280px content column so the colour spans
       the whole viewport width. The negative margins pull the element out to
       each edge; width:100vw plus the margin trick centres it regardless of
       the container it sits in. Content inside is re-constrained by __inner. */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    margin-top: 0em;
    margin-bottom: 0em;
}

.cms-section__inner {
    /* Re-constrain the content to the site width and centre it, so text stays
       readable while the colour behind it runs full width. Match this max-width
       to your site container (.site-wrap). */
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 28px;
}

/* Preset colours — override these freely for your brand */
.cms-section--subtle    { background-color: #f6f8f9; }
.cms-section--muted     { background-color: #eceff1; }
.cms-section--highlight { background-color: #6BB447; margin-bottom: 40px; } /* namgolf override — club green */
.cms-section--accent    { background-color: #07ACEC; margin-bottom: 40px; } /* namgolf override — club blue */
.cms-section--dark      { background-color: #1d232b; color: #eef2f4; }

.cms-section--accent h1, .cms-section--accent h2, .cms-section--accent h3, .cms-section--accent h4, .cms-section--accent h5, .cms-section--accent h6, .cms-section--accent p, .cms-section--accent li, .cms-section--accent blockquote, .cms-section--accent figcaption {
    color: #FFFFFF;
}
.cms-section--highlight h1, .cms-section--highlight h2, .cms-section--highlight h3, .cms-section--highlight h4, .cms-section--highlight h5, .cms-section--highlight h6, .cms-section--highlight p, .cms-section--highlight li, .cms-section--highlight blockquote, .cms-section--highlight figcaption {
    color: #FFFFFF;
}
/* On a dark section, the base near-black text colour on headings/paragraphs
   would be invisible. These explicit rules override it with light text.
   (An explicit colour beats inheritance, so the section's own colour isn't
   enough on its own — these selectors are required.) */
.cms-section--dark h1,
.cms-section--dark h2,
.cms-section--dark h3,
.cms-section--dark h4,
.cms-section--dark p,
.cms-section--dark li,
.cms-section--dark blockquote,
.cms-section--dark figcaption {
    color: #eef2f4;
}

/* Keep links legible on dark */
.cms-section--dark a { color: #7ec8d3; }

/* namgolf brand override — yellow links inside the coloured brand sections,
   so they stand out against the blue/green backgrounds (the default teal
   content-link colour is low-contrast there). */
.cms-section--accent a,
.cms-section--highlight a {
    color: yellow;
}

/* Breathing room when normal content resumes in the column after a full-bleed
   section. The section carries no bottom margin (so stacked sections stay
   flush) and headings no longer carry a top margin, so without this the first
   block after a section — often a heading — butts right against the section's
   edge. Targets only a normal block following a section, so section-to-section
   stacking stays flush and content inside a section is unaffected. */
.cms-section + .cms-block {
    margin-top: 40px;
}

/* Mirror of the above — breathing room when normal content sits immediately
   before a full-bleed section, so the section doesn't butt against the block's
   bottom edge. Subject is .cms-block, so section-to-section stacking (a section
   before a section) stays flush and unaffected. */
.cms-block:has(+ .cms-section) {
    margin-bottom: 40px;
}

@media (max-width: 600px) {
    .cms-section__inner {
        padding: 28px 18px;
    }
}

/* Blog / news listing (renderBlogList) — restyle freely to suit your design */
.cms-bloglist {
    display: grid;
    gap: 20px;
    margin: 1.5em 0;
    grid-template-columns: 1fr;
}

/* Multi-column grids. Cards become VERTICAL (image on top, text below) — the
   standard blog-grid look, which reads far better than horizontal cards
   squeezed side by side. Columns collapse gracefully on smaller screens. */
.cms-bloglist--cols-2 { grid-template-columns: repeat(2, 1fr); }
.cms-bloglist--cols-3 { grid-template-columns: repeat(3, 1fr); }
.cms-bloglist--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .cms-bloglist--cols-3,
    .cms-bloglist--cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .cms-bloglist--cols-2,
    .cms-bloglist--cols-3,
    .cms-bloglist--cols-4 { grid-template-columns: 1fr; }
}

.cms-bloglist__card {
    display: flex;
    gap: 16px;
    text-decoration: none !important;
    color: inherit;
    border: 2px solid #e2e7e9;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.cms-bloglist__card:hover {
    border-color: #07ACEC;
    box-shadow: 0 4px 14px rgba(15, 92, 102, 0.1);
}

.cms-bloglist__image {
    flex: 0 0 200px;
    max-width: 200px;
}

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

/* In multi-column grids, cards stack vertically: image on top (fixed height),
   text below. Applies whenever the list is 2+ columns. */
.cms-bloglist--cols-2 .cms-bloglist__card,
.cms-bloglist--cols-3 .cms-bloglist__card,
.cms-bloglist--cols-4 .cms-bloglist__card {
    flex-direction: column;
    gap: 0;
}

.cms-bloglist--cols-2 .cms-bloglist__image,
.cms-bloglist--cols-3 .cms-bloglist__image,
.cms-bloglist--cols-4 .cms-bloglist__image {
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
    height: 350px; /* namgolf override */
}

.cms-bloglist__body {
    padding: 16px 18px;
    flex: 1;
    min-width: 0;
}

/* namgolf override: Oswald, larger size, explicit no-underline */
.cms-bloglist__title {
    margin: 0 0 6px;
    font-size: 2.6em !important;
    line-height: 1.25;
    color: #1d202b;
    text-decoration: none;
    font-family: "Oswald", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

.cms-bloglist__date {
    display: block;
    font-size: 1em;
    font-style: italic;
    color: #8a8a8a;
    margin-bottom: 8px;
    text-decoration: none; /* namgolf override */
}

.cms-bloglist__excerpt {
    margin: 0;
    padding: 0;
    color: #4a4a4a;
    font-size: 0.95em;
    line-height: 1.5;
    text-decoration: none; /* namgolf override */
}

.cms-bloglist__empty {
    color: #8a8a8a;
    font-style: italic;
}

/* Pagination */
.cms-bloglist__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 1.5em 0;
}

.cms-bloglist__pagelink {
    color: #1b7a8c;
    text-decoration: none;
    font-weight: bold;
}

.cms-bloglist__pagelink:hover {
    text-decoration: underline;
}

.cms-bloglist__pageinfo {
    color: #8a8a8a;
    font-size: 0.9em;
}

/* Stack cards vertically on narrow screens */
@media (max-width: 600px) {
    .cms-bloglist__card {
        flex-direction: column;
    }
    .cms-bloglist__image {
        flex-basis: auto;
        max-width: none;
        height: 180px;
    }
}

/* Image figures + alignment. The image is inline-block so the figure's
   text-align (set by the alignment tune's cms-align-* class) positions it
   left / centre / right. Applies to the caption too, which sits under the
   image and follows the same alignment. */
.cms-figure {
    display: block;
    width: 100%;
    margin-top: 1.2em;
    margin-bottom: 1.2em;
}

.cms-figure figcaption {
    font-size: 0.9em;
    color: #666;
    margin-top: 6px;
}

/* Image size presets. The FIGURE is constrained to the target width (a
   percentage of the content column — reliable because the figure is a
   block-level element), and the image simply fills its figure. Sizing the
   figure rather than the <img> avoids the percentage-basis problems that occur
   when the image is wrapped in an inline <a> (link/lightbox modes). */

.cms-figure--small  { width: 30%; }
.cms-figure--medium { width: 65%; }
.cms-figure--large  { width: 85%; }
.cms-figure--xlarge { width: 100%; }
.cms-figure--full   { width: 100%; }  /* legacy alias for xlarge */

.cms-figure img {
    width: 100%;
    height: auto;
}

/* Alignment of the (possibly smaller) figure within the content column, via
   auto margins. Only has a visible effect when the figure is narrower than the
   column (i.e. Small or Medium) — a Full-width figure fills the column and has
   no room to shift. Uses margin-top/bottom to preserve vertical spacing without
   the `margin` shorthand resetting the horizontal auto-margins. */
.cms-figure.cms-align-center {
    margin-left: auto !important;
    margin-right: auto !important;
}
.cms-figure.cms-align-right {
    margin-left: auto !important;
    margin-right: 0 !important;
}
.cms-figure.cms-align-left {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* On narrow screens the smaller sizes relax upward so they don't become
   postage stamps; large/xlarge are already near-full so they stay. */
@media (max-width: 600px) {
    .cms-figure--small  { width: 55%; }
    .cms-figure--medium { width: 80%; }
    .cms-figure--large  { width: 100%; }
}

/* Map & Facebook embeds (frontend) */
.cms-map {
    margin: 1.2em 0;
    line-height: 0;
}

.cms-map iframe {
    display: block;
    width: 100%;
    border-radius: 6px;
}

.cms-facebook {
    margin: 1.2em 0;
    display: flex;
    justify-content: center;
}

/* Facebook's plugin has its own fixed width; center it and let it be responsive */
.cms-facebook .fb-page,
.cms-facebook .fb-page span,
.cms-facebook .fb-page iframe {
    max-width: 100% !important;
}

/* Feature tiles (custom TileTool). Designed to sit inside a Columns block for
   a row of tiles; a single tile works standalone too. The card, icon circle
   and accent bar styling are automatic; colours come from the block. */
.cms-tile {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    padding: 36px 28px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.cms-tile__circle {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;              /* icon colour (SVGs use currentColor) */
    margin-bottom: 22px;
    flex: 0 0 auto;
}

.cms-tile__heading {
    margin: 0 0 12px;
    font-size: 1.5em;
    font-weight: 700;
    color: #1d202b;
    line-height: 1.2;
}

.cms-tile__text {
    margin: 0 0 28px;
    padding: 0;
    color: #444;
    font-size: 1em;
    line-height: 1.5;
    flex: 1 1 auto;
}

/* Keep tile text dark even when the tile sits inside a coloured section
   (--accent / --highlight set p to white, which would otherwise win by
   source order). Covers the tile's heading, its own text, and any <p>. */
.cms-tile__heading,
.cms-tile__text,
.cms-tile p,
.cms-section--accent .cms-tile__heading,
.cms-section--accent .cms-tile__text,
.cms-section--accent .cms-tile p,
.cms-section--highlight .cms-tile__heading,
.cms-section--highlight .cms-tile__text,
.cms-section--highlight .cms-tile p {
    color: #1d202b;
}

.cms-tile__accent {
    width: 100%;
    height: 6px;
    margin-top: auto;
    /* pull out to the card edges (cancel the card's horizontal padding) */
    margin-left: -28px;
    margin-right: -28px;
    width: calc(100% + 56px);
}

/* Linked tiles — whole card is clickable. Remove link underline/colour from
   the tile's text, and add a hover lift to signal it's interactive. */
a.cms-tile,
a.cms-tile:hover,
a.cms-tile:visited {
    text-decoration: none;
    color: inherit;
    display: flex;   /* keep the same flex-column layout as a div tile */
}

a.cms-tile.cms-tile--link {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

a.cms-tile.cms-tile--link:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

/* Pricing card (custom PricingCardTool). Sits inside a Columns block, two per
   row; stack two Columns blocks for four plans. Card, ribbon, header bar and
   accent bar styling are automatic; colours come from the block. */
.cms-pricing {
    position: relative;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: center;
}

.cms-pricing__header {
    color: #ffffff;
    font-size: 1.4em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 20px 24px;
}

.cms-pricing__body {
    padding: 28px 24px 0;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    align-items: center;
}

/* Price — small currency superscript, large amount */
.cms-pricing__price {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    line-height: 1;
    margin-bottom: 2px;
}

.cms-pricing__cur {
    font-size: 1.4em;
    font-weight: 700;
    margin-top: 0.35em;
    margin-right: 2px;
    color: #1d202b;
}

.cms-pricing__amt {
    font-size: 3.4em;
    font-weight: 800;
    color: #1d202b;
}

.cms-pricing__period {
    font-size: 0.95em;
    color: #6a7a7f;
    margin-bottom: 22px;
}

/* Feature list — checkmark + text, divider lines between */
.cms-pricing__features {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    /* Centre the whole list as a block within the card, but let the rows
       inside align to a common left edge — so every checkmark lines up in a
       vertical column (which reads as "properly aligned"), while the group as
       a whole stays centred in the card. */
    display: inline-block;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
}

/* The features list sits in a flex-column card body (centred via align-items
   on .cms-pricing__body above), which centres the inline-block list. */

.cms-pricing__feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 4px;
    border-bottom: 1px solid #eef2f3;
    justify-content: flex-start;
    text-align: left;
}

.cms-pricing__feature:last-child {
    border-bottom: none;
}

.cms-pricing__check {
    color: #1d202b;
    flex: 0 0 auto;
    line-height: 0;
    display: inline-flex;
    align-items: center;
}

.cms-pricing__feature-text {
    color: #333;
    font-size: 1em;
    line-height: 1.3;
}

/* Button */
.cms-pricing__button,
.cms-content a.cms-pricing__button {
    display: inline-block;
    margin: 0 auto 28px;
    padding: 12px 30px;
    background: #1BA7DE;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.03em;
    transition: opacity 0.15s ease;
}

.cms-pricing__button:hover,
.cms-content a.cms-pricing__button:hover {
    opacity: 0.9;
    color: #ffffff;
    text-decoration: none;
}

/* Bottom accent bar */
.cms-pricing__accent {
    height: 6px;
    margin-top: auto;
}

/* Diagonal corner ribbon (top-right). Rotated banner clipped to the corner. */
.cms-pricing__ribbon {
    position: absolute;
    top: 18px;
    right: -34px;
    transform: rotate(45deg);
    width: 140px;
    padding: 6px 0;
    color: #ffffff;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.cms-pricing__ribbon span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 30px;
}

/* Four plans render as TWO stacked .cms-columns rows (Gold|Silver, then
   Bronze|Bronze Z) — bare .cms-columns divs, with NO .cms-block--columns
   wrapper. The two rows have nothing between them, so a .cms-columns that
   contains pricing cards gets a bottom gap matching the 40px horizontal gap.
   :has()-scoped so only pricing rows are affected, not other column layouts. */
.cms-columns:has(.cms-pricing) {
    margin-bottom: 40px;
}

/* Inline file links (from the "Link to file" inline tool). Inherits the normal
   content-link colour/underline; a small document icon after the text signals
   it opens a file. Remove the ::after rule if you don't want the icon. */
.cms-content a.cms-filelink::after {
    content: "";
    display: inline-block;
    width: 0.7em;
    height: 0.8em;
    margin-left: 0.3em;
    vertical-align: -0.05em;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    /* inline SVG document glyph, uses the link colour via currentColor is not
       possible on background-image, so a neutral tint is used */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b7a8c' stroke-width='2'%3E%3Cpath d='M14 3H7a2 2 0 00-2 2v14a2 2 0 002 2h10a2 2 0 002-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3C/svg%3E");
    opacity: 0.7;
}

/* Manager-authored embed widgets (Booking.com etc.) */
.cms-embed {
    margin: 1.2em 0;
}

/* Inline PDF viewer */
.cms-pdf {
    margin: 1.4em auto;
    width: 75%;
    max-width: 900px;
}
.cms-pdf__object {
    display: block;
    width: 100%;
    border: 1px solid #dce2e4;
    border-radius: 4px;
}

/* On narrow screens, let it use the full width — 75% is too cramped on mobile */
@media (max-width: 700px) {
    .cms-pdf {
        width: 100%;
    }
}
.cms-pdf__fallback {
    padding: 24px;
    text-align: center;
    background: #f4f6f7;
    border: 1px solid #dce2e4;
    border-radius: 4px;
}
.cms-pdf__link {
    display: inline-block;
    margin-top: 6px;
    font-weight: 600;
}

/* Forms (files in /forms, rendered via the forms tune).
   Deliberately namespaced .sona-form rather than .cms-form so it can't collide
   with any class the forms tune generates around the markup. Brand tokens match
   the rest of the site: Oswald legends, yellow accent bar, club-blue focus and
   submit. Every form file in /forms can stay plain markup and inherit this. */
.sona-form {
    max-width: 760px;
    margin: 0 auto;
    color: #1d202b;
}

.sona-form__intro {
    font-size: 0.95em;
    line-height: 1.6;
    color: #444;
    margin-bottom: 28px;
    padding: 16px 18px;
    background: #f6f8f9;
    border-left: 4px solid #07ACEC;
    border-radius: 4px;
}

.sona-form__group {
    border: none;
    padding: 0;
    margin: 0 0 32px;
}

.sona-form__group > legend {
    font-family: "Oswald", sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 1.4em;
    color: #1d202b;
    padding: 0;
    margin-bottom: 4px;
}

/* Small yellow accent bar under each legend, matching the site's h2 bars */
.sona-form__group > legend + .sona-form__bar {
    width: 60px;
    height: 3px;
    background: yellow;
    margin-bottom: 18px;
}

.sona-form__field {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.sona-form__field label {
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.sona-form__field input,
.sona-form__field select,
.sona-form__field textarea {
    font-family: inherit;
    font-size: 1em;
    padding: 11px 12px;
    border: 1px solid #cdd6d9;
    border-radius: 5px;
    background: #fff;
    color: #1d202b;
    width: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sona-form__field input:focus,
.sona-form__field select:focus,
.sona-form__field textarea:focus {
    outline: none;
    border-color: #07ACEC;
    box-shadow: 0 0 0 3px rgba(7, 172, 236, 0.15);
}

/* Two-up rows that stack on narrow screens */
.sona-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
}

.sona-form__row--thirds {
    grid-template-columns: 2fr 1fr 1fr;
}

@media (max-width: 560px) {
    .sona-form__row,
    .sona-form__row--thirds {
        grid-template-columns: 1fr;
    }
}

/* Declaration block (web equivalent of the paper signature) */
.sona-form__declaration {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 18px;
    background: #f6f8f9;
    border-radius: 4px;
    font-size: 0.95em;
    line-height: 1.55;
}

.sona-form__declaration input {
    margin-top: 3px;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
}

.sona-form__note {
    font-size: 0.82em;
    color: #6a7a7f;
    margin-top: 6px;
}

/* Submit */
.sona-form__submit {
    display: inline-block;
    font-family: "Oswald", sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 1.05em;
    padding: 14px 40px;
    margin-top: 8px;
    background: #07ACEC;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sona-form__submit:hover {
    background: #0692c6;
}

.cms-bloglist__pagelink {
    color: #0692c6 !important;
}

.sona-form__req {
    color: #c0392b;
}

/* Sponsor carousel (footer) — namgolf. Paged slideshow: 5 logos per page on
   desktop, 2 on tablet, 1 on mobile. Per-page count is set ONLY here via the
   item flex-basis at each breakpoint; sponsors.php measures the rendered item
   width to derive it, so the JS never drifts from these values. Candidate to
   promote to a core SonaCMS block later (every club has sponsors). */
.sponsors {
    /* Rendered inside .site-wrap (max-width:1280; padding:0 40px) in footer.php.
       Pull out by the wrap's 40px side padding so the row uses close to the full
       1280 content width — the site's max — rather than the ~1200 it's boxed
       into, WITHOUT going full-bleed past 1280. Own padding kept small so the
       logos get as much width as possible while staying inside the site width. */
    margin-left: -40px;
    margin-right: -40px;
    padding: 28px 16px 8px;
}

.sponsors__viewport {
    overflow: hidden;
    width: 100%;
}

.sponsors__track {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    transition: transform 0.5s ease;
}

.sponsors__item {
    flex: 0 0 20%;            /* desktop: 5 per page */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    text-decoration: none;
}

.sponsors__item img {
    /* Force a size — max-height only CAPS, it won't enlarge a logo that's
       rendering smaller than the cap. width:100% fills the slot, height sets a
       generous fixed box, and object-fit:contain scales each logo to fit that
       box without distortion (wide logos fill width, square ones fill height). */
    width: 100%;
    height: 200px;
    object-fit: contain;
    transition: transform 0.15s ease;
}

a.sponsors__item:hover img {
    transform: scale(1.05);
}

/* Dots */
.sponsors__dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.sponsors__dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #cfd8dc;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.sponsors__dot:hover {
    background: #9fb0b6;
}

.sponsors__dot.is-active {
    background: #07ACEC;      /* club blue */
    transform: scale(1.2);
}

@media (max-width: 900px) {
    .sponsors { padding: 24px 24px 8px; }
    .sponsors__item { flex-basis: 50%; }    /* tablet: 2 per page */
}

@media (max-width: 600px) {
    /* Drop the negative side margins here — the wrap only pads 16px on mobile,
       so the desktop -40px overhangs the viewport and causes sideways scroll.
       Zeroing them keeps the row inside the wrap's padding. */
    .sponsors {
        margin-left: 0;
        margin-right: 0;
        padding: 20px 16px 8px;
    }
    .sponsors__item { flex-basis: 100%; }   /* mobile: 1 per page */
}

/* Reduced-motion: no sliding transition (sponsors.php also disables auto-advance) */
@media (prefers-reduced-motion: reduce) {
    .sponsors__track { transition: none; }
}

.our-sponsors::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    margin: 8px auto 0;   /* top 8px, auto sides centre it, bottom 0 */
    background: yellow;
}

.cms-gallery {
    text-align: center;
}


/* Card (custom CardTool) — picture, title, description, button. Generic:
   listings, services, team, products. Put cards in a Columns block for a row.

   Site-wide colours: set these two variables in your own CSS, e.g.
       :root { --cms-card-title: #0b3d5c; --cms-card-button: #0b6e4f; }
   A card given its own colour in the editor overrides them for that card. */
.cms-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 480px;            /* a lone card shouldn't stretch the full page */
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    color: inherit;
}

.cms-column > .cms-card {
    max-width: none;             /* inside Columns, fill the column */
}

.cms-card__image {
    aspect-ratio: 4 / 3;         /* every card's picture the same shape */
    overflow: hidden;
    background: #eef1f2;
}

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

.cms-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 22px 24px 24px;
}

/* Scoped under .cms-card so the general content heading styles
   (.cms-content h3) don't override the card's title. */
.cms-card .cms-card__title {
    margin: 0 0 10px;
    font-size: 1.35em;
    font-weight: 700;
    line-height: 1.25;
    color: var(--cms-card-title, #1d202b);
}

.cms-card .cms-card__text {
    margin: 0 0 20px;
    color: #444;
    line-height: 1.5;
}

/* Button sits at the bottom so buttons line up across a row of cards. It's a
   visual cue inside the card's single link, not a link of its own. */
.cms-card__button {
    align-self: flex-start;
    margin-top: auto;
    display: inline-block;
    padding: 12px 28px;
    font-size: 0.95em;
    font-weight: 600;
    border-radius: 4px;
    background: var(--cms-card-button, #1d202b);
    color: #ffffff;
    transition: filter 0.15s ease;
}

/* Linked cards — the whole card is clickable. */
a.cms-card,
a.cms-card:hover,
a.cms-card:visited {
    text-decoration: none;
    color: inherit;
}

a.cms-card.cms-card--link {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

a.cms-card.cms-card--link:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

a.cms-card.cms-card--link:hover .cms-card__button {
    filter: brightness(1.25);
}

a.cms-card.cms-card--link:focus-visible {
    outline: 3px solid var(--cms-card-button, #1d202b);
    outline-offset: 3px;
}

/* Social icons (custom SocialTool) */
.cms-block--social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 32px;
    margin: 1.5em 0;
}
.cms-social--left   { justify-content: flex-start; }
.cms-social--center { justify-content: center; }
.cms-social--right  { justify-content: flex-end; }

.cms-social__link {
    display: inline-flex;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.cms-social__link svg {
    display: block;
    width: 100%;
    height: 100%;
}
.cms-social__link:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}
.cms-social__link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.sona-form__submit {
    background-color: yellow;
}