/* ============================================================
 *  JOURNEY PAGE — stile blog per le tappe
 *  Riusa variabili e pattern da src/style.css
 * ============================================================ */

/* Pagina journey: il body non scrolla, scrolla solo <main class="wm-journey-main"> */
body:has(.wm-journey-main) {
  height: 100vh;
  overflow: hidden;
}

.wm-journey-main {
  height: calc(100vh - 62px);       /* 62px = altezza header, come in style.css */
  min-height: 0;
  overflow-y: auto;
  background: var(--sky-blue);
  padding: 20px 14px;
  box-sizing: border-box;
  padding-bottom: env(safe-area-inset-bottom, 40px);
}

.wm-journey-wrap {
  max-width: 860px;
  margin: 0 auto 40px;
}

.wm-journey-header {
  margin-bottom: 20px;
}

.wm-journey-header h1 {
  margin: 8px 0 6px;
}

.wm-journey-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Card tappa: estende .wm-day-row già definito in style.css */
.wm-stage-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.wm-stage-card:hover {
  transform: translate(-3px, -2px);
  background: #fff3b0;
}

.wm-stage-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--sand);
  border-right: 2px solid var(--ink);
  padding: 12px 8px;
  min-height: 100px;
}

.wm-stage-cover .cover-icon {
  font-size: 2rem;
  line-height: 1;
}

.wm-stage-cover .cover-temps {
  font-family: var(--wm-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}

.wm-stage-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.wm-stage-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wm-stage-day {
  font-family: var(--wm-pixel);
  font-size: 0.62rem;
  background: var(--waldo-red);
  color: #fff;
  padding: 3px 7px;
  border: 2px solid var(--ink);
  border-radius: 4px;
}

.wm-stage-date {
  font-family: var(--wm-mono);
  font-size: 0.75rem;
  color: var(--text-soft);
  font-weight: 700;
}

.wm-stage-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.wm-stage-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--wm-mono);
  font-size: 0.78rem;
  color: var(--text-soft);
  border-top: 2px dashed var(--border-soft);
  padding-top: 6px;
  font-weight: 700;
}

.wm-stage-stats span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

/* Errore / vuoto */
.wm-journey-empty {
  background: var(--sand);
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 30px;
  text-align: center;
  font-weight: 800;
}

/* ============================================================
 *  MOBILE — eredita il resto da style.css
 * ============================================================ */
@media screen and (max-width: 768px) {
  .wm-journey-main {
    min-height: calc(100dvh - 54px);
    padding: 14px 10px;
    padding-bottom: calc(env(safe-area-inset-bottom, 20px) + 50px);
  }

  .wm-stage-card {
    grid-template-columns: 88px 1fr;
  }

  .wm-stage-cover {
    padding: 10px 6px;
    min-height: 90px;
  }

  .wm-stage-cover .cover-icon {
    font-size: 1.6rem;
  }

  .wm-stage-cover .cover-temps {
    font-size: 0.65rem;
  }

  .wm-stage-title {
    font-size: 0.98rem;
  }

  .wm-stage-stats {
    font-size: 0.72rem;
    gap: 8px;
  }
}

/* ============================================================
 *  COUNTRY CARDS (journey.html — indice nazioni)
 * ============================================================ */

.wm-countries-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wm-country-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  background: white;
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 5px 5px 0 var(--ink);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
.wm-country-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.wm-country-card-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sand);
  border-right: 3px solid var(--ink);
  font-size: 3rem;
  padding: 16px 8px;
}

.wm-country-card-body {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.wm-country-card-title {
  font-family: var(--wm-pixel);
  font-size: 1.1rem;
  color: var(--waldo-red);
  margin: 0;
  line-height: 1.2;
}

.wm-country-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--wm-mono);
  font-size: 0.78rem;
  color: var(--text-soft);
  font-weight: 700;
}

.wm-country-card-dates {
  font-family: var(--wm-mono);
  font-size: 0.72rem;
  color: var(--text-soft);
  font-weight: 600;
}

.wm-country-card-desc {
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.45;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

@media screen and (max-width: 768px) {
  .wm-country-card { grid-template-columns: 76px 1fr; }
  .wm-country-card-flag { font-size: 2.2rem; padding: 12px 6px; }
  .wm-country-card-title { font-size: 0.98rem; }
  .wm-country-card-body { padding: 12px 14px; }
}
