/* ════════════════════════════════════════════════════════════════
   himalaya-tirtha.org · path-pages.css
   The division / path HUB template (10-path.html).
   Builds on shared.css + index-pages.css — reuses the three card
   languages (sutra-card / pmh-card / ix-row) unchanged. Adds only the
   path header, lead-in, jump row, and group scaffolding.
   A single restrained accent (--path-accent, set per path in JS) tints
   the roman numeral, the jewel ring and a hairline — nothing more.
   ════════════════════════════════════════════════════════════════ */

/* ─── Path header ──────────────────────────────────────────────── */
.path-header {
  --path-accent: var(--gold-500);
  position: relative;
  margin-top: 14px;
  overflow: hidden;
}
.path-header__inner {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 42px 32px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
@media (max-width: 720px) {
  .path-header__inner { padding: 36px 20px 32px; }
}

/* jewel icon — tylko obrazek dołączony do ścieżki, bez tła/halo */
.path-header__jewel { display: none; }

/* Meta ścieżki — czas czytania + licznik wejść (jak .lesson-meta w lekcjach). */
.path-header__meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 18px 0 0;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-500);
  letter-spacing: 0.01em;
}
.path-header__meta > span { white-space: nowrap; }
.path-header__meta .dot {
  width: 3px; height: 3px;
  background: var(--gold-500);
  border-radius: 50%;
}

/* Hero ścieżki — featured image artykułu path (jak hero lekcji). */
.path-hero { max-width: var(--w-page); margin: 0 auto 24px; }
.path-hero__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 2px;
  border: 1px solid var(--sepia-300);
}
.path-hero__frame img,
.path-hero__frame .placeholder {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.path-hero__frame .placeholder { background: var(--sepia-200); }
@media (max-width: 720px) { .path-hero__frame { aspect-ratio: 3 / 2; } }
.path-header__jewel img {
  width: 84%; height: 84%;
  object-fit: contain;
  position: relative; z-index: 2;
  filter: drop-shadow(0 8px 20px rgba(15,31,60,.22));
}
@media (max-width: 720px) {
  .path-header__jewel { width: 88px; height: 88px; }
}

.path-header__roman {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  letter-spacing: 0.06em;
  color: var(--path-accent);
  margin: 0 0 8px;
  /* keep gold legible on sepia; deepen if accent is too light */
  filter: saturate(1.05);
}
.path-header__eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin: 0 0 14px;
}
.path-header__name {
  font-family: var(--font-serif);
  font-size: 64px;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.018em;
  margin: 0 0 10px;
  color: var(--ink-900);
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
}
@media (max-width: 900px) { .path-header__name { font-size: 48px; } }
@media (max-width: 540px) { .path-header__name { font-size: 38px; } }
.path-header__sanskrit {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 21px;
  color: var(--ink-500);
  margin: 0;
}

/* ─── Taste bar — a light teaser, 3 random lessons (the only images) ── */
.path-taste {
  padding: 12px 0 8px;
}
.path-taste__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.path-taste__label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.path-taste__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--navy-800);
  text-decoration: none;
  transition: color 160ms ease;
}
.path-taste__all:hover { color: var(--blue-500); }
.path-taste__all .arrow { font-family: var(--font-serif); font-size: 15px; transition: transform 220ms ease; }
.path-taste__all:hover .arrow { transform: translateY(3px); }

.path-taste__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 760px) { .path-taste__grid { grid-template-columns: 1fr; } }

.taste-card {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: var(--sepia-100);
  border: 1px solid var(--sepia-300);
  border-radius: 2px;
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 200ms ease;
}
.taste-card:hover {
  transform: translateY(-2px);
  border-color: var(--navy-800);
  background: var(--sepia-200);
  box-shadow: 0 14px 30px -24px rgba(26,45,92,.4);
}
.taste-card__thumb {
  position: relative;
  width: 104px; height: 104px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--sepia-300);
}
.taste-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.taste-card__body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.taste-card__coll {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-500);
}
.taste-card__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.24;
  color: var(--ink-900);
  letter-spacing: -0.004em;
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.taste-card:hover .taste-card__title { color: var(--navy-800); }
@media (max-width: 760px) {
  .taste-card { grid-template-columns: 88px 1fr; }
  .taste-card__thumb { width: 88px; height: 88px; }
}

/* ─── The path essay — full article in lesson reading typography ── */
.path-essay-wrap { padding: 36px 0 8px; }
.path-essay {
  max-width: 748px;            /* ~72 char measure, same as a lesson (+10% od 680) */
  margin-inline: auto;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.7;
  color: var(--ink-900);
  font-variation-settings: "opsz" 24;
  text-align: left;            /* ragged right — never justified */
}
@media (max-width: 540px) { .path-essay { font-size: 18px; line-height: 1.66; } }
.path-essay p { margin: 0 0 1.2em; }
/* Inicjał na pierwszym akapicie opisu ścieżki — spójny z lekcjami. */
.path-essay > p:first-of-type::first-letter {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 144;
  font-size: 82px;
  font-weight: 500;
  float: left;
  line-height: 0.8;
  margin: 9px 14px -4px 0;
  color: var(--navy-800);
}
.path-essay__lead { color: var(--ink-900); }
.path-essay h2 {
  font-family: var(--font-serif);
  font-size: 29px;
  font-weight: 500;
  line-height: 1.2;
  margin: 46px 0 16px;
  color: var(--navy-900);
  font-variation-settings: "opsz" 48;
  letter-spacing: -0.008em;
  text-wrap: balance;
}
@media (max-width: 540px) { .path-essay h2 { font-size: 24px; margin: 36px 0 12px; } }

/* ─── Teachings section heading ───────────────────────────────── */
.path-teachings {
  padding: 24px 0 0;
  margin-top: 44px;
  border-top: 1px solid var(--sepia-300);
}
.path-teachings__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0 28px;
}
.path-teachings__title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.path-teachings__count {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--gold-500);
}
.path-teachings__count::before { content: "·"; margin-right: 10px; color: var(--sepia-400); font-style: normal; }

/* ─── Groups ──────────────────────────────────────────────────── */
.path-groups { padding: 8px 0 40px; }
.path-group {
  scroll-margin-top: 110px;
  padding: 14px 0 8px;
}
.path-group + .path-group { margin-top: 52px; }
/* word divider — gold collection label + count, no rule */
.path-group__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
}
.path-group__label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-500);
  white-space: nowrap;
}
.path-group__count {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-500);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* expanded rest of a long group continues the row rhythm seamlessly */
.path-group__rest { margin-top: 0; }
.path-group__rest[hidden] { display: none; }   /* beat .lib-rows display */

/* ─── Row collection · reading-time badge (in the lib-row token slot) ─ */
.lib-row__token .path-coll {
  font-weight: 600;
  letter-spacing: 0.14em;
}
.lib-row__token .path-coll--hridaya { color: var(--navy-800); }
.lib-row__token .path-coll--pmh { color: var(--blue-500); }
.lib-row__token .path-coll--other { color: var(--gold-500); }
.lib-row.is-read .lib-row__token .path-coll { color: var(--ink-500); }

/* editorial sub-line for Other rows (kind · author · date) */
.lib-row__meta {
  display: block;
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-500);
  letter-spacing: 0.01em;
  margin-top: 6px;
}
.lib-row.is-read .lib-row__meta { color: var(--sepia-400); }

/* show-all control — stays on the page, never links away */
.path-showall {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--navy-800);
  background: transparent;
  border: 1px solid var(--sepia-400);
  border-radius: 2px;
  padding: 13px 22px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.path-showall:hover { background: var(--navy-800); color: var(--sepia-100); border-color: var(--navy-800); }
.path-showall .arrow { font-family: var(--font-serif); font-size: 15px; }

/* the Other-Teachings rows sit flush; tighten their first border when
   they follow a group head */
.path-group .ix-archive { margin: 0; }

/* ─── Mobile touch targets (min 64px on cards' primary actions) ── */
@media (max-width: 720px) {
  .path-showall { width: 100%; justify-content: center; min-height: 56px; }
}
