/* ===================================================================
   TOURS / CIRCUITS — MOBILE & TABLET POLISH
   ===================================================================
   Scope: Morocco tours landing (morocco-circuits.html) + every
          individual tour page (/tours/*.html) + future tour pages.

   Load order (IMPORTANT):
   Include this file AFTER the page's inline <style> block, i.e.
   place this <link> as the LAST stylesheet inside <head>:

       <link rel="stylesheet" href="/styles/tours-mobile.css">

   That way the cascade lets these rules win without heavy !important.

   Design system: untouched. No new colors, fonts, radii. Only
   responsive behavior, spacing, tap targets, sticky/sticky-safe
   geometry, and touch-only fixes.
   =================================================================== */


/* ─────────────────────────────────────────────
   0 · HEADER HEIGHT VARIABLE
   header-loader.js can override this at runtime:
     document.documentElement.style.setProperty('--header-h', h+'px')
   The static default below already fixes the
   sidebar-under-header issue on desktop tour pages.
   ───────────────────────────────────────────── */
:root {
  --header-h: 96px;
}


/* ─────────────────────────────────────────────
   1 · STICKY SIDEBAR RESPECTS THE FIXED HEADER
   Affects individual tour pages only. No effect on landing.
   ───────────────────────────────────────────── */
@media (min-width: 769px) {
  .sidebar {
    top: calc(var(--header-h) + 20px) !important;
  }
}


/* ─────────────────────────────────────────────
   2 · iOS SAFE-AREA FOR STICKY BOTTOM ELEMENTS
   Keeps the mobile booking bar and WhatsApp float
   above the iPhone home indicator.
   ───────────────────────────────────────────── */
.mobile-bar {
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
  .wa-float {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }
}


/* ─────────────────────────────────────────────
   3 · HERO: USE SMALL-VIEWPORT-HEIGHT
   Prevents the URL-bar-toggle layout jump on mobile.
   ───────────────────────────────────────────── */
.hero {
  min-height: 100svh;
}


/* ─────────────────────────────────────────────
   4 · RE-SHOW HERO STATS ON MOBILE (LANDING)
   Original CSS hides them with display:none at ≤768.
   This brings them back as an inline pill row below
   the CTAs — keeps social proof above the fold.
   ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-stats {
    display: flex !important;
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    margin: 28px auto 0;
    gap: 18px;
    padding: .55rem 1.1rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
  }
  .hero-stat strong { font-size: 1rem; }
  .hero-stat span   { font-size: .66rem; }
}

@media (max-width: 380px) {
  .hero-stats { gap: 12px; padding: .5rem .8rem; }
  .hero-stat:nth-child(4) { display: none; } /* drop the 4th on the smallest phones */
}


/* ─────────────────────────────────────────────
   5 · TIGHTER HERO ON SMALL PHONES
   ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero {
    padding: 80px 16px 48px;
  }
  .hero h1 {
    font-size: clamp(1.95rem, 8vw, 2.6rem);
    margin-bottom: 18px;
  }
  .hero-desc {
    font-size: .95rem;
    line-height: 1.65;
    margin-bottom: 28px;
  }
  .hero-eyebrow {
    letter-spacing: .14em;
    padding: .35rem .8rem;
    font-size: .68rem;
    margin-bottom: 18px;
  }
}


/* ─────────────────────────────────────────────
   6 · HERO CTAs FULL-WIDTH WHEN STACKED
   Aligns the two buttons in the column instead of
   varying with label length.
   ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    max-width: 320px;
    margin: 0 auto;
  }
  .hero-actions .btn-primary,
  .hero-actions .btn-outline {
    width: 100%;
    justify-content: center;
    padding: .95rem 1.5rem;
  }
}


/* ─────────────────────────────────────────────
   7 · TIGHTER SECTION PADDING ON PHONES
   Recovers ~120px scroll per section.
   ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .section { padding: 56px 16px; }
  .cta-section { padding: 64px 16px; }
}


/* ─────────────────────────────────────────────
   8 · GALLERY: ALWAYS-VISIBLE LABELS ON TOUCH
   Original reveals captions only on :hover, which
   never fires on touch devices.
   ───────────────────────────────────────────── */
@media (hover: none), (pointer: coarse) {
  .gallery-item-overlay {
    opacity: 1 !important;
    background: linear-gradient(180deg, transparent 55%, rgba(15,13,10,.88) 100%);
  }
}


/* ─────────────────────────────────────────────
   9 · GALLERY: HORIZONTAL SCROLL-SNAP ON PHONES
   Replaces the 6× / 5× vertical stack with a
   swipeable row — preserves landscape feel.
   ───────────────────────────────────────────── */
@media (max-width: 540px) {
  .gallery-grid {
    display: flex !important;
    grid-template-columns: none;
    grid-template-rows: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 10px;
    padding: 4px 16px 10px;
    margin: 0 -16px;
  }
  .gallery-grid::-webkit-scrollbar { display: none; }

  .gallery-grid .gallery-item,
  .gallery-grid .g-item {
    flex: 0 0 78%;
    height: 240px !important;
    scroll-snap-align: center;
    grid-column: auto !important;
    grid-row: auto !important;
  }
  .gallery-grid .gallery-item:first-child,
  .gallery-grid .g-item:first-child {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}


/* ─────────────────────────────────────────────
   10 · TOUR CARDS — READABLE ON PHONES
   Smaller image, larger body copy, tighter chips.
   ───────────────────────────────────────────── */
@media (max-width: 540px) {
  .tour-card-img,
  .circuit-card-img { height: 180px; }

  .tour-card-body,
  .circuit-card-body { padding: 18px 16px; }

  .tour-card-title,
  .circuit-card-title { font-size: 1.15rem; }

  .tour-card-desc,
  .circuit-card-desc {
    font-size: .9rem;   /* lifted off the .83rem floor */
    line-height: 1.6;
  }

  .tour-duration-badge,
  .tour-popular-badge,
  .circuit-duration-badge {
    font-size: .66rem;
    padding: .25rem .55rem;
  }

  /* Limit route chips to roughly one row so cards stay scannable */
  .tour-route-chips {
    max-height: 26px;
    overflow: hidden;
    position: relative;
  }
  .tour-route-chips::after {
    content: "";
    position: absolute;
    inset: 0 0 0 auto;
    width: 32px;
    background: linear-gradient(90deg, transparent, var(--bg-card, #1c1a16));
    pointer-events: none;
  }
}


/* ─────────────────────────────────────────────
   11 · TRUST GRID (LANDING) — NO ORPHAN ON MOBILE
   5 cards normally land as 2+2+1 on phones.
   Switch to a swipeable horizontal row instead.

   IMPORTANT: scoped to .trust-grid only, so the
   TripAdvisor / Google trust badges on tour pages
   (.trust-cards .trust-card) are NOT affected.
   ───────────────────────────────────────────── */
@media (max-width: 540px) {
  .trust-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding: 4px 16px 10px;
    margin: 0 -16px;
    scrollbar-width: none;
  }
  .trust-grid::-webkit-scrollbar { display: none; }

  .trust-grid .trust-card {
    flex: 0 0 62%;
    min-width: 200px;
    scroll-snap-align: center;
    padding: 26px 18px;
  }
  .trust-grid .trust-number { font-size: 2.3rem; }
}


/* ─────────────────────────────────────────────
   12 · CHOICE CARDS — TIGHTER PADDING
   Original 40px padding eats ~63% of card width
   on 360-wide phones.
   ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .choice-card {
    padding: 28px 22px;
    min-height: 380px;
  }
  .choice-card h2 { font-size: clamp(1.6rem, 6vw, 2rem); }
  .choice-card p  { font-size: .9rem; margin-bottom: 20px; }
  .choice-card-features { gap: 8px; margin-bottom: 22px; }
}
@media (max-width: 480px) {
  .choice-card {
    padding: 22px 18px;
    min-height: 340px;
  }
}


/* ─────────────────────────────────────────────
   13 · FILTER PILLS — HORIZONTAL SCROLL ROW
   Original wraps 14 pills to ~4 rows — visually heavy.
   ───────────────────────────────────────────── */
@media (max-width: 540px) {
  .tours-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    justify-content: flex-start;
    padding: 4px 16px;
    margin: 28px -16px 16px;
    gap: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tours-filter::-webkit-scrollbar { display: none; }
  .tours-filter-btn {
    flex: 0 0 auto;
    scroll-snap-align: start;
    font-size: .8rem;
    padding: .55rem 1rem;
    white-space: nowrap;
  }
}


/* ─────────────────────────────────────────────
   14 · FILTER DROPDOWN PANEL — TIGHTER ON PHONES
   Pure CSS only; for full collapse, wrap the panel
   in <details><summary> at the HTML layer.
   ───────────────────────────────────────────── */
@media (max-width: 540px) {
  .tours-filter-panel {
    padding: 14px 14px;
    gap: 10px;
    margin: 0 12px 24px;
  }
  .tours-filter-group { min-width: 0; }
  .tours-filter-label { font-size: .58rem; }
  .tours-filter-select { font-size: .85rem; padding: 10px 30px 10px 12px; }
}


/* ─────────────────────────────────────────────
   15 · TAP-TARGET FLOOR FOR TOUCH DEVICES
   WCAG 2.5.5 / Apple HIG: ≥44×44 pt.
   ───────────────────────────────────────────── */
@media (pointer: coarse) {
  .tours-filter-btn,
  .tour-card-btn,
  .tours-filter-reset,
  .tours-empty-btn,
  .faq-question,
  .faq-q,
  .day-header {
    min-height: 44px;
  }
  .tour-card-btn { padding: .65rem 1rem; }

  .pax-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .lb-prev, .lb-next {
    width: 48px;
    height: 48px;
  }
  .lb-close { padding: 12px; font-size: 1.6rem; }
}


/* ─────────────────────────────────────────────
   16 · FAQ — UNCLAMP THE MAX-HEIGHT
   Long answers were clipping at 400px on phones.
   ───────────────────────────────────────────── */
.faq-item.open .faq-answer { max-height: 1200px; }


/* ─────────────────────────────────────────────
   17 · TOURS RESULT COUNT — VISIBLE WHEN FILTERED
   ───────────────────────────────────────────── */
@media (max-width: 540px) {
  .tours-result-count {
    font-size: .88rem;
    padding: 10px 14px;
    background: rgba(200,151,43,.04);
    border: 1px solid rgba(200,151,43,.14);
    border-radius: 8px;
    margin: 0 16px 20px;
  }
}


/* ─────────────────────────────────────────────
   18 · TABLET — SLIMMER SIDEBAR (TOUR PAGES)
   Keeps the sticky booking sidebar visible down
   to ~700px instead of dropping at 768.
   ───────────────────────────────────────────── */
@media (min-width: 700px) and (max-width: 900px) {
  :root { --sidebar-w: 280px; --gap: 24px; }
  .sidebar-body { padding: 16px 16px; }
  .sidebar-price { font-size: 1.7rem; }
  .sb-opts { gap: 6px; }
}


/* ─────────────────────────────────────────────
   19 · REDUCED-MOTION — SUPPRESS HOVER TRANSFORMS
   ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .tour-card:hover,
  .circuit-card:hover,
  .trust-card:hover,
  .choice-card:hover,
  .intro-highlight-item:hover,
  .gallery-item:hover img,
  .g-item:hover img,
  .choice-card:hover .choice-card-bg {
    transform: none !important;
    transition: none !important;
  }
}


/* ─────────────────────────────────────────────
   20 · LIGHTBOX — PREVENT BACKGROUND SCROLL
   ───────────────────────────────────────────── */
@media (max-width: 768px) {
  body:has(.lb.on) { overflow: hidden; }
}


/* ─────────────────────────────────────────────
   21 · LANDING-PAGE STICKY MOBILE CTA (OPT-IN)
   Mirrors the per-tour mobile-bar pattern so the
   landing page also has a 1-tap path to booking.

   To activate, add this snippet just before </body>
   in morocco-circuits.html (no JS required):

     <div class="landing-mobile-cta" aria-label="Book a Morocco tour">
       <a href="/private-morocco-tours" class="landing-mobile-cta-btn">
         <i class="fas fa-route"></i> Plan Trip
       </a>
       <a href="https://wa.me/212628028090?text=Hi%20Qimal Tours%2C%20I%27d%20like%20to%20plan%20a%20Morocco%20tour"
          class="landing-mobile-cta-wa"
          target="_blank" rel="noopener noreferrer">
         <i class="fab fa-whatsapp"></i> WhatsApp
       </a>
     </div>
   ───────────────────────────────────────────── */
.landing-mobile-cta { display: none; }

@media (max-width: 768px) {
  .landing-mobile-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 800;
    gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(15,13,10,.92);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(200,151,43,.22);
  }
  .landing-mobile-cta-btn,
  .landing-mobile-cta-wa {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .85rem 1rem;
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
    border-radius: 10px;
    min-height: 44px;
  }
  .landing-mobile-cta-btn {
    background: #c8972b;
    color: #0f0d0a;
  }
  .landing-mobile-cta-wa {
    background: #25D366;
    color: #fff;
  }

  /* When the landing CTA bar is present, reserve space at page bottom */
  body:has(.landing-mobile-cta) {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
}


/* ─────────────────────────────────────────────
   22 · TOUR-PAGE HERO — SMALL-SCREEN TYPOGRAPHY
   ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero-meta { gap: 10px; font-size: .8rem; }
  .meta-tag  { padding: 3px 9px; font-size: .72rem; }
  .hero-lead { font-size: .92rem; line-height: 1.75; margin-bottom: 18px; }
  .hero-tag  { font-size: .7rem; padding: 3px 9px; }
}


/* ─────────────────────────────────────────────
   23 · INTRO GRID — CARDS FIRST ON MOBILE
   On a phone the user benefits from the highlight
   cards (icons + short claims) before the long
   SEO copy. Flip the visual order at ≤768.
   ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .intro-grid { gap: 32px; }
}
@media (max-width: 768px) {
  .intro-highlights { order: -1; }
  .intro-text p { line-height: 1.7; }
}


/* ─────────────────────────────────────────────
   24 · FOOTER — TIGHTER ON PHONES
   ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .footer { padding: 40px 16px 0; }
  .footer-container { gap: 28px; padding-bottom: 32px; }
  .footer-section h3 { font-size: 1.05rem; margin-bottom: 12px; }
}

/* ─────────────────────────────────────────────
   25 · IN-HERO CTA ROW (Book / WhatsApp / Call)
   Pattern used by tour pages that replaced the
   sidebar booking widget with a 3-button CTA row
   in the hero (e.g. 3-days-atlas-berber-villages).
   ───────────────────────────────────────────── */
@media (max-width: 520px) {
  .cta-row {
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
  }
  .cta-btn {
    width: 100%;
    justify-content: center;
    padding: .9rem 1rem;
    font-size: .92rem;
    min-height: 48px;
  }
  .cta-btn span { white-space: normal; }
}

/* The "+212 628 028 090" call button is wide — keep it
   on one line, shrink its font slightly on small phones. */
@media (max-width: 380px) {
  .cta-call { font-size: .85rem; letter-spacing: 0; }
}


/* ─────────────────────────────────────────────
   26 · IN-HERO TRUST BADGES (.trust-cards plural)
   TripAdvisor + Google review cards that sit inline
   between CTAs and gallery on mobile/narrow tablet.
   ───────────────────────────────────────────── */
@media (max-width: 1023px) {
  .trust-cards { margin: 18px 0 4px; }
}
@media (max-width: 480px) {
  .trust-cards {
    flex-direction: row;
    gap: 8px;
  }
  .trust-cards .trust-card {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    padding: 12px 8px;
    gap: 6px;
    border-radius: 12px;
  }
  .trust-cards .tc-icon img { width: 26px; height: 26px; }
  .trust-cards .tc-score    { font-size: 1.25rem; }
  .trust-cards .tc-score small { font-size: .72rem; }
  .trust-cards .tc-stars    { font-size: .62rem; }
  .trust-cards .tc-label    { font-size: .64rem; line-height: 1.25; }
  .trust-cards .tc-count    { font-size: .56rem; }
  .trust-cards .tc-btn      { padding: 5px 8px; font-size: .6rem; }
}


/* ─────────────────────────────────────────────
   27 · HERO META / HERO TAGS — TIGHTER ON PHONES
   Many tour pages list 4+ meta chips and 6–8 hero
   tags, which wraps to 4–5 dense rows on a phone.
   ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero-meta {
    gap: 8px 12px;
    font-size: .8rem;
    margin-bottom: 14px;
  }
  .hero-meta > span { line-height: 1.4; }
  .meta-tag {
    padding: 3px 9px;
    font-size: .72rem;
  }
  .hero-lead {
    font-size: .92rem;
    line-height: 1.7;
    margin-bottom: 16px;
  }
  .hero-tags { gap: 6px; }
  .hero-tag  {
    font-size: .68rem;
    padding: 3px 8px;
  }
}


/* ─────────────────────────────────────────────
   28 · HIGHLIGHT GRIDS (hl-grid / diff-grid)
   Page-specific custom grids on tour pages.
   Original collapses 3-col → 2 → 1 — six cards
   stacked on phone is too tall. Keep 2-col on
   smallest phones so the section stays scannable.
   ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .hl-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }
  .hl-card {
    padding: 14px 12px;
  }
  .hl-icon { font-size: 1.4rem; margin-bottom: 8px; }
  .hl-title { font-size: .98rem; margin-bottom: 4px; }
  .hl-desc  { font-size: .76rem; line-height: 1.55; }
}
@media (max-width: 380px) {
  .hl-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 540px) {
  .diff-grid {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
  .diff-card { padding: 13px 14px; }
  .diff-card h4 { font-size: .95rem; }
  .diff-card p  { font-size: .8rem; line-height: 1.55; }
}


/* ─────────────────────────────────────────────
   29 · BERBER / NARRATIVE BOX (berber-box)
   ───────────────────────────────────────────── */
@media (max-width: 540px) {
  .berber-box {
    padding: 20px 16px;
    border-radius: 10px;
  }
  .berber-box h3 { font-size: 1.25rem; }
  .berber-box p  { font-size: .85rem; line-height: 1.75; }
  .berber-list   { grid-template-columns: 1fr !important; gap: 6px; }
  .berber-list li { font-size: .8rem; }
}


/* ─────────────────────────────────────────────
   30 · LEG CARDS — STACK META ON PHONES
   .leg-top is flex row by default; on a 360-wide
   phone the route + 3 stats compete for space.
   ───────────────────────────────────────────── */
@media (max-width: 540px) {
  .leg-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .leg-route { font-size: 1rem; flex-wrap: wrap; }
  .leg-stats { gap: 10px; flex-wrap: wrap; }
  .leg-stat  { font-size: .74rem; }
  .leg       { padding: 14px 14px; }
}


/* ─────────────────────────────────────────────
   31 · BOOKING POPUP (.bk-overlay) — MOBILE FIT
   Some tour pages open the booking widget inside
   an overlay popup. Make sure it fills the phone
   nicely and respects safe-area insets.
   ───────────────────────────────────────────── */
@media (max-width: 520px) {
  .bk-overlay-card {
    margin: 12px;
    max-width: none;
    padding: 50px 14px calc(16px + env(safe-area-inset-bottom));
    border-radius: 12px;
  }
  .bk-overlay-title {
    font-size: 1.1rem;
    margin: 0 28px 12px;
  }
  .bk-overlay-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
  }
}


/* ─────────────────────────────────────────────
   32 · INNER LINK ROW + BACK ROW — TIGHTER
   ───────────────────────────────────────────── */
@media (max-width: 540px) {
  .inner-link-row { gap: 6px; margin-top: 12px; }
  .inner-link-row a { font-size: .72rem; padding: 5px 9px; }
  .back-row { gap: 12px; padding: 16px 0 22px; font-size: .8rem; }
}


/* ─────────────────────────────────────────────
   33 · SECTION SPACING ON TOUR PAGES
   Tour pages use .section with padding:24px 0 0
   plus a sec-eyebrow + sec-title + sec-sub stack.
   Tighten on phones.
   ───────────────────────────────────────────── */
@media (max-width: 540px) {
  .sec-title { font-size: 1.45rem; line-height: 1.2; }
  .sec-sub   { font-size: .82rem; margin-bottom: 18px; }
}


/* ─────────────────────────────────────────────
   34 · OUTER WRAPPER PADDING
   Tour pages wrap content in .outer { padding: 0 28px }.
   Already drops to 0 16px at ≤480 in the page CSS;
   ensure breadcrumb stays readable.
   ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .breadcrumb {
    font-size: .72rem;
    padding: 14px 0 10px;
    line-height: 1.5;
  }
}


/* ─────────────────────────────────────────────
   35 · HEADER PLACEHOLDER — RESPONSIVE HEIGHT
   #site-header-placeholder is hardcoded 96px. On
   phones the injected header is usually shorter,
   wasting 30+ px above the breadcrumb. Use the
   --header-h variable so header-loader can set it.
   ───────────────────────────────────────────── */
#site-header-placeholder {
  height: var(--header-h, 96px) !important;
}

@media (max-width: 768px) {
  /* If header-loader hasn't measured yet, assume ~72px on phones. */
  :root { --header-h: 72px; }
}


/* ═══════════════════════════════════════════════════════════════════
   PART B — POLISH FOR THE CONVERSION-OPTIMISED CLASS SET
   ───────────────────────────────────────────────────────────────────
   The 3-Days Merzouga campaign page (and any future Ads landing page)
   uses a refreshed class system: .hero-cta-row, .hero-cta(-primary|wa|
   call), .hero-trust-row, .stats-bar, .price-clarity, .day-block,
   .tour-gallery-grid, .reviews-grid, .related-grid, .m-sticky, plus a
   <details><summary> FAQ pattern. The /tours catalog uses the .tc-*
   short class system. These sections cover both — without touching the
   older class system handled in sections 1–35.
   ═══════════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────
   36 · TOUR DETAIL HERO — NEW .hero-cta-row
   Larger tap targets, no wrap, full-width when
   stacked on the smallest phones.
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .hero { padding: 90px 18px 36px; }
  .hero h1 { font-size: clamp(1.95rem, 7vw, 2.6rem); line-height: 1.15; margin-bottom: 16px; }
  .hero-meta { gap: 8px 14px; font-size: .82rem; }
  .hero-cta-row { gap: 10px; margin-top: 18px; }
  .hero-cta {
    padding: 14px 18px;
    font-size: .95rem;
    min-height: 50px;
    white-space: nowrap;
    letter-spacing: 0;
  }
  .hero-cta svg { width: 16px; height: 16px; }
}
@media (max-width: 480px) {
  .hero { padding: 84px 16px 28px; min-height: auto; }
  .hero h1 { font-size: clamp(1.75rem, 7.5vw, 2.2rem); }
  .hero-cta-row { flex-direction: column; max-width: 360px; margin-left: auto; margin-right: auto; }
  .hero-cta { width: 100%; }
}


/* ─────────────────────────────────────────────
   37 · ABOVE-FOLD TRUST ROW PILLS
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .hero-trust-row {
    gap: 6px 8px;
    margin-top: 14px;
    font-size: .78rem;
    justify-content: center;
  }
  .hero-trust-row li { padding: 6px 10px; }
}
@media (max-width: 480px) {
  .hero-trust-row { font-size: .72rem; }
}


/* ─────────────────────────────────────────────
   38 · TRIPADVISOR / GOOGLE BADGE CARDS
   Pinned top-right on desktop. On mobile push
   them off-canvas to recover vertical hero space —
   the new .hero-trust-row pills already carry the
   social proof above the fold.
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .hero-trust-cards { display: none; }
}


/* ─────────────────────────────────────────────
   39 · QUICK STATS BAR — HORIZONTAL SCROLL ROW
   Six stat items wrap to 3 rows on a phone. Make
   the row scroll-snap horizontally instead.
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .stats-bar { padding: 10px 12px; }
  .stats-inner {
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .stats-inner::-webkit-scrollbar { display: none; }
  .stat-item {
    flex: 0 0 auto;
    min-width: 132px;
    scroll-snap-align: start;
    padding: 12px 18px 12px 0;
  }
}


/* ─────────────────────────────────────────────
   40 · SHARED vs PRIVATE PRICE CARDS
   Stack vertically on small screens. Make the
   value strong and the CTA reach 50px tap target.
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .price-clarity { padding: 26px 16px 4px; }
  .price-clarity-inner { gap: 14px; }
  .price-card { padding: 22px 18px 18px; gap: 12px; }
  .price-card-title { font-size: 1.35rem; }
  .price-card-from strong { font-size: 1.85rem; }
  .price-card-list li { font-size: .85rem; line-height: 1.55; }
  .price-card-cta { min-height: 50px; font-size: .95rem; padding: 13px 18px; }
}
@media (max-width: 480px) {
  .price-card-from strong { font-size: 1.7rem; }
  .price-clarity-note { font-size: .78rem; line-height: 1.6; padding: 0 6px; }
}


/* ─────────────────────────────────────────────
   41 · TOUR INTRO PARAGRAPHS — READABLE BODY
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .tour-intro p {
    font-size: .98rem;
    line-height: 1.75;
    margin-bottom: 16px;
  }
}


/* ─────────────────────────────────────────────
   42 · NEW .section-title — TIGHTER ON PHONES
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .section-title { font-size: 1.7rem; margin-bottom: 22px; line-height: 1.2; }
}
@media (max-width: 480px) {
  .section-title { font-size: 1.5rem; margin-bottom: 18px; }
}


/* ─────────────────────────────────────────────
   43 · DAY-BLOCK ITINERARY (new timeline style)
   Smaller spine, larger touch targets, readable
   body copy without giant text walls.
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .day-block { gap: 14px; margin-bottom: 22px; }
  .day-spine { width: 32px; flex-shrink: 0; }
  .day-dot { width: 36px; height: 36px; font-size: .78rem; }
  .day-line { width: 2px; }
  .day-content { padding: 0; }
  .day-label { font-size: .68rem; letter-spacing: .14em; line-height: 1.4; }
  .day-title { font-size: 1.05rem; line-height: 1.35; margin: 4px 0 8px; }
  .day-desc { font-size: .92rem; line-height: 1.75; }
  .day-stops { gap: 6px; margin-top: 10px; }
  .day-stop { font-size: .72rem; padding: 4px 10px; }
}


/* ─────────────────────────────────────────────
   44 · TOUR GALLERY GRID (new) — TIGHTER PHONE
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .tour-gallery-grid { gap: 6px; grid-auto-rows: 130px; }
  .tour-gallery-item:first-child { grid-row: span 2; }
}
@media (max-width: 480px) {
  .tour-gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 110px; }
  .tour-gallery-item:first-child { grid-row: span 1; }
  .tour-gallery-more { font-size: .72rem; padding: 4px 8px; }
}


/* ─────────────────────────────────────────────
   45 · REVIEWS / TESTIMONIALS (new)
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .reviews-section { margin: 30px 0 40px; }
  .reviews-summary { font-size: .86rem; padding: 0 8px; margin-bottom: 22px; line-height: 1.6; }
  .reviews-grid { gap: 12px; }
  .review-card { padding: 18px 18px 16px; }
  .review-text { font-size: .9rem; line-height: 1.75; }
  .review-author { font-size: .78rem; padding-top: 10px; }
  .review-source { font-size: .68rem; }
}


/* ─────────────────────────────────────────────
   46 · RELATED-GRID + REL-CARDS (new)
   Make related tour cards horizontal on phones
   so users can swipe-scan without huge scroll.
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .related-grid { grid-template-columns: 1fr; gap: 12px; }
  .rel-card { display: flex; flex-direction: row; min-height: 0; }
  .rel-card-img {
    flex: 0 0 130px;
    width: 130px;
    height: 130px;
    overflow: hidden;
  }
  .rel-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: auto;
  }
  .rel-card-body { flex: 1 1 auto; padding: 14px 16px; min-width: 0; }
  .rel-card-days { font-size: .68rem; letter-spacing: .12em; margin-bottom: 6px; }
  .rel-card-title { font-size: 1rem; line-height: 1.3; margin-bottom: 10px; }
  .rel-card-link { font-size: .78rem; }
}


/* ─────────────────────────────────────────────
   47 · FAQ — NEW <details><summary> PATTERN
   The newer page uses native disclosure widgets.
   Make the summary a proper tap target and the
   answer readable on phones.
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .faq-item summary {
    padding: 16px 18px;
    font-size: .96rem;
    line-height: 1.4;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .faq-answer { padding: 0 18px 18px; }
  .faq-answer, .faq-answer * { font-size: .9rem; line-height: 1.75; }
}


/* ─────────────────────────────────────────────
   48 · STICKY MOBILE CTA BAR (.m-sticky)
   Already declared inline on the merzouga page;
   these rules make sure it stays consistent if
   added to other tour pages.
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .m-sticky {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    gap: 8px;
  }
  .m-sticky-btn { height: 50px; font-size: .94rem; }
  /* When .m-sticky is present, the inline CSS already adds bottom
     padding to body so the WhatsApp float doesn't collide. We just
     nudge the float up on phones if it's also present. */
  body:has(.m-sticky) .wa-float { bottom: calc(86px + env(safe-area-inset-bottom)); }
}


/* ─────────────────────────────────────────────
   49 · /tours CATALOG — .tc-* CARD STYLE
   tours.html uses a different (short) class
   prefix than the per-tour pages. Cover it here
   so the catalog reads well on phones.
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .tours-grid { grid-template-columns: 1fr !important; gap: 14px; }
  .tc-img { height: 200px; }
  .tc-body { padding: 16px 18px; }
  .tc-cat { font-size: .62rem; letter-spacing: .14em; margin-bottom: 6px; }
  .tc-title { font-size: 1.12rem; line-height: 1.3; margin-bottom: 10px; }
  .tc-tags { gap: 5px; margin-bottom: 8px; }
  .tc-tag { font-size: .58rem; padding: 2px 7px; }
  .tc-chips { gap: 5px; margin-bottom: 10px; }
  .tc-chip { font-size: .66rem; padding: 3px 8px; }
  .tc-desc { font-size: .88rem; line-height: 1.6; -webkit-line-clamp: 3; }
  .tc-footer { gap: 10px; }
  .tc-price strong { font-size: 1.1rem; }
  .tc-btn { padding: 10px 16px; font-size: .85rem; min-height: 44px; }
}


/* ─────────────────────────────────────────────
   50 · /tours CATALOG HERO + FILTER PANEL
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .tours-hero { padding: 32px 0 24px; }
  .tours-hero h1 { font-size: clamp(2rem, 7vw, 2.6rem); margin-bottom: 12px; }
  .tours-hero p { font-size: .92rem; line-height: 1.7; margin-bottom: 20px; }
  .hero-stats { gap: 18px; margin-bottom: 22px; }
  .h-stat-val { font-size: 1.5rem; }
  .h-stat-lbl { font-size: .65rem; }
}
@media (max-width: 540px) {
  /* The catalog uses .filters (not .tours-filter) — horizontal scroll row */
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    justify-content: flex-start;
    padding: 4px 16px;
    margin: 12px -16px 12px;
    gap: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter-btn {
    flex: 0 0 auto;
    scroll-snap-align: start;
    font-size: .76rem;
    padding: .55rem 1rem;
    white-space: nowrap;
    min-height: 36px;
  }
  .filter-panel {
    padding: 12px 12px;
    gap: 10px;
    margin: 0 0 18px;
  }
  .filter-group { flex: 1 1 calc(50% - 5px); min-width: 0; max-width: none; }
  .filter-label { font-size: .58rem; }
  .filter-select { padding: 10px 28px 10px 12px; font-size: .82rem; }
  .filter-actions { flex: 1 1 100%; justify-content: center; }
}


/* ─────────────────────────────────────────────
   51 · BREADCRUMB — HORIZONTAL SCROLL ON PHONES
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .breadcrumb {
    padding: 10px 16px;
    font-size: .76rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .breadcrumb::-webkit-scrollbar { display: none; }
}


/* ─────────────────────────────────────────────
   52 · WHY-CHOOSE GRID — STACK ON PHONES
   Original 3-col → tightens to 1-col on the
   smallest screens for scannability.
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .why-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .why-item { padding: 16px 18px; }
  .why-item h3 { font-size: .98rem; gap: 8px; }
  .why-item p { font-size: .85rem; line-height: 1.65; }
}
@media (max-width: 480px) {
  .why-grid { grid-template-columns: 1fr; }
}


/* ─────────────────────────────────────────────
   53 · IMPORTANT INFO BOX — READABLE BULLETS
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .info-box { padding: 20px 18px; }
  .info-box h3 { font-size: 1.05rem; margin-bottom: 12px; }
  .info-box ul li { font-size: .88rem; line-height: 1.7; padding-left: 24px; margin-bottom: 8px; }
}


/* ─────────────────────────────────────────────
   54 · TOUCH-DEVICE HOVER SUPPRESSION
   Cover the new class set so :hover transforms
   don't "stick" after tap on touch devices.
   ───────────────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  .hero-cta:hover,
  .price-card:hover,
  .price-card-cta:hover,
  .review-card:hover,
  .rel-card:hover,
  .tc-img img:hover,
  .tour-card:active,
  .price-card-cta:active {
    transform: none !important;
  }
  /* Subtle press feedback instead of hover */
  .tc-btn:active,
  .hero-cta:active,
  .price-card-cta:active,
  .m-sticky-btn:active { transform: scale(.98); }
}


/* ─────────────────────────────────────────────
   55 · CLS / LCP HARDENING
   Lock down dimensions on hero/gallery/related
   images so layout doesn't shift while they load.
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .tc-img img,
  .tour-gallery-item img,
  .rel-card-img img,
  .review-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  /* Smooth iOS scroll */
  html, body { -webkit-overflow-scrolling: touch; }
  /* Remove tap-highlight flash that can look unpolished */
  a, button { -webkit-tap-highlight-color: rgba(200,151,43,.08); }
}


/* ═══════════════════════════════════════════════════════════════════
   PART C — AGGRESSIVE FIXES FOR /morocco-circuits HERO ON MOBILE
   ───────────────────────────────────────────────────────────────────
   Use high-specificity selectors + !important so inline page CSS
   cannot keep the desktop layout (which positions .hero-stats
   absolutely against the hero's bottom-center). These rules also
   prevent CTA text from wrapping ("Plan Your Own / Trip") and tighten
   the hero so it fits one viewport on a 390-wide phone.
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 820px) {
  /* HERO SIZING — make the whole hero fit nicely */
  section.hero {
    min-height: auto !important;
    padding: 96px 20px 40px !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  section.hero .hero-content {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }
  section.hero h1 {
    font-size: clamp(2rem, 7.5vw, 2.6rem) !important;
    line-height: 1.12 !important;
    margin-bottom: 14px !important;
  }
  section.hero h1 br { display: none; }            /* drop the forced break */
  section.hero .hero-eyebrow {
    font-size: .66rem !important;
    padding: .32rem .8rem !important;
    margin-bottom: 14px !important;
  }
  section.hero .hero-desc,
  section.hero p.hero-desc {
    font-size: .92rem !important;
    line-height: 1.7 !important;
    margin-bottom: 20px !important;
    max-width: 100%;
  }

  /* HERO STATS PILL — force below content, never beside it */
  section.hero .hero-stats {
    position: static !important;
    transform: none !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 18px auto 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    backdrop-filter: none !important;
    width: 100% !important;
    max-width: 360px !important;
  }
  section.hero .hero-stat {
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    padding: .42rem .7rem !important;
    background: rgba(15,13,10,.7) !important;
    border: 1px solid rgba(200,151,43,.28) !important;
    border-radius: 100px !important;
  }
  section.hero .hero-stat strong { font-size: .85rem !important; }
  section.hero .hero-stat span { font-size: .66rem !important; }

  /* HERO CTAs — full-width, no text wrap */
  section.hero .hero-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100%;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }
  section.hero .hero-actions .btn-primary,
  section.hero .hero-actions .btn-outline {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 18px !important;
    font-size: .95rem !important;
    white-space: nowrap !important;
    justify-content: center !important;
    min-height: 50px;
  }
}


/* ─────────────────────────────────────────────
   PART D — CHOICE-CARDS (Plan Your Trip / Recommended Tours)
   These appear lower on the morocco-circuits page (inside .choice-grid).
   The existing section 12 covers padding; add nowrap on the CTAs so
   "Browse All Tours" etc. don't break into multiple lines.
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .choice-grid { grid-template-columns: 1fr !important; gap: 14px; }
  .choice-card { min-height: 0 !important; }
  .choice-cta {
    white-space: nowrap;
    min-height: 50px;
    padding: 13px 22px !important;
  }
}


/* ─────────────────────────────────────────────
   PART E — UNIVERSAL CTA-TEXT NO-WRAP
   On phones, never let CTA text wrap to 2+ lines — it always
   looks broken. Apply to every primary/secondary CTA pattern
   used across the tours surface.
   ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .btn-primary,
  .btn-outline,
  .cta-btn,
  .cta-btn-gold,
  .cta-btn-outline,
  .cta-whatsapp,
  .hero-cta,
  .price-card-cta,
  .tc-btn,
  .tour-card-btn,
  .empty-btn,
  .tours-empty-btn,
  .m-sticky-btn,
  .landing-mobile-cta-btn,
  .landing-mobile-cta-wa {
    white-space: nowrap !important;
  }
}


/* ═══════════════════════════════════════════════════════════════════
   PART F — MOBILE REVIEW PROOF (TripAdvisor + Google badge cards)
   ───────────────────────────────────────────────────────────────────
   Reverse the earlier "hide on mobile" decision: showing real review
   sources (66 TripAdvisor + 20 Google = 86) is a stronger Google Ads
   conversion lever than just the .hero-trust-row pills.

   Layout: 2-up horizontal row pinned below the hero CTAs/trust row.
   Each card is a single tap-target that opens the external review
   listing in a new tab. Premium dark glass, gold-accent border.

   Higher specificity + !important overrides:
   - the inline page-level `@media (max-width: 1023px) {
       .hero-trust-cards { display: none } }` rule (Part F wins because
     of !important + later cascade)
   - sections 26 and 38 of this file
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  .hero .hero-trust-cards,
  .hero-trust-cards {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 480px !important;
    margin: 18px auto 0 !important;
    padding: 0 16px !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    justify-content: center !important;
  }
  .hero-trust-cards .hero-trust-card {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    padding: 12px 10px !important;
    gap: 6px !important;
    border-radius: 14px !important;
    background: rgba(15,13,10,.72) !important;
    border: 1px solid rgba(200,151,43,.32) !important;
    box-shadow: 0 6px 22px rgba(0,0,0,.32);
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
  }
  .hero-trust-cards .hero-trust-card:active {
    transform: scale(.98);
    background: rgba(200,151,43,.14) !important;
    border-color: rgba(200,151,43,.6) !important;
  }
  .hero-trust-cards .htc-icon img { width: 26px !important; height: 26px !important; }
  .hero-trust-cards .htc-score {
    font-size: 1.25rem !important;
    line-height: 1 !important;
  }
  .hero-trust-cards .htc-score small {
    font-size: .68rem !important;
    color: rgba(240,234,216,.55) !important;
  }
  .hero-trust-cards .htc-stars { font-size: .68rem !important; letter-spacing: 1px !important; }
  .hero-trust-cards .htc-label {
    font-size: .68rem !important;
    line-height: 1.25 !important;
    color: rgba(240,234,216,.62) !important;
  }
  .hero-trust-cards .htc-count {
    font-size: .68rem !important;
    color: #d4af5f !important;
    font-weight: 600;
  }
  /* On mobile the "View Reviews / View on Google Maps" button line
     adds height without much value — the whole card is tappable. */
  .hero-trust-cards .htc-btn { display: none !important; }
}

/* On very small phones (≤380px) shrink the cards further but keep both. */
@media (max-width: 380px) {
  .hero-trust-cards .hero-trust-card { padding: 10px 8px !important; }
  .hero-trust-cards .htc-score { font-size: 1.15rem !important; }
  .hero-trust-cards .htc-icon img { width: 22px !important; height: 22px !important; }
  .hero-trust-cards .htc-label,
  .hero-trust-cards .htc-count { font-size: .64rem !important; }
}


/* ─── END tours-mobile.css ─── */