:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --line: #e7e0d5;
  --line-strong: #d7cbb7;
  --text: #1e2430;
  --muted: #667085;
  --muted-2: #8b93a1;
  --primary: #0f2d3a;
  --gold: #b28a49;
  --gold-soft: #f6f0e5;
  --green: #2c6a57;
  --shadow-sm: 0 10px 30px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 18px 50px rgba(15, 23, 42, 0.08);
  --container: 1280px;
  --transition: 0.25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at top right, rgba(178, 138, 73, 0.06), transparent 22%),
    linear-gradient(180deg, #f8f6f1 0%, #f4f1ea 100%);
  color: var(--text);
  font-family: "Vazirmatn", sans-serif;
  line-height: 1.9;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

audio {
  width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(248, 246, 241, 0.82);
  border-bottom: 1px solid rgba(215, 203, 183, 0.6);
}

.topbar-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #d1af74);
  box-shadow: 0 0 0 6px rgba(178, 138, 73, 0.12);
}

.brand-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
}

.ghost-link {
  color: var(--primary);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  transition: var(--transition);
}

.hero {
  padding: 42px 0 26px;
}

.hero-card,
.hero-image-card,
.hero-audio-card,
.main-article,
.side-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(215, 203, 183, 0.75);
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
  
}

.hero-card {
  padding: 34px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--gold) 0%, #d4b06e 100%);
}

.hero-image-card {
  overflow: hidden;
  margin-bottom: 18px;
  background: #f2eee7;
}

.hero-image-card img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.hero-audio-card {
  padding: 20px;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  background: var(--gold-soft);
  color: #8a6930;
  border: 1px solid #ead9b8;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}

.meta-separator {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #c8b492;
}

.meta-item {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.hero-title {
  font-size: clamp(1.9rem, 3vw, 3.2rem);
  line-height: 1.45;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 16px;
}

.hero-summary {
  max-width: 900px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-audio-head {
  margin-bottom: 14px;
}

.hero-audio-head h3,
.section-head h2,
.side-card-head h3 {
  color: var(--primary);
  font-size: 1.35rem;
  line-height: 1.5;
  font-weight: 800;
}

.audio-note {
  color: var(--muted-2);
  font-size: 0.92rem;
  margin-top: 12px;
}

.content-section {
  padding: 8px 0 60px;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.main-article {
  padding: 28px;
}

.side-panel {
  display: grid;
  gap: 20px;
  position: sticky;
  top: 94px;
}

.side-card {
  padding: 22px;
}

.section-head,
.side-card-head {
  margin-bottom: 22px;
}

.section-kicker,
.side-kicker {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 8px;
}

.story-flow {
  display: grid;
  gap: 18px;
}

.story-pair {
  display: grid;
  gap: 12px;
}

.story-block {
  position: relative;
  border-radius: 22px;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}

.story-block::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  right: 0;
  width: 4px;
  border-radius: 999px;
}

.story-block.arabic {
  background: linear-gradient(180deg, #fbfffd 0%, #f7fcfa 100%);
  border-color: #dceee7;
}

.story-block.arabic::before {
  background: linear-gradient(180deg, #2c6a57 0%, #4d967f 100%);
}

.story-block.translation {
  background: linear-gradient(180deg, #fffdfa 0%, #fdf8ef 100%);
  border-color: #efe2c8;
}

.story-block.translation::before {
  background: linear-gradient(180deg, #b28a49 0%, #cfab6b 100%);
}

.block-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.block-label-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.story-block.arabic .block-label-dot {
  background: var(--green);
}

.story-block.translation .block-label-dot {
  background: var(--gold);
}

.block-text {
  color: var(--text);
  font-size: 1.04rem;
  line-height: 2.15;
}

.block-text.ar {
  font-family: "Noto Naskh Arabic", serif;
  font-size: 1.36rem;
  line-height: 2.2;
  color: #173d32;
}

/* Single toggle for all vocabulary */
.vocab-main-toggle {
  width: 100%;
  border: 1px solid #e3d7c1;
  background: linear-gradient(180deg, #fffdfa 0%, #f7f1e6 100%);
  color: var(--primary);
  border-radius: 18px;
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-weight: 800;
  transition: var(--transition);
  margin-bottom: 16px;
}

.vocab-main-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(178, 138, 73, 0.08);
}

.vocab-main-toggle-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(15, 45, 58, 0.06);
  border: 1px solid #e5dccf;
  position: relative;
  flex-shrink: 0;
}

.vocab-main-toggle-icon::before,
.vocab-main-toggle-icon::after {
  content: "";
  position: absolute;
  background: var(--primary);
  border-radius: 999px;
  transition: var(--transition);
}

.vocab-main-toggle-icon::before {
  width: 14px;
  height: 2px;
}

.vocab-main-toggle-icon::after {
  width: 2px;
  height: 14px;
}

.vocab-main-toggle.active .vocab-main-toggle-icon::after {
  transform: scaleY(0);
}

.vocab-list-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.vocab-list-wrap.open {
  grid-template-rows: 1fr;
}

.vocab-list {
  overflow: hidden;
  display: grid;
  gap: 14px;
}

.vocab-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fcfbf8 100%);
  padding: 16px;
}

.vocab-word {
  display: block;
  font-family: "Noto Naskh Arabic", serif;
  font-size: 1.24rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.vocab-short {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.vocab-meaning {
  color: var(--text);
  font-size: 0.97rem;
  line-height: 2;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
    top: auto;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(var(--container), calc(100% - 20px));
  }

  .hero-card,
  .main-article,
  .side-card,
  .hero-audio-card {
    padding: 18px;
    border-radius: 22px;
  }

  .hero-image-card {
    border-radius: 22px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-summary {
    font-size: 0.98rem;
  }

  .story-block {
    padding: 18px;
    border-radius: 18px;
  }

  .block-text.ar {
    font-size: 1.22rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.42rem;
  }

  .section-head h2,
  .side-card-head h3,
  .hero-audio-head h3 {
    font-size: 1.18rem;
  }

  .vocab-main-toggle {
    padding: 14px;
  }

  .vocab-main-toggle-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
}


