/* ==================================================================
   Voyagera Discover — styling for the community itinerary pages.

   Loaded AFTER /styles.css, so it inherits the brand tokens
   (--accent, --ink, --sub, --line, --wash, --head, --body, --container,
   --pill, shadows). This file only adds the discover-specific layout:
   the hub grid and the magazine-style itinerary article.
   ================================================================== */

/* ---------- shared page chrome ---------- */
.j-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.j-nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; padding-top: 14px; padding-bottom: 14px;
}
.j-nav__links { display: flex; align-items: center; gap: 22px; }
.j-nav__links a:not(.btn) {
  font-weight: 500; font-size: .96rem; color: var(--ink); opacity: .82;
  transition: .2s;
}
.j-nav__links a:not(.btn):hover { opacity: 1; color: var(--accent); }
@media (max-width: 640px) {
  .j-nav__links .j-nav__hide { display: none; }
  .j-nav__links a:not(.btn) { display: none; }
}
@media (max-width: 400px) {
  .j-nav__links .btn--primary { padding: 9px 15px; font-size: .86rem; }
}

.j-breadcrumb {
  font-size: .86rem; color: var(--faint);
  padding: 20px 0 0; display: flex; gap: 8px; flex-wrap: wrap;
}
.j-breadcrumb a { color: var(--sub); }
.j-breadcrumb a:hover { color: var(--accent); }
.j-breadcrumb span { color: var(--faint); }

/* ---------- hub: hero ---------- */
.j-hero { padding: 46px 0 8px; }
.j-hero h1 {
  font-family: var(--head); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.05; color: var(--ink);
  margin: 14px 0 0;
}
.j-hero h1 em { color: var(--accent); font-style: italic; }
.j-hero__lead { margin: 18px 0 0; font-size: 1.14rem; color: var(--sub); line-height: 1.6; }

/* ---------- hub: card grid ---------- */
.j-grid {
  display: grid; gap: 26px; padding: 40px 0 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}
.j-card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden; box-shadow: var(--sh-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.j-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.j-card__media { position: relative; aspect-ratio: 16 / 10; background: var(--wash); overflow: hidden; }
.j-card__media img { width: 100%; height: 100%; object-fit: cover; }
.j-card__media--grad { background: linear-gradient(135deg, #FF9A8B, #FF6A88 55%, #3CD4EC); }
.j-card__emoji {
  position: absolute; inset: auto 12px 12px auto;
  font-size: 1.5rem; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35));
}
.j-card__chip {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255, 255, 255, .92); color: var(--ink);
  font-weight: 700; font-size: .72rem; letter-spacing: .02em;
  padding: 5px 11px; border-radius: var(--pill); box-shadow: var(--sh-sm);
}
.j-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.j-card__title { font-family: var(--head); font-weight: 700; font-size: 1.18rem; color: var(--ink); line-height: 1.25; }
.j-card__meta { margin: 8px 0 0; font-size: .88rem; color: var(--faint); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.j-card__meta .ic { width: 15px; height: 15px; color: var(--accent); }
.j-card__desc { margin: 12px 0 0; font-size: .95rem; color: var(--sub); line-height: 1.55; flex: 1; }
.j-card__cta { margin-top: 16px; font-weight: 600; font-size: .92rem; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.j-card__cta .ic { width: 16px; height: 16px; }

.j-empty { padding: 60px 0; text-align: center; color: var(--sub); }

/* ---------- itinerary article ---------- */
.j-article { max-width: 760px; margin: 0 auto; padding: 8px 24px 40px; overflow-wrap: break-word; word-break: break-word; }
.j-article__hero {
  position: relative; border-radius: 22px; overflow: hidden;
  aspect-ratio: 16 / 8; margin-top: 22px; background: var(--wash); box-shadow: var(--sh-lg);
}
.j-article__hero img { width: 100%; height: 100%; object-fit: cover; }
.j-article__hero--grad { background: linear-gradient(135deg, #FF9A8B, #FF6A88 55%, #3CD4EC); }
.j-article__scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent 60%); }
.j-article__chip {
  position: absolute; top: 16px; left: 16px;
  background: rgba(255, 255, 255, .92); color: var(--ink);
  font-weight: 700; font-size: .74rem; letter-spacing: .02em;
  padding: 6px 13px; border-radius: var(--pill); box-shadow: var(--sh-sm);
}
.j-article h1 {
  font-family: var(--head); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1.9rem, 4.4vw, 2.8rem); line-height: 1.08; color: var(--ink);
  margin: 26px 0 0;
}
.j-article__meta {
  margin: 16px 0 0; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: .95rem; color: var(--sub); font-weight: 600;
}
.j-article__meta span { display: inline-flex; align-items: center; gap: 7px; }
.j-article__meta .ic { width: 17px; height: 17px; color: var(--accent); }
.j-article__lead { margin: 22px 0 0; font-size: 1.14rem; line-height: 1.7; color: var(--ink); }

/* ---------- day-by-day ---------- */
.j-day { margin-top: 40px; }
.j-day__head {
  display: flex; align-items: baseline; gap: 12px;
  padding-bottom: 12px; border-bottom: 2px solid var(--accent-soft);
}
.j-day__label { font-family: var(--head); font-weight: 800; font-size: 1.05rem; color: var(--accent); letter-spacing: .04em; text-transform: uppercase; }
.j-day__city { font-family: var(--head); font-weight: 700; font-size: 1.35rem; color: var(--ink); }
.j-stops { list-style: none; margin: 6px 0 0; padding: 0; }
.j-stop { display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.j-stop:last-child { border-bottom: none; }
.j-stop__time {
  flex: 0 0 62px; font-family: var(--head); font-weight: 700; font-size: .98rem;
  color: var(--ink); padding-top: 2px;
}
.j-stop__time small { display: block; font-family: var(--body); font-weight: 600; font-size: .74rem; color: var(--faint); margin-top: 3px; }
.j-stop__body { flex: 1; min-width: 0; }
.j-stop__title { font-family: var(--head); font-weight: 700; font-size: 1.12rem; color: var(--ink); }
.j-stop__where { margin: 4px 0 0; font-size: .9rem; color: var(--faint); display: inline-flex; align-items: center; gap: 6px; }
.j-stop__where .ic { width: 14px; height: 14px; }
.j-stop__desc { margin: 9px 0 0; font-size: .98rem; line-height: 1.6; color: var(--sub); }

/* ---------- backlink card (the whole point) ---------- */
.j-blog {
  margin-top: 44px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 26px 28px; border-radius: 20px;
  background: var(--cream); border: 1px solid var(--line);
}
.j-blog__ic { font-size: 2rem; line-height: 1; }
.j-blog__txt { flex: 1 1 200px; min-width: 0; }
.j-blog__k { font-weight: 700; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.j-blog__t { font-family: var(--head); font-weight: 700; font-size: 1.2rem; color: var(--ink); margin-top: 4px; }
.j-blog__host { font-size: .92rem; color: var(--sub); margin-top: 3px; }

/* ---------- app CTA ---------- */
.j-cta {
  margin: 40px 0 56px; text-align: center; padding: 40px 28px;
  border-radius: 22px; background: var(--ink-deep); color: #fff;
}
.j-cta h2 { font-family: var(--head); font-weight: 800; font-size: 1.5rem; }
.j-cta p { margin: 10px auto 22px; max-width: 440px; color: #c7cbdb; line-height: 1.6; }
.j-cta .store-badges { justify-content: center; }
