/* MyVillage Learn — news wire, guide library, video wire.
   Builds on ../styles.css (palette, type, buttons, header, footer).
   Audience rule: big tap targets (48px+), readable type, plain
   language — the same floors as the rest of the site. */

.learn-main { padding-top: 2rem; padding-bottom: 3rem; }

/* Section jump nav (the app's Feed / Guides / Videos segments,
   as plain anchor buttons on the web). */
.seg-nav { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.2rem 0 0.4rem; }

.learn-section { margin-top: 2.6rem; }
.learn-section > h2 {
  border-bottom: 3px solid var(--gold);
  padding-bottom: 0.35rem;
}

/* ---------- Wire cards (news + videos) ---------- */
.card-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.2rem; }
.learn-card {
  display: flex; gap: 1rem; align-items: center;
  background: var(--card-bg); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.1rem;
  text-decoration: none; color: var(--ink); min-height: 56px;
}
.learn-card:hover { border-color: var(--pine); color: var(--ink); }
.card-text { flex: 1; min-width: 0; }
.card-text h3 { margin: 0 0 0.25rem; }
.card-meta {
  text-transform: uppercase; letter-spacing: 0.09em;
  font-size: 0.78rem; font-weight: 700; color: var(--brick);
  margin: 0 0 0.3rem;
}
.card-summary { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.news-thumb {
  width: 84px; height: 84px; flex: none; object-fit: cover;
  border-radius: 10px; align-self: center;
}
.video-thumb {
  width: 168px; aspect-ratio: 3 / 2; flex: none; object-fit: cover;
  border-radius: 10px; align-self: center;
}
.empty-note { font-size: 1.05rem; padding: 1rem 0; }

/* ---------- Guide index (grouped by level, as in the app) ---------- */
.guide-group { margin-top: 1.6rem; }
.guide-group h3 { margin-bottom: 0.1rem; }
.group-count { margin: 0 0 0.7rem; font-size: 0.9rem; color: var(--ink-soft); }
.guide-rows {
  background: var(--card-bg); border: 2px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.guide-row {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.85rem 1.1rem; min-height: 56px;
  text-decoration: none; color: var(--ink);
}
.guide-row + .guide-row { border-top: 1px solid var(--line); }
.guide-row:hover { background: var(--cream-soft); color: var(--ink); }
.guide-row-title { flex: 1; font-weight: 600; }
.guide-row-meta {
  display: flex; align-items: center; gap: 0.6rem; flex: none;
  font-size: 0.9rem; color: var(--ink-soft);
}
.level-badge {
  border: 2px solid var(--gold); border-radius: 999px;
  padding: 0.1rem 0.6rem; font-size: 0.8rem; font-weight: 700;
  color: var(--pine-dark); white-space: nowrap;
}
.guide-row-chevron { font-size: 1.3rem; color: var(--brick); line-height: 1; }

/* ---------- Guide articles ---------- */
.back-link {
  font-weight: 700; display: inline-block;
  padding: 0.6rem 0.2rem; min-height: 48px;
}
.guide-article .lede { color: var(--ink-soft); }
.guide-figure { margin: 1.2rem 0; }
.guide-mat {
  background: var(--pine-dark); border-radius: var(--radius);
  padding: 10px; display: flex; justify-content: center;
}
.guide-mat img {
  border-radius: 8px; max-height: 440px; width: auto; max-width: 100%;
  object-fit: contain;
}
.guide-figure figcaption { margin-top: 0.6rem; font-size: 0.95rem; color: var(--ink-soft); }
.guide-figure figcaption strong { color: var(--pine-dark); }

/* ---------- App call to action (same block as tradition/catalog) ---------- */
.app-cta {
  margin-top: 2.6rem; background: var(--pine); color: #eaf2e6;
  border-radius: var(--radius); padding: 1.6rem;
}
.app-cta h2 { color: #fff; margin-top: 0; }
.app-cta .btn-pine { background: var(--gold); color: var(--pine-dark); }
.app-cta .btn-pine:hover { background: var(--cream); color: var(--pine-dark); }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .video-thumb { width: 112px; }
  .news-thumb { width: 64px; height: 64px; }
  .guide-row { flex-wrap: wrap; }
}
