/* ============================================
   ERC Website - Evergreen Resiliency Center
   Custom CSS - No frameworks
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --color-dark-green: #2D4A3E;
  --color-mid-green: #4A7C6A;
  --color-link: #3D6858;
  --color-slate-blue: #587A8D;
  --color-dark-navy: #1C3040;
  --color-cream: #F5F0E8;
  --color-danger: #C0392B;
  --color-white: #FFFFFF;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', Arial, sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height, 120px) + 1rem);
}

body {
  font-family: var(--font-body);
  font-size: 100%;
  line-height: 1.6;
  color: var(--color-dark-navy);
  background: var(--color-cream);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- Focus States ----------
   Three bands, reading outward from the control: 2px navy, 3px white, 3px
   navy. The outline paints over the box-shadow, so the 2px offset lets the
   shadow show through against the control itself. That inner navy band is
   what a light control on a navy band needs: at offset 0 the white ring sat
   flush against a cream or white button and disappeared into it. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
iframe:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-white);
  outline-offset: 2px;
  box-shadow: 0 0 0 8px var(--color-dark-navy);
}

/* ---------- Skip Link ----------
   Off screen until focused, then pinned to the top left above the header. */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;
  padding: 0.75rem 1.25rem;
  background: var(--color-dark-navy);
  color: var(--color-cream);
  font-weight: 600;
  transform: translateY(-120%);
  transition: transform 0.15s;
}

.skip-link:focus-visible {
  transform: none;
}

/* main takes focus only from the skip link, so it should not show a ring.
   The attribute selector outranks [tabindex]:focus-visible above. */
main[tabindex]:focus-visible {
  outline: none;
  box-shadow: none;
}

/* ---------- Inline link affordance ----------
   Links inside running text carry an underline, so colour is never the only
   thing marking them (1.4.1). Nav, buttons, and cards are excluded: their
   position and shape already identify them. */
.crisis-list a,
.cvc-option-note a,
.contact-info-item a,
.calendar-status a,
.partner-invite-contact a,
.footer-col a,
.footer-bottom a,
.event-desc a,
.page-placeholder a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.crisis-list a:hover,
.cvc-option-note a:hover,
.contact-info-item a:hover,
.calendar-status a:hover,
.partner-invite-contact a:hover,
.footer-col a:hover,
.footer-bottom a:hover,
.event-desc a:hover,
.page-placeholder a:hover {
  text-decoration-thickness: 2px;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---------- Utility ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 5rem 0;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--outline-white {
  border: 2px solid var(--color-white);
  color: var(--color-white);
  background: transparent;
}

.btn--outline-white:hover {
  background: var(--color-white);
  color: var(--color-dark-green);
}

.btn--filled-green {
  background: var(--color-mid-green);
  color: var(--color-white);
  border: 2px solid var(--color-mid-green);
}

.btn--filled-green:hover {
  background: var(--color-dark-green);
  border-color: var(--color-dark-green);
}

.btn--filled-white {
  background: var(--color-white);
  color: var(--color-dark-navy);
  border: 2px solid var(--color-white);
}

.btn--filled-white:hover {
  background: var(--color-cream);
  border-color: var(--color-cream);
}

.btn--filled-navy {
  background: var(--color-dark-navy);
  color: var(--color-white);
  border: 2px solid var(--color-dark-navy);
}

.btn--filled-navy:hover {
  background: var(--color-dark-green);
  border-color: var(--color-dark-green);
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ---------- Exit Bar (inside .site-header so it stays stuck) ---------- */
.exit-bar {
  background: var(--color-dark-navy);
}

.exit-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.25rem 1.5rem;
  display: flex;
  justify-content: center;
}

/* A panic control earns the 44px AAA target size, not the 24px minimum. */
.exit-link {
  background: var(--color-cream);
  color: var(--color-dark-navy);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 1.25rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}

.exit-link:hover {
  background: var(--color-white);
  transform: translateY(-1px);
}

/* ---------- Nav Shell ----------
   .nav-inner is what responds to width, but an element cannot query itself,
   so .nav-wrapper is the named container. This measures real header width
   rather than viewport width. */
.nav-wrapper {
  container-type: inline-size;
  container-name: nav;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.75rem 1.5rem;
}

.nav-logo {
  display: inline-flex;
  flex-shrink: 0;
}

.nav-logo img {
  height: 50px;
  width: auto;
  min-width: 236px;
}

/* ---------- Top-level Links ---------- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-right: auto;
}

.nav-links > li {
  position: relative;
}

.nav-links > li > a,
.dropdown-toggle {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-dark-navy);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0.25rem 0;
  position: relative;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.nav-links > li > a::after,
.dropdown-toggle::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-mid-green);
  transition: width 0.3s;
}

.nav-links > li > a:hover::after,
.nav-links > li > a[aria-current="page"]::after,
.dropdown-toggle:hover::after,
.dropdown-toggle.is-active::after,
.dropdown-toggle[aria-expanded="true"]::after {
  width: 100%;
}

.nav-links > li > a:hover,
.dropdown-toggle:hover,
.dropdown-toggle.is-active {
  color: var(--color-mid-green);
}

.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.4rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.2s;
}

.dropdown-toggle[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}

/* ---------- Dropdown Panel ---------- */
.dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  min-width: 220px;
  background: var(--color-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 0.5rem 0;
  z-index: 1001;
}

.dropdown-toggle[aria-expanded="true"] + .dropdown-panel {
  display: block;
}

/* The last dropdown aligns its right edge to its parent so the panel
   cannot run off the right viewport edge. header.php marks that item with
   .has-dropdown--last, which keeps this to a plain class selector. */
.has-dropdown--last .dropdown-panel {
  left: auto;
  right: 0;
}

.dropdown-panel a {
  display: block;
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-dark-navy);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.dropdown-panel a:hover,
.dropdown-panel a[aria-current="page"] {
  background: var(--color-cream);
  color: var(--color-link);
}

/* ---------- Survey Button ---------- */
.nav-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.btn-survey {
  background: var(--color-mid-green);
  color: var(--color-white);
  border-radius: 50px;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
}

.btn-survey:hover {
  background: var(--color-dark-green);
  transform: translateY(-1px);
}

/* The menu copy of the survey button only shows in the collapsed nav. */
.nav-links > .nav-survey {
  display: none;
}

/* min-width and min-height keep the tap target at 44px. */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-dark-navy);
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Collapsed Nav ----------
   Threshold is measured, not chosen: the intrinsic one-row width of
   .nav-inner (24 padding + 236.36 logo + 32 gap + 394.17 links + 32 gap
   + 148.63 survey + 24 padding) is 891.16px, rounded up to the next 10px.
   Re-measure and update this number whenever a nav item is added. */
@container nav (max-width: 900px) {
  .nav-inner {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .nav-logo {
    margin-right: auto;
  }

  /* Logo plus hamburger must fit one row at 320px: 24 padding + 207.7 logo
     + 16 gap + 44 hamburger + 24 padding = 315.7px. Width follows the
     height through the width and height attributes. */
  .nav-logo img {
    height: 44px;
    min-width: 0;
  }

  /* The survey button moves into the menu panel (.nav-survey below). */
  .nav-right {
    display: none;
  }

  .hamburger {
    display: flex;
    order: 3;
  }

  .nav-links {
    display: none;
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-right: 0;
    padding: 0.5rem 0 0.25rem;
    border-top: 1px solid #e8e3db;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links > li > a,
  .dropdown-toggle {
    display: flex;
    width: 100%;
    padding: 0.75rem 0.25rem;
  }

  .dropdown-toggle {
    justify-content: space-between;
  }

  /* The sliding underline is an affordance for the one-row bar only. */
  .nav-links > li > a::after,
  .dropdown-toggle::after {
    display: none;
  }

  /* Dropdowns become inline expanding sections, not overlays. */
  .dropdown-panel,
  .has-dropdown--last .dropdown-panel {
    position: static;
    left: auto;
    right: auto;
    margin-top: 0;
    min-width: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0 0 0.25rem 1rem;
  }

  .dropdown-panel a {
    padding: 0.6rem 0.25rem;
  }

  .dropdown-panel a:hover,
  .dropdown-panel a[aria-current="page"] {
    background: transparent;
  }

  /* Last item in the menu panel. The .nav-links > li > a rules above outrank
     .btn--filled-green, so its button styles are restated here. */
  .nav-links > .nav-survey {
    display: block;
    padding: 0.75rem 0 0.5rem;
  }

  .nav-links > .nav-survey > .btn {
    display: block;
    width: 100%;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    white-space: normal;
    color: var(--color-white);
    background: var(--color-mid-green);
    border: 2px solid var(--color-mid-green);
  }

  .nav-links > .nav-survey > .btn:hover {
    color: var(--color-white);
    background: var(--color-dark-green);
    border-color: var(--color-dark-green);
  }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-cream);
  border-top: 1px solid #ddd;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 3rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--color-dark-green);
}

.footer-col p,
.footer-col a {
  font-size: 0.9rem;
  color: var(--color-dark-navy);
  line-height: 1.7;
}

.footer-col a:hover {
  color: var(--color-link);
}

.footer-tagline {
  font-style: italic;
  color: var(--color-link);
  font-size: 0.95rem;
}

.footer-wordmark {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-dark-green);
  margin-bottom: 0.5rem;
}

/* 220px on desktop; max-width lets it shrink with the column on narrow grids. */
.footer-logo {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  margin-bottom: 0.75rem;
}

.footer-funding {
  background: var(--color-cream);
  border-top: 1px solid #ddd;
  padding: 1.5rem 0;
}

.footer-funding p {
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--color-dark-navy);
  opacity: 0.8;
  margin: 0;
  text-align: center;
}

.footer-bottom {
  background: var(--color-dark-green);
  text-align: center;
  padding: 1rem;
}

.footer-bottom p {
  color: var(--color-white);
  font-size: 0.85rem;
  margin: 0;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   HOME PAGE - Hero
   ============================================ */
.hero {
  background: radial-gradient(ellipse at center, #3a6354 0%, var(--color-dark-green) 70%);
  color: var(--color-white);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  min-height: 520px;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.hero-text {
  padding: 3rem 2rem;
}

.hero-text h1 {
  margin-bottom: 1.25rem;
  font-size: 2.25rem;
}

.hero-text p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-image {
    max-height: 300px;
    overflow: hidden;
  }

  .hero-text {
    padding: 2rem 1.5rem;
  }

  .hero-text h1 {
    font-size: 1.75rem;
  }
}

/* ============================================
   HOME PAGE - What is going on at the ERC
   ============================================ */
.what-erc {
  background: var(--color-slate-blue);
  color: var(--color-white);
}

.what-erc-intro {
  text-align: center;
  max-width: 850px;
  margin: 0 auto 3rem;
}

.what-erc-intro h2 {
  margin-bottom: 1.5rem;
}

.what-erc-intro p {
  font-size: 1.05rem;
  line-height: 1.7;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.service-card ul {
  list-style: disc;
  padding-left: 1.25rem;
  font-size: 0.92rem;
  line-height: 1.65;
}

.service-card ul li {
  margin-bottom: 0.4rem;
}

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   HOME PAGE - Social Media
   ============================================ */
.social-section {
  background: var(--color-slate-blue);
  color: var(--color-white);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.social-section .container {
  text-align: center;
}

.social-section h2 {
  margin-bottom: 0.75rem;
}

.social-section > .container > p {
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transition: transform 0.2s;
}

.social-link:hover {
  transform: translateY(-4px);
}

.social-link svg {
  width: 48px;
  height: 48px;
  fill: var(--color-white);
}

.social-link span {
  font-weight: 600;
  font-size: 0.95rem;
}

/* ============================================
   PAGE HERO BANNER (About, Resources, Events, Contact)
   ============================================ */
.page-hero {
  padding: 4rem 0;
  text-align: center;
  color: var(--color-white);
}

.page-hero--green {
  background: radial-gradient(ellipse at center, #3a6354 0%, var(--color-dark-green) 70%);
}

.page-hero--navy {
  background: radial-gradient(ellipse at center, #2a4a5e 0%, var(--color-dark-navy) 70%);
}

.page-hero h1 {
  margin-bottom: 0.75rem;
}

.page-hero p {
  max-width: 650px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ============================================
   ABOUT PAGE - Mission
   ============================================ */
.mission-section {
  background: var(--color-cream);
}

.mission-section .container {
  max-width: 850px;
  text-align: center;
}

.mission-section h2 {
  margin-bottom: 1.5rem;
  color: var(--color-dark-green);
}

.mission-section p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-dark-navy);
}

/* ============================================
   ABOUT PAGE - Service Detail Rows
   ============================================ */
.service-detail-section {
  background: var(--color-white);
}

.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 0;
  border-bottom: 1px solid #e8e3db;
}

.service-row:last-child {
  border-bottom: none;
}

.service-row--reverse .service-row-image {
  order: 2;
}

.service-row-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.service-row-content h3 {
  font-size: 1.4rem;
  color: var(--color-dark-green);
  margin-bottom: 1rem;
}

.service-row-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-dark-navy);
}

.service-row-content ul li {
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .service-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .service-row--reverse .service-row-image {
    order: 0;
  }
}

/* ============================================
   ABOUT PAGE - Victim Outreach Incorporated
   ============================================ */
.voi-section {
  background: var(--color-dark-navy);
  color: var(--color-white);
}

.voi-section h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.voi-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 3rem;
  align-items: center;
}

.voi-person {
  margin: 0;
}

.voi-person img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
}

.voi-person figcaption {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.voi-body {
  text-align: center;
}

.voi-logo {
  max-width: 260px;
  margin: 0 auto 1.75rem;
  background: var(--color-white);
  border-radius: 12px;
  padding: 1rem;
}

.voi-body p {
  line-height: 1.75;
  font-size: 0.98rem;
}

@media (max-width: 768px) {
  .voi-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .voi-body {
    order: -1;
  }

  .voi-person img {
    max-width: 280px;
    margin: 0 auto;
  }
}

/* ============================================
   CTA Strip
   ============================================ */
.cta-strip {
  text-align: center;
  color: var(--color-white);
}

.cta-strip--navy {
  background: var(--color-dark-navy);
}

.cta-strip--slate {
  background: var(--color-slate-blue);
}

.cta-strip h2 {
  margin-bottom: 0.75rem;
}

.cta-strip p {
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

.cta-strip .btn {
  margin-top: 1rem;
}

/* ============================================
   RESOURCES PAGE - Cards
   ============================================ */
.resources-section {
  background: var(--color-cream);
}

.resources-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.resource-card {
  background: var(--color-white);
  border-radius: 12px;
  padding: 2rem;
  border-top: 4px solid var(--color-dark-green);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.resource-card h3 {
  color: var(--color-dark-green);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.resource-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-dark-navy);
  margin-bottom: 1.5rem;
}

.resource-card .btn {
  font-size: 0.9rem;
  padding: 0.6rem 1.5rem;
}

@media (max-width: 768px) {
  .resources-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   EVENTS PAGE - List and Calendar views
   ============================================ */
.calendar-section {
  background: var(--color-cream);
}

/* ---------- View switcher ---------- */
.view-switch {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.view-switch[hidden] {
  display: none;
}

.view-switch button {
  border: 2px solid var(--color-dark-green);
  background: var(--color-white);
  color: var(--color-dark-green);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.75rem;
  transition: background 0.2s, color 0.2s;
}

.view-switch button:first-child {
  border-radius: 50px 0 0 50px;
}

.view-switch button:last-child {
  border-radius: 0 50px 50px 0;
  border-left-width: 0;
}

.view-switch button:hover {
  background: var(--color-cream);
}

/* Pressed state carries a filled background AND a check glyph, so the
   selection is not signalled by colour alone. */
.view-switch button[aria-pressed="true"] {
  background: var(--color-dark-green);
  color: var(--color-white);
}

.view-switch button[aria-pressed="true"]::before {
  content: "\2713\00a0";
}

/* Lift the focused toggle above its neighbour so the ring is not clipped. */
.view-switch button:focus-visible {
  position: relative;
  z-index: 1;
}

/* ---------- Month navigation ---------- */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.calendar-nav[hidden] {
  display: none;
}

.calendar-nav h2 {
  min-width: 220px;
  text-align: center;
  color: var(--color-dark-green);
  font-size: 1.5rem;
}

.calendar-nav button {
  background: var(--color-mid-green);
  color: var(--color-white);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.calendar-nav button:hover:not(:disabled) {
  background: var(--color-dark-green);
}

.calendar-nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- List view ---------- */
.event-list[hidden],
.event-grid[hidden] {
  display: none;
}

/* Single column at every width. No grid/list swap by breakpoint. */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.event-month-heading {
  color: var(--color-dark-green);
  font-size: 1.5rem;
  margin-top: 1rem;
}

.event-month-heading:first-child {
  margin-top: 0;
}

.event-card {
  background: var(--color-white);
  border-radius: 12px;
  padding: 2rem;
  border-top: 4px solid var(--color-dark-green);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.event-card h3 {
  color: var(--color-dark-green);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.event-when {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.event-where {
  font-size: 0.95rem;
  color: var(--color-link);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.event-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.event-card .btn {
  font-size: 0.9rem;
  padding: 0.6rem 1.5rem;
}

/* ---------- Calendar view ---------- */
/* Narrow screens scroll the table sideways rather than letting cells
   collapse into an unreadable width. */
.event-grid {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.event-grid-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.event-grid-table th {
  background: var(--color-dark-green);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 0.25rem;
  text-align: center;
}

.event-grid-table td {
  border: 1px solid rgba(28, 48, 64, 0.12);
  vertical-align: top;
  padding: 0.5rem;
  width: 14.28%;
  min-height: 110px;
  height: 110px;
}

.event-grid-table td.is-empty {
  background: rgba(28, 48, 64, 0.03);
}

.event-grid-table td.is-today {
  background: var(--color-cream);
}

.event-grid-table .day-number {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.event-grid-table td.is-today .day-number {
  color: var(--color-dark-green);
}

.day-event {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--color-mid-green);
  color: var(--color-white);
  border-radius: 6px;
  padding: 0.3rem 0.45rem;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  line-height: 1.35;
  transition: background 0.2s;
}

.day-event:hover {
  background: var(--color-dark-green);
}

/* ---------- Status ---------- */
.calendar-status {
  text-align: center;
  padding: 2rem 0;
  font-size: 1.05rem;
  line-height: 1.7;
}

.calendar-status[hidden] {
  display: none;
}

.calendar-status a {
  color: var(--color-link);
  font-weight: 600;
}

/* ============================================
   CONTACT PAGE - Form Embed
   ============================================ */
.contact-form-section {
  background: var(--color-dark-navy);
  padding-bottom: 4rem;
}

.contact-form-section .container {
  max-width: 800px;
}

.contact-form-section iframe {
  border-radius: 12px;
  background: var(--color-white);
}

.form-fallback {
  text-align: center;
  margin-top: 1.5rem;
}

/* ============================================
   CONTACT PAGE - Direct Info
   ============================================ */
.contact-info-section {
  background: var(--color-cream);
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.contact-info-item h2 {
  color: var(--color-dark-green);
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.contact-info-item p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.contact-info-item a {
  color: var(--color-link);
  font-weight: 500;
}

@media (max-width: 768px) {
  .contact-info-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ============================================
   CRISIS SUPPORT PAGE - Immediate help block
   ============================================ */
.crisis-urgent {
  background: var(--color-cream);
  padding-bottom: 0;
}

.crisis-urgent .container {
  max-width: 900px;
}

.crisis-urgent h2 {
  color: var(--color-dark-green);
  text-align: center;
  margin-bottom: 2rem;
}

.crisis-urgent-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.crisis-urgent-item {
  background: var(--color-white);
  border-radius: 12px;
  padding: 1.5rem;
  border-top: 4px solid var(--color-danger);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.crisis-urgent-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--color-dark-green);
  margin-bottom: 0.75rem;
}

.crisis-tel {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-dark-navy);
  padding: 0.4rem 0.75rem;
}

.crisis-tel:hover {
  text-decoration: underline;
}

/* ============================================
   DISCLOSURES: Crisis Support categories and FAQ items
   ============================================ */
.crisis-directory {
  background: var(--color-cream);
}

.crisis-directory .container {
  max-width: 900px;
}

.crisis-group,
.faq-item {
  background: var(--color-white);
  border-radius: 12px;
  border-top: 4px solid var(--color-dark-green);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 1.25rem;
}

.crisis-group summary,
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--color-dark-green);
  cursor: pointer;
  list-style: none;
}

/* Suppress the native marker so the custom caret is the only indicator. */
.crisis-group summary::-webkit-details-marker,
.faq-item summary::-webkit-details-marker {
  display: none;
}

.crisis-group summary::after,
.faq-item summary::after {
  content: "";
  flex: 0 0 auto;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--color-mid-green);
  border-bottom: 2px solid var(--color-mid-green);
  transform: rotate(45deg);
  transform-origin: center;
  transition: transform 0.2s;
}

.crisis-group[open] summary::after,
.faq-item[open] summary::after {
  transform: rotate(-135deg);
}

.crisis-group-body {
  padding: 0 1.5rem 1.5rem;
}

.crisis-list li {
  padding: 0.85rem 0;
  border-top: 1px solid rgba(28, 48, 64, 0.12);
  font-size: 0.95rem;
  line-height: 1.7;
}

.crisis-list strong {
  color: var(--color-dark-green);
}

.crisis-list a {
  color: var(--color-link);
  font-weight: 600;
  padding: 0.15rem 0;
}

@media (max-width: 768px) {
  .crisis-urgent-list {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   CRIME VICTIM COMPENSATION PAGE
   ============================================ */
.cvc-intro {
  background: var(--color-cream);
  padding-bottom: 0;
}

.cvc-intro .container {
  max-width: 850px;
  text-align: center;
}

.cvc-intro p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.cvc-options {
  background: var(--color-cream);
}

.cvc-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.cvc-option {
  background: var(--color-white);
  border-radius: 12px;
  padding: 2rem;
  border-top: 4px solid var(--color-dark-green);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}

.cvc-option h2 {
  color: var(--color-dark-green);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.cvc-option p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.cvc-option-note a {
  color: var(--color-link);
  font-weight: 600;
}

/* Pin the button to the bottom so both columns align regardless of copy length. */
.cvc-option .btn {
  margin-top: auto;
  align-self: flex-start;
}

.cvc-therapist {
  background: var(--color-cream);
  text-align: center;
  padding-top: 0;
}

.cvc-therapist .container {
  max-width: 850px;
}

.cvc-therapist h2 {
  color: var(--color-dark-green);
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .cvc-options-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PLACEHOLDER PAGES (content pending)
   ============================================ */
.page-placeholder {
  background: var(--color-cream);
}

.page-placeholder .container {
  max-width: 850px;
  text-align: center;
}

.page-placeholder p {
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ============================================
   SHARED: photo placeholders and page notes
   ============================================ */
.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(28, 48, 64, 0.06);
  border: 2px dashed var(--color-slate-blue);
  color: var(--color-dark-navy);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.85;
}

/* Matches the 1:1 ratio of .voi-person img so roster rows stay aligned. */
.photo-placeholder--square {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.photo-placeholder--tile {
  aspect-ratio: 4 / 3;
}

.page-note {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.95rem;
  font-style: italic;
  opacity: 0.8;
}

/* ============================================
   MEET THE TEAM PAGE
   ============================================ */
.team-section {
  background: var(--color-cream);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}

.team-grid .voi-person figcaption {
  color: var(--color-dark-navy);
}

@media (max-width: 900px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-grid .voi-person img,
  .team-grid .photo-placeholder--square {
    max-width: 280px;
    margin: 0 auto;
  }
}

/* Stand-in for a team photo until one arrives. Same box as .voi-person img
   (1:1, 16px radius) so the roster lines up. White on dark green is 9.72:1.
   Decorative: the figcaption names the person, so markup sets aria-hidden. */
.team-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: var(--color-dark-green);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  user-select: none;
}

/* Mirrors the .voi-person img cap at the same breakpoint. */
@media (max-width: 768px) {
  .team-initials {
    max-width: 280px;
    margin: 0 auto;
  }
}

/* ============================================
   PARTNERS PAGE
   ============================================ */
.partners-intro {
  background: var(--color-cream);
  padding-bottom: 0;
}

.partners-intro .container {
  max-width: 850px;
  text-align: center;
}

.partners-intro p {
  line-height: 1.8;
}

.partners-logos {
  background: var(--color-cream);
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2.5rem 2rem;
  align-items: start;
}

.partner-item {
  text-align: center;
}

/* Logos arrive at mixed sizes and aspect ratios, so contain them in a
   uniform box rather than letting each set its own height. */
.partner-item img {
  width: 100%;
  max-width: 150px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 1rem;
}

.partner-name {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-dark-navy);
}

.partners-thanks {
  margin-top: 3.5rem;
  text-align: center;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.4;
  color: var(--color-dark-green);
}

.partner-invite {
  background: var(--color-dark-navy);
  color: var(--color-white);
}

.partner-invite h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.partner-invite-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 3rem;
  align-items: center;
}

.partner-invite-image img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.partner-invite-body {
  text-align: center;
}

.partner-invite-body p {
  line-height: 1.75;
  font-size: 0.98rem;
  margin-bottom: 1.5rem;
}

.partner-invite-note {
  font-style: italic;
}

.partner-invite-contact {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.partner-invite-contact a {
  color: var(--color-cream);
}

@media (max-width: 768px) {
  .partner-invite-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .partner-invite-body {
    order: -1;
  }

  .partner-invite-image img {
    max-width: 320px;
    margin: 0 auto;
  }
}

/* ============================================
   FAQ PAGE
   ============================================ */
.faq-section {
  background: var(--color-cream);
}

.faq-section .container {
  max-width: 900px;
}

.faq-item {
  margin-bottom: 1.25rem;
}

.faq-item .crisis-group-body p {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================
   GALLERY PAGE
   ============================================ */
.gallery-section {
  background: var(--color-cream);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.gallery-grid figure {
  margin: 0;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.gallery-grid figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

/* ============================================
   HOME PAGE - Hours and Closures
   ============================================ */
.status-block {
  background: var(--color-cream);
  color: var(--color-dark-navy);
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.status-col h2 {
  color: var(--color-dark-green);
  margin-bottom: 1.5rem;
}

.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(28, 48, 64, 0.12);
}

.hours-row dt {
  font-weight: 600;
}

.hours-row dd {
  text-align: right;
}

.closures-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(28, 48, 64, 0.12);
}

.closures-list time {
  display: block;
  font-weight: 600;
  color: var(--color-dark-green);
}

.closure-reason {
  font-size: 0.95rem;
}

.closures-empty {
  padding: 0.85rem 0;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .status-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ============================================
   CONTACT PAGE - Survey Invitation
   ============================================ */
.survey-invite {
  background: var(--color-cream);
  padding-top: 0;
}

.survey-invite .container {
  max-width: 750px;
  text-align: center;
}

.survey-invite h2 {
  color: var(--color-dark-green);
  margin-bottom: 1.25rem;
}

.survey-invite p {
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* ============================================
   SCREEN READER ONLY
   ============================================ */
/* A heading is the one thing HTML allows inside <summary> beyond phrasing
   content. It carries the category into heading navigation without changing
   any of the rendering. */
.crisis-group summary h3,
.faq-item summary h2 {
  font: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   FORCED COLOURS (Windows High Contrast)
   ============================================
   Backgrounds are stripped in forced-colours mode, so anything drawn with a
   background alone disappears. These three are shapes, not decoration: the
   hamburger bars and the nav underline and caret. */
@media (forced-colors: active) {
  .hamburger span {
    forced-color-adjust: none;
    background: CanvasText;
  }

  .nav-links > li > a::after,
  .dropdown-toggle::after {
    forced-color-adjust: none;
    background: CanvasText;
  }
}
