/* ============================================================
   article.css  –  Individual article page styles
   (Blog text + TOC sidebar + Card section highlights combined)
   ============================================================ */

/* ================= ARTICLE LAYOUT WRAPPER ================= */

.article-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 32px;
  align-items: start;
  margin-top: 12px;
}

/* ================= ARTICLE MAIN CONTENT ================= */

.article-main {
  min-width: 0;
}

/* ─── Breadcrumb ─── */
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.article-breadcrumb a {
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.article-breadcrumb a:hover {
  color: #16a34a;
}

.article-breadcrumb__sep {
  color: #d1d5db;
}

.article-breadcrumb__current {
  color: #374151;
  font-weight: 600;
}

/* ─── Article Header ─── */
.article-header {
  margin-bottom: 28px;
}

.article-header__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #16a34a;
  background: rgba(34, 197, 94, 0.1);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.article-header__title {
  font-size: 28px;
  font-weight: 800;
  color: #111827;
  line-height: 1.3;
  letter-spacing: -0.4px;
  margin-bottom: 14px;
}

.article-header__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #9ca3af;
  flex-wrap: wrap;
}

.article-header__meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-header__divider {
  width: 1px;
  height: 14px;
  background: #e5e7eb;
}

/* ─── Hero banner (coloured placeholder) ─── */
.article-hero-banner {
  width: 100%;
  height: 600px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.article-hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.06));
  border-radius: 16px;
}

/* ─── Key Takeaways card ─── */
.article-takeaways {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1.5px solid #bbf7d0;
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 32px;
}

.article-takeaways__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #16a34a;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-takeaways__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-takeaways__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #1f2937;
  line-height: 1.55;
}

.article-takeaways__list li::before {
  content: "✓";
  color: #16a34a;
  font-weight: 700;
  font-size: 13px;
  margin-top: 1px;
  flex-shrink: 0;
}

/* ─── Prose body ─── */
.article-body {
  font-size: 15.5px;
  line-height: 1.78;
  color: #374151;
}

.article-body h2 {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  margin: 36px 0 14px;
  letter-spacing: -0.3px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f3f4f6;
}

.article-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin: 26px 0 10px;
}

.article-body p {
  margin-bottom: 18px;
}

.article-body strong {
  color: #111827;
  font-weight: 700;
}

.article-body a {
  color: #16a34a;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: #15803d;
}

.article-body ul,
.article-body ol {
  padding-left: 22px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.article-body li {
  line-height: 1.65;
}

/* ─── Highlight / Info card ─── */
.article-highlight {
  border-radius: 14px;
  padding: 18px 20px;
  margin: 24px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.article-highlight--info {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
}

.article-highlight--warning {
  background: #fff7ed;
  border-left: 4px solid #f97316;
}

.article-highlight--green {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
}

.article-highlight__icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.article-highlight__content {
  font-size: 14px;
  line-height: 1.65;
  color: #374151;
}

.article-highlight__content strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1f2937;
}

/* ─── Fact / Stat cards ─── */
.article-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0;
}

.article-stat-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.article-stat-card__number {
  font-size: 26px;
  font-weight: 800;
  color: #16a34a;
  line-height: 1;
  margin-bottom: 4px;
}

.article-stat-card__label {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

/* ─── Quote block ─── */
.article-quote {
  border-left: 4px solid #22c55e;
  margin: 28px 0;
  padding: 14px 20px;
  background: rgba(34, 197, 94, 0.04);
  border-radius: 0 10px 10px 0;
}

.article-quote__text {
  font-size: 15px;
  font-style: italic;
  color: #374151;
  line-height: 1.7;
  margin-bottom: 6px;
}

.article-quote__source {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 600;
}

/* ─── Article footer CTA ─── */
.article-cta {
  background: linear-gradient(135deg, #16a34a, #15803d);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  margin-top: 40px;
  color: white;
}

.article-cta h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.article-cta p {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 18px;
  line-height: 1.6;
}

.article-cta__buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.article-cta__btn {
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.article-cta__btn--white {
  background: white;
  color: #16a34a;
}

.article-cta__btn--white:hover {
  background: #f0fdf4;
  transform: translateY(-1px);
}

.article-cta__btn--outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.article-cta__btn--outline:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* ================= TOC SIDEBAR ================= */

.article-toc {
  position: sticky;
  top: 80px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.article-toc__header {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.article-toc__header-icon {
  font-size: 14px;
}

.article-toc__header h3 {
  font-size: 12px;
  font-weight: 700;
  color: white;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.article-toc__list {
  list-style: none;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.article-toc__item a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #4b5563;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
  transition: all 0.2s ease;
}

.article-toc__item a:hover,
.article-toc__item a.active {
  background: rgba(34, 197, 94, 0.08);
  color: #15803d;
}

.article-toc__item a.active {
  font-weight: 700;
}

.article-toc__num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #6b7280;
  flex-shrink: 0;
}

.article-toc__item a:hover .article-toc__num,
.article-toc__item a.active .article-toc__num {
  background: #16a34a;
  color: white;
}

/* Related Articles in TOC sidebar */
.article-toc__related {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 12px 8px 10px;
}

.article-toc__related-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  padding: 0 8px;
  margin-bottom: 6px;
}

.article-toc__related-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.article-toc__related-list li a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #4b5563;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  transition: all 0.2s ease;
}

.article-toc__related-list li a:hover {
  background: rgba(34, 197, 94, 0.08);
  color: #15803d;
}

.article-toc__related-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d1d5db;
  flex-shrink: 0;
  margin-top: 5px;
}

.article-toc__related-list li a:hover .article-toc__related-dot {
  background: #22c55e;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-toc {
    position: static;
    order: -1;
  }

  .article-toc__list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .article-toc__item {
    flex: 0 0 auto;
  }

  .article-toc__related {
    display: none;
  }
}

@media (max-width: 640px) {
  .article-header__title {
    font-size: 22px;
  }

  .article-hero-banner {
    height: 160px;
    font-size: 52px;
  }

  .article-stat-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .article-stat-card__number {
    font-size: 20px;
  }
}

/* ===============================================================
   ARTICLE PAGE – PAGE-WRAPPER OVERRIDES
   Shrinks left sidebar so TOC lives there instead of the ad.
   Only applies when article.css is loaded (article pages only).
   =============================================================== */

/* Narrow the left column to fit the TOC */
body.article-page .page-wrapper {
  grid-template-columns: 200px 1fr 220px;
}

/* TOC sits in the left sidebar, sticky */
body.article-page .sidebar-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 80px;
  width: 100%;
}

/* Small ad slot below the TOC in left sidebar */
body.article-page .ad-slot--skyscraper {
  width: 100%;
  min-height: 200px;
  min-width: unset;
}

/* TOC when placed inside left sidebar */
body.article-page .article-toc {
  position: static; /* parent is already sticky */
  width: 100%;
}

/* Article content takes full center column — no inner 2-col split */
body.article-page .article-layout {
  display: block; /* single column, TOC is gone from here */
}

/* Hide the old in-article TOC sidebar (it now lives on the left) */
body.article-page .article-toc--inline {
  display: none;
}

/* ── Responsive: collapse left TOC on smaller screens ── */
@media (max-width: 1024px) {
  body.article-page .page-wrapper {
    grid-template-columns: 1fr 220px;
  }

  body.article-page .sidebar-left {
    display: none;
  }

  /* Show a compact inline TOC inside the article on tablet */
  body.article-page .article-toc--inline {
    display: block;
    margin-bottom: 28px;
  }

  body.article-page .article-toc--inline .article-toc__list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  body.article-page .article-toc--inline .article-toc__item {
    flex: 0 0 auto;
  }

  body.article-page .article-toc--inline .article-toc__related {
    display: none;
  }
}

@media (max-width: 768px) {
  body.article-page .page-wrapper {
    grid-template-columns: 1fr;
  }

  body.article-page .article-toc--inline {
    display: block;
  }
}

/* ── Remove related articles from TOC (right sidebar handles this) ── */
.article-toc__related {
  display: none;
}

/* ── Bigger ad, capped TOC height so ad is always visible ── */
body.article-page .article-toc {
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

body.article-page .ad-slot--skyscraper {
  min-height: 320px;
}

/* ================= GOLD ZAKAT ARTICLE (index.html) ================= */

.gold-zakat-article {
  margin-top: 48px;
}

.gold-zakat-article .article-quote__text[dir-rtl] {
  font-style: normal;
  direction: rtl;
  text-align: right;
  margin-bottom: 12px;
}

.gold-zakat-article .article-hero-banner {
  background: linear-gradient(135deg, #fef9c3, #fde68a);
}

.gold-zakat-article .article-highlight--formula strong.formula-text {
  display: inline;
  font-size: 15px;
  font-weight: 800;
  color: #15803d;
}

.gold-zakat-article .article-highlight--formula .formula-sub {
  font-size: 13px;
  color: #4b5563;
}

.gold-zakat-article .ad-slot--inline {
  width: 100%;
  min-height: 90px;
  flex-direction: row;
  gap: 16px;
  margin: 32px 0;
  border-radius: 12px;
}

.gold-zakat-article .calc-example {
  font-size: 12px;
  color: #6b7280;
}

.gold-zakat-article .article-references {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
  line-height: 1.8;
}

.gold-zakat-article .article-references strong {
  color: #6b7280;
}
/* ================= ARTICLE – INLINE AD SLOTS ================= */

.ad-slot--inline-article {
  width: 100%;
  min-height: 90px;
  flex-direction: row;
  gap: 16px;
  margin: 36px 0;
  border-radius: 12px;
}

.ad-slot--post-article {
  width: 300px;
  min-height: 250px;
  margin: 32px auto 0;
  border-radius: 14px;
}

@media (max-width: 640px) {
  .ad-slot--inline-article {
    flex-direction: column;
    min-height: 100px;
  }

  .ad-slot--post-article {
    width: 100%;
  }
}
