:root {
  --bg: #454545;
  --text: #dce5e5;

  --accent: #114927;
  --accent2: #295f3f;
  --accent3: #4f8466;

  --card: rgba(255,255,255,0.06);
  --max: 960px;
  --sidebar-width: 280px;

  --border-soft: rgba(255,255,255,0.12);
  --border-strong: rgba(255,255,255,0.16);
  --hover: rgba(255,255,255,0.08);

  /* Seasonal overlay for hero */
  --hero-overlay-top: rgba(20,20,20,0.22);
  --hero-overlay-bottom: rgba(20,20,20,0.52);

  /* Focus ring glow */
  --accent-glow: rgba(103, 218, 150, 0.22);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a { color: var(--accent3); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px;
}

/* =========================================================
   Layout
   ========================================================= */

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

.content { min-width: 0; }
.content-top { padding: 12px 16px; }

/* =========================================================
   Sidebar (Public + Members)
   ========================================================= */

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px;
  background: rgba(0,0,0,0.28);
  border-right: 1px solid var(--border-soft);
  backdrop-filter: blur(6px);
}

.sidebar .brand {
  font-weight: 800;
  letter-spacing: .4px;
  margin-bottom: 14px;
}

.sidebar nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.00);
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: rgba(103,218,150,0.18);
  border-color: var(--border-strong);
}

.sidebar nav a .icon {
  width: 20px;
  text-align: center;
  opacity: .95;
}

.dropdown {
  display: none;
  margin-left: 34px;
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,0.18);
}
.dropdown.open {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dropdown a { background: rgba(255,255,255,0.04); }

.auth-strip {
  margin-top: 14px;
  display: none;
  gap: 10px;
  align-items: center;
  opacity: .95;
}

.nav-toggle {
  display: none;
  margin-bottom: 12px;
  cursor: pointer;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-weight: 700;
}

/* =========================================================
   Hero / Header
   - Seasonal-ready (site.js sets --hero-image)
   - Desktop: cover (fills header)
   - Mobile: contain (shows whole image)
   - Caption-style tagline (smaller, lower)
   - Winter lift for readability on snow
   ========================================================= */

.site-header {
  position: relative;
  min-height: 68vh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

/* Bottom fade blend so hero transitions nicely into page */
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(69,69,69,0.85));
  pointer-events: none;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--hero-overlay-top), var(--hero-overlay-bottom)),
    var(--hero-image, url('../img/hero.jpg'));
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 0;
}

.hero-overlay {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 2;
}

/* Lower caption placement */
.hero-overlay--lower {
  margin-top: auto;
  padding-bottom: 8px;
}

/* Caption-style tagline */
.hero-tagline {
  margin: 0;
  text-align: center;
  max-width: 46ch;

  font-size: clamp(16px, 1.6vw, 22px);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0.15px;

  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.10);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(3px);
  text-wrap: balance;
}

/* Winter lift (subtle) */
html.season-winter .hero-overlay--lower { padding-bottom: 22px; }
html.season-winter .hero-tagline { background: rgba(0,0,0,0.16); }

/* Homepage-only animation (subtle, delayed) */
.site-header--home .hero-tagline {
  animation: heroTaglineIn 520ms ease-out both;
  animation-delay: 120ms;
}

@keyframes heroTaglineIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .site-header--home .hero-tagline { animation: none !important; }
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* =========================================================
   Sections / Cards / Typography
   ========================================================= */

.section { padding: 36px 0; }
.section.alt { background: var(--accent3); }
.section.section--compact { padding: 22px 0; }

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 26px;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: center;
}

.intro-grid img {
  width: 100%;
  height: auto;
  border-radius: 16px;
}

@media (min-width: 860px) {
  .intro-grid { grid-template-columns: 1fr 1.2fr; }
}

h1, h2, h3 { margin: 0 0 12px 0; line-height: 1.25; }

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

/* =========================================================
   Forms / Notices / Buttons
   ========================================================= */

.form { display: grid; gap: 12px; }
.form label { font-weight: 600; }

.form input, .form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.28);
  color: var(--text);
}

.form button {
  cursor: pointer;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent;
  color: var(--text);
  font-weight: 700;
}
.form button:hover { background: var(--hover); }

.notice { padding: 10px 12px; border-radius: 12px; margin: 12px 0 0; }
.notice.success { background: rgba(70,222,130,0.18); border: 1px solid rgba(70,222,130,0.45); }
.notice.error   { background: rgba(255,80,80,0.16); border: 1px solid rgba(255,80,80,0.38); }

.email-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}
.email-btn:hover { background: var(--hover); }

.btn-link { cursor: pointer; font: inherit; }

.contact-meta { margin: 0 0 10px 0; }
.contact-hint { margin: 0 0 14px 0; opacity: 0.95; }
.small-note { opacity: .85; margin-top: 12px; }

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  background: #dce5e5;
  color: #3d6850;
  padding: 24px 0;
  margin-top: 28px;
}
.site-footer a { color: #3d6850; }

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* =========================================================
   Policy / Rules / Privacy formatting
   ========================================================= */

.policy-lead {
  max-width: 80ch;
  line-height: 1.6;
  opacity: 0.95;
  margin-bottom: 12px;
}

.policy-meta {
  opacity: 0.9;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.policy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px;
}

.related-panel {
  margin: 16px 0;
  padding: 14px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.10);
}

.related-panel h2 {
  font-size: 1.05rem;
  margin: 0 0 10px;
}

.related-panel ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.policy-divider {
  border: none;
  height: 1px;
  background: rgba(255,255,255,0.18);
  margin: 20px 0;
}

.policy-toc {
  margin: 16px 0;
  padding: 14px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.10);
}

.policy-toc h2 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.policy-toc ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.policy-section { margin-top: 18px; }
.policy-section h2 { margin-bottom: 10px; }

.policy-bullets {
  margin: 10px 0 16px;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.policy-disclaimer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 2px solid rgba(255,255,255,0.18);
}

.back-to-top {
  margin-top: 14px;
  font-size: 0.95rem;
  opacity: 0.95;
}
.back-to-top a { text-decoration: none; }
.back-to-top a:hover { text-decoration: underline; }

/* =========================================================
   Maps page: BUTTON-STYLE links (no huge inline images)
   ========================================================= */

.map-button-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.map-button {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  text-decoration: none;
  color: inherit;
}

.map-button:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
}

.map-button__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 22px;
  flex: 0 0 44px;
}

.map-button__title {
  font-weight: 800;
  margin-bottom: 4px;
}

.map-button__desc {
  opacity: 0.95;
  max-width: 75ch;
}

.map-button__cta {
  margin-top: 8px;
  font-weight: 700;
  opacity: 0.95;
}

.map-button__small-links {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.14);
  border: 1px solid rgba(255,255,255,0.10);
  font-size: 0.95rem;
  display: grid;
  gap: 6px;
}

.map-button__small-links a {
  text-decoration: underline;
}

/* Two-column buttons on wide screens */
@media (min-width: 900px) {
  .map-button-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .map-button__small-links {
    grid-column: 1 / -1;
  }
}

/* =========================================================
   Old map grid styling (kept for backward compatibility)
   If you stop using inline maps everywhere, you can remove later.
   ========================================================= */

.tfc-map-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 14px;
}

@media (min-width: 1200px) {
  .tfc-map-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

.tfc-map-card {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-soft);
  box-shadow: 0 10px 26px rgba(0,0,0,0.22);
}

.tfc-map-link { display: block; width: 100%; outline: none; }
.tfc-map-link img { width: 100%; height: auto; display: block; border-radius: 12px; }

.tfc-caption {
  margin-top: 12px;
  font-size: 0.95rem;
  line-height: 1.35;
  opacity: 0.95;
}

/* =========================================================
   Subtle hover transitions + accessible focus
   ========================================================= */

a,
.sidebar nav a,
.email-btn,
.form button,
.nav-toggle,
.card,
.map-button {
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease,
    opacity 140ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover { box-shadow: 0 12px 30px rgba(0,0,0,0.22); }
  .sidebar nav a:hover,
  .email-btn:hover,
  .form button:hover,
  .nav-toggle:hover,
  .map-button:hover {
    transform: translateY(-1px);
  }
  a:hover { opacity: 0.92; }
}

:focus-visible {
  outline: 3px solid var(--accent-glow);
  outline-offset: 2px;
  border-radius: 10px;
}

/* =========================================================
   Responsive layout
   ========================================================= */

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

  .sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
  }

  .nav-toggle { display: inline-block; }

  .sidebar.collapsed nav ul,
  .sidebar.collapsed .auth-strip { display: none !important; }

  /* Hero: show full image on mobile */
  .site-header { min-height: 48vh; }
  .hero-bg { background-size: contain; background-position: center; }
  .hero-overlay--lower { padding-bottom: 6px; }
  .hero-tagline { font-size: clamp(15px, 4vw, 20px); }
}

/* =========================================================
   Print / Save as PDF (dark-mode-safe)
   ========================================================= */

.print-only { display: none; }
.screen-only { display: block; }

@media print {
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color-adjust: exact;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .sidebar,
  .nav-toggle,
  .auth-strip,
  .content-top,
  .site-footer,
  .screen-only {
    display: none !important;
  }

  .layout { display: block !important; }
  .content { width: 100% !important; }
  .container { max-width: 100% !important; padding: 0 !important; }

  .card {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .site-header,
  .hero-bg { display: none !important; }

  a { color: #000 !important; text-decoration: underline !important; }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 0.9em;
  }

  .print-only {
    display: block !important;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
  }

  .policy-toc {
    border: 1px solid #ddd !important;
    background: #f7f7f7 !important;
  }

  .policy-divider { background: #ddd !important; }
  .policy-disclaimer { border-top: 2px solid #ccc !important; }

  :focus-visible { outline: none !important; }
}

/* =========================================================
   Accessibility helper
   ========================================================= */

.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;
}