/*
 * teachings.css
 * Styles for /teachings (list) and /teachings/<topic> (detail) pages.
 * Depends on styles.css for design tokens (--ink, --cream, --cream-2,
 * --gold, --gold-deep, --text-dark, --text-muted, --radius, .container,
 * .btn, .eyebrow). Load order in <head>: styles.css, then teachings.css.
 */

/* =========================================================
   PAGE HERO (same pattern used on /visit)
   ========================================================= */
.page-hero {
  position: relative;
  height: 46vh;
  min-height: 340px;
  max-height: 460px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink) var(--hero-img, none) center / cover no-repeat;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 9, 7, 0.55) 0%,
    rgba(10, 9, 7, 0.35) 40%,
    rgba(10, 9, 7, 0.85) 100%
  );
}
.page-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 44px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}
.breadcrumb a {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.18s ease;
}
.breadcrumb a:hover {
  color: var(--gold);
}
.breadcrumb i {
  font-size: 0.75rem;
  opacity: 0.6;
}
.breadcrumb span {
  color: var(--gold);
}
.page-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 600;
  max-width: 640px;
}
.page-hero p {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  max-width: 520px;
}

/* ---- shared section heading ---- */
.section-head h2 {
  font-size: 2.1rem;
  font-weight: 600;
  margin: 10px 0 12px;
}
.section-head p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ---- row list ---- */
.teaching-list {
  width: 100%;
  border-top: 1px solid rgba(20, 18, 14, 0.12);
}
.teaching-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 30px 8px;
  border-bottom: 1px solid rgba(20, 18, 14, 0.12);
}
.teaching-row-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-2);
  color: var(--gold-deep);
  font-size: 1rem;
}
.teaching-row-main {
  flex: 1;
  min-width: 0;
}
.teaching-row-cadence {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 8px;
}
.teaching-row-new {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #211a0c;
  background: var(--gold);
  padding: 2px 7px;
  border-radius: 999px;
}
.teaching-row-main h4 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}
.teaching-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.teaching-row-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
}
.teaching-row-actions {
  flex: none;
  display: flex;
  gap: 8px;
}
.teaching-row-actions .btn {
  font-size: 0.9rem;
  padding: 12px 20px;
}
.teaching-row-actions .btn i {
  font-size: 0.95rem;
}

/* =========================================================
   TELEGRAM CTA (light card, not a dark section)
   ========================================================= */
.telegram-cta {
  padding: 0 0 100px;
}
.telegram-cta-card {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 980px;
  margin: 0 auto;
  background: var(--cream-2);
  border: 1px solid rgba(20, 18, 14, 0.08);
  border-radius: var(--radius);
  padding: 40px 44px;
}
.telegram-cta-icon {
  flex: none;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(217, 164, 65, 0.14);
  border: 1px solid rgba(217, 164, 65, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-deep);
  font-size: 1.55rem;
}
.telegram-cta-copy {
  flex: 1;
  min-width: 240px;
}
.telegram-cta-copy h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 6px 0 8px;
}
.telegram-cta-copy p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 440px;
}
.telegram-cta-card .btn {
  flex: none;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 720px) {
  .page-hero {
    height: 40vh;
    min-height: 260px;
    max-height: 360px;
  }
  .page-hero-content {
    padding-bottom: 26px;
  }
  .breadcrumb {
    font-size: 0.8rem;
    gap: 6px;
    margin-bottom: 10px;
  }
  .page-hero h1 {
    font-size: clamp(1.5rem, 6.5vw, 2.1rem);
    max-width: 100%;
  }
  .page-hero p {
    margin-top: 10px;
    font-size: 0.95rem;
    max-width: 100%;
  }
  .section-head h2 {
    font-size: 1.5rem;
  }
  .teaching-row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 28px 4px;
  }
  .teaching-row-icon {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }
  .teaching-row-actions {
    justify-content: flex-start;
  }
  .teaching-row-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .telegram-cta {
    padding: 0 0 64px;
  }
  .telegram-cta-card {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 28px 22px;
  }
  .telegram-cta-copy h2 {
    font-size: 1.3rem;
  }
  .telegram-cta-card .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .page-hero {
    height: 34vh;
    min-height: 220px;
    max-height: 300px;
  }
  .page-hero-content {
    padding-bottom: 18px;
  }
  .breadcrumb {
    font-size: 0.75rem;
    margin-bottom: 8px;
  }
  .page-hero h1 {
    font-size: clamp(1.3rem, 7vw, 1.6rem);
  }
  .page-hero p {
    font-size: 0.9rem;
    margin-top: 8px;
  }
  .teaching-row-main h4 {
    font-size: 1.05rem;
  }
}

/* =========================================================
   LIST + DETAIL LAYOUT
   ========================================================= */
.topic-body {
  padding: 110px 0 110px;
}
.topic-body-inner {
  max-width: 1000px;
  margin: 0 auto;
}
.topic-intro {
  max-width: 620px;
  margin-bottom: 48px;
}
.topic-intro h2 {
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 10px 0 12px;
}
.topic-intro p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.back-link i {
  font-size: 0.8rem;
  transition: transform 0.18s ease;
}
.back-link:hover i {
  transform: translateX(-4px);
}

/* teaching list (index page) */
.teaching-row-main h3 {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}
.teaching-row-icon.is-large {
  width: 48px;
  height: 48px;
  font-size: 1.05rem;
}

/* series groups (detail pages) */
.series-group {
  padding-top: 72px;
}
.series-group:first-of-type {
  padding-top: 8px;
}
.series-head {
  margin-bottom: 24px;
}
.series-head h2 {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.35;
}
.teaching-row-icon.is-number {
  font-size: 0.95rem;
  font-weight: 700;
}

.telegram-cta {
  padding: 0 0 100px;
}

@media (max-width: 720px) {
  .topic-body {
    padding: 72px 0 72px;
  }
  .topic-intro {
    margin-bottom: 36px;
  }
  .topic-intro h2 {
    font-size: 1.5rem;
  }
  .teaching-row-main h3 {
    font-size: 1.15rem;
  }
  .teaching-row-icon.is-large {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  .series-group {
    padding-top: 56px;
  }
  .series-head {
    margin-bottom: 18px;
  }
  .series-head h2 {
    font-size: 1.25rem;
  }
}
