/* =========================================
   PUGLIA TRIP PLANNER — STYLESHEET
   Mob Kitchen editorial aesthetic
   ========================================= */

/* --- TOKENS --- */
:root {
  --terracotta: #e35336;
  --terracotta-light: #ec6f53;
  --terracotta-pale: #fbe7e1;
  --avatar-bg: #e35336;
  --cream: #ffffff;
  --cream-dark: #f5f5f3;
  --olive: #6b7c4e;
  --olive-dark: #4a5636;
  --charcoal: #1c1c1a;
  --charcoal-mid: #3a3a36;
  --muted: #7a7a72;
  --border: #e4e2de;

  --ff-serif: 'Inter', system-ui, sans-serif;
  --ff-sans: 'Inter', system-ui, sans-serif;

  --radius: 4px;
  --radius-lg: 12px;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.14);

  --nav-h: 64px;
  --max-w: 1160px;
  --gutter: clamp(16px, 4vw, 48px);
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: clip; max-width: 100vw; }
body {
  font-family: var(--ff-sans);
  background: var(--cream);
  color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100vw;
  width: 100%;
}
img, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* Prevent iOS Safari auto-zoom on input focus — any focusable text
   field < 16px triggers a viewport zoom on tap. Force ≥16px on the
   narrow viewports where the zoom happens. !important because
   per-component styles (e.g. .feed-comment-form__input at 0.85rem) are
   higher-specificity and would otherwise win. Desktop keeps its
   original sizing via the media query. */
@media (max-width: 960px) {
  input, textarea, select { font-size: 16px !important; }
}

/* --- UTILITIES --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--ff-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn--primary {
  background: var(--terracotta);
  color: #fff;
  border: 2px solid var(--terracotta);
}
.btn--primary:hover {
  background: var(--terracotta-light);
  border-color: var(--terracotta-light);
}
.btn--ghost {
  background: transparent;
  color: var(--charcoal);
  border: 2px solid var(--border);
}
.btn--ghost:hover { border-color: var(--charcoal); }
.hidden { display: none !important; }

/* --- NAV --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.nav.scrolled { box-shadow: var(--shadow); }
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav__logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav__links {
  display: flex;
  gap: 32px;
}
.nav__links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: none;
  color: var(--muted);
  transition: color 0.15s;
}
.nav__links a:hover { color: var(--charcoal); }
.nav__menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav__menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  transition: all 0.2s;
}
.nav__menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__menu-btn.open span:nth-child(2) { opacity: 0; }
.nav__menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- MOBILE NAV DRAWER --- */
.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  flex-direction: column;
  padding: 16px var(--gutter) 24px;
  gap: 0;
}
.nav-drawer.open { display: flex; }
.nav-drawer__link {
  padding: 14px 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--charcoal);
  border-bottom: 1px solid var(--border);
}

/* --- TRIP HEADER (compact Strava-style) --- */
.trip-header {
  margin-top: var(--nav-h);
  background: #f5f5f5;
  padding: clamp(36px, 6vw, 60px) var(--gutter) clamp(28px, 4vw, 44px);
  position: relative;
  max-width: 100vw;
  overflow-x: clip;
}
.trip-header__inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: clamp(24px, 4vw, 48px);
  /* stretch so the photo card matches the text column's height —
     otherwise its 3:4 aspect-ratio forces the grid row taller than
     the content and leaves dead grey below the badges. */
  align-items: stretch;
}
.trip-header__content { min-width: 0; }

/* Photo card in trip header — stretches to match the text column, with
   a sensible floor so it doesn't collapse on very short content. */
.trip-header__photos {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 320px;
  background: var(--cream);
  border: 1.5px solid var(--border);
}

/* --- Mobile: Airbnb-style layout --- */
@media (max-width: 820px) {
  .trip-header {
    padding: 16px var(--gutter) 0;
    background: var(--cream);
    position: relative;
  }

  .trip-header__inner {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    width: 100%;
    margin: 0;
    gap: 0;
  }

  /* Photo sits inset with rounded corners */
  .trip-header__photos {
    order: -1;
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 0;
    border-radius: 16px;
    border: none;
    flex-shrink: 0;
  }

  .trip-header__content {
    background: var(--cream);
    border-radius: 0;
    margin-top: 0;
    position: relative;
    z-index: 1;
    max-width: 100%;
    padding: 20px 0 8px;
  }
}
.hpc__empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 10px; color: var(--muted); text-align: center; padding: 24px;
}
.hpc__empty-icon { font-size: 2rem; opacity: 0.4; }
.hpc__empty-text { font-size: 0.75rem; letter-spacing: 0.05em; line-height: 1.5; }
.hpc__slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 0.8s ease;
}
.hpc__slide.active { opacity: 1; }
.hpc__overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  color: #fff; padding: 32px 18px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
@media (max-width: 820px) {
  .hpc__overlay { padding: 32px 18px 24px; background: linear-gradient(transparent, rgba(0,0,0,0.55)); border-radius: 0 0 16px 16px; }
}
.hpc__overlay-name { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em; text-transform: none; opacity: 0.85; }
.hpc__overlay-title { font-size: 1rem; font-family: var(--ff-serif); font-weight: 700; line-height: 1.2; }
.hpc__dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px;
}
@media (max-width: 820px) {
  .hpc__dots { bottom: 14px; }
}
.hpc__dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,0.45); cursor: pointer; transition: background 0.3s, transform 0.3s;
}
.hpc__dot.active { background: #fff; transform: scale(1.3); }

/* Airbnb-style "Preview your trip reel" pill, top-right of carousel */
.hpc__reel-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 10px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--charcoal);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.hpc__reel-btn:hover { background: #fff; transform: translateY(-1px); }
.hpc__reel-btn:active { transform: translateY(0); }
.hpc__reel-btn-icon { width: 16px; height: 16px; flex: 0 0 16px; }
@media (max-width: 820px) {
  .hpc__reel-btn { top: 12px; right: 12px; padding: 7px 12px 7px 9px; font-size: 0.75rem; }
}
.trip-header__eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: none;
  color: var(--terracotta);
  margin-bottom: 10px;
}
.trip-header__title {
  font-family: var(--ff-serif);
  font-size: clamp(2rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 0.95;
  color: var(--charcoal);
  margin-bottom: 28px;
  overflow-wrap: break-word;
  min-width: 0;
}
.trip-header__title em { font-style: italic; color: var(--terracotta); }
.trip-header__description { margin: -16px 0 28px; max-width: 72ch; }
.trip-header__description-text {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.55;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  margin: 0;
}
.trip-header__description-text--collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trip-header__read-more {
  display: inline-block;
  margin-top: 6px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--terracotta);
  cursor: pointer;
}
.trip-header__read-more:hover { text-decoration: underline; }
.trip-header__stat--link:hover { opacity: 0.7; }
.trip-header__stat-num {
  display: block;
  font-family: var(--ff-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
  color: var(--charcoal);
}
.trip-header__stat-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: none;
  color: var(--muted);
  margin-top: 4px;
}

/* --- SECTIONS --- */
.section { padding: clamp(40px, 6vw, 72px) var(--gutter); max-width: 100%; overflow-x: clip; }
.section__inner { max-width: var(--max-w); margin: 0 auto; min-width: 0; }
.section__header { max-width: 600px; margin-bottom: clamp(24px, 3.5vw, 40px); }
.section__eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: none;
  color: var(--terracotta);
  margin-bottom: 8px;
}
.section__title {
  font-family: var(--ff-serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 10px;
  color: var(--charcoal);
}
.section__desc { font-size: 0.9rem; line-height: 1.65; color: var(--muted); }

/* Mobile: promote the section subtitle to a tinted callout so it stands
   out from the feed/list below. Desktop keeps the plain muted line. */
@media (max-width: 820px) {
  .section__desc--callout {
    background: var(--terracotta-pale);
    border-left: 3px solid var(--terracotta);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--charcoal);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 4px;
  }
}

/* --- TIPS --- */
.tips { background: var(--cream-dark); }
.tips__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.tip-card { background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 24px; }
.tip-card__icon { font-size: 1.8rem; margin-bottom: 14px; }
.tip-card h3 { font-family: var(--ff-serif); font-size: 1.1rem; font-weight: 700; color: var(--charcoal); margin-bottom: 10px; }
.tip-card p { font-size: 0.875rem; line-height: 1.65; color: var(--muted); }

/* --- FOOTER --- */
.footer { background: var(--charcoal); padding: 40px var(--gutter); text-align: center; }
.footer__inner { max-width: var(--max-w); margin: 0 auto; }
.footer__logo { font-family: var(--ff-serif); font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.footer__logo em { color: var(--terracotta-light); font-style: italic; }
.footer__note { font-size: 0.8rem; color: rgba(255,255,255,0.4); }

/* --- RESPONSIVE --- */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__menu-btn { display: flex; }
}

@media (max-width: 560px) {
  .trip-header__stat-num { font-size: 1.5rem; }
}

/* --- SCROLL ANIMATIONS --- */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-up.visible { opacity: 1; transform: none; }

/* --- APP TABS (rounded, content-width, left-aligned) ---
   max-width is max-w + 2*gutter with box-sizing: border-box so the
   content area inside the gutter padding is exactly max-w wide —
   matching .trip-header__inner's alignment. */
.app-tabs {
  display: flex;
  gap: 10px;
  max-width: calc(var(--max-w) + 2 * var(--gutter));
  /* Match .trip-header's padding-bottom so the gap
     between the grey trip-header and the tabs mirrors
     the gap from the badges row to the grey end. */
  margin: clamp(28px, 4vw, 44px) auto 0;
  padding: 0 var(--gutter);
  background: transparent;
}
@media (max-width: 760px) {
  /* Pin tabs directly under the fixed nav from first paint, so the
     Itinerary/Challenges/Social affordance is never missed — not only
     revealed after the hero is scrolled past. Opaque cream background
     so content scrolling underneath doesn't bleed through. */
  .app-tabs {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    z-index: 90;
    margin-top: 0;
    /* Reserve space on the left for the back button that sits inside the bar. */
    padding: 10px var(--gutter) 10px calc(var(--gutter) + 34px + 10px);
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    gap: 8px;
  }
  /* Hero now has to clear both the fixed nav and the fixed tab bar.
     --app-tabs-h is measured in JS and set on :root; the 60px fallback
     matches the rendered height with current tab styling. */
  .trip-header {
    margin-top: calc(var(--nav-h) + var(--app-tabs-h, 60px));
  }
  /* Move the back button out of the hero and into the fixed tab bar,
     sitting to the left of Itinerary/Challenges/Social. */
  .trip-header__back {
    position: fixed;
    top: calc(var(--nav-h) + 10px);
    left: var(--gutter);
    z-index: 91;
    background: var(--cream);
    box-shadow: none;
    border: 1.5px solid var(--border);
  }
  .trip-header__back:hover { box-shadow: none; border-color: var(--charcoal-mid); }
  .nav--condensed .nav__logo-img { height: 44px; }
}
.app-tab {
  padding: 9px 18px;
  font-family: var(--ff-sans);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--charcoal);
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.app-tab:hover { border-color: var(--charcoal-mid); }
.app-tab:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}
.app-tab.app-tab--active {
  color: var(--terracotta);
  background: var(--terracotta-pale);
  border-color: var(--terracotta);
}
.app-tab.app-tab--active:hover { border-color: var(--terracotta-light); }

/* --- APP PANELS ---
   Panels reuse .section but sit under a tab bar, so the global
   .section top/bottom padding is too generous here. Tighten it. */
.app-panel { display: none; }
.app-panel.app-panel--active { display: block; }
.app-panel.section { padding: clamp(24px, 3vw, 40px) var(--gutter); }

/* --- DASHBOARD --- */
.dash-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (max-width: 760px) {
  /* Tab bar already tells users which panel they're on — drop the
     redundant heading inside each panel. */
  .app-panel .section__header { display: none; }
}

/* ── SHARED INLINE ACTION BUTTON (Note / Photo) ── */
.itinerary-item__note-btn,
.itinerary-item__photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--terracotta);
  background: var(--terracotta-pale);
  border: 1px solid rgba(227,83,54,0.2);
  border-radius: var(--radius);
  padding: 5px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}
.itinerary-item__note-btn:hover,
.itinerary-item__photo-btn:hover { background: var(--terracotta); color: #fff; }
.itinerary-item__note-btn.has-note { background: rgba(227,83,54,0.15); }
.itinerary-item__photo-btn input { display: none; }

/* Thumbnails below actions */
.itinerary-item__photo-thumbs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.itinerary-item__photo-thumbs:empty { display: none; }

/* Shared thumb style */
.photo-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid rgba(0,0,0,0.06);
  transition: transform 0.15s, opacity 0.15s;
}
.photo-thumb:hover { transform: scale(1.05); opacity: 0.88; }

/* Day-level photo row */
.day-photos-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 20px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.day-photos-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--terracotta);
  background: var(--terracotta-pale);
  border: 1px solid rgba(227,83,54,0.2);
  border-radius: var(--radius);
  padding: 5px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}
.day-photos-btn:hover { background: var(--terracotta); color: #fff; }
.day-photos-btn input { display: none; }
.day-photos-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
/* ── SHARED NAV BUTTON STYLE ── */
.nav__icon-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: inherit;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1;
}
.nav__icon-btn:hover,
.nav__icon-btn.active {
  background: rgba(224,122,84,0.15);
  border-color: #ec6f53;
  color: #ec6f53;
}

/* ── IMPERSONATION BANNER ── */
.imp-banner {
  position: sticky; top: 0; z-index: 900;
  background: #fff3cd; color: #664d03;
  border-bottom: 1px solid #e4c97b;
  font-size: 0.88rem; padding: 10px 16px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  font-family: var(--ff-sans, 'Inter', sans-serif);
}
.imp-banner__text { font-weight: 500; }
.imp-banner__text strong { font-weight: 700; }
.imp-banner__btn {
  background: #664d03; color: #fff3cd; border: none;
  padding: 5px 12px; border-radius: 6px;
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.imp-banner__btn:hover { background: #4a3902; }

/* ── NAV USER WIDGET ── */
.nav__user { position: relative; }
.nav__user-btn {
  background: none; border: none; display: flex; align-items: center;
  gap: 8px; cursor: pointer; padding: 5px 8px; border-radius: 8px;
  font-family: inherit; transition: background 0.15s;
}
.nav__user-btn:hover { background: rgba(0,0,0,0.05); }
.nav__user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--avatar-bg); color: #fff;
  font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav__user-name { font-size: 0.85rem; font-weight: 500; color: var(--charcoal, #1a1a18); }
.nav__user-caret { font-size: 0.6rem; color: #aaa; margin-left: 2px; }
/* Mobile: drop the user name + caret to reclaim nav whitespace. The
   avatar alone is enough to open the menu. */
@media (max-width: 760px) {
  .nav__user-name, .nav__user-caret { display: none; }
}
.nav__user-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid #e8e4dc;
  border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  min-width: 160px; overflow: hidden; z-index: 200;
}
.nav__user-item {
  display: block; padding: 11px 18px; font-size: 0.85rem;
  color: var(--charcoal, #1a1a18); text-decoration: none;
  font-family: inherit; background: none; border: none;
  width: 100%; text-align: left; cursor: pointer;
  transition: background 0.12s;
}
.nav__user-item:hover { background: #f5f0e8; }
.nav__user-item--signout { color: #b33; border-top: 1px solid #f0ece4; }
/* ── TRIP HEADER BACK LINK ── */
.trip-header__back {
  position: absolute; top: 16px; left: 16px; z-index: 10;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 8px rgba(0,0,0,0.18);
  color: #222; font-size: 1rem; font-weight: 500;
  text-decoration: none; transition: box-shadow 0.15s;
}
.trip-header__back:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.26); }
/* Mobile: move the back button out of the hero and into the fixed tab bar,
   sitting to the left of Itinerary/Challenges/Social. Desktop untouched.
   This rule has to live AFTER the base .trip-header__back definition so
   source order lets the mobile overrides win at equal specificity. */
@media (max-width: 760px) {
  .trip-header__back {
    position: fixed;
    top: calc(var(--nav-h) + 10px);
    left: var(--gutter);
    z-index: 91;
    background: var(--cream);
    box-shadow: none;
    border: 1.5px solid var(--border);
  }
  .trip-header__back:hover { box-shadow: none; border-color: var(--charcoal-mid); }
}
/* ── TRIP DATES CARD ── */
.trip-dates-card {
  display: flex; background: #efefed; border-radius: 12px;
  overflow: hidden; margin-top: 20px; margin-bottom: 4px;
}
.trip-dates__col { flex: 1; padding: 14px 18px; display: flex; flex-direction: column; gap: 3px; }
.trip-dates__col--right { text-align: right; }
.trip-dates__label { font-size: 0.78rem; font-weight: 700; color: #1a1a18; }
.trip-dates__date { font-size: 0.9rem; color: #1a1a18; }
.trip-dates__divider { width: 1px; background: #d0cec9; align-self: stretch; flex-shrink: 0; }

/* ── TRIPS PAGE ── */
.trips-page { display: none; min-height: 100vh; background: #fff; padding-top: var(--nav-h); }
.trips-page.visible { display: block; }
.trips-page__inner { max-width: 900px; margin: 0 auto; padding: 36px 24px 80px; }
.trips-page__title { font-family: 'Inter', system-ui, sans-serif; font-size: 2rem; font-weight: 800; color: #222; margin: 0 0 24px; letter-spacing: -0.02em; }
/* Featured card */
.trip-featured { display: flex; border: 1px solid #e0e0e0; border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; background: #fff; transition: box-shadow 0.18s; margin-bottom: 40px; }
.trip-featured:hover { box-shadow: 0 6px 28px rgba(0,0,0,0.1); }
.trip-featured__img { width: 42%; flex-shrink: 0; position: relative; height: 260px; background: #e8e4dc; overflow: hidden; }
.trip-featured__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trip-featured__body { flex: 1; padding: 28px 24px 24px; display: flex; flex-direction: column; }
.trip-featured__name { font-size: 1.5rem; font-weight: 700; color: #222; margin: 0 0 6px; letter-spacing: -0.01em; }
.trip-featured__date { font-size: 0.95rem; color: #717171; margin: 0; }
.trip-featured__footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 24px; }
.trip-featured__location { font-size: 0.82rem; color: #717171; }
.trip-featured__btn { padding: 10px 20px; border-radius: 8px; border: 1px solid #222; background: #fff; color: #222; font-size: 0.85rem; font-weight: 600; cursor: pointer; font-family: inherit; text-decoration: none; display: inline-block; transition: background 0.15s; white-space: nowrap; }
.trip-featured__btn:hover { background: #f5f5f5; }
/* Section headings */
.trips-section-title { font-size: 1.1rem; font-weight: 700; color: #222; margin: 0 0 16px; letter-spacing: -0.01em; }
/* Upcoming row */
.trips-upcoming-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin-bottom: 44px; }
.trips-upcoming-row::-webkit-scrollbar { display: none; }
.trip-upcoming { display: flex; align-items: center; gap: 12px; border: 1px solid #e0e0e0; border-radius: 12px; padding: 12px; text-decoration: none; color: inherit; background: #fff; min-width: 210px; flex-shrink: 0; transition: box-shadow 0.15s; }
.trip-upcoming:hover { box-shadow: 0 2px 14px rgba(0,0,0,0.09); }
.trip-upcoming__thumb { width: 60px; height: 60px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: #e8e4dc; }
.trip-upcoming__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trip-upcoming__name { font-weight: 600; font-size: 0.88rem; color: #222; margin: 0 0 3px; }
.trip-upcoming__date { font-size: 0.8rem; color: #717171; margin: 0; }
/* Past trips */
.trips-past-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.trip-past { display: flex; align-items: center; gap: 12px; border: 1px solid #e0e0e0; border-radius: 12px; padding: 12px; text-decoration: none; color: inherit; opacity: 0.7; transition: opacity 0.15s; }
.trip-past:hover { opacity: 1; }
.trip-past__thumb { width: 52px; height: 52px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: #e8e4dc; }
.trip-past__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trip-past__name { font-weight: 600; font-size: 0.85rem; color: #222; margin: 0 0 3px; }
.trip-past__date { font-size: 0.78rem; color: #aaa; margin: 0; }
@media (max-width: 600px) {
  .trip-featured { flex-direction: column; }
  /* Lock a landscape aspect ratio so portrait source images crop to
     the card shape instead of stretching it tall. */
  .trip-featured__img { width: 100%; height: auto; aspect-ratio: 3 / 2; }
  .trips-page__inner { padding: 24px 16px 80px; }
  .trips-upcoming-row { flex-direction: column; overflow-x: visible; }
  .trip-upcoming { min-width: 0; width: 100%; }
}
.auth-profiles {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
}
.auth-profile {
  flex: 1;
  max-width: 160px;
  padding: 28px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.auth-profile:hover { background: rgba(255,255,255,0.11); border-color: rgba(255,255,255,0.22); }
.auth-profile__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--avatar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
}
