/* /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: "Noto Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "wdth" 100;
    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;
}

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

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

.site-header {
    background-color: black;
    border-bottom: 2px solid rgb(255, 102, 0);
    padding: 24px 0;
}

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

.site-footer {
    border-top: 0px solid #e8e8e8;
    padding: 32px 0;
    font-size: 0.875em;
    color: #888;
}

/* ─── 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;
    font-size: 1em;           /* 16px, same as the editor */
    line-height: 1.6;
    color: #1d202b;
}

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

/* 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: 2em; }       /* 32px */
.cms-block--header h2, .cms-content h2 { font-size: 1.5em; }     /* 24px */
.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 */

/* 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: rgb(255, 102, 0);
    color: #ffffff;
    border: 2px solid rgb(255, 102, 0);;
}

.cms-block--button a.cms-button--primary:hover {
    background: rgb(255, 102, 0);;
    border-color: rgb(255, 102, 0);;
}

.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: 360px;
    padding: 60px 24px;
    background: rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

.site-hero__title {
    margin: 0;
    font-size: 2.5em;
    font-weight: 700;
    line-height: 1.15;
    max-width: 900px;
}

.site-hero__subtitle {
    margin: 12px 0 0;
    font-size: 1.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: 2.1em; }
    .site-hero__subtitle { font-size: 1.1em; }
}

/* 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: 1.6em;
        line-height: 1.2;
    }
    .site-hero__subtitle {
        font-size: 0.98em;
        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: 1.4em; }
    .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(160px, 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 {
    color: #888;
    font-size: 0.9em;
    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: #fff6e0; }
.cms-section--accent    { background-color: #e4f2f4; }
.cms-section--dark      { background-color: #1d232b; color: #eef2f4; }

/* 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; }

@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;
    color: inherit;
    border: 1px 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: #1b7a8c;
    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: 180px;
}

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

.cms-bloglist__title {
    margin: 0 0 6px;
    font-size: 1.25em;
    line-height: 1.25;
    color: #1d202b;
}

.cms-bloglist__date {
    display: block;
    font-size: 0.85em;
    color: #8a8a8a;
    margin-bottom: 8px;
}

.cms-bloglist__excerpt {
    margin: 0;
    padding: 0;
    color: #4a4a4a;
    font-size: 0.95em;
    line-height: 1.5;
}

.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;
}

.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;
}

/* 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;
}