/* ==========================================================================
   ATHARI ARCHIVE — Design System & Stylesheet
   Faithful to https://athari-archive.com Article Architecture
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ================= THEME VARIABLES ================= */
:root {
  --gold-primary: #c5a880;
  --gold-hover: #b39268;
  --gold-dark: #8c6d3d;
  --gold-bg: rgba(197, 168, 128, 0.12);
  --gold-border: rgba(197, 168, 128, 0.35);

  --green-success: #10b981;
  --green-bg: rgba(16, 185, 129, 0.12);
  --blue-info: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --headFont: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-arabic: 'Amiri', 'Traditional Arabic', serif;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Light Theme (Default - Matches athari-archive.com) */
body.light {
  --bg-page: #f9fafb;
  --bg-surface: #ffffff;
  --bg-header: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-quote: #fbf9f6;
  --bg-callout-benefit: #f0fdf4;
  --bg-callout-principle: #fdfbf7;
  --bg-callout-note: #eff6ff;
  --border-color: #e5e7eb;
  --border-subtle: #f3f4f6;
  --border-hover: #d1d5db;

  --text-main: #1f2937;
  --text-heading: #111827;
  --text-muted: #4b5563;
  --text-dim: #6b7280;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
  --shadow-hover: 0px 10px 30px rgba(0, 0, 0, 0.1);
}

/* Dark Theme */
body.dark {
  --bg-page: #0a0a0c;
  --bg-surface: #121418;
  --bg-header: #0e1014;
  --bg-card: #15181e;
  --bg-card-hover: #1c2028;
  --bg-quote: rgba(197, 168, 128, 0.08);
  --bg-callout-benefit: rgba(16, 185, 129, 0.08);
  --bg-callout-principle: rgba(197, 168, 128, 0.08);
  --bg-callout-note: rgba(59, 130, 246, 0.08);
  --border-color: #242933;
  --border-subtle: #1a1e26;
  --border-hover: #384152;

  --text-main: #f1f5f9;
  --text-heading: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-hover: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 1px rgba(255, 255, 255, 0.15);
}

/* ================= RESET & CORE ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ================= SITE HEADER ================= */
.site-header {
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1300px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  gap: 1rem;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.social-btn:hover {
  transform: translateY(-2px);
  color: #ffffff;
}

.social-btn.website:hover { background-color: #111827; }
.social-btn.youtube:hover { background-color: #ff0000; border-color: #ff0000; }
.social-btn.tiktok:hover { background-color: #fe2c55; border-color: #fe2c55; }
.social-btn.telegram:hover { background-color: #229ed9; border-color: #229ed9; }
.social-btn.gofundme:hover { background-color: #02a95c; border-color: #02a95c; }

.header-branding {
  text-align: center;
  flex: 1;
}

.site-title {
  font-family: var(--headFont);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-heading);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.site-title a {
  color: inherit;
}

.site-title a:hover {
  color: var(--gold-primary);
}

.site-tagline {
  font-family: var(--font-body);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-style: italic;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--gold-bg);
  border: 1px solid var(--gold-border);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-primary);
  white-space: nowrap;
}

/* View Nav Bar */
.view-nav-bar {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mode-toggle-group {
  display: flex;
  gap: 0.5rem;
}

.mode-btn {
  background-color: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--headFont);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.mode-btn:hover {
  color: var(--text-heading);
  background-color: var(--border-subtle);
}

.mode-btn.active {
  background-color: var(--gold-bg);
  border-color: var(--gold-border);
  color: var(--gold-primary);
}

.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 380px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.search-input {
  width: 100%;
  background-color: var(--bg-page);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 1rem 0.5rem 2.4rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-input:focus {
  border-color: var(--gold-primary);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--gold-bg);
}

/* ================= MAIN CONTAINER ================= */
.main-container {
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  flex: 1;
}

.view-container {
  width: 100%;
}

/* ================= HERO & PROGRESS ================= */
.journey-hero {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.hero-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.hero-titles h2 {
  font-family: var(--headFont);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.4rem;
}

.hero-titles p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 760px;
}

.progress-stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-box {
  text-align: center;
}

.stat-number {
  font-family: var(--headFont);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.progress-bar-container {
  height: 8px;
  background-color: var(--border-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-primary));
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

/* ================= FILTER BARS ================= */
.stages-nav-wrapper {
  margin-bottom: 1.75rem;
}

.stage-pills-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  scrollbar-width: thin;
}

.stage-pill {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  font-family: var(--headFont);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.stage-pill:hover {
  color: var(--text-heading);
  border-color: var(--border-hover);
}

.stage-pill.active {
  background-color: var(--text-heading);
  color: var(--bg-surface);
  border-color: var(--text-heading);
}

body.dark .stage-pill.active {
  background-color: var(--gold-primary);
  color: #000000;
  border-color: var(--gold-primary);
}

.type-filters-bar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.type-btn {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.type-btn:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
}

.type-btn.active {
  background-color: var(--gold-bg);
  border-color: var(--gold-border);
  color: var(--gold-primary);
}

/* ================= STAGE SECTIONS & CARDS GRID ================= */
.stage-section {
  margin-bottom: 3rem;
}

.stage-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.stage-badge-tag {
  display: inline-block;
  font-family: var(--headFont);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-primary);
  margin-bottom: 0.25rem;
}

.stage-section-title {
  font-family: var(--headFont);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-heading);
}

.stage-count-badge {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

/* ================= NODE CARD (ON THE PATH) ================= */
.study-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.study-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--gold-border);
}

.study-card.completed {
  border-color: rgba(16, 185, 129, 0.4);
}

.study-card.completed::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: var(--green-success);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.node-number {
  background-color: var(--text-heading);
  color: var(--bg-surface);
}

body.dark .badge.node-number {
  background-color: var(--gold-primary);
  color: #000000;
}

.badge.level {
  background-color: var(--border-subtle);
  color: var(--text-muted);
}

.badge.type {
  background-color: var(--gold-bg);
  color: var(--gold-primary);
  border: 1px solid var(--gold-border);
}

.badge.highlight {
  background-color: rgba(16, 185, 129, 0.12);
  color: var(--green-success);
}

.card-check-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.card-check-btn:hover {
  border-color: var(--green-success);
  color: var(--green-success);
}

.study-card.completed .card-check-btn {
  background-color: var(--green-success);
  border-color: var(--green-success);
  color: #ffffff;
}

.card-arabic-title {
  font-family: var(--font-arabic);
  font-size: 1.25rem;
  color: var(--gold-primary);
  direction: rtl;
  margin-bottom: 0.35rem;
  font-weight: 700;
  line-height: 1.4;
}

.card-title {
  font-family: var(--headFont);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.card-scholars {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.scholar-author {
  font-weight: 600;
  color: var(--text-main);
}

.scholar-commentator {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.card-media-preview {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.85rem;
  background-color: var(--border-subtle);
  border: 1px solid var(--border-color);
  max-height: 180px;
}

.card-media-preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform var(--transition-base), filter var(--transition-base);
}

.card-media-preview.video-preview {
  position: relative;
  background-color: #000000;
}

.card-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  background: rgba(0, 0, 0, 0.78);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff0000;
  font-size: 1.7rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
  pointer-events: none;
}

.study-card:hover .card-media-preview.video-preview img {
  transform: scale(1.04);
  filter: brightness(0.9);
}

.study-card:hover .card-play-overlay {
  transform: translate(-50%, -50%) scale(1.15);
  background: rgba(0, 0, 0, 0.92);
}

.card-description {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  font-family: var(--headFont);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--text-heading);
  color: var(--bg-surface);
}

.btn-primary:hover {
  background-color: var(--gold-primary);
  color: #000000;
}

body.dark .btn-primary {
  background-color: var(--gold-primary);
  color: #000000;
}

body.dark .btn-primary:hover {
  background-color: var(--gold-hover);
}

.btn-secondary {
  background-color: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background-color: var(--border-subtle);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.btn-gold {
  background-color: var(--gold-bg);
  border-color: var(--gold-border);
  color: var(--gold-primary);
}

.btn-gold:hover {
  background-color: var(--gold-primary);
  color: #000000;
}

/* ==========================================================================
   ARTICLE SINGLE PAGE VIEW — SETUP & STYLED LIKE ATHARI-ARCHIVE.COM
   ========================================================================== */
.article-single-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

/* Breadcrumb Navigation */
.bs-breadcrumb-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.breadcrumb-trail a {
  color: var(--text-muted);
}

.breadcrumb-trail a:hover {
  color: var(--gold-primary);
}

.breadcrumb-trail .sep {
  color: var(--border-hover);
}

.breadcrumb-trail .current {
  color: var(--gold-primary);
  font-weight: 600;
}

.btn-back-to-path {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-back-to-path:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

/* Article Header */
.bs-header {
  margin-bottom: 2rem;
}

.bs-blog-category {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.blogus-categories {
  font-family: var(--headFont);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 14px;
  border-radius: 14px;
}

.category-color-1 {
  background-color: var(--text-heading);
  color: var(--bg-surface);
}

body.dark .category-color-1 {
  background-color: #ffffff;
  color: #000000;
}

.category-color-2 {
  background-color: var(--gold-bg);
  color: var(--gold-primary);
  border: 1px solid var(--gold-border);
}

.category-color-3 {
  background-color: var(--border-subtle);
  color: var(--text-dim);
}

.article-title {
  font-family: var(--headFont);
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-heading);
  margin-bottom: 0.6rem;
}

.article-arabic-title {
  font-family: var(--font-arabic);
  font-size: 1.75rem;
  color: var(--gold-primary);
  font-weight: 700;
  direction: rtl;
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

/* Info Author Block */
.bs-info-author-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.bs-blog-meta {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.bs-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.author-name-text {
  font-weight: 700;
  color: var(--text-heading);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.node-path-badge {
  background-color: var(--gold-bg);
  border: 1px solid var(--gold-border);
  color: var(--gold-primary);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}

.article-actions-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-mark-studied {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.btn-mark-studied:hover {
  border-color: var(--green-success);
  color: var(--green-success);
}

.btn-mark-studied.completed {
  background-color: var(--green-bg);
  border-color: var(--green-success);
  color: var(--green-success);
}

/* Hero Media Box */
.article-hero-media {
  margin-bottom: 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.article-hero-media img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}

.hero-media-caption {
  padding: 0.65rem 1.25rem;
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
  background-color: var(--border-subtle);
  border-top: 1px solid var(--border-color);
}

.article-hero-media.youtube-hero-media {
  background-color: #000000;
  border-color: var(--border-color);
}

.video-responsive-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  background-color: #000000;
}

.video-responsive-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-modal-container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

/* ================= ARTICLE BODY (ENTRY CONTENT) ================= */
.entry-content {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text-main);
  margin-bottom: 3rem;
}

.article-lead {
  font-size: 1.22rem;
  line-height: 1.8;
  color: var(--text-heading);
  margin-bottom: 1.75rem;
}

.entry-content h2 {
  font-family: var(--headFont);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-heading);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

.entry-content h3 {
  font-family: var(--headFont);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 2rem 0 0.75rem;
}

.entry-content p {
  margin-bottom: 1.5rem;
}

.entry-content ul, .entry-content ol {
  margin-bottom: 1.75rem;
  padding-left: 1.75rem;
}

.entry-content li {
  margin-bottom: 0.65rem;
}

.entry-content blockquote {
  border-left: 4px solid var(--gold-primary);
  background-color: var(--bg-quote);
  padding: 1.25rem 1.75rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
}

.arabic-text {
  font-family: var(--font-arabic);
  font-size: 1.5rem;
  direction: rtl;
  font-style: normal;
  line-height: 2.1;
  color: var(--gold-primary);
  margin-bottom: 0.5rem;
}

/* Athari Callout Boxes */
.athari-callout {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.35rem 1.6rem;
  border-radius: var(--radius-md);
  margin: 2rem 0;
}

.athari-callout .callout-icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-top: 0.2rem;
}

.athari-callout .callout-content h4 {
  font-family: var(--headFont);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.athari-callout .callout-content p {
  margin-bottom: 0;
  font-size: 0.98rem;
  line-height: 1.7;
}

.callout-principle {
  background-color: var(--bg-callout-principle);
  border-left: 4px solid var(--gold-primary);
}

.callout-principle .callout-icon {
  color: var(--gold-primary);
}

.callout-benefit {
  background-color: var(--bg-callout-benefit);
  border-left: 4px solid var(--green-success);
}

.callout-benefit .callout-icon {
  color: var(--green-success);
}

.callout-benefit h4 {
  color: var(--green-success);
}

.callout-note {
  background-color: var(--bg-callout-note);
  border-left: 4px solid var(--blue-info);
}

.callout-note .callout-icon {
  color: var(--blue-info);
}

.callout-note h4 {
  color: var(--blue-info);
}

.curriculum-stage-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.curriculum-stage-box h3 {
  margin-top: 0;
  font-size: 1.15rem;
  color: var(--gold-primary);
}

/* Action Resource Banner (Download PDF / Watch / Listen) */
.resource-action-banner {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.resource-banner-info h3 {
  font-family: var(--headFont);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.35rem;
}

.resource-banner-info p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0;
}

.resource-banner-buttons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ================= AUTHOR BOX (PP-MULTIPLE-AUTHORS-BOXES) ================= */
.pp-multiple-authors-boxes-wrapper {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 3rem 0;
  box-shadow: var(--shadow-sm);
}

.pp-author-inner {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.pp-author-avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  flex-shrink: 0;
}

.pp-author-details h4 {
  font-family: var(--headFont);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.4rem;
}

.pp-author-tagline {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-primary);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.pp-author-bio {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 0;
}

/* ================= SOCIAL SHARE BAR ================= */
.post-share-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.share-label {
  font-family: var(--headFont);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.share-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.share-btn:hover {
  transform: translateY(-2px);
  color: #ffffff;
}

.share-btn.x:hover { background-color: #000000; border-color: #000000; }
.share-btn.facebook:hover { background-color: #1877f2; border-color: #1877f2; }
.share-btn.telegram:hover { background-color: #229ed9; border-color: #229ed9; }
.share-btn.whatsapp:hover { background-color: #25d366; border-color: #25d366; }
.share-btn.copy:hover { background-color: var(--gold-primary); border-color: var(--gold-primary); color: #000000; }

/* ================= POST NAVIGATION ================= */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.nav-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.nav-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.nav-card.nav-next {
  text-align: right;
  align-items: flex-end;
}

.nav-direction {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-primary);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-title {
  font-family: var(--headFont);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.4;
}

/* ================= RELATED POSTS ================= */
.related-posts-section {
  margin-bottom: 2rem;
}

.related-posts-title {
  font-family: var(--headFont);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.related-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.related-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-2px);
}

.related-tag {
  font-size: 0.72rem;
  color: var(--gold-primary);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.related-title {
  font-family: var(--headFont);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.4;
}

/* ================= MODAL & LIGHTBOX ================= */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-family: var(--headFont);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-heading);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

/* Gallery Viewer Inside Modal */
.gallery-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-main-img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.gallery-caption {
  font-family: var(--headFont);
  font-weight: 700;
  color: var(--gold-primary);
  margin-bottom: 1rem;
  text-align: center;
}

.gallery-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  max-width: 100%;
  padding: 0.5rem 0;
}

.gallery-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: all var(--transition-fast);
}

.gallery-thumb:hover {
  opacity: 1;
}

.gallery-thumb.active {
  border-color: var(--gold-primary);
  opacity: 1;
}

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--text-heading);
  color: var(--bg-surface);
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-pill);
  font-family: var(--headFont);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 2000;
}

.toast-notification.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ================= SITE FOOTER ================= */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.5rem 2rem;
  margin-top: auto;
  text-align: center;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
}

.footer-logo-title {
  font-family: var(--headFont);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.footer-quote {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--gold-primary);
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .header-top {
    flex-direction: column;
    text-align: center;
  }
  .view-nav-bar {
    flex-direction: column;
  }
  .search-wrapper {
    max-width: 100%;
  }
  .hero-header {
    flex-direction: column;
  }
  .progress-stats {
    width: 100%;
    justify-content: space-between;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .article-title {
    font-size: 1.8rem;
  }
  .post-navigation {
    grid-template-columns: 1fr;
  }
}
