/* ─────────────────────────────────────────────────────────────────────────────
   Epic Trips — Mobile CSS  (matches Epic_Trips_Mobile_Mockups exactly)
   Loaded only via <link media="(max-width:767px)"> — never affects desktop.
   Brand tokens — NO deviations:
     --bg #0F1923 · --surface #16222F · --surface2 #1C2C3D
     --cyan #2EB8E6 · --orange #D4520A
───────────────────────────────────────────────────────────────────────────── */

:root {
  --bg:      #0F1923;
  --surface: #16222F;
  --surface2:#1C2C3D;
  --cyan:    #2EB8E6;
  --orange:  #D4520A;
  --border:  rgba(255,255,255,0.07);
  --dim:     rgba(255,255,255,0.36);
  --dimmer:  rgba(255,255,255,0.22);
}

* { -webkit-tap-highlight-color: rgba(0,0,0,0); }

body {
  background: var(--bg) !important;
  padding-bottom: calc(56px + env(safe-area-inset-bottom)) !important;
}

input, select, textarea { font-size: max(16px, 1em) !important; }

/* ── Site header (across all pages) ─────────────────────────────────────── */
.site-header {
  padding: 6px 16px 10px !important;
  height: auto !important;
  background: var(--bg) !important;
  border-bottom: 0.5px solid var(--border) !important;
}

body { padding-top: 50px !important; }

/* Logo wordmark — EPIC cyan, TRIPS orange */
.header-logo-text {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  background-clip: unset !important;
  font-size: 11px !important;
  letter-spacing: 0.14em !important;
  font-weight: 600 !important;
}
.logo-epic  { color: #2EB8E6; font-weight: 600; letter-spacing: 0.14em; }
.logo-trips { color: #D4520A; font-weight: 600; letter-spacing: 0.14em; }

.header-logo-img { height: 20px !important; }

/* ── Bottom nav ─────────────────────────────────────────────────────────── */
#mobile-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg);
  border-top: 0.5px solid var(--border);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 2000;
}

.m-nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 0 10px;
  text-decoration: none;
  color: var(--dimmer);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.12s;
}

.m-nav-tab svg {
  width: 18px;
  height: 18px;
  stroke: var(--dimmer);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.m-nav-tab span {
  font-size: 8px;
  color: var(--dimmer);
  letter-spacing: 0.03em;
}

.m-nav-tab.active svg  { stroke: var(--cyan); }
.m-nav-tab.active span { color: var(--cyan); }

/* ── Mobile home wrapper ────────────────────────────────────────────────── */
#mobile-dest-hero { background: var(--bg); }

/* ── Hero video (240px, autoplay muted loop, gradient overlay) ──────────── */
.m-hero {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: #0A1E32;
  flex-shrink: 0;
}
.m-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.m-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15,25,35,0.95) 0%,
    rgba(15,25,35,0.45) 55%,
    rgba(0,0,0,0.15) 100%
  );
  z-index: 1;
}
.m-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  z-index: 2;
}
.m-hero-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #D4520A;
  margin-bottom: 6px;
}
.m-hero-title {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
  margin-bottom: 6px;
}
.m-hero-title span { color: #2EB8E6; }
.m-hero-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
}

/* ── Three value pillars ────────────────────────────────────────────────── */
.m-pillars { padding: 14px 14px 4px; }
.m-pillars-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.28);
  margin-bottom: 10px;
}
.m-pillar {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--surface);
  border: 0.5px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 11px 12px;
  margin-bottom: 7px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.m-pillar-accent {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.m-pillar--cyan   .m-pillar-accent { background: #2EB8E6; }
.m-pillar--orange .m-pillar-accent { background: #D4520A; }
.m-pillar--teal   .m-pillar-accent { background: #22A87A; }

.m-pillar-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.m-pillar-icon--cyan   { background: rgba(46,184,230,0.12); }
.m-pillar-icon--orange { background: rgba(212,82,10,0.12); }
.m-pillar-icon--teal   { background: rgba(34,168,122,0.12); }
.m-pillar-icon svg { width: 17px; height: 17px; }

.m-pillar-body { flex: 1; min-width: 0; }
.m-pillar-title {
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 2px;
}
.m-pillar-sub {
  font-size: 9px;
  color: rgba(255,255,255,0.38);
  line-height: 1.4;
}
.m-pillar-arrow {
  font-size: 20px;
  color: rgba(255,255,255,0.2);
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Sec head + articles (kept from previous design) ────────────────────── */
.m-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 5px;
}
.m-sec-head-t { font-size: 10px; font-weight: 500; color: rgba(255,255,255,0.62); }
.m-sec-head-l { font-size: 9px; color: var(--cyan); text-decoration: none; }

.m-articles {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.m-art-row {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  gap: 9px;
  align-items: center;
  text-decoration: none;
}
.m-art-ico {
  width: 32px; height: 32px;
  background: var(--surface2);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.m-art-ico svg {
  width: 15px; height: 15px;
  stroke: var(--cyan);
  fill: none;
  stroke-width: 1.5;
}
.m-art-thumb-wrap {
  width: 44px; height: 44px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface2);
}
.m-art-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.m-art-text { flex: 1; min-width: 0; }
.m-art-title {
  font-size: 10px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-art-meta {
  font-size: 8px;
  color: var(--dimmer);
  margin-top: 1px;
}

/* ── Badge system ───────────────────────────────────────────────────────── */
.badge {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 0.5px solid;
  text-transform: uppercase;
  display: inline-block;
  white-space: nowrap;
}
.b-legendary { color: #D4520A; border-color: #D4520A; background: rgba(212,82,10,0.16); }
.b-epic      { color: #2EB8E6; border-color: #2EB8E6; background: rgba(46,184,230,0.14); }
.b-solid     { color: #7DB87E; border-color: #7DB87E; background: rgba(125,184,126,0.13); }
.b-decent    { color: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.06); }
.b-poor      { color: #E04040; border-color: #E04040; background: rgba(224,64,64,0.13); }

/* ── Activity gradient fallbacks ────────────────────────────────────────── */
.pg-surf  { background: linear-gradient(155deg, #0A1E32, #0D3A5C, #0F5580); }
.pg-ski   { background: linear-gradient(155deg, #0E1A28, #1A3050, #B0C4D4); }
.pg-hike  { background: linear-gradient(155deg, #0E1A0A, #1E3810, #3A6018); }
.pg-kite  { background: linear-gradient(155deg, #0A1828, #0E2E48, #1A5878); }
.pg-mtb   { background: linear-gradient(155deg, #180E04, #3A2008, #6A3C10); }
.pg-scuba { background: linear-gradient(155deg, #080E1E, #0A1E40, #0A3868); }

/* ── Hide ALL desktop home sections on mobile ──────────────────────────────
   The mobile UI is fully replaced by #mobile-dest-hero + #mobile-bottom-nav.
   Nothing else from the desktop home should be visible. */
.hero,
#homepage-content,
#from-the-field,
#from-the-field ~ div,
.results-section,
#map-section,
#chat-widget,
.scroll-indicator { display: none !important; }

/* ── Destinations page mobile row list ──────────────────────────────────── */
.m-rlist {
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.m-rrow {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  text-decoration: none;
}
.m-rthumb {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.m-rbody { flex: 1; min-width: 0; padding: 7px 9px; }
.m-rname { font-size: 11px; font-weight: 500; color: #fff; }
.m-rsub  { font-size: 9px; color: var(--dim); margin-top: 1px; }
.m-rright { padding-right: 11px; flex-shrink: 0; text-align: right; }
.m-rscore { font-size: 15px; font-weight: 600; color: var(--cyan); }

/* ── Results page tweaks ────────────────────────────────────────────────── */
.results-container { padding: 0 12px !important; margin: 16px auto !important; }
.card-body { padding: 16px !important; }
.location-name { font-size: 1.15rem !important; }
.score-number { font-size: 2.2rem !important; }
.stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
#map-section { height: 220px !important; }
.bio-drawer { width: 100% !important; right: -100% !important; }
.bio-drawer.open { right: 0 !important; }

/* ── Explore landing tweaks ─────────────────────────────────────────────── */
.page-body { padding: 24px 14px 60px !important; }
.stat-grid { grid-template-columns: repeat(2, 1fr) !important; }
.level-grid { grid-template-columns: 1fr !important; }
.related-grid { grid-template-columns: 1fr !important; }

/* ── Touch targets ──────────────────────────────────────────────────────── */
.search-btn, .plan-btn, .action-btn { min-height: 44px; }
