/*
 Theme Name:   Trail Almanac
 Template:     twentytwentyfive
*/

/** GLOBAL **/
.rank-math-breadcrumb {
    font-size: 21px;
    font-weight: 600;
    color: #608980;
}
a, a:hover {
    text-decoration: none!important;
}

/* Menus */
.wp-block-navigation__container {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.wp-block-navigation > .wp-block-navigation-item > a:hover {
    background: #3b6b3b;
    border-radius: 99px;
    color: var(--ta-snow);
}

.wp-block-navigation .wp-block-navigation-item > a {
    padding: 2px 8px 1px;
}

.wp-block-navigation__submenu-container li {
    color: #5f5f5f;
    font-size: 0.85rem;
    padding: 0!important;
    margin: 0;
}

.wp-block-navigation__submenu-container li:hover {
    background-color: var(--ta-stone);
}

.wp-block-navigation__submenu-container {
    background: var(--ta-snow);
    border: 1px solid var(--ta-stone);
    border-radius: var(--ta-radius-lg);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--ta-shadow);
    margin-bottom: 1.25rem;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item {
    background: transparent;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item:first-of-type {
    margin-top: 11px;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item:last-of-type {
    margin-bottom: 11px;
}

/* ═══════════════════════════════════════════════════════
   DESIGN TOKENS — derived from logo
   Forest #285A38 · Teal #3A9E8A · Light teal #5DBFB2 · Trail amber #F0AD76
   ═══════════════════════════════════════════════════════ */
:root {
  --ta-forest:      #285A38;
  --ta-forest-dark: #1a3d26;
  --ta-teal:        #3A9E8A;
  --ta-teal-light:  #5DBFB2;
  --ta-trail:       #F0AD76;
  --ta-trail-dark:  #c8833d;

  --ta-ink:         #1c1c18;
  --ta-parchment:   #f4efe6;
  --ta-stone:       #e4ddd2;
  --ta-stone-dark:  #cec7bb;
  --ta-slate:       #556268;
  --ta-slate-lt:    #8a969c;
  --ta-snow:        #ffffff;

  --ta-radius-sm:   5px;
  --ta-radius-md:   11px;
  --ta-radius-lg:   18px;
  --ta-shadow:      0 2px 14px rgba(28,28,24,.08);
  --ta-shadow-lg:   0 6px 32px rgba(28,28,24,.14);

  --badge-green-bg:   #d2eedb; --badge-green-fg:   #1a4f26;
  --badge-amber-bg:   #fdebd0; --badge-amber-fg:   #7a3800;
  --badge-red-bg:     #fcd8d8; --badge-red-fg:     #7a1212;
  --badge-blue-bg:    #d8eeff; --badge-blue-fg:    #163d6e;
  --badge-purple-bg:  #ebe5f8; --badge-purple-fg:  #42197a;
  --badge-teal-bg:    #d0eeea; --badge-teal-fg:    #185048;
  --badge-grey-bg:    #e6e6e0; --badge-grey-fg:    #4e4e48;
  --badge-moss-bg:    #d6ecdc; --badge-moss-fg:    #224428;
}


/* ═══════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════ */
.ta-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  white-space: nowrap;
  line-height: 1.4;
}
.ta-badge--green  { background: var(--badge-green-bg);  color: var(--badge-green-fg);  }
.ta-badge--amber  { background: var(--badge-amber-bg);  color: var(--badge-amber-fg);  }
.ta-badge--red    { background: var(--badge-red-bg);    color: var(--badge-red-fg);    }
.ta-badge--blue   { background: var(--badge-blue-bg);   color: var(--badge-blue-fg);   }
.ta-badge--purple { background: var(--badge-purple-bg); color: var(--badge-purple-fg); }
.ta-badge--teal   { background: var(--badge-teal-bg);   color: var(--badge-teal-fg);   }
.ta-badge--grey   { background: var(--badge-grey-bg);   color: var(--badge-grey-fg);   }
.ta-badge--gold   { background: #fef2cc; color: #7a5200; }
.ta-badge--moss   { background: var(--badge-moss-bg);   color: var(--badge-moss-fg);   }


/* ═══════════════════════════════════════════════════════
   HERO SECTION
   Legible on any featured image via bottom-weighted gradient
   + text-shadow + frosted glass stat strip.
   ═══════════════════════════════════════════════════════ */
.hero-section {
  min-height: 50vh !important;
}

.hero-section .wp-block-cover__background {
  background: linear-gradient(
    to bottom,
    rgba(20, 35, 22, 0.18) 0%,
    rgba(20, 35, 22, 0.28) 40%,
    rgba(20, 35, 22, 0.80) 100%
  ) !important;
  opacity: 1 !important;
}

.hero-section .wp-block-cover__inner-container {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  align-items: flex-start !important;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 5vw, 4rem) clamp(1.75rem, 4vw, 3rem) !important;
  min-height: 50vh !important;
  gap: 0.65rem;
}

/* ── Chips row ── */
.hero-chips-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.4rem !important;
}

.hero-chips-row .pods-field,
.hero-chips-row .pods-field span,
.hero-chips-row .ta-badge {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
  padding: 0.24rem 0.62rem !important;
  border-radius: 99px !important;
  border: 1.5px solid rgba(255,255,255,0.48) !important;
  color: rgba(255,255,255,0.95) !important;
  background: rgba(0,0,0,0.28) !important;
  backdrop-filter: blur(4px) !important;
  text-shadow: none !important;
  line-height: 1.4 !important;
}

.hero-chips-row .ta-badge--green,
.hero-chips-row .pods-field-trail_status .ta-badge--green {
  background: rgba(28, 80, 46, 0.72) !important;
  border-color: rgba(93, 191, 178, 0.55) !important;
  color: #ccf5ee !important;
}

.taxonomy-scenery_tag a {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.24rem 0.62rem;
  border-radius: 99px;
  border: 1.5px solid rgba(255,255,255,0.38);
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(4px);
  text-decoration: none;
  line-height: 1.4;
  display: inline-block;
}
.trail-card .taxonomy-scenery_tag a {
    font-size: 0.6rem;
}
.trails-region-container a {
    background-color: #608a80cc;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 0.24rem 0.62rem;
    border-radius: 99px;
    border: 1.5px solid rgb(255 255 255 / 42%);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    text-decoration: none;
    line-height: 1.4;
    display: inline-block;
}
.taxonomy-scenery_tag a:hover {
  border-color: #3B6B3B !important;
  color: #3B6B3B !important;
}

.hero-chips-row p > span {
    transform: translateY(-5px);
}

/* ── Title ── */
.hero-title,
.hero-section h1 {
  font-size: clamp(2.8rem, 6.5vw, 5.2rem) !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  line-height: 1.0 !important;
  letter-spacing: -0.025em !important;
  text-shadow: 0 2px 14px rgba(0,0,0,0.55), 0 1px 3px rgba(0,0,0,0.4) !important;
  margin: 0 !important;
}

/* ── Meta row ── */
.hero-meta-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.3rem 0.8rem !important;
}
.hero-meta-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.28rem !important;
}
.hero-meta-icon {
  font-size: 0.78rem !important;
  line-height: 1 !important;
  margin: 0 !important;
}
.hero-meta-row .wp-block-post-terms a,
.hero-meta-row .wp-block-post-terms,
.hero-meta-row .pods-field,
.hero-meta-item p {
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  color: rgba(255,255,255,0.8) !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.65) !important;
  text-decoration: none !important;
  margin: 0 !important;
}

/* ── Stats strip ── */
.hero-stats-strip {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1px !important;
  background: rgba(255,255,255,0.12) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  border-radius: var(--ta-radius-md) !important;
  overflow: hidden !important;
  backdrop-filter: blur(12px) !important;
  margin-top: 0.4rem;
  color: #fff;
}

.hero-stat {
  background: rgba(14, 26, 16, 0.55) !important;
  padding: 0.82rem 1.05rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.18rem !important;
  min-width: 95px;
}
.hero-stat + .hero-stat {
  border-left: 1px solid rgba(255,255,255,0.1);
}
.hero-stats-strip .hero-stat-label + .is-layout-flex {
    gap: 0.4rem!important;
}
.hero-stat {
    gap: 0.8rem!important;
}
.hero-stat-unit {
    transform: translateY(-4px);
}

.hero-stat-label,
.hero-stat p.hero-stat-label {
  font-size: 0.59rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: rgba(255,255,255,0.52) !important;
  text-shadow: none !important;
  margin: 0 !important;
  line-height: 1 !important;
}

.hero-stat .pods-field,
.hero-stat .wp-block-group .pods-field {
  font-size: 1.52rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.35) !important;
  line-height: 1 !important;
}

/* Grade/route output badges in the hero */
.hero-stat .ta-badge {
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  background: rgba(255,255,255,0.14) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.28) !important;
  text-shadow: none !important;
  padding: 0.18rem 0.5rem !important;
}

.hero-stat-unit {
  font-size: 0.75rem !important;
  color: rgba(255,255,255,0.55) !important;
  text-shadow: none !important;
  margin: 0 0 0 0.12rem !important;
  align-self: flex-end !important;
  padding-bottom: 0.12rem !important;
  line-height: 1 !important;
}


/* ═══════════════════════════════════════════════════════
   SECTION ANCHOR NAV
   ═══════════════════════════════════════════════════════ */
.section-nav {
  background: var(--ta-snow);
  border-bottom: 2px solid var(--ta-stone);
  padding: 0 clamp(1rem, 5vw, 3rem);
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(28,28,24,.05);
  display: flex;
  justify-content: space-between;
  margin-block-start: 0;
}
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a {
  display: block;
  padding: 0.88rem 1rem;
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ta-slate);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.16s, border-color 0.16s;
}
.section-nav a:hover {
  color: var(--ta-forest);
  border-bottom-color: var(--ta-teal);
}


/* ═══════════════════════════════════════════════════════
   PAGE LAYOUT
   ═══════════════════════════════════════════════════════ */
.trail-page-columns {
  align-items: start !important;
  gap: 2.5rem !important;
  padding-top: 2rem;
}
.trail-side-col {
  position: sticky;
  top: 3.8rem;
  align-self: start;
}
.section-anchor {
  display: block;
  height: 0;
  visibility: hidden;
  position: relative;
  top: -4.5rem;
}

.margin-top-0 {
    margin-top: 0!important;
}
.border-bottom-0 {
    border-bottom: none!important;
}
.align-flexstart {
  align-items: flex-start!important;
}


/* ═══════════════════════════════════════════════════════
   PODS DETAIL CONTAINERS
   ═══════════════════════════════════════════════════════ */
.pods-details-list-container {
  background: var(--ta-snow);
  border: 1px solid var(--ta-stone);
  border-radius: var(--ta-radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--ta-shadow);
  margin-bottom: 1.25rem;
}
.pods-details-list-container h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ta-ink);
  margin-bottom: 1rem;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid var(--ta-stone);
}

#related-trails h2 {
  font-weight:    600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ta-ink);
  margin-bottom: 1rem;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid var(--ta-stone);
}

.pods-details-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--ta-stone);
  border-radius: var(--ta-radius-md);
}

.pods-details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.56rem 0.88rem;
  border-bottom: 1px solid var(--ta-stone);
  gap: 0.5rem;
  position: relative;
  transition: background 0.1s;
}
.pods-details-row:hover { background: #f8f3ec; }
.pods-details-row:nth-child(odd) { border-right: 1px solid var(--ta-stone); }
.pods-details-row:not(.pods-note):nth-last-of-type(1),
.pods-details-row:not(.pods-note):nth-last-of-type(2) { border-bottom: none; }

.pods-details-row-heading {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ta-slate);
  flex-shrink: 0;
}
.pods-details-row-detail {
  font-size: 0.82rem;
  font-weight: 500;
  text-align: right;
  color: var(--ta-ink);
}

.pods-details-list.single-col { grid-template-columns: 1fr; }
.pods-details-list.single-col .pods-details-row { border-right: none; }

/* ── Note rows ── */
.pods-details-row.pods-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 0.48rem;
  padding: 0.4rem 0.88rem 0.48rem;
  background: #fdf7eb;
  border-top: 1px dashed #e6d0a0;
  border-right: none !important;
  border-bottom: 1px solid var(--ta-stone);
  font-size: 0.76rem;
  line-height: 1.55;
}
.pods-details-row.pods-note:last-child { border-bottom: none; }
.pods-details-row.pods-note:hover { background: #fdf7eb; }

.pods-details-row.pods-note .pods-details-row-heading {
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ta-trail-dark);
  white-space: nowrap;
  flex-shrink: 0;
  background: none;
  padding: 0;
}
.pods-details-row.pods-note .pods-details-row-detail {
  color: var(--ta-slate);
  font-weight: 400;
  font-size: 0.76rem;
  text-align: left;
}
.pods-details-list:not(:last-of-type) {
    margin-bottom: 1rem;
}

.pods-taxonomy-row-heading {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ta-slate);
    flex-shrink: 0;
}

.pods-taxonomy-row-detail span {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 0.24rem 0.62rem;
    border-radius: 99px;
    border: 1.5px solid rgba(255, 255, 255, 0.38);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    text-decoration: none;
    line-height: 1.4;
    display: inline-block;
}

.pods-taxonomy-row-detail {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ta-ink);
    display: flex;
    width: 100%;
    justify-content: space-evenly;
}

.pods-taxonomy-section {
    border: 1px solid var(--ta-stone);
    border-radius: var(--ta-radius-md);
}

.pods-taxonomy-row {
    display: flex;
    align-items: center;
    gap: 0.48rem;
    padding: 0.56rem 0.88rem;
}
.pods-note[data-note=""] { display: none; }

/* ── Tooltips ── */
.pods-details-row[data-tooltip]:not([data-tooltip=""]) { cursor: help; }
.pods-details-row[data-tooltip]:not([data-tooltip=""])::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px); left: 0;
  background: var(--ta-ink); color: #fff;
  font-size: 0.68rem; font-weight: 400; line-height: 1.5;
  padding: 0.36rem 0.6rem; border-radius: 5px;
  width: max-content; max-width: 220px; white-space: normal;
  opacity: 0; pointer-events: none;
  transition: opacity 0.13s ease; z-index: 200;
}
.pods-details-row[data-tooltip]:not([data-tooltip=""])::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px); left: 13px;
  border: 4px solid transparent;
  border-top-color: var(--ta-ink);
  opacity: 0; pointer-events: none;
  transition: opacity 0.13s ease; z-index: 200;
}
.pods-details-row[data-tooltip]:not([data-tooltip=""]):hover::after,
.pods-details-row[data-tooltip]:not([data-tooltip=""]):hover::before { opacity: 1; }

.pods-note-possible:not([data-note=""])::after {
  content: '*';
  font-size: 0.68em; vertical-align: super;
  color: var(--ta-teal); margin-left: 2px;
}
/* Rich popover */
.rich-popover {
    position: absolute;
    z-index: 300;
    background: var(--ta-ink);
    color: #fff;
    border-radius: var(--ta-radius-md);
    padding: 0.75rem 0.9rem;
    min-width: 220px;
    max-width: 300px;
    font-size: 0.72rem;
    line-height: 1.5;
    box-shadow: var(--ta-shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}
.rich-popover.is-visible {
    opacity: 1;
}

.popover-heading {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin-bottom: 0.5rem;
}

.popover-table {
    width: 100%;
    border-collapse: collapse;
}
.popover-table tr + tr td {
    border-top: 1px solid rgba(255,255,255,0.1);
}
.popover-table td {
    padding: 0.28rem 0;
    vertical-align: top;
}
.popover-key {
    font-weight: 700;
    color: var(--ta-teal-light);
    padding-right: 0.6rem!important;
    white-space: nowrap;
    width: 2rem;
}

/* Arrow — flips when popover is below trigger */
.rich-popover::after {
    content: '';
    position: absolute;
    left: 16px;
    bottom: -7px;
    border: 5px solid transparent;
    border-top-color: var(--ta-ink);
}
.rich-popover.flipped::after {
    bottom: auto;
    top: -7px;
    border-top-color: transparent;
    border-bottom-color: var(--ta-ink);
}


/* ═══════════════════════════════════════════════════════
   SAFETY SCORE BANNER
   ═══════════════════════════════════════════════════════ */
.safety-score-banner {
  background: linear-gradient(135deg, var(--ta-forest-dark) 0%, var(--ta-forest) 100%);
  border-radius: var(--ta-radius-md);
  padding: 1rem 1.2rem;
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.2rem; color: white;
}
.safety-score-ring {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.16);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.safety-score-ring-val { font-size: 1.05rem; font-weight: 700; line-height: 1; }
.safety-score-ring-sub { font-size: 0.48rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
.safety-score-label { font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.68; }
.safety-score-val   { font-size: 0.96rem; font-weight: 600; }


/* ═══════════════════════════════════════════════════════
   BUDGET TIERS
   ═══════════════════════════════════════════════════════ */
.budget-tiers {
  display: grid; 
  grid-template-columns: repeat(3,1fr);
  gap: 0.7rem; margin-bottom: 1.2rem;
}
.budget-tier {
  border: 1px solid var(--ta-stone);
  border-radius: var(--ta-radius-md);
  padding: 0.82rem 0.88rem; text-align: center;
  position: relative; transition: border-color 0.16s, box-shadow 0.16s;
}
.budget-tier:hover { border-color: var(--ta-teal); box-shadow: 0 0 0 3px rgba(58,158,138,0.1); }
.budget-tier.featured { border-color: var(--ta-teal); background: #f0faf8; }
.budget-tier.featured::after {
  content: 'avg joe';
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  background: var(--ta-teal); color: white;
  font-size: 0.55rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
  padding: 0.1rem 0.4rem; border-radius: 99px;
}
.budget-tier-label { font-size: 0.61rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ta-slate); margin-bottom: 0.26rem; font-weight: 600; }
.budget-tier-price { font-size: 1.65rem; font-weight: 700; color: var(--ta-ink); line-height: 1; }
.budget-tier-price sup { font-size: 0.76rem; font-weight: 400; color: var(--ta-slate); }
.budget-tier-per { font-size: 0.61rem; color: var(--ta-slate-lt); margin-top: 0.1rem; }


/* ═══════════════════════════════════════════════════════
   SEASON BAR
   ═══════════════════════════════════════════════════════ */
.season-months { display: grid; grid-template-columns: repeat(12,1fr); gap: 3px; margin-bottom: 0.58rem; width: 100%; }
.month-bar { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.month-bar-fill { height: 22px; width: 100%; border-radius: 3px; }
.month-bar-fill.peak     { background: var(--ta-teal); }
.month-bar-fill.shoulder { background: #f5d8a0; }
.month-bar-fill.closed   { background: var(--ta-stone); }
.month-label { font-size: 0.67rem; font-weight: 600; color: var(--ta-slate-lt); }
.season-legend { display: flex; gap: 1rem; }
.legend-item { display: flex; align-items: center; gap: 0.3rem; font-size: 0.68rem; color: var(--ta-slate); }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; }
.season-note {
  margin-top: 0.82rem; padding: 0.62rem 0.82rem;
  background: #fdf7eb; border: 1px solid #e6d0a0;
  border-radius: var(--ta-radius-sm);
  font-size: 0.76rem; color: var(--ta-slate); line-height: 1.55;
}
.season-note strong { color: var(--ta-trail-dark); }


/* ═══════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════ */
.side-card {
  background: var(--ta-snow); border: 1px solid var(--ta-stone);
  border-radius: var(--ta-radius-lg); overflow: hidden;
  box-shadow: var(--ta-shadow); margin-bottom: 1rem;
}
.side-card-header {
  padding: 0.8rem 1.12rem; border-bottom: 1px solid var(--ta-stone);
  font-size: 0.8rem; font-weight: 700; color: var(--ta-ink);
  display: flex; align-items: center; gap: 0.4rem;
}
.side-rows { padding: 0.2rem 0; }
.side-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.48rem 1.12rem; font-size: 0.79rem;
  border-bottom: 1px solid var(--ta-stone); gap: 0.5rem;
}
.side-row:last-child { border-bottom: none; }
.side-row-key { color: var(--ta-slate); font-weight: 500; }

.quick-facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--ta-stone); }
.quick-fact { background: var(--ta-snow); padding: 0.75rem 1rem; }
.quick-fact-icon { font-size: 0.92rem; margin-bottom: 0.1rem; }
.quick-fact-val { font-size: 1.02rem; font-weight: 700; color: var(--ta-ink); line-height: 1; }
.quick-fact-lbl { font-size: 0.57rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ta-slate); margin-top: 0.1rem; }

.cta-card {
  background: linear-gradient(135deg, var(--ta-forest-dark) 0%, var(--ta-forest) 55%, var(--ta-teal) 100%);
  border-radius: var(--ta-radius-lg); padding: 1.22rem; margin-bottom: 1rem;
}
.cta-eyebrow { font-size: 0.57rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 0.26rem; }
.cta-heading { font-size: 1.02rem; font-weight: 700; color: white; margin-bottom: 0.38rem; line-height: 1.3; }
.cta-body    { font-size: 0.72rem; color: rgba(255,255,255,0.68); margin-bottom: 0.8rem; line-height: 1.5; }
.cta-btn {
  width: 100%; background: rgba(255,255,255,0.13);
  border: 1.5px solid rgba(255,255,255,0.3); color: white;
  padding: 0.56rem; border-radius: var(--ta-radius-sm);
  font-size: 0.79rem; font-weight: 600; cursor: pointer; transition: background 0.16s;
}
.cta-btn:hover { background: rgba(255,255,255,0.22); }


/* ═══════════════════════════════════════════════════════
   SIMILAR & NEARBY TRAILS
   ═══════════════════════════════════════════════════════ */
.trails-similar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 0.5rem; }
.trail-similar-card {
  border: 1px solid var(--ta-stone); border-radius: var(--ta-radius-md);
  overflow: hidden; transition: box-shadow 0.18s, border-color 0.18s;
  text-decoration: none; color: inherit; display: block;
}
.trail-similar-card:hover { box-shadow: var(--ta-shadow-lg); border-color: var(--ta-teal); }
.trail-similar-card-img { height: 106px; background: linear-gradient(135deg, var(--ta-forest), var(--ta-teal)); overflow: hidden; position: relative; }
.trail-similar-card-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.trail-similar-card-country { position: absolute; top: 0.44rem; right: 0.44rem; background: rgba(0,0,0,0.46); color: white; font-size: 0.57rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.1rem 0.36rem; border-radius: 99px; }
.trail-similar-card-body { padding: 0.72rem; }
.trail-similar-card-name { font-size: 0.88rem; font-weight: 700; margin-bottom: 0.3rem; }
.trail-similar-card-meta { display: flex; flex-wrap: wrap; gap: 0.26rem; }

.trails-nearby-list { display: flex; flex-direction: column; }
.trail-nearby-item { display: flex; align-items: center; gap: 0.72rem; padding: 0.62rem 0; border-bottom: 1px solid var(--ta-stone); text-decoration: none; color: inherit; border-radius: var(--ta-radius-sm); transition: background 0.12s; }
.trail-nearby-item:last-child { border-bottom: none; }
.trail-nearby-item:hover { background: #f4efe6; padding-left: 0.42rem; padding-right: 0.42rem; margin: 0 -0.42rem; }
.trail-nearby-thumb { width: 46px; height: 46px; border-radius: var(--ta-radius-sm); background: linear-gradient(135deg, var(--ta-forest), var(--ta-teal)); flex-shrink: 0; overflow: hidden; }
.trail-nearby-thumb img { width: 100%; height: 100%; object-fit: cover; }
.trail-nearby-info { flex: 1; min-width: 0; }
.trail-nearby-name { font-weight: 600; font-size: 0.83rem; }
.trail-nearby-sub  { font-size: 0.68rem; color: var(--ta-slate); margin-top: 0.07rem; }
.trail-nearby-dist { font-size: 0.68rem; font-weight: 600; color: var(--ta-teal); white-space: nowrap; }


/* ═══════════════════════════════════════════════════════
   ARCHIVE TRAIL CARDS
   ═══════════════════════════════════════════════════════ */
/* .trail-card .taxonomy-region { position: absolute; top: 0; left: 0; }
.trail-card .taxonomy-region a { background: white; color: #000; font-weight: 600; padding: 0 10px; border-radius: 100px; }
.trail-card > .wp-block-cover .wp-block-cover__inner-container { position: relative; height: 100%; width: 100%; }
.trail-card .trail-card-title-container { bottom: 0; position: absolute; }
.trail-card .trails_post-title { font-weight: 600; text-shadow: 2px 2px 5px #000; }
.trail-card .trails-country    { font-weight: 600; text-shadow: 2px 2px 5px #000; }
.trail-card > .wp-block-cover { border-top-left-radius: 28px !important; border-top-right-radius: 28px !important; }
.trail-card { background: #eaeaea; border-radius: 28px !important; }
.trail-card .to-trail-btn { width: 28px !important; height: 28px !important; line-height: 0.65; rotate: 90deg; }
.trail-card .to-trail-btn a { font-size: 22px !important; }
.trail-card .taxonomy-scenery_tag a { font-size: 11px; padding: 3px 8px; }
.hover-reveal-data { opacity: 0; position: absolute; top: 0; left: 0; z-index: -1; width: 100%; height: 100%; transition: opacity 300ms; border-radius: 28px; }
.trail-card:hover .hover-reveal-data { opacity: 1; z-index: 1; align-content: center; justify-content: center; background: #eeeeeecc; }
.wp-block-cover { overflow: hidden !important; }
.trail-card .card-front-upper, .trail-card .card-front-lower { transition: opacity 300ms; }
.trail-card:hover .card-front-upper, .trail-card:hover .card-front-lower { opacity: 0.2; }
.save-trail-btn { position: absolute; right: 0; appearance: none; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s ease; }
.save-trail-btn:hover { border-color: #cbd5e1; }
.save-trail-btn.is-active { background: #fff5f5; border-color: #feb2b2; color: #c53030; }
.taxonomy-scenery_tag a { padding: 3px 11px 4px; border-radius: 28px; font-size: 16px; font-weight: 900; border: 1px solid; background: #00000024; color: #fff; text-transform: uppercase; } */


/* ═══════════════════════════════════════════════════════
   GPX / MAP
   ═══════════════════════════════════════════════════════ */

.trail-side-col .leaflet-map, .trail-side-col .elevation-control {
    border: 1px solid var(--ta-stone);
    border-radius: var(--ta-radius-lg);
    box-shadow: var(--ta-shadow);
}
.elevation_profile {
    height: 202px;
}
.elevation_profile .leaflet-map {
    display: none;
}
.elevation-control .axis text, .elevation-control .legend text, .elevation-control .point text {
    color: #1c1c18 !important;
    font-weight: 300 !important;
    font-size: 11px;
}
.elevation_profile .elevation-control .background {
    border: 1px solid #e6d0a0;
    border-radius: var(--ta-radius-md);
    margin-top: 15px;
    width: calc(100% - 2px);
}
.elevation_profile .elevation-summary {
    display: none;
}
.elevation-summary {
    border-bottom-left-radius: var(--ta-radius-lg);
    border-bottom-right-radius: var(--ta-radius-lg);
    border-top: none;
    background: #fbf7ec;
    margin: 0;
    padding: 20px;
}

.trail-side-col .elevation-control .background {
    border-radius: 20px;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .trail-page-columns { flex-direction: column !important; }
  .trail-side-col { position: static; width: 100%; }
  .trails-similar-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero-section .wp-block-cover__inner-container { padding: 1.2rem 1.2rem 1.5rem !important; }
  .hero-stat { min-width: 78px; padding: 0.68rem 0.78rem !important; }
  .hero-stat .pods-field { font-size: 1.22rem !important; }
  .pods-details-list { grid-template-columns: 1fr; }
  .pods-details-row { border-right: none !important; }
  .budget-tiers { grid-template-columns: 1fr; }
  .trails-similar-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   SAFETY SCORE BANNER
   ═══════════════════════════════════════════════════════ */
.safety-score-banner {
  background: linear-gradient(135deg, var(--ta-forest-dark) 0%, var(--ta-forest) 100%);
  border-radius: var(--ta-radius-md);
  padding: 1rem 1.2rem;
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.2rem; color: white;
}
.safety-score-ring {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.16);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.safety-score-ring-val { font-size: 1.05rem; font-weight: 700; line-height: 1; }
.safety-score-ring-sub { font-size: 0.48rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
.safety-score-label { font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.68; }
.safety-score-val   { font-size: 0.96rem; font-weight: 600; }

/* ═══════════════════════════════════════════════════════
   BUDGET TIERS
   ═══════════════════════════════════════════════════════ */
.budget-tiers {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 0.7rem; margin-bottom: 1.2rem;
}
.budget-tier {
  border: 1px solid var(--ta-stone);
  border-radius: var(--ta-radius-md);
  padding: 0.82rem 0.88rem; text-align: center;
  position: relative; transition: border-color 0.16s, box-shadow 0.16s;
}
.budget-tier:hover { border-color: var(--ta-teal); box-shadow: 0 0 0 3px rgba(58,158,138,0.1); }
.budget-tier.featured { border-color: var(--ta-teal); background: #f0faf8; }
.budget-tier.featured::after {
  content: 'avg joe';
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  background: var(--ta-teal); color: white;
  font-size: 0.55rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
  padding: 0.1rem 0.4rem; border-radius: 99px;
}
.budget-tier-label { font-size: 0.61rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ta-slate); margin-bottom: 0.26rem; font-weight: 600; }
.budget-tier-price { font-size: 1.65rem; font-weight: 700; color: var(--ta-ink); line-height: 1; }
.budget-tier-price sup { font-size: 0.76rem; font-weight: 400; color: var(--ta-slate); }
.budget-tier-per { font-size: 0.61rem; color: var(--ta-slate-lt); margin-top: 0.1rem; }

/* =========================================================
   BADGE COLOURS — bolder palette
   Replaces the washed-out tints with proper saturated colours.
   Still readable at small sizes, but with actual personality.
   ========================================================= */
 
.ta-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.22rem 0.65rem;
  border-radius: 99px;
  white-space: nowrap;
  line-height: 1.4;
}
 
/* Green — forest, positive outcomes */
.ta-badge--green {
  background: #1a7a3c;
  color: #e8f7ee;
}
 
/* Amber — caution, moderate */
.ta-badge--amber {
  background: #c8620a;
  color: #fff3e6;
}
 
/* Red — risk, negative */
.ta-badge--red {
  background: #b91c1c;
  color: #fde8e8;
}
 
/* Blue — informational, neutral-positive */
.ta-badge--blue {
  background: #1d4ed8;
  color: #eff6ff;
}
 
/* Purple — special categories (LGBTQ+, etc) */
.ta-badge--purple {
  background: #6d28d9;
  color: #f3f0ff;
}
 
/* Teal — from logo, used for remoteness / wilderness type values */
.ta-badge--teal {
  background: #0f766e;
  color: #e0faf7;
}
 
/* Grey — neutral / not applicable */
.ta-badge--grey {
  background: #4b5563;
  color: #f3f4f6;
}
 
/* Gold — special ratings */
.ta-badge--gold {
  background: #b45309;
  color: #fef9e7;
}
 
/* Moss — scenery tags, wildlife, nature */
.ta-badge--moss {
  background: #285A38;
  color: #e8f5ec;
}
 
 
/* =========================================================
   SECTION SCORE WIDGET
   ========================================================= */
 
.section-score-widget {
  border-radius: var(--ta-radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1.1rem;
  border-left-width: 3px;
  border-left-style: solid;
}
 
.section-score-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
}
 
.section-score-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ta-slate);
}
 
.section-score-number {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}
 
.section-score-denom {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.65;
  margin-left: 1px;
}
 
.section-score-bar-track {
  height: 5px;
  background: rgba(0,0,0,0.1);
  border-radius: 99px;
  overflow: hidden;
}
 
.section-score-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease;
}
 
 
/* =========================================================
   SECTION NOTE  (budget note, visa note etc above the list)
   ========================================================= */
 
.section-note {
  padding: 0.62rem 0.85rem;
  background: #fdf7eb;
  border: 1px solid #e6d0a0;
  border-radius: var(--ta-radius-sm);
  font-size: 0.77rem;
  color: var(--ta-slate);
  line-height: 1.55;
  margin-bottom: 1rem;
}
 
.section-note strong {
  color: var(--ta-trail-dark);
}

/*
  Trail Almanac — Archive Page Fixes
  Targets: filter sidebar + card hover reveal
  Drop into your child theme or enqueue via functions.php
*/

/* ─── FILTER SIDEBAR ─────────────────────────────────────────── */

.filter-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.filter-sidebar > div {
    padding-right: 1rem;
}

/* Chips */
.wpc-custom-selected-terms ul.wpc-filter-chips-list {
    display: ruby!important;
}

body.archive .wpc-filter-chip a {
    background-color: #3b6b3b;
    font-size: 0.8rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    border-radius: 99px!important;
    border: 1.5px solid rgb(255 255 255 / 42%)!important;
    color: #fff!important;
    backdrop-filter: blur(4px);
    line-height: 1.4;
    font-weight: 700!important;
}

body .wpc-filter-chips-list li.wpc-chip-reset-all a {
    background-color: #cc8181;
}

/* Sort dropdown */
.widget_wpc_sorting_widget .wpc-orderby-select {
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235F5F5F'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 0.5px solid rgba(25,25,25,0.2);
  border-radius: 6px;
  padding: 8px 32px 8px 10px;
  font-size: 13px;
  font-family: inherit;
  color: #191919;
  cursor: pointer;
  width: 100%;
}
.widget_wpc_sorting_widget .wpc-orderby-select:focus {
  outline: none;
  border-color: #3B6B3B;
}

/* Filter widget overall container */
.widget_wpc_filters_widget {
  font-size: 13px;
  font-family: inherit;
}

/* Each collapsible section */
.wpc-filters-section.wpc-filter-collapsible {
  border-top: 0.5px solid rgba(25,25,25,0.12);
  padding-top: 12px;
}

/* ── Budget filter group ─────────────────────────────────────────────────── */

/* Hide budget filter-fields from the main FE widget — they're shown via [ta_budget_filters] instead */
.wpc-filters-section[data-fid="1215"],
.wpc-filters-section[data-fid="1216"],
.wpc-filters-section[data-fid="1217"] { display: none !important; }

.ta-budget-filter-group {
    border-top: 0.5px solid rgba(25,25,25,0.12);
    padding-top: 12px;
}

.ta-budget-active-dot {
    display:       inline-block;
    width:         6px;
    height:        6px;
    border-radius: 50%;
    margin-left:   5px;
    vertical-align: middle;
    position:      relative;
    top:           -1px;
}

.ta-budget-sliders {
    padding: 0.5rem 0 0.25rem;
}

.ta-budget-slider-row {
    margin-bottom: 1.1rem;
}

.ta-budget-slider-label {
    display:         flex;
    justify-content: space-between;
    align-items:     baseline;
    font-size:       0.8rem;
    margin-bottom:   0.5rem;
    color:           var(--ta-ink);
}

.ta-budget-slider-range {
    font-size:   0.75rem;
    color:       var(--ta-slate);
    white-space: nowrap;
}

.ta-budget-per-day {
    font-size:  0.7rem;
    opacity:    0.6;
    margin-left: 1px;
}

/* Dual-range slider track */
.ta-dual-range {
    position:   relative;
    height:     4px;
    border-radius: 2px;
    background: linear-gradient(to right,
        var(--ta-stone)  var(--low),
        var(--ta-forest) var(--low),
        var(--ta-forest) var(--high),
        var(--ta-stone)  var(--high)
    );
    margin: 0.6rem 0 0.25rem;
}

.ta-range-input {
    position:       absolute;
    width:          100%;
    top:            50%;
    transform:      translateY(-50%);
    height:         4px;
    background:     transparent;
    -webkit-appearance: none;
    appearance:     none;
    pointer-events: none;
    margin:         0;
    padding:        0;
}

.ta-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance:     none;
    width:          16px;
    height:         16px;
    border-radius:  50%;
    background:     var(--ta-forest);
    border:         2px solid #fff;
    box-shadow:     0 1px 4px rgba(0,0,0,0.25);
    pointer-events: all;
    cursor:         pointer;
    transition:     transform 0.1s;
}

.ta-range-input::-moz-range-thumb {
    width:          16px;
    height:         16px;
    border-radius:  50%;
    background:     var(--ta-forest);
    border:         2px solid #fff;
    box-shadow:     0 1px 4px rgba(0,0,0,0.25);
    pointer-events: all;
    cursor:         pointer;
}

.ta-range-input:focus-visible::-webkit-slider-thumb {
    outline:        2px solid var(--ta-forest);
    outline-offset: 2px;
}

.ta-budget-reset {
    display:     block;
    width:       100%;
    margin-top:  0.5rem;
    padding:     0.3rem 0;
    font-size:   0.72rem;
    color:       var(--ta-slate);
    background:  transparent;
    border:      none;
    cursor:      pointer;
    text-align:  left;
    text-decoration: underline;
}
.ta-budget-reset:hover { color: var(--ta-ink); }
.wpc-filters-section.wpc-filter-collapsible:first-of-type {
  border-top: none;
}
body .wpc-filter-header .wpc-filter-title button {
    font-weight: 700;
}

/* Section header button */
.wpc-filter-title button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5F5F5F;
  font-family: inherit;
}
.wpc-filter-title button:hover {
  color: #191919;
}
body .wpc-filters-main-wrap .wpc-filters-labels li.wpc-term-item {
  margin-bottom: 4px;
}
.wpc-filters-main-wrap .wpc-filters-labels li.wpc-term-item label {
    background-color: #608a80db;
    font-size: 0.8rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    border-radius: 99px!important;
    border: 1.5px solid rgb(255 255 255 / 42%)!important;
    color: #fff!important;
    backdrop-filter: blur(4px);
    line-height: 1.4;
    font-weight: 700!important;
}

body .wpc-filters-main-wrap input.wpc-label-input+label:hover span.wpc-filter-label-wrapper {
    color: inherit;
    background-color: transparent!important;
}
body .wpc-filters-main-wrap input.wpc-label-input:checked+label span.wpc-filter-label-wrapper {
    background-color: transparent !important;
}

body .wpc-filters-main-wrap input.wpc-label-input:checked+label {
    background: #3b6b3b;
}
body .wpc-filters-main-wrap input.wpc-label-input:checked+label span.wpc-filter-label-wrapper::after {
    content: "×";
    display: inline-block;
    font-size: 1.25em;
    line-height: 1.2;
}

body .wpc-filters-main-wrap input.wpc-label-input:checked+label:hover span.wpc-filter-label-wrapper::after {
    color: #c00;
}
.wpc-filters-main-wrap .wpc-filters-labels li.wpc-term-item label a, .wpc-filters-main-wrap .wpc-filters-labels li.wpc-term-item label .wpc-term-count {
    font-weight: 500;
    color: var(--ta-snow);
    letter-spacing: 0.05rem;
}

.wpc-filters-main-wrap .wpc-filters-labels li.wpc-term-item label .wpc-term-count {
    opacity: 1;
    line-height: 18px;
}

.wpc-filters-main-wrap .wpc-filters-labels li.wpc-term-item label .wpc-term-count::before {
    content: "(";
}

.wpc-filters-main-wrap .wpc-filters-labels li.wpc-term-item label .wpc-term-count::after {
    content: ")";
}

body .wpc-filters-main-wrap input.wpc-label-input:checked+label span.wpc-filter-label-wrapper {
    background: transparent;
}

.wpc-filters-main-wrap .wpc-filters-labels li.wpc-term-item label:hover {
    background: #3b6b3b;
}

.widget-title {
    font-size: 17px;
    font-family: inherit;
}

/* Chevron — matches FE plugin's rotated-square style */
.wpc-filter-collapsible .wpc-filter-title .wpc-open-icon,
.wpc-filter-collapsible-reverse.wpc-filter-collapsible.wpc-closed .wpc-filter-title .wpc-open-icon,
.wpc-filter-collapsible.wpc-closed .wpc-filter-title .wpc-open-icon,
.wpc-filter-has-selected.wpc-closed .wpc-filter-title .wpc-open-icon,
.ta-budget-filter-group .wpc-filter-title .wpc-open-icon {
    content: "";
    width: 9px;
    min-width: 9px;
    height: 9px;
    display: block;
    border-left: 1px solid #8a8a8a;
    border-top: 1px solid #8a8a8a;
    transform: rotate(-135deg);
    position: relative;
    right: 3px;
    bottom: 3px;
}
.wpc-filter-collapsible-reverse.wpc-filter-collapsible .wpc-filter-title .wpc-open-icon,
.wpc-filter-collapsible.wpc-opened .wpc-filter-title .wpc-open-icon,
.wpc-filter-has-selected .wpc-filter-title .wpc-open-icon,
.ta-budget-filter-group.wpc-opened .wpc-filter-title .wpc-open-icon {
    transform: rotate(45deg);
    position: relative;
    right: 3px;
    bottom: 0;
    top: 3px;
}


/* Filter content area */
.wpc-filter-content {
  padding-bottom: 10px;
}

/* Checkbox-type filter list (FE plugin WalkerCheckbox output) */
.wpc-filters-checkboxes {
  list-style: none;
  margin: 0;
  padding: 0;
}
.wpc-filters-checkboxes .wpc-term-item-content-wrapper {
  display: flex;
  align-items: center;
  padding: 1px 0;
}

/* Visually hide the native checkbox but keep it keyboard-accessible */
.wpc-filters-checkboxes .wpc-term-item-content-wrapper input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* Label spans the whole row; ::before is the custom checkbox box */
.wpc-filters-checkboxes .wpc-term-item-content-wrapper label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  padding: 3px 0 3px 23px;
  font-size: 13px;
  color: var(--ta-ink, #191919);
  flex: 1;
  line-height: 1.35;
  transition: color 0.1s;
}

/* The checkbox box */
.wpc-filters-checkboxes .wpc-term-item-content-wrapper label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  border: 1.5px solid #bbb;
  border-radius: 3px;
  background: #fff;
  transition: background 0.12s, border-color 0.12s;
}

/* The checkmark (hidden by default) */
.wpc-filters-checkboxes .wpc-term-item-content-wrapper label::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 4px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-65%) rotate(45deg);
  opacity: 0;
  transition: opacity 0.12s;
}

/* Checked state — two hooks:
   1. native :checked (HTML attribute on page load)
   2. FE adds wpc-term-selected to <li> for active filters */
.wpc-filters-checkboxes .wpc-term-item-content-wrapper input:checked + label::before,
.wpc-filters-checkboxes .wpc-checkbox-item.wpc-term-selected label::before {
  background: var(--ta-forest, #3b6b3b);
  border-color: var(--ta-forest, #3b6b3b);
}
.wpc-filters-checkboxes .wpc-term-item-content-wrapper input:checked + label::after,
.wpc-filters-checkboxes .wpc-checkbox-item.wpc-term-selected label::after {
  opacity: 1;
}

/* Hover */
.wpc-filters-checkboxes .wpc-term-item-content-wrapper label:hover {
  color: var(--ta-forest, #3b6b3b);
}
.wpc-filters-checkboxes .wpc-term-item-content-wrapper label:hover::before {
  border-color: var(--ta-forest, #3b6b3b);
}

/* Link inside label inherits colour */
.wpc-filters-checkboxes .wpc-filter-link {
  color: inherit;
  text-decoration: none !important;
  flex: 1;
}

/* Disabled / zero-count items */
.wpc-filters-checkboxes .wpc-term-disabled label {
  opacity: 0.45;
  cursor: default;
}

/* Term count badge */
.wpc-filters-checkboxes .wpc-term-count {
  color: #999;
  font-size: 11px;
  margin-left: auto;
}
.wpc-filters-checkboxes .wpc-term-count-brackets-open,
.wpc-filters-checkboxes .wpc-term-count-brackets-close {
  display: none;
}

/* Generic link / count rules used by other filter types */
.wpc-filter-link {
  text-decoration: none !important;
  color: inherit;
}
.wpc-filter-link:hover {
  text-decoration: none !important;
}

/* Search field */
.wpc-filter-search-form {
  margin: 4px 0 10px;
}
.wpc-search-field-wrapper {
  position: relative;
}
.wpc-search-field {
  width: 100%;
  padding: 7px 32px 7px 10px;
  border: 0.5px solid rgba(25,25,25,0.2);
  border-radius: 6px;
  font-size: 13px;
  background: #F8F7F5;
  font-family: inherit;
  color: #191919;
}
.wpc-search-field:focus {
  outline: none;
  border-color: #3B6B3B;
  background: #fff;
}
.wpc-search-icon {
  display: none; /* placeholder for custom icon if desired */
}

/* Range sliders */
.wpc-filter-title:not(:has(button)) {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5F5F5F;
  padding: 10px 0 6px;
}
.wpc-filters-range-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.wpc-filters-range-column {
  flex: 1;
}
.wpc-filters-range-min,
.wpc-filters-range-max {
  width: 100%;
  padding: 5px 6px;
  border: 0.5px solid rgba(25,25,25,0.2);
  border-radius: 6px;
  font-size: 12px;
  text-align: center;
  background: #fff;
  font-family: inherit;
  color: #191919;
}
.wpc-filters-range-min:focus,
.wpc-filters-range-max:focus {
  outline: none;
  border-color: #3B6B3B;
}
/* Dual-slider track */
.wpc-filters-range-slider-wrapper {
  padding-bottom: 12px;
}
.wpc-filters-range-slider-control {
  position: relative;
  height: 6px;
  background: rgba(25,25,25,0.12);
  border-radius: 3px;
  margin: 4px 0;
}
/* jQuery UI slider handles */
.wpc-filters-range-slider-control .ui-slider-handle {
  width: 16px;
  height: 16px;
  background: #3B6B3B;
  border: 2px solid #fff;
  border-radius: 50%;
  top: -5px;
  margin-left: -8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  cursor: pointer;
  outline: none;
}
.wpc-filters-range-slider-control .ui-slider-handle:focus {
  box-shadow: 0 0 0 3px rgba(59,107,59,0.25);
}
.wpc-filters-range-slider-control .ui-slider-range {
  background: #3B6B3B;
  opacity: 0.35;
  border-radius: 3px;
}

/* Apply / Reset buttons */
.wpc-filters-submit-button {
  display: block;
  width: 100%;
  padding: 9px;
  background: #191919;
  color: #F8F7F5;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  margin-top: 12px;
  font-family: inherit;
  transition: background 0.15s;
}
.wpc-filters-submit-button:hover {
  background: #333;
  text-decoration: none;
  color: #F8F7F5;
}
body .wpc-filters-main-wrap a.wpc-filters-reset-button {
    padding: 1px 10px 2px;
    display: inline-block;
    position: relative;
    height: 100%;
    list-style: none;
    font-size: 91%;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    border-radius: 99px !important;
    border: 1.5px solid rgb(255 255 255 / 42%) !important;
    color: #fff !important;
    line-height: 1.4;
    font-weight: 700 !important;
    background-color: #cc8181;
}

body .wpc-filters-main-wrap a.wpc-filters-submit-button {
    padding: 1px 10px 2px;
    display: inline-block;
    position: relative;
    height: 100%;
    list-style: none;
    font-size: 91%;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    border-radius: 99px !important;
    border: 1.5px solid rgb(255 255 255 / 42%) !important;
    color: #fff !important;
    line-height: 1.4;
    font-weight: 700 !important;
    background-color: var(--ta-teal)!important;
    margin: 0;
}

.wpc-filter-layout-submit-button {
    gap: 0.3rem;
}

body .wpc-filters-main-wrap .wpc-term-disabled input.wpc-label-input:checked+label span.wpc-filter-label-wrapper, body .wpc-filters-main-wrap .wpc-filters-labels li.wpc-term-item.wpc-term-disabled input:checked+label a {
    color: var(--ta-snow)!important;
}

.wpc-filters-section > a {
    font-size: 0.8rem!important;
    letter-spacing: 0.09em!important;
}

/* Bottom apply/cancel control bar */
.wpc-filters-apply-button {
  display: inline-block;
  padding: 9px 20px;
  background: #191919;
  color: #F8F7F5 !important;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.15s;
}
.wpc-filters-apply-button:hover {
  background: #333;
}
.wpc-filters-close-button {
  display: inline-block;
  padding: 9px 20px;
  background: transparent;
  color: #5F5F5F !important;
  border: 0.5px solid rgba(25,25,25,0.2);
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none !important;
  transition: border-color 0.15s, color 0.15s;
}
.wpc-filters-close-button:hover {
  border-color: #191919;
  color: #191919 !important;
}

/* ─── CARD HOVER REVEAL ───────────────────────────────────────── */

/* The card wrapper must be position:relative for the overlay to work */
.trail-card,
.wp-block-group.trail-card {
  position: relative;
  overflow: hidden;
}
.trail-card .trails-country {
    line-height: 1.2;
    font-size: 18px;
}
.trail-card .wp-block-cover__inner-container > div {
    text-align: left;
    margin-left: 0!important;
}
.trail-card .card-front-lower div {
    gap: 0.3rem;
}
.trail-card .trails_post-title a {
    font-weight: 900;
    color: #fff;
}

.trail-card .wp-block-cover__inner-container {position: relative;}

.trail-card .wp-block-cover__inner-container {
    position: absolute;
    height: calc(100% - 20px);
    width: calc(100% - 20px);
    display: flex;
    flex-direction: column;
    text-align: left;
    justify-content: space-between;
}

.trail-card .wp-block-cover::before {
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    background: linear-gradient(180deg, transparent, #00000061);
    z-index: 1;
}

.trail-card {
    background: var(--ta-snow);
    border: 1px solid var(--ta-stone);
    border-radius: var(--ta-radius-lg)!important;
    padding: 1.5rem 1.75rem;
    box-shadow: var(--ta-shadow);
}

.trail-card .trail-card-title-container, .trail-card .trail-card-title-container h2 {
    font-size: 1.55rem!important;
}

.trail-card .taxonomy-scenery_tag > span:nth-of-type(3):has(+ a)::after {
    content: "+";
    font-size: 22px;
    position: absolute;
    bottom: 8px;
    color: #2c3338;
    font-weight: 300;
}
.trail-card .taxonomy-scenery_tag a:nth-of-type(n+4) {
    display: none;
}

/* ═══════════════════════════════════════════════════════
   TRAIL CARD GRID DYNAMICS (FORCE OVERRIDE)
   Min 270px / Max 320px / Fluid Column Count
   ═══════════════════════════════════════════════════════ */

/* 1. Aggressively target the frontend rendered grid container */
#trail-card-container .wp-block-post-template.is-layout-grid,
#trail-card-container ul.wp-block-post-template {
    display: grid !important;
    /* auto-fit allows fluid columns. minmax enforces your 262px floor and 1fr ceiling */
    grid-template-columns: repeat(auto-fit, minmax(262px, 1fr)) !important;
    justify-content: center !important;
    gap: 1.5rem !important;
}

/* 2. Aggressively target the direct child items (the cards themselves) */
#trail-card-container .wp-block-post-template > li,
#trail-card-container .wp-block-post-template > div.trail-card {
    min-width: 270px !important;
    max-width: 320px !important;
    width: 100% !important;
    margin: 0 !important;
}

/* 3. Mobile fail-safe for very narrow screens */
@media (max-width: 320px) {
    #trail-card-container .wp-block-post-template.is-layout-grid,
    #trail-card-container ul.wp-block-post-template {
        grid-template-columns: 1fr !important;
    }
    #trail-card-container .wp-block-post-template > li,
    #trail-card-container .wp-block-post-template > div.trail-card {
        min-width: unset !important;
        max-width: 100% !important;
    }
}

/* Center the cards horizontally when they are in a single column */
#trail-card-container .wp-block-post-template > li,
#trail-card-container .wp-block-post-template > div.trail-card {
    min-width: 270px !important;
    max-width: 310px !important;
    width: 100% !important;
    /* This handles the centering in the column */
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Ensure the grid container itself doesn't pull them to the left */
#trail-card-container .wp-block-post-template.is-layout-grid,
#trail-card-container ul.wp-block-post-template {
    justify-items: center !important;
}

/** The detail panel that slides up on hover **/
.hover-reveal-data {
  position: absolute;
  inset: 0;
  background: rgba(18, 36, 18, 0.92);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  gap: 6px;
  /* Hidden by default */
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 10;
}
/* 1. Force the 75% column to actually expand if the screen is huge */
.wp-block-columns:has(#trail-card-container) {
    max-width: none !important;
    width: 100% !important;
}

#trail-card-container {
    flex-basis: 75% !important;
    max-width: none !important;
}

/* 2. The Grid Override */
#trail-card-container .wp-block-post-template.is-layout-grid {
    display: grid !important;
    /* This allows as many columns as fit between 262px and 1fr */
    grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)) !important;
    gap: 1.5rem !important;
    width: 100% !important;
}

/* Triggered when the card or reveal button is hovered */
.trail-card:hover .hover-reveal-data,
.trail-card:focus-within .hover-reveal-data {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Individual stat rows inside reveal */
.hover-reveal-data .wp-block-group {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 0.5px solid rgba(255,255,255,0.12);
  padding: 4px 0;
  width: 100%;
  font-size: 12px;
}
.hover-reveal-data .wp-block-group:last-of-type {
  border-bottom: none;
}
.hover-reveal-data p {
  color: #fff;
  font-size: 16px;
  min-width: 20px;
}

/* "View trail" read-more link inside the reveal */
.hover-reveal-data .wp-block-read-more {
  margin-top: 10px;
  display: inline-block;
  padding: 7px 18px;
  background: #fff;
  color: #191919 !important;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  text-align: center;
  transition: background 0.15s;
}
.hover-reveal-data .wp-block-read-more:hover {
    background: #d7b078;
}

/* The "^" expand button — hide it (reveal is now hover-triggered) */
.to-trail-btn {
  display: none;
}

/* Badges inside reveal */
.hover-reveal-data .ta-badge {
  font-size: 14px;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
}

/* ─── MINOR CARD POLISH ───────────────────────────────────────── */

/* Budget row */
.budget-stack {
  font-size: 12px;
}

/*
 * Trail Comparison Styles — v7
 * CSS Grid layout replacing HTML table.
 * Sticky trail header + sticky group headers as user scrolls.
 * Full natural page width — no max-width on the main wrap.
 * ─────────────────────────────────────────────────────────────────────────────
 */


/* ═══════════════════════════════════════════════════════
   WRAP — full width, vertical rhythm only
   ═══════════════════════════════════════════════════════ */

.tc-compare-wrap {
    padding: 1.5rem 0 4rem;
}

.tc-compare-header {
    margin-bottom: 1.5rem;
}

.tc-compare-subtitle {
    font-size:      0.65rem;
    font-weight:    700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color:          var(--ta-slate-lt);
    margin:         0 0 0.75rem;
}

.tc-compare-title {
    font-size:      clamp(1.5rem, 3.5vw, 2.2rem) !important;
    font-weight:    700 !important;
    color:          var(--ta-ink) !important;
    letter-spacing: -0.02em !important;
    line-height:    1.15 !important;
    margin:         0 0 1rem !important;
}

/* Hero image row */
.tc-compare-heroes {
    display:     flex;
    align-items: stretch;
    gap:         0;
    border-radius: var(--ta-radius-lg);
    overflow:    hidden;
    margin-bottom: 1.5rem;
}

.tc-compare-heroes__trail {
    flex:        1;
    display:     flex;
    flex-direction: column;
    min-width:   0;
}

.tc-compare-heroes__img-wrap {
    position:    relative;
    aspect-ratio: 16 / 7;
    overflow:    hidden;
}

.tc-compare-heroes__img-wrap img {
    width:       100%;
    height:      100%;
    object-fit:  cover;
    display:     block;
    transition:  transform 0.3s ease;
}

.tc-compare-heroes__trail:hover .tc-compare-heroes__img-wrap img {
    transform: scale(1.03);
}

.tc-compare-heroes__name {
    font-size:      clamp(1rem, 2.2vw, 1.3rem) !important;
    font-weight:    700 !important;
    color:          var(--ta-ink) !important;
    letter-spacing: -0.01em !important;
    line-height:    1.2 !important;
    margin:         0 !important;
    padding:        0.65rem 0.85rem 0.7rem !important;
    background:     var(--ta-parchment);
    border-top:     1px solid var(--ta-stone);
}

.tc-compare-heroes__name a {
    color: inherit;
    text-decoration: none;
}

.tc-compare-heroes__name a:hover {
    color: var(--ta-forest);
}

.tc-compare-heroes__vs {
    display:     flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width:       2.5rem;
    background:  var(--ta-ink);
    color:       var(--ta-snow);
    font-size:   0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}


/* ═══════════════════════════════════════════════════════
   TRAIL COLOUR CODING  (data-tc-trail="0|1|2")
   ═══════════════════════════════════════════════════════ */

:root {
    --tc-color-0: #1a6fad;   /* cerulean  — sky / water  */
    --tc-color-1: #b84c0c;   /* terracotta — earth / rock */
    --tc-color-2: #6b35a8;   /* heather   — high peaks   */
}

/* Hero cards — name strip: solid trail colour bg, white text, left accent bar */
.tc-compare-heroes__trail[data-tc-trail="0"] .tc-compare-heroes__name { background: var(--tc-color-0); color: #fff; border-left: 4px solid color-mix(in srgb, var(--tc-color-0) 60%, #000); }
.tc-compare-heroes__trail[data-tc-trail="1"] .tc-compare-heroes__name { background: var(--tc-color-1); color: #fff; border-left: 4px solid color-mix(in srgb, var(--tc-color-1) 60%, #000); }
.tc-compare-heroes__trail[data-tc-trail="2"] .tc-compare-heroes__name { background: var(--tc-color-2); color: #fff; border-left: 4px solid color-mix(in srgb, var(--tc-color-2) 60%, #000); }
.tc-compare-heroes__name { border-top: none; } /* override neutral rule */
.tc-compare-heroes__name a { color: #fff; }
.tc-compare-heroes__name a:hover { opacity: 0.85; }

/* Hero image — colour-matched overlay tint per trail */
.tc-compare-heroes__trail[data-tc-trail="0"] .tc-compare-heroes__img-wrap::after { content:''; position:absolute; inset:0; background: rgba(26,111,173,0.22); pointer-events:none; }
.tc-compare-heroes__trail[data-tc-trail="1"] .tc-compare-heroes__img-wrap::after { content:''; position:absolute; inset:0; background: rgba(184,76,12,0.22);  pointer-events:none; }
.tc-compare-heroes__trail[data-tc-trail="2"] .tc-compare-heroes__img-wrap::after { content:''; position:absolute; inset:0; background: rgba(107,53,168,0.22); pointer-events:none; }

/* Sticky header — trail cols: solid opaque colour so they read over dark-green bg */
/* label + insight cols stay transparent so the forest bg shows through cleanly   */
.tc-grid-header__label { background: transparent; }
.tc-grid-header__insight { background: var(--ta-slate); color: #fff; }
.tc-grid-header__trail[data-tc-trail="0"] { background: var(--tc-color-0); color: #fff; border-bottom: 3px solid color-mix(in srgb, var(--tc-color-0) 55%, #000); border-left: none; border-radius: var(--ta-radius-md) 0 0 0; }
.tc-grid-header > *:last-child { border-radius: 0 var(--ta-radius-md) 0 0; }
.tc-grid-header__trail[data-tc-trail="1"] { background: var(--tc-color-1); color: #fff; border-bottom: 3px solid color-mix(in srgb, var(--tc-color-1) 55%, #000); border-left: none; }
.tc-grid-header__trail[data-tc-trail="2"] { background: var(--tc-color-2); color: #fff; border-bottom: 3px solid color-mix(in srgb, var(--tc-color-2) 55%, #000); border-left: none; }
.tc-grid-header__trail[data-tc-trail] a         { color: #fff; font-weight: 700; }
.tc-grid-header__trail[data-tc-trail] a:hover   { opacity: 0.85; color: #fff; }

/* Grid value columns — subtle tint for column tracking while scrolling */
.tc-grid-value[data-tc-trail="0"] { background: rgba(26,111,173,0.04); }
.tc-grid-value[data-tc-trail="1"] { background: rgba(184,76,12,0.04);  }
.tc-grid-value[data-tc-trail="2"] { background: rgba(107,53,168,0.04); }

/* At-a-glance sentence trail name spans */
.tc-trail-name[data-tc-trail="0"] { color: var(--tc-color-0); }
.tc-trail-name[data-tc-trail="1"] { color: var(--tc-color-1); }
.tc-trail-name[data-tc-trail="2"] { color: var(--tc-color-2); }


/* ═══════════════════════════════════════════════════════
   SHARED CARD BASE
   ═══════════════════════════════════════════════════════ */

.tc-card {
    background:    var(--ta-snow);
    border:        1px solid var(--ta-stone);
    border-radius: var(--ta-radius-lg);
    padding:       1.5rem 1.75rem;
    box-shadow:    var(--ta-shadow);
    margin-bottom: 1.25rem;
}

.tc-card-heading {
    font-size:      1.05rem !important;
    font-weight:    700 !important;
    letter-spacing: -0.01em !important;
    color:          var(--ta-ink) !important;
    margin:         0 0 1rem !important;
    padding-bottom: 0.72rem !important;
    border-bottom:  1px solid var(--ta-stone) !important;
    line-height:    1.3 !important;
}


/* ═══════════════════════════════════════════════════════
   SUMMARY
   ═══════════════════════════════════════════════════════ */

.tc-summary .tc-card-heading { margin-bottom: 0.75rem !important; }

.tc-summary__list { list-style: none; margin: 0; padding: 0; }

.tc-summary__list li {
    font-size:     0.88rem;
    line-height:   1.55;
    color:         var(--ta-ink);
    padding:       0.46rem 0;
    border-bottom: 1px solid var(--ta-stone);
}

.tc-summary__list li:last-child { border-bottom: none; padding-bottom: 0; }
.tc-summary__list strong        { color: var(--ta-forest); }


/* ═══════════════════════════════════════════════════════
   FIELD SELECTOR
   ═══════════════════════════════════════════════════════ */

.tc-selector-toggle {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    background: none; border: none; border-bottom: 1px solid var(--ta-stone);
    padding: 0 0 0.72rem; cursor: pointer; font-size: 1.05rem; font-weight: 700;
    color: var(--ta-ink); font-family: inherit; text-align: left; letter-spacing: -0.01em;
}

.tc-selector-toggle:hover { color: var(--ta-forest); }
.tc-selector-body         { padding-top: 0.5rem; }

.tc-field-group               { border-top: 0.5px solid rgba(25,25,25,0.1); }
.tc-field-group:first-of-type { border-top: none; }

.tc-group-toggle {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 9px 0; background: none; border: none; cursor: pointer;
    font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--ta-slate); font-family: inherit; text-align: left;
}

.tc-group-toggle:hover { color: var(--ta-ink); }

.tc-chevron-icon {
    flex-shrink: 0; color: var(--ta-slate-lt); transition: transform 0.2s ease; margin-left: 0.4rem;
}

.tc-chevron-icon.is-open { transform: rotate(180deg); }

.tc-field-toggles { display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0.35rem 0 0.7rem; }

.tc-toggle {
    display: inline-flex; align-items: center; gap: 0.3rem;
    background: var(--ta-snow); border: 1px solid var(--ta-stone-dark); border-radius: 99px;
    cursor: pointer; font-size: 0.71rem; font-weight: 600; padding: 0.22rem 0.65rem;
    color: var(--ta-slate); transition: background 0.12s, border-color 0.12s, color 0.12s;
    user-select: none; line-height: 1.4;
}

.tc-toggle:has(input:checked)              { background: var(--ta-forest); border-color: var(--ta-forest); color: #fff; }
.tc-toggle:hover:not(:has(input:checked))  { border-color: var(--ta-teal); color: var(--ta-forest); }
.tc-toggle input                            { display: none; }

.tc-badge-premium {
    background: var(--ta-trail); border-radius: 99px; color: var(--ta-forest-dark);
    font-size: 0.58rem; font-weight: 700; letter-spacing: 0.05em; padding: 0.1em 0.4em; text-transform: uppercase;
}


/* ═══════════════════════════════════════════════════════
   CSS GRID COMPARISON LAYOUT
   ═══════════════════════════════════════════════════════ */

.tc-compare-grid {
    position: sticky;
    top: 0;
    margin-bottom: 1.25rem;
    /* Custom properties for column sizing — overridden per variant below */
    --tc-label-w:   200px;
    --tc-insight-w: 0px;
    --tc-trail-count: 2;
}

/* 2 trails, no insight (--tc-cols:3) */
.tc-compare-grid[style*="--tc-cols:3"] {
    --tc-trail-count: 2;
    --tc-insight-w:   0px;
}

/* 2 trails + insight (--tc-cols:4) */
.tc-compare-grid[style*="--tc-cols:4"] {
    --tc-trail-count: 2;
    --tc-insight-w:   200px;
}

/* 3 trails, no insight (--tc-cols:4) also hits above — override with 3 trails */
/* We distinguish by checking for 3 trail headers in JS, but CSS can't do that.
   We handle 3-trail correctly because PHP sets --tc-cols:4 for 3-trail no-insight
   and --tc-cols:5 for 3-trail with insight. */

/* 3 trails + insight (--tc-cols:5) */
.tc-compare-grid[style*="--tc-cols:5"] {
    --tc-trail-count: 3;
    --tc-insight-w:   155px;
}

/* ── Shared grid template for header and rows ── */
.tc-grid-header,
.tc-grid-row {
    display:               grid;
    grid-template-columns: var(--tc-label-w) repeat(var(--tc-trail-count), 1fr) var(--tc-insight-w);
    align-items:           stretch;
    min-width:             460px;
}

/* When insight col is 0px, hide it entirely */
.tc-compare-grid[style*="--tc-cols:3"] .tc-grid-header__insight,
.tc-compare-grid[style*="--tc-cols:3"] .tc-grid-insight           { display: none; }


/* ── Sticky trail header ── */
.tc-grid-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: transparent;
    overflow: hidden;
    margin-bottom: 1.25rem;
    padding: 0 1.75rem;
}

@media screen and (max-width: 782px) { .tc-grid-header  { top: 46px; } }
body:not(.admin-bar) .tc-grid-header { top: 0; }

.tc-grid-header__label,
.tc-grid-header__trail,
.tc-grid-header__insight {
    padding:     0.8rem 1rem;
    font-size:   0.82rem;
    font-weight: 700;
    line-height: 1.3;
}

.tc-grid-header__label { color: var(--ta-ink); }

.tc-grid-header__insight {
    border-left: 1px solid rgba(255,255,255,0.12);
}

.tc-grid-header__trail h3, .tc-grid-header__insight h3 {
    color: #fff; text-decoration: none; font-weight: 700;font-size: var(--wp--preset--font-size--medium);
}
.tc-grid-header__trail a:hover { color: var(--ta-trail); text-decoration: none; }

/* ── Season stack (compare page) ── */
.tc-group-section--season {
    grid-column: 1 / -1; /* span full grid width */
}

.tc-season-stack {
    display:        flex;
    flex-direction: column;
    gap:            0;
}

.tc-season-row {
    display:     flex;
    align-items: center;
    gap:         1rem;
    padding:     0.65rem 1rem;
    border-top:  1px solid var(--ta-stone);
}

.tc-season-row:first-child { border-top: none; }

.tc-season-label {
    flex-shrink: 0;
    width:       160px;
    font-size:   0.78rem;
    font-weight: 700;
    padding:     0.2rem 0.5rem 0.2rem 0.65rem;
    border-radius: var(--ta-radius-sm);
}

/* Colour the trail name labels to match the trail colour scheme */
.tc-season-label[data-tc-trail="0"] { background: rgba(26,111,173,0.1);  color: var(--tc-color-0); border-left: 3px solid var(--tc-color-0); }
.tc-season-label[data-tc-trail="1"] { background: rgba(184,76,12,0.1);   color: var(--tc-color-1); border-left: 3px solid var(--tc-color-1); }
.tc-season-label[data-tc-trail="2"] { background: rgba(107,53,168,0.1);  color: var(--tc-color-2); border-left: 3px solid var(--tc-color-2); }

.tc-season-bar {
    flex: 1;
    min-width: 0;
}

/* Scale the season bar down slightly for the compare context */
.tc-season-bar .season-months {
    gap: 3px;
}

.tc-season-bar .month-bar-fill {
    height: 28px;
}

/* ── Group sections ── */
.tc-group-section {
    background: var(--ta-snow);
    border:     1px solid var(--ta-stone);
    overflow:   hidden;
}

@media screen and (max-width: 782px)   { .tc-group-header { top: calc(46px + 2.8rem); } }
body:not(.admin-bar) .tc-group-header  { top: 2.8rem; }

.tc-group-header span {
    font-size:      0.61rem;
    font-weight:    700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color:          var(--ta-slate-lt);
    line-height:    1.4;
}


/* ── Data rows ── */
.tc-grid-row {
    border-bottom: 1px solid var(--ta-stone);
    position:      relative;
    transition:    background 0.1s;
}

.tc-grid-row:last-child { border-bottom: none; }

/* Alternating stripe — nth-of-type is unaffected by x-show */
.tc-grid-row:nth-of-type(odd) .tc-grid-label,
.tc-grid-row:nth-of-type(odd) .tc-grid-value,
.tc-grid-row:nth-of-type(odd) .tc-grid-insight { background: var(--ta-parchment); }

.tc-grid-row:hover .tc-grid-label,
.tc-grid-row:hover .tc-grid-value   { background: #f8f3ec; }
.tc-grid-row:hover .tc-grid-insight { background: #f0ebe0; }

.tc-grid-row--differs .tc-grid-label,
.tc-grid-row--differs .tc-grid-value { background: #fdf7eb !important; }
.tc-grid-row--differs:hover .tc-grid-label,
.tc-grid-row--differs:hover .tc-grid-value { background: #f7f0de !important; }


/* ── Row cells ── */
.tc-grid-label {
    padding:        0.54rem 1rem;
    font-size:      0.71rem !important;
    font-weight:    600 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color:          var(--ta-slate) !important;
    display:        flex;
    align-items:    center;
    gap:            0.3rem;
    line-height:    1.4;
}

.tc-grid-value {
    padding:     0.54rem 1rem;
    border-left: 1px solid var(--ta-stone);
    color:       var(--ta-ink);
    font-weight: 500;
    font-size:   0.82rem;
    display:     flex;
    align-items: center;
    line-height: 1.4;
    flex-wrap:   wrap;
    gap:         0.25rem;
}

.tc-grid-insight {
    padding:     0.54rem 0.75rem;
    border-left: 1px solid var(--ta-stone);
    background:  #f9f5ef;
    display:     flex;
    align-items: center;
    line-height: 1.4;
}


/* ── Tooltips ── */
.tc-grid-row[data-tooltip]:not([data-tooltip=""]) { cursor: help; }

.tc-grid-row[data-tooltip]:not([data-tooltip=""])::after {
    content: attr(data-tooltip); position: absolute;
    bottom: calc(100% + 6px); left: 0; background: var(--ta-ink); color: #fff;
    font-size: 0.68rem; font-weight: 400; line-height: 1.5; padding: 0.36rem 0.6rem;
    border-radius: 5px; width: max-content; max-width: 260px; white-space: normal;
    opacity: 0; pointer-events: none; transition: opacity 0.13s ease; z-index: 200;
}

.tc-grid-row[data-tooltip]:not([data-tooltip=""])::before {
    content: ''; position: absolute; bottom: calc(100% + 2px); left: 13px;
    border: 4px solid transparent; border-top-color: var(--ta-ink);
    opacity: 0; pointer-events: none; transition: opacity 0.13s ease; z-index: 200;
}

.tc-grid-row[data-tooltip]:not([data-tooltip=""]):hover::after,
.tc-grid-row[data-tooltip]:not([data-tooltip=""]):hover::before { opacity: 1; }


/* ── Helpers ── */
.tc-empty    { color: var(--ta-slate-lt); font-size: 0.75rem; }
.tc-yes      { color: var(--badge-green-fg); font-weight: 600; }
.tc-no       { color: var(--badge-red-fg);   font-weight: 600; }
.tc-unit     { font-size: 0.78em; color: var(--ta-slate-lt); }
.tc-currency { font-weight: 600; color: var(--ta-ink); }

.tc-differs-dot {
    display: inline-block; width: 5px; height: 5px;
    border-radius: 50%; background: var(--ta-trail-dark); flex-shrink: 0;
}

.tc-insight {
    display: inline-block; font-size: 0.71rem; font-weight: 600;
    color: var(--ta-forest); background: var(--ta-parchment);
    border: 1px solid var(--ta-stone-dark); border-radius: 99px;
    padding: 0.14rem 0.52rem; white-space: nowrap; line-height: 1.4;
}

.tc-insight--same {
    color: var(--badge-teal-fg); background: var(--badge-teal-bg); border-color: transparent;
}

.tc-insight--text {
    background: none; border-color: transparent; padding-left: 0; padding-right: 0;
    color: var(--ta-ink); font-weight: 500;
}

.tc-tax-terms { display: flex; flex-wrap: wrap; gap: 0.28rem; }

.tc-tax-term {
    display: inline-block; font-size: 0.66rem; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase; padding: 0.16rem 0.5rem;
    border-radius: 99px; background: var(--badge-teal-bg); color: var(--badge-teal-fg);
    border: 1px solid var(--ta-stone-dark); text-decoration: none;
    transition: background 0.12s, border-color 0.12s, color 0.12s; line-height: 1.4;
}

a.tc-tax-term:hover { background: var(--ta-teal); border-color: var(--ta-teal); color: #fff; text-decoration: none; }


/* ═══════════════════════════════════════════════════════
   RELATED
   ═══════════════════════════════════════════════════════ */

.tc-related .tc-card-heading { margin-bottom: 0.75rem !important; }

.tc-related__list { display: flex; flex-wrap: wrap; gap: 0.38rem; list-style: none; padding: 0; margin: 0; }

.tc-related__list a {
    display: inline-block; background: var(--ta-parchment); border: 1px solid var(--ta-stone-dark);
    border-radius: 99px; color: var(--ta-forest); font-size: 0.76rem; font-weight: 600;
    padding: 0.28rem 0.82rem; text-decoration: none; line-height: 1.4;
    transition: background 0.12s, border-color 0.12s;
}

.tc-related__list a:hover { background: var(--ta-stone); border-color: var(--ta-teal); color: var(--ta-forest-dark); text-decoration: none; }


/* ═══════════════════════════════════════════════════════
   COMPARE BUTTONS
   ═══════════════════════════════════════════════════════ */

body .tc-btn-add {
    display: inline-flex; align-items: center; gap: 0.3rem;
    background: #608a80cc; border: 1.5px solid var(--ta-stone-dark); border-radius: 99px;
    color: var(--ta-snow); cursor: pointer; font-size: 0.67rem; font-weight: 700;
    letter-spacing: 0.05em; text-transform: uppercase; padding: 0.26rem 0.7rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s; line-height: 1.4; font-family: inherit;
    margin-top: 10px;
}

body .tc-btn-add:hover,
body .tc-btn-add--active { background: var(--ta-forest); border-color: var(--ta-forest); color: #fff; }

.tc-single-compare { margin-top: 0.75rem; position: absolute; top: 0; right: 0; }

.tc-btn-single {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: var(--ta-forest); border: none; border-radius: var(--ta-radius-sm);
    color: #fff; cursor: pointer; font-size: 0.82rem; font-weight: 600;
    padding: 0.54rem 1.2rem; transition: background 0.15s; font-family: inherit; line-height: 1.4;
}

.tc-btn-single:hover { background: var(--ta-forest-dark); }


/* ═══════════════════════════════════════════════════════
   FLOATING COMPARE BAR
   ═══════════════════════════════════════════════════════ */

.tc-compare-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    background: var(--ta-forest-dark); box-shadow: 0 -2px 20px rgba(28,28,24,0.2);
    border-top: 1px solid rgba(255,255,255,0.07);
}

.tc-compare-bar__inner {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1400px; margin: 0 auto; padding: 0.6rem 1.5rem; gap: 1rem;
}

.tc-compare-bar__trails {
    display: flex; gap: 0.45rem; list-style: none; margin: 0; padding: 0; flex: 1; flex-wrap: wrap;
}

.tc-compare-bar__trail {
    display: flex; align-items: center; gap: 0.35rem;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.16); border-radius: 99px;
    padding: 0.24rem 0.65rem; font-size: 0.76rem; font-weight: 600; color: #fff; line-height: 1.4;
}

.tc-compare-bar__remove {
    background: none; border: none; color: rgba(255,255,255,0.48);
    cursor: pointer; font-size: 0.95rem; line-height: 1; padding: 0; transition: color 0.12s;
}
.tc-compare-bar__remove:hover { color: var(--ta-trail); }

.tc-compare-bar__slot {
    border: 1px dashed rgba(255,255,255,0.18); border-radius: 99px;
    font-size: 0.7rem; transition: border-color 0.15s, background 0.15s;
}
.tc-compare-bar__slot:hover {
    border-color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.07);
}
.tc-compare-bar__slot-btn {
    background: none; border: none; padding: 0.24rem 0.65rem;
    color: rgba(255,255,255,0.4); font-size: inherit; cursor: pointer;
    display: block; width: 100%;
}
.tc-compare-bar__slot:hover .tc-compare-bar__slot-btn { color: rgba(255,255,255,0.75); }

.tc-compare-bar__actions { display: flex; gap: 0.45rem; flex-shrink: 0; }
.tc-compare-bar__count   { font-size: 0.8em; opacity: 0.65; }

/* ── Unit & currency toggle ─────────────────────────────────────────────── */

#ta-unit-toggle {
    display:         flex;
    align-items:     center;
    gap:             0.25rem;
    background:      var(--ta-slate);
    border-radius:   2rem;
    padding:         0.3rem 0.5rem;
}

.ta-unit-toggle__group {
    display:    flex;
    gap:        0.1rem;
}

.ta-unit-toggle__sep {
    width:            1px;
    height:           1.1rem;
    background:       rgba(255,255,255,0.2);
    margin:           0 0.2rem;
}

.ta-unit-toggle__btn {
    background:    transparent;
    border:        none;
    color:         rgba(255,255,255,0.5);
    font-size:     0.72rem;
    font-weight:   600;
    line-height:   1;
    padding:       0.25rem 0.4rem;
    border-radius: 1rem;
    cursor:        pointer;
    transition:    background 0.15s, color 0.15s;
}

.ta-unit-toggle__btn:hover {
    color: rgba(255,255,255,0.85);
}

.ta-unit-toggle__btn.is-active {
    background: rgba(255,255,255,0.18);
    color:      #fff;
}

.tc-btn {
    border: none; border-radius: var(--ta-radius-sm); cursor: pointer;
    font-size: 0.8rem; font-weight: 700; padding: 0.44rem 1rem;
    transition: background 0.15s, opacity 0.15s; font-family: inherit; line-height: 1.4;
}

.tc-btn--compare { background: var(--ta-trail); color: var(--ta-forest-dark); }
.tc-btn--compare:hover:not(:disabled) { background: var(--ta-trail-dark); color: #fff; }
.tc-btn--compare:disabled             { opacity: 0.38; cursor: not-allowed; }
.tc-btn--clear { background: transparent; color: rgba(255,255,255,0.65); border: 1px solid rgba(255,255,255,0.22); }
.tc-btn--clear:hover { background: rgba(255,255,255,0.09); color: #fff; }

body:has(.tc-compare-bar[style]:not([style*="display: none"])) { padding-bottom: 58px; }


/* ═══════════════════════════════════════════════════════
   PICKER MODAL
   ═══════════════════════════════════════════════════════ */

.tc-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; }
.tc-modal__backdrop { position: absolute; inset: 0; background: rgba(28,28,24,0.5); backdrop-filter: blur(2px); }
.tc-modal__box { position: relative; background: var(--ta-snow); border: 1px solid var(--ta-stone); border-radius: var(--ta-radius-lg); box-shadow: var(--ta-shadow-lg); padding: 1.75rem; width: min(460px, 90vw); max-height: 80vh; overflow-y: auto; }
.tc-modal__box h2 { font-size: 1.0rem !important; font-weight: 700 !important; color: var(--ta-ink) !important; margin: 0 0 0.75rem !important; padding-bottom: 0.65rem !important; border-bottom: 1px solid var(--ta-stone) !important; line-height: 1.3 !important; }
.tc-modal__close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--ta-slate-lt); line-height: 1; transition: color 0.12s; }
.tc-modal__close:hover { color: var(--ta-ink); }
.tc-modal__search { width: 100%; border: 1.5px solid var(--ta-stone-dark); border-radius: var(--ta-radius-sm); font-size: 0.88rem; margin-top: 0.7rem; padding: 0.52rem 0.85rem; color: var(--ta-ink); outline: none; box-sizing: border-box; font-family: inherit; transition: border-color 0.15s; }
.tc-modal__search:focus { border-color: var(--ta-teal); box-shadow: 0 0 0 3px rgba(58,158,138,0.1); }
.tc-modal__results ul { list-style: none; margin: 0.55rem 0 0; padding: 0; border: 1px solid var(--ta-stone); border-radius: var(--ta-radius-md); overflow: hidden; }
.tc-modal__result { background: none; border: none; border-bottom: 1px solid var(--ta-stone); color: var(--ta-ink); cursor: pointer; display: block; font-size: 0.84rem; font-weight: 500; padding: 0.58rem 0.85rem; text-align: left; width: 100%; transition: background 0.1s; font-family: inherit; }
.tc-modal__result:last-child { border-bottom: none; }
.tc-modal__result:hover:not(:disabled) { background: var(--ta-parchment); color: var(--ta-forest); }
.tc-modal__result:disabled { color: var(--ta-slate-lt); cursor: not-allowed; }
.tc-modal__loading, .tc-modal__empty { color: var(--ta-slate); font-size: 0.82rem; margin-top: 0.7rem; text-align: center; padding: 0.7rem; }


/* ═══════════════════════════════════════════════════════
   ALPINE
   ═══════════════════════════════════════════════════════ */

[x-cloak] { display: none !important; }

.tc-bar-enter        { transition: transform 0.25s ease; }
.tc-bar-enter-start  { transform: translateY(100%); }
.tc-bar-enter-end    { transform: translateY(0); }
.tc-bar-leave        { transition: transform 0.2s ease; }
.tc-bar-leave-start  { transform: translateY(0); }
.tc-bar-leave-end    { transform: translateY(100%); }


/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media (max-width: 680px) {
    .tc-grid-header__insight,
    .tc-grid-insight          { display: none; }
    .tc-compare-grid          { --tc-label-w: 100px; }
    .tc-grid-label,
    .tc-grid-value            { padding: 0.44rem 0.6rem; font-size: 0.76rem !important; }
    .tc-grid-header__label,
    .tc-grid-header__trail    { padding: 0.65rem 0.6rem; font-size: 0.76rem; }
    .tc-compare-bar__inner    { flex-direction: column; align-items: stretch; padding: 0.55rem 1rem; gap: 0.4rem; }
    .tc-compare-bar__actions  { justify-content: flex-end; }

    .tc-compare-heroes        { flex-direction: column; }
    .tc-compare-heroes__vs    { writing-mode: horizontal-tb; width: auto; height: 2rem; }
}

/* ── Compare page: sticky left column (filters + map) ── */
.tc-compare-page .wp-block-columns {
    align-items: flex-start; /* prevent column stretching — required for sticky to work */
}

.tc-compare-page .wp-block-columns > .wp-block-column:first-child {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    scrollbar-width: thin;
}

.admin-bar .tc-compare-page .wp-block-columns > .wp-block-column:first-child {
    top: calc(32px + 1rem);
    max-height: calc(100vh - 32px - 2rem);
}

@media (max-width: 781px) {
    /* Disable sticky on mobile — columns stack vertically */
    .tc-compare-page .wp-block-columns > .wp-block-column:first-child {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
}