/* ============================================================================
   Orient Day School theme — public site skin modelled on orientdayschool.org
   (WP theme "ods"). Standalone: it styles every `st-*` class the themed
   PageBuilder blocks emit, so it loads INSTEAD of the other site skins.
   Wired by the seeder via the payload's theme section.

   Palette sampled from the source stylesheets:
     accent orange  #ff8400 (hovers #ff9f00)   ink        #3f3f3f
     topbar/footer  #3f3f3f dark               band       #f0f1f2
     body face      Signika (Google Fonts), weights 300/400/600
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Signika:wght@300;400;600;700&display=swap');

/* Match the built-in homepage column (Home.razor's .home-wrap) to this theme's
   1180px header/footer column, so the homepage doesn't extend wider than the
   rest of the site. A CSS variable resolves regardless of stylesheet order. */
:root {
    --home-wrap: 1180px;
}

.st-theme,
.st-header,
.st-footer {
    --ods-orange: #ff8400;
    --ods-orange-hi: #ff9f00;
    --ods-ink: #3f3f3f;
    --ods-dark: #3f3f3f;
    --ods-muted: #747474;
    --ods-line: #e7e7e7;
    --ods-band: #f0f1f2;
    --ods-wrap: 1180px;
    --ods-gutter: 15px;
    --ods-edge: max(15px, calc((100% - 1180px) / 2));
    --ods-font: 'Signika', 'Segoe UI', system-ui, sans-serif;
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */

.st-wrap {
    width: 100%;
    max-width: var(--ods-wrap);
    margin: 0 auto;
    padding: 0 var(--ods-gutter);
    box-sizing: border-box;
}

.st-section {
    padding-top: 28px;
    padding-bottom: 28px;
}

.st-theme .page-content,
.st-header .page-content,
.st-footer .page-content {
    margin: 0;
    padding: 0;
}

.st-theme {
    font-family: var(--ods-font);
    font-size: 15px;
    line-height: 1.7;
    color: var(--ods-ink);
}

.st-theme p {
    margin: 0 0 14px;
    text-align: justify;
}

.st-theme a {
    color: var(--ods-orange);
    text-decoration: none;
}

.st-theme a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Contact topbar — the dark strip above the header
   -------------------------------------------------------------------------- */

.st-topbar {
    background: var(--ods-dark);
    color: #fff;
    font-family: var(--ods-font);
    font-size: 13px;
    line-height: 20px;
}

.st-topbar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 18px;
    padding-top: 7px;
    padding-bottom: 7px;
}

.st-topbar__contact {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.st-topbar__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.st-topbar__item i {
    font-size: 12px;
    line-height: 1;
    color: var(--ods-orange);
}

.st-topbar__links {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.st-topbar .st-topbar__links a {
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 600;
}

.st-topbar .st-topbar__links a:hover {
    color: var(--ods-orange-hi);
    text-decoration: none;
}

.st-topbar__sep {
    display: none;
}

/* --------------------------------------------------------------------------
   Header band — white, logo lockup left, nav right; slider row below.
   `site.header.class` is "st-header ods-header".
   -------------------------------------------------------------------------- */

.st-header {
    background: #fff;
    color: var(--ods-ink);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}

.ods-header .page-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.ods-header .st-topbar {
    flex: 0 0 100%;
}

.ods-header .page-content > .st-wrap {
    width: auto;
    flex: 0 1 auto;
    margin: 0 0 0 var(--ods-edge);
}

.ods-header .st-nav {
    flex: 1 1 auto;
    min-width: 0;
    margin-right: var(--ods-edge);
}

.st-header a {
    color: var(--ods-ink);
    text-decoration: none;
}

.st-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
}

.st-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.st-brand__lockup {
    display: block;
    width: auto;
    max-width: min(320px, 70vw);
    height: auto;
    max-height: 84px;
}

.st-brand__crest {
    flex: 0 0 auto;
    width: 58px;
    height: auto;
    display: block;
}

.st-brand__crest--placeholder {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ods-orange);
    border-radius: 50%;
    font-size: 24px;
    color: var(--ods-orange);
}

.st-brand__text {
    min-width: 0;
}

.st-brand__title {
    font-family: var(--ods-font);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 2px;
    color: var(--ods-ink);
}

.st-brand__title--gothic,
.st-brand__title--serif {
    font-family: Georgia, 'Times New Roman', serif;
}

.st-brand__lines {
    font-size: 11px;
    line-height: 1.45;
    color: var(--ods-muted);
}

.st-brand__lines span {
    display: block;
}

.st-header__aside {
    flex: 0 0 auto;
    max-width: 300px;
    text-align: right;
    font-size: 14px;
    line-height: 1.4;
    font-family: var(--ods-font);
    color: var(--ods-orange);
    font-weight: 600;
}

/* On orientdayschool.org the slider appears only on the homepage; interior
   pages are full-width content. The header carries `st-interior` off the
   homepage, so hide the slider there (the notice sidebar stays). */
.ods-header.st-interior .page-block-slider {
    display: none;
}

/* Homepage slider (Slider block in the header layout): constrained to the same
   1180px column as the header, footer and page content — not full-bleed. */
.ods-header .page-block-slider {
    flex: 0 0 100%;
    width: 100%;
    max-width: var(--ods-wrap);
    margin: 0 auto;
    /* Side gutters leave room for the arrow tabs to sit OUTSIDE the slide
       image (~24px out, ~6px overlap), matching the source's -24px offset. */
    padding: 0 24px;
    box-sizing: border-box;
    position: relative;
}

.ods-header .page-block-slider .carousel-inner {
    border-radius: 0 !important;
    max-width: none;
    margin: 0;
}

.ods-header .page-block-slider .carousel-item img {
    height: auto !important;
    aspect-ratio: 1132 / 400;
    object-fit: cover;
}

/* Prev/next arrows use the source's own Jssor sprite (a03.png, 60x200):
   two columns (left / right) x two rows (grey normal / dark hover). Sized to
   one cell (30x100), sitting in the gutters just outside the slide image with
   their tips pointing outward — the hovered one switches to the dark row. */
.ods-header .page-block-slider .carousel-control-prev,
.ods-header .page-block-slider .carousel-control-next {
    width: 30px;
    height: 100px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    background: url(../img/ods-slider-arrows.png) no-repeat 0 0;
    opacity: 1;
    transition: none;
    clip-path: none;
}

.ods-header .page-block-slider .carousel-control-prev {
    left: 0;
    background-position: 0 0;
}

.ods-header .page-block-slider .carousel-control-next {
    right: 0;
    background-position: -30px 0;
}

.ods-header .page-block-slider .carousel-control-prev:hover { background-position: 0 -100px; }
.ods-header .page-block-slider .carousel-control-next:hover { background-position: -30px -100px; }

/* The sprite already draws the chevron — hide Bootstrap's default icon. */
.ods-header .page-block-slider .carousel-control-prev-icon,
.ods-header .page-block-slider .carousel-control-next-icon {
    display: none;
}

/* --------------------------------------------------------------------------
   Primary navigation — Signika, dark links, orange hover, white dropdowns
   -------------------------------------------------------------------------- */

.st-nav,
.st-nav__item,
.st-nav__link {
    list-style: none;
    display: block;
    position: relative;
    box-sizing: border-box;
}

.st-nav__inner {
    position: relative;
}

.st-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    box-sizing: border-box;
}

.st-nav__sub,
.st-nav__sub li {
    display: block;
    list-style: none;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.st-nav__item {
    font-family: var(--ods-font);
    margin: 0 6px;
}

.st-nav__link {
    padding: 30px 12px;
    font-size: 16px;
    font-weight: 400;
    color: var(--ods-ink);
    text-align: center;
    white-space: nowrap;
    transition: color .15s ease;
}

/* Chevron on items that open a dropdown */
.st-nav__item:has(> .st-nav__sub) > .st-nav__link::after {
    content: "\F282";
    font-family: 'bootstrap-icons';
    font-size: 10px;
    margin-left: 5px;
    vertical-align: 1px;
}

.st-nav__link:hover,
.st-nav__item:hover > .st-nav__link,
.st-nav__link.is-active {
    color: var(--ods-orange);
    text-decoration: none;
}

/* Dropdowns: white panel, orange hover, soft shadow; parked off-screen so
   they stay keyboard-reachable (focus-within). */
.st-nav__sub {
    position: absolute;
    top: 100%;
    left: -9999px;
    z-index: 60;
    min-width: 250px;
    background: #fff;
    border-top: 3px solid var(--ods-orange);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .15s linear, transform .15s linear, left 0s .15s;
}

.st-nav__item:hover > .st-nav__sub,
.st-nav__item:focus-within > .st-nav__sub {
    left: 0;
    opacity: 1;
    transform: translateY(0);
    transition: opacity .15s linear, transform .15s linear;
}

.st-nav__item:last-child:hover > .st-nav__sub,
.st-nav__item:last-child:focus-within > .st-nav__sub {
    left: auto;
    right: 0;
}

.st-nav__sub .st-nav__link {
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 400;
    color: var(--ods-ink);
    text-align: left;
    white-space: normal;
    border-bottom: 1px solid var(--ods-line);
}

.st-nav__sub li:last-child .st-nav__link {
    border-bottom: 0;
}

.st-nav__sub .st-nav__link:hover {
    background: var(--ods-orange);
    color: #fff;
}

/* Mobile toggle — CSS-only */
.st-nav__toggle {
    display: none;
}

.st-nav__burger {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ods-ink);
    cursor: pointer;
    user-select: none;
}

/* --------------------------------------------------------------------------
   Interior page — full-width article
   -------------------------------------------------------------------------- */

.st-page-row {
    display: grid;
    grid-template-columns: clamp(230px, 22%, 320px) minmax(0, 1fr);
    gap: clamp(18px, 2vw, 34px);
    align-items: start;
}

.st-page-row--full {
    grid-template-columns: minmax(0, 1fr);
}

.st-page-main {
    min-width: 0;
}

.st-page-row:not(.st-page-row--full) .st-page-main {
    border-left: 1px solid var(--ods-line);
    padding-left: clamp(14px, 1.6vw, 26px);
}

/* Source page title: orange text on a light-grey band, orange stripe
   ornament on the left edge and a solid orange cap on the right. */
.st-page-title {
    font-family: var(--ods-font);
    font-weight: 400;
    font-size: clamp(1.5rem, 2.6vw, 1.9rem);
    line-height: 1.25;
    color: var(--ods-orange);
    background: #f1f1f1;
    margin: 0 0 20px;
    padding: 9px 20px 9px 30px;
    position: relative;
}

.st-page-title::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 7px;
    bottom: 7px;
    width: 12px;
    background: repeating-linear-gradient(90deg,
        var(--ods-orange) 0 4px, transparent 4px 8px);
}

.st-page-title::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--ods-orange);
}

/* --------------------------------------------------------------------------
   Interior page body — migrated WordPress content
   -------------------------------------------------------------------------- */

.st-page-body {
    font-size: 15px;
    line-height: 1.75;
}

.st-page-body p {
    margin: 0 0 14px;
    text-align: justify;
}

.st-page-body h2,
.st-page-body h3 {
    font-family: var(--ods-font);
    font-weight: 600;
    color: var(--ods-ink);
    margin: 22px 0 10px;
}

.st-page-body h2 { font-size: 22px; }
.st-page-body h3 { font-size: 18px; }

/* Source section headings are h4.underline: a light 24px heading with a
   hairline rule beneath. The importer's sanitiser drops the `underline` class,
   so style the h4 itself — every interior section heading on the source is one. */
.st-page-body h4 {
    font-family: var(--ods-font);
    font-weight: 300;
    font-size: 24px;
    line-height: 1.35;
    color: var(--ods-ink);
    margin: 32px 0 18px;
    padding-bottom: 7px;
    border-bottom: 1px solid #dfdfdf;
    scroll-margin-top: 16px;
}
.st-page-body h4:first-child { margin-top: 0; }

/* Source "note" panels: a bordered white box with an orange legend tab —
   e.g. the General Information "Warning" and "Special Note" sections
   (fieldset + legend, classes stripped on import). */
.st-page-body fieldset {
    position: relative;
    margin: 26px 0;
    padding: 18px 18px 4px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 2px;
}
.st-page-body legend {
    float: none;
    width: auto;
    max-width: 100%;
    margin: 0 0 6px;
    padding: 5px 14px;
    background: var(--ods-orange);
    color: #fff;
    font-family: var(--ods-font);
    font-weight: 700;
    font-size: 13px;
    line-height: 1.3;
    border-radius: 2px;
}

/* Legacy in-page anchor targets (<a name="…">) sit just above their heading. */
.st-page-body a[name] { scroll-margin-top: 16px; }

.st-page-body ul,
.st-page-body ol {
    margin: 0 0 14px;
    padding-left: 24px;
}

.st-page-body li {
    margin: 6px 0;
    text-align: justify;
}

.st-page-body ul li::marker {
    color: var(--ods-orange);
}

.st-page-body img {
    max-width: 100%;
    height: auto;
    background: #fff;
    border: 1px solid var(--ods-line);
    padding: 3px;
}

.st-page-body table {
    width: 100% !important;
    max-width: 100%;
    border-collapse: collapse;
    margin: 0 0 16px;
    font-size: 14px;
}

.st-page-body th,
.st-page-body td {
    border: 1px solid var(--ods-line);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.st-page-body th {
    background: #f5f5f5;
    color: var(--ods-ink);
    font-weight: 600;
}

.st-page-body .st-table-scroll {
    overflow-x: auto;
}

.st-page-body a {
    color: var(--ods-orange);
}

.st-page-body iframe {
    max-width: 100%;
    border: 0;
}

/* --------------------------------------------------------------------------
   Sidebar panels (only if a page opts into ShowSidebar)
   -------------------------------------------------------------------------- */

.st-page-aside { min-width: 0; }
.st-page-aside__gallery { margin-top: 26px; }

/* Sidebar notice board, framed as a panel with an orange header bar to match
   the sidebar gallery panel below it: a white bordered box, "Notice Board" in
   an orange title bar, uppercase-ish notice titles separated by hairlines, and
   an "Archive" link at the bottom — the same treatment as .st-panel.st-gallery. */
.st-noticeboard {
    border: 1px solid var(--ods-line);
    background: #fff;
}

.st-noticeboard__title {
    background: var(--ods-orange);
    color: #fff;
    font-family: var(--ods-font);
    font-weight: 600;
    font-size: 15px;
    margin: 0;
    padding: 8px 14px;
}

/* Was a short orange underline tick; the orange header bar replaces it. */
.st-noticeboard__title::after { content: none; }

.st-noticeboard__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 4px 14px 0;
}

.st-noticeboard__arrows { display: none; }

.st-noticeboard__viewport { max-height: none; overflow: visible; }
.st-noticeboard__viewport--tall { max-height: none; }
.st-noticeboard__list { list-style: none; margin: 0; padding: 0; }
.st-noticeboard__item { margin: 0; }

.st-noticeboard__link {
    display: block;
    position: relative;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--ods-ink);
    border-bottom: 1px solid var(--ods-line);
    padding: 11px 0 11px 17px;
}

/* Small orange square marker, hung so wrapped lines stay indented past it. */
.st-noticeboard__link::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 16px;
    width: 6px;
    height: 6px;
    background: var(--ods-orange);
}

/* Beat the theme's orange link colour (.st-theme a) so titles read dark, not
   orange, and only turn orange on hover. */
.st-theme .st-noticeboard__link { color: var(--ods-ink); }
.st-theme .st-noticeboard__link:hover { color: var(--ods-orange); }

/* No hairline under the last notice — the panel border closes the list. */
.st-noticeboard__item:last-child .st-noticeboard__link { border-bottom: 0; }
.st-noticeboard__date { display: block; font-size: 12px; color: var(--ods-orange); margin: 10px 0; }
.st-noticeboard__empty { font-size: 13px; color: var(--ods-muted); padding: 10px 14px; }

.st-noticeboard__scroll { display: none; }

/* "Archive" link under the notices, inset to match the framed panel. */
.st-more {
    display: block;
    margin: 0;
    padding: 10px 14px 12px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: var(--ods-ink);
    text-decoration: underline;
}
.st-more::before {
    content: "\F138";
    font-family: 'bootstrap-icons';
    font-size: 12px;
    margin-right: 6px;
    color: var(--ods-ink);
}
.st-theme a.st-more:hover { color: var(--ods-orange); }

.st-panel { border: 1px solid var(--ods-line); background: #fff; }
.st-panel__head {
    font-family: var(--ods-font); font-weight: 600; font-size: 16px;
    color: var(--ods-ink); padding: 10px 14px 6px; margin: 0;
}
.st-panel__body { padding: 0 14px 12px; font-size: 13px; line-height: 1.65; }

.st-gallery__head {
    display: flex; align-items: baseline; gap: 8px;
    background: var(--ods-orange); color: #fff;
    padding: 8px 14px; font-family: var(--ods-font); font-weight: 600; font-size: 15px;
}
.st-gallery__head-sep { opacity: .6; }
.st-theme .st-gallery__head a.st-gallery__viewall { font-size: 12px; color: #fff; text-decoration: underline; }
.st-gallery__body { position: relative; padding: 12px; }
.st-gallery__track {
    display: grid; grid-auto-flow: column; grid-auto-columns: calc(50% - 5px);
    gap: 10px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none;
}
.st-gallery__track::-webkit-scrollbar { display: none; }
.st-gallery__track img { display: block; width: 100%; height: auto; }
.st-gallery__track > a { align-self: start; display: block; }
.st-gallery__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 24px; height: 24px; border-radius: 50%; border: 0;
    background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; line-height: 1;
    cursor: pointer; z-index: 2;
}
.st-gallery__nav:hover { background: rgba(0, 0, 0, .78); }
.st-gallery__nav--prev { left: 16px; }
.st-gallery__nav--next { right: 16px; }
.st-gallery__empty { font-size: 13px; color: var(--ods-muted); padding: 4px 2px 8px; }

/* --------------------------------------------------------------------------
   Footer — dark band, light text, orange accents (source footer)
   -------------------------------------------------------------------------- */

/* Source footer: dark grey with a subtle dotted texture (the ods theme's
   patterned background). */
.st-footer {
    background-color: #3a3a3a;
    background-image:
        radial-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        radial-gradient(rgba(0, 0, 0, .12) 1px, transparent 1px);
    background-size: 4px 4px, 4px 4px;
    background-position: 0 0, 2px 2px;
    font-family: var(--ods-font);
    font-size: 14px;
    color: #cfcfcf;
    padding: 34px 0 20px;
}

.st-footer a {
    color: #fff;
    text-decoration: none;
}

.st-footer a:hover {
    color: var(--ods-orange-hi);
}

.st-footer .container-fluid {
    max-width: var(--ods-wrap);
    padding: 0 var(--ods-gutter);
}

/* Source `.bottom p`: left-aligned #999, 13px, 20px below the rule. */
.st-footer .small.text-secondary {
    color: #999 !important;
    font-size: 13px;
    text-align: left !important;
    padding-top: 20px;
    margin: 0;
}

/* Footer widget styling — applies to any footer block (.page-content scopes
   it to the block area, so the copyright rule below is untouched). Works
   whether the footer is a RawHtml block or a Two/Three/Four-Column block:
     - RawHtml puts the 4 columns in one wrapper div (needs the grid below);
     - the Column blocks provide their own Bootstrap grid (.row/.col-*).
   Everything else — headings, bullets, links, buttons, the gallery box — is
   keyed off element structure, so it survives the sanitizer stripping class=. */

/* Grid only for the RawHtml single-wrapper layout */
.st-footer.ods-footer .page-content > .page-block-rawhtml > div:first-child {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
}

/* Source `.bottom`: widgets, a 1px #575757 rule, then 20px to the copyright.
   The widget area sits above that rule. */
.ods-footer .page-content {
    padding-bottom: 20px;
    margin-bottom: 0;
    border-bottom: 1px solid #575757;
    text-align: left;
}

/* MainLayout inserts an <hr> between the footer blocks and the copyright;
   the page-content border above is already the separator, so hide it. */
.ods-footer hr {
    display: none;
}

/* Source footer heading (theme.css lines 340-341), reproduced 1:1 —
   the heading text is wrapped in a <span> exactly like the original:
     footer article h3      → full-width 1px #575757 rule, #efefef, weight 300
     footer article h3 span → inline-block, 1px orange border under the text */
.ods-footer .page-content h3 {
    font-family: var(--ods-font);
    font-weight: 300;
    font-size: 20px;
    color: #efefef;
    margin: 0 0 1em;
    border-bottom: 1px solid #575757;
}

.ods-footer .page-content h3 span {
    display: inline-block;
    padding: 8px 0;
    margin-bottom: -1px;
    border-bottom: 1px solid var(--ods-orange);
}

.ods-footer .page-content p {
    margin: 0 0 12px;
    font-size: 13.5px;
    line-height: 1.7;
    color: #cfcfcf;
    text-align: left;
}

.ods-footer .page-content strong { color: #fff; }
.ods-footer .page-content a { color: #cfcfcf; }
.ods-footer .page-content a:hover { color: var(--ods-orange-hi); }

.ods-footer .page-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ods-footer .page-content li {
    padding: 5px 0 5px 16px;
    position: relative;
    font-size: 13.5px;
}

.ods-footer .page-content li::before {
    content: "\00BB";
    position: absolute;
    left: 0;
    color: var(--ods-orange);
}

/* Footer gallery box — a 3-across thumbnail grid. Targets the ods-foot-gallery
   class when it survives, and otherwise any run of image links in a footer
   column (so it works even after the editor strips the class). */
.ods-foot-gallery,
.ods-footer .page-content :is(div, p):has(> a > img) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin: 0 0 10px;
    max-width: 210px;
}

.ods-foot-gallery a,
.ods-footer .page-content :is(div, p):has(> a > img) > a {
    display: block;
    line-height: 0;
    border: 2px solid rgba(255, 255, 255, .15);
}

.ods-foot-gallery img,
.ods-footer .page-content :is(div, p):has(> a > img) img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: opacity .15s ease;
}

.ods-foot-gallery a:hover img,
.ods-footer .page-content :is(div, p):has(> a > img) a:hover img { opacity: .8; }

/* "Get in Touch" column (the last footer column): links that sit alone in a
   paragraph render as orange buttons. Targets the last column in either a
   Four-Column block or the RawHtml single-wrapper layout. */
.ods-footer .page-block-four-column .row > div:last-child p a,
.ods-footer .page-content > .page-block-rawhtml > div:first-child > div:last-child p a {
    display: inline-block;
    background: var(--ods-orange);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 2px;
    text-decoration: none;
}

.ods-footer .page-block-four-column .row > div:last-child p a:hover,
.ods-footer .page-content > .page-block-rawhtml > div:first-child > div:last-child p a:hover {
    background: var(--ods-orange-hi);
    color: #fff;
}

/* Footer feedback form (compact ContactForm) — source styling: heading with
   the orange underline, "Feedback from viewers" note, stacked white inputs,
   orange SUBMIT. */

/* The ContactForm block wraps itself in `.page-block-contact my-4`, whose top
   margin pushes the Feedback column below the other three. Zero it so all four
   headings (and their underlines) sit on the same baseline. */
.ods-footer .page-content .page-block-contact {
    margin: 0 !important;
}
.ods-footer .page-content .contact-form {
    padding: 0;
    margin: 0;
}

/* Feedback heading uses the same span treatment (the generic h3 span rule
   above styles its inner span). */
.ods-footer .page-content .contact-compact-title {
    font-family: var(--ods-font);
    font-weight: 300;
    font-size: 20px;
    color: #efefef;
    margin: 0 0 1em;
    border-bottom: 1px solid #575757;
}

.ods-footer .page-content .contact-compact-sub {
    font-size: 13.5px;
    color: #cfcfcf;
    margin: 0 0 12px;
}

.ods-footer .page-content .contact-form-compact .form-control {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    padding: 8px 10px;
    margin-bottom: 10px;
    max-width: 200px;
    color: #333;
}

.ods-footer .page-content .contact-form-compact textarea.form-control {
    min-height: 70px;
    resize: vertical;
}

.ods-footer .page-content .contact-compact-submit {
    background: var(--ods-orange);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 10px 22px;
    border: 0;
    border-radius: 3px;
    width: 200px;
    max-width: 100%;
    text-align: center;
}

.ods-footer .page-content .contact-compact-submit:hover {
    background: var(--ods-orange-hi);
    color: #fff;
}

/* Feedback confirmation modal (compact ContactForm success) */
.contact-thanks-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .55);
    padding: 1rem;
}

.contact-thanks-box {
    position: relative;
    background: #fff;
    color: #3f3f3f;
    max-width: 380px;
    width: 100%;
    border-radius: 6px;
    padding: 30px 26px 26px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
    font-family: var(--ods-font);
}

.contact-thanks-box .contact-thanks-icon {
    font-size: 44px;
    line-height: 1;
    color: #ff8400;
    margin-bottom: 10px;
}

/* Self-contained OK button (the modal can appear on any page, not just the
   footer, so it doesn't rely on footer-scoped rules or theme variables). */
.contact-thanks-ok {
    background: #ff8400;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 9px 28px;
    border: 0;
    border-radius: 3px;
}

.contact-thanks-ok:hover {
    background: #ff9f00;
    color: #fff;
}

/* The modal lives inside .ods-footer, so its text would inherit the footer's
   light-on-dark colours. Force the modal's own dark-on-white palette. */
.contact-thanks-box h4 {
    font-weight: 600;
    font-size: 20px;
    margin: 0 0 8px;
    color: #3f3f3f !important;
}

.contact-thanks-box p {
    font-size: 14px;
    color: #555 !important;
    margin: 0 0 18px;
    text-align: center;
}

.contact-thanks-box .contact-compact-submit {
    width: auto;
    padding: 9px 26px;
}

.contact-thanks-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: 0;
    background: none;
    font-size: 24px;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
}

.contact-thanks-close:hover { color: #3f3f3f; }

@media (max-width: 900px) {
    .st-footer.ods-footer .page-content > .page-block-rawhtml > div:first-child {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
}

@media (max-width: 560px) {
    .st-footer.ods-footer .page-content > .page-block-rawhtml > div:first-child {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .ods-header .page-content > .st-wrap {
        flex: 1 1 100%;
    }

    .st-nav__list {
        justify-content: flex-start;
    }

    .st-nav__link {
        padding: 14px 12px;
    }

    .st-nav__inner {
        padding: 0 var(--ods-gutter);
    }
}

@media (max-width: 900px) {
    .st-page-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .st-page-row:not(.st-page-row--full) .st-page-main {
        order: -1;
        border-left: 0;
        padding-left: 0;
    }

    .st-header__inner {
        justify-content: center;
    }

    .st-nav__burger {
        display: flex;
    }

    .st-nav__list {
        display: none;
        flex-direction: column;
        padding-bottom: 8px;
    }

    .st-nav__toggle:checked ~ .st-nav__list {
        display: flex;
    }

    .st-nav__item {
        border-top: 1px solid var(--ods-line);
        margin: 0;
    }

    .st-nav__item:first-child {
        border-top: 0;
    }

    .st-nav__link {
        line-height: 1.2;
        padding: 12px;
        text-align: left;
    }

    .st-nav__sub {
        position: static;
        left: auto;
        min-width: 0;
        box-shadow: none;
        border-top: 0;
        opacity: 1;
        transform: none;
        transition: none;
        background: #f7f7f7;
    }

    .st-nav__sub .st-nav__link {
        padding-left: 26px;
    }

    .st-topbar__inner {
        justify-content: center;
        text-align: center;
    }
}
