/* ============================================================================
   WildPath Explorers — additive UI layer
   ----------------------------------------------------------------------------
   Loaded after style.css. Contains ONLY new components plus the small contrast
   corrections the vivid palette requires. No existing selector is rewritten.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Inline SVG icons (Lucide, vendored into vendor/icons and inlined into HTML)
   --------------------------------------------------------------------------- */
.wp-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: -0.135em;
  stroke-width: 1.75;
}

/* Buttons should never break onto two lines inside a card. */
.btn-primary,
.btn-outline,
.nav-book-btn {
  white-space: nowrap;
}

.tour-card .tour-footer > div:last-child,
.tfc-footer > div:last-child {
  flex-wrap: wrap;
}

/* Icons sitting in a flex row shouldn't collapse. */
.why-icon .wp-icon,
.payment-icon .wp-icon,
.logo-icon .wp-icon,
.footer-contact-item .wp-icon,
.strip-item .wp-icon,
.trust-item .wp-icon,
.tour-meta .wp-icon,
.tour-meta span .wp-icon {
  width: 1.15em;
  height: 1.15em;
  vertical-align: middle;
}

.tour-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* A location or duration should wrap as a whole label onto its own line
     rather than break mid-phrase ("3 – 7 / Days") in a narrow card. */
  white-space: nowrap;
}

.tour-meta {
  flex-wrap: wrap;
  row-gap: 4px;
}

.why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}

.why-icon .wp-icon {
  width: 1.9rem;
  height: 1.9rem;
  stroke-width: 1.5;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}

.logo-icon .wp-icon {
  width: 1.7rem;
  height: 1.7rem;
  stroke-width: 1.75;
}

.wp-icon-lg {
  display: flex;
  justify-content: center;
  color: var(--gold);
}

.wp-icon-lg .wp-icon {
  width: 2.4rem;
  height: 2.4rem;
  stroke-width: 1.6;
}

.payment-icon .wp-icon {
  width: 1.6rem;
  height: 1.6rem;
  color: var(--text-mid);
}

.footer-contact-item .wp-icon {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--gold);
  margin-top: 0.2rem;
}

.social-icon .wp-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.payment-logo {
  max-width: 46px;
  max-height: 26px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ---------------------------------------------------------------------------
   Button contrast correction
   Vivid gold (#E8A317) with white text is only 2.2:1 — unreadable and a WCAG
   failure. Dark ink on gold measures 8.2:1 and reads as more premium anyway.
   The hover fill deepens slightly instead of switching to a light text colour.
   --------------------------------------------------------------------------- */
.btn-primary {
  color: var(--ink-900);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #D89A0F 0%, var(--gold) 100%);
  color: var(--ink-900);
}

.nav-book-btn,
.nav-book-btn:hover {
  color: var(--ink-900) !important;
}

.btn-outline:hover {
  color: var(--ink-900);
}

.btn-primary:disabled,
.btn-primary[aria-busy='true'] {
  opacity: 0.72;
  cursor: progress;
  transform: none;
}

/* Visible focus for keyboard users across the whole site. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------------------
   Form validation + submission states
   --------------------------------------------------------------------------- */
.wp-field-error {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #B3261E;
}

.form-control.wp-invalid,
.wp-invalid {
  border-color: #D93025 !important;
  background: #FFF6F5 !important;
}

.wp-form-success,
.wp-form-error {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.wp-form-success {
  background: #EAF7F0;
  border: 1px solid rgba(11, 93, 69, 0.28);
  color: #0B5D45;
}

.wp-form-error {
  background: #FFF6F5;
  border: 1px solid rgba(179, 38, 30, 0.28);
  color: #B3261E;
}

.wp-form-error a {
  color: #B3261E;
  font-weight: 700;
  text-decoration: underline;
}

/* Honeypot — present in the DOM for bots, unreachable for people. */
.wp-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Booking confirmation dialog
   --------------------------------------------------------------------------- */
.wp-confirm-tick {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-mid) 100%);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(11, 93, 69, 0.3);
}

.wp-confirm-tick svg {
  width: 28px;
  height: 28px;
}

/* ---------------------------------------------------------------------------
   Header utility links (account / staff entry)
   --------------------------------------------------------------------------- */
.navbar-links .nav-utility {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-mid);
}

.navbar-links .nav-utility .wp-icon {
  width: 1.05rem;
  height: 1.05rem;
}

/* ---------------------------------------------------------------------------
   Section polish that the richer palette makes possible
   --------------------------------------------------------------------------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gold-divider {
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-bright) 45%, rgba(232, 163, 23, 0) 100%);
  border-radius: 4px;
}

.badge.badge-gold,
.tour-badge,
.tfc-badge.popular {
  background: linear-gradient(135deg, var(--accent-sunset) 0%, #C9451F 100%);
  color: #ffffff;
  letter-spacing: 0.04em;
}

.tour-card,
.tour-full-card,
.why-card,
.testimonial-card,
.payment-item {
  transition: transform var(--transition), box-shadow var(--transition);
}

.tour-card:hover,
.tour-full-card:hover {
  box-shadow: var(--shadow-lg);
}

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

/* Empty state shown when a dynamic list has nothing to render. */
.wp-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-mid);
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: 16px;
}

.wp-skeleton {
  background: linear-gradient(90deg, #F1EAE0 25%, #FAF6F0 37%, #F1EAE0 63%);
  background-size: 400% 100%;
  animation: wpShimmer 1.4s ease infinite;
  border-radius: 16px;
  min-height: 320px;
}

@keyframes wpShimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ---------------------------------------------------------------------------
   Tour detail dialog
   main.js has always generated .tdetail-* markup, but no stylesheet in the
   project ever defined these classes — the dialog rendered as unstyled text.
   Defined here so the tour pages actually look like the rest of the site.
   --------------------------------------------------------------------------- */
.tour-detail-box {
  max-width: 940px;
  width: 94%;
  padding: 0;
  border-radius: 20px;
  /* The dialog is taller than any phone screen: it must scroll inside itself.
     `overflow: hidden` here used to clip everything below the hero image. */
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  max-height: min(92vh, 100dvh - 24px);
}

/* Keeps the close control pinned to the top of the dialog while it scrolls. */
.td-close-wrap {
  position: sticky;
  top: 0;
  z-index: 6;
  height: 0;
  display: flex;
  justify-content: flex-end;
  padding: 12px 12px 0;
}

.td-close-btn {
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
}

.td-close-btn:hover {
  background: var(--white);
  color: var(--accent-sunset);
}

.tdetail-hero-img-wrap {
  position: relative;
  height: 300px;
  overflow: hidden;
  background: var(--forest);
}

.tdetail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tdetail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 18, 16, 0.15) 0%, rgba(20, 18, 16, 0.82) 100%);
}

.tdetail-hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 30px;
  z-index: 2;
}

.tdetail-hero-content h2 {
  color: var(--white);
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  margin: 12px 0 0;
  line-height: 1.2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.tdetail-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  padding: 7px 14px;
}

/* Category + the admin-entered badge ("Most Popular" …) sit together above
   the title, so a tour's own marketing copy is visible in the dialog too. */
.tdetail-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tdetail-badge {
  background: rgba(255, 255, 255, 0.9);
  color: var(--forest);
  border: 1px solid rgba(255, 255, 255, 0.65);
  letter-spacing: 0.04em;
}

/* Lead paragraph and the long "About this experience" copy. */
.tdetail-summary {
  line-height: 1.8;
  color: var(--text-mid);
  margin: 0 0 22px;
  font-size: 1rem;
}

.tdetail-section .tdetail-prose {
  line-height: 1.85;
  color: var(--text-mid);
  font-size: 0.97rem;
  margin: 0 0 14px;
}

.tdetail-section .tdetail-prose:last-child {
  margin-bottom: 0;
}

.tdetail-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 4px;
  background: var(--ivory);
  border-bottom: 1px solid var(--border);
}

.tdetail-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 22px;
  border-right: 1px solid var(--border);
}

.tdetail-info-item:last-child {
  border-right: none;
}

.tdetail-info-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(232, 163, 23, 0.14);
  color: var(--gold-dark);
}

.tdetail-info-icon .wp-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.tdetail-info-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 3px;
}

.tdetail-info-value {
  display: block;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.35;
}

.tdetail-price-val {
  color: var(--gold-dark);
  font-size: 1.05rem;
}

.tdetail-price-val small {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
}

.tdetail-body {
  padding: 28px 32px 34px;
}

.tdetail-section {
  margin-bottom: 26px;
}

.tdetail-section h3,
.tdetail-col h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.08rem;
  margin-bottom: 14px;
  color: var(--text-dark);
}

.tdetail-list {
  list-style: none;
}

.tdetail-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-mid);
  border-bottom: 1px dashed var(--border);
}

.tdetail-list li:last-child {
  border-bottom: none;
}

.tdetail-check-icon {
  flex: 0 0 auto;
  color: var(--forest-mid);
  margin-top: 1px;
}

.tdetail-itinerary {
  border-left: 2px solid rgba(232, 163, 23, 0.4);
  padding-left: 22px;
  margin-left: 6px;
}

.itinerary-day {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.itinerary-day:last-child {
  margin-bottom: 0;
}

.itinerary-day h4 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--text-dark);
}

.itinerary-day p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-mid);
}

.day-badge {
  flex: 0 0 auto;
  min-width: 66px;
  text-align: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: var(--ink-900);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tdetail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-bottom: 26px;
}

.check-list {
  list-style: none;
}

.check-list li,
.cross-list li {
  position: relative;
  padding: 7px 0 7px 26px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-mid);
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--forest-mid);
  font-weight: 700;
}

.cross-list li::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: var(--accent-clay);
  font-weight: 700;
}

.tdetail-booking-section {
  background: var(--ivory);
  border: 1px dashed rgba(232, 163, 23, 0.55);
  border-radius: 18px;
  padding: 26px 24px;
  margin-bottom: 22px;
}

.tdetail-book-btn {
  padding: 15px 34px;
  font-size: 1rem;
}

.tdetail-footer-actions {
  margin-top: 4px;
}

@media (max-width: 820px) {
  /* A phone gets the whole screen: a 92vh card with rounded corners left the
     dates and the Book button fighting for the bottom third. */
  .tour-detail-box {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .tdetail-hero-img-wrap { height: 210px; }
  .tdetail-hero-content { padding: 18px 20px; }
  .tdetail-info-bar { grid-template-columns: 1fr; }
  .tdetail-info-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 14px 18px;
  }
  .tdetail-body { padding: 22px 20px 26px; }
  .tdetail-row { grid-template-columns: 1fr; gap: 20px; }
  .itinerary-day { gap: 12px; }
  .day-badge { min-width: 56px; }
}

/* Dates & availability inside the details dialog. Fed by wp.loadTourDepartures()
   and the bundled snapshot, so it shows exactly what the booking form will
   offer — never a date the visitor cannot actually book. */
.tdetail-dates-host {
  margin-bottom: 22px;
}

.tdetail-dates-note {
  color: var(--text-mid);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 14px;
}

.tdetail-date-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.tdetail-date-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.94rem;
  color: var(--text-dark);
}

.tdetail-date-when {
  font-weight: 600;
}

.tdetail-date-tag {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-dark);
}

.tdetail-date-tag.out {
  color: #b23b3b;
}

@media (max-width: 480px) {
  .tdetail-date-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* Keep the modal's own scroll container tidy on short screens. */
.tour-detail-box::-webkit-scrollbar { width: 9px; }
.tour-detail-box::-webkit-scrollbar-thumb {
  background: rgba(26, 23, 20, 0.22);
  border-radius: 999px;
}

/* ---------------------------------------------------------------------------
   FAQ accordion
   ---------------------------------------------------------------------------
   Both tours.html and contact.html render this component, but its styles used
   to live in contact.css — which tours.html never links. The tours page FAQ
   therefore rendered as bare browser buttons. Defined here, in the layer every
   page loads, so the two pages cannot drift apart again.
   --------------------------------------------------------------------------- */
.faq-section {
  background: var(--ivory);
  padding: 80px 6%;
}

.faq-container {
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(229, 221, 208, 0.8);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.faq-item:hover {
  border-color: var(--gold);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color var(--transition);
}

.faq-question:hover {
  color: var(--gold-dark);
}

.faq-question:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: -3px;
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 400;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  background: var(--gold);
  color: var(--earth);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0, 1, 0, 1), padding 0.35s ease;
  padding: 0 24px;
  color: var(--text-mid);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 24px 22px 24px;
  transition: max-height 0.4s ease-in-out, padding 0.3s ease;
}

/* ---------------------------------------------------------------------------
   Motion and hover layer
   ---------------------------------------------------------------------------
   Two animation names were referenced across the project but never defined, so
   the hero copy and every scroll-revealed card simply appeared with no motion:
     · `fadeUp`      — index.css, five hero elements
     · `.animate-fade-up` — added by main.js to every .reveal element and
                            emitted by js/site.js on the cards it renders
   Both are defined here, together with the .delay-* stagger steps the markup
   already used. Everything below is additive; no existing selector is rewritten.
   --------------------------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to   { opacity: 1; transform: none; }
}

@keyframes wpFadeUp {
  from { opacity: 0; transform: translate3d(0, 26px, 0); }
  to   { opacity: 1; transform: none; }
}

.animate-fade-up {
  animation: wpFadeUp 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }

/* Photographs: a slow push-in, a colour veil that deepens the base of the
   frame, and a sheen that crosses it once on hover. */
.tour-img-wrap,
.tfc-img-wrap {
  isolation: isolate;
}

.tour-img-wrap img,
.tfc-img-wrap img {
  transform-origin: 50% 42%;
}

.tour-img-wrap::before,
.tfc-img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 93, 69, 0) 42%, rgba(11, 93, 69, 0.5) 100%);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  z-index: 1;
}

.tour-img-wrap::after,
.tfc-img-wrap::after {
  content: '';
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: -70%;
  width: 42%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.36) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-16deg);
  pointer-events: none;
  z-index: 2;
}

.tour-card:hover .tour-img-wrap img,
.tour-full-card:hover .tfc-img-wrap img {
  transform: scale(1.09);
}

.tour-card:hover .tour-img-wrap::before,
.tour-full-card:hover .tfc-img-wrap::before {
  opacity: 1;
}

.tour-card:hover .tour-img-wrap::after,
.tour-full-card:hover .tfc-img-wrap::after {
  animation: wpSheen 0.9s ease forwards;
}

@keyframes wpSheen {
  from { left: -70%; }
  to   { left: 120%; }
}

/* A hairline gold ring plus a warm drop shadow, so a hovered card reads as a
   raised, selectable surface rather than a box that merely moved up. */
.tour-card,
.tour-full-card {
  position: relative;
}

.tour-card::after,
.tour-full-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(232, 163, 23, 0);
  transition: box-shadow 0.45s ease;
  pointer-events: none;
  z-index: 3;
}

.tour-card:hover::after,
.tour-full-card:hover::after {
  box-shadow: inset 0 0 0 1px rgba(232, 163, 23, 0.55);
}

.tour-card:hover,
.tour-full-card:hover {
  box-shadow: var(--shadow-lg), 0 10px 30px rgba(232, 163, 23, 0.16);
}

.tour-badge,
.tfc-badge {
  z-index: 4;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tour-card:hover .tour-badge,
.tour-full-card:hover .tfc-badge {
  transform: translateY(-2px) scale(1.06);
}

.tour-body h3,
.tfc-body h3 {
  transition: color 0.3s ease;
}

.tour-card:hover .tour-body h3,
.tour-full-card:hover .tfc-body h3 {
  color: var(--forest);
}

/* Filter chips: the fill sweeps in from the left instead of snapping on. */
.filter-btn {
  background-image: linear-gradient(120deg, var(--gold) 0%, #F0BE45 100%);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  transition: color 0.25s ease,
              border-color 0.3s ease,
              background-size 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.25s ease,
              box-shadow 0.3s ease;
}

.filter-btn:hover,
.filter-btn:focus-visible {
  background-size: 100% 100%;
  border-color: var(--gold);
  color: var(--earth);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(232, 163, 23, 0.22);
}

.filter-btn.active {
  background-image: linear-gradient(120deg, var(--gold) 0%, #F0BE45 100%);
  background-size: 100% 100%;
  color: var(--earth);
  box-shadow: 0 6px 18px rgba(232, 163, 23, 0.26);
}

.filter-btn:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 2px;
}

/* The remaining card families get the same restrained lift. */
.why-icon {
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.why-card:hover .why-icon {
  transform: translateY(-2px) scale(1.12) rotate(-5deg);
}

.testimonial-card {
  transition: transform var(--transition), box-shadow var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.payment-logo {
  transition: transform 0.35s ease;
}

.payment-item:hover .payment-logo {
  transform: scale(1.08);
}

/* ---------------------------------------------------------------------------
   Card footers and the filter bar
   ---------------------------------------------------------------------------
   Two wrapping problems that only show up once the real catalogue is rendered:
     · A card's price broke across two lines ("From KES" / "45,000/person") and
       the two actions stacked into a ragged column beside it. The footer is now
       a price line with an equal-width action row under it, at every card width.
     · The seven filter chips measured wider than their 900px container, so on a
       desktop window the last chips were clipped behind an invisible scrollbar.
       The bar now wraps and centres instead of hiding its own options.
   --------------------------------------------------------------------------- */
.tour-footer,
.tfc-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: center;
}

.tour-price,
.tfc-price {
  white-space: nowrap;
}

.tour-footer > div:last-child,
.tfc-footer > div:last-child {
  display: flex;
  gap: 10px;
}

.tour-footer > div:last-child > button,
.tfc-footer > div:last-child > button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 46px;
}

.filter-inner {
  max-width: 1160px;
  padding: 12px 2%;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 8px 15px;
}

/* On a phone the seven chips would wrap into a three-row sticky bar and eat a
   sixth of the screen, so they scroll sideways again — this time with a fade at
   the right edge so the hidden chips are actually discoverable. */
@media (max-width: 620px) {
  .filter-inner {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 12px 4%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 34px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 34px), transparent 100%);
  }

  .filter-inner::-webkit-scrollbar {
    display: none;
  }
}

/* "Showing 2 of 16 experiences in Treks & Hikes" — without it a filter click on
   a phone looks like nothing happened. aria-live="polite" announces it too. */
.filter-status {
  text-align: center;
  padding: 0 4% 12px;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-light);
}

/* Room for the sticky filter bar when a chip scrolls the grid into view. */
#safari-tours {
  scroll-margin-top: 132px;
}

/* ---------------------------------------------------------------------------
   Outline buttons sitting on hero photography
   ---------------------------------------------------------------------------
   The base .btn-outline uses --gold-dark, which is the right choice on ivory
   panels (4.9:1) but all but disappears over a dark hero photograph. On the
   heroes it switches to light ink over a translucent scrim, and to the same
   dark-ink-on-gold fill the primary button uses.
   --------------------------------------------------------------------------- */
.hero-actions .btn-outline,
.page-hero .btn-outline {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(26, 23, 20, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.hero-actions .btn-outline:hover,
.page-hero .btn-outline:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink-900);
}

/* Hold still for anyone who asked the system for less motion. */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-up {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .delay-1,
  .delay-2,
  .delay-3,
  .delay-4 {
    animation-delay: 0s !important;
  }

  .tour-card:hover .tour-img-wrap img,
  .tour-full-card:hover .tfc-img-wrap img,
  .why-card:hover .why-icon,
  .payment-item:hover .payment-logo,
  .filter-btn:hover {
    transform: none !important;
  }

  .tour-card:hover .tour-img-wrap::after,
  .tour-full-card:hover .tfc-img-wrap::after {
    animation: none !important;
  }
}

/* ---------------------------------------------------------------------------
   Accessibility: contrast-audited focus ring
   ---------------------------------------------------------------------------
   The gold ring declared with the site-wide focus rule (see the top of this
   file) measures only 2.2:1 against the light surfaces the site is built from
   — white, ivory and warm sand — which is under the 3:1 WCAG 2.4.11 asks of a
   focus indicator. These later rules change nothing but the colour: --ink-900
   is 18.7:1 on white and 8.6:1 against the gold fills, so one ring works on
   both. The original block above is left exactly as it was.
   --------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline-color: var(--ink-900);
}

/* On the dark surfaces the dark ring is the invisible one, so the bright gold
   comes back: 9.9:1 against the footer's earth, 6.8:1 on the hero scrim. */
.footer-grid :focus-visible,
.footer-bottom :focus-visible,
.page-hero :focus-visible,
.hero-actions :focus-visible {
  outline-color: var(--gold-light);
}

/* style.css declares `outline: none` on .form-control:focus, and its
   specificity beat the global :focus-visible rule — so every text field on the
   site, including the whole enquiry form, had nothing but a 20%-opacity halo
   for a keyboard focus cue. Restated at equal specificity, later. */
.form-control:focus-visible {
  outline: 3px solid var(--ink-900);
  outline-offset: 2px;
  box-shadow: var(--shadow-sm);
}

/* Placeholders were left to the browser; its grey defaults land right on the
   4.5:1 line once the extra opacity is applied. */
.form-control::placeholder {
  color: var(--text-light);
  opacity: 1;
}

/* ---------------------------------------------------------------------------
   Accessibility: white ink on the vivid gold is only 2.2:1
   ---------------------------------------------------------------------------
   The floating buttons were the last controls filling with gold behind white
   ink. Their icons are the entire content of the control, so they fall under
   the 3:1 non-text minimum and take the same dark ink the primary button does
   (8.6:1 on gold, still 3.8:1 on the darker hover fill).
   --------------------------------------------------------------------------- */
.float-btn {
  color: var(--ink-900);
}

/* ---------------------------------------------------------------------------
   Departure picker — capacity hints under the booking form
   ---------------------------------------------------------------------------
   js/booking.js injects these beside the departure and guests controls as the
   visitor picks a date. They are helper text, not controls, so they take the
   muted ink the rest of the form's small print uses and never inherit the
   field's weight.
   --------------------------------------------------------------------------- */
.hint,
.wp-departure-note {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-light);
  margin-top: 6px;
}

.wp-departure-note a {
  color: var(--gold-dark);
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Password reveal toggle
   ---------------------------------------------------------------------------
   js/password-toggle.js wraps every password input in .pw-wrap and adds the
   eye button. The wrapper takes over the field's bottom margin so the button
   can be centred on the input itself rather than on the margin box.
   --------------------------------------------------------------------------- */
.pw-wrap {
  position: relative;
  display: block;
  margin-bottom: 16px;
}

.account-auth .pw-wrap > input {
  margin-bottom: 0;
}

.pw-wrap input[type="password"],
.pw-wrap input[type="text"] {
  padding-right: 46px;
}

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
}

.pw-toggle:hover {
  background: rgba(232, 163, 23, 0.14);
  color: var(--ink-900);
}

.pw-toggle:focus-visible {
  outline: 3px solid var(--ink-900);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
   Mobile ergonomics
   ---------------------------------------------------------------------------
   Verified at a 390×844 viewport (iPhone 12/13/14 class):
     * every field was 15.2px, so iOS Safari zoomed the whole page on focus;
     * the hamburger's hit area was only as large as its three 22px bars;
     * the full-screen menu had an unstyled close button and could not scroll;
     * the booking dialogs left a 90vw card and 30px padding on a phone.
   --------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hamburger {
    min-width: 44px;
    min-height: 44px;
    margin: -10px;
    padding: 10px;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-nav.open {
    padding: 72px 6% calc(32px + env(safe-area-inset-bottom));
  }

  .mobile-nav-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--white);
    color: var(--text-dark);
    font-size: 1.1rem;
    cursor: pointer;
  }

  /* The menu is a full-screen overlay; the page behind it must not scroll,
     and the floating buttons must not sit on top of it. */
  body.wp-nav-open {
    overflow: hidden;
  }

  body.wp-nav-open .floating-btns {
    display: none;
  }
}

@media (max-width: 768px) {
  /* iOS Safari zooms any focused field below 16px, which made the booking
     form jump and lose the field the visitor had just tapped. */
  .form-control,
  .account-auth input,
  .account-auth select,
  .account-auth textarea {
    font-size: 16px;
  }

  .btn-primary,
  .btn-outline {
    min-height: 44px;
  }

  /* Let the booking dialogs own the screen and scroll internally instead of
     squeezing a date picker and a keyboard into a 90vw card. */
  .modal-box {
    width: 100%;
    max-width: none;
    max-height: 100dvh;
    border-radius: 0;
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
    overflow-wrap: anywhere;
  }

  .modal-close {
    top: 6px;
    right: 6px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .floating-btns {
    right: calc(14px + env(safe-area-inset-right));
    bottom: calc(18px + env(safe-area-inset-bottom));
  }
}
