/* Troop 936 — inspired by alamedatroop7.com + pvtroop276.com layouts (Troop 936 content only) */

:root {
  --scout-navy: #003087;
  --scout-navy-dark: #002060;
  --scout-red: #e01e23;
  --gold: #f1a41d;
  --gold-dark: #d4920f;
  --header-bg: rgba(255, 255, 255, 0.96);
  --footer-bg: #2c2c2c;
  --text: #333333;
  --text-muted: #5c5c5c;
  --bg: #ffffff;
  --border: #e8e8e8;
  --max: 1100px;
  --font-sans: "Open Sans", "Segoe UI", system-ui, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --header-height: 72px;

  /* Semantic surface/text tokens — prefer these over raw hex in new rules. */
  --surface: #ffffff;
  --surface-alt: #fafafa;
  --surface-tint: #eef4fb;
  --surface-muted: #f5f5f5;
  --text-inverse: #ffffff;
  --text-inverse-muted: rgba(255, 255, 255, 0.85);
  --focus-ring: #1a73e8;
  --focus-ring-inverse: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

a {
  color: var(--scout-navy);
}

a:hover {
  color: var(--scout-red);
}

/* ── Focus states ── */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Controls that sit on photos need a light-on-dark ring to stay visible. */
.hero-arrow:focus-visible,
.hero-play-toggle:focus-visible,
.hero-dot:focus-visible,
.hero-scroll:focus-visible,
.menu-button:focus-visible,
.btn-outlined-light:focus-visible,
.btn-primary-light:focus-visible {
  outline: 3px solid var(--focus-ring-inverse);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Header / nav (PV276-style light bar) ── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
}

.brand-text span {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

#main-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

#main-nav a {
  display: block;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text);
  border-radius: 4px;
}

#main-nav a:hover {
  color: var(--scout-red);
}

#main-nav a[aria-current="page"] {
  color: var(--scout-red);
}

.menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--scout-navy);
}

.menu-button svg {
  width: 24px;
  height: 24px;
}

/* Mobile drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: var(--surface);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px;
  background: var(--footer-bg);
  color: var(--text-inverse);
}

.drawer-header strong {
  font-size: 1.1rem;
}

.drawer-nav {
  list-style: none;
  padding: 8px 0;
  margin: 0;
}

.drawer-nav a {
  display: block;
  padding: 14px 20px;
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.drawer-nav a:hover,
.drawer-nav a.active {
  color: var(--scout-red);
  background: var(--surface-alt);
}

@media (max-width: 900px) {
  #main-nav {
    display: none;
  }

  .menu-button {
    display: flex;
  }
}

/* ── Members dropdown nav ── */

.nav-has-submenu {
  position: relative;
}

.nav-submenu-toggle {
  display: block;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

.nav-submenu-toggle:hover,
.nav-has-submenu.is-open .nav-submenu-toggle {
  color: var(--scout-red);
}

.nav-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 120;
}

.nav-has-submenu.is-open .nav-submenu {
  display: block;
}

.nav-submenu a {
  display: block;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.nav-submenu a:hover,
.nav-submenu a.active {
  color: var(--scout-red);
  background: var(--surface-alt);
}

.nav-leader-only[hidden],
.nav-sign-in-only[hidden],
.nav-sign-out-only[hidden],
li.nav-leader-only[hidden],
li.nav-sign-in-only[hidden],
li.nav-sign-out-only[hidden],
.drawer-submenu-item[hidden] {
  display: none !important;
}

.drawer-submenu-toggle {
  display: block;
  width: 100%;
  padding: 14px 20px;
  text-align: left;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface-muted);
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-family: inherit;
}

.drawer-submenu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
}

.drawer-submenu.is-open .drawer-submenu-list {
  display: block;
}

.drawer-submenu-item a {
  padding-left: 32px;
  font-size: 0.95rem;
}

/* ── Hero carousel (PV276-style) ── */

.hero-carousel {
  position: relative;
  height: 85vh;
  min-height: 480px;
  margin-top: var(--header-height);
  overflow: hidden;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease, transform 8s ease;
  background-size: cover;
  background-position: center;
  transform: scale(1);
  will-change: opacity, transform;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  color: var(--text-inverse);
}

.hero-emblem {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 16px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.hero-welcome {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 400;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(3rem, 10vw, 6.5rem);
  font-weight: 800;
  line-height: 1;
  margin: 8px 0 12px;
  color: var(--gold);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.02em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin: 0 0 28px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: var(--text-inverse);
  opacity: 0.85;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.hero-arrow:hover {
  background: var(--surface);
}

.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }

.hero-play-toggle {
  position: absolute;
  bottom: 24px;
  right: 16px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.hero-play-toggle:hover {
  background: var(--surface);
}

.hero-play-toggle .icon-play { display: none; }
.hero-play-toggle.is-paused .icon-play { display: block; }
.hero-play-toggle.is-paused .icon-pause { display: none; }

.hero-dots {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--text-inverse);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s;
}

.hero-dot.active {
  background: var(--text-inverse);
}

@media (max-width: 768px) {
  .hero-dots {
    bottom: 16px;
  }

  .hero-play-toggle {
    bottom: 14px;
    right: 12px;
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
  }

  .hero-scroll {
    animation: none;
  }
}

/* ── Buttons ── */

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-outlined-light {
  color: var(--text-inverse);
  border: 2px solid var(--text-inverse);
  background: transparent;
}

.btn-outlined-light:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-inverse);
}

.btn-outlined {
  color: var(--scout-navy);
  border: 2px solid var(--scout-navy);
  background: transparent;
}

.btn-outlined:hover {
  background: var(--surface-tint);
  color: var(--scout-navy);
}

.btn-primary {
  color: var(--text-inverse);
  background: var(--scout-navy);
  border: 2px solid var(--scout-navy);
}

.btn-primary:hover {
  background: var(--scout-navy-dark);
  color: var(--text-inverse);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ── Sections (Alameda-style) ── */

.section {
  padding: 64px 24px;
}

.section-alt {
  background: var(--surface-alt);
}

/* ── Plan your visit ── */

.visit-section {
  padding-top: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.visit-block {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
}

.visit-facts-list {
  margin: 20px 0 24px;
  display: grid;
  gap: 16px;
}

.visit-facts-list > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
}

.visit-facts-list dt {
  font-weight: 700;
  color: var(--scout-navy);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding-top: 2px;
}

.visit-facts-list dd {
  margin: 0;
}

.visit-expect {
  background: var(--surface-tint);
  border-radius: 6px;
  padding: 24px 28px;
}

.visit-expect h3 {
  margin-top: 0;
}

.visit-expect ol {
  padding-left: 20px;
  margin: 12px 0;
}

.visit-expect li {
  margin-bottom: 10px;
}

@media (max-width: 800px) {
  .visit-block {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-mission {
  text-align: center;
  background: var(--surface);
}

.section-mission p {
  font-size: 1.1rem;
  max-width: 820px;
  margin: 0 auto;
  color: var(--text);
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  margin: 0 0 40px;
  color: var(--text);
  line-height: 1.35;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.info-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.info-card-img {
  height: 180px;
  object-fit: cover;
  width: 100%;
}

.info-card-body {
  padding: 20px;
}

.info-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 0 0 10px;
  color: var(--scout-navy);
}

.info-card p {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.info-card a {
  font-weight: 600;
  font-size: 0.9rem;
}

.section-intro {
  max-width: 720px;
  margin: 0 auto 28px;
  text-align: center;
  color: var(--text-muted);
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.photo-gallery-item {
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.photo-gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
}

/* Aims list */
.aims-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.aims-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem;
}

.aims-list li:last-child {
  border-bottom: none;
}

.aims-list strong {
  color: var(--scout-navy);
}

/* CTA band (PV276 about section) */
.cta-band {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  text-align: center;
  padding: 48px 24px;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.cta-band .section-inner {
  position: relative;
  z-index: 1;
}

.cta-band h2 {
  color: var(--text-inverse);
  font-family: var(--font-serif);
  font-size: 2rem;
  margin: 0 0 20px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ── Subpage banner (Alameda serif hero) ── */

.page-hero {
  margin-top: var(--header-height);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 48px 24px;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(44, 44, 44, 0.55),
    rgba(44, 44, 44, 0.75)
  );
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  color: var(--text-inverse);
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.page-hero p {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.95;
}

.page-hero-navy {
  background: linear-gradient(135deg, var(--scout-navy) 0%, #1a4a8a 55%, #2c5f9e 100%);
}

.page-hero-navy::before {
  background: rgba(0, 0, 0, 0.15);
}

/* ── Content pages ── */

.content-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* Cap prose line length for readability without narrowing grids/tables/cards
   that also live on content pages. */
.content-page > p,
.content-page > div > p {
  max-width: 68ch;
}

.content-page h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--scout-navy);
  margin: 2rem 0 0.75rem;
}

.content-page h2:first-child {
  margin-top: 0;
}

.card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
}

.callout {
  background: var(--surface-tint);
  border-left: 4px solid var(--scout-navy);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 4px 4px 0;
}

.muted {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Eagle Scout honor roll */
.eagle-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.eagle-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.eagle-table th,
.eagle-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.eagle-table th {
  background: var(--scout-navy);
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.eagle-table tbody tr:nth-child(even) {
  background: var(--surface-alt);
}

.eagle-table tbody tr:hover {
  background: var(--surface-tint);
}

.eagle-table td:first-child {
  width: 3rem;
  color: var(--text-muted);
  font-weight: 600;
}

.eagle-table td:last-child {
  white-space: nowrap;
}

.eagle-count {
  font-weight: 600;
  color: var(--scout-navy);
}

/* Contact form */
.contact-form .form-field {
  margin-bottom: 16px;
}

.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* ── CMS pages: calendar, gallery, news, documents ── */

.btn-primary-light {
  background: var(--gold);
  color: var(--scout-navy);
  border: 2px solid var(--gold);
  font-weight: 800;
}

.btn-primary-light:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: var(--scout-navy);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.calendar-embed {
  margin: 24px 0;
}

.calendar-iframe {
  width: 100%;
  min-height: 600px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.calendar-placeholder {
  text-align: center;
  padding: 32px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.gallery-item {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: 12px 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.doc-list h2 {
  margin-top: 32px;
  margin-bottom: 16px;
  font-size: 1.2rem;
  color: var(--scout-navy);
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.doc-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.leadership-card h3 {
  margin: 0 0 4px;
}

.leadership-role {
  color: var(--scout-red);
  font-weight: 600;
  margin: 0 0 8px;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-card time {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.news-card h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.news-teaser-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.news-teaser-item h3 {
  margin: 4px 0 8px;
  font-size: 1.1rem;
}

.news-teaser-item time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.news-teaser-item time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Sticky mobile CTA ── */

.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

body.has-mobile-cta {
  padding-bottom: 72px;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

@media (max-width: 900px) {
  .mobile-cta-bar {
    display: block;
  }
}

/* ── Cookie banner ── */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--footer-bg);
  color: #e8e8e8;
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

body.has-mobile-cta .cookie-banner {
  bottom: 64px;
}

.cookie-banner p {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.cookie-banner a {
  color: var(--text-inverse);
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-secondary {
  background: transparent;
  color: var(--text-inverse);
  border: 2px solid #888;
}

/* ── Loading states ── */

.is-loading .loading-text {
  color: var(--text-muted);
  font-style: italic;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.btn.is-loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Form validation ── */

.form-status {
  min-height: 1.4em;
  margin: 8px 0 12px;
  font-size: 0.95rem;
}

.form-status.error {
  color: var(--scout-red);
  font-weight: 600;
}

.form-status.loading {
  color: var(--text-muted);
  font-style: italic;
}

.field-error {
  display: block;
  color: var(--scout-red);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 4px;
}

.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: var(--scout-red);
  box-shadow: 0 0 0 2px rgba(224, 30, 35, 0.15);
}

/* ── 404, thank-you, legal pages ── */

.error-page,
.thank-you-page {
  text-align: center;
  padding-top: 120px;
  max-width: 560px;
  margin: 0 auto;
}

.error-code {
  font-size: 5rem;
  font-weight: 800;
  color: var(--scout-navy);
  line-height: 1;
  opacity: 0.2;
}

.error-links {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.thank-you-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: #d4edda;
  color: #155724;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 72px;
  font-weight: 700;
}

.page-hero-compact {
  min-height: 200px;
}

.page-hero-compact .page-hero-inner h1 {
  font-size: 2rem;
}

.hero-cta-row {
  margin-top: 20px;
  justify-content: center;
}

.legal-page h2 {
  margin-top: 28px;
  font-size: 1.15rem;
  color: var(--scout-navy);
}

.footer-legal {
  margin-top: 12px !important;
  font-size: 0.85rem !important;
}

.footer-legal a {
  color: #aaa;
}

/* ── Footer (Alameda dark bar) ── */

.site-footer {
  background: var(--footer-bg);
  color: #ccc;
  padding: 28px 24px;
  font-size: 0.95rem;
  text-align: center;
}

.site-footer p {
  margin: 0 0 6px;
}

.site-footer a {
  color: #e0e0e0;
}

.site-footer a:hover {
  color: var(--text-inverse);
}

.footer-trust {
  font-size: 0.9rem;
}

.footer-trust a {
  white-space: nowrap;
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .photo-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-carousel {
    min-height: 420px;
    height: 70vh;
  }

  .hero-arrow {
    width: 36px;
    height: 36px;
  }

  .section {
    padding: 48px 20px;
  }
}

/* ── Custom pages (admin Pages editor) ── */

.page-title {
  font-family: var(--font-serif);
  color: var(--scout-navy);
  font-size: 2rem;
  margin: 0 0 24px;
}

.page-section {
  margin: 0 0 32px;
}

.page-section-caption {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}

.page-section-quote blockquote {
  margin: 0;
  padding: 20px 24px;
  border-left: 4px solid var(--gold);
  background: var(--surface-alt);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
}

.page-section-quote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.page-section-line {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.page-accordion-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 8px;
}

.page-accordion-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--scout-navy);
}

.page-accordion-item > div {
  margin-top: 12px;
}

.page-video-frame {
  position: relative;
  padding-top: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
}

.page-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.page-section-video video {
  width: 100%;
  border-radius: 6px;
}

.page-layout-full-width .page-section-image img {
  width: 100%;
}

.page-layout-landing .page-title {
  font-size: 2.75rem;
  text-align: center;
}

@media print {
  .site-header,
  .drawer,
  .drawer-overlay,
  .hero-arrow,
  .hero-scroll {
    display: none !important;
  }

  .hero-carousel,
  .page-hero {
    margin-top: 0;
    min-height: auto;
    height: auto;
  }
}

/* ── Printable meal plan (cookbook planner + patrol campout plans) ── */

#printMealPlanRoot {
  display: none;
}

@media print {
  body > *:not(#printMealPlanRoot) {
    display: none !important;
  }

  #printMealPlanRoot {
    display: block !important;
    color: #1a1a1a;
    font-family: "Open Sans", system-ui, sans-serif;
  }

  #printMealPlanRoot .print-plan-header h1 {
    margin: 0 0 4px;
  }

  #printMealPlanRoot .print-plan-header p {
    margin: 0 0 12px;
    color: #444;
  }

  #printMealPlanRoot table.print-plan-summary {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
  }

  #printMealPlanRoot table.print-plan-summary th,
  #printMealPlanRoot table.print-plan-summary td {
    border: 1px solid #999;
    padding: 4px 8px;
    text-align: left;
    font-size: 12px;
  }

  #printMealPlanRoot .print-recipe {
    page-break-before: always;
  }

  #printMealPlanRoot .print-recipe-slot {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
    color: #555;
  }

  #printMealPlanRoot .print-recipe h2 {
    margin: 2px 0 4px;
  }

  #printMealPlanRoot .print-recipe-meta {
    margin: 0 0 12px;
    color: #444;
  }

  #printMealPlanRoot .print-recipe h3 {
    margin: 14px 0 4px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  #printMealPlanRoot .print-recipe ul,
  #printMealPlanRoot .print-recipe ol {
    margin: 0;
    padding-left: 20px;
  }

  #printMealPlanRoot .print-recipe-note {
    margin-top: 12px;
    font-style: italic;
    color: #444;
  }
}
