/* ==========================================================================
   علم يُنتفع به - بوابة علماء الحرمين الشريفين
   Design System: Traditional Islamic Elegance with Modern Simplicity
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cairo:wght@300;400;600;700;800;900&family=Reem+Kufi:wght@500;700&display=swap');

:root {
  /* Al-Haram Day Palette (الألوان الأصلية المستوحاة من رخام وزخارف الحرمين) */
  --bg-main: #f8f6f0;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f3ede2;
  --bg-accent: #e9decb;
  
  --primary-emerald: #0f3d2e;
  --primary-deep: #08261c;
  --primary-light: #1b5e47;
  
  --gold-primary: #bfa054;
  --gold-light: #d8be78;
  --gold-dark: #987b32;
  --gold-gradient: linear-gradient(135deg, #d8be78 0%, #bfa054 50%, #8c6e26 100%);
  --gold-subtle: rgba(191, 160, 84, 0.12);
  --gold-border: rgba(191, 160, 84, 0.35);

  --text-main: #1d2522;
  --text-muted: #57645f;
  --text-light: #818f8a;
  --text-gold: #a67c25;
  
  --makkah-badge-bg: rgba(191, 160, 84, 0.15);
  --makkah-badge-text: #8e681c;
  --madinah-badge-bg: rgba(15, 61, 46, 0.12);
  --madinah-badge-text: #0f3d2e;

  --shadow-sm: 0 2px 8px rgba(15, 61, 46, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 61, 46, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 61, 46, 0.12);
  --shadow-gold: 0 8px 25px rgba(191, 160, 84, 0.25);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-arch: 28px 28px 14px 14px;

  --font-heading: 'Amiri', 'Traditional Arabic', serif;
  --font-kufi: 'Reem Kufi', sans-serif;
  --font-body: 'Cairo', system-ui, sans-serif;

  --transition-smooth: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ليل الحرم الشريف (Night / Dark Mode) */
body.night-mode {
  --bg-main: #0c1514;
  --bg-surface: #121e1d;
  --bg-card: #152523;
  --bg-subtle: #1c302d;
  --bg-accent: #233b37;

  --primary-emerald: #1e6b52;
  --primary-deep: #091a16;
  --primary-light: #2c8c6c;

  --gold-primary: #d4b46a;
  --gold-light: #e6cb8f;
  --gold-dark: #b39243;
  --gold-subtle: rgba(212, 180, 106, 0.15);
  --gold-border: rgba(212, 180, 106, 0.35);

  --text-main: #f0f4f2;
  --text-muted: #abb8b3;
  --text-light: #7a8b85;
  --text-gold: #e2c073;

  --makkah-badge-bg: rgba(212, 180, 106, 0.2);
  --makkah-badge-text: #e6cb8f;
  --madinah-badge-bg: rgba(44, 140, 108, 0.25);
  --madinah-badge-text: #7cd9ba;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 45px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  direction: rtl;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
}

/* خلفية الزخرفة الإسلامية الدقيقة الهندسية */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(191, 160, 84, 0.03) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L45 15L30 30L15 15zM0 30L15 45L0 60L-15 45zM60 30L75 45L60 60L45 45zM30 60L45 75L30 90L15 75z' stroke='%23bfa054' stroke-width='0.4' fill='none' stroke-opacity='0.12'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

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

input {
  font-family: inherit;
  outline: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gold-border);
  transition: var(--transition-smooth);
}

body.night-mode .site-header {
  background-color: rgba(18, 30, 29, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-emblem {
  width: 48px;
  height: 48px;
  background: var(--gold-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(191, 160, 84, 0.3);
  position: relative;
}

.brand-emblem svg {
  width: 26px;
  height: 26px;
  fill: #ffffff;
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--primary-emerald);
  line-height: 1.1;
  letter-spacing: -0.3px;
}

body.night-mode .brand-text h1 {
  color: var(--gold-light);
}

.brand-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--bg-subtle);
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.nav-btn:hover {
  background-color: var(--gold-subtle);
  border-color: var(--gold-border);
  color: var(--gold-dark);
}

body.night-mode .nav-btn:hover {
  color: var(--gold-light);
}

.nav-btn.fav-btn {
  position: relative;
}

.badge-count {
  background: var(--primary-emerald);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  margin-right: 4px;
}

body.night-mode .badge-count {
  background: var(--gold-primary);
  color: #0c1514;
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  font-size: 1.15rem;
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  background: var(--gold-subtle);
  transform: rotate(15deg);
}

/* ==========================================================================
   Hero Section - Majestic Islamic Banner
   ========================================================================== */
.hero-section {
  position: relative;
  padding-block: 3.5rem 2.5rem;
  overflow: hidden;
}

.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gold-border);
  min-height: 440px;
  display: flex;
  align-items: center;
  background-color: var(--primary-deep);
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.65) saturate(1.15);
  transition: transform 10s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(8, 38, 28, 0.92) 0%,
    rgba(8, 38, 28, 0.75) 45%,
    rgba(191, 160, 84, 0.25) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 2.5rem;
  max-width: 800px;
  color: #ffffff;
}

.hadith-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(191, 160, 84, 0.22);
  border: 1px solid var(--gold-light);
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.85rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

.hero-title span {
  color: var(--gold-light);
  display: block;
}

.hero-desc {
  font-size: 1.1rem;
  color: #e4e9e6;
  margin-bottom: 2rem;
  line-height: 1.8;
  max-width: 660px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 15px;
  margin-top: 1rem;
}

.stat-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(216, 190, 120, 0.3);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(6px);
  text-align: center;
  transition: var(--transition-smooth);
}

.stat-item:hover {
  background: rgba(191, 160, 84, 0.2);
  transform: translateY(-3px);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: #cfd8d4;
  margin-top: 4px;
}

/* ==========================================================================
   Pearl of the Day (درة اليوم التفاعلية)
   ========================================================================== */
.pearl-section {
  margin-bottom: 2.5rem;
}

.pearl-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.pearl-card::before {
  content: '“';
  position: absolute;
  top: -15px;
  right: 15px;
  font-family: var(--font-heading);
  font-size: 8rem;
  color: var(--gold-subtle);
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}

.pearl-content {
  position: relative;
  z-index: 1;
  flex: 1;
}

.pearl-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-dark);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

body.night-mode .pearl-tag {
  color: var(--gold-light);
}

.pearl-quote {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.pearl-scholar {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.pearl-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.pearl-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.pearl-btn:hover {
  background: var(--gold-primary);
  color: #fff;
  transform: translateY(-2px);
}

/* ==========================================================================
   Search & Filter Hub
   ========================================================================== */
.filter-hub {
  margin-bottom: 2.5rem;
}

.search-bar-wrap {
  position: relative;
  margin-bottom: 1.25rem;
}

.search-input {
  width: 100%;
  padding: 16px 52px 16px 20px;
  background-color: var(--bg-card);
  border: 2px solid var(--gold-border);
  border-radius: var(--radius-lg);
  font-size: 1.05rem;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-gold);
}

.search-icon {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  color: var(--gold-dark);
  font-size: 1.25rem;
  pointer-events: none;
}

body.night-mode .search-icon {
  color: var(--gold-light);
}

.search-clear-btn {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-muted);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: var(--transition-smooth);
}

.search-clear-btn:hover {
  background: var(--primary-emerald);
  color: #fff;
}

/* Filter Tabs */
.filter-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 85px;
}

.filter-chip {
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  color: var(--text-main);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-chip:hover {
  border-color: var(--gold-primary);
  background: var(--gold-subtle);
}

.filter-chip.active {
  background: var(--primary-emerald);
  color: #ffffff;
  border-color: var(--primary-emerald);
  box-shadow: 0 4px 12px rgba(15, 61, 46, 0.25);
}

body.night-mode .filter-chip.active {
  background: var(--gold-gradient);
  color: #08261c;
  border-color: transparent;
}

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Scholars Grid & Cards (الطراز المعماري الإسلامي)
   ========================================================================== */
.scholars-section {
  margin-bottom: 4rem;
}

.scholars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 26px;
}

/* Scholar Card with Islamic Arch Style */
.scholar-card {
  background: var(--bg-card);
  border-radius: var(--radius-arch);
  border: 1px solid var(--gold-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.scholar-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-primary);
}

/* بطانة علوية مقوسة كالمحراب */
.card-header-arch {
  height: 90px;
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary-light) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 20px;
}

body.night-mode .card-header-arch {
  background: linear-gradient(135deg, #091a16 0%, #153229 100%);
}

.card-header-arch::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0L30 10L20 20L10 10zM0 20L10 30L0 40L-10 30zM40 20L50 30L40 40L30 30zM20 40L30 50L20 60L10 50z' stroke='%23d8be78' stroke-width='0.4' fill='none' stroke-opacity='0.25'/%3E%3C/svg%3E");
  pointer-events: none;
}

.haram-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-deep);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.card-fav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  z-index: 2;
}

.card-fav-btn:hover,
.card-fav-btn.active {
  background: #ffffff;
  color: #d93838;
}

/* ميدالية الحرف / الرمز */
.card-medallion-wrap {
  margin-top: -45px;
  padding-inline: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: relative;
  z-index: 3;
}

.scholar-medallion {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--gold-light);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--primary-emerald);
}

body.night-mode .scholar-medallion {
  color: var(--gold-light);
  background: var(--bg-surface);
}

.scholar-dates {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-gold);
  background: var(--gold-subtle);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--gold-border);
}

.card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.scholar-name {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 4px;
  line-height: 1.3;
}

body.night-mode .scholar-name {
  color: #ffffff;
}

.scholar-honorific {
  font-size: 0.85rem;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 12px;
}

body.night-mode .scholar-honorific {
  color: var(--gold-light);
}

.scholar-seat-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  line-height: 1.5;
}

.scholar-seat-info svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  fill: var(--gold-dark);
}

body.night-mode .scholar-seat-info svg {
  fill: var(--gold-light);
}

.scholar-short-bio {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scholar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.tag-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--gold-border);
  padding-top: 14px;
  margin-top: auto;
}

.btn-view-bio {
  flex: 1;
  padding: 10px 14px;
  background: var(--primary-emerald);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-view-bio:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 61, 46, 0.25);
}

body.night-mode .btn-view-bio {
  background: var(--gold-gradient);
  color: #08261c;
}

body.night-mode .btn-view-bio:hover {
  opacity: 0.95;
}

.btn-quick-audio {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gold-border);
  background: var(--bg-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--gold-border);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  fill: var(--gold-dark);
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-state h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary-deep);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
}

/* ==========================================================================
   Historical Sanctuaries Feature Section (خريطة أروقة ومجالس الحرمين)
   ========================================================================== */
.sanctuaries-section {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold-border);
  padding: 3rem 2.5rem;
  margin-bottom: 4rem;
  box-shadow: var(--shadow-md);
}

.section-head {
  text-align: center;
  max-width: 650px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
}

.section-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-dark);
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

body.night-mode .section-badge {
  color: var(--gold-light);
}

.section-head h2 {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  color: var(--primary-deep);
  margin-bottom: 0.5rem;
}

body.night-mode .section-head h2 {
  color: #ffffff;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1rem;
}

.sanctuaries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.sanctuary-box {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition-smooth);
}

.sanctuary-box:hover {
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-sm);
}

.sanctuary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gold-border);
}

.sanctuary-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
}

.sanctuary-header h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--primary-deep);
}

body.night-mode .sanctuary-header h3 {
  color: var(--gold-light);
}

.sanctuary-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.spot-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spot-item {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  background: var(--bg-subtle);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.spot-name {
  font-weight: 700;
  color: var(--primary-emerald);
  margin-bottom: 3px;
}

body.night-mode .spot-name {
  color: var(--gold-light);
}

.spot-detail {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ==========================================================================
   Modal Dialog (نافذة السيرة العطرة التفاعلية)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 26, 20, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-card);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold-primary);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 24px 28px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(90deg);
}

.modal-scholar-intro {
  display: flex;
  align-items: center;
  gap: 18px;
}

.modal-medallion {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--gold-light);
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
}

body.night-mode .modal-medallion {
  color: var(--gold-light);
  background: var(--bg-surface);
}

.modal-title-group h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  line-height: 1.2;
}

.modal-title-group span {
  font-size: 0.88rem;
  color: var(--gold-light);
  display: block;
  margin-top: 4px;
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--gold-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.modal-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 14px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: var(--gold-dark);
}

.tab-btn.active {
  color: var(--primary-emerald);
  border-bottom-color: var(--gold-primary);
  background: var(--bg-card);
}

body.night-mode .tab-btn.active {
  color: var(--gold-light);
}

/* Modal Body */
.modal-body {
  padding: 26px 28px;
  overflow-y: auto;
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.8;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.info-block {
  margin-bottom: 22px;
}

.info-block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--primary-deep);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--gold-border);
}

body.night-mode .info-block-title {
  color: var(--gold-light);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.work-card {
  background: var(--bg-subtle);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.work-card h4 {
  color: var(--primary-emerald);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

body.night-mode .work-card h4 {
  color: var(--gold-light);
}

.work-card p {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill-item {
  background: var(--bg-subtle);
  border: 1px solid var(--gold-border);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-main);
}

/* Modal Audio Player Widget */
.audio-player-box {
  background: var(--bg-subtle);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.audio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.audio-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.play-toggle-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-emerald);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(15, 61, 46, 0.3);
  transition: var(--transition-smooth);
}

.play-toggle-btn:hover {
  transform: scale(1.06);
  background: var(--primary-light);
}

body.night-mode .play-toggle-btn {
  background: var(--gold-gradient);
  color: #08261c;
}

.audio-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.audio-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold-primary);
  border-radius: 4px;
  transition: width 0.15s linear;
}

.audio-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Favorites Drawer (قائمة العلماء المحفوظة)
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border-right: 1px solid var(--gold-border);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.35);
  z-index: 1001;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.drawer-backdrop.active ~ .drawer,
.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--primary-deep);
}

body.night-mode .drawer-header h3 {
  color: var(--gold-light);
}

.drawer-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.drawer-item {
  background: var(--bg-subtle);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.drawer-item-info h4 {
  font-size: 0.95rem;
  color: var(--primary-emerald);
  cursor: pointer;
}

body.night-mode .drawer-item-info h4 {
  color: var(--gold-light);
}

.drawer-item-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.drawer-remove-btn {
  color: #c54a4a;
  padding: 6px;
  font-size: 1.1rem;
  border-radius: 6px;
}

.drawer-remove-btn:hover {
  background: rgba(197, 74, 74, 0.1);
}

/* ==========================================================================
   Toast Notification (إشعارات النسخ والتفاعل)
   ========================================================================== */
.toast-notice {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: var(--primary-deep);
  color: #fff;
  border: 1px solid var(--gold-light);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--primary-deep);
  color: #ffffff;
  border-top: 2px solid var(--gold-primary);
  padding-block: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

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

.footer-brand h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: #c9d6d1;
  font-size: 0.95rem;
  line-height: 1.8;
  max-width: 440px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #abb8b3;
  font-size: 0.88rem;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--gold-light);
  padding-right: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(191, 160, 84, 0.25);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: #8b9e97;
}

.footer-dua {
  color: var(--gold-light);
  font-weight: 600;
}

/* Back to Top Floating Button */
.back-to-top {
  position: fixed;
  bottom: 25px;
  left: 25px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gold-primary);
  color: #0c2b20;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: var(--transition-smooth);
  z-index: 90;
}

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

.back-to-top:hover {
  background: var(--gold-light);
  transform: translateY(-3px);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
/* ==========================================================================
   Hero Call to Action Buttons
   ========================================================================== */
.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 1.75rem;
  margin-bottom: 2rem;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--gold-gradient);
  color: #08261c;
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(191, 160, 84, 0.4);
  transition: var(--transition-smooth);
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(191, 160, 84, 0.55);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid var(--gold-border);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  transition: var(--transition-smooth);
}

.btn-hero-secondary:hover {
  background: rgba(191, 160, 84, 0.25);
  border-color: var(--gold-light);
  transform: translateY(-2px);
}

/* Header Nav Links */
.header-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
}

.nav-link-item a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: var(--transition-smooth);
}

.nav-link-item a:hover {
  color: var(--gold-dark);
  border-bottom-color: var(--gold-primary);
}

body.night-mode .nav-link-item a {
  color: var(--text-muted);
}

body.night-mode .nav-link-item a:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold-light);
}

/* ==========================================================================
   About Waqf Section (عن الوقف والرؤية والرسالة)
   ========================================================================== */
.about-waqf-section {
  padding-block: 2.5rem 3.5rem;
}

.about-intro-card {
  background: var(--bg-surface);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.about-intro-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--gold-gradient);
}

.about-intro-text {
  font-size: 1.15rem;
  line-height: 2;
  color: var(--text-main);
  margin-bottom: 2rem;
  font-family: var(--font-heading);
}

.vision-mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.vm-card {
  background: var(--bg-subtle);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition-smooth);
}

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

.vm-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.vm-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
}

.vm-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  color: var(--primary-deep);
  font-weight: 700;
}

body.night-mode .vm-title {
  color: var(--gold-light);
}

.vm-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ==========================================================================
   What We Offer Section (ماذا نقدّم؟)
   ========================================================================== */
.offerings-section {
  padding-block: 2rem 3.5rem;
}

.offerings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 2rem;
}

.offer-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.offer-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.offer-card.highlight {
  border: 2px solid var(--gold-primary);
  background: linear-gradient(180deg, var(--gold-subtle) 0%, var(--bg-card) 40%);
}

.offer-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--primary-deep);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

body.night-mode .offer-icon-box {
  background: var(--bg-subtle);
  border: 1px solid var(--gold-border);
}

.offer-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--primary-deep);
  margin-bottom: 8px;
}

body.night-mode .offer-card h3 {
  color: #ffffff;
}

.offer-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ==========================================================================
   Content Methodology Section (منهجنا في إعداد المحتوى)
   ========================================================================== */
.methodology-section {
  padding-block: 2.5rem 3.5rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.method-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  text-align: center;
  transition: var(--transition-smooth);
}

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

.method-badge {
  display: inline-block;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.method-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 6px;
}

body.night-mode .method-title {
  color: var(--gold-light);
}

.method-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.method-callout {
  background: var(--bg-subtle);
  border-right: 4px solid var(--gold-primary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.8;
  display: flex;
  align-items: center;
  gap: 12px;
}

.method-callout span:first-child {
  font-size: 1.4rem;
}

/* ==========================================================================
   Contribute / Suggest Section (ساهم في نشر العلم)
   ========================================================================== */
.contribute-section {
  margin-bottom: 4rem;
}

.contribute-box {
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary-light) 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  border: 1px solid var(--gold-primary);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.contribute-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='50' height='50' viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M25 0L37.5 12.5L25 25L12.5 12.5zM0 25L12.5 37.5L0 50L-12.5 37.5zM50 25L62.5 37.5L50 50L37.5 37.5zM25 50L37.5 62.5L25 75L12.5 62.5z' stroke='%23d8be78' stroke-width='0.4' fill='none' stroke-opacity='0.15'/%3E%3C/svg%3E");
  pointer-events: none;
}

.contribute-content {
  max-width: 650px;
  position: relative;
  z-index: 1;
}

.contribute-content h2 {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}

.contribute-content p {
  font-size: 1rem;
  color: #dbe4e0;
  line-height: 1.8;
}

.contribute-btns {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.btn-suggest {
  padding: 12px 22px;
  background: var(--gold-gradient);
  color: #08261c;
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.btn-suggest:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(191, 160, 84, 0.4);
}

.btn-contact {
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.btn-contact:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* ==========================================================================
   Suggestion Modal Form
   ========================================================================== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--gold-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--gold-subtle);
}

.btn-submit-suggest {
  width: 100%;
  padding: 12px;
  background: var(--primary-emerald);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-md);
  font-size: 1rem;
  margin-top: 8px;
  transition: var(--transition-smooth);
}

.btn-submit-suggest:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

body.night-mode .btn-submit-suggest {
  background: var(--gold-gradient);
  color: #08261c;
}

/* Entities & References List in Scholar Modal */
.entity-card {
  background: var(--bg-subtle);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.entity-card h4 {
  font-size: 0.95rem;
  color: var(--primary-emerald);
  margin-bottom: 2px;
}

body.night-mode .entity-card h4 {
  color: var(--gold-light);
}

.entity-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

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

.ref-item {
  font-size: 0.88rem;
  color: var(--text-main);
  padding: 8px 12px;
  background: var(--bg-subtle);
  border-radius: 6px;
  border-right: 3px solid var(--gold-primary);
}

/* Scope Badge on Cards */
.scope-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--gold-subtle);
  color: var(--gold-dark);
  border: 1px solid var(--gold-border);
}

body.night-mode .scope-badge {
  color: var(--gold-light);
}

@media (max-width: 992px) {
  .hero-title {
    font-size: 2.3rem;
  }
  .header-nav-links {
    display: none;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 66px;
  }
  .brand-text h1 {
    font-size: 1.35rem;
  }
  .hero-section {
    padding-block: 1.5rem 1.5rem;
  }
  .hero-content {
    padding: 2rem 1.25rem;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .hero-desc {
    font-size: 0.95rem;
  }
  .pearl-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .scholars-grid {
    grid-template-columns: 1fr;
  }
  .modal-dialog {
    max-height: 94vh;
  }
  .modal-header {
    padding: 16px 18px;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-scholar-intro {
    gap: 12px;
  }
  .modal-medallion {
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
  }
  .modal-title-group h2 {
    font-size: 1.35rem;
  }
}

/* ==========================================================================
   أهداف الوقف (Waqf Goals Block from Docx)
   ========================================================================== */
.waqf-goals-block {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--gold-border);
}

.goals-head {
  text-align: center;
  margin-bottom: 24px;
}

.goals-sub-badge {
  display: inline-block;
  padding: 4px 14px;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  color: var(--gold-dark);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.goals-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--primary-emerald);
  margin-bottom: 6px;
}

body.night-mode .goals-title {
  color: var(--gold-light);
}

.goals-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 650px;
  margin-inline: auto;
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.goal-item-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(191, 160, 84, 0.22);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

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

.goal-item-full {
  grid-column: 1 / -1;
}

.goal-number-badge {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gold-gradient);
  color: #08261c;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(191, 160, 84, 0.3);
}

.goal-item-content h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--primary-emerald);
  margin-bottom: 4px;
}

body.night-mode .goal-item-content h4 {
  color: var(--gold-light);
}

.goal-item-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ==========================================================================
   شريط البحث والترتيب (Search & Sorting Controls)
   ========================================================================== */
.search-and-sort-container {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 860px;
  margin: 0 auto 24px auto;
}

.search-and-sort-container .search-bar-wrap {
  flex: 1;
  margin: 0;
  max-width: none;
}

.sort-control-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.sort-icon {
  font-size: 1.1rem;
  color: var(--gold-dark);
}

.sort-select {
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  direction: rtl;
}

.sort-select option {
  background: var(--bg-card);
  color: var(--text-main);
}

/* ==========================================================================
   قسم المصادر العلمية (Scientific Sources Section from Docx)
   ========================================================================== */
.sources-section {
  padding-block: 4.5rem 4.5rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--gold-border);
  position: relative;
}

.sources-filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2rem;
}

.source-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid rgba(191, 160, 84, 0.28);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.source-filter-btn:hover {
  border-color: var(--gold-primary);
  color: var(--text-main);
  transform: translateY(-1px);
}

.source-filter-btn.active {
  background: var(--primary-emerald);
  border-color: var(--primary-emerald);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 61, 46, 0.25);
}

body.night-mode .source-filter-btn.active {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  color: #08261c;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.source-card {
  background: var(--bg-card);
  border: 1px solid rgba(191, 160, 84, 0.25);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.source-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 3px;
  background: var(--gold-gradient);
  border-radius: 0 0 3px 3px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.source-card:hover::after {
  opacity: 1;
}

.source-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.source-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-subtle);
  color: var(--gold-dark);
  border: 1px solid var(--gold-border);
}

.source-scholar {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.source-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--primary-emerald);
  margin-bottom: 10px;
  line-height: 1.45;
}

body.night-mode .source-title {
  color: var(--gold-light);
}

.source-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 18px;
  flex: 1;
}

.source-footer {
  border-top: 1px solid rgba(191, 160, 84, 0.15);
  padding-top: 14px;
}

.source-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  color: var(--primary-emerald);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

body.night-mode .source-link-btn {
  color: var(--gold-light);
}

.source-link-btn:hover {
  background: var(--gold-primary);
  color: #08261c;
  border-color: var(--gold-primary);
}

.source-link-btn.audio-btn {
  background: var(--gold-subtle);
  color: var(--gold-dark);
}

body.night-mode .source-link-btn.audio-btn {
  color: var(--gold-light);
}

/* ==========================================================================
   شريط إجراءات نافذة السيرة (Modal Action Bar)
   ========================================================================== */
.modal-action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 24px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--gold-border);
  flex-wrap: wrap;
}

.modal-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-act-btn:hover {
  background: var(--gold-primary);
  color: #08261c;
  border-color: var(--gold-primary);
}

.modal-act-btn.highlight {
  background: var(--gold-subtle);
  color: var(--gold-dark);
  border-color: var(--gold-primary);
}

body.night-mode .modal-act-btn.highlight {
  color: var(--gold-light);
}

/* ==========================================================================
   قسم تواصل معنا (Contact Us Section from Docx)
   ========================================================================== */
.contact-section {
  padding-block: 4.5rem 4.5rem;
  background: var(--bg-main);
  border-top: 1px solid var(--gold-border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 28px;
  align-items: start;
}

.contact-cards-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(191, 160, 84, 0.22);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

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

.contact-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.contact-card-text h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--primary-emerald);
  margin-bottom: 4px;
}

body.night-mode .contact-card-text h4 {
  color: var(--gold-light);
}

.contact-email-link {
  display: inline-block;
  color: var(--gold-dark);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
  text-decoration: none;
  direction: ltr;
}

body.night-mode .contact-email-link {
  color: var(--gold-light);
}

.contact-card-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.contact-form-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  color: var(--primary-emerald);
  margin-bottom: 6px;
}

body.night-mode .contact-form-title {
  color: var(--gold-light);
}

.contact-form-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn-submit-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 24px;
  background: var(--gold-gradient);
  border: none;
  border-radius: var(--radius-sm);
  color: #08261c;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: var(--transition-smooth);
}

.btn-submit-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(191, 160, 84, 0.4);
}

/* التجاوب للشاشات الصغيرة */
@media (max-width: 992px) {
  .goals-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .search-and-sort-container {
    flex-direction: column;
    align-items: stretch;
  }
  .sort-control-wrap {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .form-row-grid {
    grid-template-columns: 1fr;
  }
  .modal-action-bar {
    justify-content: center;
  }
}

/* ==========================================================================
   شعار الوقف (Waqf Official Logo in Header & Footer)
   ========================================================================== */
.site-logo-container {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--gold-border);
  box-shadow: 0 4px 12px rgba(15, 61, 46, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 3px;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.site-logo-container:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(191, 160, 84, 0.3);
  border-color: var(--gold-primary);
}

.site-header-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.footer-logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 10px;
  padding: 3px;
  border: 1px solid var(--gold-border);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

/* ==========================================================================
   بطاقة التوثيق والتسجيل الوقفي (Waqf Registration Block)
   ========================================================================== */
.waqf-registration-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-right: 4px solid var(--gold-primary);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.waqf-registration-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gold-primary);
}

.reg-seal-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.reg-details {
  flex: 1;
}

.reg-header-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.reg-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--primary-emerald);
  margin-bottom: 0;
}

body.night-mode .reg-title {
  color: var(--gold-light);
}

.reg-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--gold-gradient);
  color: #08261c;
}

.reg-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.reg-tag {
  background: var(--bg-subtle);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(191, 160, 84, 0.2);
}

.reg-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

.btn-view-deed {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  color: var(--primary-emerald);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

body.night-mode .btn-view-deed {
  color: var(--gold-light);
}

.btn-view-deed:hover {
  background: var(--gold-gradient);
  color: #08261c;
  border-color: var(--gold-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(191, 160, 84, 0.25);
}

/* تفاصيل نافذة صك الوقف الشرعي */
.deed-header-summary {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gold-border);
}

.deed-badge-line {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.deed-official-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--gold-border);
}

.deed-official-badge.gold {
  background: var(--gold-gradient);
  color: #08261c;
  border: none;
}

.deed-main-name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--primary-emerald);
  margin-bottom: 6px;
}

body.night-mode .deed-main-name {
  color: var(--gold-light);
}

.deed-intro-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-inline: auto;
}

.deed-table-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.deed-field-item {
  background: var(--bg-subtle);
  border: 1px solid rgba(191, 160, 84, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
}

.deed-field-item.deed-full {
  grid-column: 1 / -1;
}

.df-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: 4px;
}

body.night-mode .df-label {
  color: var(--gold-light);
}

.df-val {
  display: block;
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.55;
}

.deed-purposes-list {
  list-style: none;
  padding: 0;
  margin-top: 6px;
}

.deed-purposes-list li {
  position: relative;
  padding-right: 18px;
  margin-bottom: 6px;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.deed-purposes-list li::before {
  content: '✦';
  position: absolute;
  right: 0;
  color: var(--gold-primary);
  font-size: 0.8rem;
}

.deed-quote {
  background: rgba(191, 160, 84, 0.1);
  border-right: 4px solid var(--gold-primary);
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 6px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.6;
}

@media (max-width: 650px) {
  .deed-table-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   المتجر والمبيعات الوقفية (Store & Merchandise Card)
   ========================================================================== */
.offer-card.store-card {
  border-style: dashed;
  border-color: var(--gold-primary);
  background: linear-gradient(to bottom, var(--bg-card), var(--bg-subtle));
}

.store-status-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-subtle);
  color: var(--gold-dark);
  border: 1px solid var(--gold-border);
}

body.night-mode .store-status-badge {
  color: var(--gold-light);
}

/* ==========================================================================
   إشارة الموقع الرسمي والأيقونات في كرت السيرة الذاتية
   ========================================================================== */
.scholar-meta-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.scholar-origin-info,
.scholar-seat-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.meta-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.card-official-site-row {
  margin: 6px 0 10px 0;
}

.card-official-site-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  color: var(--primary-emerald);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-smooth);
}

body.night-mode .card-official-site-badge {
  color: var(--gold-light);
}

.card-official-site-badge:hover {
  background: var(--gold-gradient);
  color: #08261c;
  border-color: var(--gold-primary);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(191, 160, 84, 0.25);
}

.card-works-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--gold-dark);
  background: var(--bg-subtle);
  padding: 5px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
  border: 1px solid rgba(191, 160, 84, 0.2);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.night-mode .card-works-preview {
  color: var(--gold-light);
}

.tag-pill .tag-icon {
  margin-left: 2px;
  font-size: 0.8rem;
}

.tag-pill.entity-pill {
  color: var(--gold-dark);
  font-weight: 700;
}

body.night-mode .tag-pill.entity-pill {
  color: var(--gold-light);
}

/* ==========================================================================
   بانر المنصة الرسمية داخل المودال (Modal Official Banner)
   ========================================================================== */
.modal-official-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.mob-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mob-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.mob-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--primary-emerald);
  margin-bottom: 2px;
}

body.night-mode .mob-title {
  color: var(--gold-light);
}

.mob-url {
  font-size: 0.78rem;
  color: var(--text-muted);
  direction: ltr;
  display: block;
}

.mob-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--primary-emerald);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-smooth);
}

body.night-mode .mob-btn {
  background: var(--gold-primary);
  color: #08261c;
}

.mob-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* زر الطباعة */
.modal-act-btn.print-btn:hover {
  background: var(--primary-emerald);
  color: #ffffff;
  border-color: var(--primary-emerald);
}

/* ==========================================================================
   إعدادات الطباعة الاحترافية للسيرة الذاتية (Print Media Styles)
   ========================================================================== */
@media print {
  header.site-header,
  footer.site-footer,
  .hero-section,
  .pearl-section,
  .about-waqf-section,
  .offerings-section,
  .methodology-section,
  .filter-hub,
  .scholars-section,
  .sources-section,
  .sanctuaries-section,
  .contribute-section,
  .contact-section,
  .drawer-backdrop,
  .drawer,
  .back-to-top,
  .toast-notice,
  .modal-close-btn,
  .modal-action-bar,
  .modal-tabs,
  .audio-player-box {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #111111 !important;
    font-size: 11pt !important;
    line-height: 1.6 !important;
  }

  .modal-backdrop {
    position: static !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
  }

  .modal-dialog {
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .modal-header {
    border-bottom: 2px solid #bfa054 !important;
    padding-bottom: 15px !important;
    margin-bottom: 20px !important;
  }

  .modal-header::before {
    content: "وقف علمٍ يُنتفع به — السيرة العطرة الموثقة";
    display: block;
    font-size: 14pt;
    font-weight: bold;
    color: #0f3d2e;
    margin-bottom: 8px;
    font-family: 'Amiri', serif;
  }

  .modal-body .tab-content {
    display: block !important;
    margin-bottom: 25px !important;
    page-break-inside: avoid;
  }

  .info-block {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    padding: 12px 16px !important;
    margin-bottom: 14px !important;
  }

  .info-block-title {
    color: #0f3d2e !important;
    border-bottom: 1px solid #bfa054 !important;
    padding-bottom: 4px !important;
    font-size: 13pt !important;
  }

  .work-card, .entity-card {
    border: 1px solid #cccccc !important;
    background: #fafafa !important;
    page-break-inside: avoid;
  }
}

