/*
Theme Name:   HikeATrail Child
Theme URI:    https://hikeatrail.com
Description:  HikeATrail.com child theme for Kadence. NPS 1960s-70s inspired palette.
Author:       Andrew / Our Good Nature Web Agency
Template:     kadence
Version:      1.1.0
Text Domain:  hikeatrail-child
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=DM+Sans:wght@300;400;500;700&display=swap');

/* ==========================================================================
   CSS CUSTOM PROPERTIES — NPS 1960s/70s BRAND TOKENS
   Inspired by: Smokey Bear, National Park Service signage, WPA poster era
   ========================================================================== */

:root {
  /* NPS Era Colors */
  --hat-forest:      #2C4A1E;   /* Ranger Green — NPS uniform */
  --hat-forest-mid:  #3D6B2C;   /* Pine Green — forest canopy */
  --hat-green:       #D4911A;   /* Smokey Gold — hat band, park signs */
  --hat-light-green: #E8EDD8;   /* Sage — sagebrush grey-green */
  --hat-amber:       #C4541A;   /* Campfire Orange — trail marker rust */
  --hat-stone:       #F5EFE0;   /* Parchment — old poster paper */
  --hat-ink:         #2C1810;   /* Bear Brown — deep warm brown */
  --hat-white:       #FDFAF4;   /* Cream — warm white */
  --hat-dark-footer: #1A2E0E;   /* Deep Ranger Green — footer */

  /* Typography */
  --hat-font-heading: 'Playfair Display', Georgia, serif;
  --hat-font-body:    'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --hat-radius:      8px;
  --hat-radius-lg:   12px;
  --hat-shadow:      0 2px 12px rgba(44,74,30,0.12);
  --hat-shadow-lg:   0 4px 24px rgba(44,74,30,0.18);

  /* Content widths */
  --hat-max-width:   1200px;
  --hat-content:     800px;
}

/* ==========================================================================
   BASE TYPOGRAPHY
   ========================================================================== */

body {
  font-family: var(--hat-font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--hat-ink);
  background-color: var(--hat-stone);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--hat-font-heading);
  line-height: 1.2;
  color: var(--hat-forest);
}

h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 900; }
h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 700; }
h3 { font-family: var(--hat-font-body); font-size: clamp(20px, 2.5vw, 22px); font-weight: 700; }
h4 { font-family: var(--hat-font-body); font-size: clamp(17px, 2vw, 18px); font-weight: 700; }

p { margin-bottom: 1.4em; }

a {
  color: var(--hat-forest-mid);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--hat-green); }

strong { font-weight: 700; }

blockquote {
  border-left: 4px solid var(--hat-amber);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--hat-white);
  border-radius: 0 var(--hat-radius) var(--hat-radius) 0;
  font-family: var(--hat-font-heading);
  font-style: italic;
  font-size: 1.15em;
  color: var(--hat-forest);
}

@media (max-width: 767px) {
  body { font-size: 16px; }
}

/* ==========================================================================
   MOBILE NAVIGATION FIX
   ========================================================================== */

@media (max-width: 1024px) {
  .site-header .kadence-header-nav-wrap,
  .site-header nav.main-navigation,
  .site-header .primary-navigation,
  .site-header-row-inner .navigation,
  .site-header-row-2-section-inner .navigation,
  .site-header-row-2-section-inner nav,
  header .main-navigation,
  header nav.navigation,
  #site-header nav,
  #site-header .navigation,
  #site-header .nav-wrap,
  #site-header [class*="nav-wrap"],
  #site-header [class*="primary-nav"],
  .header-navigation-wrap,
  .header-main-nav,
  .wp-block-navigation,
  .site-header-row-container:not(.kadence-header-row-offcanvas) nav,
  .site-header-wrap .header-row-inner nav {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .header-mobile-toggle-wrap,
  .kadence-mobile-trigger-wrap,
  .mobile-trigger,
  [class*="mobile-trigger"],
  [class*="hamburger"] {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .kadence-drawer,
  .kadence-header-off-canvas,
  .popup-drawer,
  [class*="off-canvas"],
  [class*="offcanvas"] {
    visibility: visible !important;
  }
}

/* ==========================================================================
   SITE HEADER
   ========================================================================== */

.site-header,
#site-header {
  background-color: var(--hat-forest) !important;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.home .site-header:not(.kadence-header-sticky) {
  background-color: transparent !important;
  position: absolute;
  width: 100%;
  box-shadow: none;
}
.home .site-header.kadence-header-sticky,
.home .site-header.fixed-scroll {
  background-color: rgba(44,74,30,0.97) !important;
  position: fixed;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.site-header .menu-item > a,
.site-header nav a {
  color: rgba(253,250,244,0.82) !important;
  font-family: var(--hat-font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 6px 4px;
  transition: color 0.2s ease;
}
.site-header .menu-item > a:hover,
.site-header nav a:hover,
.site-header .menu-item.current-menu-item > a {
  color: var(--hat-green) !important;
}

.mobile-trigger svg,
.kadence-mobile-trigger-wrap svg,
[class*="mobile-trigger"] svg {
  color: var(--hat-white) !important;
  fill: var(--hat-white) !important;
  width: 28px;
  height: 28px;
}

html { scroll-padding-top: 80px; }

/* ==========================================================================
   OFF CANVAS MOBILE MENU
   ========================================================================== */

.kadence-drawer,
.popup-drawer,
[class*="off-canvas"] {
  background-color: var(--hat-forest) !important;
}

.kadence-drawer .menu-item > a,
.popup-drawer .menu-item > a,
[class*="off-canvas"] .menu-item > a {
  color: rgba(253,250,244,0.85) !important;
  font-family: var(--hat-font-body);
  font-size: 16px;
  font-weight: 500;
  padding: 12px 20px;
  display: block;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color 0.2s, background 0.2s;
}

.kadence-drawer .menu-item > a:hover,
.popup-drawer .menu-item > a:hover {
  color: var(--hat-green) !important;
  background: rgba(212,145,26,0.1);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.wp-block-button__link,
.kb-btn,
.btn,
button.btn-primary,
a.btn-primary,
.hat-btn-primary {
  background-color: var(--hat-green) !important;
  color: var(--hat-forest) !important;
  font-family: var(--hat-font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: var(--hat-radius);
  border: 2px solid transparent;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  text-decoration: none;
  line-height: 1;
}
.wp-block-button__link:hover,
.kb-btn:hover,
.hat-btn-primary:hover {
  background-color: var(--hat-amber) !important;
  color: var(--hat-white) !important;
  transform: translateY(-1px);
}

.hat-btn-secondary,
a.hat-btn-secondary {
  background-color: transparent !important;
  color: var(--hat-forest-mid) !important;
  border: 2px solid var(--hat-green) !important;
  font-family: var(--hat-font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: var(--hat-radius);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.hat-btn-secondary:hover {
  background-color: var(--hat-green) !important;
  color: var(--hat-forest) !important;
}

.hat-btn-affiliate,
a.hat-btn-affiliate {
  background-color: #0D6EFD !important;
  color: #fff !important;
  font-family: var(--hat-font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: var(--hat-radius);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}
.hat-btn-affiliate:hover {
  background-color: #0b5ed7 !important;
  transform: translateY(-1px);
}

.hat-affiliate-disclosure {
  font-size: 12px;
  color: #6C757D;
  font-style: italic;
  margin-top: 6px;
  display: block;
}

/* ==========================================================================
   HERO SECTIONS
   ========================================================================== */

.hat-hero,
.hero-section,
.wp-block-cover.is-hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center center;
  overflow: hidden;
}

.hat-hero::before,
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(44,74,30,0.78) 0%,
    rgba(44,74,30,0.45) 60%,
    rgba(0,0,0,0.2) 100%
  );
  z-index: 1;
}

.hat-hero > *,
.hero-section > * {
  position: relative;
  z-index: 2;
}

.hat-hero h1 {
  color: var(--hat-white);
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hat-hero p {
  color: rgba(253,250,244,0.9);
  font-size: 1.15em;
}

.hat-trust-bar {
  background: var(--hat-forest);
  padding: 14px 24px;
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}
.hat-trust-bar span {
  color: rgba(253,250,244,0.75);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--hat-font-body);
  letter-spacing: 0.02em;
}

@media (max-width: 1024px) {
  .hat-hero, .hero-section { min-height: 450px; }
}
@media (max-width: 767px) {
  .hat-hero, .hero-section { min-height: 320px; }
  .hat-trust-bar { gap: 16px; }
  .hat-trust-bar span { font-size: 12px; }
}

/* ==========================================================================
   TRAIL REVIEW COMPONENTS
   ========================================================================== */

.hat-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--hat-font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}
.hat-tier-2 {
  background: var(--hat-light-green);
  color: var(--hat-forest);
  border: 1px solid rgba(44,74,30,0.2);
}
.hat-tier-1 {
  background: #FFF4E0;
  color: #7A4500;
  border: 1px solid rgba(196,84,26,0.3);
}

.hat-quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1px;
  background: rgba(44,74,30,0.12);
  border-radius: var(--hat-radius-lg);
  overflow: hidden;
  margin: 24px 0 32px;
  border: 1px solid rgba(44,74,30,0.12);
}
.hat-stat {
  background: var(--hat-white);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}
.hat-stat:hover { background: var(--hat-stone); }
.stat-val {
  font-family: var(--hat-font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--hat-forest);
  line-height: 1;
}
.stat-lbl {
  font-size: 11px;
  font-weight: 500;
  color: #6C757D;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hat-reality-check {
  background: #FFF4E0;
  border-left: 4px solid var(--hat-amber);
  border-radius: 0 var(--hat-radius-lg) var(--hat-radius-lg) 0;
  padding: 24px 28px;
  margin: 32px 0;
}
.hat-reality-check h2 {
  font-family: var(--hat-font-body);
  font-size: 16px;
  font-weight: 700;
  color: #7A4500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.hat-june-report {
  background: var(--hat-stone);
  border-radius: var(--hat-radius-lg);
  padding: 28px 32px;
  margin: 32px 0;
  border: 1px solid rgba(44,74,30,0.1);
}
.june-rating {
  display: inline-block;
  font-family: var(--hat-font-body);
  font-weight: 700;
  font-size: 14px;
  color: var(--hat-forest);
  background: var(--hat-light-green);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* ==========================================================================
   CONTENT LAYOUT — SIDEBAR
   ========================================================================== */

.hat-content-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  max-width: var(--hat-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.hat-sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hat-sidebar-box {
  background: var(--hat-white);
  border: 1px solid rgba(44,74,30,0.12);
  border-radius: var(--hat-radius-lg);
  padding: 22px 24px;
}

.hat-sidebar-box h4 {
  font-family: var(--hat-font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hat-forest-mid);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(44,74,30,0.1);
}

.hat-sidebar-alltrails {
  background: var(--hat-forest);
  border-radius: var(--hat-radius-lg);
  padding: 22px 24px;
  text-align: center;
}
.hat-sidebar-alltrails p {
  color: rgba(253,250,244,0.8);
  font-size: 13px;
  margin-bottom: 14px;
}

.hat-sidebar-email {
  background: var(--hat-light-green);
  border-radius: var(--hat-radius-lg);
  padding: 22px 24px;
  text-align: center;
  border: 1px solid rgba(44,74,30,0.2);
}

@media (max-width: 1024px) {
  .hat-content-wrap { grid-template-columns: 1fr; }
  .hat-sidebar { position: static; display: none; }
}

/* ==========================================================================
   ARCHIVE / CARD GRID
   ========================================================================== */

.hat-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--hat-max-width);
  margin: 32px auto;
  padding: 0 24px;
}

.hat-card {
  background: var(--hat-white);
  border-radius: var(--hat-radius-lg);
  overflow: hidden;
  border: 1px solid rgba(44,74,30,0.1);
  transition: box-shadow 0.25s, transform 0.25s;
}
.hat-card:hover {
  box-shadow: var(--hat-shadow-lg);
  transform: translateY(-3px);
}

.hat-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--hat-forest);
  margin-bottom: 8px;
  line-height: 1.3;
}
.hat-card h3 a { color: inherit; }
.hat-card h3 a:hover { color: var(--hat-green); }

.hat-card-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hat-forest-mid);
  background: var(--hat-light-green);
  padding: 3px 8px;
  border-radius: 4px;
}

@media (max-width: 1024px) { .hat-card-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 767px) { .hat-card-grid { grid-template-columns: 1fr; padding: 0 16px; } }

/* ==========================================================================
   HOMEPAGE SECTIONS
   ========================================================================== */

.hat-regions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}
.hat-region-card {
  background: var(--hat-white);
  border-radius: var(--hat-radius-lg);
  padding: 28px 24px;
  border: 1px solid rgba(44,74,30,0.1);
  transition: box-shadow 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}
.hat-region-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--hat-green);
}
.hat-region-card.featured::before { background: var(--hat-amber); }
.hat-region-card:hover {
  box-shadow: var(--hat-shadow-lg);
  transform: translateY(-3px);
}

.hat-section { padding: 64px 24px; max-width: var(--hat-max-width); margin: 0 auto; }
.hat-section-dark { background: var(--hat-forest); color: var(--hat-white); padding: 64px 24px; }
.hat-section-dark h2 { color: var(--hat-white); }
.hat-section-stone { background: var(--hat-stone); padding: 64px 24px; }

@media (max-width: 1024px) { .hat-regions { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 767px) {
  .hat-regions { grid-template-columns: 1fr; }
  .hat-section, .hat-section-dark, .hat-section-stone { padding: 40px 16px; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer,
#colophon {
  background-color: var(--hat-forest) !important;
  color: rgba(253,250,244,0.75);
}

.site-footer a { color: rgba(253,250,244,0.65); }
.site-footer a:hover { color: var(--hat-green); }

.site-footer h4,
.site-footer .widget-title {
  color: var(--hat-white);
  font-family: var(--hat-font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.site-footer .footer-bottom,
.site-footer .site-info {
  background-color: var(--hat-dark-footer) !important;
  color: rgba(253,250,244,0.35);
  font-size: 12px;
  padding: 14px 24px;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.hat-container {
  max-width: var(--hat-max-width);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 767px) { .hat-container { padding: 0 16px; } }

*, *::before, *::after { box-sizing: border-box; }
body, .site { overflow-x: hidden; max-width: 100vw; }
img, video, iframe { max-width: 100%; }

/* NPS-style comparison table */
.hat-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0 24px;
  border-radius: var(--hat-radius);
  overflow: hidden;
}
.hat-comparison-table thead { background: var(--hat-forest); color: var(--hat-white); }
.hat-comparison-table thead th { padding: 12px 16px; text-align: left; font-weight: 700; }
.hat-comparison-table tbody tr:nth-child(even) { background: var(--hat-stone); }
.hat-comparison-table tbody td { padding: 12px 16px; border-bottom: 1px solid rgba(44,74,30,0.08); }

/* Weather widget overrides for NPS palette */
.hat-wx-temp { color: var(--hat-forest); }
.wx-assess-good { background: var(--hat-light-green); color: var(--hat-forest); }
.wx-assess-caution { background: #FFF4E0; color: #7A4500; }
