:root {
  --gold: #D4AF37; --gold-light: #E8C84A; --gold-dim: #C5A059;
  --crimson: #C41E3A; --crimson-light: #E84060;
  --green: #3DA06E; --green-dim: #2E7A54;
  --parchment: #FDFBF7; --parchment-dim: #E8E4DE;
  --bg-black: #000000; --bg-dark: #0a0a05; --bg-card: #111111; --bg-mid: #1a1a1a; --bg-accent: #2a2a2a;
  --text-body: #cccccc; --text-muted: #888888;
  --radius: 0.75rem; --radius-sm: 0.5rem;
  --font-display: 'Cinzel Decorative', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

/* 1. Base reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-black);
  color: var(--text-body);
  font-family: var(--font-body);
  font-weight: 300; /* Lighter font weight */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--gold);
  color: var(--bg-black);
}

a {
  color: inherit;
  text-decoration: none;
}

/* 2. Typography — Lighter Font Weights */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--parchment);
  letter-spacing: 0.05em;
  font-weight: 300; /* Light weight for headings */
  line-height: 1.25;
}

.arabic-text {
  font-family: 'Amiri', serif;
  font-size: 1.5em;
  line-height: 1.8;
  direction: rtl;
  font-weight: 400;
}

.font-display {
  font-family: var(--font-display);
  font-weight: 300;
}

/* Article Body Typography & Headings */
.article-body h2 {
  font-family: 'Cinzel Decorative', var(--font-display), serif !important;
  font-size: 1.5rem !important;
  color: #D4AF37 !important;
  margin-top: 3.5rem !important;
  margin-bottom: 1.25rem !important;
  letter-spacing: 0.05em !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  line-height: 1.3 !important;
}

.article-body h2::before {
  content: '' !important;
  display: inline-block !important;
  width: 0.25rem !important;
  height: 1.5rem !important;
  background: linear-gradient(to bottom, #D4AF37, rgba(212, 175, 55, 0.2)) !important;
  border-radius: 9999px !important;
  flex-shrink: 0 !important;
}

.article-body h2 span.rounded-full {
  display: none !important;
}

/* Drop Cap Styling */
.article-body p.dropcap::first-letter,
.article-body p:first-of-type::first-letter,
.dropcap::first-letter {
  font-family: 'Cinzel Decorative', var(--font-display), serif !important;
  font-size: 3.25rem !important;
  color: #D4AF37 !important;
  float: left !important;
  margin-right: 0.75rem !important;
  line-height: 0.8 !important;
  margin-top: 0.25rem !important;
}

.article-body p {
  color: rgba(253, 251, 247, 0.75) !important;
  font-size: 1.05rem !important;
  line-height: 1.8 !important;
  margin-bottom: 1.5rem !important;
}

.article-body blockquote {
  position: relative !important;
  margin: 2rem 0 !important;
  padding-left: 1.5rem !important;
  border-left: 2px solid rgba(212, 175, 55, 0.3) !important;
}

.article-body blockquote div {
  color: rgba(253, 251, 247, 0.85) !important;
  font-style: italic !important;
  line-height: 1.8 !important;
}

/* 3. Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
}

.pt-nav {
  padding-top: 80px;
}

/* 4. Navbar */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 1000;
  background: transparent;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.scrolled {
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-body);
  transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold);
}

/* Desktop Dropdown Styles */
.nav-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-wrapper > a,
.nav-dropdown-wrapper > button {
  position: relative;
  transition: color 0.3s ease;
}

.nav-dropdown-wrapper > a::after,
.nav-dropdown-wrapper > button::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #D4AF37;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dropdown-wrapper:hover > a::after,
.nav-dropdown-wrapper:hover > button::after,
.nav-dropdown-wrapper.is-open > a::after,
.nav-dropdown-wrapper.is-open > button::after {
  width: 100%;
}

.dropdown-chevron {
  transition: transform 0.3s ease;
}

.nav-dropdown-wrapper:hover .dropdown-chevron,
.nav-dropdown-wrapper.is-open .dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu,
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  min-width: 210px;
  background-color: #000000 !important;
  border: 1px solid rgba(212, 175, 55, 0.18) !important;
  border-radius: 0.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85), 0 0 15px rgba(212, 175, 55, 0.06);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.2s;
  z-index: 100;
  display: block;
}

/* Hover bridge: allows mouse to travel from nav link to dropdown without flickering closed */
.nav-dropdown-menu::before,
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu,
.nav-dropdown-wrapper:hover .nav-dropdown,
.nav-dropdown-wrapper:focus-within .nav-dropdown-menu,
.nav-dropdown-wrapper:focus-within .nav-dropdown,
.nav-dropdown-wrapper.is-open .nav-dropdown-menu,
.nav-dropdown-wrapper.is-open .nav-dropdown,
.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-menu a,
.nav-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-family: var(--font-display, serif);
  color: rgba(253, 251, 247, 0.7);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active,
.nav-dropdown a:hover,
.nav-dropdown a.active {
  color: #D4AF37 !important;
  background-color: rgba(212, 175, 55, 0.06) !important;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-body);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.btn-icon:hover {
  color: var(--gold);
}

.nav-mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger-box {
  width: 22px;
  height: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 9999px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, background-color 0.2s ease;
  transform-origin: center;
}

.hamburger-line-top {
  transform: translateY(0);
}

.hamburger-line-middle {
  opacity: 1;
}

.hamburger-line-bottom {
  transform: translateY(0);
}

/* Morph to X when active */
.nav-mobile-toggle.is-active .hamburger-line-top,
.site-header.menu-open .hamburger-line-top {
  transform: translateY(8px) rotate(45deg);
}

.nav-mobile-toggle.is-active .hamburger-line-middle,
.site-header.menu-open .hamburger-line-middle {
  opacity: 0;
  transform: scaleX(0);
}

.nav-mobile-toggle.is-active .hamburger-line-bottom,
.site-header.menu-open .hamburger-line-bottom {
  transform: translateY(-8px) rotate(-45deg);
}

/* 5. Mobile menu — Exact Replica of React Navbar */
.site-header.menu-open {
  background-color: transparent !important;
  border-bottom-color: transparent !important;
  box-shadow: none !important;
}

.mobile-menu {
  position: fixed !important;
  inset: 0 !important;
  z-index: 60 !important;
  background-color: rgba(0, 0, 0, 0.78) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow-y: auto !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.mobile-menu.open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Staggered entrance animation like Framer Motion (initial: opacity 0, x: -20px) */
.mobile-menu .mobile-menu-item {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.open .mobile-menu-item {
  opacity: 1;
  transform: translateX(0);
}

.mobile-menu.open .mobile-menu-item:nth-child(1) { transition-delay: 0.04s; }
.mobile-menu.open .mobile-menu-item:nth-child(2) { transition-delay: 0.12s; }
.mobile-menu.open .mobile-menu-item:nth-child(3) { transition-delay: 0.20s; }
.mobile-menu.open .mobile-menu-item:nth-child(4) { transition-delay: 0.28s; }
.mobile-menu.open .mobile-menu-item:nth-child(5) { transition-delay: 0.36s; }

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 5rem 2rem;
  gap: 0.25rem;
}

/* Accordion Smooth Height Grid Animation */
.mobile-accordion-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.mobile-accordion-wrapper.expanded {
  grid-template-rows: 1fr;
}

.mobile-accordion-inner {
  min-height: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-accordion-wrapper.expanded .mobile-accordion-inner {
  opacity: 1;
}

/* Close button - exact match: w-12 h-12 rounded-full border border-[#D4AF37]/30 text-[#D4AF37] hover:rotate-90 */
.mobile-menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: transparent;
  color: #D4AF37;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.5s ease;
}

.mobile-menu-close:hover {
  background-color: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.6);
  transform: rotate(90deg);
}

/* 6. Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background-color: var(--gold);
  color: #000000;
  font-weight: 400; /* Lighter button font weight */
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background-color: transparent;
  color: var(--parchment);
  font-weight: 300;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

/* 7. Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 300;
  color: var(--gold);
  line-height: 1.2;
}

.hero-subtitle {
  color: rgba(253, 251, 247, 0.7);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.7;
}

/* 8. Article Layout */
.article-wrapper {
  padding-top: 80px;
}

.article-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

.article-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.article-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.12;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), var(--bg-black));
}

.article-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.article-arabic {
  font-family: serif;
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--gold);
  direction: rtl;
  margin-bottom: 0.5rem;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--gold);
  margin-bottom: 1rem;
}

.article-subtitle {
  color: rgba(253, 251, 247, 0.7);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
}

.article-divider {
  width: 5rem;
  height: 1px;
  background-color: rgba(212, 175, 55, 0.4);
  margin: 1.5rem auto;
}

/* 9. Article Info Grid */
.article-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.article-info-item {
  background-color: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
}

.article-info-label {
  color: rgba(212, 175, 55, 0.6);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.article-info-value {
  color: var(--parchment);
  font-size: 0.85rem;
  font-weight: 300;
  margin-top: 0.25rem;
}

/* 10. Article Body */
.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.9;
  color: rgba(253, 251, 247, 0.85);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--gold);
  margin: 2.5rem 0 1rem;
}

.article-body p {
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.article-body blockquote {
  border-left: 2px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background-color: rgba(212, 175, 55, 0.04);
}

.article-body blockquote p {
  font-style: italic;
  font-weight: 300;
  color: rgba(253, 251, 247, 0.8);
}

body.admin-bar .site-header {
  top: 32px;
}
@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

/* 11. Article Subnav */
.article-subnav, .whois-subnav-sticky {
  position: sticky;
  top: 80px;
  z-index: 50; /* below the mobile menu overlay (60) and header */
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  overflow-x: auto;
  margin-top: 0;
}

body.admin-bar .article-subnav,
body.admin-bar .whois-subnav-sticky {
  top: 112px !important;
}

@media (max-width: 782px) {
  body.admin-bar .article-subnav,
  body.admin-bar .whois-subnav-sticky {
    top: 126px !important;
  }
}

.article-subnav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
}

@media (max-width: 768px) {
  .article-subnav-inner {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
  }
}

.subnav-link {
  padding: 0.6rem 1rem;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-body);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  text-decoration: none;
}

.subnav-link.active, .subnav-link:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* 12. Hub / Cards */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.hub-card {
  display: block;
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all 0.4s ease;
}

.hub-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

.hub-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--parchment);
  margin-bottom: 0.5rem;
}

.hub-card-excerpt {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 13. Search Modal */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.search-modal.open {
  opacity: 1;
  pointer-events: all;
}

.search-modal-inner {
  width: 90%;
  max-width: 600px;
  position: relative;
}

.search-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--gold);
  color: var(--parchment);
  font-size: 1.25rem;
  font-weight: 300;
  padding: 0.75rem 0;
  outline: none;
}

/* 14. Responsive */
@media (max-width: 1023px) {
  .nav-menu {
    display: none;
  }
  .nav-mobile-toggle {
    display: flex !important;
  }
}
@media (min-width: 1024px) {
  .nav-mobile-toggle {
    display: none !important;
  }
}

/* Zarih Cage Islamic Geometric Pattern Overlay */
.zarih-cage-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url('https://media.base44.com/images/public/6a491e90f2bf6b28cc8c8c9d/fee2c1331_generated_image.png');
  background-size: cover;
  background-position: center;
  filter: invert(1) brightness(0.8) contrast(1.2);
  opacity: 0.15;
  z-index: 1;
}

/* 100/100 Timeline Styling */
.ashura-timeline {
  position: relative;
  margin: 3rem 0;
}
.ashura-timeline-line {
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, rgba(212,175,55,0.4), rgba(196,30,58,0.8), rgba(212,175,55,0.4));
}
.ashura-timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 3rem;
}
.ashura-timeline-dot {
  position: absolute;
  left: 24px;
  top: 6px;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #C41E3A;
  border: 2px solid rgba(212,175,55,0.6);
  box-shadow: 0 0 16px rgba(196,30,58,0.6);
  z-index: 10;
}
.ashura-timeline-content {
  box-sizing: border-box;
  margin-left: 56px;
  width: calc(100% - 56px);
  min-width: 0;
}
/* Desktop: centre line, content alternates left (even) / right (odd) of it */
@media (min-width: 768px) {
  .ashura-timeline-line,
  .ashura-timeline-dot {
    left: 50%;
  }
  .ashura-timeline-item.even {
    flex-direction: row;
  }
  .ashura-timeline-item.odd {
    flex-direction: row-reverse;
  }
  .ashura-timeline-content {
    margin-left: 0;
    width: 50%;
  }
  .ashura-timeline-item.even .ashura-timeline-content {
    padding-right: 3rem;
    text-align: right;
  }
  .ashura-timeline-item.odd .ashura-timeline-content {
    padding-left: 3rem;
    text-align: left;
  }
}

/* 15. Ashura Dedicated Subnav */
.ashura-subnav-container {
  position: sticky;
  top: 80px;
  z-index: 50; /* below the mobile menu overlay (60) and header */
  --subnav-bg: rgba(13, 3, 3, 0.95);
  --subnav-chevron: rgba(212, 175, 55, 0.6);
  background: var(--subnav-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(196, 30, 58, 0.2);
  border-bottom: 1px solid rgba(196, 30, 58, 0.2);
  padding: 0.75rem 1rem;
  margin-top: 0;
}
body.admin-bar .ashura-subnav-container {
  top: 112px !important;
}
@media (max-width: 782px) {
  body.admin-bar .ashura-subnav-container {
    top: 126px !important;
  }
}
.ashura-subnav-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem 0.75rem;
  padding: 0.25rem 0;
}
.ashura-subnav-link {
  font-size: 0.6875rem; /* 11px — matches React exactly */
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(253, 251, 247, 0.5);
  text-decoration: none;
  padding: 0.25rem 0.35rem;
  position: relative;
  white-space: nowrap;
  transition: color 0.3s ease;
  font-weight: 400;
}
.ashura-subnav-link:hover {
  color: rgba(212, 175, 55, 0.8);
}
.ashura-subnav-link.active {
  color: #D4AF37 !important;
}
.ashura-subnav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: #D4AF37;
}

/* 15b. Shared subnav behaviour (Ashura/Aqida/Fadak/... bars, .article-subnav, .subnav-scroll) */

/* Generic sticky bar used by template-parts/article/article-subnav.php (prophets, articles) */
.subnav-scroll {
  position: sticky;
  top: 80px;
  z-index: 50; /* below the mobile menu overlay (60) and header */
  --subnav-bg: rgba(10, 10, 5, 0.95);
}
body.admin-bar .subnav-scroll {
  top: 112px !important;
}
@media (max-width: 782px) {
  body.admin-bar .subnav-scroll {
    top: 126px !important;
  }
}
.article-subnav, .whois-subnav-sticky {
  --subnav-bg: rgba(0, 0, 0, 0.95);
}

/* Hide sticky subnavs behind the translucent mobile menu so they don't bleed through */
body.mobile-menu-open .ashura-subnav-container,
body.mobile-menu-open .article-subnav,
body.mobile-menu-open .whois-subnav-sticky,
body.mobile-menu-open .subnav-scroll {
  visibility: hidden;
}

/* Mobile: single swipeable row with scroll arrows (matches React sub-navs).
   Arrow buttons are injected by navbar.js and scroll the row instead of navigating. */
.subnav-arrow {
  display: none;
}
@media (max-width: 767px) {
  .ashura-subnav-container {
    padding: 0.5rem 0;
  }
  .article-subnav {
    overflow: hidden;
  }
  .ashura-subnav-inner,
  .article-subnav-inner,
  .subnav-scroll-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scroll-snap-type: x proximity;
    scroll-padding: 0 2.75rem;
    scrollbar-width: none;
    padding: 0.25rem 2.75rem 0.25rem 1rem;
  }
  /* Tailwind bar: row sits inside a px-4 wrapper; let it run edge to edge */
  .subnav-scroll-row {
    margin: 0 -1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  .ashura-subnav-inner::-webkit-scrollbar,
  .article-subnav-inner::-webkit-scrollbar,
  .subnav-scroll-row::-webkit-scrollbar {
    display: none;
  }
  .ashura-subnav-link {
    padding: 0.5rem 0.5rem;
  }
  .ashura-subnav-link,
  .article-subnav-inner > a,
  .subnav-scroll-row > a {
    scroll-snap-align: start;
    -webkit-tap-highlight-color: transparent;
  }
  .subnav-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 2.75rem;
    display: flex;
    align-items: center;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--subnav-chevron, rgba(212, 175, 55, 0.6));
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s ease;
  }
  .subnav-arrow svg {
    width: 1.1rem;
    height: 1.1rem;
  }
  .subnav-arrow--next {
    right: 0;
    justify-content: flex-end;
    padding-right: 0.5rem;
    background: linear-gradient(to left, var(--subnav-bg) 55%, transparent);
  }
  .subnav-arrow--next svg {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }
  .subnav-arrow--prev {
    left: 0;
    justify-content: flex-start;
    padding-left: 0.5rem;
    background: linear-gradient(to right, var(--subnav-bg) 55%, transparent);
  }
  .subnav-arrow.is-hidden {
    opacity: 0;
    pointer-events: none;
  }
}

/* 16. Search Modal */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 9999;
}
.search-modal.open {
  display: block !important;
}
