/* ===========================================
   HEKMAH.ORG — COMPLETE DESIGN SYSTEM v2.0
   =========================================== */

/* --- CSS VARIABLES / DESIGN TOKENS --- */
:root {
  /* Backgrounds */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F5F5F5;
  --bg-card: #FFFFFF;
  --bg-dark: #1A1814;
  --bg-accent: #8B6914;
  --accent-bg: #F0EBDA;

  /* Text */
  --text-primary: #1A1814;
  --text-secondary: #5C5647;
  --text-tertiary: #8A8378;
  --text-inverse: #FDFBF7;

  /* Accent */
  --accent: #8B6914;
  --accent-light: #C4960A;
  --accent-hover: #A37D16;

  /* Borders */
  --border: rgba(26,24,20,0.1);
  --border-strong: rgba(26,24,20,0.2);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(26,24,20,0.06);
  --shadow-md: 0 4px 16px rgba(26,24,20,0.08);
  --shadow-lg: 0 8px 32px rgba(26,24,20,0.1);

  /* Typography */
  --font-display: 'Noto Kufi Arabic', sans-serif;
  --font-body: 'IBM Plex Sans Arabic', sans-serif;
  --font-serif: 'Amiri', serif;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Layout */
  --max-width: 1280px;
  --reading-width: 740px;
  --sidebar-width: 320px;
  --header-height: 72px;

  /* Transition */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.3s var(--ease);
}

/* --- DARK MODE --- */
[data-theme="dark"] {
  --bg-primary: #111110;
  --bg-secondary: #1A1918;
  --bg-card: #222120;
  --bg-dark: #0A0A09;
  --text-primary: #E8E4DC;
  --text-secondary: #A8A198;
  --text-tertiary: #706B63;
  --text-inverse: #1A1814;
  --accent: #C4960A;
  --accent-light: #E0B420;
  --accent-hover: #D4A30E;
  --accent-bg: #2A2418;
  --border: rgba(232,228,220,0.08);
  --border-strong: rgba(232,228,220,0.15);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
}

/* --- RESET & BASE --- */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
  direction: rtl;
}

::selection {
  background: var(--accent-bg);
  color: var(--accent);
}

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

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

ul, ol { list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea {
  font-family: inherit;
}


/* ============================================
   1. READING PROGRESS BAR
   ============================================ */
.hekmah-progress {
  position: fixed;
  top: 0; right: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(to left, var(--accent), var(--accent-light));
  z-index: 1001;
  transition: width 0.1s linear;
  pointer-events: none;
}


/* ============================================
   2. SITE HEADER — single clean nav
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
  background: rgba(255,255,255,0.92);
}

[data-theme="dark"] .site-header.is-scrolled {
  background: rgba(17,17,16,0.92);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 42px; height: 42px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  transition: transform var(--transition);
}

.site-logo:hover .logo-mark {
  transform: scale(1.06);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.logo-tagline {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-tertiary);
  font-family: var(--font-body);
}

/* Primary Nav */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  font-family: var(--font-display);
}

.primary-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.primary-nav a.is-active,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
  color: var(--accent);
  background: var(--accent-bg);
}

/* Header Action Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 40px; height: 52px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.icon-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.icon-btn svg {
  width: 20px; height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Mobile Menu Toggle */
.mobile-toggle { display: none; }


/* ============================================
   3. SEARCH OVERLAY
   ============================================ */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26,24,20,0.55);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.search-overlay.is-active {
  opacity: 1;
  pointer-events: all;
}

.search-box {
  width: 90%;
  max-width: 600px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  transform: translateY(-20px) scale(0.98);
  transition: transform var(--transition);
}

.search-overlay.is-active .search-box {
  transform: translateY(0) scale(1);
}

.search-box input[type="search"],
.search-box input[type="text"] {
  width: 100%;
  border: none;
  outline: none;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 18px;
  background: transparent;
  color: var(--text-primary);
  direction: rtl;
}

.search-box input::placeholder {
  color: var(--text-tertiary);
}


/* ============================================
   4. MOBILE NAV
   ============================================ */
/* v3 cleanup: .mobile-nav container rules removed — handled by #hk-nav-fix (inline <style id="hk-nav-fix">) */

/* v3 safety: hide overlay globally (only shown at mobile breakpoints via #hk-nav-fix) */
.hk-overlay { display: none; }



.mobile-nav a {
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  transition: background var(--transition);
  display: block;
}

.mobile-nav a:hover { background: var(--bg-secondary); }


/* ============================================
   5. HERO / FEATURED SECTION
   ============================================ */
.hero-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 2rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

/* Main featured */
.hero-main {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 16/10;
}

.hero-main a {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-main:hover img { transform: scale(1.03); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,24,20,0.88) 0%, rgba(26,24,20,0.2) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  pointer-events: none;
}

.category-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-display);
  margin-bottom: 12px;
  width: fit-content;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1.55;
  margin-bottom: 8px;
}

.hero-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-meta svg {
  width: 14px; height: 14px;
}

/* Sidebar featured */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-side-card {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 0;
}

.hero-side-card a {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-side-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-side-card:hover img { transform: scale(1.04); }

.hero-side-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,24,20,0.88) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  pointer-events: none;
}

.hero-side-overlay .category-badge {
  font-size: 11px;
  padding: 3px 10px;
  margin-bottom: 8px;
}

.hero-side-overlay .hero-title {
  font-size: 16px;
  line-height: 1.65;
}


/* ============================================
   6. CURATED COLLECTIONS
   ============================================ */
.collections-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 2rem 0;
}

.collections-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 1.25rem;
}

.collection-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.collection-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Image-based collection cards */
.collection-img {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-secondary);
}

.collection-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
  filter: brightness(0.65) saturate(0.85);
}

.collection-card:hover .collection-img img {
  transform: scale(1.08);
  filter: brightness(0.75) saturate(1);
}

/* Fallback letter icon when no image */
.collection-icon-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  font-size: 48px;
  font-family: var(--font-serif);
  color: var(--accent);
  font-weight: 700;
}

/* Hide old icon class if present */
.collection-icon { display: none; }

.collection-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.9rem 1rem 4px;
}

.collection-count {
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 0 1rem 1rem;
}


/* ============================================
   7. SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}

.section-link:hover { gap: 8px; }

.section-link svg {
  width: 14px; height: 14px;
}


/* ============================================
   8. CONTENT LAYOUT (Main + Sidebar)
   ============================================ */
.content-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 3rem;
}


/* ============================================
   9. ARTICLE CARDS — uniform aspect ratio
   ============================================ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.article-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.article-card a {
  display: block;
}

.article-card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-secondary);
}

.article-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.article-card:hover .article-card-img img {
  transform: scale(1.05);
}

.article-card-body {
  padding: 1.25rem;
}

.article-card-cat {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-display);
  margin-bottom: 8px;
}

.article-card-cat a {
  color: var(--accent);
}

.article-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-title a {
  color: var(--text-primary);
}

.article-card-title a:hover {
  color: var(--accent);
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.article-card-meta .reading-time {
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-card-meta svg {
  width: 12px; height: 12px;
}


/* ============================================
   10. SIDEBAR
   ============================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--accent);
}

/* Most Read */
.most-read-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity var(--transition);
}

.most-read-item:last-child { border-bottom: none; }
.most-read-item:hover { opacity: 0.75; }

.most-read-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  min-width: 32px;
}

.most-read-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.most-read-title a { color: var(--text-primary); }
.most-read-title a:hover { color: var(--accent); }

.most-read-cat {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 4px;
}

/* Newsletter Block */
.newsletter-block {
  background: var(--accent) !important;
  border: none !important;
  color: #fff;
}

.newsletter-block .sidebar-title {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

.newsletter-desc {
  font-size: 13px;
  line-height: 1.7;
  opacity: 0.85;
  margin-bottom: 14px;
}

.newsletter-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 14px;
  outline: none;
  margin-bottom: 10px;
  transition: border-color var(--transition);
}

.newsletter-input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-input:focus { border-color: rgba(255,255,255,0.6); }

.newsletter-btn {
  width: 100%;
  padding: 12px;
  background: #fff;
  color: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity var(--transition);
}

.newsletter-btn:hover { opacity: 0.9; }

/* Tags Cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: var(--font-display);
  transition: all var(--transition);
}

.tag-pill:hover {
  background: var(--accent-bg);
  color: var(--accent);
}


/* ============================================
   11. STANFORD ENCYCLOPEDIA BANNER
   ============================================ */
.stanford-banner {
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2.5rem;
}

.stanford-banner h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.stanford-banner p {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 500px;
}

.stanford-btn {
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.stanford-btn:hover { opacity: 0.85; }


/* ============================================
   12. LOAD MORE (replaces old pagination)
   ============================================ */
.load-more-wrap {
  text-align: center;
  margin-top: 2rem;
}

.load-more-btn {
  padding: 14px 40px;
  background: transparent;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
}

.load-more-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
}

/* Hide default WP pagination when load-more is active */
.pagination,
.nav-links {
  display: none !important;
}


/* ============================================
   13. SINGLE ARTICLE PAGE
   ============================================ */

/* Breadcrumb */
.article-breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem;
  font-size: 13px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-breadcrumb a {
  color: var(--text-secondary);
}

.article-breadcrumb a:hover { color: var(--accent); }
.article-breadcrumb .sep { opacity: 0.4; }

/* Article Header */
.article-header {
  max-width: var(--reading-width);
  margin: 1rem auto 0;
  text-align: center;
}

.article-header-cat {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-display);
  margin-bottom: 1.25rem;
}

.article-header h1,
.article-header .entry-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.article-header-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
}

.article-header-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-header-meta svg {
  width: 14px; height: 14px;
}

/* Featured Image */
.article-hero-img,
.single .post-thumbnail {
  max-width: 900px;
  margin: 0 auto 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
}

.article-hero-img img,
.single .post-thumbnail img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.image-credit {
  text-align: center;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: -1.5rem;
  margin-bottom: 2rem;
}

/* Article Layout: TOC + Body + Share */
.article-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, var(--reading-width)) 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Table of Contents */
.article-toc {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  max-height: calc(100vh - var(--header-height) - 40px);
  overflow-y: auto;
  padding-left: 1rem;
}

.toc-heading {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.toc-list li {
  margin-bottom: 6px;
  padding-right: 12px;
  border-right: 2px solid transparent;
  transition: border-color var(--transition);
}

.toc-list li.is-active { border-color: var(--accent); }

.toc-list a {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-tertiary);
  transition: color var(--transition);
  display: block;
}

.toc-list li.is-active a {
  color: var(--accent);
  font-weight: 500;
}

.toc-list a:hover { color: var(--text-primary); }

/* Article Body */
.article-body,
.entry-content {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 2;
  color: var(--text-primary);
}

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

.article-body h2,
.entry-content h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  line-height: 1.6;
}

.article-body h3,
.entry-content h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  line-height: 1.6;
}

.article-body blockquote,
.entry-content blockquote {
  border-right: 3px solid var(--accent);
  border-left: none;
  padding-right: 1.5rem;
  padding-left: 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-body a,
.entry-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body a:hover,
.entry-content a:hover {
  color: var(--accent-hover);
}

/* Author / Translator Card */
.article-authors-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 2rem;
  font-family: var(--font-body);
}

.author-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}

.author-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-display);
}

/* Share Buttons (sticky sidebar) */
.article-share {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 0.5rem;
}

.share-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  font-family: var(--font-display);
  writing-mode: vertical-rl;
  margin-bottom: 4px;
}

.share-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
}

.share-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
}

.share-btn svg {
  width: 16px; height: 16px;
}


/* ============================================
   14. RELATED ARTICLES
   ============================================ */
.related-section {
  max-width: var(--reading-width);
  margin: 3rem auto 0;
  padding: 2rem 2rem 0;
  border-top: 2px solid var(--border);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 1rem;
}

.related-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition);
}

.related-card:hover { transform: translateY(-2px); }

.related-card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.related-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.related-card-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
  margin-top: 10px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-title a { color: var(--text-primary); }
.related-card-title a:hover { color: var(--accent); }


/* ============================================
   15. FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand .logo-mark { background: var(--accent); }
.footer-brand .logo-text { color: #fff; }
.footer-brand .logo-tagline { color: rgba(255,255,255,0.4); }

.footer-desc {
  font-size: 14px;
  line-height: 1.8;
  margin-top: 16px;
  color: rgba(255,255,255,0.5);
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.footer-links li { margin-bottom: 10px; }

.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}

.footer-links a:hover { color: #fff; }

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.social-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.social-icon:hover { background: var(--accent); }

.social-icon svg {
  width: 18px; height: 18px;
  fill: rgba(255,255,255,0.6);
}

.social-icon:hover svg { fill: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}


/* ============================================
   16. BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 44px; height: 44px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 50;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.back-to-top svg {
  width: 20px; height: 20px;
}


/* ============================================
   17. ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.6s ease forwards;
  opacity: 0;
}

.fade-up:nth-child(1) { animation-delay: 0.05s; }
.fade-up:nth-child(2) { animation-delay: 0.1s; }
.fade-up:nth-child(3) { animation-delay: 0.15s; }
.fade-up:nth-child(4) { animation-delay: 0.2s; }
.fade-up:nth-child(5) { animation-delay: 0.25s; }
.fade-up:nth-child(6) { animation-delay: 0.3s; }


/* ============================================
   18. RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .article-layout {
    grid-template-columns: 1fr;
    max-width: var(--reading-width);
  }

  .article-toc { display: none; }

  .article-share {
    position: static;
    flex-direction: row;
    justify-content: center;
    margin-bottom: 1.5rem;
  }

  .share-label { writing-mode: horizontal-tb; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .collections-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .primary-nav { display: none; }
  .mobile-toggle { display: flex; }

  .header-inner {
    height: 64px;
    padding: 0 1.25rem;
  }

  .hero-section,
  .collections-section,
  .content-section {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-sidebar {
    flex-direction: row;
  }

  .hero-main { aspect-ratio: 16/9; }

  .hero-title { font-size: 20px; }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .stanford-banner {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .collections-grid {
    grid-template-columns: 1fr 1fr;
  }

  .article-header h1,
  .article-header .entry-title {
    font-size: 24px;
  }

  .article-body,
  .entry-content {
    font-size: 17px;
  }

  .article-authors-card {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero-sidebar {
    flex-direction: column;
  }

  .collections-grid {
    grid-template-columns: 1fr;
  }

  .article-header-meta {
    flex-direction: column;
    gap: 8px;
  }
}


/* ============================================
   19. WORDPRESS OVERRIDES
   — Reset any inherited parent-theme styles
   ============================================ */

/* Remove WP default gallery margins */
.wp-block-gallery { margin: 0; }

/* Override WP navigation classes if present */
.wp-site-blocks { padding: 0; }

/* Ensure WP admin bar doesn't break sticky header */
.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

/* Reset WP default table styles in articles */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.entry-content table td,
.entry-content table th {
  padding: 10px 14px;
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 14px;
}

.entry-content table th {
  background: var(--bg-secondary);
  font-weight: 600;
}


/* ============================================
   20. LOGO IMAGE
   ============================================ */
.logo-img {
  height: 64px;
  width: auto;
  display: block;
  transition: opacity var(--transition);
}

.site-logo:hover .logo-img {
  opacity: 0.85;
}

/* Hide old letter-mark elements if they still appear */
.logo-mark,
.logo-text,
.logo-tagline {
  display: none;
}

/* Footer logo - keep the text version in footer */
.footer-brand .site-logo {
  gap: 16px;
}

.footer-brand .logo-mark {
  display: flex;
  flex-shrink: 0;
}

.footer-brand .logo-text {
  display: block;
  margin-bottom: 2px;
}

.footer-brand .logo-tagline {
  display: block;
}

.footer-brand .logo-img {
  display: none;
}

.footer-brand .logo-slogan {
  display: none;
}


/* ============================================
   21. COLLECTION CARD IMAGES
   ============================================ */
.collection-card {
  position: relative;
  overflow: hidden;
  padding: 0 !important;
}

.collection-img {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-secondary);
}

.collection-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: brightness(0.75) saturate(0.85);
}

.collection-card:hover .collection-img img {
  transform: scale(1.08);
  filter: brightness(0.85) saturate(1);
}

.collection-icon-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  font-size: 48px;
  font-family: var(--font-serif);
  color: var(--accent);
  font-weight: 700;
}

.collection-card .collection-name {
  padding: 1rem 1rem 4px;
}

.collection-card .collection-count {
  padding: 0 1rem 1rem;
}

.collection-icon { display: none; }


/* ============================================
   22. iPHONE / MOBILE SIDEBAR FIX
   ============================================ */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Sidebar stacks below content on tablet/mobile */
  .sidebar {
    order: 2;
    width: 100%;
    max-width: 100%;
  }

  .sidebar-block {
    width: 100%;
  }

  /* Newsletter input full width on mobile */
  .newsletter-input {
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* Fix sidebar blocks not properly fitting on iPhone */
  .sidebar {
    padding: 0;
    gap: 1.25rem;
  }

  .sidebar-block {
    margin: 0;
    border-radius: var(--radius-md);
    padding: 1rem;
    overflow: hidden;
  }

  /* Tags cloud wraps properly on small screens */
  .tags-cloud {
    gap: 6px;
  }

  .tag-pill {
    padding: 5px 12px;
    font-size: 11px;
  }

  /* Most read items stack cleanly */
  .most-read-item {
    gap: 10px;
    padding: 8px 0;
  }

  .most-read-num {
    font-size: 24px;
    min-width: 28px;
  }

  .most-read-title {
    font-size: 13px;
  }

  /* Newsletter block width fix */
  .newsletter-block {
    padding: 1.25rem !important;
  }

  /* Logo size on mobile */
  .logo-img {
    height: 40px;
  }

  /* Collections grid 2-col on mobile */
  .collections-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .collection-card .collection-name {
    font-size: 13px;
    padding: 0.75rem 0.75rem 2px;
  }

  .collection-card .collection-count {
    font-size: 11px;
    padding: 0 0.75rem 0.75rem;
  }
}

@media (max-width: 480px) {
  /* iPhone SE and small screens */
  .content-section {
    padding: 1.5rem 1rem;
  }

  .hero-section,
  .collections-section {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .sidebar-block {
    border-radius: var(--radius-sm);
  }

  /* Stack collections to 1 column on very small screens */
  .collections-grid {
    grid-template-columns: 1fr 1fr;
  }

  .articles-grid {
    gap: 14px;
  }

  .article-card-body {
    padding: 1rem;
  }

  .article-card-title {
    font-size: 14px;
  }

  /* Fix sidebar overflow on iPhone */
  .sidebar,
  .sidebar-block,
  .most-read-item,
  .tags-cloud {
    overflow-x: hidden;
    word-wrap: break-word;
  }
}


/* ============================================
   23. LOGO SLOGAN
   ============================================ */
.site-logo {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-slogan {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  border-right: 2px solid var(--accent);
  padding-right: 20px;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .logo-slogan {
    display: none;
  }
}


/* ============================================
   24. HEKMAH BOOKS SECTION
   ============================================ */
.books-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 2rem 0;
}

.books-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.books-scroll::-webkit-scrollbar {
  height: 4px;
}

.books-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.books-scroll::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

.book-card {
  flex: 0 0 180px;
  scroll-snap-align: start;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform var(--transition);
}

.book-card:hover {
  transform: translateY(-4px);
}

.book-cover {
  width: 180px;
  height: 260px;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: 4px 4px 16px rgba(0,0,0,0.2), 0 0 1px rgba(0,0,0,0.1);
  transition: box-shadow var(--transition);
  background: var(--bg-secondary);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.book-card:hover .book-cover img {
  transform: scale(1.03);
}

.book-spine,
.book-title-overlay {
  display: none;
}

.book-card:hover .book-cover {
  box-shadow: 6px 6px 24px rgba(0,0,0,0.3);
}

.book-spine {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: rgba(0,0,0,0.25);
}



.book-info {
  padding: 12px 4px 0;
}

.book-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.book-author {
  font-size: 12px;
  color: var(--text-tertiary);
}

@media (max-width: 768px) {
  .books-section {
    padding: 2rem 1.25rem 0;
  }

  .book-card {
    flex: 0 0 150px;
  }

  .book-cover {
    width: 150px;
    height: 220px;
  }

  

  .book-name {
    font-size: 12px;
  }
}


/* ============================================
   25. iPHONE MOBILE NAV — proper dropdown
   ============================================ */
@media (max-width: 768px) {
  /* v3 cleanup: .mobile-nav container rules removed — handled by #hk-nav-fix */


  .mobile-nav a {
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    transition: background 0.2s ease;
    display: block;
    border-bottom: 1px solid var(--border);
  }

  .mobile-nav a:last-child {
    border-bottom: none;
  }

  .mobile-nav a:hover,
  .mobile-nav a:active {
    background: var(--bg-secondary);
  }

  .mobile-nav .current-menu-item > a,
  .mobile-nav .current_page_item > a {
    color: var(--accent);
    background: var(--accent-bg);
  }

  /* Prevent body scroll when menu is open */
  body.mobile-nav-open {
    overflow: hidden;
  }
}

/* ============================================
   26. HIDE AUTHOR BOX
   ============================================ */
.article-authors-card,
.author-box,
.about-author,
.entry-author,
.post-author-box {
  display: none !important;
}


/* ============================================
   27. STANFORD STANDALONE SECTION
   ============================================ */
.stanford-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 2rem 0;
}

@media (max-width: 768px) {
  .stanford-section {
    padding: 1.5rem 1.25rem 0;
  }

  .stanford-banner {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }

  .stanford-banner h3 {
    font-size: 18px;
  }
}


/* ============================================
   28. iPHONE MOBILE MENU — full dropdown list
   ============================================ */
@media (max-width: 768px) {
  /* Override any old mobile-nav rules */
  /* v3 cleanup: .mobile-nav container rules removed — handled by #hk-nav-fix */


  .mobile-nav a,
  .mobile-nav li a,
  .mobile-nav .menu-item a {
    display: block !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    font-family: var(--font-display) !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: 0 !important;
    text-align: right !important;
    transition: background 0.2s ease !important;
    text-decoration: none !important;
  }

  .mobile-nav a:last-child,
  .mobile-nav li:last-child a {
    border-bottom: none !important;
  }

  .mobile-nav a:active {
    background: var(--bg-secondary) !important;
  }

  .mobile-nav .current-menu-item > a,
  .mobile-nav .current_page_item > a {
    color: var(--accent) !important;
    background: var(--accent-bg) !important;
  }

  /* Ensure hamburger is always visible */
  .mobile-toggle {
    display: flex !important;
  }

  /* Lock body scroll when menu open */
  body.nav-open {
    overflow: hidden !important;
  }
}

/* ============================================
   29. HIDE SIDEBAR BOOKS CTA
   ============================================ */
.sidebar-block:has(a[href*="jarir"]),
.sidebar .sidebar-block:last-child:has(.sidebar-title) {
  display: none !important;
}


/* ============================================
   30. FORCE SLOGAN VISIBLE ON ALL SCREENS
   ============================================ */
.logo-slogan {
  display: inline !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 768px) {
  .logo-slogan {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 10px !important;
    padding-right: 12px !important;
    border-right-width: 1.5px !important;
    white-space: nowrap !important;
  }

  .site-logo {
    gap: 12px !important;
  }

  .logo-img {
    height: 44px !important;
  }
}

@media (max-width: 480px) {
  .logo-slogan {
    display: inline !important;
    font-size: 9px !important;
    padding-right: 10px !important;
  }

  .site-logo {
    gap: 10px !important;
  }

  .logo-img {
    height: 38px !important;
  }
}


/* ============================================
   31. FOOTER LOGO SPACING
   ============================================ */
.footer-brand .site-logo {
  gap: 16px;
}

.footer-brand .logo-mark {
  display: flex;
  margin-left: 8px;
}

.footer-brand .logo-text {
  display: block;
  margin-bottom: 2px;
}

.footer-brand .logo-tagline {
  display: block;
}

.footer-desc {
  margin-top: 20px;
}


/* ============================================
   32. HIDE AUTHOR NAME IN ARTICLE META
   ============================================ */
.article-header-meta span:first-child,
.hero-meta span:first-child {
  display: none !important;
}

/* Also hide the separator dot after the hidden author */
.hero-meta span:nth-child(2) {
  display: none !important;
}

/* Hide author in article cards too */
.article-card-meta .author-name,
.post-author {
  display: none !important;
}


/* ============================================
   33. STANFORD SECTION — excerpt style
   ============================================ */
.stanford-excerpt {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.9;
  color: rgba(255,255,255,0.7);
  margin: 1rem 0 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 700px;
}

.stanford-banner {
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: right !important;
}

.stanford-banner h3 {
  margin-bottom: 4px;
}

.stanford-btn {
  align-self: flex-start;
}

@media (max-width: 768px) {
  .stanford-banner {
    align-items: center !important;
    text-align: center !important;
  }

  .stanford-btn {
    align-self: center;
  }

  .stanford-excerpt {
    font-size: 14px;
    -webkit-line-clamp: 6;
  }
}


/* ============================================
   37. FOOTER LOGO + TEXT SPACING (final)
   ============================================ */
.footer-brand .site-logo {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
}

.footer-brand .footer-logo-img {
  margin-left: 16px !important;
}

.footer-brand > .site-logo > div {
  margin-right: 4px;
}


/* ============================================
   38. HIDE IMAGE ALT TEXT / CAPTIONS / DESCRIPTIONS
   ============================================ */
.wp-caption-text,
.wp-caption .wp-caption-text,
figcaption,
figure figcaption,
.blocks-gallery-caption,
.entry-content figcaption,
.article-body figcaption,
.wp-block-image figcaption,
.gallery-caption,
.image-credit,
.wp-caption p,
.attachment-caption,
.wp-element-caption {
  display: none !important;
}


/* ============================================
   39. STANFORD SECTION RESET — simple banner
   ============================================ */
.stanford-section .stanford-banner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  text-align: right;
}

.stanford-section .stanford-banner p {
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 500px;
  font-size: 14px;
}

.stanford-excerpt {
  display: none !important;
}

@media (max-width: 768px) {
  .stanford-section .stanford-banner {
    flex-direction: column !important;
    text-align: center !important;
  }
}


/* ============================================
   40. NEWSLETTER FORM ACTIVE STYLES
   ============================================ */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsletter-success {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  padding: 10px 0;
  display: none;
}

.newsletter-success.show {
  display: block;
}


/* ============================================
   41. FOOTER LOGO + TEXT SPACING (final fix)
   ============================================ */
.footer-brand .site-logo {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
}

.footer-brand .footer-logo-img {
  margin-left: 16px !important;
}


/* ============================================
   42. HIDE ALL IMAGE CAPTIONS / ALT TEXT / DESCRIPTIONS
   ============================================ */
.wp-caption-text,
.wp-caption .wp-caption-text,
figcaption,
figure figcaption,
.blocks-gallery-caption,
.entry-content figcaption,
.article-body figcaption,
.wp-block-image figcaption,
.gallery-caption,
.image-credit,
.wp-caption p,
.attachment-caption,
.wp-element-caption {
  display: none !important;
}


/* ============================================
   43. NEWSLETTER FORM STYLES
   ============================================ */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsletter-success {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  padding: 10px 0;
  display: none;
}

.newsletter-success.show {
  display: block;
}

.newsletter-error {
  font-size: 12px;
  color: #ff9999;
  display: none;
}

.newsletter-error.show {
  display: block;
}


/* ============================================
   41. HIDE ALL IMAGE ALT TEXT / CAPTIONS IN POSTS
   ============================================ */
.wp-caption-text,
.wp-caption .wp-caption-text,
figcaption,
figure figcaption,
.blocks-gallery-caption,
.entry-content figcaption,
.article-body figcaption,
.wp-block-image figcaption,
.gallery-caption,
.image-credit,
.wp-caption p,
.attachment-caption,
.wp-element-caption,
.post-thumbnail-caption,
img + figcaption,
.wp-block-image .wp-element-caption,
.tiled-gallery-caption {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}


/* ============================================
   41. HIDE IMAGE ALT TEXT DISPLAY IN POSTS
   ============================================ */
img[alt]::after {
  display: none !important;
}

.wp-caption-text,
figcaption,
figure figcaption,
.blocks-gallery-caption,
.entry-content figcaption,
.article-body figcaption,
.wp-block-image figcaption,
.gallery-caption,
.image-credit,
.wp-element-caption,
.wp-caption p,
.attachment-caption {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

/* WP sometimes renders alt as a visible tooltip-like element */
.article-body img + span,
.entry-content img + span,
.article-body figure > span,
.entry-content figure > span {
  display: none !important;
}


/* ============================================
   42. MOBILE SHARE BAR — top of article on iPhone
   ============================================ */
.mobile-share-bar {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-share-bar {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
  }

  .mobile-share-bar .share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
  }

  .mobile-share-bar .share-btn:hover,
  .mobile-share-bar .share-btn:active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-bg);
  }

  .mobile-share-bar .share-btn svg {
    width: 15px;
    height: 15px;
  }

  /* Hide the sidebar share column on mobile */
  .article-share {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .mobile-share-bar {
    gap: 6px;
  }

  .mobile-share-bar .share-btn {
    width: 34px;
    height: 34px;
  }

  .mobile-share-bar .share-btn svg {
    width: 14px;
    height: 14px;
  }
}


/* ===== ARCHIVE PAGINATION ===== */
.archive-pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
}
.archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 .75rem;
  border: 1.5px solid var(--color-border, #e5e0d6);
  border-radius: 6px;
  font-family: var(--font-body, 'IBM Plex Sans Arabic', sans-serif);
  font-size: .95rem;
  color: var(--color-text, #2c2416);
  text-decoration: none;
  transition: background .18s, color .18s, border-color .18s;
}
.archive-pagination .page-numbers:hover {
  background: var(--color-gold, #C4960A);
  color: #fff;
  border-color: var(--color-gold, #C4960A);
}
.archive-pagination .page-numbers.current {
  background: var(--color-gold, #C4960A);
  color: #fff;
  border-color: var(--color-gold, #C4960A);
  font-weight: 600;
  pointer-events: none;
}
.archive-pagination .page-numbers.dots {
  border: none;
  pointer-events: none;
}


/* ===== ARCHIVE PAGINATION ===== */
.archive-pagination {
  margin: 3rem 0 2rem;
  text-align: center;
  direction: rtl;
}
.archive-pagination .page-numbers {
  display: inline-block;
  padding: .45rem .9rem;
  margin: .2rem;
  border: 1.5px solid var(--color-gold, #C4960A);
  border-radius: 5px;
  color: var(--color-gold, #C4960A);
  text-decoration: none;
  font-family: var(--font-body, 'IBM Plex Sans Arabic', sans-serif);
  font-size: .9rem;
  transition: background .2s, color .2s;
  line-height: 1.4;
}
.archive-pagination .page-numbers:hover {
  background: var(--color-gold, #C4960A);
  color: #fff;
}
.archive-pagination .page-numbers.current {
  background: var(--color-gold, #C4960A);
  color: #fff;
  font-weight: 600;
}
.archive-pagination .page-numbers.dots {
  border: none;
  color: #999;
  padding: .45rem .3rem;
}
.archive-pagination .prev.page-numbers,
.archive-pagination .next.page-numbers {
  font-weight: 600;
  letter-spacing: .02em;
}

/* ===== ARCHIVE PAGINATION ===== */
.archive-pagination { margin-top: 3rem; display: flex; justify-content: center; }
.archive-pagination ul.page-numbers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: center;
}
.archive-pagination ul.page-numbers li { margin: 0; padding: 0; }
.archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 .75rem;
  border: 1px solid var(--color-border, #e0d8c8);
  border-radius: 6px;
  color: var(--color-text, #2c2c2c);
  text-decoration: none;
  font-size: .9rem;
  transition: background .2s, color .2s;
}
.archive-pagination .page-numbers:hover {
  background: var(--color-gold, #C4960A);
  color: #fff;
  border-color: var(--color-gold, #C4960A);
}
.archive-pagination .page-numbers.current {
  background: var(--color-gold, #C4960A);
  color: #fff;
  border-color: var(--color-gold, #C4960A);
  font-weight: 700;
  pointer-events: none;
}
.archive-pagination .page-numbers.dots {
  border: none;
  background: none;
  pointer-events: none;
}


/* ============================================
   44. COMMENTS SECTION
   ============================================ */
.hekmah-comments-section {
    max-width: var(--reading-width);
    margin: 3rem auto 0;
    padding: 2rem 2rem 3rem;
    border-top: 2px solid var(--border);
}

/* Comments Header */
.comments-header {
    margin-bottom: 2rem;
}

.comments-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

/* Comment List */
.comment-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.comment-list li {
    list-style: none !important;
}

.comment-list .children {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 0 0 0 !important;
    padding-right: 2rem !important;
    border-right: 2px solid var(--border);
}

/* Individual Comment */
.hekmah-comment {
    margin-bottom: 1.5rem;
    list-style: none !important;
}

.hekmah-comment .comment-body {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: border-color var(--transition);
}

.hekmah-comment .comment-body:hover {
    border-color: var(--border-strong);
}

/* Comment Meta (avatar + author info) */
.comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.comment-author-avatar {
    flex-shrink: 0;
}

.comment-author-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.comment-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.comment-author-name {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-author-name a {
    color: var(--text-primary);
    text-decoration: none;
}

.comment-author-name a:hover {
    color: var(--accent);
}

.comment-date {
    font-size: 12px;
    color: var(--text-tertiary);
    font-family: var(--font-body);
}

/* Comment Content */
.comment-content {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.comment-content p {
    margin-bottom: 0.75rem;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.comment-awaiting-moderation {
    background: var(--accent-bg);
    color: var(--accent);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-display);
    margin-bottom: 0.75rem;
}

/* Comment Actions */
.comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.reply-link a,
.edit-link a {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.reply-link a:hover,
.edit-link a:hover {
    background: var(--accent);
    color: #fff;
}

/* No Comments Message */
.no-comments-msg {
    text-align: center;
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--text-tertiary);
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

/* ============================================
   45. COMMENT FORM
   ============================================ */
.hekmah-comment-respond {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.hekmah-comment-respond .comment-reply-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.hekmah-comment-respond .comment-reply-title small {
    display: block;
    margin-top: 4px;
}

.hekmah-comment-respond .comment-reply-title small a {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
}

.hekmah-comment-respond .comment-reply-title small a:hover {
    text-decoration: underline;
}

/* Form fields */
.comment-form-field,
.hekmah-comment-respond .comment-form-comment,
.hekmah-comment-respond .comment-form-author,
.hekmah-comment-respond .comment-form-email,
.hekmah-comment-respond .comment-form-url {
    margin-bottom: 1.25rem;
}

.comment-form-field label,
.hekmah-comment-respond label {
    display: block;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.comment-form-field textarea,
.hekmah-comment-respond textarea {
    width: 100%;
    min-height: 140px;
    padding: 14px 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    resize: vertical;
    transition: border-color var(--transition), box-shadow var(--transition);
    direction: rtl;
}

.comment-form-field textarea:focus,
.hekmah-comment-respond textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.1);
}

.hekmah-comment-respond input[type="text"],
.hekmah-comment-respond input[type="email"],
.hekmah-comment-respond input[type="url"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
    direction: rtl;
}

.hekmah-comment-respond input[type="text"]:focus,
.hekmah-comment-respond input[type="email"]:focus,
.hekmah-comment-respond input[type="url"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.1);
}

/* Submit Button */
.hekmah-submit-btn,
.hekmah-comment-respond .form-submit .submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
}

.hekmah-submit-btn:hover,
.hekmah-comment-respond .form-submit .submit:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Logged-in as notice */
.hekmah-comment-respond .logged-in-as {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 1.25rem;
    font-family: var(--font-body);
}

.hekmah-comment-respond .logged-in-as a {
    color: var(--accent);
    text-decoration: none;
}

.hekmah-comment-respond .logged-in-as a:hover {
    text-decoration: underline;
}

/* Comments Navigation */
.comment-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.comment-navigation a {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.comment-navigation a:hover {
    border-color: var(--accent);
    background: var(--accent-bg);
}

/* Cookie consent checkbox */
.hekmah-comment-respond .comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.hekmah-comment-respond .comment-form-cookies-consent label {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-tertiary);
    margin-bottom: 0;
}

.hekmah-comment-respond .comment-form-cookies-consent input[type="checkbox"] {
    accent-color: var(--accent);
}

/* Responsive Comments */
@media (max-width: 768px) {
    .hekmah-comments-section {
        padding: 1.5rem 1.25rem 2rem;
        margin-top: 2rem;
    }

    .comments-title {
        font-size: 18px;
    }

    .comment-list .children {
        padding-right: 1rem !important;
    }

    .hekmah-comment .comment-body {
        padding: 1rem;
    }

    .comment-author-avatar img {
        width: 40px;
        height: 40px;
    }

    .comment-content {
        font-size: 14px;
    }

    .hekmah-comment-respond .comment-reply-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .hekmah-comments-section {
        padding: 1rem 1rem 1.5rem;
    }

    .comment-meta {
        gap: 8px;
    }

    .comment-author-avatar img {
        width: 36px;
        height: 36px;
    }

    .comment-author-name {
        font-size: 13px;
    }

    .comment-date {
        font-size: 11px;
    }

    .comment-actions {
        gap: 10px;
    }

    .reply-link a,
    .edit-link a {
        font-size: 11px;
        padding: 3px 10px;
    }
}


/* ============================================================
   Nav dropdown — pillar pages under فلسفة
   Anchored to the <a> height (43px), not the stretched <li>
   ============================================================ */

/* li is the position context */
.primary-nav .menu-item {
  position: relative;
}

/* Sub-menu: hidden, pinned 48px from top of li = below the <a> link */
.primary-nav .sub-menu {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 48px;
  right: 0;
  left: auto;
  min-width: 196px;
  padding: 6px 0;
  list-style: none;
  background: var(--bg-primary, #fff);
  border: 1px solid rgba(0,0,0,.09);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.11);
  z-index: 9999;
  transition: opacity .15s ease, visibility .15s ease;
}

/* Show on hover / keyboard focus */
.primary-nav .menu-item:hover > .sub-menu,
.primary-nav .menu-item:focus-within > .sub-menu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Sub-menu list items */
.primary-nav .sub-menu li {
  display: block;
  position: static;
}

/* Sub-menu links */
.primary-nav .sub-menu a {
  display: block;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-primary);
  white-space: nowrap;
  border-radius: 0;
  background: transparent;
  transition: background .12s, color .12s;
  font-family: var(--font-display);
}

.primary-nav .sub-menu a:hover {
  color: var(--accent);
  background: var(--bg-secondary);
}

/* Small chevron on the parent link */
.primary-nav .menu-item-has-children > a::after {
  content: " \25BE";
  font-size: 10px;
  opacity: .5;
  display: inline-block;
  margin-right: 2px;
  transition: transform .15s;
}

.primary-nav .menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
}

/* Dark mode */
[data-theme="dark"] .primary-nav .sub-menu {
  background: var(--bg-primary);
  border-color: rgba(255,255,255,.1);
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
}

/* ================================================
   Pagination Fix — category/archive pages
   ================================================ */
nav.archive-pagination {
    display: flex !important;
    justify-content: center;
    padding: 2rem 0 3rem;
    width: 100%;
}

nav.archive-pagination ul {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

nav.archive-pagination ul li {
    display: list-item !important;
}

.page-numbers {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.6rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: var(--font-body, inherit);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    border: 1px solid var(--color-border, #e0e0e0);
    background: #fff;
    color: var(--color-text, #333);
}

.page-numbers:hover {
    background: var(--color-primary, #8B6914);
    color: #fff;
    border-color: var(--color-primary, #8B6914);
}

.page-numbers.current {
    display: inline-flex !important;
    background: var(--color-primary, #8B6914) !important;
    color: #fff !important;
    border-color: var(--color-primary, #8B6914) !important;
    font-weight: 700;
    pointer-events: none;
}

.page-numbers.dots {
    border: none;
    background: transparent;
    pointer-events: none;
    color: var(--color-text-muted, #888);
}

.page-numbers.prev,
.page-numbers.next {
    font-weight: 600;
    padding: 0 1rem;
}
/* ===== WCAG AA Contrast Fixes ===== */
.article-header-meta,
.article-header-meta span,
.article-header-meta svg,
.article-header-meta a,
.article-breadcrumb,
.article-breadcrumb span,
.article-breadcrumb a {
    color: #3d3832 !important;
}
.site-tagline,
.site-description,
header [class*="tagline"] {
    color: #3d3832 !important;
}
.site-footer .copyright,
.footer-bottom,
[class*="copyright"] {
    color: rgba(255,255,255,0.65) !important;
}
.site-footer a,
.footer-grid a {
    color: rgba(255,255,255,0.85) !important;
}
.wp-block-jetpack-subscriptions-container button,
.jetpack_subscription_widget .pushbutton-wide,
.wp-block-jetpack-subscriptions-container a.wp-block-button__link {
    color: #fff !important;
}

/* ===== LOGO SIZE FIX (Apr 10 2026) ===== */
.logo-img img {
  max-height: 50px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ===== DUPLICATE H1 FIX — Jetpack Subscribe Overlay ===== */
.jetpack-subscribe-overlay h1,
.jetpack-subscribe-overlay .wp-block-site-title {
  font-size: inherit;
  display: none !important;
}


/* ============================================
   /* ===== v4 FINAL SAFETY OVERRIDES — Mobile Nav Drawer (permanent, safe) ===== */

/* Global overlay kill — search overlay excluded (handled by its own id) */
.hk-overlay { display: none !important; }

/* ===== BASE STATE (all viewports): hide drawer completely when NOT open ===== */
#mobile-nav {
  position: fixed !important;
  top: 0 !important;
  right: -100% !important;
  left: auto !important;
  bottom: 0 !important;
  width: 85% !important;
  max-width: 340px !important;
  height: 100vh !important;
  max-height: 100vh !important;
  background: var(--bg-primary, #fff) !important;
  z-index: 9999 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  transition: right 0.3s ease, visibility 0.3s ease !important;
  visibility: hidden !important;
  transform: none !important;
  box-shadow: none !important;
  pointer-events: none !important;
  padding: 1rem !important;
  display: block !important;
}

/* RTL: drawer slides in from RIGHT (Arabic site). LTR fallback also supported. */
html[dir="ltr"] #mobile-nav {
  right: auto !important;
  left: -100% !important;
  transition: left 0.3s ease, visibility 0.3s ease !important;
}

/* ===== OPEN STATE: any of .open / .is-open / .active / .visible classes ===== */
#mobile-nav.open,
#mobile-nav.is-open,
#mobile-nav.active,
#mobile-nav.visible,
body.mobile-nav-open #mobile-nav {
  right: 0 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.15) !important;
}
html[dir="ltr"] #mobile-nav.open,
html[dir="ltr"] #mobile-nav.is-open,
html[dir="ltr"] #mobile-nav.active,
html[dir="ltr"] #mobile-nav.visible,
html[dir="ltr"] body.mobile-nav-open #mobile-nav {
  left: 0 !important;
  right: auto !important;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15) !important;
}

/* ===== DESKTOP (>= 1025px): hide drawer entirely ===== */
@media (min-width: 1025px) {
  #mobile-nav,
  #mobile-nav.open,
  #mobile-nav.is-open,
  #mobile-nav.active,
  #mobile-nav.visible {
    display: none !important;
    visibility: hidden !important;
    right: -100% !important;
    left: auto !important;
    pointer-events: none !important;
  }
}

/* ===== KILL PAGE-DIMMING SHADOW (no dark overlay blocking clicks) ===== */
body.mobile-nav-open::after,
body.mobile-nav-open::before,
body::after,
body::before {
  content: none !important;
  display: none !important;
  background: transparent !important;
  background-color: transparent !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Ensure clicks pass through on menu items */
#mobile-nav a,
#mobile-nav button,
#mobile-nav * {
  pointer-events: auto !important;
}

/* Prevent body scroll lock from blocking taps elsewhere */
body.mobile-nav-open {
  overflow: hidden !important;
}
/* ===== end v4 ===== */
