/* Journey Page — Replicating chengheng.li/journey style */

/* ============================
   Page Background & Layout
   ============================ */
.journey-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ============================
   Hero Section
   ============================ */
.journey-hero {
  padding: 3rem 0 2rem;
}

.journey-title {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.8rem;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.journey-subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #64748b;
  max-width: 720px;
  margin-bottom: 1.5rem;
}

/* Stat Badges */
.journey-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-countries {
  color: #3b82f6;
}

.stat-cities {
  color: #f59e0b;
}

.stat-lived {
  color: #3b82f6;
}

.stat-provinces {
  color: #ef4444;
}

/* ============================
   Map Container
   ============================ */
.map-container {
  margin: 1.5rem 0 3rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.map-container iframe {
  display: block;
}

/* ============================
   Section Headings (with line)
   ============================ */
.timeline-section {
  margin: 3rem 0;
}

.section-heading {
  display: flex;
  align-items: center;
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #1e293b;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.section-icon {
  font-size: 1.6rem;
}

.section-line {
  flex: 1;
  height: 1px;
  background: #e2e8f0;
  margin-left: 0.75rem;
}

/* ============================
   Timeline — Shared
   ============================ */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 0.55rem;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 2px;
}

/* Lived timeline: blue line */
.lived-timeline::before {
  background: #93bbfc;
}

/* Visited timeline: golden/amber line */
.visited-timeline::before {
  background: #fcd88a;
}

/* Timeline Item */
.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

/* Timeline Dots */
.timeline-dot {
  position: absolute;
  left: -2.05rem;
  top: 1.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2.5px solid white;
  z-index: 1;
}

.lived-dot {
  background: #3b82f6;
  box-shadow: 0 0 0 2.5px #3b82f6;
}

.visited-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 2.5px #f59e0b;
}

/* Timeline Cards */
.timeline-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Card Header with pills */
.card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

/* Date Pills */
.date-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

/* Country Pills */
.country-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Year Pills (visited section) */
.year-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

/* Card City Name */
.card-city {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0.3rem 0 0.2rem;
}

.card-desc {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* ============================
   City Tags (Visited Section)
   ============================ */
.city-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.city-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  background: #fefce8;
  color: #78716c;
  border: 1px solid #fde68a;
  transition: transform 0.15s, background 0.15s;
}

.city-tag:hover {
  transform: scale(1.03);
  background: #fef9c3;
}

/* ============================
   Collapsible Year Sections
   ============================ */
.year-details {
  width: 100%;
}

.year-summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.2rem 0;
  list-style: none;
  flex-wrap: wrap;
  user-select: none;
}

.year-summary::-webkit-details-marker {
  display: none;
}

.year-summary::marker {
  display: none;
  content: '';
}

.country-flags {
  font-size: 1.1rem;
  letter-spacing: 0.15em;
}

.expand-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
  margin-left: auto;
}

.year-details[open] .expand-hint {
  font-size: 0;
}

.year-details[open] .expand-hint::after {
  content: '▾ click to collapse';
  font-size: 0.75rem;
}

.year-content {
  padding-top: 0.3rem;
}

/* ============================
   Month Groups (in visited cards)
   ============================ */
.month-group {
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid #f1f5f9;
}

.month-group:first-of-type {
  margin-top: 0.4rem;
  padding-top: 0;
  border-top: none;
}

.month-label {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}

/* ============================
   Section Subtitle
   ============================ */
.section-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

/* ============================
   Switzerland Grid
   ============================ */
.swiss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.swiss-region {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.swiss-region:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.region-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid #ef4444;
  display: inline-block;
}

.ch-tag {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #991b1b !important;
}

.ch-tag:hover {
  background: #fee2e2 !important;
}

.ch-tag small {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* ============================
   Responsive Design
   ============================ */
@media (max-width: 640px) {
  .journey-title {
    font-size: 2rem;
  }

  .journey-stats {
    gap: 0.5rem;
  }

  .stat-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.7rem;
  }

  .timeline {
    padding-left: 2rem;
  }

  .timeline-dot {
    left: -1.55rem;
    width: 10px;
    height: 10px;
  }

  .section-heading {
    font-size: 1.4rem;
  }
}

/* ============================
   Override Quarto defaults
   ============================ */
#title-block-header {
  display: none;
}

.quarto-title {
  display: none !important;
}

/* Remove Quarto default h2 border */
h2 {
  border-bottom: none !important;
}