/* ==========================================================================
   index.css — Section landing pages for zarathushtra.com
   Loads after base.css. Covers: section heroes, collapsible ToC accordions,
   card/link lists, download library, translation-pair cards.
   ========================================================================== */

/* --------------------------------------------------------------------------
   PAGE WRAPPER
   The sidebar is handled by base.css (.sidebar + .page-body).
   .index-page wraps the main content column.
   -------------------------------------------------------------------------- */

.index-page {
  padding: 0 0 4rem 0;
}


/* ==========================================================================
   SECTION HERO
   Decorative header block at the top of each section landing page.
   Usage: <header class="section-hero"> … </header>
   ========================================================================== */

.section-hero {
  position: relative;
  padding: 3.5rem 3rem 3rem;
  margin-bottom: 3rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(201, 168, 76, 0.18);
}

/* Faint radial glow behind hero — depth without canvas */
.section-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%,
      rgba(201, 168, 76, 0.07) 0%,
      transparent 70%);
  pointer-events: none;
}

/* Gold top rule */
.section-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 3rem;
  right: 3rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(201, 168, 76, 0.6) 20%,
    #C9A84C 50%,
    rgba(201, 168, 76, 0.6) 80%,
    transparent 100%
  );
}

/* Faravahar watermark — right-aligned, faint */
.section-hero .hero-faravahar {
  position: absolute;
  right: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 110px;
  height: auto;
  opacity: 0.045;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.6s ease;
}

.section-hero:hover .hero-faravahar {
  opacity: 0.09;
}

/* Eyebrow — small caps label above the title */
.section-hero .hero-eyebrow {
  display: block;
  font-family: var(--font-head);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.55);
  margin-bottom: 0.75rem;
}

/* Section title */
.section-hero .hero-title {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 400;
  color: #C9A84C;
  line-height: 1.15;
  margin: 0 0 1.1rem 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Avestan / subtitle in italic Cormorant */
.section-hero .hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  color: rgba(201, 168, 76, 0.6);
  margin: 0 0 1.25rem 0;
  letter-spacing: 0.04em;
}

/* Intro prose */
.section-hero .hero-intro {
  font-family: var(--font-body);
  font-size: 1.0rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
  max-width: 62ch;
  margin: 0;
}

/* Gold diamond divider — used between hero and body */
.section-divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 3rem 2.5rem;
  color: rgba(201, 168, 76, 0.35);
  font-size: 0.55rem;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 168, 76, 0.3),
    transparent
  );
}

.section-divider .divider-diamond {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #C9A84C;
  transform: rotate(45deg);
  opacity: 0.5;
}


/* ==========================================================================
   CONTENT BODY
   Wraps all ToC/list content below the hero.
   ========================================================================== */

.index-body {
  padding: 0 3rem;
}


/* ==========================================================================
   COLLAPSIBLE ACCORDION — Pure CSS (checkbox)
   
   Structure:
     <div class="accordion">
       <input type="checkbox" id="part-1" class="acc-toggle">
       <label for="part-1" class="acc-header">
         <span class="acc-number">I</span>
         <span class="acc-title">Part Title</span>
         <span class="acc-meta">35 entries</span>
         <span class="acc-chevron"></span>
       </label>
       <div class="acc-body">
         <ol class="toc-list"> … </ol>
       </div>
     </div>
   ========================================================================== */

.accordion {
  margin-bottom: 0.35rem;
  border: 1px solid rgba(201, 168, 76, 0.12);
  border-radius: 2px;
  background: rgba(201, 168, 76, 0.02);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.accordion:hover {
  border-color: rgba(201, 168, 76, 0.22);
  background: rgba(201, 168, 76, 0.04);
}

/* Hide the actual checkbox */
.acc-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* Accordion header — the clickable label */
.acc-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.acc-header:hover {
  background: rgba(201, 168, 76, 0.05);
}

/* Roman numeral / part number badge */
.acc-number {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(201, 168, 76, 0.5);
  min-width: 1.8rem;
  text-align: center;
}

/* Part title */
.acc-title {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #C9A84C;
  flex: 1;
}

/* Entry count or subtitle */
.acc-meta {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
}

/* Animated chevron */
.acc-chevron {
  display: block;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid rgba(201, 168, 76, 0.45);
  border-bottom: 1.5px solid rgba(201, 168, 76, 0.45);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.3s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

/* Accordion body — collapsed by default */
.acc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
  overflow: hidden;
}

.acc-body > * {
  overflow: hidden;
  min-height: 0;
}

/* Open state — checkbox checked */
.acc-toggle:checked ~ .acc-header .acc-chevron {
  transform: rotate(-135deg) translateY(-2px);
  border-color: rgba(201, 168, 76, 0.75);
}

.acc-toggle:checked ~ .acc-header {
  border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

.acc-toggle:checked ~ .acc-header .acc-title {
  color: #E0C06A;
}

.acc-toggle:checked ~ .acc-body {
  grid-template-rows: 1fr;
}

/* ==========================================================================
   TOC LIST — entries inside accordion bodies
   ========================================================================== */

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 0.75rem 0;
}

.toc-list li {
  border-bottom: 1px solid rgba(201, 168, 76, 0.06);
}

.toc-list li:last-child {
  border-bottom: none;
}

.toc-list a {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem 0.5rem 3.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s ease, background 0.2s ease, padding-left 0.2s ease;
}

.toc-list a:hover {
  color: #C9A84C;
  background: rgba(201, 168, 76, 0.04);
  padding-left: 4rem;
}

/* Entry number (optional) */
.toc-list .entry-num {
  font-family: var(--font-head);
  font-size: 0.65rem;
  color: rgba(201, 168, 76, 0.3);
  min-width: 1.5rem;
  flex-shrink: 0;
  letter-spacing: 0.05em;
  padding-top: 0.1em;
}

/* Sub-label / description under entry title */
.toc-list .entry-sub {
  display: block;
  font-size: 0.82rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 0.1rem;
}

/* Simple flat ToC list (no accordion — for Articles, etc.) */
.toc-list-flat {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list-flat li {
  border-bottom: 1px solid rgba(201, 168, 76, 0.07);
}

.toc-list-flat li:last-child {
  border-bottom: none;
}

.toc-list-flat a {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  font-family: var(--font-body);
  font-size: 1.0rem;
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease, background 0.2s ease;
}

.toc-list-flat a:hover {
  color: #C9A84C;
  padding-left: 1.4rem;
  background: rgba(201, 168, 76, 0.04);
}

.toc-list-flat .entry-num {
  font-family: var(--font-head);
  font-size: 0.65rem;
  color: rgba(201, 168, 76, 0.3);
  min-width: 1.8rem;
  flex-shrink: 0;
  letter-spacing: 0.05em;
  align-self: center;
}


/* ==========================================================================
   TRANSLATION PAIR CARDS — Gathas landing
   Two side-by-side cards for Azargoshasb vs D.J. Irani translations.
   ========================================================================== */

.translation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.translation-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.75rem 1.75rem;
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: 2px;
  background: rgba(201, 168, 76, 0.025);
  text-decoration: none;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}

.translation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 168, 76, 0.4),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.translation-card:hover {
  border-color: rgba(201, 168, 76, 0.38);
  background: rgba(201, 168, 76, 0.055);
  transform: translateY(-2px);
}

.translation-card:hover::before {
  opacity: 1;
}

.card-label {
  font-family: var(--font-head);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.45);
  margin-bottom: 0.6rem;
}

.card-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: #C9A84C;
  margin: 0 0 0.35rem 0;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.card-subtitle {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(201, 168, 76, 0.5);
  margin: 0 0 1rem 0;
}

.card-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.5);
  flex: 1;
  margin: 0 0 1.25rem 0;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-head);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.65);
  transition: color 0.2s ease, gap 0.2s ease;
}

.translation-card:hover .card-cta {
  color: #C9A84C;
  gap: 0.65rem;
}

.card-cta::after {
  content: '→';
  font-size: 0.75rem;
}


/* ==========================================================================
   DOWNLOAD LIBRARY
   PDF download grid with file metadata.
   ========================================================================== */

.download-section {
  margin-bottom: 2.5rem;
}

.download-section-title {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.5);
  margin: 0 0 0.85rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

.download-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.download-list li {
  border-bottom: 1px solid rgba(201, 168, 76, 0.07);
}

.download-list li:last-child {
  border-bottom: none;
}

.download-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.5rem;
  text-decoration: none;
  transition: background 0.2s ease, padding-left 0.2s ease;
  border-radius: 1px;
}

.download-link:hover {
  background: rgba(201, 168, 76, 0.04);
  padding-left: 0.85rem;
}

/* PDF icon — pure CSS */
.dl-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 38px;
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 2px;
  flex-shrink: 0;
  background: rgba(201, 168, 76, 0.04);
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dl-icon::before {
  content: 'PDF';
  font-family: var(--font-head);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(201, 168, 76, 0.5);
}

/* Corner fold on icon */
.dl-icon::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 6px 6px 0;
  border-color: transparent rgba(201, 168, 76, 0.25) transparent transparent;
}

.download-link:hover .dl-icon {
  border-color: rgba(201, 168, 76, 0.45);
  background: rgba(201, 168, 76, 0.08);
}

.dl-info {
  flex: 1;
  min-width: 0;
}

.dl-title {
  display: block;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.download-link:hover .dl-title {
  color: #C9A84C;
}

.dl-meta {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 0.1rem;
}

.dl-size {
  font-family: var(--font-head);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: rgba(201, 168, 76, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}


/* ==========================================================================
   SECTION INTRO TEXT
   Standalone prose block (below hero, above accordion/lists).
   ========================================================================== */

.section-intro {
  font-family: var(--font-body);
  font-size: 1.0rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.62);
  margin: 0 0 2rem 0;
  max-width: 68ch;
}

.section-intro em {
  font-style: italic;
  color: rgba(201, 168, 76, 0.65);
}


/* ==========================================================================
   SUBSECTION HEADING
   Used within the body to label groups (e.g. "Azargoshasb Translation")
   ========================================================================== */

.index-heading {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.55);
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.12);
}

.index-heading:first-child {
  margin-top: 0;
}


/* ==========================================================================
   RESPONSIVE — Mobile (≤767px)
   ========================================================================== */

@media (max-width: 767px) {

  .section-hero {
    padding: 2.5rem 1.25rem 2rem;
  }

  .section-hero::after {
    left: 1.25rem;
    right: 1.25rem;
  }

  .section-hero .hero-faravahar {
    display: none;
  }

  .section-hero .hero-title {
    font-size: clamp(1.1rem, 6vw, 1.5rem);
  }

  .section-hero .hero-intro {
    font-size: 0.93rem;
  }

  .index-body {
    padding: 0 1.25rem;
  }

  .section-divider {
    margin: 0 1.25rem 2rem;
  }

  .translation-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .translation-card {
    padding: 1.5rem 1.25rem;
  }

  .acc-header {
    padding: 0.85rem 1rem;
  }

  .toc-list a {
    padding: 0.55rem 1rem 0.55rem 2.75rem;
    font-size: 0.92rem;
  }

  .toc-list a:hover {
    padding-left: 3rem;
  }

  .toc-list-flat a {
    font-size: 0.95rem;
    padding: 0.6rem 0.75rem;
  }

  .download-link {
    gap: 0.75rem;
    padding: 0.65rem 0.25rem;
  }

  .dl-title {
    font-size: 0.92rem;
  }

}
