/* ==========================================================================
   CSPPE — Global chrome: utility bar, header, nav, footer
   Spec: design_handoff_csppe_website/README.md "Global chrome"
   ========================================================================== */

.csppe-shell { width: 100%; }
.csppe-container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ---------- Utility bar ---------- */
.csppe-utility-bar__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.csppe-utility-bar__left { display: flex; align-items: center; gap: 28px; min-width: 0; }
.csppe-util-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.csppe-util-item:hover { color: #fff; text-decoration: underline; }
.csppe-utility-bar__right { display: flex; align-items: center; gap: 10px; }
.csppe-social {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .18);
  color: #fff;
  transition: background .15s ease;
}
.csppe-social:hover { background: rgba(255, 255, 255, .32); color: #fff; }

/* Buttons must keep their own colour inside prose blocks, where a generic
   `a { color: accent }` rule would otherwise win on specificity. */
.csppe-article a.csppe-btn--primary,
.csppe-prose a.csppe-btn--primary,
.csppe-article-endbox a.csppe-btn--primary,
a.csppe-btn--primary { color: var(--text-on-primary); }
.csppe-article a.csppe-btn--secondary,
.csppe-prose a.csppe-btn--secondary,
a.csppe-btn--secondary { color: var(--text-primary); }
.csppe-article a.csppe-btn,
.csppe-prose a.csppe-btn { text-decoration: none; }

/* ---------- Sticky header ----------
   Elementor wraps the Theme Builder header in container > widget > shortcode
   divs that are only as tall as the header itself, so a sticky child has no
   room to travel. Collapsing those wrappers with display:contents makes body
   the containing block, which is what sticky needs. */
body > header.elementor,
body > header.elementor > .e-con,
body > header.elementor .e-con-inner,
body > header.elementor .elementor-widget-shortcode,
body > header.elementor .elementor-shortcode {
  display: contents;
}

/* ---------- Header / main nav ---------- */
.csppe-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow .15s ease;
}
.csppe-header.is-scrolled { box-shadow: var(--shadow-hover); }
.csppe-header__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  height: 76px;
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Brand */
.csppe-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.csppe-brand__logo { display: block; width: 52px; height: 52px; object-fit: contain; }
.csppe-brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.csppe-brand__name {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: var(--ls-tight);
}
.csppe-brand__tagline { font-size: 10px; color: var(--text-secondary); }

/* Nav — centred between the brand and the header actions */
.csppe-header__nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.csppe-nav__list {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.csppe-nav__list a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-primary);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  display: block;
}
.csppe-nav__list a:hover { color: var(--color-primary); }
.csppe-nav__list .current-menu-item > a,
.csppe-nav__list .current_page_item > a,
.csppe-nav__list .current-menu-ancestor > a {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Language pill group */
.csppe-lang {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  overflow: hidden;
  flex-shrink: 0;
}
.csppe-lang__item {
  font-size: 12px;
  font-weight: var(--fw-semibold);
  padding: 7px 11px;
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1;
  transition: background .15s ease, color .15s ease;
}
.csppe-lang__item:hover { background: var(--color-surface); color: var(--text-primary); }
/* Active language: solid primary violet + white, per client decision 26/07/2026.
   Note: white on #8C52FF is 4.41:1 at this 12px size (below AA 4.5:1).
   Logged in the pre-launch checklist. */
.csppe-lang__item.is-active {
  background: var(--color-primary);
  color: #fff;
}
.csppe-lang__item.is-active:hover {
  background: var(--color-primary);
  color: #fff;
}

/* Header actions */
.csppe-header__actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

/* Hamburger */
.csppe-burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  cursor: pointer;
  color: var(--text-primary);
  margin-left: auto;
}
.csppe-burger__bars, .csppe-burger__bars::before, .csppe-burger__bars::after {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .15s ease, opacity .15s ease;
}
.csppe-burger__bars { position: relative; }
.csppe-burger__bars::before, .csppe-burger__bars::after { content: ""; position: absolute; left: 0; }
.csppe-burger__bars::before { top: -6px; }
.csppe-burger__bars::after  { top: 6px; }
.csppe-burger[aria-expanded="true"] .csppe-burger__bars { background: transparent; }
.csppe-burger[aria-expanded="true"] .csppe-burger__bars::before { transform: translateY(6px) rotate(45deg); }
.csppe-burger[aria-expanded="true"] .csppe-burger__bars::after  { transform: translateY(-6px) rotate(-45deg); }

/* Mobile panel */
.csppe-mobile-panel {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-float);
  padding: 16px var(--container-pad) 24px;
}
.csppe-mobile-panel.is-open { display: block; }
.csppe-mobile-panel .csppe-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
.csppe-mobile-panel .csppe-nav__list li { border-bottom: 1px solid var(--color-border); }
.csppe-mobile-panel .csppe-nav__list a { padding: 14px 0; border-bottom: none; }
.csppe-mobile-panel__foot { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.csppe-mobile-panel__foot .csppe-btn { flex: 1; }

/* Breakpoints — README: <1300 tighter, <1100 hamburger */
@media (max-width: 1300px) {
  .csppe-header__inner { gap: 18px; }
  .csppe-nav__list { gap: 18px; }
  .csppe-nav__list a { font-size: 12px; }
}
@media (max-width: 1100px) {
  .csppe-header__nav, .csppe-header__actions { display: none; }
  .csppe-burger { display: inline-flex; }
  .csppe-header__inner { height: 68px; }
  .csppe-brand__logo { width: 44px; height: 44px; }
}

/* ---------- Footer ---------- */
.csppe-footer { background: var(--color-bg); border-top: 1px solid var(--color-border); }
.csppe-footer__cols {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 64px var(--container-pad) 40px;
  display: grid;
  grid-template-columns: 1.2fr 1.3fr 1.2fr;
  gap: 56px;
}
.csppe-footer__heading {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 22px;
  margin: 0 0 14px;
}
.csppe-footer__heading::after {
  content: "";
  display: block;
  width: 44px; height: 3px;
  background: var(--color-accent);
  margin-top: 10px;
  border-radius: 2px;
}
.csppe-footer__blurb { font-size: 14px; color: var(--text-secondary); margin: 14px 0 18px; }

/* Footer contact rows */
.csppe-foot-row { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 14px; }
.csppe-foot-row > svg { color: var(--color-accent); flex-shrink: 0; margin-top: 3px; }
.csppe-foot-row a { text-decoration: none; }
.csppe-foot-row a:hover { text-decoration: underline; }
.csppe-foot-val { font-size: 14px; color: var(--text-primary); }
/* Recent-article titles are links; the address uses a span, so this only
   bolds the post titles. */
a.csppe-foot-val { font-weight: var(--fw-semibold); }
.csppe-foot-strong {
  display: block;
  font-weight: var(--fw-semibold);
  color: var(--color-accent);
  font-size: 14px;
}
.csppe-foot-note { display: block; font-size: 13px; color: var(--text-secondary); }
.csppe-foot-hours { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.csppe-foot-hours > span { display: flex; gap: 8px; justify-content: space-between; max-width: 260px; }
.csppe-foot-days { color: var(--text-secondary); }
.csppe-map-pill {
  display: inline-block;
  margin-top: 6px;
  background: var(--color-accent);
  color: #fff;
  font-size: 12px;
  font-weight: var(--fw-semibold);
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  text-decoration: none;
}
.csppe-map-pill:hover { background: #2749a8; color: #fff; }

/* Footer social circles */
.csppe-footer__social { display: flex; gap: 10px; margin-top: 16px; }
.csppe-footer__social a {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-accent);
}
.csppe-footer__social a:hover { background: var(--color-primary-tint); }

/* Violet bottom strip */
.csppe-foot-bottom { background: var(--color-primary); color: #fff; }
.csppe-foot-bottom__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 14px var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
}
.csppe-foot-bottom__left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: rgba(255,255,255,.85); }
.csppe-foot-bottom a { color: rgba(255,255,255,.85); text-decoration: none; }
.csppe-foot-bottom a:hover { color: #fff; text-decoration: underline; }
.csppe-foot-bottom__right { color: rgba(255,255,255,.85); }

@media (max-width: 900px) {
  .csppe-footer__cols { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; }
  .csppe-foot-bottom__inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Mobile call FAB ---------- */
.csppe-call-fab {
  display: none;
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 40;
  align-items: center;
  gap: 8px;
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: var(--fw-semibold);
  padding: 13px 20px;
  min-height: 48px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-float);
  text-decoration: none;
}
.csppe-call-fab:hover { background: #7C3AED; color: #fff; }
@media (max-width: 1100px) { .csppe-call-fab { display: inline-flex; } }

/* Skip link */
.csppe-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-input) 0;
}
.csppe-skip:focus { left: 0; color: #fff; }
