/* ============================================================
   MISBAH INC. — Main Stylesheet
   ============================================================ */

/* 1. Variables & Reset
   2. Typography
   3. Layout Utilities
   4. Navigation
   5. Hero
   6. Shia Calendar
   7. Featured Article
   8. Morning & Evening Mourning
   9. YouTube Section
  10. Donation Widget
  11. Footer
  12. Mobile Responsive
  13. RTL Support
   ============================================================ */

/* ── 1. Variables & Reset ─────────────────────────────────── */
:root {
  --nav-bg:        #1e3d1f;
  --green-dark:    #132314;
  --hero-bg:       #162516;
  --dark-bg:       #0f1a10;
  --dark-section:  #1a2e1b;
  --gold:          #c9a46b;
  --gold-bright:   #f0c63a;
  --gold-light:    #e8d5a3;
  --cream:         #f5f3dc;
  --cream-dark:    #e8e3c0;
  --sage:          #abb899;
  --white:         #ffffff;
  --text-dark:     #1a1a1a;
  --text-muted:    #666666;
  --nav-h:         64px;
  --max-w:         1200px;
  --radius:        10px;
  --shadow:        0 4px 24px rgba(0,0,0,0.15);
  --shadow-dark:   0 8px 40px rgba(0,0,0,0.4);
  --ease:          0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
ul { list-style: none; }

/* ── 2. Typography ────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Cinzel', 'Georgia', serif;
  font-weight: 600;
  line-height: 1.2;
}

.section-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.section-title.dark { color: var(--text-dark); }

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.25rem auto;
  color: var(--gold);
  max-width: 480px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.divider::after { background: linear-gradient(270deg, transparent, var(--gold)); }
.divider-gem { font-size: 0.85rem; flex-shrink: 0; }

/* ── 3. Layout Utilities ──────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5rem 0; }
.text-center { text-align: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all var(--ease);
  letter-spacing: 0.03em;
}
.btn-gold     { background: var(--gold); color: var(--dark-bg); }
.btn-gold:hover { background: var(--gold-bright); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(201,164,107,0.5); }
.btn-outline  { background: transparent; border: 2px solid var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--dark-bg); }
.btn-dark     { background: var(--nav-bg); color: var(--white); }
.btn-dark:hover { background: var(--gold); color: var(--dark-bg); }

/* ── 4. Navigation ────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 1000;
  background: var(--nav-bg);
  box-shadow: 0 2px 16px rgba(0,0,0,0.35);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  gap: 1rem;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  color: var(--white);
}
.nav-logo img { height: 38px; width: auto; }
.nav-logo-text {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--white);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.42rem 1rem;
  border-radius: 50px;
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}
.nav-link:hover         { background: rgba(255,255,255,0.18); color: var(--gold-light); }
.nav-link.nav-cta       { background: var(--gold); color: var(--dark-bg); font-weight: 700; }
.nav-link.nav-cta:hover { background: var(--gold-bright); }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-arrow { width: 10px; height: 6px; }

.dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--nav-bg);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 160px;
  box-shadow: var(--shadow-dark);
}

.nav-dropdown.open  .dropdown-panel { display: block; }

.dropdown-item {
  display: block;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.85);
  transition: background var(--ease);
}
.dropdown-item:hover { background: rgba(255,255,255,0.1); color: var(--gold-light); }

/* Language switcher */
.lang-sw {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem 0.8rem;
  background: rgba(255,255,255,0.06);
  border-radius: 50px;
  margin-left: 0.25rem;
}
.lang-sw a {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  transition: color var(--ease);
}
.lang-sw a:hover,
.lang-sw a.active { color: var(--gold); }
.lang-sw a + a { border-left: 1px solid rgba(255,255,255,0.2); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 5. Hero ──────────────────────────────────────────────── */
.hero {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--hero-bg);
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Subtle diamond pattern overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 4 L76 40 L40 76 L4 40 Z' fill='none' stroke='%23c9a46b' stroke-width='0.5' stroke-opacity='0.12'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 0.8rem 1.5rem 0.3rem;
  max-width: 760px;
}

.hero-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--gold);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  opacity: 0.92;
}

.hero-title {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.08;
  margin-bottom: 0.5rem;
}
.hero-title .accent { color: var(--gold); }

/* Calligraphy logos */
.hero-logo-top {
  display: block;
  width: clamp(260px, 42%, 420px);
  margin: 0 auto -0.5rem;
  mix-blend-mode: screen;
  opacity: 0.92;
}
.hero-logos-pair {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin: 0.4rem 0 0;
  flex-wrap: wrap;
}
.hero-logo-pair {
  width: clamp(100px, 18%, 180px);
  mix-blend-mode: screen;
  opacity: 0.88;
}
.hero-logo-dark {
  mix-blend-mode: screen;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* Social row */
.social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.12);
  transition: all var(--ease);
}
.social-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(201,164,107,0.4);
}
.social-btn svg { width: 20px; height: 20px; fill: var(--white); flex-shrink: 0; }

/* Social dropdown (WhatsApp / Telegram multi-channel) */
.social-dropdown {
  position: relative;
}
.social-dropdown .social-btn {
  border: none;
  cursor: pointer;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.12);
}
.social-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e3d1f;
  border: 1px solid rgba(201,164,107,0.3);
  border-radius: 10px;
  padding: 0.5rem 0;
  min-width: 140px;
  display: none;
  flex-direction: column;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.social-menu.open { display: flex; }
.social-menu a {
  padding: 0.5rem 1rem;
  color: var(--gold-light);
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--ease);
}
.social-menu a:hover { background: rgba(255,255,255,0.08); }

.hero-scroll {
  position: relative;
  left: auto;
  transform: none;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.35);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}
.hero-scroll svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ── 6. Shia Calendar ─────────────────────────────────────── */
.calendar-section { background: var(--dark-bg); }

.calendar-header { text-align: center; margin-bottom: 2.5rem; }

.calendar-month {
  display: inline-block;
  background: rgba(201,164,107,0.12);
  border: 1px solid rgba(201,164,107,0.3);
  border-radius: 50px;
  padding: 0.4rem 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

/* ── Featured Event Card ─────────────────────────────── */
.feat-event-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 1;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 28px rgba(0,0,0,.25);
}
.feat-event-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.feat-event-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(4,14,4,.97) 0%,
    rgba(4,14,4,.88) 22%,
    rgba(4,14,4,.25) 45%,
    transparent 65%
  );
}
.feat-event-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: .8rem 2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.feat-event-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  color: #fff;
  line-height: 1.08;
  letter-spacing: .03em;
}
.feat-event-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.feat-event-date {
  display: inline-block;
  background: rgba(201,164,107,.13);
  border: 1px solid rgba(201,164,107,.4);
  color: var(--gold);
  font-size: .67rem;
  letter-spacing: .07em;
  padding: .22rem .75rem;
  border-radius: 20px;
}
.feat-event-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--gold);
  color: #1a1a0a;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .55rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--ease);
}
.feat-event-btn:hover { background: #d4b07a; }

@media (max-width: 640px) {
  .feat-event-card { aspect-ratio: 4 / 3; height: auto; }
  .feat-event-content { padding: .5rem 1.1rem .9rem; }
  .feat-event-title { font-size: 1.15rem; }
  .feat-event-date { display: none; }
}

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

.event-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,164,107,0.15);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: border-color var(--ease), background var(--ease);
}
.event-card:hover {
  border-color: rgba(201,164,107,0.5);
  background: rgba(255,255,255,0.07);
}

.event-day {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
  min-width: 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.event-greg {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(201,164,107,0.65);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.event-body {}
.event-type {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--sage);
  margin-bottom: 0.35rem;
}
.event-title {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.45;
}
.event-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: opacity var(--ease);
}
.event-link:hover { opacity: 0.75; }

/* ── 7. Featured Article ──────────────────────────────────── */
.featured-section { background: var(--cream); }

.featured-card {
  display: flex;
  align-items: stretch;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 2.5rem;
  aspect-ratio: 2.4 / 1;
}

.featured-img {
  flex: 0 0 50%;
  background: #ede7d9;
  overflow: hidden;
  min-height: 320px;
  position: relative;
}
.featured-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.featured-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}
.featured-img-placeholder svg { width: 64px; height: 64px; fill: rgba(201,164,107,0.3); }

.featured-body { flex: 1; padding: 2rem 2.5rem; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }

.featured-cat {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.2rem;
  margin-bottom: 1rem;
}

.featured-title {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  color: var(--text-dark);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.featured-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

/* ── 8. Morning & Evening Mourning ────────────────────────── */
.mourning-section {
  background-color: var(--dark-section);
  background-image: url('/images/morning and evening mourning.png');
  background-size: cover;
  background-position: center 30%;
  position: relative;
  text-align: center;
}
.mourning-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,28,12,0.94) 0%,
    rgba(10,28,12,0.50) 25%,
    rgba(10,28,12,0.15) 45%,
    rgba(10,28,12,0.15) 58%,
    rgba(10,28,12,0.65) 78%,
    rgba(10,28,12,0.95) 100%
  );
}
.mourning-section .container { position: relative; z-index: 1; }

.mourning-desc {
  max-width: 600px;
  margin: 0 auto 2.5rem;
  color: rgba(255,255,255,0.9);
  background: rgba(10,28,12,0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(201,164,107,0.12);
  border-radius: 12px;
  padding: 1.1rem 1.75rem;
  font-size: 0.97rem;
  line-height: 1.75;
}

.chapters-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  font-weight: 700;
  margin-top: 6rem;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
  max-width: 720px;
  background: rgba(10,28,12,0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(201,164,107,0.12);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  padding: 0.7rem 1.5rem 0.5rem;
}

.chapters-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  background: rgba(10,28,12,0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(201,164,107,0.12);
  border-top: none;
  border-radius: 0 0 14px 14px;
  padding: 0.75rem 1.5rem 1rem;
}

.ch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(201,164,107,0.45);
  background: transparent;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease);
}
.ch-btn:hover {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--dark-bg);
  transform: scale(1.12);
  box-shadow: 0 4px 16px rgba(201,164,107,0.4);
}

/* ── 9. YouTube Section ───────────────────────────────────── */
.youtube-section { background: var(--dark-bg); text-align: center; }

/* ── Shorts grid ── */
.shorts-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.9rem;
  margin-top: 2rem;
}
.short-card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background: var(--dark-section);
  cursor: pointer;
}
.short-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.short-card:hover img { transform: scale(1.04); }
.short-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  transition: background 0.2s;
}
.short-card:hover .short-play-btn { background: rgba(0,0,0,0.45); }
.short-play-btn svg {
  width: 48px; height: 48px;
  fill: #fff;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}
.short-title {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2.5rem 0.7rem 0.65rem;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, transparent 100%);
  color: #fff;
  font-size: 0.7rem;
  font-family: sans-serif;
  font-weight: 500;
  line-height: 1.35;
  pointer-events: none;
}
.short-card.playing .short-title,
.short-card.playing .short-play-btn { display: none; }
.short-card.playing iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.shorts-footer {
  margin-top: 1.75rem;
  text-align: center;
}
@media (max-width: 768px) {
  .shorts-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .shorts-grid { grid-template-columns: 1fr; max-width: 280px; margin-left: auto; margin-right: auto; }
  .short-card:not(:first-child) { display: none; }
}
@media (max-width: 640px) {
  .mourning-section {
    background-image: url('/images/mourning-section-mobile.png');
    background-position: center center;
  }
  /* On a phone the picture sits behind every line of text, so darken it evenly and make the panels
     near-opaque; the desktop gradient leaves the middle of the image bright. */
  .mourning-section::before { background: rgba(10,28,12,0.78); }
  .mourning-section .section-label,
  .mourning-section .section-title { text-shadow: 0 2px 10px rgba(0,0,0,0.85); }
  .mourning-section .section-label { color: var(--gold-light); }
  .mourning-desc, .chapters-label, .chapters-row { background: rgba(10,28,12,0.9); }
  .chapters-label { margin-top: 2.5rem; }
  .ch-btn { border-color: var(--gold); }
  [data-theme="light"] .mourning-section .mourning-desc { color: rgba(255,255,255,0.92); }
  [data-theme="light"] .mourning-section .ch-btn { color: var(--gold); border-color: var(--gold); }
  [data-theme="light"] .mourning-section .section-title { color: var(--white); }
}

/* ── 10. Donation Widget ──────────────────────────────────── */
.donation-section { background: var(--cream); text-align: center; }

.donation-intro {
  max-width: 560px;
  margin: 0 auto 2.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.donation-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.freq-tabs {
  display: flex;
  background: var(--cream-dark);
  border-radius: 50px;
  padding: 4px;
  margin-bottom: 2rem;
  gap: 4px;
}
.freq-tab {
  flex: 1;
  padding: 0.6rem 0.5rem;
  border-radius: 50px;
  border: none;
  background: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--ease);
}
.freq-tab.active {
  background: var(--nav-bg);
  color: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.amt-btn {
  padding: 0.7rem 0.4rem;
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius);
  background: none;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--ease);
}
.amt-btn:hover,
.amt-btn.active {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--dark-bg);
}

.custom-amount {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius);
  font-size: 1rem;
  text-align: center;
  outline: none;
  margin-bottom: 1.25rem;
  font-family: inherit;
  transition: border-color var(--ease);
}
.custom-amount:focus { border-color: var(--gold); }

.donate-btn {
  width: 100%;
  padding: 1rem;
  background: var(--nav-bg);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--ease);
}
.donate-btn:hover {
  background: var(--gold);
  color: var(--dark-bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30,61,31,0.3);
}

.donation-note {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.donation-note a { color: var(--gold); font-weight: 600; }
.donation-note a:hover { text-decoration: underline; }

.tax-badge {
  display: inline-block;
  background: rgba(30,61,31,0.08);
  color: var(--nav-bg);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-top: 0.75rem;
}

/* ── 11. Prayer Times ─────────────────────────────────────── */
.prayer-section {
  background: var(--dark-bg);
  color: var(--white);
  padding: 1.25rem 0;
}

.calendar-section { padding-top: 2rem; }

.prayer-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.prayer-bar-label {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.prayer-locate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid rgba(201,164,107,0.4);
  color: var(--gold);
  padding: 0.3rem 0.85rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--ease);
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}
.prayer-locate-btn:hover { background: rgba(201,164,107,0.1); }
.prayer-locate-btn svg   { width: 13px; height: 13px; fill: currentColor; flex-shrink: 0; }

.prayer-method-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,164,107,0.35);
  color: var(--gold-light);
  padding: 0.28rem 1.6rem 0.28rem 0.6rem;
  border-radius: 2rem;
  font-size: 0.72rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23c9a46b' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 10px 6px;
  transition: border-color var(--ease), background-color var(--ease);
  flex-shrink: 0;
}
.prayer-method-select:hover { border-color: rgba(201,164,107,0.7); background-color: rgba(255,255,255,0.08); }
.prayer-method-select option { background: #1e3d1f; color: #e8d5a3; }

.prayer-city {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
}

.prayer-placeholder {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.28);
  padding: 0;
}

.prayer-grid-times {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  flex-wrap: wrap;
}

.prayer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,164,107,0.1);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  min-width: 72px;
  flex: 1;
  transition: border-color var(--ease), background var(--ease);
}

.prayer-card.next-prayer {
  border-color: rgba(201,164,107,0.5);
  background: rgba(201,164,107,0.07);
}

.prayer-name {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  text-transform: uppercase;
}

.prayer-time {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white);
}

.prayer-card.next-prayer .prayer-time { color: var(--gold); }

.prayer-next-tag {
  font-size: 0.55rem;
  color: var(--gold-light);
  opacity: 0.7;
}

@media (max-width: 768px) {
  .prayer-bar { gap: 0.6rem; }
  .prayer-card { min-width: 58px; padding: 0.3rem 0.4rem; }
  .prayer-time { font-size: 0.8rem; }
}
@media (max-width: 520px) {
  .prayer-grid-times { gap: 0.35rem; }
  .prayer-card { min-width: 50px; }
}

/* ── 12. Footer ───────────────────────────────────────────── */
.site-footer {
  background: var(--dark-bg);
  color: rgba(255,255,255,0.75);
  padding: 4.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand .nav-logo-text {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  max-width: 280px;
}

.footer-social { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.footer-social .social-btn {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
}
.footer-social .social-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201,164,107,0.4);
}
.footer-social .social-btn svg { width: 18px; height: 18px; }

.footer-col h4 {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.65rem;
  transition: color var(--ease);
}
.footer-col a:hover { color: var(--gold); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}
.footer-contact-item svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; fill: var(--gold); }

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 1.5rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}
.footer-bottom a { color: rgba(255,255,255,0.45); transition: color var(--ease); }
.footer-bottom a:hover { color: var(--gold); }

/* ── 12. Mobile Responsive ────────────────────────────────── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; }

  /* Hamburger shows */
  .hamburger { display: flex; }

  /* Nav links collapse */
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    inset-inline: 0;
    background: var(--nav-bg);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    gap: 0.4rem;
    /* Hidden by default */
    max-height: 0;
    padding: 0 1.25rem;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
  }
  .nav-links.open {
    max-height: 600px;
    padding: 1rem 1.25rem 1.5rem;
  }

  .nav-link   { justify-content: space-between; width: 100%; }
  .nav-link.nav-cta { justify-content: center; }

  /* Dropdown becomes inline */
  .dropdown-panel {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius);
    display: none;
    margin-top: 0.3rem;
  }
  .nav-dropdown.open .dropdown-panel { display: block; }
  .dropdown-arrow.up { transform: rotate(180deg); }

  .lang-sw { justify-content: center; }

  /* Featured card stacks */
  .featured-card { flex-direction: column; aspect-ratio: unset; }
  .featured-img  { flex: none; aspect-ratio: 1200 / 760; width: 100%; min-height: unset; }
  .featured-body { padding: 2rem 1.5rem; overflow: visible; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-tagline { max-width: 100%; }
}

@media (max-width: 520px) {
  .hero .social-btn { width: 38px; height: 38px; }
  .hero .social-btn svg { width: 17px; height: 17px; }
  .hero .social-row { gap: 0.5rem; }
  .amount-grid { grid-template-columns: repeat(3, 1fr); }
  .donation-card { padding: 1.75rem 1.25rem; }
  .section { padding: 3.5rem 0; }
}

@media (max-width: 380px) {
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
  .chapters-row .ch-btn { width: 46px; height: 46px; font-size: 0.9rem; }
}

/* ── 13. RTL Support ──────────────────────────────────────── */
[dir="rtl"] .nav-inner   { flex-direction: row-reverse; }
[dir="rtl"] .nav-links   { margin-left: 0; margin-right: auto; }
[dir="rtl"] .divider::before { background: linear-gradient(270deg, transparent, var(--gold)); }
[dir="rtl"] .divider::after  { background: linear-gradient(90deg,  transparent, var(--gold)); }
[dir="rtl"] .featured-card   { flex-direction: row-reverse; }
[dir="rtl"] .footer-grid     { direction: rtl; }
[dir="rtl"] .footer-tagline  { text-align: right; }
[dir="rtl"] .event-card           { flex-direction: row-reverse; }
[dir="rtl"] .feat-event-title     { font-family: 'Amiri', serif; text-align: right; font-size: clamp(1.2rem, 2.8vw, 2rem); line-height: 1.4; letter-spacing: 0; }
[dir="rtl"] .feat-event-bottom    { flex-direction: row-reverse; }
[dir="rtl"] .feat-event-date      { font-family: 'Amiri', serif; font-size: .85rem; letter-spacing: 0; }
[dir="rtl"] .feat-event-btn       { font-family: 'Amiri', serif; font-size: .9rem; text-transform: none; letter-spacing: 0; }
[dir="rtl"] .footer-contact-item { flex-direction: row-reverse; }

/* ── 14. Crescent Moonsighting Widget ────────────────────────── */
.nm-month-picker{display:flex;flex-wrap:wrap;gap:.45rem;margin-bottom:1.75rem;justify-content:center}
.nm-mpick{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.09);color:rgba(255,255,255,.5);font-family:'Cinzel',serif;font-size:.65rem;letter-spacing:.07em;text-transform:uppercase;padding:.45rem 1rem;border-radius:6px;cursor:pointer;transition:all .15s;line-height:1.4}
[dir="rtl"] .nm-mpick{font-family:'Amiri',Georgia,serif;font-size:.9rem;letter-spacing:0;text-transform:none}
.nm-mpick:hover:not(.nm-mpick--active){background:rgba(255,255,255,.08);color:rgba(255,255,255,.8)}
.nm-mpick.nm-mpick--active{background:var(--gold);color:#0e1f0e;border-color:var(--gold);font-weight:700}
.nm-pred-bar{display:flex;flex-wrap:wrap;gap:1.25rem;align-items:center;justify-content:space-between;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07);border-radius:14px;padding:1.1rem 1.5rem;margin-bottom:1.5rem}
.nm-pred-label{font-family:'Cinzel',serif;font-size:.58rem;letter-spacing:.12em;text-transform:uppercase;color:var(--gold);margin-bottom:.2rem}
[dir="rtl"] .nm-pred-label{font-family:'Amiri',Georgia,serif;font-size:.78rem;letter-spacing:0;text-transform:none}
.nm-pred-value{font-family:'Cinzel',serif;font-size:1.2rem;font-weight:700;color:var(--white)}
[dir="rtl"] .nm-pred-value{font-family:'Amiri',Georgia,serif}
.nm-pred-sub{font-size:.66rem;color:rgba(255,255,255,.32);margin-top:.2rem}
.nm-map-wrap{position:relative;border-radius:14px;overflow:hidden;background:#071220;box-shadow:0 4px 28px rgba(0,0,0,.55);margin-bottom:1.25rem}
.nm-world{width:100%;display:block;height:auto}
.nm-map-legend{display:flex;gap:1.4rem;flex-wrap:wrap;padding:.8rem 1.25rem;background:rgba(0,0,0,.38);border-top:1px solid rgba(255,255,255,.05)}
.nm-legend-item{display:flex;align-items:center;gap:.45rem;font-size:.68rem;color:rgba(255,255,255,.55);letter-spacing:.03em}
.nm-legend-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0}
.nm-region-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:.5rem;margin-bottom:2rem}
.nm-rc{display:flex;align-items:center;gap:.75rem;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.06);border-radius:10px;padding:.65rem 1rem;transition:background .2s}
.nm-rc:hover{background:rgba(255,255,255,.055)}
.nm-rc-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}
.nm-rc-name{font-size:.8rem;font-weight:500;color:var(--white)}
.nm-rc-meta{font-size:.63rem;color:rgba(255,255,255,.3);margin-top:.1rem}
.nm-rc-date{margin-left:auto;font-family:'Cinzel',serif;font-size:.65rem;color:rgba(255,255,255,.35);white-space:nowrap;padding-left:.5rem}
[dir="rtl"] .nm-rc-date{margin-left:0;margin-right:auto;font-family:'Amiri',Georgia,serif;padding-left:0;padding-right:.5rem}
.nm-formula{border-top:1px solid rgba(255,255,255,.07);padding-top:2.5rem;margin-top:.5rem}
.nm-formula-heading{font-family:'Cinzel',serif;font-size:.95rem;font-weight:700;color:var(--gold);text-transform:uppercase;letter-spacing:.07em;margin-bottom:1.5rem}
[dir="rtl"] .nm-formula-heading{font-family:'Amiri',Georgia,serif;font-size:1.1rem;letter-spacing:0;text-transform:none}
.nm-formula-body{color:rgba(255,255,255,.68);font-size:.875rem;line-height:1.9;max-width:740px}
[dir="rtl"] .nm-formula-body{font-family:'Amiri',Georgia,serif;font-size:1rem;max-width:none}
.nm-formula-body h4{font-family:'Cinzel',serif;font-size:.72rem;font-weight:700;color:var(--gold-light);letter-spacing:.09em;text-transform:uppercase;margin:1.75rem 0 .6rem;border-bottom:1px solid rgba(255,255,255,.06);padding-bottom:.35rem}
[dir="rtl"] .nm-formula-body h4{font-family:'Amiri',Georgia,serif;font-size:.95rem;letter-spacing:0;text-transform:none}
.nm-formula-body p{margin-bottom:.9rem}
.nm-formula-body em{color:var(--gold-light)}
.nm-formula-body strong{color:rgba(255,255,255,.85)}
.nm-eq{display:block;font-family:'Cinzel',serif;font-size:.78rem;color:var(--gold-light);background:rgba(255,255,255,.03);border-left:3px solid var(--gold);padding:.6rem 1rem;margin:.75rem 0;border-radius:0 7px 7px 0;letter-spacing:.03em}
[dir="rtl"] .nm-eq{font-family:'Amiri',Georgia,serif;font-size:.95rem;border-left:none;border-right:3px solid var(--gold);border-radius:7px 0 0 7px;direction:ltr;text-align:left}
.nm-q-row{display:flex;align-items:center;gap:.75rem;padding:.35rem 0;border-bottom:1px solid rgba(255,255,255,.04);font-size:.8rem}
.nm-q-row:last-child{border-bottom:none}
.nm-q-val{font-family:'Cinzel',serif;font-size:.72rem;min-width:120px;color:var(--gold-light)}
.nm-disclaimer{background:rgba(255,255,255,.02);border:1px solid rgba(255,255,255,.06);border-radius:10px;padding:1rem 1.25rem;font-size:.78rem;color:rgba(255,255,255,.42);margin-top:1.75rem;line-height:1.75}
[dir="rtl"] .nm-disclaimer{font-family:'Amiri',Georgia,serif;font-size:.95rem}
.nm-disclaimer strong{color:rgba(255,255,255,.62)}
@media(max-width:640px){
  .nm-pred-value{font-size:1rem}
  .nm-region-grid{grid-template-columns:1fr}
  .nm-formula-body{font-size:.82rem}
  .nm-map-wrap{border-radius:10px}
  .nm-mpick{font-size:.6rem;padding:.4rem .75rem}
  [dir="rtl"] .nm-mpick{font-size:.8rem}
}

/* ── 15. Theme Toggle Button ──────────────────────────────── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  cursor: pointer;
  color: var(--gold-light);
  flex-shrink: 0;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.17);
  border-color: rgba(255,255,255,0.28);
}
.theme-toggle svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }

/* ── 16. Light Theme ──────────────────────────────────────── */
[data-theme="light"] {
  --nav-bg:       #ffffff;
  --dark-bg:      #faf9f4;
  --dark-section: #f0ede0;
  --gold:         #1a5c1c;
  --gold-bright:  #226824;
  --gold-light:   #2d6b2e;
  --sage:         #4a7a50;
  --shadow:       0 4px 24px rgba(0,0,0,0.07);
  --shadow-dark:  0 8px 40px rgba(0,0,0,0.14);
}

/* Toggle icon swap in light mode */
[data-theme="light"] .theme-toggle {
  background: rgba(30,61,31,0.07);
  border-color: rgba(30,61,31,0.18);
  color: #1e3d1f;
}
[data-theme="light"] .theme-toggle:hover {
  background: rgba(30,61,31,0.14);
}
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Nav */
[data-theme="light"] .site-header { background: #ffffff; box-shadow: 0 2px 10px rgba(0,0,0,0.07); }
[data-theme="light"] .nav-logo,
[data-theme="light"] .nav-logo-text { color: #1e3d1f; }
[data-theme="light"] .nav-link { background: rgba(30,61,31,0.06); color: #1e3d1f; }
[data-theme="light"] .nav-link:hover { background: rgba(30,61,31,0.13); color: #1a5c1c; }
[data-theme="light"] .nav-link.nav-cta { background: #1e3d1f; color: #ffffff; }
[data-theme="light"] .nav-link.nav-cta:hover { background: #226824; }
[data-theme="light"] .hamburger span { background: #1e3d1f; }
[data-theme="light"] .nav-links { background: #ffffff; border-top-color: rgba(30,61,31,0.1); }
[data-theme="light"] .dropdown-panel { background: #ffffff; border-color: rgba(30,61,31,0.12); }
[data-theme="light"] .dropdown-item { color: #2d4a2e; }
[data-theme="light"] .dropdown-item:hover { background: rgba(30,61,31,0.06); color: #1e3d1f; }
[data-theme="light"] .lang-sw { background: rgba(30,61,31,0.06); }
[data-theme="light"] .lang-sw a { color: rgba(30,61,31,0.5); }
[data-theme="light"] .lang-sw a + a { border-left-color: rgba(30,61,31,0.18); }
[data-theme="light"] .lang-sw a:hover,
[data-theme="light"] .lang-sw a.active { color: #1e3d1f; }

/* Typography */
[data-theme="light"] .section-title { color: #1e3d1f; }
[data-theme="light"] .divider { color: #1e3d1f; }
[data-theme="light"] .divider::before { background: linear-gradient(90deg, transparent, #1e3d1f); }
[data-theme="light"] .divider::after  { background: linear-gradient(270deg, transparent, #1e3d1f); }

/* Buttons */
[data-theme="light"] .btn-gold { background: #1e3d1f; color: #fff; }
[data-theme="light"] .btn-gold:hover { background: #226824; box-shadow: 0 4px 14px rgba(30,61,31,0.35); }
[data-theme="light"] .btn-outline { border-color: #1e3d1f; color: #1e3d1f; }
[data-theme="light"] .btn-outline:hover { background: #1e3d1f; color: #fff; }

/* Calendar section */
[data-theme="light"] .calendar-section { background: var(--dark-bg); }
[data-theme="light"] .calendar-month { background: rgba(30,61,31,0.07); border-color: rgba(30,61,31,0.22); }
[data-theme="light"] .event-card { background: rgba(30,61,31,0.03); border-color: rgba(30,61,31,0.11); }
[data-theme="light"] .event-card:hover { background: rgba(30,61,31,0.07); border-color: rgba(30,61,31,0.28); }
[data-theme="light"] .event-title { color: #1a1a1a; }
[data-theme="light"] .event-greg  { color: rgba(30,61,31,0.5); }

/* Mourning section */
[data-theme="light"] .mourning-section { background-color: var(--dark-section); }
[data-theme="light"] .mourning-desc { color: #444; }
[data-theme="light"] .ch-btn { border-color: rgba(30,61,31,0.38); color: #1e3d1f; }
[data-theme="light"] .ch-btn:hover { background: #1e3d1f; border-color: #1e3d1f; color: #fff; box-shadow: 0 4px 16px rgba(30,61,31,0.3); }

/* YouTube section */
[data-theme="light"] .youtube-section { background: var(--dark-bg); }
[data-theme="light"] .video-wrap { background: var(--dark-section); }
[data-theme="light"] .video-placeholder { background: var(--dark-section); color: rgba(30,61,31,0.4); }

/* Prayer section */
[data-theme="light"] .prayer-section { background: var(--dark-section); color: #1a1a1a; }
[data-theme="light"] .prayer-bar-label { color: #1e3d1f; }
[data-theme="light"] .prayer-city,
[data-theme="light"] .prayer-placeholder { color: rgba(30,61,31,0.4); }
[data-theme="light"] .prayer-card { background: rgba(30,61,31,0.04); border-color: rgba(30,61,31,0.1); }
[data-theme="light"] .prayer-card.next-prayer { background: rgba(30,61,31,0.09); border-color: rgba(30,61,31,0.32); }
[data-theme="light"] .prayer-name { color: #1e3d1f; }
[data-theme="light"] .prayer-time { color: #1a1a1a; }
[data-theme="light"] .prayer-card.next-prayer .prayer-time { color: #1e3d1f; }
[data-theme="light"] .prayer-next-tag { color: #1e3d1f; }
[data-theme="light"] .prayer-locate-btn { border-color: rgba(30,61,31,0.3); color: #1e3d1f; }
[data-theme="light"] .prayer-locate-btn:hover { background: rgba(30,61,31,0.06); }
[data-theme="light"] .prayer-method-select { background: rgba(30,61,31,0.04); border-color: rgba(30,61,31,0.28); color: #1e3d1f; }

/* Donation */
[data-theme="light"] .amt-btn:hover,
[data-theme="light"] .amt-btn.active { border-color: #1e3d1f; background: #1e3d1f; color: #fff; }
[data-theme="light"] .freq-tab.active { background: #1e3d1f; }
[data-theme="light"] .donate-btn { background: #1e3d1f; }
[data-theme="light"] .donate-btn:hover { background: #226824; color: #fff; box-shadow: 0 6px 20px rgba(30,61,31,0.3); }
[data-theme="light"] .tax-badge { background: rgba(30,61,31,0.07); color: #1e3d1f; }
[data-theme="light"] .donation-note a { color: #1e3d1f; }
[data-theme="light"] .custom-amount:focus { border-color: #1e3d1f; }

/* Social buttons */
[data-theme="light"] .social-btn { background: rgba(30,61,31,0.07); border-color: rgba(30,61,31,0.13); }
[data-theme="light"] .social-btn svg { fill: #1e3d1f; }
[data-theme="light"] .social-btn:hover { background: #1e3d1f; border-color: #1e3d1f; box-shadow: 0 6px 20px rgba(30,61,31,0.3); }
[data-theme="light"] .social-btn:hover svg { fill: #fff; }
[data-theme="light"] .social-menu { background: #fff; border-color: rgba(30,61,31,0.2); box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
[data-theme="light"] .social-menu a { color: #1e3d1f; }
[data-theme="light"] .social-menu a:hover { background: rgba(30,61,31,0.05); }

/* Footer */
[data-theme="light"] .site-footer { background: var(--dark-section); color: rgba(30,61,31,0.75); }
[data-theme="light"] .footer-tagline { color: rgba(30,61,31,0.55); }
[data-theme="light"] .footer-col h4 { color: #1e3d1f; }
[data-theme="light"] .footer-col a { color: rgba(30,61,31,0.62); }
[data-theme="light"] .footer-col a:hover { color: #1e3d1f; }
[data-theme="light"] .footer-contact-item { color: rgba(30,61,31,0.58); }
[data-theme="light"] .footer-contact-item svg { fill: #1e3d1f; }
[data-theme="light"] .footer-divider { border-top-color: rgba(30,61,31,0.1); }
[data-theme="light"] .footer-bottom { color: rgba(30,61,31,0.38); }
[data-theme="light"] .footer-bottom a { color: rgba(30,61,31,0.48); }
[data-theme="light"] .footer-social .social-btn { background: rgba(30,61,31,0.06); border-color: rgba(30,61,31,0.13); }
[data-theme="light"] .footer-social .social-btn svg { fill: #1e3d1f; }
[data-theme="light"] .footer-social .social-btn:hover { background: #1e3d1f; border-color: #1e3d1f; }
[data-theme="light"] .footer-social .social-btn:hover svg { fill: #fff; }

/* Moonsighting widget */
[data-theme="light"] .nm-pred-bar { background: rgba(30,61,31,0.04); border-color: rgba(30,61,31,0.09); }
[data-theme="light"] .nm-pred-label { color: #1e3d1f; }
[data-theme="light"] .nm-pred-value { color: #1e3d1f; }
[data-theme="light"] .nm-pred-sub { color: rgba(30,61,31,0.4); }
[data-theme="light"] .nm-map-legend { background: rgba(30,61,31,0.05); border-top-color: rgba(30,61,31,0.08); }
[data-theme="light"] .nm-legend-item { color: rgba(30,61,31,0.6); }
[data-theme="light"] .nm-rc { background: rgba(30,61,31,0.03); border-color: rgba(30,61,31,0.08); }
[data-theme="light"] .nm-rc:hover { background: rgba(30,61,31,0.07); }
[data-theme="light"] .nm-rc-name { color: #1a1a1a; }
[data-theme="light"] .nm-rc-meta,
[data-theme="light"] .nm-rc-date { color: rgba(30,61,31,0.38); }
[data-theme="light"] .nm-mpick { background: rgba(30,61,31,0.04); border-color: rgba(30,61,31,0.1); color: rgba(30,61,31,0.55); }
[data-theme="light"] .nm-mpick:hover:not(.nm-mpick--active) { background: rgba(30,61,31,0.09); color: #1e3d1f; }
[data-theme="light"] .nm-mpick.nm-mpick--active { background: #1e3d1f; color: #fff; border-color: #1e3d1f; }
[data-theme="light"] .nm-formula { border-top-color: rgba(30,61,31,0.1); }
[data-theme="light"] .nm-formula-heading { color: #1e3d1f; }
[data-theme="light"] .nm-formula-body { color: rgba(30,61,31,0.78); }
[data-theme="light"] .nm-formula-body h4 { color: #1e3d1f; border-bottom-color: rgba(30,61,31,0.08); }
[data-theme="light"] .nm-formula-body em { color: #1e3d1f; }
[data-theme="light"] .nm-formula-body strong { color: #1a1a1a; }
[data-theme="light"] .nm-eq { color: #1e3d1f; background: rgba(30,61,31,0.04); border-left-color: #1e3d1f; }
[dir="rtl"][data-theme="light"] .nm-eq { border-right-color: #1e3d1f; border-left-color: transparent; }
[data-theme="light"] .nm-q-val { color: #1e3d1f; }
[data-theme="light"] .nm-q-row { border-bottom-color: rgba(30,61,31,0.06); }
[data-theme="light"] .nm-disclaimer { background: rgba(30,61,31,0.02); border-color: rgba(30,61,31,0.08); color: rgba(30,61,31,0.52); }
[data-theme="light"] .nm-disclaimer strong { color: rgba(30,61,31,0.7); }

/* RTL light fixes */
[dir="rtl"][data-theme="light"] .divider::before { background: linear-gradient(270deg, transparent, #1e3d1f); }
[dir="rtl"][data-theme="light"] .divider::after  { background: linear-gradient(90deg,  transparent, #1e3d1f); }

/* ── 17. Through the Year (home: articles by Hijri month) ───── */
.year-section { background: var(--dark-bg); }
.year-section .section-title { color: var(--white); }
.year-lead {
  max-width: 640px; margin: 0 auto 2.75rem;
  color: rgba(255,255,255,0.6); font-size: 1rem;
}
.year-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}
.year-card {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 3 / 4; border-radius: 14px;
  border: 1px solid rgba(201,164,107,0.18);
  background: var(--dark-section);
  text-align: start;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.year-card img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.6s ease, filter var(--ease);
}
.year-card::after {          /* legibility scrim for the caption */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,16,9,0.92) 0%, rgba(8,16,9,0.45) 42%, rgba(8,16,9,0) 70%);
}
.year-num, .year-body, .year-now { position: absolute; z-index: 1; }
.year-num {
  top: 0.8rem; inset-inline-start: 0.9rem;
  font-family: 'Cinzel', serif; font-size: 0.8rem; letter-spacing: 0.1em;
  color: var(--gold-light); opacity: 0.85;
}
.year-now {
  top: 0.7rem; inset-inline-end: 0.7rem;
  background: var(--gold-bright); color: #1a1a1a;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.22rem 0.55rem; border-radius: 999px;
}
.year-body { inset-inline: 0; bottom: 0; padding: 1rem 1.05rem 1.05rem; }
.year-name {
  display: block; font-family: 'Cinzel', serif; font-size: 1.05rem; font-weight: 600;
  color: var(--white); line-height: 1.25;
}
.year-alt {
  display: block; margin-top: 0.15rem;
  font-family: 'Amiri', serif; font-size: 1rem; color: var(--gold-light); opacity: 0.9;
}
.year-status {
  display: inline-block; margin-top: 0.6rem;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
}
.year-card--live { cursor: pointer; border-color: rgba(201,164,107,0.55); }
.year-card--live .year-status { color: var(--gold-bright); }
.year-card--live:hover, .year-card--live:focus-visible {
  transform: translateY(-4px); border-color: var(--gold);
  box-shadow: 0 10px 34px rgba(0,0,0,0.45);
}
.year-card--live:hover img { transform: scale(1.06); }
.year-card--soon img { filter: grayscale(0.85) brightness(0.7); }
.year-card--soon .year-status { color: rgba(255,255,255,0.45); }
.year-more { margin-top: 2.5rem; }

[dir="rtl"] .year-name  { font-family: 'Amiri', serif; font-size: 1.25rem; letter-spacing: 0; }
[dir="rtl"] .year-alt   { font-family: 'Cinzel', serif; font-size: 0.78rem; opacity: 0.75; }
[dir="rtl"] .year-status { letter-spacing: 0; font-size: 0.8rem; text-transform: none; }

@media (max-width: 960px) { .year-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
  .year-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .year-name { font-size: 0.92rem; }
  .year-body { padding: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .year-card, .year-card img { transition: none; }
}
[data-theme="light"] .year-section .section-title { color: #1e3d1f; }
[data-theme="light"] .year-lead { color: #555; }

/* ── 18. Series pages + embedded video (articles/al-kawthar/…) ── */
.kw-banner { width: 100%; max-width: 1100px; margin: 0 auto; display: block; }
.kw-banner img { width: 100%; height: auto; display: block; }
.kw-banner-wrap { background: var(--art-cream, #f9f5ee); padding: 1.25rem 1rem 0; }

.kw-series-chip {
  display: inline-block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--art-gold, #8a6a2f); border: 1px solid currentColor; border-radius: 999px; padding: 0.15rem 0.7rem;
}
[dir="rtl"] .kw-series-chip { letter-spacing: 0; text-transform: none; font-size: 0.82rem; }

.kw-lead-headings { text-align: center; margin: 0 0 1.25rem; }
.kw-lead-headings p { margin: 0.2rem 0; }
.kw-bismillah { font-family: 'Amiri', serif; font-size: 1.6rem; color: var(--art-green, #1a3d1b); }
.kw-subhead   { font-size: 1.05rem; color: #555; }

/* Click-to-load YouTube: nothing is requested from YouTube until the reader presses play. */
.kw-video { margin: 1.5rem 0 2rem; }
.kw-video-label { display: block; margin-bottom: 0.5rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--art-gold, #8a6a2f); }
[dir="rtl"] .kw-video-label { letter-spacing: 0; text-transform: none; font-size: 0.9rem; }
.kw-video-frame {
  position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 14px; overflow: hidden;
  background: #0e1f0e; box-shadow: 0 6px 28px rgba(0,0,0,0.22);
}
.kw-video-frame button, .kw-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kw-video-frame button { padding: 0; cursor: pointer; background: #0e1f0e center / cover no-repeat; display: block; }
.kw-video-frame button::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.45), rgba(0,0,0,0.05) 55%); }
.kw-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 76px; height: 76px; border-radius: 50%; background: rgba(201,164,107,0.95);
  display: flex; align-items: center; justify-content: center; transition: transform 0.2s ease, background 0.2s ease;
}
.kw-play svg { width: 34px; height: 34px; fill: #0e1f0e; margin-inline-start: 4px; }
[dir="rtl"] .kw-play svg { transform: scaleX(-1); }
.kw-video-frame button:hover .kw-play, .kw-video-frame button:focus-visible .kw-play { transform: translate(-50%, -50%) scale(1.08); background: #f0c63a; }
.kw-video-frame button:focus-visible { outline: 3px solid #f0c63a; outline-offset: -3px; }

.kw-sources-list { list-style: none; padding: 0; margin: 0; }
.kw-sources-list li { margin: 0.45rem 0; }
.kw-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.kw-tags li { font-size: 0.8rem; padding: 0.25rem 0.8rem; border-radius: 999px; background: rgba(26,61,27,0.07); color: var(--art-green, #1a3d1b); }

.kw-partnav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 3rem 0 0; }
.kw-partnav a {
  display: block; padding: 1rem 1.2rem; border-radius: 12px; border: 1px solid rgba(26,61,27,0.18);
  background: #fff; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.kw-partnav a:hover { transform: translateY(-2px); border-color: var(--art-gold, #8a6a2f); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.kw-partnav small { display: block; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--art-gold, #8a6a2f); margin-bottom: 0.25rem; }
[dir="rtl"] .kw-partnav small { letter-spacing: 0; text-transform: none; font-size: 0.85rem; }
.kw-partnav strong { font-family: 'Cinzel', serif; font-size: 0.95rem; color: #1a1a1a; line-height: 1.35; }
[dir="rtl"] .kw-partnav strong { font-family: 'Amiri', serif; font-size: 1.1rem; }
.kw-partnav .next { text-align: end; grid-column: 2; }
.kw-partnav .prev { grid-column: 1; }

/* series landing: one card per part */
.kw-parts { display: grid; gap: 1.5rem; margin: 2rem 0; }
.kw-part-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: #fff; border: 1px solid rgba(26,61,27,0.14); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 22px rgba(0,0,0,0.08); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.kw-part-card:hover { transform: translateY(-3px); box-shadow: 0 10px 34px rgba(0,0,0,0.14); }
.kw-part-card img { width: 100%; height: 100%; object-fit: cover; min-height: 170px; }
.kw-part-body { padding: 1.3rem 1.4rem; display: flex; flex-direction: column; justify-content: center; gap: 0.6rem; }
.kw-part-body h2 { font-size: 1.05rem; line-height: 1.4; color: #1a1a1a; }
[dir="rtl"] .kw-part-body h2 { font-family: 'Amiri', serif; font-size: 1.3rem; }
.kw-part-body p { font-size: 0.9rem; color: #555; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.kw-part-body .btn { align-self: flex-start; }

/* homepage series card */
.kw-home { background: var(--dark-section); }
/* Homepage "Latest series" (Sermon of Muttaqin): the scene from the series poster instead of the plain green; the dark layer keeps the text readable */
#muttaqin-series { position: relative; background-color: #14281a; background-image: linear-gradient(rgba(10,24,12,0.74), rgba(10,24,12,0.42) 45%, rgba(10,24,12,0.22)), url('/images/home/muttaqin-section.jpg'); background-size: cover; background-position: center bottom; background-repeat: no-repeat; }
#muttaqin-series .section-label { color: var(--gold-light); }
#muttaqin-series .section-title { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.6); }
[data-theme="light"] #muttaqin-series .section-title { color: #fff; }
#muttaqin-series .kw-home-card { background: rgba(10,24,12,0.62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
[data-theme="light"] #muttaqin-series .kw-home-card { background: rgba(10,24,12,0.62); }
[data-theme="light"] #muttaqin-series .kw-home-body p { color: rgba(255,255,255,0.85); }
@media (max-width: 700px) { #muttaqin-series { background-image: linear-gradient(rgba(10,24,12,0.85), rgba(10,24,12,0.6)), url('/images/home/muttaqin-section-mobile.jpg'); } }
.kw-home-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; margin-top: 2.5rem; border-radius: 18px; overflow: hidden; background: rgba(255,255,255,0.04); border: 1px solid rgba(201,164,107,0.3); text-align: start; }
.kw-home-card img { width: 100%; height: 100%; object-fit: cover; }
.kw-home-body { padding: 2rem; display: flex; flex-direction: column; justify-content: center; gap: 0.9rem; }
.kw-home-body h3 { font-size: 1.4rem; color: var(--white); }
[dir="rtl"] .kw-home-body h3 { font-family: 'Amiri', serif; font-size: 1.7rem; }
.kw-home-body p { color: rgba(255,255,255,0.7); font-size: 0.95rem; }
.kw-home-body .btn { align-self: flex-start; }
[data-theme="light"] .kw-home-card { background: #fff; }
[data-theme="light"] .kw-home-body h3 { color: #1e3d1f; }
[data-theme="light"] .kw-home-body p { color: #555; }

@media (max-width: 720px) {
  .kw-part-card, .kw-home-card { grid-template-columns: 1fr; }
  /* Stacked: the two-column rule's height:100% has no row height to fill here, so the image ran down behind the
     text. Let it keep its own shape (whole banner visible, title not cropped) and sit above the body. */
  .kw-part-card img, .kw-home-card img { height: auto; min-height: 0; aspect-ratio: auto; object-fit: contain; display: block; }
  .kw-partnav { grid-template-columns: 1fr; }
  .kw-partnav .next, .kw-partnav .prev { grid-column: 1; text-align: start; }
  .kw-play { width: 60px; height: 60px; }
}
/* Poster grid (series whose parts each have a portrait poster, e.g. Sermon of Muttaqin): the whole poster is the card's picture */
.kw-poster-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 2rem 0; }
.kw-poster-card { display: flex; flex-direction: column; background: #fff; border: 1px solid rgba(26,61,27,0.14); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 22px rgba(0,0,0,0.08); transition: transform 0.2s ease, box-shadow 0.2s ease; text-decoration: none; color: inherit; }
.kw-poster-card:hover, .kw-poster-card:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 34px rgba(0,0,0,0.14); }
.kw-poster-card img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; background: #14281a; }
.kw-poster-card .kw-poster-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
.kw-poster-card h2 { font-size: 1.05rem; line-height: 1.35; margin: 0; color: #1a3d1b; }
.kw-poster-card p { font-size: .88rem; margin: 0; color: #555; }
@media (max-width: 900px) { .kw-poster-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; } }
@media (max-width: 480px) { .kw-poster-card p { display: none; } .kw-poster-card .kw-poster-body { padding: .8rem; } .kw-poster-card h2 { font-size: .95rem; } }
@media (prefers-reduced-motion: reduce) { .kw-poster-card { transition: none; } }
@media (prefers-reduced-motion: reduce) { .kw-part-card, .kw-partnav a, .kw-play { transition: none; } }
.kw-home-body p a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }
.kw-home-body p a:hover { color: var(--gold-bright); }

/* single imported articles */
.kw-banner--tall img { max-height: 560px; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; border-radius: 12px; }
.art-fig { margin: 1.6rem 0; text-align: center; }
.art-fig img { display: inline-block; max-width: 100%; height: auto; border-radius: 10px; }
.art-body ul { margin: 0.8rem 0 1.2rem; padding-inline-start: 1.4rem; list-style: disc; }
.art-body ul li { margin: 0.35rem 0; }

/* ── 19. Article index cards (all languages) ─────────────────── */
.al-hero { background: var(--dark-bg); text-align: center; padding: 4.5rem 1.5rem 3.2rem; }
.al-eyebrow { display: block; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.al-hero h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); color: var(--white); }
.al-sub { margin-top: 0.7rem; font-family: 'Cinzel', serif; color: var(--gold-light); font-size: 1.15rem; }
[dir="rtl"] .al-eyebrow { letter-spacing: 0; text-transform: none; font-size: 0.95rem; }
[dir="rtl"] .al-hero h1, [dir="rtl"] .al-sub { font-family: 'Amiri', serif; }
.al-section { background: var(--cream); }
.al-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2rem; }
.al-card { display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid rgba(26,61,27,0.12); box-shadow: 0 3px 18px rgba(0,0,0,0.07); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.al-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.14); }
.al-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #ede7d9; }
.al-body { padding: 1rem 1.15rem 1.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.7rem; }
.al-tag { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.al-month { font-size: 0.72rem; color: #777; }
[dir="rtl"] .al-tag { letter-spacing: 0; text-transform: none; font-size: 0.82rem; }
.al-title { flex-basis: 100%; font-size: 1rem; line-height: 1.4; color: #1a1a1a; margin-top: 0.2rem; }
[dir="rtl"] .al-title { font-family: 'Amiri', serif; font-size: 1.2rem; line-height: 1.6; }
[data-theme="light"] .al-tag { color: #1a5c1c; }
@media (max-width: 900px) { .al-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .al-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .al-card { transition: none; } }
.kw-subtitle { font-family: 'Cinzel', serif; font-size: 1.25rem; color: var(--art-green, #1a3d1b); margin: 0.3rem 0 1rem; }
[dir="rtl"] .kw-subtitle { font-family: 'Amiri', serif; font-size: 1.5rem; }
.kw-bq { margin: 1.4rem 0; padding: 0.4rem 1.1rem; border-inline-start: 3px solid var(--art-gold, #c9a46b); color: #444; font-style: italic; }
.kw-tags li a { color: inherit; text-decoration: none; }
.kw-tags li:hover { background: rgba(26,61,27,0.16); }
.kw-tags .kw-tag-month { background: var(--art-green, #1a3d1b); color: #fff; }
.kw-tags .kw-tag-type  { background: rgba(201,164,107,0.28); }

/* ── 20. Articles filters + browse ───────────────────────────── */
.al-eyebrow a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.al-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr) auto; gap: 0.8rem; align-items: end; margin: 0 0 0.8rem; }
.al-filters label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #555; }
[dir="rtl"] .al-filters label { letter-spacing: 0; text-transform: none; font-size: 0.85rem; }
.al-filters select, .al-filters input { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid rgba(26,61,27,0.25); border-radius: 10px; background: #fff; color: #1a1a1a; font: inherit; font-size: 0.92rem; }
.al-filters select:focus-visible, .al-filters input:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 1px; }
.al-filters .btn { padding: 0.62rem 1rem; font-size: 0.8rem; white-space: nowrap; }
.al-count { margin: 0.4rem 0 0; font-size: 0.85rem; color: #666; }
.al-none { margin: 1rem 0; padding: 1rem; border-radius: 10px; background: rgba(26,61,27,0.06); text-align: center; }
.al-card[hidden] { display: none; }
.al-card.al-ann { border-color: rgba(201,164,107,0.55); }
.al-card.al-ann .al-tag { color: #8a6a2f; }
.al-all { text-align: center; margin-top: 2.2rem; }
.al-browse { margin-top: 3.2rem; padding-top: 2rem; border-top: 1px solid rgba(26,61,27,0.15); display: grid; gap: 1.4rem; }
.al-browse h2 { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: #666; margin-bottom: 0.6rem; font-family: 'Inter', sans-serif; font-weight: 600; }
[dir="rtl"] .al-browse h2 { letter-spacing: 0; text-transform: none; font-size: 0.95rem; font-family: 'Amiri', serif; }
.al-browse ul { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.al-browse li a { display: inline-block; padding: 0.25rem 0.8rem; border-radius: 999px; background: rgba(26,61,27,0.07); color: var(--art-green, #1a3d1b); font-size: 0.85rem; }
.al-browse li a:hover { background: rgba(26,61,27,0.16); }
@media (max-width: 900px) { .al-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .al-filters .al-q { grid-column: 1 / -1; } .al-filters .btn { grid-column: 1 / -1; } }

/* ── 18. Topics (home, right after the hero) + Calendar menu ─── */
.topics-section { background: var(--dark-bg); }
.topics-section .section-title { color: var(--white); }
.topics-lead { max-width: 640px; margin: 0 auto 2.5rem; color: rgba(255,255,255,0.6); font-size: 1rem; }
/* Topics slider: all cards in one scroll-snap row, 4 at a time on desktop; arrows + dots appear only when something is off-screen (assets/script.js) */
.topic-carousel { position: relative; padding-inline: 64px; }
.topic-track { display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; text-align: start; padding: 4px 2px 8px; }
.topic-track::-webkit-scrollbar { display: none; }
.topic-track > .topic-card { flex: 0 0 calc((100% - 4.5rem) / 4); scroll-snap-align: start; min-width: 0; }
.topic-track:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 10px; }
.tc-btn { position: absolute; top: 30%; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold); background: rgba(14,31,14,0.92); color: var(--gold-light); display: none; align-items: center; justify-content: center; cursor: pointer; transition: background .25s ease, color .25s ease, opacity .25s ease, transform .25s cubic-bezier(.3,1.4,.5,1), box-shadow .25s ease; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
.tc-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tc-btn:hover:not(:disabled) { background: var(--gold); color: #1a1a1a; transform: scale(1.1); box-shadow: 0 0 0 6px rgba(201,164,107,0.18), 0 6px 20px rgba(0,0,0,0.45); }
.tc-btn:active:not(:disabled) { transform: scale(0.94); }
.tc-btn:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.tc-btn svg { transition: transform .25s ease; }
.tc-prev:hover:not(:disabled) svg { transform: translateX(-3px); } .tc-next:hover:not(:disabled) svg { transform: translateX(3px); }
[dir="rtl"] .tc-prev:hover:not(:disabled) svg { transform: scaleX(-1) translateX(-3px); } [dir="rtl"] .tc-next:hover:not(:disabled) svg { transform: scaleX(-1) translateX(3px); }
/* a quiet ring on the "next" button until the reader first uses the slider, so it is clear there is more */
.tc-btn.pulse:not(:disabled)::after { content: ''; position: absolute; inset: -1px; border-radius: 50%; border: 2px solid var(--gold); animation: tc-pulse 2s ease-out infinite; pointer-events: none; }
@keyframes tc-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }
/* cards that are scrolled out of view dim and shrink a little; they settle as they slide in */
.topic-track > .topic-card { transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1), border-color var(--ease), box-shadow var(--ease); }
.topic-carousel.has-overflow.io-ready .topic-track > .topic-card:not(.in-view) { opacity: .4; transform: scale(.965); }
.tc-btn:disabled { opacity: 0.25; cursor: default; }
.tc-prev { inset-inline-start: 6px; } .tc-next { inset-inline-end: 6px; }
[dir="rtl"] .tc-btn svg { transform: scaleX(-1); }
.topic-carousel.has-overflow .tc-btn { display: flex; }
.tc-dots { display: none; justify-content: center; gap: 8px; margin-top: 1.1rem; }
.topic-carousel.has-overflow .tc-dots { display: flex; }
.tc-dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 1px solid var(--gold); background: transparent; cursor: pointer; transition: width .3s ease, background .3s ease; }
.tc-dots button.on { background: var(--gold); width: 24px; border-radius: 6px; }
@media (max-width: 1100px) { .topic-track > .topic-card { flex-basis: calc((100% - 3rem) / 3); } }
@media (max-width: 1100px) { .topic-carousel { padding-inline: 56px; } }
@media (max-width: 760px) {
  .topic-carousel { padding-inline: 0; padding-bottom: 66px; }
  .topic-track > .topic-card { flex-basis: calc((100% - 1rem) / 2); } .topic-track { gap: 1rem; }
  .tc-btn { top: auto; bottom: 0; width: 42px; height: 42px; }
  .tc-prev { inset-inline-start: 4px; } .tc-next { inset-inline-end: 4px; }
  .tc-dots { position: absolute; bottom: 17px; left: 56px; right: 56px; margin: 0; gap: 6px; flex-wrap: wrap; pointer-events: none; }
  .tc-dots button { pointer-events: auto; }
}
@media (max-width: 520px) { .topic-track > .topic-card { flex-basis: 78%; } }
.topic-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 14px; border: 1px solid rgba(201,164,107,0.28);
  background: var(--dark-section);
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.topic-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.6s ease; }
.topic-card:hover, .topic-card:focus-visible { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--shadow-dark); }
.topic-card:hover img { transform: scale(1.05); }
.topic-card { overflow: hidden; }
.topic-body { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.25rem 1.35rem 1.4rem; flex: 1; }
.topic-chip { align-self: flex-start; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.topic-name { font-family: 'Cinzel', serif; font-size: 1.25rem; color: var(--white); line-height: 1.3; }
.topic-desc { color: rgba(255,255,255,0.65); font-size: 0.92rem; line-height: 1.55; }
.topic-cta { margin-top: auto; padding-top: 0.6rem; color: var(--gold-light); font-size: 0.85rem; }
.topic-cta::after { content: ' →'; }
[dir="rtl"] .topic-cta::after { content: ' ←'; }
[dir="rtl"] .topic-chip, [dir="rtl"] .topic-cta { letter-spacing: 0; text-transform: none; font-size: 0.85rem; }
[dir="rtl"] .topic-name { font-family: 'Amiri', serif; font-size: 1.45rem; }
@media (prefers-reduced-motion: reduce) { .topic-card, .topic-card img, .tc-btn, .tc-btn svg, .tc-dots button { transition: none !important; } .tc-btn.pulse::after { animation: none; } .topic-carousel.has-overflow.io-ready .topic-track > .topic-card:not(.in-view) { opacity: 1; transform: none; } }
[data-theme="light"] .topics-section .section-title { color: #1e3d1f; }
[data-theme="light"] .topics-lead { color: #555; }
[data-theme="light"] .tc-btn { background: #fff; color: #1e3d1f; border-color: #8a6a2f; }
[data-theme="light"] .tc-btn:hover:not(:disabled) { background: #1e3d1f; color: #fff; }
[data-theme="light"] .tc-dots button { border-color: #8a6a2f; } [data-theme="light"] .tc-dots button.on { background: #8a6a2f; }
[data-theme="light"] .topic-card { background: #ffffff; border-color: rgba(30,61,31,0.18); }
[data-theme="light"] .topic-name { color: #1e3d1f; }
[data-theme="light"] .topic-desc { color: #555; }
[data-theme="light"] .topic-chip, [data-theme="light"] .topic-cta { color: #8a6a2f; }

/* Calendar dropdown: twelve months in two columns; months without a page in this language are muted */
.dropdown-panel--months { min-width: 320px; grid-template-columns: 1fr 1fr; }
.dropdown-panel--months .dropdown-item { white-space: nowrap; }
.nav-dropdown.open .dropdown-panel--months { display: grid; }
.dropdown-item.is-soon { color: rgba(255,255,255,0.35); cursor: default; }
.dropdown-item.is-soon small { display: block; font-size: 0.65rem; opacity: 0.8; }
.dropdown-item.is-soon:hover { background: none; color: rgba(255,255,255,0.35); }
@media (max-width: 768px) { .nav-dropdown.open .dropdown-panel--months { display: grid; } }
[data-theme="light"] .dropdown-item.is-soon, [data-theme="light"] .dropdown-item.is-soon:hover { color: rgba(30,61,31,0.4); background: none; }

/* ══ Liquid-glass theme (site-wide). ══
   (Kept at the end of style.css; delete from here down to remove the theme.)
   Layers: translucent tint + backdrop blur/saturate (everywhere), a bright top edge and soft inner glow (inset shadows),
   rounded "droplet" shapes, springy hover. On Chromium-based browsers a faint wavy refraction (SVG displacement) is added via .glass-lens.
   Anything that doesn't understand backdrop-filter just keeps the plain colour behind it. */
:root {
  --glass-tint: rgba(255,255,255,0.10);
  --glass-tint-strong: rgba(255,255,255,0.18);
  --glass-edge: rgba(255,255,255,0.34);
  --glass-edge-soft: rgba(255,255,255,0.14);
  --glass-shadow: 0 10px 34px rgba(0,0,0,0.28);
  --glass-blur: blur(18px) saturate(1.7);
  --glass-spring: cubic-bezier(.3,1.5,.5,1);
}
/* ── the bar: a floating droplet instead of a full-width strip ───────────── */
.site-header {
  inset-block-start: 10px; inset-inline: clamp(8px, 2vw, 28px);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03)), rgba(21,43,21,0.70);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge-soft);
  box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 -1px 0 rgba(255,255,255,0.06), inset 0 0 24px rgba(255,255,255,0.05), var(--glass-shadow);
}
.nav-link {
  background: linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.06));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 2px 8px rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.14);
  transition: background .3s ease, color .3s ease, transform .35s var(--glass-spring), box-shadow .3s ease;
}
.nav-link:hover { background: linear-gradient(180deg, rgba(255,255,255,0.32), rgba(255,255,255,0.12)); transform: translateY(-1px) scale(1.04); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 6px 16px rgba(0,0,0,0.25); }
.nav-link:active { transform: scale(0.97); }
.nav-link.nav-cta { background: linear-gradient(180deg, #f0d79a, var(--gold)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 4px 14px rgba(201,164,107,0.35); }
.dropdown-panel { background: rgba(21,43,21,0.72); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-edge-soft); border-radius: 20px; box-shadow: inset 0 1px 0 var(--glass-edge), var(--glass-shadow); }
[data-theme="light"] .site-header { background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.45)); border-color: rgba(255,255,255,0.8); box-shadow: inset 0 1px 0 #fff, 0 8px 30px rgba(30,61,31,0.16); }
[data-theme="light"] .nav-link { background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,255,255,0.35)); border-color: rgba(30,61,31,0.12); box-shadow: inset 0 1px 0 #fff, 0 2px 8px rgba(30,61,31,0.1); }


.lang-sw a { color: rgba(255,255,255,0.78); }
/* ── slider buttons: little glass lenses ─────────────────────────────────── */
.tc-btn {
  background: radial-gradient(120% 120% at 30% 12%, rgba(255,255,255,0.42), rgba(255,255,255,0.06) 58%), rgba(255,255,255,0.10);
  -webkit-backdrop-filter: blur(14px) saturate(1.8); backdrop-filter: blur(14px) saturate(1.8);
  border: 1px solid var(--glass-edge); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -6px 12px rgba(0,0,0,0.12), 0 8px 22px rgba(0,0,0,0.35);
}
.tc-btn:hover:not(:disabled) { background: radial-gradient(120% 120% at 30% 12%, rgba(255,240,200,0.7), rgba(201,164,107,0.35) 60%), rgba(201,164,107,0.25); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 0 0 6px rgba(201,164,107,0.16), 0 10px 26px rgba(0,0,0,0.4); }
.tc-btn.pulse:not(:disabled)::after { border-color: rgba(255,255,255,0.7); }
[data-theme="light"] .tc-btn { color: #1e3d1f; background: radial-gradient(120% 120% at 30% 12%, rgba(255,255,255,0.95), rgba(255,255,255,0.4) 60%), rgba(255,255,255,0.5); border-color: rgba(30,61,31,0.2); }
.tc-dots button { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.5); }
.tc-dots button.on { background: linear-gradient(180deg, #f6e3b2, var(--gold)); border-color: transparent; }

/* ── Latest series: the card becomes a pane of glass over the scene ───────── */
#muttaqin-series { background-image: linear-gradient(rgba(10,24,12,0.50), rgba(10,24,12,0.16) 50%, rgba(10,24,12,0.05)), url('/images/home/muttaqin-section.jpg'); }
#muttaqin-series .kw-home-card {
  border-radius: 30px; border: 1px solid var(--glass-edge);
  background: linear-gradient(135deg, rgba(255,255,255,0.20), rgba(255,255,255,0.05) 55%, rgba(255,255,255,0.12)), rgba(14,28,14,0.30);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), inset 0 0 40px rgba(255,255,255,0.05), 0 24px 60px rgba(0,0,0,0.35);
}
#muttaqin-series .kw-home-card > a { display: flex; align-items: center; justify-content: center; padding: 14px; }
#muttaqin-series .kw-home-card > a img { height: auto; background: transparent !important; border-radius: 20px; box-shadow: 0 14px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.35); }
#muttaqin-series .kw-home-body p { color: rgba(255,255,255,0.92); text-shadow: 0 1px 8px rgba(0,0,0,0.35); }
#muttaqin-series .chapters-label, #muttaqin-series .chapters-row { background: rgba(255,255,255,0.08); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--glass-edge-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); }
#muttaqin-series .chapters-label { color: #fff; }
#muttaqin-series .ch-btn { background: radial-gradient(120% 120% at 30% 12%, rgba(255,255,255,0.35), rgba(255,255,255,0.04) 60%); border: 1px solid rgba(255,255,255,0.4); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 4px 12px rgba(0,0,0,0.25); transition: transform .35s var(--glass-spring), background .3s ease; }
#muttaqin-series .ch-btn:hover { transform: translateY(-3px) scale(1.1); background: radial-gradient(120% 120% at 30% 12%, rgba(255,240,200,0.8), rgba(201,164,107,0.5) 60%); color: #1a1a1a; }
#muttaqin-series .btn-gold { background: linear-gradient(180deg, #f6e3b2, var(--gold) 70%); color: #20230f; border: 1px solid rgba(255,255,255,0.55); box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 10px 26px rgba(201,164,107,0.35); transition: transform .35s var(--glass-spring), box-shadow .3s ease; }
#muttaqin-series .btn-gold:hover { transform: translateY(-2px) scale(1.04); box-shadow: inset 0 1px 0 #fff, 0 14px 34px rgba(201,164,107,0.5); }
@media (max-width: 700px) { #muttaqin-series { background-image: linear-gradient(rgba(10,24,12,0.55), rgba(10,24,12,0.25)), url('/images/home/muttaqin-section-mobile.jpg'); }  }

/* ── wavy refraction, Chromium-class engines only (class set by the inline script in index.html) ───────── */
.glass-lens .tc-btn, .glass-lens #muttaqin-series .ch-btn { -webkit-backdrop-filter: url(#glass-lens) blur(6px) saturate(1.8); backdrop-filter: url(#glass-lens) blur(6px) saturate(1.8); }
.glass-lens .site-header { -webkit-backdrop-filter: url(#glass-lens-soft) blur(14px) saturate(1.7); backdrop-filter: url(#glass-lens-soft) blur(14px) saturate(1.7); }
.glass-lens #muttaqin-series .kw-home-card { -webkit-backdrop-filter: url(#glass-lens-soft) blur(18px) saturate(1.6); backdrop-filter: url(#glass-lens-soft) blur(18px) saturate(1.6); }
@media (prefers-reduced-motion: reduce) { .nav-link, .tc-btn, #muttaqin-series .ch-btn, #muttaqin-series .btn-gold { transition: none !important; } }
@media (prefers-reduced-transparency: reduce) { .site-header, .dropdown-panel, .tc-btn, #muttaqin-series .kw-home-card { -webkit-backdrop-filter: none; backdrop-filter: none; background: #1a2e1b; } }

/* ══ Glass on the other pages (articles, series, indexes, booklets) ══════════
   The cream article pages get soft colour washes so the glass has something to pick up; cards become frosted panes.
   Selectors start with "body" so they win over each page's inline <style>. */
body .art-page, body .al-section {
  background:
    radial-gradient(55% 32% at 12% 6%, rgba(201,164,107,0.26), transparent 70%),
    radial-gradient(45% 36% at 92% 24%, rgba(26,61,27,0.14), transparent 70%),
    radial-gradient(60% 40% at 30% 70%, rgba(201,164,107,0.16), transparent 70%),
    radial-gradient(50% 36% at 85% 96%, rgba(26,61,27,0.12), transparent 70%),
    var(--art-cream, #f9f5ee);
}
body .al-card, body .kw-part-card, body .kw-poster-card, body .featured-card {
  background: linear-gradient(150deg, rgba(255,255,255,0.82), rgba(255,255,255,0.50));
  -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.9); border-radius: 22px;
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(201,164,107,0.14), 0 14px 34px rgba(30,61,31,0.12), 0 2px 6px rgba(30,61,31,0.06);
  transition: transform .45s var(--glass-spring), box-shadow .3s ease;
}
body .al-card:hover, body .kw-part-card:hover, body .kw-poster-card:hover, body .featured-card:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(201,164,107,0.3), 0 22px 46px rgba(30,61,31,0.18), 0 0 0 5px rgba(201,164,107,0.12);
}
body .al-card img, body .kw-part-card img, body .kw-poster-card img { border-radius: 0; }
body .quran-verse { background: linear-gradient(145deg, rgba(255,255,255,0.7), rgba(201,164,107,0.10)); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.85); border-radius: 22px; box-shadow: inset 0 1px 0 #fff, 0 10px 28px rgba(30,61,31,0.08); }
body .art-sources { background: linear-gradient(150deg, rgba(255,255,255,0.78), rgba(255,255,255,0.45)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,0.9); border-radius: 20px; box-shadow: inset 0 1px 0 #fff, 0 10px 28px rgba(30,61,31,0.08); overflow: hidden; }
body .kw-partnav a { background: linear-gradient(150deg, rgba(255,255,255,0.85), rgba(255,255,255,0.5)); border: 1px solid rgba(255,255,255,0.9); border-radius: 20px; box-shadow: inset 0 1px 0 #fff, 0 8px 24px rgba(30,61,31,0.1); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: transform .4s var(--glass-spring), box-shadow .3s ease; }
body .kw-partnav a:hover { transform: translateY(-3px) scale(1.015); box-shadow: inset 0 1px 0 #fff, 0 16px 34px rgba(30,61,31,0.16); }
body .art-lang-sw-inline a, body .kw-series-chip { background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.5)); border: 1px solid rgba(201,164,107,0.35); box-shadow: inset 0 1px 0 #fff, 0 2px 8px rgba(30,61,31,0.08); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .35s var(--glass-spring), background .25s ease; }
body .kw-series-chip { color: #7a5b22; font-weight: 600; }
body .art-tag { background: linear-gradient(180deg, #2f6131, #1a3d1b); color: #fff; border: 1px solid rgba(255,255,255,0.28); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 3px 10px rgba(26,61,27,0.25); }
body .art-lang-sw-inline a:hover { transform: translateY(-2px) scale(1.05); }
body .art-lang-sw-inline a.active { background: linear-gradient(180deg, #2c5a2e, #1a3d1b); color: #fff; }
body .art-back { transition: transform .35s var(--glass-spring); } body .art-back:hover { transform: translateX(-3px); } [dir="rtl"] body .art-back:hover, body[dir="rtl"] .art-back:hover { transform: translateX(3px); }
/* every gold button on every page: a polished glass drop */
body .btn-gold { background: linear-gradient(180deg, #f6e3b2, var(--gold) 72%); color: #20230f; border: 1px solid rgba(255,255,255,0.55); box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 8px 22px rgba(201,164,107,0.32); transition: transform .35s var(--glass-spring), box-shadow .3s ease; }
body .btn-gold:hover { transform: translateY(-2px) scale(1.04); box-shadow: inset 0 1px 0 #fff, 0 14px 32px rgba(201,164,107,0.48); }
/* homepage cards on the dark sections */
body .topic-card { background: linear-gradient(150deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03)), rgba(26,45,26,0.7); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); border-radius: 22px; border-color: rgba(255,255,255,0.18); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 12px 30px rgba(0,0,0,0.3); }
body .topic-card:hover { transform: translateY(-6px) scale(1.012); }
[data-theme="light"] body .topic-card, body[data-theme="light"] .topic-card { background: linear-gradient(150deg, rgba(255,255,255,0.9), rgba(255,255,255,0.55)); }
.kw-poster-card h2, .kw-poster-card p { color: inherit; }
@media (prefers-reduced-motion: reduce) { body .al-card, body .kw-part-card, body .kw-poster-card, body .featured-card, body .kw-partnav a, body .btn-gold, body .art-back, body .art-lang-sw-inline a { transition: none !important; transform: none !important; } }
@media (prefers-reduced-transparency: reduce) { body .al-card, body .kw-part-card, body .kw-poster-card, body .featured-card, body .quran-verse, body .art-sources, body .kw-partnav a, body .topic-card { -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* ── Glass, light theme: the hero turns cream (it stayed dark green with dark text), and no white box behind the nav pills ── */
[data-theme="light"] { --hero-bg: linear-gradient(165deg, #f9f3e2 0%, #f0e5c6 55%, #e8deba 100%); }
[data-theme="light"] .hero { background: radial-gradient(55% 45% at 50% 28%, rgba(201,164,107,0.38), transparent 72%), radial-gradient(40% 40% at 88% 85%, rgba(26,92,28,0.12), transparent 70%), var(--hero-bg); }
[data-theme="light"] .hero-title { color: #17341a; text-shadow: 0 2px 0 rgba(255,255,255,0.6); }
[data-theme="light"] .hero-title .accent { color: #1a5c1c; }
[data-theme="light"] .hero-sub { color: rgba(30,61,31,0.7); }
[data-theme="light"] .hero-eyebrow { color: #7a5b22; }
/* the calligraphy images are white on black and are shown with "screen"; on cream they are inverted and multiplied instead */
[data-theme="light"] .hero-logo-top, [data-theme="light"] .hero-logo-pair, [data-theme="light"] .hero-logo-dark { filter: invert(1) brightness(0.42); mix-blend-mode: multiply; opacity: 0.92; }
@media (min-width: 769px) { [data-theme="light"] .nav-links { background: transparent; border: 0; box-shadow: none; } }
[data-theme="light"] .lang-sw { background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.35)); box-shadow: inset 0 1px 0 #fff; }
[data-theme="light"] .lang-sw a { color: rgba(30,61,31,0.6); }
[data-theme="light"] .nav-link { color: #1e3d1f; }
[data-theme="light"] .nav-link.nav-cta { color: #fff; background: linear-gradient(180deg, #2f6131, #1e3d1f); }

/* tag pills: the <li> is the pill, its link must stay a plain, transparent child */
body .kw-tags li { border: 1px solid rgba(255,255,255,0.6); box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), 0 2px 8px rgba(30,61,31,0.08); transition: transform .35s var(--glass-spring), box-shadow .3s ease; }
body .kw-tags li:hover { transform: translateY(-2px) scale(1.05); box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 8px 18px rgba(30,61,31,0.16); }
body .kw-tags li a { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; transform: none; padding: 0; }

/* ══ Dark theme for article-style pages ══════════════════════════════════════
   Article, series, booklet, index and filter pages used to stay cream whatever the theme. They now follow it:
   dark (also the default when nothing is saved) or light (explicit data-theme="light" keeps the cream look above). */
html:not([data-theme="light"]) body .art-page, html:not([data-theme="light"]) body .al-section {
  background:
    radial-gradient(55% 32% at 12% 6%, rgba(201,164,107,0.16), transparent 70%),
    radial-gradient(45% 36% at 92% 24%, rgba(60,130,70,0.14), transparent 70%),
    radial-gradient(60% 40% at 30% 70%, rgba(201,164,107,0.09), transparent 70%),
    radial-gradient(50% 36% at 85% 96%, rgba(60,130,70,0.10), transparent 70%),
    #0f1a10;
}
html:not([data-theme="light"]) body .kw-banner-wrap { background: #0f1a10; }
html:not([data-theme="light"]) body .art-title, html:not([data-theme="light"]) body .art-part-title, html:not([data-theme="light"]) body .art-section-title, html:not([data-theme="light"]) body .art-back, html:not([data-theme="light"]) body .art-toc a, html:not([data-theme="light"]) body .art-sources-btn, html:not([data-theme="light"]) body .quran-ar, html:not([data-theme="light"]) body .hadith-ar, html:not([data-theme="light"]) body .kw-subtitle, html:not([data-theme="light"]) body .art-title-block h1 { color: #f3e8c8; }
html:not([data-theme="light"]) body .art-back:hover, html:not([data-theme="light"]) body .art-toc a:hover { color: var(--gold); }
html:not([data-theme="light"]) body .art-body p, html:not([data-theme="light"]) body .art-body li, html:not([data-theme="light"]) body .art-body td, html:not([data-theme="light"]) body .art-intro, html:not([data-theme="light"]) body .kw-sources-list li { color: #ddd8c6; }
html:not([data-theme="light"]) body .art-month, html:not([data-theme="light"]) body .art-reading, html:not([data-theme="light"]) body .art-title-arabic, html:not([data-theme="light"]) body .quran-tr, html:not([data-theme="light"]) body .hadith-tr, html:not([data-theme="light"]) body .kw-subhead, html:not([data-theme="light"]) body .art-sources-body li, html:not([data-theme="light"]) body .art-toc .toc-sub a, html:not([data-theme="light"]) body .art-lang-sw-inline .lsw-label, html:not([data-theme="light"]) body .al-browse h2 { color: #b4ae9a; }
html:not([data-theme="light"]) body .art-meta, html:not([data-theme="light"]) body .art-title-block, html:not([data-theme="light"]) body .art-sources, html:not([data-theme="light"]) body .al-browse { border-color: rgba(255,255,255,0.12); }
html:not([data-theme="light"]) body .art-section-title { border-bottom-color: rgba(201,164,107,0.3); }
html:not([data-theme="light"]) body .art-intro, html:not([data-theme="light"]) body .art-toc, html:not([data-theme="light"]) body .art-sources-body, html:not([data-theme="light"]) body .art-lang-sw-inline, html:not([data-theme="light"]) body .hadith-block { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.14); }
html:not([data-theme="light"]) body .art-intro { border-left-color: var(--gold); }
html:not([data-theme="light"]) body .art-body a { color: #e0c58a; }
/* glass panes, dark version */
html:not([data-theme="light"]) body .al-card, html:not([data-theme="light"]) body .kw-part-card, html:not([data-theme="light"]) body .kw-poster-card, html:not([data-theme="light"]) body .featured-card, html:not([data-theme="light"]) body .kw-partnav a, html:not([data-theme="light"]) body .art-sources {
  background: linear-gradient(150deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04)), rgba(22,38,24,0.62);
  border-color: rgba(255,255,255,0.20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), inset 0 0 0 1px rgba(201,164,107,0.08), 0 14px 34px rgba(0,0,0,0.38);
}
html:not([data-theme="light"]) body .al-card:hover, html:not([data-theme="light"]) body .kw-part-card:hover, html:not([data-theme="light"]) body .kw-poster-card:hover, html:not([data-theme="light"]) body .featured-card:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 22px 46px rgba(0,0,0,0.5), 0 0 0 5px rgba(201,164,107,0.14); }
html:not([data-theme="light"]) body .quran-verse { background: linear-gradient(145deg, rgba(255,255,255,0.10), rgba(201,164,107,0.07)); border-color: rgba(255,255,255,0.2); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 10px 28px rgba(0,0,0,0.3); }
html:not([data-theme="light"]) body .al-title, html:not([data-theme="light"]) body .kw-part-body h2, html:not([data-theme="light"]) body .kw-poster-card h2, html:not([data-theme="light"]) body .kw-partnav strong, html:not([data-theme="light"]) body .featured-title { color: #f3e8c8; }
html:not([data-theme="light"]) body .al-month, html:not([data-theme="light"]) body .kw-part-body p, html:not([data-theme="light"]) body .kw-poster-card p, html:not([data-theme="light"]) body .featured-excerpt { color: #b9b3a0; }
html:not([data-theme="light"]) body .al-tag, html:not([data-theme="light"]) body .kw-partnav small, html:not([data-theme="light"]) body .featured-cat { color: #d9b878; }
html:not([data-theme="light"]) body .al-card img { background: #1b2a1c; }
html:not([data-theme="light"]) body .art-lang-sw-inline a, html:not([data-theme="light"]) body .kw-series-chip { background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.05)); border-color: rgba(255,255,255,0.22); color: #e9e0c4; box-shadow: inset 0 1px 0 rgba(255,255,255,0.3); }
html:not([data-theme="light"]) body .kw-series-chip { color: #e0c58a; }
html:not([data-theme="light"]) body .art-lang-sw-inline a.active { background: linear-gradient(180deg, #3a7a3d, #24552a); color: #fff; }
html:not([data-theme="light"]) body .kw-tags li, html:not([data-theme="light"]) body .al-browse li a { background: rgba(255,255,255,0.08); color: #e9e0c4; border-color: rgba(255,255,255,0.2); }
html:not([data-theme="light"]) body .kw-tags li:hover, html:not([data-theme="light"]) body .al-browse li a:hover { background: rgba(255,255,255,0.16); }
html:not([data-theme="light"]) body .kw-tags .kw-tag-month { background: linear-gradient(180deg, #3a7a3d, #24552a); color: #fff; }
html:not([data-theme="light"]) body .kw-tags .kw-tag-type { background: rgba(201,164,107,0.28); color: #f3e8c8; }
html:not([data-theme="light"]) body .al-filters label { color: #b4ae9a; }
html:not([data-theme="light"]) body .al-filters select, html:not([data-theme="light"]) body .al-filters input { background: rgba(255,255,255,0.08); color: #f3e8c8; border-color: rgba(255,255,255,0.22); color-scheme: dark; }
html:not([data-theme="light"]) body .al-filters input::placeholder { color: #9d9783; }
html:not([data-theme="light"]) body .al-results, html:not([data-theme="light"]) body .al-count { color: #b4ae9a; }
html:not([data-theme="light"]) body .art-sources-btn { border-color: rgba(201,164,107,0.35); }
html:not([data-theme="light"]) body .art-fig img, html:not([data-theme="light"]) body .art-body img { box-shadow: 0 10px 30px rgba(0,0,0,0.45); }
html:not([data-theme="light"]) body .kw-bismillah, html:not([data-theme="light"]) body .kw-lead-headings .kw-bismillah { color: #e0c58a; }
html:not([data-theme="light"]) body .kw-lead-headings p, html:not([data-theme="light"]) body .art-hero-eyebrow { color: #cfc8b2; }

/* Telegram-sourced series (Lady Khadijah): reference lines under a passage */
.tg-ref { font-size: 0.88rem; line-height: 1.6; color: #6b6558; margin: -0.3rem 0 0.9rem; padding-inline-start: 0.85rem; border-inline-start: 3px solid rgba(201,164,107,0.55); }
html:not([data-theme="light"]) body .tg-ref { color: #b4ae9a; }

/* ══ Mobile glass menu (≤ 768px) ═══════════════════════════════════════════
   The bar stays a floating pill; the menu drops down as its own rounded pane of frosted glass (not a flat block stuck to the bar),
   with glass buttons, a glass language switcher and the theme button in the last row. */
@media (max-width: 768px) {
  .site-header { inset-block-start: 8px; inset-inline: 8px; border-radius: 28px; }
  .nav-inner { padding-inline: 14px; }
  .hamburger { width: 44px; height: 44px; border-radius: 50%; align-items: center; justify-content: center; gap: 5px;
    background: radial-gradient(120% 120% at 30% 12%, rgba(255,255,255,0.40), rgba(255,255,255,0.06) 60%), rgba(255,255,255,0.08);
    border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 6px 16px rgba(0,0,0,0.25);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: transform .3s var(--glass-spring), background .3s ease; }
  .hamburger:active { transform: scale(0.92); }
  .hamburger span { width: 20px; height: 2px; background: #fff; }
  .nav-links {
    position: fixed; top: calc(var(--nav-h) + 22px); inset-inline: 8px; margin: 0;
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; align-content: start;
    max-height: 0; padding: 0 14px; overflow: hidden auto; overscroll-behavior: contain;
    opacity: 0; transform: translateY(-12px) scale(0.97); transform-origin: top center; pointer-events: none; visibility: hidden;
    border: 1px solid var(--glass-edge-soft); border-radius: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04)), rgba(16,32,16,0.90);
    -webkit-backdrop-filter: blur(30px) saturate(1.7); backdrop-filter: blur(30px) saturate(1.7);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.40), inset 0 0 40px rgba(255,255,255,0.04), 0 28px 70px rgba(0,0,0,0.45);
    transition: max-height .45s cubic-bezier(.2,.8,.2,1), padding .3s ease, opacity .25s ease, transform .45s var(--glass-spring), visibility 0s linear .45s;
  }
  .nav-links.open { max-height: calc(100vh - var(--nav-h) - 44px); max-height: calc(100dvh - var(--nav-h) - 44px); padding: 14px; opacity: 1; transform: none; pointer-events: auto; visibility: visible;
    transition: max-height .45s cubic-bezier(.2,.8,.2,1), padding .3s ease, opacity .25s ease, transform .45s var(--glass-spring), visibility 0s; }
  .nav-links > * { grid-column: 1 / -1; }
  .nav-links .nav-link { width: 100%; min-height: 48px; padding: 0.7rem 1.1rem; font-size: 0.95rem; justify-content: space-between; }
  .nav-links .nav-dropdown { width: 100%; }
  .nav-links .dropdown-panel { position: static; width: 100%; margin-top: 6px; box-shadow: none; background: rgba(255,255,255,0.06); border: 1px solid var(--glass-edge-soft); border-radius: 20px; }
  .nav-links .dropdown-item { color: #fff; border-radius: 14px; }
  .nav-links .lang-sw { grid-column: 1; justify-self: stretch; display: flex; justify-content: space-around; padding: 0.35rem 0.5rem; border-radius: 22px; margin-top: 4px;
    background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04)); border: 1px solid var(--glass-edge-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3); }
  .nav-links .lang-sw a { padding: 0.45rem 0.7rem; font-size: 0.9rem; color: rgba(255,255,255,0.75); }
  .nav-links .lang-sw a.active { color: var(--gold-light); font-weight: 700; }
  .nav-links .theme-toggle { grid-column: 2; margin-top: 4px; width: 46px; height: 46px; }
  [data-theme="light"] .hamburger { background: radial-gradient(120% 120% at 30% 12%, rgba(255,255,255,0.95), rgba(255,255,255,0.4) 60%), rgba(255,255,255,0.5); border-color: rgba(30,61,31,0.2); }
  [data-theme="light"] .hamburger span { background: #1e3d1f; }
  [data-theme="light"] .nav-links { background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.78)); border-color: rgba(255,255,255,0.9);
    box-shadow: inset 0 1px 0 #fff, 0 26px 60px rgba(30,61,31,0.22); }
  [data-theme="light"] .nav-links .dropdown-panel { background: rgba(255,255,255,0.55); border-color: rgba(30,61,31,0.12); }
  [data-theme="light"] .nav-links .dropdown-item { color: #1e3d1f; }
  [data-theme="light"] .nav-links .lang-sw { background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.5)); border-color: rgba(30,61,31,0.12); }
  [data-theme="light"] .nav-links .lang-sw a { color: rgba(30,61,31,0.6); }
  [data-theme="light"] .nav-links .lang-sw a.active { color: #1e3d1f; }
}
@media (prefers-reduced-motion: reduce) { .nav-links, .hamburger { transition: none !important; } }
@media (prefers-reduced-transparency: reduce) { .nav-links { -webkit-backdrop-filter: none; backdrop-filter: none; background: #14281a; } [data-theme="light"] .nav-links { background: #fff; } }

/* RTL featured card on phones: the RTL rule ([dir="rtl"] .featured-card { flex-direction: row-reverse }) came later and beat the phone
   layout, so in Arabic / Farsi / Urdu the card stayed a row at phone width — a tall empty box above a squeezed picture. Stack it like English. */
@media (max-width: 768px) {
  [dir="rtl"] .featured-card { flex-direction: column; aspect-ratio: unset; }
  [dir="rtl"] .featured-img { flex: none; width: 100%; aspect-ratio: 1200 / 760; min-height: unset; }
  .featured-img img { object-fit: cover; }
}

/* Light theme: sections that sit on a photo keep light-on-dark text (the light palette had turned their headings dark green on a dark picture) */
[data-theme="light"] .mourning-section .section-label, #muttaqin-series .section-label { color: #e8d5a3; }
[data-theme="light"] .mourning-section .section-title { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.7); }
[data-theme="light"] .mourning-section .mourning-desc { color: rgba(255,255,255,0.92); }
[data-theme="light"] .mourning-section .chapters-label { color: #fff; }
[data-theme="light"] .mourning-section .ch-btn { border-color: #e8d5a3; color: #e8d5a3; }
[data-theme="light"] .mourning-section .ch-btn:hover { background: #e8d5a3; color: #1a1a1a; }
[data-theme="light"] .mourning-section .divider-gem, [data-theme="light"] #muttaqin-series .divider-gem { color: #e8d5a3; }

/* ══ iOS liquid glass bar ═════════════════════════════════════════════════════
   Thin frost (the content stays recognisable under it), a bright rim, a specular highlight that follows the pointer and drifts with the
   scroll, refraction that grows while the page scrolls and settles when it stops (script.js; the bar itself never moves), and — where the browser allows it — refraction at the rim. */
.site-header {
  --lg-mx: 22%; --lg-my: 0%; --lg-shine: 20%;
  --lg-extra: 0;
  transition: background .4s ease, box-shadow .4s ease;
  -webkit-backdrop-filter: blur(calc(10px + var(--lg-extra) * 7px)) saturate(1.9) brightness(1.04); backdrop-filter: blur(calc(10px + var(--lg-extra) * 7px)) saturate(1.9) brightness(1.04);
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04)), rgba(21,43,21,0.34);
  border: 1px solid rgba(255,255,255,0.30);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.65), inset 0 -1px 1px rgba(255,255,255,0.18), inset 0 0 22px rgba(255,255,255,0.10), 0 12px 36px rgba(0,0,0,0.26);
}
.site-header.is-scrolled { background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03)), rgba(21,43,21,0.38);
  -webkit-backdrop-filter: blur(calc(14px + var(--lg-extra) * 7px)) saturate(2) brightness(1.05); backdrop-filter: blur(calc(14px + var(--lg-extra) * 7px)) saturate(2) brightness(1.05);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.75), inset 0 -1px 1px rgba(255,255,255,0.2), inset 0 0 26px rgba(255,255,255,0.12), 0 18px 48px rgba(0,0,0,0.32); }
.site-header::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background:
    radial-gradient(240px 80px at var(--lg-mx) var(--lg-my), rgba(255,255,255,0.50), rgba(255,255,255,0) 70%),
    linear-gradient(100deg, rgba(255,255,255,0) calc(var(--lg-shine) - 18%), rgba(255,255,255,0.22) var(--lg-shine), rgba(255,255,255,0) calc(var(--lg-shine) + 18%));
  mix-blend-mode: soft-light; opacity: 0.9; }
.site-header::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0; padding: 1px;
  background: conic-gradient(from 210deg, rgba(255,255,255,0.75), rgba(255,255,255,0.05) 18%, rgba(255,255,255,0.45) 38%, rgba(255,255,255,0.04) 62%, rgba(255,255,255,0.7) 86%, rgba(255,255,255,0.75));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: 0.8; }
.site-header > * { position: relative; z-index: 1; }
/* refraction: the bar's own displacement map (script.js draws it for the exact size) */
.glass-lens .site-header.lg-ready { -webkit-backdrop-filter: url(#lg-bar) blur(calc(2px + var(--lg-extra) * 2.5px)) saturate(1.9) brightness(1.05); backdrop-filter: url(#lg-bar) blur(calc(2px + var(--lg-extra) * 2.5px)) saturate(1.9) brightness(1.05); }
.glass-lens .site-header.lg-ready.is-scrolled { -webkit-backdrop-filter: url(#lg-bar) blur(calc(3px + var(--lg-extra) * 2.5px)) saturate(2) brightness(1.06); backdrop-filter: url(#lg-bar) blur(calc(3px + var(--lg-extra) * 2.5px)) saturate(2) brightness(1.06); }
[data-theme="light"] .site-header { background: linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.30)), rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.8);
  box-shadow: inset 0 1px 1px #fff, inset 0 -1px 1px rgba(255,255,255,0.5), inset 0 0 24px rgba(255,255,255,0.35), 0 12px 34px rgba(30,61,31,0.18); }
[data-theme="light"] .site-header.is-scrolled { background: linear-gradient(180deg, rgba(255,255,255,0.52), rgba(255,255,255,0.22)), rgba(255,255,255,0.06); box-shadow: inset 0 1px 1px #fff, inset 0 0 28px rgba(255,255,255,0.4), 0 18px 44px rgba(30,61,31,0.24); }
@media (prefers-reduced-motion: reduce) { .site-header { transition: none; } .site-header::before { display: none; } }
@media (prefers-reduced-transparency: reduce) { .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: #14281a; } [data-theme="light"] .site-header { background: #fff; } }

/* Featured section: the three Lady Khadijah series under the featured article */
.feat-series-heading { text-align: center; font-size: 1.25rem; margin: 3rem 0 1.5rem; color: #1e3d1f; }
[dir="rtl"] .feat-series-heading { font-family: 'Amiri', serif; font-size: 1.5rem; }
.feat-series { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.feat-series-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; text-decoration: none; color: inherit; text-align: start;
  background: linear-gradient(150deg, rgba(255,255,255,0.82), rgba(255,255,255,0.50)); border: 1px solid rgba(255,255,255,0.9);
  -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(201,164,107,0.14), 0 14px 34px rgba(30,61,31,0.12), 0 2px 6px rgba(30,61,31,0.06);
  transition: transform .45s var(--glass-spring), box-shadow .3s ease; }
.feat-series-card:hover, .feat-series-card:focus-visible { transform: translateY(-6px) scale(1.012);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(201,164,107,0.3), 0 22px 46px rgba(30,61,31,0.18), 0 0 0 5px rgba(201,164,107,0.12); }
.feat-series-card img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.feat-series-body { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.1rem 1.25rem 1.35rem; }
.feat-series-chip { align-self: flex-start; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #7a5b22; }
[dir="rtl"] .feat-series-chip { letter-spacing: 0; text-transform: none; font-size: 0.85rem; }
.feat-series-name { font-family: 'Cinzel', serif; font-size: 1.08rem; line-height: 1.35; color: #1e3d1f; }
[dir="rtl"] .feat-series-name { font-family: 'Amiri', serif; font-size: 1.35rem; line-height: 1.5; }
.feat-series-desc { font-size: 0.9rem; line-height: 1.55; color: #555; }
html:not([data-theme="light"]) .feat-series-card { background: linear-gradient(150deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04)), rgba(22,38,24,0.82); border-color: rgba(255,255,255,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), 0 14px 34px rgba(0,0,0,0.38); }
html:not([data-theme="light"]) .feat-series-name, html:not([data-theme="light"]) .feat-series-chip { color: #f3e8c8; }
html:not([data-theme="light"]) .feat-series-desc { color: #b9b3a0; }
@media (max-width: 900px) { .feat-series { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }
@media (prefers-reduced-motion: reduce) { .feat-series-card { transition: none; transform: none !important; } }

/* Light theme: text that assumed a dark page. These styles use var(--white) for text on var(--dark-bg); in the light palette --dark-bg is cream,
   so the headings and paragraphs came out white-on-cream (About, and the banner of the Articles / month / tag / type pages). */
html[data-theme="light"] body .al-hero h1 { color: #17341a; }
html[data-theme="light"] body .al-sub { color: #7a5b22; }
html[data-theme="light"] body .al-eyebrow { color: #1a5c1c; }
html[data-theme="light"] body .about-banner h1 { color: #17341a; }
html[data-theme="light"] body .about-banner h1 span { color: #1a5c1c; }
html[data-theme="light"] body .about-banner p { color: rgba(30,50,30,0.78); }
html[data-theme="light"] body .about-heading { color: #17341a; }
html[data-theme="light"] body .about-text { color: rgba(30,45,30,0.86); }
html[data-theme="light"] body .what-card h3, html[data-theme="light"] body .contact-card h3 { color: #1a5c1c; }
html[data-theme="light"] body .what-card p { color: rgba(30,45,30,0.80); }
html[data-theme="light"] body .commitment-highlight { color: #17341a; background: rgba(201,164,107,0.18); }
html[data-theme="light"] body .contact-item, html[data-theme="light"] body .contact-item a { color: rgba(30,45,30,0.85); }
html[data-theme="light"] body .contact-item a:hover { color: #1a5c1c; }
/* small grey / gold labels that were under 3:1 on cream */
html[data-theme="light"] body .art-reading { color: #666; }
html[data-theme="light"] body .art-month { color: #5f5f5f; }
html[data-theme="light"] body .art-lang-sw-inline .lsw-label { color: #6f6f6f; }
html[data-theme="light"] body .quran-ref, html[data-theme="light"] body .art-toc-heading, html[data-theme="light"] body .kw-video-label,
html[data-theme="light"] body .kw-partnav small, html[data-theme="light"] body .art-body sup.ref, html[data-theme="light"] body .art-body sup.ref a { color: #7a5b22; }
html[data-theme="light"] body .art-divider { color: #a98443; }
html[data-theme="light"] body .not-found-code, html[data-theme="light"] body .nf-code { color: #a98443; }

/* Browsers without backdrop-filter:url() (every iPhone, Safari, Firefox) cannot bend what is behind the bar, so the glass there has to
   win on clarity instead: much less blur and tint than before, strong saturation, and a bright lens-like rim, so the picture behind the
   bar reads as sitting *behind glass* rather than behind frosted plastic. */
html:not(.glass-lens) .site-header,
html:not(.glass-lens) .site-header.is-scrolled {
  -webkit-backdrop-filter: blur(5px) saturate(2.1) brightness(1.06) contrast(1.04); backdrop-filter: blur(5px) saturate(2.1) brightness(1.06) contrast(1.04);
  background: linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.03) 55%, rgba(255,255,255,0.10)), rgba(21,43,21,0.32);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.8), inset 0 -1px 1px rgba(255,255,255,0.35), inset 0 0 22px rgba(255,255,255,0.22), 0 10px 30px rgba(0,0,0,0.22);
}
html:not(.glass-lens)[data-theme="light"] .site-header,
html:not(.glass-lens)[data-theme="light"] .site-header.is-scrolled {
  background: linear-gradient(180deg, rgba(255,255,255,0.42), rgba(255,255,255,0.10) 55%, rgba(255,255,255,0.22)), rgba(255,255,255,0.04);
  box-shadow: inset 0 1px 1px #fff, inset 0 -1px 1px rgba(255,255,255,0.6), inset 0 0 22px rgba(255,255,255,0.45), 0 10px 30px rgba(30,61,31,0.18);
}
@media (prefers-reduced-transparency: reduce) { html:not(.glass-lens) .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: #14281a; } html:not(.glass-lens)[data-theme="light"] .site-header { background: #fff; } }

/* Arabic-script headings: letter-spacing pulls the joined letters apart (visible gaps inside آمدید), a 1.08 line-height lets the descender of
   ح/ص touch the next line, and the pale offset shadow smears the dots. Give the hero title proper room and no tracking in ar / fa / ur. */
[dir="rtl"] .hero-title { letter-spacing: 0; text-transform: none; line-height: 1.5; text-shadow: none; word-spacing: 0.08em; }

/* Lady Khadijah series: every part shares the series cover, a 16:9 picture. The part card is a tall two-column box (long titles), and the
   generic rule stretches the picture to the card's height with object-fit:cover — which crops a wide poster down to a narrow slice. Keep the
   picture 16:9 and centred in its column instead, so the whole poster shows. */
.kw-part-card img[src*="lady-khadijah"] { height: auto; min-height: 0; aspect-ratio: 16 / 9; align-self: center; object-fit: cover; }

/* Phone numbers are left-to-right text: inside a right-to-left page the bidi algorithm reordered "+1 (888) 471-7174" (the + and the brackets jumped around). Isolate it. */
a[href^="tel:"], .footer-contact-item bdi { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* Shia-calendar occasions list: one card-like row per occasion, the number kept from the post */
.occ-list { list-style: none; margin: 1.2rem 0; padding: 0; display: grid; gap: 0.9rem; }
.occ-list li { padding: 1rem 1.2rem; border-radius: 16px; line-height: 1.85; background: linear-gradient(150deg, rgba(255,255,255,0.8), rgba(255,255,255,0.5)); border: 1px solid rgba(201,164,107,0.35); border-inline-start: 4px solid #c9a46b; }
html:not([data-theme="light"]) body .occ-list li { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.14); border-inline-start-color: #c9a46b; }

/* Homepage "month's occasions" block: the picture is a wide poster, so fill the frame instead of letterboxing it (the featured article's picture is contained) */
.occ-feature .featured-img img { object-fit: cover; }
.occ-section { padding-bottom: 1rem; }
@media (max-width: 768px) { .occ-feature .featured-img { aspect-ratio: 1 / 1; } }
