/* Vita's World V2 — Editorial Camino & Travelogue Theme */
:root {
  --bg-primary: #faf6f0;
  --bg-secondary: #f2ebe0;
  --bg-card: #ffffff;
  --bg-accent: #192720;
  --text-primary: #1e2622;
  --text-secondary: #526058;
  --text-muted: #78867e;
  --accent-gold: #c98a35;
  --accent-terracotta: #b85a32;
  --accent-forest: #264c3a;
  --border-subtle: #e4dacb;
  --shadow-soft: 0 10px 30px -5px rgba(25, 39, 32, 0.07), 0 4px 12px -2px rgba(25, 39, 32, 0.04);
  --shadow-hover: 0 18px 36px -6px rgba(25, 39, 32, 0.13), 0 6px 16px -3px rgba(25, 39, 32, 0.07);
  --radius-lg: 16px;
  --radius-md: 12px;
  --font-serif: Georgia, "Playfair Display", "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --reading-scale: 1;
}

body.vw-dark {
  --bg-primary: #121916;
  --bg-secondary: #19231f;
  --bg-card: #1f2b26;
  --bg-accent: #0d1411;
  --text-primary: #f2ece1;
  --text-secondary: #b9c5be;
  --text-muted: #84968c;
  --accent-gold: #deb062;
  --accent-terracotta: #e07b50;
  --accent-forest: #4ca378;
  --border-subtle: #2d3e36;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Sub-navigation Header */
.v2-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 24px;
}

.v2-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.v2-site-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-primary);
}

.v2-brand-photo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--accent-gold);
}

.v2-brand-text h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.v2-brand-text p {
  margin: 2px 0 0;
  font-size: 13px;
  font-style: italic;
  color: var(--text-secondary);
}

.v2-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.v2-nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  transition: all 0.18s ease;
}

.v2-nav-link:hover, .v2-nav-link.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.v2-theme-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

/* Hero Banner */
.v2-hero {
  position: relative;
  background: linear-gradient(135deg, #17261f 0%, #243b30 60%, #3a2d22 100%);
  color: #faf6f0;
  padding: 56px 24px 48px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.v2-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.24;
  mix-blend-mode: luminosity;
}

.v2-hero-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 36px;
  align-items: center;
}

.v2-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 163, 89, 0.2);
  border: 1px solid rgba(212, 163, 89, 0.45);
  color: #f4cf8e;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.v2-hero h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
  margin: 0 0 16px;
  font-weight: 700;
  color: #ffffff;
}

.v2-hero-lead {
  font-size: 17px;
  color: #e2dcd3;
  margin: 0 0 24px;
  max-width: 640px;
}

.v2-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.v2-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #d89b44, #b86928);
  color: #ffffff !important;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
  border: none;
  cursor: pointer;
}

.v2-btn-primary:hover {
  transform: translateY(-1px);
}

.v2-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff !important;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.v2-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.v2-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.v2-stat-card {
  background: rgba(15, 24, 20, 0.68);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 18px;
}

.v2-stat-num {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: #f4cf8e;
  line-height: 1.1;
}

.v2-stat-label {
  font-size: 13px;
  color: #d0ddd6;
  margin-top: 4px;
  font-weight: 600;
}

.v2-stat-sub {
  font-size: 11.5px;
  color: #96aba0;
  margin-top: 2px;
}

/* Main Container */
.v2-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 24px 72px;
}

/* Interactive Route Map Section */
.v2-map-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  margin-bottom: 36px;
}

.v2-map-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.v2-map-title h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 21px;
}

.v2-map-title p {
  margin: 3px 0 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.v2-map-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.v2-legend-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
}

.v2-legend-btn.active {
  background: var(--accent-forest);
  color: #ffffff;
  border-color: var(--accent-forest);
}

.v2-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

#v2-camino-map {
  width: 100%;
  height: 410px;
  background: #e6dfd3;
}

/* Stage Route Scroller Strip */
.v2-stage-strip {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
}

.v2-stage-chip {
  flex: 0 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 12px;
  transition: all 0.15s ease;
  min-width: 155px;
}

.v2-stage-chip:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.v2-stage-chip strong {
  display: block;
  color: var(--accent-terracotta);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.v2-stage-chip span {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.v2-stage-chip small {
  color: var(--text-muted);
  font-size: 11px;
}

/* Filter & Search Toolbar */
.v2-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v2-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.v2-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.v2-tab-btn {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.v2-tab-btn:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
}

.v2-tab-btn.active {
  background: var(--bg-accent);
  color: #ffffff;
  border-color: var(--bg-accent);
}

.v2-search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 360px;
}

.v2-search-input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13.5px;
}

.v2-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-muted);
}

.v2-select {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

/* Dispatch Cards Grid */
.v2-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.v2-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

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

.v2-card-media {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.v2-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.v2-card:hover .v2-card-media img {
  transform: scale(1.04);
}

.v2-card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.v2-badge-stage {
  background: rgba(22, 33, 28, 0.86);
  backdrop-filter: blur(4px);
  color: #f4cf8e;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

.v2-badge-dist {
  background: rgba(184, 90, 50, 0.92);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

.v2-card-photo-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.v2-card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.v2-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.v2-card-title {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.3;
}

.v2-card-title a {
  text-decoration: none;
  color: var(--text-primary);
}

.v2-card-title a:hover {
  color: var(--accent-terracotta);
}

.v2-card-route {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-forest);
  margin-bottom: 10px;
}

.v2-card-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 18px;
  flex: 1;
}

.v2-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
}

.v2-read-btn {
  text-decoration: none;
  color: var(--accent-terracotta);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Gallery Grid */
.v2-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.v2-gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  aspect-ratio: 4 / 3;
}

.v2-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.v2-gallery-item:hover img {
  transform: scale(1.06);
}

.v2-gallery-cap {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.84));
  color: #ffffff;
  padding: 24px 12px 10px;
  font-size: 12px;
  line-height: 1.35;
}

/* Post Reader Page */
.v2-post-shell {
  max-width: 920px;
  margin: 0 auto;
}

.v2-post-telemetry {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-soft);
}

.v2-post-chapter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.v2-chapter-pill {
  background: var(--bg-secondary);
  color: var(--accent-terracotta);
  font-weight: 700;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.v2-post-h1 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.2;
  margin: 0 0 16px;
}

.v2-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-top: 18px;
}

.v2-tel-item small {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.v2-tel-item strong {
  font-size: 15px;
  color: var(--text-primary);
}

.v2-progress-wrap {
  margin-top: 16px;
}

.v2-progress-bar {
  height: 8px;
  background: var(--border-subtle);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.v2-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-terracotta));
  border-radius: 999px;
}

.v2-post-content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-soft);
}

.v2-prose {
  font-size: calc(17.5px * var(--reading-scale));
  line-height: 1.8;
  color: var(--text-primary);
}

.v2-prose p {
  margin: 0 0 1.3em;
}

.v2-post-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.v2-photo-figure {
  margin: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.v2-photo-figure:hover {
  transform: translateY(-3px);
}

.v2-photo-figure img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
}

.v2-photo-figure figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
}

/* Recovered Media Box */
.v2-recovered-box {
  background: linear-gradient(135deg, rgba(212, 163, 89, 0.14), rgba(184, 90, 50, 0.08));
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 28px;
}

/* Comments Section */
.v2-comments-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-soft);
}

.v2-comment-item {
  border-left: 3px solid var(--accent-gold);
  background: var(--bg-primary);
  padding: 14px 18px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 14px;
}

.v2-comment-item.is-vita {
  border-left-color: var(--accent-forest);
  margin-left: 24px;
}

.v2-comment-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.v2-vita-badge {
  background: var(--accent-forest);
  color: #ffffff;
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
}

/* Prev / Next Stage Navigation */
.v2-stage-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
}

.v2-stage-nav-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.18s ease;
}

.v2-stage-nav-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

/* Lightbox Modal */
#v2-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 13, 0.94);
  z-index: 1000000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px;
}

#v2-lightbox.open {
  display: flex;
}

#v2-lightbox img {
  max-width: 92vw;
  max-height: 78vh;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

.v2-lb-caption {
  color: #f5efe6;
  margin-top: 14px;
  font-size: 15px;
  text-align: center;
  max-width: 720px;
}

.v2-lb-close, .v2-lb-prev, .v2-lb-next {
  position: absolute;
  background: rgba(255,255,255,0.14);
  color: #ffffff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}

.v2-lb-close { top: 20px; right: 24px; }
.v2-lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.v2-lb-next { right: 24px; top: 50%; transform: translateY(-50%); }

@media (max-width: 860px) {
  .v2-hero-inner {
    grid-template-columns: 1fr;
  }
  .v2-stage-nav {
    grid-template-columns: 1fr;
  }
  .v2-post-content-card {
    padding: 22px;
  }
}
