/* ===========================
   CUSTOM PROPERTIES
   =========================== */
:root {
  /* MSA Accountants brand — dark teal wordmark (#304545 sampled from logo) */
  --primary: #2B4544;
  --primary-dark: #1D3231;
  --accent: #43736F;
  --accent-light: #7FA8A4;
  --logo-blue: #9EC6D5; /* swoosh accent sampled directly from logo artwork */
  --white: #FFFFFF;
  --surface: #EEF4F3;
  --surface-dark: #DCE9E7;
  --text: #2D2D2D;
  --text-muted: #6B7280;
  --border: #C8D9D6;
  --max-width: 1160px;
  --radius: 6px;
  --shadow: 0 2px 12px rgba(29, 50, 49, 0.08);
  --shadow-lg: 0 8px 32px rgba(29, 50, 49, 0.14);
}

/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'Albert Sans', sans-serif; color: var(--text); background: var(--white); line-height: 1.7; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ===========================
   TYPOGRAPHY
   =========================== */
h1, h2, h3, h4 { font-family: 'Unbounded', sans-serif; line-height: 1.25; color: var(--primary); }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); font-weight: 400; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); font-weight: 500; }
h4 { font-size: 1.05rem; font-weight: 500; }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}
.lead { font-size: 1.1rem; color: var(--text-muted); line-height: 1.85; }

/* ===========================
   LAYOUT
   =========================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 5rem 0; }
.section--surface { background: var(--surface); }
.section--primary { background: var(--primary); color: var(--white); }
.section__header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3rem;
}
.section__header h2 { margin-bottom: 0.75rem; }

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Albert Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  border: 2px solid transparent;
  line-height: 1;
}
.btn--primary { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-light); border-color: var(--accent-light); }
.btn--outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn--outline:hover { background: var(--primary); color: var(--white); }
.btn--outline-white { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn--outline-white:hover { background: var(--white); color: var(--primary); border-color: var(--white); }

/* ===========================
   SITE HEADER / NAV
   =========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.site-logo { display: flex; align-items: center; position: relative; }
.site-logo__img { height: 46px; width: auto; display: block; }
.site-logo__img--main { transition: opacity 0.4s ease; }
.site-logo__img--white {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Overlay header — home page only (body.hero-overlay added by the hero
   script). Transparent over the dark hero, fades to white once scrolled
   (.header-solid) or when the mobile nav opens. No JS = normal header. */
body.hero-overlay .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom-color: transparent;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
body.hero-overlay.header-solid .site-header,
body.hero-overlay.nav-open .site-header {
  background: var(--white);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow);
}
body.hero-overlay:not(.header-solid):not(.nav-open) .site-logo__img--main { opacity: 0; }
body.hero-overlay:not(.header-solid):not(.nav-open) .site-logo__img--white { opacity: 1; }
body.hero-overlay:not(.header-solid):not(.nav-open) .nav-toggle span { background: var(--white); }

/* Footer text logo (dark bg — image not used there) */
.logo-main {
  font-family: 'Unbounded', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
}
.logo-sub {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
}
/* Mobile nav panel — slides in from right */
.site-nav {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  padding: 1.5rem;
  overflow-y: auto;
  z-index: 99;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s;
}
.nav-open .site-nav {
  transform: translateX(0);
  visibility: visible;
}
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  transition: all 0.25s;
  border-radius: 2px;
}
/* Hamburger → X when open */
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-cta { display: none; }

/* Mobile nav list */
.nav-open .nav-list { display: flex; flex-direction: column; gap: 0; }
.nav-open .nav-list > li > a {
  display: block;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary);
  border-radius: 0;
}

/* Mobile dropdowns — hidden until toggled */
.dropdown { display: none; }
.nav-open .has-dropdown.is-open .dropdown {
  display: block;
  position: static;
  box-shadow: none;
  border: none;
  border-radius: 0;
  padding: 0.25rem 0 0.25rem 1rem;
  min-width: 0;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: none;
}
.nav-open .dropdown li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-open .dropdown li:last-child a { border-bottom: 1px solid var(--border); }
.has-dropdown.is-open > a .nav-caret { transform: rotate(180deg); }

/* Consultation CTA in mobile nav */
.mobile-nav-cta { display: none; }
.nav-open .mobile-nav-cta {
  display: block;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

@media (min-width: 1024px) {
  .site-header .container { justify-content: flex-start; }
  .site-nav {
    position: static;
    transform: none;
    visibility: visible;
    transition: none;
    overflow: visible;
    padding: 0;
    background: none;
    top: auto; right: auto; bottom: auto; left: auto;
    display: flex;
    align-items: center;
    margin-left: auto;
  }
  .nav-toggle { display: none; }
  .nav-cta { display: inline-block; font-size: 0.75rem; padding: 0.45rem 0.9rem; margin-left: 0.5rem; }
  .mobile-nav-cta { display: none !important; }
  .nav-list { display: flex; align-items: center; gap: 0; }
  .nav-list > li > a {
    display: block;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
    border-radius: var(--radius);
    transition: background 0.15s;
  }
  .nav-list > li > a:hover { background: var(--surface); }
  .has-dropdown { position: relative; }
  .nav-caret { font-size: 0.7em; margin-left: 3px; vertical-align: middle; display: inline-block; transition: transform 0.2s ease; }
  .has-dropdown:hover .nav-caret { transform: rotate(180deg); }
  .dropdown {
    display: block;
    list-style: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    min-width: 270px;
    padding: 0;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .dropdown::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
  }
  .has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .dropdown li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--surface);
    transition: background 0.15s, color 0.15s;
  }
  .dropdown li:last-child a { border-bottom: none; }
  .dropdown li a i { font-size: 0.95rem; color: var(--accent); flex-shrink: 0; transition: color 0.15s; }
  .nav-icon-img { width: 0.95rem; height: 0.95rem; flex-shrink: 0; object-fit: contain; }
  .dropdown li a:hover { background: var(--surface); color: var(--primary); }
  .dropdown li a:hover i { color: var(--primary); }

  /* Overlay header — light-on-dark nav while transparent over the home hero */
  body.hero-overlay:not(.header-solid) .nav-list > li > a { color: var(--white); }
  body.hero-overlay:not(.header-solid) .nav-list > li > a:hover { background: rgba(255, 255, 255, 0.14); }
  body.hero-overlay:not(.header-solid) .nav-cta {
    background: var(--white);
    border-color: var(--white);
    color: var(--primary);
  }
}


/* ===========================
   HERO — scroll-driven image showcase
   ===========================
   Default layout is static & stacked (works with no JS, on mobile, and
   with reduced motion). JS adds .hero-showcase--fx on desktop, turning
   the section into a 350vh scroll journey with a sticky viewport: cards
   slide/scale in and captions fade as --p (scroll progress 0-1) advances. */
.hero-showcase {
  background: var(--primary-dark);
  color: var(--white);
  --p: 0;
}
.hero-showcase__sticky {
  padding: 1.5rem;
  /* darkening overlay layered over the photo so hero text/video captions
     stay legible regardless of the image's own brightness. Set on the
     sticky/pinned box (not .hero-showcase) so it only covers the visible
     screen — .hero-showcase itself is the full 350vh scroll track in fx
     mode, and a background there stretches/scrolls across that whole
     length instead of sitting still behind the pinned viewport. */
  background: linear-gradient(rgba(13, 20, 19, 0.6), rgba(13, 20, 19, 0.6)),
              url('../images/brisbane-bg.jpg') center / cover no-repeat;
}
.hero-showcase__intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  /* generous top padding clears the fixed transparent header in static mode */
  padding: 8rem 1.5rem 3.5rem;
}
.hero-showcase__intro h1 { color: var(--white); margin-bottom: 1.25rem; font-size: clamp(1rem, 5vw, 2.5rem); }
.hero-showcase__intro p { color: rgba(255,255,255,0.72); font-size: 1.05rem; margin: 0 auto 2rem; max-width: 480px; }
.hero-showcase__intro-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.hero-showcase__grid { display: grid; gap: 1.5rem; }
.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-height: 320px;
}
.hero-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* business (middle of the initial row / top card once settled) — keep the
   top of the frame in view rather than centring, which was cropping heads */
.hero-card:nth-child(1) .hero-card__img { object-position: top; }
/* sole traders footage runs washed-out at source — punch up contrast and
   saturation and darken slightly to match the other two videos */
.hero-card:nth-child(2) .hero-card__img { filter: contrast(1.15) saturate(1.25) brightness(0.95); }
.hero-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(20, 34, 33, 0.82) 0%, rgba(20, 34, 33, 0.25) 55%, transparent 100%);
}
.hero-card__chip {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--logo-blue);
  background: rgba(43, 69, 68, 0.55);
  backdrop-filter: blur(4px);
  border-radius: 999px;
}
.hero-card__overlay h2 { color: var(--white); margin-bottom: 0.5rem; }
.hero-card__overlay p { color: rgba(255,255,255,0.72); font-size: 0.95rem; max-width: 26rem; margin: 0 auto 1.25rem; }
.btn--pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: var(--white);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn--pill:hover { background: var(--logo-blue); transform: scale(1.05); }
.btn--pill-accent { background: var(--accent); color: var(--white); }
.btn--pill-accent:hover { background: var(--accent-light); }
.btn--pill-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: calc(0.7rem - 1px) calc(1.5rem - 1px);
}
.btn--pill-outline:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--white); transform: scale(1.05); }
.hero-showcase__scrollhint { display: none; }

/* Desktop scroll-fx mode (added by JS when >=900px and motion is OK).
   Cards start clustered in a small centered row beneath the hero text,
   then animate — via --t, an eased read of scroll progress --p — to their
   final full-bleed positions: business on top, sole-traders/individuals
   split the bottom row. Geometry is absolute + linearly interpolated
   (start value + (end value - start value) * --t) so all three cards
   move as one continuous motion rather than a grid reflow. */
.hero-showcase--fx { height: 350vh; }
.hero-showcase--fx .hero-showcase__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.hero-showcase--fx .hero-showcase__grid {
  display: block;
  position: relative;
  height: 100%;
  --gap: 1.5rem;
  --row-margin: 12%;
  --row-w: calc(100% - 2 * var(--row-margin));
  --col-w: calc((var(--row-w) - 2 * var(--gap)) / 3);
  --row-h: 30%;
  --row-top: 58%;
  --mid-left: calc(var(--row-margin) + var(--col-w) + var(--gap));
  --right-left: calc(var(--row-margin) + 2 * (var(--col-w) + var(--gap)));
  --half-w: calc((100% - var(--gap)) / 2);
  --half-left: calc(var(--half-w) + var(--gap));
  --top-h: calc((100% - var(--gap)) / 2);
  --bottom-top: calc(var(--top-h) + var(--gap));
  --t: clamp(0, calc((var(--p) - 0.1) / 0.8), 1);
}
.hero-showcase--fx .hero-card {
  position: absolute;
  min-height: 0;
}
/* card 1: business — starts centred in the row, ends full-width on top */
.hero-showcase--fx .hero-card:nth-child(1) {
  left: calc(var(--mid-left) + (0% - var(--mid-left)) * var(--t));
  top: calc(var(--row-top) + (0% - var(--row-top)) * var(--t));
  width: calc(var(--col-w) + (100% - var(--col-w)) * var(--t));
  height: calc(var(--row-h) + (var(--top-h) - var(--row-h)) * var(--t));
}
/* card 2: sole traders — starts left of the row, ends bottom-left */
.hero-showcase--fx .hero-card:nth-child(2) {
  left: calc(var(--row-margin) + (0% - var(--row-margin)) * var(--t));
  top: calc(var(--row-top) + (var(--bottom-top) - var(--row-top)) * var(--t));
  width: calc(var(--col-w) + (var(--half-w) - var(--col-w)) * var(--t));
  height: calc(var(--row-h) + (var(--top-h) - var(--row-h)) * var(--t));
}
/* card 3: individuals — starts right of the row, ends bottom-right */
.hero-showcase--fx .hero-card:nth-child(3) {
  left: calc(var(--right-left) + (var(--half-left) - var(--right-left)) * var(--t));
  top: calc(var(--row-top) + (var(--bottom-top) - var(--row-top)) * var(--t));
  width: calc(var(--col-w) + (var(--half-w) - var(--col-w)) * var(--t));
  height: calc(var(--row-h) + (var(--top-h) - var(--row-h)) * var(--t));
}
.hero-showcase--fx .hero-card__overlay {
  /* captions reveal once the cards are nearly settled into place */
  opacity: clamp(0, calc((var(--p) - 0.65) / 0.2), 1);
}
.hero-showcase--fx .hero-showcase__intro {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* anchored toward the top so the initial video row (which sits lower,
     see .hero-showcase__grid --row-top) reads as "under the hero text" */
  justify-content: flex-start;
  max-width: none;
  padding: 18vh 1.5rem 0;
  pointer-events: none;
  /* intro fades/lifts away over [0-0.4] */
  opacity: clamp(0, calc(1 - var(--p) / 0.4), 1);
  translate: 0 calc(clamp(0, calc(var(--p) / 0.4), 1) * -50px);
}
.hero-showcase--fx .hero-showcase__intro a { pointer-events: auto; }
/* once fully faded (p>0.4, toggled via JS), stop intercepting clicks so the
   card buttons revealed underneath become clickable */
.hero-showcase--fx.intro-inert .hero-showcase__intro a { pointer-events: none; }
.hero-showcase--fx .hero-showcase__scrollhint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: clamp(0, calc(1 - var(--p) / 0.1), 1);
}
.hero-showcase__scrollhint i { animation: hero-scroll-bob 1.5s ease-in-out infinite; }
@keyframes hero-scroll-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* Home intro strip below hero */
.intro-section { padding: 5rem 0; }
.intro__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2rem; }

/* Interior page hero */
.page-hero {
  position: relative;
  background: linear-gradient(135deg, #0d2240 0%, #1a3a6e 60%, #0d2240 100%);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: top;
  color: var(--white);
  min-height: 450px;
  padding: 6.5rem 0 4rem;
  display: flex;
  align-items: flex-end;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(10, 25, 50, 0.55);
}
.page-hero .container { width: 100%; }
.page-hero__inner { position: relative; z-index: 2; max-width: 700px; }
.page-hero h1 { color: var(--white); margin-bottom: 0.85rem; }
.page-hero p { color: rgba(255,255,255,0.75); font-size: 1.05rem; margin-bottom: 0; }
.page-hero--minimal { min-height: 0; padding: 3.75rem 0 3.25rem; }

/* Video variant — .page-hero's own background-image (poster) stays as the
   fallback layer beneath everything; the video sits between it and the
   ::before dark overlay/text (z-index 1/2 above) so legibility is unchanged. */
.page-hero--video .page-hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.page-hero--video .page-hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Compact page title bar (default template) */
.page-title {
  background: linear-gradient(135deg, #0d2240 0%, #1a3a6e 60%, #0d2240 100%);
  padding: 3rem 0 2.5rem;
}
.page-title h1 { color: var(--white); font-size: clamp(1.6rem, 3.5vw, 2.25rem); margin: 0; }

/* Default page content body */
.content-body { padding: 3.5rem 0 5rem; }

/* Dingo video grid — neutralise injected Foundation classes */
#dingo .row.container {
  max-width: none;
  padding: 0;
  margin: 0 -0.75rem;
  display: flex;
  flex-wrap: wrap;
}
#dingo .columns {
  width: 100%;
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  #dingo .medium-6 { width: 50%; }
}
#dingo .flex-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
}
#dingo .flex-video iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
#dingo h5 {
  font-family: 'Unbounded', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 0.6rem;
}

/* Dingo calculators — neutralise injected Foundation classes */
#dingo_calcs .row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem;
}
#dingo_calcs .columns {
  width: 100%;
  padding: 0 0.75rem;
  margin-bottom: 2rem;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  #dingo_calcs .medium-6 { width: 50%; }
}
#dingo_calcs h3.headline {
  font-family: 'Unbounded', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--primary);
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
  border-bottom: 2px solid var(--accent);
}
#dingo_calcs ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
#dingo_calcs ul li { font-size: 0.72rem; color: var(--text-muted); }
#dingo_calcs ul li a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'Albert Sans', sans-serif;
  transition: background 0.2s;
  line-height: 1;
}
#dingo_calcs ul li a::after { content: '→'; }
#dingo_calcs ul li a:hover { background: var(--primary); }
#dingo_calcs .article > p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 760px;
}

/* ===========================
   LIFE EVENTS
   =========================== */
.life-events { padding: 5rem 0; }
.life-events-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.life-event-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: box-shadow 0.2s, transform 0.2s;
  color: inherit;
  text-decoration: none;
}
.life-event-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.life-event-card__header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.life-event-card__icon { margin-bottom: 0; }
.life-event-card h3 { font-size: 1.1rem; margin-bottom: 0; }
.life-event-card p { font-size: 0.93rem; color: var(--text-muted); margin-bottom: 1.1rem; line-height: 1.65; }
.life-event-card__link { font-size: 0.85rem; font-weight: 600; color: var(--accent); letter-spacing: 0.01em; margin-top: auto; }

@media (min-width: 600px) { .life-events-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .life-events-grid { grid-template-columns: repeat(3, 1fr); } }

/* ===========================
   SERVICES GRID
   =========================== */
.services-section { padding: 5rem 0; }
.life-events-index { padding: 5rem 0; }
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.service-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: box-shadow 0.2s, transform 0.2s;
  color: inherit;
  text-decoration: none;
}
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.service-card__header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.service-card__icon { margin-bottom: 0; }
.service-card h3 { font-size: 1.1rem; margin-bottom: 0; }
.service-card p { font-size: 0.93rem; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.65; }
.service-card__link { font-size: 0.85rem; font-weight: 600; color: var(--accent); letter-spacing: 0.01em; margin-top: auto; }

@media (min-width: 600px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

/* ===========================
   PRINCIPAL TEASER (meet-the-principal section)
   =========================== */
.principal-teaser { padding: 5rem 0; }
.principal-teaser__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
.principal-teaser__image {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  max-height: 480px;
}
.principal-teaser__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.principal-teaser__content h2 { margin-bottom: 1.25rem; }
.principal-teaser__content p { color: var(--text-muted); margin-bottom: 1rem; }
.credentials { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.25rem 0 1.75rem; }
.credential-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.03em;
}

@media (min-width: 768px) {
  .principal-teaser__inner { grid-template-columns: 0.75fr 1.4fr; }
}

/* ===========================
   NEWS
   =========================== */
.news-latest { padding: 5rem 0; background: var(--white); }
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
@media (min-width: 600px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }

.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.news-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary) 0%, #1a3a6e 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}
.news-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}
.news-card__excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}
.news-card__link { font-size: 0.85rem; font-weight: 600; color: var(--accent); letter-spacing: 0.01em; margin-top: auto; }
.news-sidebar__period {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.news-sidebar__older {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.news-sidebar__older-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.news-sidebar__older ul { list-style: none; padding: 0; margin: 0; }
.news-sidebar__older ul li a {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.15s;
}
.news-sidebar__older ul li a:hover { color: var(--primary); }
.news-article__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary) 0%, #1a3a6e 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius);
  margin-bottom: 1.75rem;
  flex-shrink: 0;
}
.article-share {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 0;
  margin-bottom: 1.25rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.article-share__label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-right: 0.35rem;
}
.article-share__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1rem;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.article-share__btn:hover { background: var(--primary); color: #fff; }
.news-article__intro,
.articledescription {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-weight: 700;
}
.news-latest__footer {
  text-align: center;
  margin-top: 2.5rem;
}

/* ===========================
   CTA BAND
   =========================== */
.cta-band { background: var(--primary); color: var(--white); padding: 5.5rem 0; text-align: center; }
.cta-band h2 { color: var(--white); margin-bottom: 1rem; }
.cta-band p { color: rgba(255,255,255,0.75); max-width: 520px; margin: 0 auto 2.25rem; font-size: 1.05rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ===========================
   TRUST SIGNALS
   =========================== */
.trust-signals { padding: 2.5rem 0; background: var(--surface); border-top: 1px solid var(--border); }
.trust-signals__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  justify-content: center;
  align-items: center;
}
.trust-item { text-align: center; }
.trust-item__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.trust-item__value { font-size: 0.88rem; font-weight: 600; color: var(--primary); }

/* ===========================
   ABOUT PAGE
   =========================== */
.bio-section { padding: 5rem 0; }
.bio-section__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}
.bio-section__image {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  max-height: 500px;
}
.bio-section__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.bio-section__content h2 { margin-bottom: 1.25rem; }
.bio-section__content p { color: var(--text-muted); margin-bottom: 1rem; }

.charter-block {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}
.charter-block p { color: var(--text-muted); font-size: 0.93rem; }

.values-section { padding: 5rem 0; }
.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2.5rem;
}
.value-item { display: flex; flex-direction: column; }
.value-item__heading { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.value-item h3 { font-size: 1.1rem; margin: 0; }
.value-item p { font-size: 0.93rem; color: var(--text-muted); }

@media (min-width: 768px) { .bio-section__inner { grid-template-columns: 1fr 2fr; } }
@media (min-width: 640px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .values-grid { grid-template-columns: repeat(3, 1fr); } }

/* ===========================
   CONTACT PAGE
   =========================== */
.contact-section { padding: 5rem 0; }
.contact-section__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
}
.contact-info h3 { margin-bottom: 1.25rem; }
.contact-info address {
  font-style: normal;
  color: var(--text-muted);
  line-height: 2;
  margin-bottom: 1.5rem;
}
.contact-info address strong { color: var(--primary); font-weight: 600; font-style: normal; display: block; margin-bottom: 0.25rem; }
.contact-detail { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }
.contact-detail a { color: var(--primary); font-weight: 500; font-size: 0.95rem; transition: color 0.15s; }
.contact-detail a:hover { color: var(--accent); }
.contact-map {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 3rem 0;
}
.contact-map iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; display: block; }

.contact-form h3 { margin-bottom: 1.5rem; }
#error_message_box { padding: 0.9rem 1.1rem; background: #fef4f4; color: #8b1a1a; border: 1px solid #f5c6c6; border-left: 3px solid #c0392b; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: 0.875rem; line-height: 1.8; }
#message_box { padding: 0.9rem 1.1rem; background: #f0faf4; color: #1a5e38; border: 1px solid #b8e6cc; border-left: 3px solid #27ae60; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: 0.875rem; line-height: 1.8; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Albert Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(28, 53, 87, 0.08); }
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.form-row { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.form-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 1rem; }
.visually-trap { position: absolute; left: -9999px; top: -9999px; }

@media (min-width: 768px) {
  .contact-section__inner { grid-template-columns: 1fr 1.4fr; }
  .form-row { grid-template-columns: 1fr 1fr; }
}

/* ===========================
   SERVICE DETAIL PAGES
   =========================== */
.service-detail { padding: 5rem 0; }
.service-detail__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}
.service-detail__content h1 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); margin: 1.25rem 0 1rem; }
.service-detail__content h2 { font-size: clamp(1.15rem, 2vw, 1.45rem); margin: 2rem 0 0.75rem; }
.service-detail__content h3 { font-size: 1.1rem; margin: 1.75rem 0 0.65rem; }
.service-detail__content p { color: var(--text-muted); margin-bottom: 1rem; }
.service-detail__content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1.75rem;
}
.service-detail__content ul li {
  padding: 0.55rem 0 0.55rem 1.5rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}
.service-detail__content ul li:first-child { border-top: 1px solid var(--border); }
.service-detail__content ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.article-body ul {
  list-style: disc;
  padding-left: 1.4rem;
  margin-bottom: 1.25rem;
}
.article-body ul li {
  list-style: disc;
  padding: 0.2rem 0 0.2rem 0.25rem;
  border: none;
  font-size: inherit;
}
.article-body ul li:first-child { border-top: none; }
.article-body ul li::before { content: none; }
.article-body iframe {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
  margin: 1.5rem 0;
  border: 0;
  border-radius: var(--radius);
}

.service-sidebar {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  align-self: start;
}
.service-sidebar h4 { margin-bottom: 1rem; font-size: 0.9rem; font-family: 'Albert Sans', sans-serif; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.service-sidebar ul { list-style: none; padding: 0; }
.service-sidebar ul li { border-bottom: 1px solid var(--border); }
.service-sidebar ul li:last-child { border-bottom: none; }
.service-sidebar ul + h4 {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.service-sidebar ul li a {
  display: block;
  padding: 0.7rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.15s;
}
.service-sidebar ul li a:hover { color: var(--primary); }
.service-sidebar ul li a.active { color: var(--primary); font-weight: 700; padding-left: 1.5rem; position: relative; }
.service-sidebar ul li a.active::before { content: '→'; position: absolute; left: 0; color: var(--accent); }
.sidebar-cta {
  margin-top: 2rem;
  background: var(--primary);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.sidebar-cta p { color: rgba(255,255,255,0.75); font-size: 0.88rem; margin-bottom: 1rem; }

@media (min-width: 1024px) {
  .service-detail__inner { grid-template-columns: 2fr 1fr; }
  .service-sidebar { position: sticky; top: 88px; }
}

/* ===========================
   FOOTER
   =========================== */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,0.65); padding: 4.5rem 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 3.5rem;
}
.footer-brand .logo-main { color: var(--white); }
.footer-brand p { font-size: 0.875rem; color: rgba(255,255,255,0.45); margin-top: 0.6rem; }
.footer-nav h4,
.footer-contact h4 {
  color: var(--white);
  font-size: 0.8rem;
  font-family: 'Albert Sans', sans-serif;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-nav ul li { margin-bottom: 0.5rem; }
.footer-nav ul li a { font-size: 0.875rem; color: rgba(255,255,255,0.5); transition: color 0.15s; }
.footer-nav ul li a:hover { color: var(--white); }
.footer-logo { max-width: 160px; margin-bottom: 1rem; display: block; }
.footer-contact address { font-style: normal; font-size: 0.875rem; line-height: 1.9; margin-bottom: 0.75rem; }
.footer-contact p { font-size: 0.875rem; margin-bottom: 0.35rem; }
.footer-contact a:not(.btn) { color: rgba(255,255,255,0.5); transition: color 0.15s; }
.footer-contact a:not(.btn):hover { color: var(--white); }
/* Footer legal band — white section below dark footer */
.footer-legal {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 0;
}
.footer-legal__logo { padding-bottom: 1.5rem; }
.footer-legal__logo .site-logo__img { max-width: 160px; }
.footer-legal__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  padding-bottom: 1.25rem;
}
@media (min-width: 768px) {
  .footer-legal__grid { grid-template-columns: 1fr 2fr; gap: 3rem; }
}
.footer-legal__brand p {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
}
.footer-legal__content p {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; list-style: none; padding: 0; margin: 0; }
.footer-links a { font-size: 0.77rem; color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--primary); }
.footer-legal__links { padding: 1rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.footer-legal__copy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}
.footer-copy {
  font-size: 0.77rem;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
  min-width: 0;
}
.footer-legal__copy .site-by {
  font-size: 0.77rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}
.footer-legal__copy .site-by:hover { color: var(--primary); }

/* ===========================
   MODAL
   =========================== */
.modal-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0,16,40,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.is-open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  opacity: 0;
}
.modal-overlay.is-open .modal { transform: translateY(0) scale(1); opacity: 1; }
.modal h2 { font-size: 1.4rem; margin-bottom: 1.25rem; color: var(--primary); }
.modal__body p { font-size: 0.93rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.modal__body p:last-child { margin-bottom: 0; }
.modal__close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
}
.modal__close:hover { color: var(--primary); }

/* ===========================
   CONTENT PAGES (legal, charter etc)
   =========================== */
.content-page { padding: 4rem 0 5rem; }
.content-page__body { max-width: 760px; }
.content-page__body p { margin-bottom: 1.25rem; color: var(--text); line-height: 1.8; }

@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.5fr repeat(3, 1fr); } }

/* ===========================
   PHOSPHOR ICONS
   =========================== */
.service-card__icon i,
.life-event-card__icon i,
.value-item__icon i {
  color: var(--accent);
  display: block;
}
.service-card__icon { font-size: 2rem; }
.life-event-card__icon { font-size: 2rem; }
.value-item__icon { font-size: 1.75rem; }

/* ===========================
   RESOURCE CARDS
   =========================== */
.resource-cards-section { padding: 5rem 0; }
.resource-cards { display: flex; flex-direction: column; gap: 1.5rem; }
.resource-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
@media (min-width: 640px) {
  .resource-card { flex-direction: row; align-items: flex-start; gap: 2rem; }
}
.resource-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.resource-card__icon {
  flex-shrink: 0;
  width: 5rem;
  height: 5rem;
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent);
}
.resource-card__icon img { width: 2.25rem; height: 2.25rem; }
.resource-card__body { flex: 1; }
.resource-card__body h3 { margin-bottom: 0.5rem; }
.resource-card__body p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }
.resource-card__link { font-size: 0.85rem; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 0.3rem; }

/* ===========================
   BACK TO TOP
   =========================== */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, background 0.2s;
  box-shadow: var(--shadow-lg);
}
#back-to-top.is-visible { opacity: 1; visibility: visible; }
#back-to-top:hover { background: var(--accent-light); }

/* ===========================
   UTILITIES
   =========================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 2rem; }

/* ===========================
   DINGO VIDEO
   Neutralise injected Foundation classes and make iframes responsive
   =========================== */
#dingo .row.container {
  max-width: none;
  padding: 0;
  margin: 0 -0.75rem;
  display: flex;
  flex-wrap: wrap;
}
#dingo .columns {
  width: 100%;
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  #dingo .medium-6 { width: 50%; }
}
#dingo .flex-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
}
#dingo .flex-video iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
#dingo h5 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 0.6rem;
}

/* ===========================
   DINGO TAX DIARY
   =========================== */
#dingocontent_tax h1 {
  font-size: clamp(1.15rem, 2vw, 1.45rem) !important;
  font-weight: 600;
  color: var(--primary);
  border-bottom: 2px solid var(--accent) !important;
  padding: 2.5rem 0 0.6rem !important;
  margin: 0 0 0.5rem !important;
  letter-spacing: -0.01em;
}
#dingocontent_tax h1:first-child { padding-top: 0 !important; }
#dingocontent_tax h2 {
  font-size: clamp(1rem, 1.8vw, 1.25rem) !important;
  font-weight: 400;
  color: var(--primary);
  margin: 1.75rem 0 0.6rem !important;
}
#dingocontent_tax p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0.85em;
}
#dingocontent_tax blockquote {
  border-left: 3px solid var(--border);
  margin: 0.75rem 0;
  padding-left: 1.25rem;
}
#dingocontent_tax blockquote p { font-size: 0.9rem; }
#dingocontent_tax hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}
#dingocontent_tax li { margin-bottom: 0.5em !important; }
/* Some month headers are hardcoded as <p><strong style="..."> — override inline styles */
#dingocontent_tax p:has(> strong[style]) {
  border-bottom: 2px solid var(--accent);
  padding: 2.5rem 0 0.6rem;
  margin-bottom: 0.5rem !important;
}
#dingocontent_tax p:has(> strong[style]):first-child { padding-top: 0; }
#dingocontent_tax p > strong[style] {
  font-size: clamp(1.15rem, 2vw, 1.45rem) !important;
  font-weight: 600 !important;
  color: var(--primary) !important;
}

/* ===========================
   DINGO CALCULATORS
   Neutralise injected Foundation classes and apply site styling
   =========================== */
#dingo_calcs .row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem;
}
#dingo_calcs .columns {
  width: 100%;
  padding: 0 0.75rem;
  margin-bottom: 2.5rem;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  #dingo_calcs .medium-6 { width: 50%; }
}
#dingo_calcs h3.headline {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  padding-bottom: 0.6rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
}
#dingo_calcs ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.35rem;
}
#dingo_calcs ul li { font-size: 0.68rem; color: var(--text-muted); }
#dingo_calcs ul li a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.82rem !important;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  line-height: 1;
}
#dingo_calcs ul li a::after { content: ' →'; font-size: 0.75em; opacity: 0.6; }
#dingo_calcs ul li a:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }
#dingo_calcs .article > p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 760px;
}
.mt-lg { margin-top: 3rem; }
