/* =====================================================================
   SSS Recompression Chamber Network — faithful 2010 reproduction
   ---------------------------------------------------------------------
   Implements the SSS Design Manual v1.0 (visual DNA of the original
   sssnetwork.com) as an EXACT layout on modern Bootstrap 5.3 / HTML5:
   cornflower pinstripe frame · centered periwinkle column · marine photo
   banner · right-aligned vermilion nav rail beside a justified body column
   · denim headers with orange triangles · wave dividers · cornflower footer.

   Role discipline (kept strict, per the manual):
     • VERMILION   #FF2905  = action & alert ONLY (links, nav, 24h number)
     • SANDY ORANGE #F19C56 = ornament ONLY (triangle markers, bullets, breadcrumb)
   ===================================================================== */

:root {
  /* 2026-06 WCAG 2.1 AA pass: denim/slate/vermilion deepened to >=4.6:1 on the
     periwinkle field (#C8D4F6) — same hues, medical-grade contrast. */
  --c-border-1:#4E7CD8; --c-border-2:#628ADD; --c-border-3:#8DA8E9; --c-border-4:#A2B6EF;
  --c-field:#C8D4F6; --c-panel:#B8CBF0; --c-panel-deep:#AEC3ED; --c-wave:#8BA4E4;
  --c-denim:#405796; --c-slate:#545969; --c-ink:#2B2F3A;
  --c-vermilion:#B21A00; --c-vermilion-dk:#8F1500; --c-orange:#F19C56; --c-white:#FFFFFF;
  --c-footer-link:#751100;             /* AA on the wave footer (#8BA4E4) */
  --font-brand: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --maxw: 1180px;
  --bs-link-color-rgb: 178,26,0;
  --bs-link-hover-color-rgb: 143,21,0;
}

/* ---- The frame: cornflower pinstripe behind a centered periwinkle column */
html {
  /* Fluid type: ~14px on phones → 16px from ~875px up.
     Everything rem-based (Bootstrap spacing, headings, nav) scales with it. */
  font-size: clamp(14px, 12.5px + 0.4vw, 16px);
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
  /*background: repeating-linear-gradient(0deg,
    var(--c-border-1) 0 1px, var(--c-border-2) 1px 2px,
    var(--c-border-3) 2px 3px, var(--c-border-4) 3px 4px);*/
    background: #536EB6; 
}
body {
  max-width: var(--maxw);
  margin: 0 auto;
  background: var(--c-field);
  color: var(--c-slate);
  font-family: var(--font-brand);
  box-shadow: 0 0 0 1px rgba(43,47,58,.06), 0 18px 60px -28px rgba(43,47,58,.5);
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-brand); }

/* ---- Links: vermilion = the brand's action colour -------------------- */
a { color: var(--c-vermilion); }
a:hover { color: var(--c-vermilion-dk); }

/* Brand helpers (class names reused across pages) */
.text-sss { color: var(--c-denim) !important; }
.text-sss-orange { color: var(--c-orange) !important; }
.bg-sss { background-color: var(--c-denim) !important; }
.bg-sss-pale { background-color: var(--c-field) !important; }
.card-header.bg-sss { color: #fff; }

/* ============================ BANNER ============================ */
/* Text wordmark over a placeholder background + a logo placeholder.
   To drop in a real banner photo later, replace the gradient with:
     background: url("/images/site/<your-banner>.jpg") center / cover no-repeat; */
.banner {
  /* gradient deepened so white title/slogan pass 4.6:1 at every point */
  background: linear-gradient(135deg, #3D5FB3 0%, #4371CF 55%, #4170D6 100%);
  color: #fff;
  border-bottom: 3px solid var(--c-denim);
}
.banner-inner { display: flex; align-items: center; gap: 1.25rem; padding: 1.4rem 1.25rem; }
.banner-home { flex: 0 0 auto; line-height: 0; text-decoration: none; }
.banner-logo {                                  /* white chip holding the logo */
  display: inline-flex; align-items: center; justify-content: center;
  height: 92px; max-width: 100%; padding: 8px 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(20,30,70,.25);
}
.banner-logo img { height: 100%; width: auto; max-width: 100%; object-fit: contain; display: block; }
@media (max-width: 575.98px){ .banner-logo { height: 64px; padding: 6px 10px; } }
.banner-title {
  margin: 0; font-weight: 700; line-height: 1.05; color: #fff;
  font-size: clamp(1.5rem, 1rem + 2.6vw, 2.5rem);
  text-shadow: 0 2px 8px rgba(20,30,70,.35);
}
.banner-slogan {
  margin: .35rem 0 0; font-weight: 700; color: #eef3fd;
  font-size: clamp(.95rem, .7rem + 1.1vw, 1.3rem);
}
@media (max-width: 575.98px){
  .banner-inner { flex-direction: column; align-items: flex-start; gap: .8rem; }
}

/* ============================ NAV RAIL ============================ */
.nav-rail { padding: 1.4rem 0 1rem; }
@media (min-width: 992px){ .nav-rail { border-right: 1px solid rgba(83,110,182,.30); } }
.rail-nav { display: flex; flex-direction: column; }
.rail-nav a {
  text-align: right;
  color: var(--c-vermilion);
  font-weight: 700;
  text-decoration: none;
  padding: .34rem .9rem .34rem 0;
  font-size: .95rem;
  line-height: 1.25;
}
.rail-nav a:hover, .rail-nav a:focus { color: var(--c-vermilion-dk); text-decoration: underline; }
.rail-nav a.active { color: var(--c-vermilion-dk); text-decoration: underline; }
.rail-nav .gt { color: var(--c-vermilion); margin-left: .35rem; }
.rail-nav .dropdown-toggle::after { display: none; }     /* use our own chevron */
.rail-nav .dropdown { text-align: right; }
/* "Our Chamber Locations" — authentic mm_menu blue (sampled from the original site) */
.rail-nav .dropdown-menu {
  min-width: 234px;                     /* wider, like the original (~223px) */
  padding: 2px;
  background-color: #A3BAE9;            /* light cornflower-blue items */
  border: 2px solid #4C66A0;            /* deep-blue border */
  border-radius: 3px;
  text-align: left;
}
.rail-nav .dropdown-item {
  color: #324682;                       /* denim text (AA: 4.6:1 on #A3BAE9) */
  font-weight: 700;
  padding: .3rem .7rem;
  border-radius: 2px;
}
.rail-nav .dropdown-item:hover,
.rail-nav .dropdown-item:focus,
.rail-nav .dropdown-item:active,
.rail-nav .dropdown-item.active {
  background-color: #4C66A0;            /* deep blue on hover (white text 5.6:1) */
  color: #FFFFFF;                       /* white text on hover */
}
.rail-nav .dropdown-header {
  color: #FFFFFF;
  background-color: #4C66A0;            /* deep-blue section band */
  text-transform: uppercase;
  font-size: .7rem; letter-spacing: .04em;
  margin: 3px 0 2px; border-radius: 2px;
}
.rail-nav .dropdown-divider { border-top: 1px solid #4C66A0; opacity: .45; margin: 2px 0; }

/* Grouped rail: section labels, divider between internal/external links */
.rail-group {
  text-align: right;
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--c-slate);
  padding: .4rem .9rem .1rem 0;
}
.rail-divider {
  border: 0; border-top: 1px solid rgba(83,110,182,.30);
  margin: .55rem 0 .15rem; opacity: 1; width: 100%;
}

/* Phone menu toggle (hidden ≥ lg via d-lg-none) */
.rail-toggle {
  display: block; width: 100%;
  border: 0; border-radius: .3rem;
  background-color: var(--c-denim); color: #fff;
  font-weight: 700; font-size: .95rem;
  padding: .55rem .9rem; text-align: left;
}
.rail-toggle .gt { color: #fff; margin-left: .35rem; }
.rail-toggle:focus-visible { outline: 2px solid var(--c-vermilion); outline-offset: 2px; }

/* ============================ CONTENT COLUMN ============================ */
.content-col { padding-top: 1.2rem; }
.content-col .container { max-width: none; padding-left: 0; padding-right: 0; }

/* Section headings: denim, led by the orange triangle marker */
.section-heading {
  display: flex; align-items: center; gap: .65rem;
  color: var(--c-denim); font-weight: 700;
  margin: 2.2rem 0 1rem; scroll-margin-top: 1rem;
}
.section-heading::before {
  content: ""; flex: 0 0 auto;
  width: 0; height: 0; border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--c-orange);
}
h3.text-sss { font-weight: 700; }

/* In-page anchor sub-nav (denim outline buttons) */
.btn-sss-outline {
  --bs-btn-color: var(--c-denim); --bs-btn-border-color: var(--c-denim);
  --bs-btn-hover-bg: var(--c-denim); --bs-btn-hover-border-color: var(--c-denim);
  --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--c-ink);
  --bs-btn-active-border-color: var(--c-ink); font-weight: 700;
}

/* Triangle bullets for plain content lists (ornament) */
main ul:not([class]) { list-style: none; padding-left: 0; }
main ul:not([class]) > li { position: relative; padding: .25rem 0 .25rem 1.6rem; }
main ul:not([class]) > li::before {
  content: ""; position: absolute; left: 0; top: .62rem;
  width: 0; height: 0; border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent var(--c-orange);
}

/* Breadcrumb: orange triangle marker, vermilion links */
.breadcrumb { font-weight: 700; }
.breadcrumb-item a { color: var(--c-vermilion); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: var(--c-slate); }
.breadcrumb-item + .breadcrumb-item::before { content: "▸"; color: var(--c-orange); font-weight: 700; }

/* 24-hour emergency callout: vermilion = alert */
.emergency-alert {
  background: var(--c-field); color: var(--c-ink);
  border: 0; border-left: 5px solid var(--c-vermilion);
}
.emergency-alert a { color: var(--c-vermilion); font-weight: 700; text-decoration: none; }
.emergency-alert a:hover { text-decoration: underline; }

/* Cards: white, soft edge; staff/shop media tidy */
.card { border-color: rgba(43,47,58,.10); }
.staff-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.staff-card, .staff-card:hover { color: var(--c-ink); }
.shop-card img { width: 100%; aspect-ratio: 1/1; object-fit: contain; padding: .35rem; }
.shop-card, .shop-card:hover { color: var(--c-ink); }
.shop-card .card-body { padding: .6rem; }

/* ============================ WAVE + FOOTER ============================ */
.wave-divider { display: block; width: 100%; height: 44px; margin-top: 2.2rem; margin-bottom: -2px; }
.wave-divider path { fill: var(--c-wave); }
.site-footer { background: var(--c-wave); color: #28386b; }
.site-footer a {
  color: var(--c-footer-link); font-weight: 700; text-decoration: none;
  text-transform: uppercase; letter-spacing: .03em; font-size: .8rem;
  display: inline-block; padding: .2rem .1rem;   /* >=24px touch target */
}
.site-footer a:hover { color: #4D0B00; text-decoration: underline; }
.site-footer .sep { color: #28386b; }
.site-footer p { font-family: ui-monospace, "SFMono-Regular", "Courier New", monospace; }

/* ---- Narrow screens: column stacks, frame relaxes -------------------- */
@media (max-width: 991.98px){
  body { box-shadow: none; }
  .nav-rail { padding: 1rem 0 .5rem; margin-bottom: .5rem; border-bottom: 1px solid rgba(83,110,182,.30); }
  .rail-nav a { text-align: left; padding-right: 0; }
  .rail-nav .dropdown { text-align: left; }
  .rail-group { text-align: left; padding-right: 0; }
  /* the locations flyout becomes an inline accordion on phones
     (!important beats Popper's inline positioning) */
  .rail-nav .dropdown-menu { position: static !important; transform: none !important; width: 100%; margin: .3rem 0; }
}

/* ============================ ACCESSIBILITY ============================ */
/* WCAG 2.1 AA pass (2026-06): skip link, visible focus, reduced motion */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1080;
  background: var(--c-denim); color: #fff; font-weight: 700;
  padding: .6rem 1.1rem; border-radius: 0 0 .4rem 0; text-decoration: none;
}
.skip-link:focus, .skip-link:focus-visible {
  left: 0; color: #fff; outline: 3px solid var(--c-orange); outline-offset: 0;
}
a:focus-visible, button:focus-visible, [role="button"]:focus-visible {
  outline: 3px solid var(--c-vermilion-dk); outline-offset: 2px; border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
