/* --- Variables --- */
:root {
  --color-bg: #faf8f5;
  --color-bg-card: #fff;
  --color-text: #2c2a28;
  --color-text-muted: #5c5854;
  --color-accent: #8b6914;
  --color-accent-soft: #e8dfc4;
  --color-link: #1a5fb4;
  --color-border: #e0dcd4;
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(44, 42, 40, 0.06);
  --shadow-hover: 0 6px 24px rgba(44, 42, 40, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Header --- */
.site-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-card);
}

.site-header nav {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding-left: 20px;
  padding-right: 20px;
}

.site-header a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.site-header a:hover {
  color: var(--color-accent);
}

/* --- Header dropdown for sub-pages --- */
.nav-dropdown {
  position: relative;
}

.nav-dropbtn {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-dropbtn::after {
  content: "▾";
  font-size: 0.7rem;
}

.nav-dropdown-menu {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 0;
  min-width: 220px;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--color-border);
  padding: 0.4rem 0;
  display: none;
  z-index: 100;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.nav-dropdown-menu a:hover {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

/* --- Main --- */
main {
  flex: 1;
}

/* --- Hero module: half-width photo left, content right --- */
.hero-module {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 280px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-photo {
  position: relative;
  background: var(--color-accent-soft);
  min-height: 280px;
  overflow: hidden;
}

.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hero-photo-credit {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  margin: 0;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.hero-photo-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-photo-credit--start {
  left: 0.5rem;
  right: auto;
}

.hero-content {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 1rem;
  color: var(--color-text);
}

.hero-content .lead {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin: 0;
}

@media (max-width: 720px) {
  .hero-module {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero-photo {
    min-height: 200px;
  }
  .hero-content {
    padding: 1.5rem 1.5rem 2rem;
  }
}

/* --- Tabs --- */
.tabs-section {
  max-width: 1200px;
  margin: 80px auto 0;
  padding: 0 1.5rem 3rem;
}

.tabs-wrap {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  padding: 0 0.5rem 0 0;
}

.tab-btn {
  flex: 1;
  min-width: 0;
  padding: 0.9rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tab-btn:hover {
  color: var(--color-text);
}

.tab-btn.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.tab-panel {
  padding: 1.75rem 2rem 2rem;
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-panel h2 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--color-text);
}

.tab-panel h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--color-text);
}

.tab-panel p,
.tab-panel ul {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}

.tab-panel ul {
  padding-left: 1.25rem;
}

.tab-panel li {
  margin-bottom: 0.35rem;
}

.tab-panel a {
  color: var(--color-link);
  text-decoration: none;
}

.tab-panel a:hover {
  text-decoration: underline;
}

.tab-cta {
  margin-top: 1.25rem;
  display: inline-block;
}

@media (max-width: 720px) {
  .tabs-section {
    margin-top: 56px;
    padding: 0 1rem 2.5rem;
  }

  .tab-list {
    flex-direction: column;
    border-bottom: none;
    padding: 0;
  }

  .tab-btn {
    width: 100%;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    border-left: 3px solid transparent;
    padding: 0.95rem 1rem;
    line-height: 1.35;
  }

  .tab-btn.active {
    border-bottom-color: var(--color-border);
    border-left-color: var(--color-accent);
    background: var(--color-accent-soft);
  }

  .tab-panel {
    padding: 1.25rem 1rem 1.5rem;
  }
}

/* --- Page form section (bottom) --- */
.page-form-section {
  max-width: 520px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  border-top: 1px solid var(--color-border);
  scroll-margin-top: 1rem;
}

.page-form-section h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 0.35rem;
  color: var(--color-text);
}

.form-intro {
  color: var(--color-text-muted);
  margin: 0 0 1.5rem;
  font-size: 1rem;
}

.footer-note {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin: 0;
}

.footer-note a {
  color: var(--color-link);
  text-decoration: underline;
}

.footer-note a:hover {
  text-decoration: none;
}

/* --- Page (resources, organizations, contact, media) --- */
.page {
  flex: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.page .subtitle {
  color: var(--color-text-muted);
  margin: 0 0 2rem;
}

/* After successful gform submit (homepage, contact, media, modals) */
.thankyou_message h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 400;
  margin: 0 0 0.5rem;
  color: var(--color-text);
}

.thankyou_message .subtitle {
  color: var(--color-text-muted);
  margin: 0;
  font-size: 1rem;
}

.page h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--color-text);
}

.page ul {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
}

.page li {
  margin-bottom: 0.5rem;
}

.page a {
  color: var(--color-link);
  text-decoration: none;
}

.page a:hover {
  text-decoration: underline;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-card);
  color: var(--color-text);
}

.form-group select {
  cursor: pointer;
  appearance: auto;
}

.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.form-actions {
  margin-top: 1.5rem;
}

.btn,
.btn:link,
.btn:visited {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-bg-card);
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.btn:hover {
  background: #6d5210;
  text-decoration: none;
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.form-note {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

/* --- Callout on survivor page --- */
.callout {
  margin: 2.5rem 0 2rem;
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-accent-soft);
  background: #fdf9ef;
  box-shadow: var(--shadow);
}

.callout p {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}

.callout-btn {
  white-space: normal;
}

/* --- Modal --- */
.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: relative;
  max-width: 520px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  padding: 1.75rem 1.5rem 1.75rem;
}

.modal h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.modal-intro {
  margin: 0 0 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--color-text-muted);
}

.modal-close:hover {
  color: var(--color-text);
}

/* --- Footer --- */
.site-footer {
  padding: 1.5rem 1.5rem 2rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-card);
}

.site-footer p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.site-footer em {
  font-style: italic;
}

/* Honeypot (spam bots); keep out of sight */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
