/*
Theme Name: GetOutsideMD
Theme URI: https://www.getoutsidemd.com
Author: GetOutsideMD
Description: A custom WordPress theme encouraging exploration of Maryland's state, county, and local parks. Built for SEO, accessibility, and ease of editing via the WordPress Customizer.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: getoutsidemd
*/

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root {
  --color-forest-900: #102822;
  --color-forest-800: #1b3a2f;
  --color-forest-700: #234a3c;
  --color-amber-500: #e8a23d;
  --color-amber-600: #d18a26;
  --color-clay-500: #c2693a;
  --color-parchment: #f7f4ec;
  --color-parchment-dark: #ece6d6;
  --color-slate-600: #5b6660;
  --color-slate-900: #20251f;
  --color-white: #ffffff;

  --font-display: "Fjalla One", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-card: 0 8px 24px rgba(16, 40, 34, 0.12);
  --shadow-card-hover: 0 14px 32px rgba(16, 40, 34, 0.18);

  --container-max: 1180px;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-slate-900);
  background: var(--color-parchment);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  color: var(--color-forest-900);
  margin: 0 0 0.5em;
  line-height: 1.15;
}
p { margin: 0 0 1em; }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:focus-visible {
  outline: 3px solid var(--color-amber-500);
  outline-offset: 2px;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-forest-900);
  color: var(--color-white);
  padding: 12px 20px;
  z-index: 9999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   TOPO LINE SIGNATURE PATTERN
   ========================================================================== */
.topo-divider {
  width: 100%;
  height: 64px;
  display: block;
  color: var(--color-forest-800);
}
.topo-divider--flip { transform: scaleY(-1); }
.topo-bg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='1.5'%3E%3Cpath d='M0 100 Q 50 60 100 100 T 200 100'/%3E%3Cpath d='M0 130 Q 50 90 100 130 T 200 130'/%3E%3Cpath d='M0 160 Q 50 120 100 160 T 200 160'/%3E%3Cpath d='M0 70 Q 50 30 100 70 T 200 70'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 320px 320px;
}

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(247, 244, 236, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(16, 40, 34, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.site-branding { display: flex; align-items: center; gap: 10px; }
.site-branding .logo-mark {
  width: 38px; height: 38px;
  flex-shrink: 0;
}
.site-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-forest-900);
  letter-spacing: 0.02em;
}
.site-title .accent { color: var(--color-clay-500); }

.primary-nav { display: none; }
@media (min-width: 880px) {
  .primary-nav { display: block; }
}
.primary-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-forest-800);
  position: relative;
  padding: 6px 2px;
  transition: color 0.2s ease;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 3px;
  background: var(--color-amber-500);
  border-radius: 2px;
  transition: width 0.25s ease;
}
.primary-nav a:hover::after,
.primary-nav a.is-active::after { width: 100%; }
.primary-nav a.is-active { color: var(--color-clay-500); }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: var(--color-forest-800);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-sm);
}
@media (min-width: 880px) { .menu-toggle { display: none; } }

.mobile-nav {
  display: none;
  background: var(--color-parchment);
  border-bottom: 1px solid rgba(16,40,34,0.08);
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 8px 24px 20px; }
.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-weight: 600;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(16,40,34,0.06);
  color: var(--color-forest-800);
}
.mobile-nav a.is-active { color: var(--color-clay-500); }
@media (min-width: 880px) { .mobile-nav { display: none !important; } }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-amber-500);
  color: var(--color-forest-900);
  box-shadow: 0 6px 18px rgba(232, 162, 61, 0.45);
}
.btn-primary:hover { background: var(--color-amber-600); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--color-forest-800);
  color: var(--color-forest-800);
}
.btn-outline:hover { background: var(--color-forest-800); color: var(--color-white); }
.btn-pulse { animation: gentlePulse 2.6s ease-in-out infinite; }
@keyframes gentlePulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(232, 162, 61, 0.45); }
  50% { box-shadow: 0 6px 28px rgba(232, 162, 61, 0.75); }
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 84vh;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(16,40,34,0.78), rgba(16,40,34,0.55)), var(--hero-image, linear-gradient(135deg, #1b3a2f, #234a3c));
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1.5'%3E%3Cpath d='M0 120 Q 60 70 120 120 T 240 120'/%3E%3Cpath d='M0 160 Q 60 110 120 160 T 240 160'/%3E%3Cpath d='M0 80 Q 60 30 120 80 T 240 80'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 420px 420px;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; max-width: 720px; padding: 80px 24px; }
.hero-eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-amber-500);
  margin-bottom: 16px;
}
.hero h1 {
  color: var(--color-white);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  margin-bottom: 18px;
}
.hero p.lede {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.88);
  max-width: 560px;
  margin-bottom: 32px;
}

/* ==========================================================================
   ADVENTURE ROULETTE (signature element)
   ========================================================================== */
.roulette-section { padding: 88px 0; background: var(--color-forest-800); position: relative; color: var(--color-white); }
.roulette-card {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
}
.roulette-card h2 { color: var(--color-white); }
.roulette-card .sub { color: rgba(255,255,255,0.75); margin-bottom: 28px; }
.blaze-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 18px 26px;
  background: var(--color-parchment);
  color: var(--color-forest-900);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1.05rem;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 86%, 92% 100%, 0 100%);
  min-height: 64px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.blaze-badge.is-visible { opacity: 1; transform: translateY(0); }
.blaze-badge .category-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--color-clay-500);
  color: var(--color-white);
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ==========================================================================
   SECTIONS / CARDS
   ========================================================================== */
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-header { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-header h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-header p { color: var(--color-slate-600); font-size: 1.05rem; }
.bg-alt { background: var(--color-parchment-dark); }

.card-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.category-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }
.category-card .media {
  height: 190px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.category-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.category-card:hover .media img { transform: scale(1.08); }
.category-card .body { padding: 22px; }
.category-card h3 { font-size: 1.25rem; }
.category-card p { color: var(--color-slate-600); font-size: 0.95rem; margin-bottom: 0; }

/* ==========================================================================
   FIND A PARK PAGE
   ========================================================================== */
.search-bar-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
}
.search-input-group { flex: 1 1 320px; position: relative; }
.search-input-group input[type="search"] {
  width: 100%;
  padding: 14px 18px 14px 44px;
  border-radius: 999px;
  border: 2px solid var(--color-parchment-dark);
  font-size: 1rem;
  background: var(--color-white);
}
.search-input-group input:focus { border-color: var(--color-amber-500); outline: none; }
.search-input-group .icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--color-slate-600);
}
.filter-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-pill {
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--color-forest-800);
  background: transparent;
  color: var(--color-forest-800);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.filter-pill.is-active, .filter-pill:hover {
  background: var(--color-forest-800);
  color: var(--color-white);
}

.mock-map {
  position: relative;
  height: 340px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  background:
    linear-gradient(135deg, #cfe3d4, #e7ecd9);
  box-shadow: var(--shadow-card);
}
.mock-map::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(27,58,47,0.06) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(27,58,47,0.06) 0 1px, transparent 1px 40px);
}
.map-pin {
  position: absolute;
  width: 30px; height: 30px;
  background: var(--color-clay-500);
  border: 3px solid var(--color-white);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.map-pin:hover, .map-pin:focus { background: var(--color-forest-800); transform: rotate(-45deg) scale(1.15); }
.map-pin .pin-label {
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  background: var(--color-forest-900);
  color: var(--color-white);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.map-pin:hover .pin-label, .map-pin:focus .pin-label { opacity: 1; }

.park-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.park-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--color-white);
}
.badge-state { background: var(--color-forest-800); }
.badge-county { background: var(--color-clay-500); }
.badge-local { background: var(--color-amber-600); }
.park-card h3 { font-size: 1.2rem; margin-bottom: 0; }
.park-card .address { color: var(--color-slate-600); font-size: 0.92rem; display: flex; gap: 6px; align-items: flex-start; }
.park-card .directions-btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--color-forest-800);
  border: 2px solid var(--color-parchment-dark);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.park-card .directions-btn:hover {
  background: var(--color-forest-800);
  color: var(--color-white);
  border-color: var(--color-forest-800);
}
.no-results { text-align: center; padding: 60px 20px; color: var(--color-slate-600); }

/* ==========================================================================
   FORMS (Share Your Adventure / Contact)
   ========================================================================== */
.form-shell {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px;
}
.form-row { margin-bottom: 22px; }
.form-row label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 8px;
  color: var(--color-forest-900);
}
.form-row .required-mark { color: var(--color-clay-500); }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--color-parchment-dark);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background: var(--color-parchment);
  transition: border-color 0.2s ease;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--color-amber-500);
  outline: none;
  background: var(--color-white);
}
.form-row textarea { resize: vertical; min-height: 130px; }
.field-error {
  color: #a4322a;
  font-size: 0.85rem;
  margin-top: 6px;
  display: none;
}
.form-row.has-error input, .form-row.has-error select, .form-row.has-error textarea {
  border-color: #a4322a;
}
.form-row.has-error .field-error { display: block; }

.dropzone {
  border: 2px dashed var(--color-forest-700);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  color: var(--color-slate-600);
  background: var(--color-parchment);
  transition: background 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}
.dropzone.is-dragover { background: var(--color-parchment-dark); border-color: var(--color-amber-500); }
.dropzone .dz-icon { margin: 0 auto 10px; color: var(--color-forest-700); }
.dropzone input[type="file"] { display: none; }
.dz-progress {
  margin-top: 16px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-parchment-dark);
  overflow: hidden;
  display: none;
}
.dz-progress.is-active { display: block; }
.dz-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--color-amber-500);
  transition: width 0.25s ease;
}
.dz-preview { margin-top: 18px; display: none; align-items: center; gap: 14px; }
.dz-preview.is-visible { display: flex; }
.dz-preview img {
  width: 76px; height: 76px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.dz-preview .file-name { font-weight: 600; font-size: 0.9rem; color: var(--color-forest-900); }
.dz-remove {
  background: none; border: none; color: var(--color-clay-500);
  font-weight: 700; font-size: 0.85rem; padding: 0; text-decoration: underline;
}

.split-layout {
  display: grid;
  gap: 48px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .split-layout { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
}
.split-text h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.split-text p { color: var(--color-slate-600); font-size: 1.05rem; }

/* ==========================================================================
   MODAL / TOAST
   ========================================================================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(16,40,34,0.6);
  display: none;
  align-items: center; justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.modal-overlay.is-open { display: flex; }
.modal-box {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  max-width: 440px;
  text-align: center;
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
  box-shadow: var(--shadow-card-hover);
}
.modal-overlay.is-open .modal-box { transform: scale(1); opacity: 1; }
.modal-box .modal-icon { font-size: 2.6rem; margin-bottom: 12px; }
.modal-box h3 { margin-bottom: 10px; }
.modal-box p { color: var(--color-slate-600); margin-bottom: 0; }

.spinner {
  width: 18px; height: 18px;
  border: 3px solid rgba(16,40,34,0.25);
  border-top-color: var(--color-forest-900);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--color-forest-900);
  color: rgba(255,255,255,0.82);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1.3fr 1fr 1fr;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: var(--color-white); font-size: 1rem; margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--color-amber-500); }
.footer-tagline { color: rgba(255,255,255,0.6); font-size: 0.92rem; max-width: 320px; }
.social-row { display: flex; gap: 12px; margin-top: 16px; }
.social-row a {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.social-row a:hover { background: var(--color-amber-500); border-color: var(--color-amber-500); color: var(--color-forest-900); }
.newsletter-form { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  flex: 1 1 160px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  color: var(--color-white);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-form button {
  background: var(--color-amber-500);
  color: var(--color-forest-900);
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 40px;
  padding-top: 24px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  text-align: center;
}

/* Utility */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
