/* ==========================================================================
   Parkland CLASS — theme styles
   Tokens come from the Figma file "ParklandCLASS-Web-Oct2026" (Parkland/* styles).
   Every component rule is scoped under #pagewrap so it can't restyle Concrete's
   own Dashboard / edit-mode chrome or core single pages that use bare Bootstrap classes.
   ========================================================================== */

:root {
  /* Colour */
  --brand-600: #150ca3;      /* Parkland/brand/600 Primary */
  --brand-800: #0e086c;      /* Parkland/brand/800 (navy sections) */
  --brand-100: #dcdaf6;      /* Parkland/brand/100 */
  --brand-50: #fcf1e1;       /* Parkland/brand/50 (cream sections) */
  --ink-900: #252358;        /* Parkland/ink/900 Navy (body text) */
  --ink-600: #55537a;        /* Parkland/ink/600 (muted) */
  --surface: #f2f1f0;        /* Parkland/surface/surface (cards) */
  --paper: #ffffff;          /* Parkland/surface/paper */
  --lime: #a3da5f;           /* Parkland/accent/lime */
  --teal: #40b8d5;           /* Parkland/accent/teal */
  --blue: #4e6fe1;           /* Parkland/accent/blue */
  --plum: #94216f;           /* Parkland/accent/plum */
  --sun: #f2b86a;            /* sun decoration around section photos */

  /* Type (Adobe Fonts kit bya5ysb: oswald + montserrat, weights 500 / 600) */
  --font-display: "oswald", "Oswald", "Arial Narrow", sans-serif;
  --font-body: "montserrat", "Montserrat", Arial, sans-serif;

  /* Shape & layout */
  --radius: 12px;
  --shadow-offset: 3px 3px 0 var(--ink-900);   /* Parkland/Offset Ink */
  --container: 1140px;
  --container-wide: 1240px;
  --gutter: 16px;
  --section-pad: clamp(64px, 9vw, 120px);
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--brand-600);
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

/* ---------- Base ---------- */

#pagewrap,
#pagewrap *,
#pagewrap *::before,
#pagewrap *::after {
  box-sizing: border-box;
}

html { 
	background: var(--brand-800); 
}
body {
  margin: 0;
  background: var(--paper);
}

#pagewrap {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 17px;            /* Parkland/Body MD */
  line-height: 1.65;
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

#pagewrap img { max-width: 100%; height: auto; }

#pagewrap h1, #pagewrap h2, #pagewrap h3, #pagewrap h4, #pagewrap h5, #pagewrap h6 {
  font-family: var(--font-display);
  color: var(--brand-600);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
#pagewrap h1 { font-weight: 600; font-size: clamp(40px, 5vw, 64px); line-height: 1.05; }   /* Display LG */
#pagewrap h2 { font-weight: 600; font-size: clamp(32px, 3.6vw, 44px); line-height: 1.1; }  /* H1 style */
#pagewrap h3 { font-weight: 500; font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; } /* H2 style */
#pagewrap h4 { font-weight: 500; font-size: 24px; line-height: 1.2; }                       /* H3 style */
#pagewrap h5, #pagewrap h6 { font-family: var(--font-body); font-weight: 600; font-size: 16px; line-height: 1.3; }

#pagewrap p, #pagewrap ul, #pagewrap ol { margin: 0 0 1.25em; }
#pagewrap strong, #pagewrap b { font-weight: 600; }

#pagewrap a { color: var(--brand-600); text-underline-offset: 0.18em; }
#pagewrap a:hover { color: var(--brand-800); }
#pagewrap a:focus-visible,
#pagewrap button:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

#pagewrap .visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

#pagewrap .skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 1000;
  background: var(--brand-600); color: var(--paper); padding: 12px 20px; border-radius: var(--radius);
}
#pagewrap .skip-link:focus { top: 16px; }

/* Remove stray top/bottom margins inside blocks so section padding stays exact */
#pagewrap .section__inner > :last-child,
#pagewrap .section__inner .ccm-custom-style-container > :last-child { margin-bottom: 0; }

/* ---------- Layout ---------- */

#pagewrap .container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}
#pagewrap .container--wide { width: min(100% - 2 * var(--gutter), var(--container-wide)); }

#pagewrap .section {
  position: relative;
  padding-block: var(--section-pad);
  isolation: isolate;
}
#pagewrap .section--cream { background: var(--brand-50); }
#pagewrap .section--flush-top { padding-top: 0; }

/* Decorative sun rays (white sections). Two copies of the same 1717px graphic,
   positioned as in the Figma; scaled down on small screens. Drawn as backgrounds
   (not pseudo-elements) so they're always clipped to the section, even in edit mode
   where sections must not hide overflow. */
#pagewrap .section--rays {
  --ray-size: 1717px;
  --ray-half: calc(var(--ray-size) / -2);
  background-color: var(--paper);
  background-image: url("../images/sun-rays.svg"), url("../images/sun-rays.svg");
  background-repeat: no-repeat;
  background-size: var(--ray-size) var(--ray-size);
}
/* Programs: one sun centred above the top-left corner, one below the bottom-right */
#pagewrap .section--rays-a {
  background-position:
    left var(--ray-half) top calc(var(--ray-half) - 461px),
    right calc(var(--ray-half) - 132px) bottom calc(var(--ray-half) - 167px);
}
/* Testimonial: one sun on the left edge, one off the top-right */
#pagewrap .section--rays-b {
  background-position:
    left var(--ray-half) top calc(var(--ray-half) - 19px),
    right calc(var(--ray-half) - 276px) top calc(var(--ray-half) - 266px);
}
@media (max-width: 1023px) {
  #pagewrap .section--rays { --ray-size: 1100px; }
}


#pagewrap hr {
    border: 0;
    border-bottom: 1px #ddd solid;
    width: 60%;
    margin: 0 auto 55px auto;
    padding: 55px 0 0 0;
}

#pagewrap .introbx {
	max-width: 80%;
	padding-top: 35px;
}

/* Section backgrounds an editor can apply to any block or area (Design → Custom Class).
   The colour is painted full-width behind the element with a clipped box-shadow,
   so it works inside the page container without extra markup. */
#pagewrap .section-cream,
#pagewrap .section-navy,
#pagewrap .section-surface {
  position: relative;
  padding-block: var(--section-pad);
  box-shadow: 0 0 0 100vmax var(--section-bg);
  clip-path: inset(0 -100vmax);
  background: var(--section-bg);
}
#pagewrap .section-cream { --section-bg: var(--brand-50); }
#pagewrap .section-surface { --section-bg: var(--surface); }
#pagewrap .section-navy { --section-bg: var(--brand-800); color: var(--paper); }
#pagewrap .section-navy :is(h1, h2, h3, h4, h5, h6, a:not(.btn)) { color: var(--paper); }
/* Applied to a whole area (its style wrapper is then the section's only content): the class supplies the
   padding, so drop the template section's own — otherwise the spacing doubles */
#pagewrap .section:has(> .section__inner > :is(.section-cream, .section-navy, .section-surface):only-child) { padding-block: 0; }
#pagewrap .text-center { text-align: center; }

/* ---------- Buttons (theme markup and rich-text "Styles" share these classes) ---------- */

#pagewrap .btn,
#pagewrap span.btn > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;             /* Parkland/Button */
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
/* Rich-text Styles wrap the link in <span class="btn …">: the span is the look, the link fills it */
#pagewrap span.btn:has(> a) { padding: 0; border: 0; min-height: 0; background: none; box-shadow: none; }   /* only wrappers: a template's own <span class="btn"> (service_cards) keeps the full look */
#pagewrap span.btn > a { width: 100%; }

#pagewrap .btn--primary,
#pagewrap span.btn--primary > a { background: var(--brand-600); color: var(--paper); border-color: var(--brand-600); }
#pagewrap .btn--primary:hover,
#pagewrap span.btn--primary > a:hover { background: var(--brand-800); border-color: var(--brand-800); color: var(--paper); }

#pagewrap .btn--secondary,
#pagewrap span.btn--secondary > a { background: var(--paper); color: var(--brand-600); border-color: var(--brand-600); }
#pagewrap .btn--secondary:hover,
#pagewrap span.btn--secondary > a:hover { background: var(--brand-600); color: var(--paper); }

#pagewrap .btn--lime,
#pagewrap span.btn--lime > a { background: var(--lime); color: var(--ink-900); border-color: var(--lime); }
#pagewrap .btn--lime:hover,
#pagewrap span.btn--lime > a:hover { background: #b6e57c; border-color: #b6e57c; color: var(--ink-900); }

#pagewrap .btn--offset,
#pagewrap span.btn--offset > a { box-shadow: var(--shadow-offset); }
#pagewrap .btn--offset:hover,
#pagewrap span.btn--offset > a:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink-900); }

#pagewrap .btn--ghost,
#pagewrap span.btn--ghost > a { background: transparent; color: var(--paper); border-color: var(--paper); }
#pagewrap .btn--ghost:hover,
#pagewrap span.btn--ghost > a:hover { background: var(--paper); color: var(--brand-800); }

/* A paragraph with buttons lays them out in a wrapping row. Buttons can be styled spans (Styles menu)
   or links with a .btn class. Editors usually separate them with a space or &nbsp;, which becomes its
   own ~4px flex item, so the spacing is a 12px margin on each following button (≈16px in total, as in
   the Figma) rather than a column gap, which would double up around that space. */
#pagewrap p:has(> .btn) { display: flex; flex-wrap: wrap; row-gap: 12px; align-items: center; margin-left: -12px; }
#pagewrap p > .btn { margin-left: 12px; }   /* every button, so wrapped rows stay aligned; the row is pulled back 12px */
#pagewrap .text-center p:has(> .btn),
#pagewrap p[style*="center"]:has(> .btn) { justify-content: center; }

/* ---------- Type helpers (rich-text Styles) ---------- */

#pagewrap .overline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-600);
}
#pagewrap .overline::before,
#pagewrap .overline--center::after {
  content: "";
  width: 32px;
  height: 4px;
  border-radius: 2px;
  background: var(--lime);
  flex: none;
}
/* When the Styles menu puts the class on the heading/paragraph itself (page_theme.php "element"
   h2/h3), it must stay a full-width block so text-align works — set on the element by the editor or
   inherited from a centred container. The dashes become inline shapes on the text line instead of
   flex items. "Overline, centred" centres itself unless the editor sets another alignment. */
#pagewrap :is(h1, h2, h3, h4, h5, h6, p, div).overline { display: block; }
#pagewrap :is(h1, h2, h3, h4, h5, h6, p, div).overline--center { text-align: center; }
#pagewrap :is(h1, h2, h3, h4, h5, h6, p, div).overline::before,
#pagewrap :is(h1, h2, h3, h4, h5, h6, p, div).overline--center::after {
  display: inline-block;
  vertical-align: middle;
  margin-top: -2px;
}
#pagewrap :is(h1, h2, h3, h4, h5, h6, p, div).overline::before { margin-right: 12px; }
#pagewrap :is(h1, h2, h3, h4, h5, h6, p, div).overline--center::after { margin-left: 12px; }
#pagewrap .type-display { font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 5vw, 64px); line-height: 1.05; }
#pagewrap .type-lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.5; }
#pagewrap .type-callout { font-family: var(--font-display); font-weight: 500; font-size: 24px; line-height: 1.2; color: var(--brand-600); }
#pagewrap .type-caption { font-size: 13px; line-height: 1.5; }
#pagewrap .text-primary { color: var(--brand-600); }
#pagewrap .text-lime { color: var(--lime); }
#pagewrap .text-muted { color: var(--ink-600); }

/* Stats ("600+ team members"): a bulleted list with the "stats-row" block class,
   each item = Stat number + Stat label */
#pagewrap .stat-number { display: block; font-family: var(--font-display); font-weight: 600; font-size: clamp(48px, 5vw, 64px); line-height: 1.05; color: var(--ink-600); font-variant-numeric: tabular-nums; }   /* equal-width digits: steady while main.js counts up */
#pagewrap .stat-label { display: block; font-size: 13px; line-height: 1.5; color: var(--ink-600); }
#pagewrap .stats-row ul { display: flex; flex-wrap: wrap; gap: 16px 32px; list-style: none; margin: 0 0 1.25em; padding: 8px 0; }
#pagewrap .stats-row li { margin: 0; }

/* ---------- Header ---------- */

#pagewrap .site-header {
  position: relative;
  z-index: 50;
  background: var(--paper);
}
#pagewrap .site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 96px;
  padding-block: 12px;
}
/* Logo = Image block in the "Header Logo" Global Area (its link is set on the block) */
#pagewrap .site-logo { display: block; flex: none; line-height: 0; }
#pagewrap .site-logo a { display: block; }
#pagewrap .site-logo img { width: 52px; height: auto; }

#pagewrap .site-nav { flex: 1 1 auto; min-width: 0; }
#pagewrap .site-nav ul { list-style: none; margin: 0; padding: 0; }
#pagewrap .site-nav .nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
}
#pagewrap .site-nav .nav > li { position: relative; margin: 0; }
#pagewrap .site-nav .nav > li > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-block: 10px;
  font-weight: 600;
  font-size: 15px;            /* Parkland/Nav */
  line-height: 1.2;
  color: var(--ink-900);
  text-decoration: none;
  white-space: nowrap;
}
#pagewrap .site-nav .nav > li > a:hover,
#pagewrap .site-nav .nav > li.nav-selected > a,
#pagewrap .site-nav .nav > li.nav-path-selected > a { color: var(--brand-600); }
/* "+" after items that have a dropdown (Figma: "Programs & Services +") */
#pagewrap .site-nav .nav > li:has(> ul) > a::after { content: "+"; font-weight: 600; }

/* Desktop dropdown */
#pagewrap .site-nav .nav li > ul {
  position: absolute;
  top: 100%;
  left: -20px;
  min-width: 260px;
  padding: 12px 0;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(14, 8, 108, .14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
#pagewrap .site-nav .nav li:hover > ul,
#pagewrap .site-nav .nav li:focus-within > ul,
#pagewrap .site-nav .nav li.is-open > ul {   /* .is-open: first tap on a touch screen (main.js) */
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
#pagewrap .site-nav .nav li > ul a {
  display: block;
  padding: 8px 20px;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-900);
  text-decoration: none;
}
#pagewrap .site-nav .nav li > ul a:hover { background: var(--brand-50); color: var(--brand-600); }
#pagewrap .site-nav .nav li > ul ul { position: static; box-shadow: none; padding: 0 0 0 12px; opacity: 1; visibility: visible; transform: none; min-width: 0; }

#pagewrap .site-header__ctas { flex: none; }
#pagewrap .site-header__ctas p { margin: 0; }
#pagewrap .site-header__ctas p:has(> .btn) { flex-wrap: nowrap; margin-left: -12px; }   /* keep the button-row offset (the p { margin: 0 } above would reset it) */

/* Menu toggle (mobile) */
#pagewrap .site-header__toggle {
  display: none;
  margin-left: auto;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 2px solid var(--brand-600);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--brand-600);
  cursor: pointer;
}
#pagewrap .site-header__toggle-bars,
#pagewrap .site-header__toggle-bars::before,
#pagewrap .site-header__toggle-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s ease, background-color .25s ease;
}
#pagewrap .site-header__toggle-bars { position: relative; }
#pagewrap .site-header__toggle-bars::before,
#pagewrap .site-header__toggle-bars::after { content: ""; position: absolute; left: 0; }
#pagewrap .site-header__toggle-bars::before { top: -7px; }
#pagewrap .site-header__toggle-bars::after { top: 7px; }
#pagewrap .site-header__toggle[aria-expanded="true"] .site-header__toggle-bars { background: transparent; }
#pagewrap .site-header__toggle[aria-expanded="true"] .site-header__toggle-bars::before { transform: translateY(7px) rotate(45deg); }
#pagewrap .site-header__toggle[aria-expanded="true"] .site-header__toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu panel (links are copied from the header areas by main.js) */
#pagewrap .mobile-menu {
  padding: 8px var(--gutter) 32px;
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity .28s ease, transform .28s ease;   /* keep in sync with MENU_MS in main.js */
}
#pagewrap .site-header.is-menu-visible .mobile-menu { opacity: 1; transform: none; }
#pagewrap .mobile-menu[hidden] { display: none; }
#pagewrap .mobile-menu__nav ul { list-style: none; margin: 0; padding: 0; }
#pagewrap .mobile-menu__nav li { margin: 0; border-bottom: 1px solid var(--brand-100); }
#pagewrap .mobile-menu__nav li li { border-bottom: 0; }
#pagewrap .mobile-menu__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#pagewrap .mobile-menu__nav a {
  flex: 1 1 auto;
  display: block;
  padding: 14px 0;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.3;
  color: var(--ink-900);
  text-decoration: none;
}
#pagewrap .mobile-menu__nav li li a { padding: 10px 0 10px 16px; font-weight: 500; font-size: 16px; }
#pagewrap .mobile-menu__nav li li li a { padding-left: 32px; }
#pagewrap .mobile-menu__nav li > ul {
  margin-bottom: 8px;
  transition: height .25s ease, margin-bottom .25s ease, opacity .25s ease;   /* keep in sync with SUB_MENU_MS in main.js */
}
#pagewrap .mobile-menu__sub-toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink-900);
  cursor: pointer;
}
#pagewrap .mobile-menu__sub-toggle::before {
  content: "";
  width: 9px;
  height: 9px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease, margin .2s ease;
}
#pagewrap .mobile-menu__sub-toggle[aria-expanded="true"] { background: var(--brand-600); color: var(--paper); }
#pagewrap .mobile-menu__sub-toggle[aria-expanded="true"]::before { transform: rotate(-135deg); margin-top: 4px; }
#pagewrap .mobile-menu__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
#pagewrap .mobile-menu__buttons .btn { flex: 1 1 200px; }

@media (min-width: 1200px) {
  #pagewrap .site-header__inner { min-height: 200px; padding-block: 20px; gap: 28px; }
  #pagewrap .site-logo { margin-right: 10px; }
  #pagewrap .site-logo img { width: 104px; }
  /* One line; the gap shrinks between 1200 and ~1480px so everything fits the container */
  /* capped at 24px (Figma: 28px) so dropdown "+" markers and one more short item still fit at the widest container */
  #pagewrap .site-nav .nav { flex-wrap: nowrap; column-gap: clamp(14px, 1.65vw, 24px); }
  #pagewrap .site-header__ctas { margin-left: auto; }
  #pagewrap .mobile-menu { display: none !important; }
}

/* 1200–1365px: the full nav is tight (≈48px spare at 1200). Slimmer header buttons free ~32px so
   dropdown "+" markers or one more short item still fit on one line. */
@media (min-width: 1200px) and (max-width: 1365px) {
  #pagewrap .site-header__ctas a.btn,
  #pagewrap .site-header__ctas span.btn > a { padding-inline: 20px; }
}

/* Tablets (768–1199px, mobile menu): a mid-size logo instead of the 52px phone size,
   so the "Community Living and Supports Society" line stays legible */
@media (min-width: 768px) and (max-width: 1199px) {
  #pagewrap .site-header__inner { min-height: 128px; padding-block: 16px; }
  #pagewrap .site-logo img { width: 72px; }
}

@media (max-width: 1199px) {
  #pagewrap .site-nav,
  #pagewrap .site-header__ctas { display: none; }
  #pagewrap .site-header__toggle { display: grid; place-items: center; }

  html.menu-open { overflow: hidden; }
  #pagewrap:not(.is-edit-mode) .site-header.is-menu-open {
    position: fixed;
    inset: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: transparent;
  }
  #pagewrap .site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--paper);
  }
  #pagewrap:not(.is-edit-mode) .site-header.is-menu-open .site-header__inner { flex: 0 0 auto; width: 100%; padding-inline: var(--gutter); border-bottom: 1px solid var(--brand-100); }
  #pagewrap:not(.is-edit-mode) .site-header.is-menu-open .mobile-menu { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

  /* In edit mode keep the source areas visible so editors can work on them */
  #pagewrap.is-edit-mode .site-nav,
  #pagewrap.is-edit-mode .site-header__ctas { display: block; }
  #pagewrap.is-edit-mode .site-header__inner { flex-wrap: wrap; }
}

/* ---------- Sticky header ----------
   The header sticks to the top (below Concrete's 48px toolbar when an editor is signed in) and,
   once the page is scrolled, main.js adds .is-compact: a shorter bar, smaller logo and a shadow.
   No content jump: as the bar shrinks, its bottom margin grows by the same amount with the same
   timing, so the space it takes in the page never changes. Off in edit mode.
   Bar heights: --bar-full / --bar-compact (below). Keep the .3s durations in step with each other. */

html.ccm-toolbar-visible { --toolbar-h: 48px; }
/* anchor links land below the compact bar */
html { scroll-padding-top: calc(var(--toolbar-h, 0px) + 88px); }

#pagewrap:not(.is-edit-mode) .site-header {
  --bar-full: 104px;
  --bar-compact: 72px;
  position: sticky;
  top: var(--toolbar-h, 0px);
  margin-bottom: 0;
  transition: margin-bottom .3s ease, box-shadow .3s ease;
}
#pagewrap:not(.is-edit-mode) .site-header__inner {
  height: var(--bar-full);
  min-height: 0;
  transition: height .3s ease, padding .3s ease;
}
#pagewrap:not(.is-edit-mode) .site-logo img { transition: width .3s ease; }

#pagewrap:not(.is-edit-mode) .site-header.is-compact {
  margin-bottom: calc(var(--bar-full) - var(--bar-compact));
  box-shadow: 0 6px 24px rgba(14, 8, 108, .10);
}
#pagewrap:not(.is-edit-mode) .site-header.is-compact .site-header__inner { height: var(--bar-compact); padding-block: 8px; }
#pagewrap:not(.is-edit-mode) .site-header.is-compact .site-logo img { width: 40px; }

@media (min-width: 768px) and (max-width: 1199px) {
  #pagewrap:not(.is-edit-mode) .site-header { --bar-full: 144px; --bar-compact: 80px; }
  #pagewrap:not(.is-edit-mode) .site-header.is-compact .site-logo img { width: 44px; }
}
@media (min-width: 1200px) {
  html { scroll-padding-top: calc(var(--toolbar-h, 0px) + 112px); }
  #pagewrap:not(.is-edit-mode) .site-header { --bar-full: 200px; --bar-compact: 96px; }
  #pagewrap:not(.is-edit-mode) .site-header.is-compact .site-logo img { width: 48px; }
}
@media (max-width: 1199px) {
  /* the open mobile menu sits below Concrete's toolbar for signed-in editors */
  #pagewrap:not(.is-edit-mode) .site-header.is-menu-open {
    top: var(--toolbar-h, 0px);
    height: calc(100dvh - var(--toolbar-h, 0px));
    margin-bottom: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  #pagewrap:not(.is-edit-mode) .site-header,
  #pagewrap:not(.is-edit-mode) .site-header__inner,
  #pagewrap:not(.is-edit-mode) .site-logo img { transition: none; }
}

/* ---------- Home hero ---------- */

#pagewrap .hero {
  background: var(--brand-800);
  color: var(--paper);
  padding-block: clamp(40px, 5vw, 64px);
  overflow: hidden;
}
#pagewrap .hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
#pagewrap .hero__visual {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1;
  margin-inline: auto;
  background: url("../images/hero-sun-ring.svg") center / contain no-repeat;
}
/* The photo is a circle 565/715 of the ring's size, centred */
#pagewrap .hero__photo {
  position: absolute;
  inset: 10.49%;
  width: 79.02%;
  height: 79.02%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-600);
}
/* No page_wallpaper set yet: fill the ring with a brand-blue circle instead of leaving it empty */
#pagewrap .hero__visual--empty::after {
  content: "";
  position: absolute;
  inset: 10.49%;
  border-radius: 50%;
  background: var(--brand-600);
}
#pagewrap .hero__copy { max-width: 436px; margin-inline: auto; }
#pagewrap .hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  color: var(--paper);
  margin: 0 0 28px;
}
#pagewrap .hero__body { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.5; }
#pagewrap .hero__body :is(h1, h2, h3, h4, a:not(.btn)) { color: var(--paper); }
#pagewrap .hero__body p:has(> .btn) { padding-top: 8px; }

@media (min-width: 1024px) {
  #pagewrap .hero__inner { grid-template-columns: minmax(0, 715px) minmax(0, 436px); gap: clamp(40px, 5vw, 80px); justify-content: end; }
  #pagewrap .hero__visual { width: 100%; }
  #pagewrap .hero__copy { margin: 0; }
}

/* page_wallpaper set: the photo also fills the hero, blurred (shared rules under "Interior page banner").
   The gradient mirrors the banner's: the photo is on the left here, so it's darkest behind the text on the
   right; stacked (below 1024px), lighter behind the circle at the top. */
#pagewrap .hero--visual::after {
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(14, 8, 108, .55) 0%, rgba(14, 8, 108, .94) 55%);
}
@media (min-width: 1024px) {
  #pagewrap .hero--visual::after { background: linear-gradient(270deg, rgba(14, 8, 108, .94) 0%, rgba(14, 8, 108, .78) 45%, rgba(14, 8, 108, .5) 100%); }
}

/* ---------- Interior page banner ---------- */

#pagewrap .page-banner {
  position: relative;
  background: var(--brand-800);
  color: var(--paper);
  padding-block: clamp(72px, 9vw, 80px);
  isolation: isolate;
}
/* page_wallpaper set: the photo in the home hero's sun ring — above the title on phones/tablets,
   to its right from 1024px. Without it the banner is title + intro only. */
#pagewrap .page-banner__inner { display: flex; flex-direction: column; gap: 32px; }
#pagewrap .page-banner__copy { min-width: 0; }
#pagewrap .page-banner__visual {
  order: -1;
  position: relative;
  flex: none;
  width: 85%; max-width: 350px;
  aspect-ratio: 1;
  background: url("../images/hero-sun-ring.svg") center / contain no-repeat;
}
/* Same geometry as .hero__photo: a circle 565/715 of the ring's size, centred */
#pagewrap .page-banner__photo {
  position: absolute;
  inset: 10.49%;
  width: 79.02%;
  height: 79.02%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-600);
}
/* Behind it, the same photo blurred (::before, oversized so the blur has no soft edges) under a
   navy gradient (::after) that keeps the title readable. Shared with the home hero (.hero--visual). */
#pagewrap :is(.page-banner--visual, .hero--visual) { 
	position: relative; 
	isolation: isolate; 
	overflow: hidden;
	padding-block: clamp(72px, 9vw, 80px); 
}
#pagewrap :is(.page-banner--visual, .hero--visual)::before,
#pagewrap :is(.page-banner--visual, .hero--visual)::after { content: ""; position: absolute; pointer-events: none; }
#pagewrap :is(.page-banner--visual, .hero--visual)::before {
  inset: -60px;
  z-index: -2;
  background: var(--banner-bg, none) center / cover no-repeat fixed;   /* fixed: stays put while the page scrolls past (iOS Safari ignores it and scrolls) */
  filter: blur(24px);
}
#pagewrap .page-banner--visual::after {
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(14, 8, 108, .94) 0%, rgba(14, 8, 108, .78) 55%, rgba(14, 8, 108, .5) 100%);
}
@media (max-width: 1023px) {
  #pagewrap .page-banner--visual { padding-top: clamp(40px, 6vw, 64px); }
  /* stacked: lighter behind the circle at the top, darkest behind the text */
  #pagewrap .page-banner--visual::after { background: linear-gradient(180deg, rgba(14, 8, 108, .55) 0%, rgba(14, 8, 108, .94) 55%); }
}
@media (min-width: 1024px) {
  #pagewrap .page-banner--visual .page-banner__inner { flex-direction: row; align-items: center; gap: clamp(40px, 5vw, 0); }
  #pagewrap .page-banner--visual .page-banner__copy { flex: 1 1 auto; }
  #pagewrap .page-banner__visual { order: 0; width: 50%; max-width: 650px; }   /* ring = half the container (570px at full width) */
}
#pagewrap .page-banner__title {
  max-width: 760px;
  margin: 0;
  font-weight: 600;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  color: var(--paper);
}

/* ---------- Footer ---------- */

#pagewrap .site-footer {
  background: var(--brand-800);
  color: var(--paper);
  padding-block: 64px;
  font-size: 15px;
  line-height: 1.6;
}
#pagewrap .site-footer a:not(.btn) { color: var(--paper); text-decoration: none; }
#pagewrap .site-footer a:not(.btn):hover { color: var(--lime); text-decoration: underline; }
#pagewrap .site-footer p { margin: 0 0 6px; }
#pagewrap .site-footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
#pagewrap .site-footer__brand { display: flex; flex-wrap: wrap; align-items: start; gap: 32px; }
#pagewrap .site-footer__logo { display: block; line-height: 0; flex: none; }
#pagewrap .site-footer__logo a { display: block; }
#pagewrap .site-footer__logo img { width: 104px; height: auto; }
/* Footer Contact area: first line = phone (Oswald 32), second = email (20px) */
#pagewrap .site-footer__contact h1,
#pagewrap .site-footer__contact h2,
#pagewrap .site-footer__contact h3,
#pagewrap .site-footer__contact h4,
#pagewrap .site-footer__contact .footer-phone { font-family: var(--font-display); font-weight: 500; font-size: 32px; line-height: 1.15; color: var(--paper); margin: 0 0 6px; }
#pagewrap .site-footer__contact .footer-email,
#pagewrap .site-footer__contact .type-lead { font-size: 20px; line-height: 1.5; }
#pagewrap .site-footer__contact img { display: inline-block; vertical-align: middle; }
#pagewrap .site-footer__cta { text-align: right; margin-left: auto; }
#pagewrap .site-footer__cta :is(h1, h2, h3, h4) { font-family: var(--font-display); font-weight: 500; font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; color: var(--paper); margin: 0 0 24px; }
#pagewrap .site-footer__cta p:has(> .btn) { justify-content: flex-end; margin-left: -12px; }   /* keep the button-row offset (.site-footer p resets margins) */
#pagewrap .site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
  padding-top: 48px;
  margin-top: 24px;
  font-weight: 600;
  line-height: 1.2;
}
/* Link rows: a Content block paragraph or an Autonav list both lay out inline */
#pagewrap .site-footer__links :is(p, ul) { display: flex; flex-wrap: wrap; gap: 12px 25px; margin: 0; padding: 0; list-style: none; }
#pagewrap .site-footer__links li { margin: 0; }
#pagewrap .site-footer__links .text-lime { color: var(--lime); }
#pagewrap .site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 24px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--brand-100);
}
#pagewrap .site-footer__legal p { margin: 0; }
#pagewrap .site-footer__legal a:not(.btn) { color: var(--brand-100); }

@media (max-width: 767px) {
  #pagewrap .site-footer__cta { text-align: left; margin-left: 0; }
  #pagewrap .site-footer__cta p:has(> .btn) { justify-content: flex-start; }
}

/* ---------- Default "Add Columns" layout (core ships no front-end CSS for it) ---------- */

#pagewrap .ccm-layout-column-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}
/* A float-era clearfix elsewhere in the cascade would add phantom flex items */
#pagewrap .ccm-layout-column-wrapper::before,
#pagewrap .ccm-layout-column-wrapper::after { content: none; display: none; }
#pagewrap .ccm-layout-column-wrapper > .ccm-layout-column { flex: 1 1 0; min-width: 0; }
#pagewrap .ccm-layout-column-wrapper > .ccm-layout-column > .ccm-layout-column-inner { height: 100%; }

@media (max-width: 767px) {
  #pagewrap .ccm-layout-column-wrapper { flex-direction: column; gap: 24px; }
  #pagewrap .ccm-layout-column-wrapper > .ccm-layout-column { width: 100% !important; flex-basis: auto; }
}

/* ---------- Layout presets (Add Columns → presets from page_theme.php) ----------
   Presets render their own markup (.layout-preset / .layout-preset__col), not .ccm-layout-column,
   so the rules above don't apply. Mobile-first: one column, then the split at each breakpoint.
     1/3 – 2/3, 2/3 – 1/3, 1/2 – 1/2 : stacked below 768px
     1/3 each                        : stacked below 1024px (thirds would be ~200px on tablets) */

#pagewrap .layout-preset {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin: 0 0 1.25em;
}
#pagewrap .layout-preset:last-child { margin-bottom: 0; }
#pagewrap .layout-preset > .layout-preset__col { min-width: 0; margin: 0; }
#pagewrap .layout-preset__col > :first-child,
#pagewrap .layout-preset__col > .ccm-layout-column-inner > :first-child { margin-top: 0; }
#pagewrap .layout-preset__col > :last-child,
#pagewrap .layout-preset__col > .ccm-layout-column-inner > :last-child { margin-bottom: 0; }
#pagewrap .layout-preset__col img:not(.sun-circle__photo) { border-radius: var(--radius); }   /* Sun Circle photos stay round */
#pagewrap .layout-preset__col img[src$=".svg"] { border-radius: 0; }

@media (min-width: 768px) {
  #pagewrap .layout-preset { gap: 32px; }
  #pagewrap .layout-preset--33-66 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  #pagewrap .layout-preset--66-33 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  #pagewrap .layout-preset--50-50 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  #pagewrap .layout-preset--thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Optional card look: Design → Custom Class "layout-cards" on the Add Columns block.
   Works on the presets and on a custom (non-preset) layout. Same card as checkpoint-box. */
#pagewrap .layout-cards .layout-preset { align-items: stretch; }
#pagewrap .layout-cards :is(.layout-preset__col, .ccm-layout-column-wrapper > .ccm-layout-column) {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 6px 24px rgba(14, 8, 108, .12);
  color: var(--ink-900);
}
#pagewrap .layout-cards .ccm-layout-column-wrapper { align-items: stretch; }
/* Cards stay white, so their text stays dark even inside navy sections */
#pagewrap :is(.section-navy, .is-dark) .layout-cards :is(.layout-preset__col, .ccm-layout-column) { color: var(--ink-900); }
#pagewrap :is(.section-navy, .is-dark) .layout-cards :is(.layout-preset__col, .ccm-layout-column) :is(h1, h2, h3, h4, h5, h6) { color: var(--brand-600); }
#pagewrap :is(.section-navy, .is-dark) .layout-cards :is(.layout-preset__col, .ccm-layout-column) a:not(.btn) { color: var(--brand-600); }
@media (max-width: 767px) {
  #pagewrap .layout-cards :is(.layout-preset__col, .ccm-layout-column-wrapper > .ccm-layout-column) { padding: 22px; }
}

/* ---------- Content formatting inside areas ---------- */

#pagewrap .section__inner :is(ul, ol):not([class]) { padding-left: 1.2em; }
#pagewrap .section__inner ul:not([class]) li::marker { color: var(--brand-600); }
#pagewrap .section__inner blockquote {
  margin: 0 0 1.25em;
  padding: 4px 0 4px 24px;
  border-left: 4px solid var(--lime);
  font-size: 20px;
  line-height: 1.5;
}
#pagewrap .section__inner .ccm-image-block,
#pagewrap .section__inner img.ccm-image-block { border-radius: var(--radius); }

/* ---------- Login page (application/single_pages/login.php + authentication/concrete/form.php) ----------
   /login is routed to this theme by application/config/app.php. Core's other sign-in screens
   (forgot password, password sent, change password…) keep core's Bootstrap class names, so they're
   styled here too. Bootstrap's CSS/JS aren't loaded on the front end. */

#pagewrap main:has(.pclass-login) {
  background: var(--brand-50) url("../images/sun-rays.svg") no-repeat;
  background-size: 1717px 1717px;
  background-position: right -1000px top -1100px;
}

#pagewrap .pclass-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 980px;
  margin-inline: auto;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(14, 8, 108, .14);
  overflow: hidden;
  background: var(--paper);
}

/* Navy welcome panel with the hero's sun ring peeking in from the corner */
#pagewrap .pclass-login__panel {
  position: relative;
  display: none;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 48px;
  background: var(--brand-800) url("../images/hero-sun-ring.svg") no-repeat right -160px top -160px / 420px;
  color: var(--paper);
  isolation: isolate;
}
#pagewrap .pclass-login__panel .overline { color: var(--lime); }
#pagewrap .pclass-login__welcome {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 4.4vw, 56px);
  line-height: 1.05;
}
#pagewrap .pclass-login__intro { margin: 0; font-size: 17px; line-height: 1.6; color: var(--brand-100); }

#pagewrap .pclass-login__card { padding: clamp(28px, 5vw, 48px); }
#pagewrap .pclass-login__title {
  margin: 0 0 24px;
  font-weight: 600;
  font-size: clamp(32px, 3.6vw, 44px);
  line-height: 1.1;
  color: var(--brand-600);
}
#pagewrap .pclass-login__disclaimer {
  margin-bottom: 24px;
  padding: 16px 20px;
  border-left: 4px solid var(--lime);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--brand-50);
  font-size: 15px;
  line-height: 1.6;
}
#pagewrap .pclass-login__disclaimer > :last-child { margin-bottom: 0; }

@media (min-width: 900px) {
  #pagewrap .pclass-login { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  #pagewrap .pclass-login__panel { display: flex; }
}

/* Fields — the same look as the Express Form fields */
#pagewrap .pclass-login :is(form, .forgotPassword, .change-password, .required-password-upgrade) {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
}
#pagewrap .pclass-login :is(.pclass-login__field, .form-group, .mb-3) { display: flex; flex-direction: column; gap: 8px; margin: 0; }
#pagewrap .pclass-login :is(label, .control-label, .form-label) {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-900);
}
#pagewrap .pclass-login :is(.form-control, .form-select, select, input[type="text"], input[type="email"], input[type="password"]) {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 2px solid var(--brand-100);
  border-radius: var(--radius);
  background: var(--paper);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;            /* 16px stops iOS zooming into the field */
  line-height: 1.4;
  color: var(--ink-900);
  transition: border-color .2s ease, box-shadow .2s ease;
}
#pagewrap .pclass-login :is(.form-control, .form-select, select, input):focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(21, 12, 163, .15);
}
#pagewrap .pclass-login__label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
#pagewrap .pclass-login__forgot,
#pagewrap .pclass-login__cancel,
#pagewrap .pclass-login__signup a { font-weight: 600; font-size: 14px; color: var(--brand-600); }

/* Password + show/hide button inside the field */
#pagewrap .pclass-login__password { position: relative; }
#pagewrap .pclass-login__password .form-control { padding-right: 56px; }
#pagewrap .pclass-login__reveal {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-top: -21px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-600);
  cursor: pointer;
}
#pagewrap .pclass-login__reveal:hover { color: var(--brand-600); background: var(--brand-50); }
#pagewrap .pclass-login__reveal[aria-pressed="false"] .pclass-login__eye-slash { display: none; }

/* Remember me */
#pagewrap .pclass-login__check { display: flex; align-items: flex-start; gap: 12px; }
#pagewrap .pclass-login__check input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--brand-600);
}
#pagewrap .pclass-login__check label { font-weight: 500; font-size: 15px; line-height: 1.5; }

/* Actions: theme primary button, plus core's bare .btn-primary/.btn-success on the other screens */
#pagewrap .pclass-login__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 4px; }
#pagewrap .pclass-login__actions .btn { flex: 1 1 200px; }
#pagewrap .pclass-login .d-grid { display: grid; }
#pagewrap .pclass-login :is(.btn-primary, .btn-success) {
  width: 100%;
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: var(--paper);
}
#pagewrap .pclass-login :is(.btn-primary, .btn-success):hover { background: var(--brand-800); border-color: var(--brand-800); color: var(--paper); }
#pagewrap .pclass-login .btn-secondary { background: var(--paper); color: var(--brand-600); border-color: var(--brand-600); }

#pagewrap .pclass-login :is(h4, .help-block, .ccm-message) { margin: 0; }
#pagewrap .pclass-login h4 { font-weight: 500; font-size: 24px; line-height: 1.2; color: var(--brand-600); }
/* The page's <h1> already names these screens (login.php → $screenTitles); hide core's repeat */
#pagewrap .pclass-login .authentication-type > :is(.forgotPassword, .change-password, .required-password-upgrade) h4 { display: none; }
#pagewrap .pclass-login :is(.help-block, .ccm-message) { font-size: 15px; line-height: 1.6; color: var(--ink-600); }
#pagewrap .pclass-login .ccm-message:empty { display: none; }

#pagewrap .pclass-login__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-600);
}
#pagewrap .pclass-login__or::before,
#pagewrap .pclass-login__or::after { content: ""; flex: 1; height: 1px; background: var(--brand-100); }
#pagewrap .pclass-login__signup { margin: 8px 0 0; padding-top: 20px; border-top: 1px solid var(--brand-100); font-size: 15px; text-align: center; }

/* System messages (errors after a failed sign-in, success after a reset) — on single pages generally */
#pagewrap .section__inner > .alert,
#pagewrap .pclass-login .alert {
  position: relative;
  max-width: 980px;
  margin: 0 auto 24px;
  padding: 16px 20px 16px 24px;
  border-left: 4px solid var(--brand-600);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 6px 24px rgba(14, 8, 108, .08);
  font-size: 15px;
  line-height: 1.6;
}
#pagewrap .section__inner > .alert-danger,
#pagewrap .pclass-login .alert-danger { border-left-color: #c62828; color: #8e1b1b; }
#pagewrap .section__inner > .alert-success,
#pagewrap .pclass-login .alert-success { border-left-color: var(--lime); }
/* Bootstrap's dismiss script isn't loaded, so the close button would do nothing */
#pagewrap .alert .btn-close { display: none; }

/* ---------- Edit mode ---------- */

#pagewrap.is-edit-mode .section { overflow: visible; }
/* main.js sets [hidden] on the menu button in edit mode; the display rule above would override it */
#pagewrap .site-header__toggle[hidden],
#pagewrap.is-edit-mode .site-header__toggle { display: none; }
#pagewrap.is-edit-mode .hero__copy { max-width: none; }
/* Empty logo areas need room to be clicked */
#pagewrap.is-edit-mode .site-logo,
#pagewrap.is-edit-mode .site-footer__logo { min-width: 140px; line-height: normal; }
