/* ==========================================================================
   Polish layer — visual refinements only. All motion lives in motion.css,
   which loads after this file (v6). Don't add transitions/animations here.
   ========================================================================== */

/* ---------- Background: same multi-color wash, now static ----------
   Was a full hue-rotate every 6s, then a 40s drift. v5 removes the loop: an
   endless animation on a full-screen layer cost GPU memory and battery on every
   page for motion nobody could perceive. (style.css's mav-hue rule is deleted too.) */
body::before {
  inset: -12%;
  background:
    radial-gradient(60% 55% at 12% 4%, rgba(var(--brand-rgb, 22,104,227),.20), transparent 70%),
    radial-gradient(55% 50% at 92% 6%, rgba(255,184,28,.20), transparent 68%),
    radial-gradient(60% 60% at 90% 94%, rgba(233,72,110,.13), transparent 70%),
    radial-gradient(60% 55% at 6% 94%, rgba(52,168,83,.14), transparent 70%),
    radial-gradient(50% 45% at 50% 50%, rgba(140,110,240,.08), transparent 72%);
  animation: none;
}

/* ---------- Type rhythm ---------- */
.home-title { letter-spacing: -.015em; line-height: 1.12; }
.home-title, .home-section-label, .xds-h { text-wrap: balance; }
/* category row scrolls sideways on small screens: fade the edge so it reads as scrollable */
@media (max-width: 760px) {
  .hw-tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); scrollbar-width: none; }
  .hw-tabs::-webkit-scrollbar { display: none; }
}
.home-section-label { font-size: 1.4rem; letter-spacing: -.015em; margin: 2.6rem 0 1rem; }
.xds-h { letter-spacing: -.015em; }

/* ---------- Top nav: refined active state ---------- */
@media (min-width: 1201px) {
  .nav-group.active-group > .nav-group-btn,
  .nav-group.open > .nav-group-btn { background: transparent; border-bottom-color: transparent; position: relative; }
  .nav-group.active-group > .nav-group-btn::after {
    content: ""; position: absolute; left: 1rem; right: 1rem; bottom: 0; height: 3px;
    border-radius: 3px 3px 0 0; background: var(--brand, #1668e3);
  }
  .nav-group.open > .nav-group-btn { color: var(--ink, #191e3b); }
  /* dropdown panel (moved from motion.css in v6 — it's visual, not motion) */
  .nav-group-menu {
    top: calc(100% - 6px); border: 1px solid var(--line, #e6e7ee); border-radius: 18px; padding: .4rem;
    box-shadow: 0 2px 6px rgba(var(--shade, 25,30,59),.06), 0 22px 48px rgba(var(--shade, 25,30,59),.18);
  }
  .nav-group-menu .tab { border-radius: 11px; border-left: none; }
  .nav-group-menu .tab.active { border-left: none; box-shadow: inset 3px 0 0 var(--brand, #1668e3); }
}
.auth-dropdown { border-radius: 18px; }
.photo-card .pc-body { position: relative; background: #fff; }

/* ---------- "Explore all tools": aligned, compact, even rows ---------- */
.home-grid { max-width: none; gap: .9rem; }
@media (min-width: 1150px) { .home-grid { grid-template-columns: repeat(7, 1fr); } }
.home-card {
  padding: 1.25rem .7rem 1.1rem; border-radius: 16px; gap: .2rem;
  border-color: var(--line, #e6e7ee); box-shadow: 0 1px 2px rgba(var(--shade, 25,30,59),.04);
}
.home-card:hover { border-color: var(--brand-200, #cfd9f2); box-shadow: 0 10px 24px rgba(var(--shade, 25,30,59),.10); }
.home-ico {
  width: 52px; height: 52px; margin-bottom: .55rem; font-size: 1.55rem;
  background: #f0f4fd; box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb, 22,104,227),.08);
}
.home-card:hover .home-ico { background: #e3ecfd; }
.home-name { font-size: .97rem; color: var(--ink, #191e3b); }
.home-desc { font-size: .78rem; color: var(--muted, #5f5f65); }

/* ---------- Photo cards: crisper edges ---------- */
.photo-card { border-color: var(--line, #e6e7ee); box-shadow: 0 1px 2px rgba(var(--shade, 25,30,59),.05); }
.pc-heart { width: 32px; height: 32px; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); color: #b4b8c6; }

/* ---------- Destination cards: placeholder until the photo arrives (shimmer: motion.css) ---------- */
.xds-card { border-color: var(--line, #e6e7ee); }
.xds-img:not([style*="background-image"]) {
  background-image: linear-gradient(100deg, var(--surface-3, #e6eaf3) 30%, var(--surface-2, #f3f5fa) 50%, var(--surface-3, #e6eaf3) 70%);
  background-size: 300% 100%;
}

/* ---------- Keyboard focus: one consistent ring ---------- */
:is(button, a, [role="button"]):focus-visible {
  outline: 2px solid var(--brand, #1668e3); outline-offset: 2px;
}
.photo-card:focus-visible, .home-card:focus-visible, .xds-card:focus-visible { outline-offset: 3px; }


/* ==========================================================================
   Polish pass 2 — consistency across tabs
   ========================================================================== */

/* Trains: helper line sits quietly under the fields like the other tabs */
#tab-trains .flt-controls { justify-content: flex-start; margin-top: .55rem; padding: 0 .4rem; }
#tab-trains .flt-controls span { color: var(--muted-2, #8a8fa3) !important; }

/* Cruises: native selects → same field style as every other search */
.cruise-form { padding: .8rem; border-color: var(--line, #e6e7ee); box-shadow: 0 1px 2px rgba(var(--shade, 25,30,59),.04); align-items: center; }
.cruise-form input, .cruise-form select { min-height: 54px; border-color: var(--line-strong, #c9ccd8); transition: border-color .15s, box-shadow .15s; } /* color-only: fine here */
.cruise-form input:focus, .cruise-form select:focus { border-color: var(--brand, #1668e3); box-shadow: 0 0 0 1px var(--brand, #1668e3); }
.cruise-form select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23191e3b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}

/* Cruise line cards: deeper shadow on hover (the lift + arrow nudge are in motion.css) */
.cruise-card em { display: inline-block; }
@media (hover: hover) and (pointer: fine) {
  .cruise-card:hover { box-shadow: 0 16px 34px rgba(var(--shade, 15,20,40),.28); }
}

/* Trip Planner wizard: brand navy instead of flat black */
.wizard-header { background: linear-gradient(135deg, var(--ink, #191e3b) 0%, var(--brand-deep, #14417e) 100%); padding: 1.3rem 1.6rem 1.2rem; }
.wizard-header h2 { font-weight: 600; letter-spacing: -.015em; }

/* My Trip: hide the empty trip-length badge */
.trip-duration:empty { display: none; }

/* Footer: one continuous block instead of three bands */
footer:not(.site-footer) {
  background: #f6f6f9; color: var(--muted-2, #8a8fa3); padding: 0 1rem 1.4rem; font-size: .76rem;
}
.site-footer { border-top: none; padding-bottom: .7rem; }
.footer-link { text-underline-offset: 3px; text-decoration-color: rgba(95,95,101,.35); transition: color .15s, text-decoration-color .15s; }
.footer-link:hover { color: var(--brand, #1668e3); text-decoration-color: currentColor; }

/* Newsletter band: input + button share one rounded group */
.nl-signup-form input { border-radius: 10px; }
.nl-signup-btn { border-radius: 10px; }
.nl-signup-btn:hover { filter: brightness(1.05); }

/* Right-rail product cards: hover shadow + tint (lift + arrow nudge are in motion.css) */
@media (hover: hover) and (pointer: fine) {
  .flt-gear-card:hover { box-shadow: 0 8px 20px rgba(var(--shade, 25,30,59),.10); border-color: var(--brand-200, #cfd9f2); }
}
.flt-gear-btn { display: inline-block; }

/* Cruises: destination field gets the extra room its placeholder needs */
.cruise-form input { flex: 1.8 1 300px; }

/* ==========================================================================
   Polish pass 3 — one field style everywhere, lighter tab switches
   ========================================================================== */

/* Every plain search form (Campsites, Trails, Gas, Fishing, Budget) gets the
   same field: 48px tall, 12px corners, quiet border, blue focus, custom chevron. */
:is(.search-row, .trails-filters, .zip-search-row, .budget-add-row) :is(input[type="text"], input[type="number"], input:not([type]), select),
.zip-input-wrap, .budget-limit-input {
  min-height: 48px; border: 1px solid var(--line-strong, #c9ccd8); border-radius: 12px;
  background-color: #fff; color: var(--ink, #191e3b); font-size: .95rem; font-weight: 500;
  transition: border-color .15s, box-shadow .15s;
}
.zip-input-wrap input { min-height: 0; border: 0; box-shadow: none; }
.budget-limit-input { min-height: 40px; }
:is(.search-row, .trails-filters, .zip-search-row, .budget-add-row) :is(input, select):focus,
.zip-input-wrap:focus-within, .budget-limit-input:focus {
  outline: none; border-color: var(--brand, #1668e3); box-shadow: 0 0 0 1px var(--brand, #1668e3);
}
:is(.search-row, .trails-filters, .zip-search-row, .budget-add-row) select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding: 0 2.5rem 0 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23191e3b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}
:is(.search-row, .trails-filters, .zip-search-row, .budget-add-row) input::placeholder { color: var(--muted-2, #8a8fa3); font-weight: 400; }
.search-card { border-color: var(--line, #e6e7ee); box-shadow: 0 1px 2px rgba(var(--shade, 25,30,59),.04); border-radius: 16px; }
.search-card h2 { letter-spacing: -.01em; }
.search-divider { color: #9a9eb0; }

/* "★ Save": a quiet pill that matches the fields instead of a tan tag */
.save-search-btn {
  min-height: 44px; padding: 0 1.1rem; border-radius: 999px;
  border: 1px solid var(--line-strong, #c9ccd8); color: var(--ink-2, #43485e); background: #fff; font-weight: 600;
}
.save-search-btn:hover { background: #fff; border-color: var(--brand, #1668e3); color: var(--brand, #1668e3); }
.save-search-btn.saved { background: var(--brand-50, #eef4ff); color: var(--brand-deep, #14417e); border-color: var(--brand, #1668e3); }

/* Budget: summary tiles + chips match the rest of the site */
.budget-summary-card { border-radius: 16px; border-color: var(--line, #e6e7ee); }
.budget-summary-value { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* Members-only cards (Trip Agent etc.) sit centred, not stranded on the left */
.agent-gate { margin: 1.5rem auto 0; box-shadow: 0 12px 32px rgba(var(--shade, 25,30,59),.08); }

/* Long result lists: let the browser skip painting cards far off-screen */
:is(.fish-card, .trail-card, .camp-card):nth-child(n+13) { content-visibility: auto; contain-intrinsic-size: auto 320px; }

/* Wrapped inputs: the wrapper is the field, the inner input is bare */
.budget-amount-wrap {
  min-height: 48px; border: 1px solid var(--line-strong, #c9ccd8); border-radius: 12px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.budget-amount-wrap:focus-within, .zip-input-wrap:focus-within { border-color: var(--brand, #1668e3); box-shadow: 0 0 0 1px var(--brand, #1668e3); }
:is(.search-row, .zip-search-row, .budget-add-row) :is(.zip-input-wrap, .budget-amount-wrap) input,
:is(.search-row, .zip-search-row, .budget-add-row) :is(.zip-input-wrap, .budget-amount-wrap) input:focus {
  min-height: 0; border: 0; box-shadow: none; background: transparent; border-radius: 0;
}

/* ==========================================================================
   Polish pass 4 — details
   ========================================================================== */

/* Result cards: border tint on hover only. These lists run long and the cards
   aren't links, so a lift fired on every card the cursor crossed. */
@media (hover: hover) and (pointer: fine) {
  .camp-card:hover, .fish-card:hover, .trail-card:hover { border-color: var(--brand-200, #cfd9f2); }
}

/* Trail links: one primary, two quiet (was blue / green / grey) */
.trail-links .btn-book {
  border-radius: 999px; font-weight: 600;
}
.trail-links .btn-alltrails, .trail-links .btn-site {
  background: #fff !important; color: var(--ink, #191e3b); box-shadow: inset 0 0 0 1px var(--line-strong, #c9ccd8);
}
.trail-links .btn-alltrails:hover, .trail-links .btn-site:hover { color: var(--brand, #1668e3); box-shadow: inset 0 0 0 1px var(--brand, #1668e3); }

/* Numbers that count up: keep digits from jittering */
.gas-price, .budget-summary-value { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Polish pass 5
   ========================================================================== */

/* Headings never strand one word on a line (e.g. the Donate page title) */
h1, h2, h3 { text-wrap: balance; }

/* Home promo band: the Donate button was a pale blue that read as disabled */
.hp-btn { background: #fff; color: var(--ocean-deep, #0f1428); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.hp-btn:hover { background: #e9f0fd; }

/* Right-rail support card: white text on light orange failed contrast.
   Navy card like the promo band, orange kept as the icon accent. */
.support-card--rail {
  flex-direction: row; align-items: center; gap: .75rem;
  background: var(--ink, #191e3b); padding: .85rem .95rem; border-radius: 14px;
  box-shadow: 0 6px 18px rgba(var(--shade, 25,30,59),.18);
}
.support-card--rail .support-ico {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(246,169,59,.2); font-size: 1.15rem;
}
.support-card--rail .support-text strong { font-size: .88rem; line-height: 1.25; }
.support-card--rail .support-text span { font-size: .76rem; line-height: 1.4; color: rgba(255,255,255,.78); opacity: 1; }

/* Destination cards: no photo found → quiet placeholder instead of an endless shimmer */
.xds-img.xds-img--none { position: relative; background-image: linear-gradient(135deg, #e3e9f6, #f1f3f9); }
.xds-img--none::after { content: "📍"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.6rem; opacity: .4; }

/* Cars: pick-up / drop-off get room for their placeholders; times can be narrower */
.flt-search-panel .car-form .flt-field:has(#car-loc),
.flt-search-panel .car-form .flt-field:has(#car-drop) { flex: 1 1 200px; }
.flt-search-panel .car-form .flt-field:has(input[type=date]) { flex: 1 1 175px; }
.flt-search-panel .car-form .flt-field:has(select) { flex: 1 1 165px; }

/* Footer: same single line on desktop, tidy stacked rows on phones */
@media (max-width: 600px) {
  .site-footer { display: flex; flex-direction: column; align-items: center; gap: .45rem; line-height: 1.5; padding: 1.3rem 1.2rem 1rem; }
  .site-footer .ft-links > .footer-sep:first-child,
  .site-footer .ft-aff > .footer-sep { display: none; }
  .site-footer .ft-aff { font-size: .74rem; color: var(--muted-2, #8a8fa3); max-width: 30ch; }
}

/* Tools grid on phones: compact two-column rows (icon beside text) instead of
   seven rows of tall tiles. Halves the scroll to reach the footer. */
@media (max-width: 600px) {
  .home-grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .home-card {
    display: grid; grid-template-columns: 38px 1fr; column-gap: .65rem; row-gap: .1rem;
    align-items: center; text-align: left; padding: .7rem .75rem; border-radius: 14px;
  }
  .home-ico { grid-row: 1 / span 2; width: 38px; height: 38px; margin: 0; font-size: 1.15rem; }
  .home-name { font-size: .9rem; line-height: 1.2; align-self: end; }
  .home-desc { font-size: .72rem; line-height: 1.3; align-self: start; }
}

/* Phone menu: the panel spans the full width, and groups don't draw the desktop
   dropdown's box border (both inherited from the desktop rules). */
@media (max-width: 1200px) {
  .topnav-links { margin-left: 0; }
  .nav-group-menu { border: none; }
}
