/* ====================================================
   ذاكرة موريتانيا — v6
   ==================================================== */

/* ── Fonts ───────────────────────────────────────────── */
/* خط Tajawal من Google Fonts — خط احتياطي عربي أنيق */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');

/* خط اليمامة — يُحمَّل من الخادم إن توفّر، وإلا يُستخدم Tajawal */
@font-face {
  font-family: 'Alyamama';
  src: url('/fonts/Alyamama.woff2') format('woff2'),
       url('/fonts/Alyamama.woff') format('woff');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

/* ── Reset & Variables ─────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Heritage Palette — صحراء وذهب وزمرد */
  --primary:      #1b3d2f;
  --primary-light:#2a5c45;
  --gold:         #c8992e;
  --gold-light:   #e8c06a;
  --gold-pale:    #f5e8c0;
  --dark:         #0c1a12;
  --sand:         #f7f2e8;
  --sand-deep:    #ede5d0;
  --cream:        #faf7f0;
  --red:          #7a1515;
  --text:         #1e2620;
  --text-light:   #4a5550;
  --card-bg:      #ffffff;
  --border:       #ddd5b8;
  --border-light: #ece8d9;
  --muted:        #7a8078;
  --radius:       14px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --shadow-xs:    0 1px 4px rgba(12,26,18,.06);
  --shadow:       0 4px 20px rgba(12,26,18,.10);
  --shadow-md:    0 8px 32px rgba(12,26,18,.14);
  --shadow-lg:    0 16px 56px rgba(12,26,18,.18);
  --transition:   all .28s cubic-bezier(.4,0,.2,1);
  --pattern-color: rgba(200,153,46,.08);

  /* Font stacks — Alyamama (محلي) → Tajawal (Google) → fallbacks */
  --font-arabic:  'Alyamama', 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  --font-heading: 'Alyamama', 'Tajawal', 'Amiri', Georgia, serif;
}
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-arabic);
  background: var(--cream);
  color: var(--text);
  direction: rtl;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
  font-size: 15px;
}

/* Arabic decorative font for headings */
h1, h2, h3, h4, .hero h2, .tl-year, .site-title h1 {
  font-family: var(--font-heading);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Decorative pattern overlay ──────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, var(--pattern-color) 1px, transparent 1px),
    radial-gradient(circle at 80% 80%, var(--pattern-color) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── Header ─────────────────────────────────────────── */
header {
  background: linear-gradient(160deg, var(--dark) 0%, #0f2a1d 50%, var(--primary) 100%);
  color: #fff;
  border-bottom: 1px solid rgba(200,153,46,.4);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 4px 30px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
}

/* Gold shimmer line at very top */
header::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-light), var(--gold), var(--gold-light), transparent);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 12px;
}

.logo-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; flex-shrink: 0; }

.logo-icon {
  width: 46px; height: 46px; min-width: 46px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--dark);
  box-shadow: 0 0 0 3px rgba(200,153,46,.25), 0 4px 16px rgba(200,153,46,.35);
  transition: var(--transition);
}
.logo-icon:hover { transform: rotate(10deg) scale(1.05); }

.site-title h1 {
  font-size: 16px; font-weight: 700; white-space: nowrap;
  background: linear-gradient(90deg, #fff 60%, var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.site-title p  { font-size: 10px; opacity: .55; display: none; color: var(--gold-pale); }

/* ── Live Search in header ───────────────────────────── */
.header-search {
  flex: 1;
  max-width: 380px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 9px 40px 9px 16px;
  border: 1.5px solid rgba(200,153,46,.25);
  border-radius: 50px;
  background: rgba(255,255,255,.07);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: var(--transition);
  letter-spacing: .01em;
}

.header-search input::placeholder { color: rgba(255,255,255,.4); }
.header-search input:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,.13);
  box-shadow: 0 0 0 3px rgba(200,153,46,.15);
}

.header-search .search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.5);
  font-size: 13px;
  pointer-events: none;
  transition: color .2s;
}
.header-search input:focus ~ .search-icon { color: var(--gold); }

/* Autocomplete */
.search-drop {
  position: absolute;
  top: calc(100% + 10px); right: 0; left: 0;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  overflow: hidden;
  display: none;
  direction: rtl;
  max-height: 380px;
  overflow-y: auto;
}

.search-drop.show { display: block; animation: fadeDown .2s ease; }

.drop-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background .15s;
}
.drop-item:last-child { border: none; }
.drop-item:hover { background: var(--sand); }
.drop-item .d-icon { color: var(--gold); width: 20px; text-align: center; flex-shrink: 0; font-size: 14px; }
.drop-item .d-label { font-weight: 600; }
.drop-item .d-type  { font-size: 10px; color: var(--muted); background: var(--sand); padding: 2px 8px; border-radius: 4px; margin-right: auto; flex-shrink: 0; }
.drop-section { padding: 8px 16px; font-size: 10px; font-weight: 700; color: var(--muted); background: var(--sand); border-bottom: 1px solid var(--border-light); text-transform: uppercase; letter-spacing: 1px; }

/* Mobile menu toggle */
.menu-toggle {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #fff;
  font-size: 18px; cursor: pointer; padding: 8px 10px;
  border-radius: var(--radius-sm); transition: var(--transition);
  flex-shrink: 0;
}
.menu-toggle:hover { background: rgba(200,153,46,.2); border-color: rgba(200,153,46,.4); }

/* Nav */
nav {
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  padding: 0 20px;
  overflow: hidden; max-height: 0;
  transition: max-height .38s cubic-bezier(.4,0,.2,1);
  border-top: 1px solid rgba(255,255,255,.06);
  position: relative;
}

nav.open { max-height: 620px; }

/* روابط مباشرة */
nav > a {
  color: rgba(255,255,255,.72);
  padding: 12px 14px;
  font-size: 13px; font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  display: flex; align-items: center; gap: 7px;
}
nav > a i { font-size: 12px; opacity: .8; }
nav > a:hover,
nav > a.active { color: var(--gold-light); border-bottom-color: var(--gold); }
nav > a.active  { font-weight: 700; }

/* ── Nav groups (dropdowns) ──────────────────────── */
.nav-group {
  position: relative;
}

.nav-group-btn {
  background: none; border: none;
  color: rgba(255,255,255,.72);
  padding: 12px 14px;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  font-family: var(--font-arabic);
  height: 100%;
}
.nav-group-btn i { font-size: 12px; opacity: .8; }
.nav-group-btn:hover,
.nav-group.active .nav-group-btn { color: var(--gold-light); border-bottom-color: var(--gold); }
.nav-group.active .nav-group-btn { font-weight: 700; }

.nav-chevron {
  font-size: 9px !important;
  opacity: .6 !important;
  transition: transform .25s ease;
  margin-right: 2px;
}
.nav-group.open .nav-chevron { transform: rotate(180deg); }

/* Dropdown panel */
.nav-dropdown {
  display: none;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-width: 230px;
  direction: rtl;
  animation: fadeDown .18s ease;
}
.nav-group.open .nav-dropdown { display: flex; }

/* Desktop: dropdown floats below */
@media (min-width: 900px) {
  .nav-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 400;
  }
}

/* Mobile: dropdown flows inline */
@media (max-width: 899px) {
  .nav-dropdown {
    display: none;
    margin: 0 -20px;
    border-radius: 0;
    border-left: none; border-right: none;
    box-shadow: none;
    border-top: 1px solid var(--border-light);
  }
  .nav-group.open .nav-dropdown { display: flex; }
  .nav-group { width: 100%; }
  .nav-group-btn { width: 100%; justify-content: flex-start; }
}

/* Dropdown items */
.nav-dd-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px;
  color: var(--text);
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  transition: background .15s;
}
.nav-dd-item:last-child,
.nav-dd-item + .nav-dd-divider + .nav-dd-item { border-bottom: none; }
.nav-dd-item:hover  { background: var(--sand); }
.nav-dd-item.active { background: var(--sand); color: var(--primary); }
.nav-dd-item.active strong { color: var(--primary); }

.nav-dd-item > i {
  color: var(--gold);
  font-size: 15px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.nav-dd-item span   { display: flex; flex-direction: column; gap: 2px; }
.nav-dd-item strong { font-size: 13px; font-weight: 700; color: var(--text); }
.nav-dd-item small  { font-size: 11px; color: var(--muted); }

.nav-dd-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

/* رابط الباحثين المميز */
.nav-cta {
  color: var(--gold-light) !important;
  padding: 12px 14px;
  font-size: 13px; font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  display: flex; align-items: center; gap: 7px;
  margin-right: auto;
}
.nav-cta:hover,
.nav-cta.active { color: var(--gold) !important; border-bottom-color: var(--gold); }
.nav-cta i { font-size: 12px; }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  background:
    linear-gradient(to bottom, rgba(12,26,18,.92) 0%, rgba(27,61,47,.82) 100%);
  padding: 56px 20px;
  text-align: center; color: #fff;
  position: relative;
  overflow: hidden;
}

/* Decorative arcs */
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(200,153,46,.15);
  pointer-events: none;
}
.hero::before { width: 500px; height: 500px; top: -200px; right: -100px; }
.hero::after  { width: 400px; height: 400px; bottom: -200px; left: -80px; }

.hero h2 {
  font-size: 24px; color: var(--gold-light);
  margin-bottom: 14px; line-height: 1.45;
  text-shadow: 0 2px 20px rgba(200,153,46,.3);
  position: relative;
}
.hero p  {
  font-size: 14px; max-width: 580px; margin: 0 auto 26px;
  line-height: 1.9; opacity: .82;
  position: relative;
}
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }

/* Gold ornament */
.hero-ornament {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 20px; opacity: .55;
}
.hero-ornament::before, .hero-ornament::after {
  content: '';
  height: 1px; width: 60px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.hero-ornament::after { background: linear-gradient(90deg, var(--gold), transparent); }
.hero-ornament i { color: var(--gold); font-size: 14px; }

/* "في مثل هذا اليوم" */
.today-band {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: #fff;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
  border-bottom: 2px solid rgba(200,153,46,.4);
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
  position: relative;
  transition: max-height .35s ease, opacity .3s ease, padding .3s ease;
  overflow: hidden;
}
.today-band.hiding {
  max-height: 0 !important;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-width: 0;
}
.today-band::before {
  content: '';
  position: absolute; right: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(to bottom, var(--gold-light), var(--gold));
}
.today-band .tb-label { font-size: 11px; opacity: .65; white-space: nowrap; }
.today-band .tb-title { font-size: 15px; font-weight: 700; color: var(--gold-light); }
.today-band .tb-date  { font-size: 11px; opacity: .55; }
.today-band > a { color: var(--gold-light); font-size: 12px; margin-right: auto; white-space: nowrap; transition: opacity .2s; font-weight: 600; }
.today-band > a:hover { opacity: .75; }
.today-band-close {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.7);
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: all .2s;
  padding: 0;
}
.today-band-close:hover { background: rgba(255,255,255,.22); color: #fff; }

/* ── Stats bar ───────────────────────────────────────── */
.stats-bar {
  background: var(--sand);
  border-top: 1px solid var(--border-light);
  border-bottom: 3px solid rgba(200,153,46,.22);
  padding: 22px 20px;
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  padding: 8px 28px;
  position: relative;
}

/* الفاصل العمودي بين الإحصاءات */
.stat + .stat::before {
  content: '';
  position: absolute;
  right: 0; top: 20%; bottom: 20%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -.02em;
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  letter-spacing: .03em;
}

/* نقطة ذهبية صغيرة أسفل الرقم */
.stat-num::after {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  margin: 5px auto 0;
  opacity: .7;
}

/* ── Layout ──────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 32px 20px; position: relative; z-index: 1; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 12px;
  position: relative;
}
.section-header::after {
  content: '';
  position: absolute; bottom: -1px; right: 0;
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
}

.section-title { font-size: 19px; color: var(--primary); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.section-title i { color: var(--gold); font-size: 17px; }
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 20px;
  background: linear-gradient(to bottom, var(--gold), var(--gold-light));
  border-radius: 2px;
}

/* Page header */
.page-header {
  background: linear-gradient(160deg, var(--dark) 0%, var(--primary) 100%);
  color: #fff; padding: 28px 20px;
  border-bottom: 1px solid rgba(200,153,46,.3);
  position: relative; overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; left: -60px; top: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(200,153,46,.06);
}
.page-header h1 { font-size: 22px; color: var(--gold-light); margin-bottom: 5px; }
.page-header p  { font-size: 13px; opacity: .65; }

/* ── Grids ───────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}
.card::before {
  content: '';
  position: absolute; top: 0; right: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
  opacity: 0;
  transition: opacity .28s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(200,153,46,.3); }
.card:hover::before { opacity: 1; }

/* ── Section variants ────────────────────────────────── */
.section--white { background: #fff; }
.section--dark  {
  background: linear-gradient(135deg, var(--primary) 0%, #1a4a35 100%);
  color: #fff;
}
.section-title--light { color: var(--gold-light); }

/* ── Category cards (الملفات والحقب) ─────────────────── */
.cat-card {
  padding: 22px;
  border-right: 5px solid var(--gold); /* overridden inline per category color */
  text-decoration: none;
  color: inherit;
  display: block;
}
.cat-card__icon  { font-size: 26px; margin-bottom: 10px; }
.cat-card__name  { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.cat-card__desc  { font-size: 12px; color: var(--text-light); line-height: 1.6; margin-bottom: 10px; }
.cat-card__count {
  font-size: 11px;
  background: var(--sand-deep);
  color: var(--muted);
  padding: 3px 9px;
  border-radius: 15px;
  display: inline-block;
}

/* ── Event cards (أبرز الأحداث / في مثل هذا اليوم) ──── */
.ev-card  { text-decoration: none; color: inherit; display: block; }
.ev-card__stripe { height: 6px; }
.ev-card__body   { padding: 18px; }
.ev-card__cat    { font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.ev-card__title  { font-size: 16px; font-weight: 700; color: var(--primary); margin-bottom: 8px; line-height: 1.5; }
.ev-card__date   { font-size: 12px; color: var(--gold); margin-bottom: 9px; }
.ev-card__summary{ font-size: 13px; color: var(--text-light); line-height: 1.7; }
.ev-card__footer {
  padding: 11px 18px;
  background: var(--sand);
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}

/* ── Entity cards (الكيانات) ─────────────────────────── */
.ent-card {
  border-right: 5px solid var(--gold); /* overridden inline per entity color */
  text-decoration: none;
  color: inherit;
  display: block;
}
.ent-card__body  { padding: 16px 18px; }
.ent-card__head  { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ent-card__logo  {
  width: 38px; height: 38px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff;
  flex-shrink: 0; overflow: hidden;
}
.ent-card__logo img { width: 100%; height: 100%; object-fit: contain; }
.ent-card__info  { min-width: 0; }
.ent-card__name  {
  font-size: 13px; font-weight: 700; color: var(--primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ent-card__abbr  { font-size: 11px; color: var(--gold); font-weight: 800; }
.ent-card__meta  {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 4px;
  margin-bottom: 4px;
}
.ent-card__type  {
  font-size: 10px; background: var(--sand-deep);
  color: var(--muted); padding: 2px 8px; border-radius: 8px;
}
.ent-card__years { font-size: 11px; color: var(--gold); font-weight: 700; }
.ent-card__ideology { font-size: 11px; color: var(--muted); margin-top: 4px; font-style: italic; }

/* ── Position cards (المناصب) ────────────────────────── */
.pos-card {
  border-top: 4px solid var(--gold); /* overridden inline per position color */
  text-decoration: none;
  color: inherit;
  display: block;
}
.pos-card__body   { padding: 18px 20px; }
.pos-card__head   { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pos-card__icon   {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff; flex-shrink: 0;
}
.pos-card__title  { font-size: 14px; font-weight: 700; color: var(--primary); line-height: 1.3; }
.pos-card__holder { display: flex; align-items: center; gap: 10px; }
.pos-card__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #2a5a45);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.pos-card__avatar img      { width: 100%; height: 100%; object-fit: cover; }
.pos-card__holder-name     { font-size: 13px; font-weight: 700; color: var(--primary); }
.pos-card__current         { font-size: 11px; color: #27ae60; display: flex; align-items: center; gap: 4px; }
.pos-card__current .fa-circle { font-size: 5px; }
.pos-card__vacant          { font-size: 12px; color: var(--muted); font-style: italic; }

/* ── Testimony cards (الشهادات) ──────────────────────── */
.testimony-card {
  padding: 22px;
  border-top: 4px solid var(--primary);
  position: relative;
}
.testimony-card__quote {
  font-size: 50px; color: var(--gold); opacity: .22;
  position: absolute; top: -5px; right: 14px;
  font-family: Georgia, serif; line-height: 1; pointer-events: none;
}
.testimony-card__text     { font-size: 13px; line-height: 1.8; color: var(--text-light); margin-bottom: 13px; }
.testimony-card__narrator { font-size: 13px; font-weight: 700; color: var(--primary); }
.testimony-card__event    { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── On This Day cards (في مثل هذا اليوم) ───────────── */
.otd-card { border-top: 4px solid var(--gold); text-decoration: none; color: inherit; display: block; }
.otd-card__body    { padding: 18px; }
.otd-card__year    { font-size: 11px; color: var(--gold); margin-bottom: 8px; font-weight: 700; }
.otd-card__title   { font-size: 15px; font-weight: 700; color: var(--primary); line-height: 1.5; margin-bottom: 8px; }
.otd-card__summary { font-size: 13px; color: var(--text-light); line-height: 1.7; }

/* في مثل هذا اليوم — card on dark bg needs light text */
.section--dark .otd-card { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.15); }
.section--dark .otd-card:hover { background: rgba(255,255,255,.12); }
.section--dark .otd-card__year  { color: var(--gold-light); }
.section--dark .otd-card__title { color: #fff; }
.section--dark .otd-card__summary { color: rgba(255,255,255,.7); }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  padding: 10px 22px; border-radius: 50px; border: none;
  cursor: pointer; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px;
  transition: var(--transition); white-space: nowrap;
  letter-spacing: .02em;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #b8872a 100%);
  color: var(--dark);
  box-shadow: 0 4px 16px rgba(200,153,46,.35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(200,153,46,.45); filter: brightness(1.07); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(12,26,18,.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(12,26,18,.4); filter: brightness(1.1); }
.btn-outline {
  background: transparent; border: 1.5px solid var(--gold); color: var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--dark); transform: translateY(-2px); }
.btn-danger  { background: linear-gradient(135deg, #c0392b, #e74c3c); color: #fff; }
.btn-danger:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-sm      { padding: 6px 14px; font-size: 12px; border-radius: 30px; }

/* ── Filter bar ──────────────────────────────────────── */
.filter-bar {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  padding: 14px 20px;
  box-shadow: var(--shadow-xs);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.filter-bar form { display: flex; gap: 10px; align-items: center; min-width: max-content; }

.filter-bar select,
.filter-bar input[type="number"],
.filter-bar input[type="text"] {
  padding: 8px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px;
  outline: none; background: var(--cream); transition: var(--transition); color: var(--text);
}
.filter-bar select:focus,
.filter-bar input:focus { border-color: var(--gold); background: #fff; box-shadow: 0 0 0 3px rgba(200,153,46,.12); }

/* ── Form ────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #3a4240;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; outline: none;
  transition: var(--transition); background: #fff; box-sizing: border-box; color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,153,46,.12);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Alerts ──────────────────────────────────────────── */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.alert-success { background: #eafaf1; color: #1e6641; border: 1px solid #a8dfc0; border-right: 4px solid #27ae60; }
.alert-error   { background: #fdf0f0; color: #7a1515; border: 1px solid #f0b8b8; border-right: 4px solid #e74c3c; }

/* ── Badges ──────────────────────────────────────────── */
.badge { padding: 4px 12px; border-radius: 30px; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.badge-pub    { background: #eafaf1; color: #1a6641; border: 1px solid #a8dfc0; }
.badge-draft  { background: #fef9ee; color: #7a5c00; border: 1px solid #f0d890; }
.badge-review { background: #eef4ff; color: #004085; border: 1px solid #b8d0f8; }

/* ── Timeline ────────────────────────────────────────── */
.timeline { position: relative; padding-right: 22px; }
.timeline::before {
  content: ''; position: absolute; right: 7px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--primary), var(--gold));
  border-radius: 2px;
  opacity: .55;
}

.tl-item { position: relative; margin-bottom: 18px; padding-right: 28px; }

.tl-dot {
  position: absolute; right: -9px; top: 18px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: #fff;
  border: 3px solid var(--cream); box-shadow: 0 0 0 2px var(--gold); z-index: 1;
  transition: var(--transition);
}
.tl-item:hover .tl-dot { transform: scale(1.18); box-shadow: 0 0 0 3px var(--gold), 0 4px 12px rgba(200,153,46,.35); }

.tl-card {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs); overflow: hidden;
  cursor: pointer; transition: var(--transition);
}
.tl-card:hover { box-shadow: var(--shadow-md); transform: translateX(-3px); border-color: rgba(200,153,46,.3); }

.tl-card-head {
  padding: 14px 18px;
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 10px;
  background: linear-gradient(135deg, #fdf8f0 0%, #fff 100%);
}

.tl-year  { font-size: 22px; font-weight: 800; color: var(--gold); line-height: 1; white-space: nowrap; }
.tl-title { font-size: 15px; font-weight: 700; color: var(--primary); line-height: 1.45; }
.tl-sub   { font-size: 11px; color: var(--muted); margin-top: 4px; }

.tl-body { padding: 0 18px 14px; font-size: 13px; color: #4a5550; line-height: 1.8; display: none; }
.tl-body.open { display: block; animation: fadeDown .25s ease; }

/* ── Person / Event detail layouts ───────────────────── */
.person-layout { display: block; }
.person-sidebar { margin-bottom: 26px; }

.event-layout { display: block; }
.event-sidebar { margin-bottom: 26px; }

/* ── Detail page header ──────────────────────────────── */
/* الهيدر الغني لصفحات التفاصيل (حدث / شخصية) */
.detail-header {
  background: var(--primary);
  color: #fff;
  padding: 32px 40px;
  border-bottom: 3px solid var(--gold);
}
.detail-header__breadcrumb {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  margin-bottom: 8px;
}
.detail-header__breadcrumb a { color: var(--gold); }
.detail-header__title {
  font-size: 26px;
  color: var(--gold-light);
  margin-bottom: 6px;
  line-height: 1.35;
}
.detail-header__subtitle {
  font-size: 14px;
  opacity: .8;
  margin-bottom: 4px;
}
.detail-header__meta {
  font-size: 13px;
  opacity: .7;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.detail-header__actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
/* أزرار الهيدر الداكن */
.btn-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.12);
  color: #fff;
}
.btn-header:hover       { background: rgba(200,153,46,.3); border-color: var(--gold); color: #fff; }
.btn-header--muted      { background: rgba(255,255,255,.07); color: rgba(255,255,255,.75); }
.btn-header--muted:hover{ background: rgba(255,255,255,.15); color: #fff; }
.btn-header i           { color: var(--gold); font-size: 13px; }

/* ── Filter bar labels ───────────────────────────────── */
/* يستبدل style= المتكرر على labels الفلاتر */
.filter-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 3px;
  display: block;
}

/* ── Search results ──────────────────────────────────── */
.srch-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.srch-summary__total { font-size: 14px; color: var(--text-light); }
.srch-summary__num   { font-size: 22px; font-weight: 700; color: var(--primary); }
.srch-summary__kw    { color: var(--gold); font-weight: 700; }
.srch-summary__badge {
  background: var(--sand-deep);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-light);
}
.srch-summary__badge i { color: var(--gold); font-size: 11px; }

.srch-section-title {
  font-size: 16px;
  color: var(--primary);
  margin: 26px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.srch-section-title:first-child { margin-top: 0; }
.srch-section-title i   { color: var(--gold); }
.srch-section-title span { font-size: 12px; color: var(--muted); font-weight: 400; }

/* بطاقة نتيجة بحث — حدث */
.result-item {
  display: block;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  border-right: 4px solid var(--gold);
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
.result-item:hover    { box-shadow: var(--shadow-md); transform: translateX(-3px); }
.result-item__head    { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.result-item__meta    { font-size: 11px; color: var(--muted); margin-bottom: 5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.result-item__cat     { background: var(--sand-deep); padding: 1px 7px; border-radius: 4px; }
.result-item__title   { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 7px; line-height: 1.45; }
.result-item__summary { font-size: 13px; color: var(--text-light); line-height: 1.7; }
.result-item__arrow   { color: var(--gold); flex-shrink: 0; margin-top: 4px; }

/* بطاقة نتيجة شخصية */
.person-result {
  display: flex;
  gap: 13px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}
.person-result:hover          { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.person-result__avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 17px; flex-shrink: 0; overflow: hidden;
}
.person-result__avatar img    { width: 100%; height: 100%; object-fit: cover; }
.person-result__name          { font-size: 15px; font-weight: 700; color: var(--primary); }
.person-result__role          { font-size: 12px; color: var(--muted); }
.person-result__bio           { font-size: 12px; color: var(--text-light); margin-top: 4px; line-height: 1.6;
                                 display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* بطاقة نتيجة منصب / كيان */
.compact-result {
  display: flex;
  gap: 12px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
  color: inherit;
  text-decoration: none;
  border-right: 4px solid var(--gold);
  transition: var(--transition);
}
.compact-result:hover       { box-shadow: var(--shadow-md); transform: translateX(-3px); }
.compact-result__icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff; flex-shrink: 0; overflow: hidden;
}
.compact-result__icon img   { width: 100%; height: 100%; object-fit: contain; }
.compact-result__title      { font-size: 15px; font-weight: 700; color: var(--primary); }
.compact-result__sub        { font-size: 12px; color: var(--muted); margin-top: 2px; }
.compact-result__extra      { font-size: 12px; color: var(--text-light); margin-top: 3px; }

/* بطاقة شهادة في نتائج البحث */
.testimony-result {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
  border-top: 3px solid var(--primary);
  position: relative;
}
.testimony-result__quote {
  font-size: 50px; color: var(--gold); opacity: .12;
  position: absolute; top: -5px; right: 14px;
  font-family: Georgia, serif; line-height: 1; pointer-events: none;
}
.testimony-result__head     { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.testimony-result__name     { font-size: 14px; font-weight: 700; color: var(--primary); }
.testimony-result__role     { font-size: 12px; color: var(--muted); }
.testimony-result__verified {
  background: #d4edda; color: #155724;
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 4px;
}
.testimony-result__text     { font-size: 13px; line-height: 1.8; color: var(--text-light); }
.testimony-result__link     {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 9px; font-size: 12px; color: var(--primary); font-weight: 600;
  text-decoration: none;
}

/* حالة فارغة وحالة عدم النتائج */
.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
}
.empty-state__icon  { font-size: 48px; display: block; margin-bottom: 16px; color: var(--border); }
.empty-state__title { font-size: 17px; color: var(--text-light); margin-bottom: 8px; }
.empty-state__desc  { font-size: 14px; color: var(--muted); }

/* ── Detail page body components ─────────────────────── */
/* ملخص / مقتطف بارز */
.summary-box {
  background: #fffbf0;
  border-right: 4px solid var(--gold);
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 25px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-light);
}

/* وسوم الحدث / الشخصية */
.tag-chip {
  padding: 4px 11px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}
/* اللون يُضبط inline لأنه ديناميكي من DB */
.tag-chip:hover { filter: brightness(.9); transform: translateY(-1px); }

/* مصدر / مرجع */
.source-item {
  padding: 12px 15px;
  background: var(--sand);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: 13px;
}
.source-item__type {
  background: var(--sand-deep);
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 11px;
  color: var(--muted);
  margin-right: 8px;
}

/* شهادة في صفحة التفاصيل */
.testimony-block {
  background: var(--card-bg);
  border-radius: 10px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
  border-top: 3px solid var(--primary);
  overflow: hidden;
}
.testimony-block__body    { padding: 22px; }
.testimony-block__head    { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.testimony-block__head strong { color: var(--primary); font-size: 14px; }
.testimony-block__type    {
  float: left; background: var(--sand-deep);
  padding: 2px 8px; border-radius: 10px; font-size: 11px; color: var(--muted);
}
.testimony-block__text    { font-size: 14px; line-height: 1.9; color: var(--text-light); }
.testimony-block__source  { margin-top: 12px; font-size: 12px; color: var(--muted); }
.testimony-block__verified{ margin-top: 6px; font-size: 11px; color: #28a745; }

/* شخصية مرتبطة في الشريط الجانبي */
.person-mini {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: inherit;
  transition: color .2s;
}
.person-mini:last-child { border: none; }
.person-mini:hover .person-mini__name { color: var(--gold); }
.person-mini__avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0; font-size: 16px; overflow: hidden;
}
.person-mini__avatar img  { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.person-mini__name        { font-size: 13px; font-weight: 700; color: var(--primary); }
.person-mini__role        { font-size: 11px; color: var(--muted); }

/* معلومات الحدث في الشريط الجانبي */
.info-list { font-size: 13px; line-height: 2.2; color: var(--text-light); }
.info-list strong { color: var(--text); }

/* ── Video ───────────────────────────────────────────── */
.video-container {
  position: relative; padding-bottom: 56.25%;
  height: 0; overflow: hidden;
  background: var(--dark); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.video-container iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* ── Footer ──────────────────────────────────────────── */
footer {
  background: linear-gradient(160deg, var(--dark) 0%, #0a1810 100%);
  color: rgba(255,255,255,.6);
  padding: 48px 20px 0;
  border-top: 1px solid rgba(200,153,46,.25);
  margin-top: 60px;
  position: relative;
}
footer::before {
  content: '';
  display: block; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  position: absolute; top: 0; left: 0; right: 0;
}

/* Grid الفوتر */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
@media (min-width: 640px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; } }

.footer-col {}

/* العلامة التجارية */
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.footer-logo { height: 36px; object-fit: contain; }
.footer-brand-icon { font-size: 22px; color: var(--gold); }
.footer-brand-name { font-size: 16px; font-weight: 700; color: #fff; }
.footer-tagline { font-size: 12px; line-height: 1.7; opacity: .55; margin-bottom: 16px; }

/* روابط الفوتر */
.footer-heading {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--gold); margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(200,153,46,.2);
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  color: rgba(255,255,255,.6); font-size: 13px;
  display: flex; align-items: center; gap: 8px;
  transition: color .2s;
}
.footer-links a i { color: var(--gold); font-size: 11px; width: 14px; text-align: center; opacity: .7; }
.footer-links a:hover { color: var(--gold-light); }

/* شبكات التواصل */
.footer-social { display: flex; gap: 10px; margin-top: 4px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6); font-size: 13px;
  transition: all .2s;
}
.footer-social a:hover { background: var(--gold); border-color: var(--gold); color: var(--dark); }

/* عمود المشاركة */
.footer-contrib-text { font-size: 12px; line-height: 1.7; opacity: .6; margin-bottom: 14px; }

/* الخط السفلي */
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
  max-width: 1200px; margin: 0 auto;
  flex-wrap: wrap; gap: 8px;
}
.footer-bottom p { font-size: 11px; opacity: .35; }
.footer-admin-link {
  color: rgba(255,255,255,.25);
  font-size: 12px;
  transition: color .2s;
}
.footer-admin-link:hover { color: var(--gold); }

/* ── Animations ──────────────────────────────────────── */
@keyframes fadeUp   { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeDown { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn   { from { opacity:0; } to { opacity:1; } }
@keyframes shimmer  {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 2px var(--gold); }
  50%       { box-shadow: 0 0 0 4px var(--gold-light), 0 0 20px rgba(200,153,46,.3); }
}

.fade-in { animation: fadeIn .5s ease both; }
.fade-up { animation: fadeUp .5s ease both; }

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--sand-deep); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--gold), var(--primary)); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* حقل بحث في هيرو الصفحة */
.search-input-hero {
  flex: 1;
  padding: 13px 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 10px;
  font-size: 15px;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-family: var(--font-arabic);
  outline: none;
  transition: border-color .2s;
}
.search-input-hero::placeholder { color: rgba(255,255,255,.55); }
.search-input-hero:focus        { border-color: var(--gold); }

/* Decade pill — timeline.php */
.decade-pill {
  padding: 4px 10px;
  background: var(--sand-deep);
  border-radius: 15px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  transition: var(--transition);
  display: inline-block;
}
.decade-pill:hover { background: var(--gold); color: var(--dark); }

/* ── Utility ─────────────────────────────────────────── */

/* بطاقة رابط عامة — تستبدل onmouseover في person_detail وغيرها */
.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}
.link-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* صورة قابلة للتكبير عند الـ hover — تستبدل onmouseover في events.php */
.img-zoom {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
  display: block;
}
.img-zoom:hover { transform: scale(1.05); }

/* وسم اقتراحي — تستبدل onmouseover في search.php */
.suggestion-tag {
  padding: 7px 15px;
  background: var(--card-bg);
  border-radius: 20px;
  font-size: 13px;
  border: 1.5px solid var(--border);
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}
.suggestion-tag:hover {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--dark);
}

/* ترقيم الصفحات — تستبدل onmouseover في persons.php وغيرها */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 24px 16px 36px;
  flex-wrap: wrap;
}
.pagination__btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  background: var(--sand-deep);
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pagination__btn:hover {
  background: var(--primary);
  color: #fff;
}
.pagination__num {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--sand-deep);
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition);
}
.pagination__num:hover        { background: var(--primary); color: #fff; }
.pagination__num--active      { background: var(--primary); color: #fff; pointer-events: none; }
.pagination__info {
  font-size: 12px;
  color: var(--muted);
  margin-right: 8px;
}
.text-gold    { color: var(--gold); }
.text-primary { color: var(--primary); }
.text-muted   { color: var(--muted); }

/* Gold highlight text */
.highlight-gold {
  background: linear-gradient(120deg, var(--gold) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Divider ornament */
.divider-ornament {
  display: flex; align-items: center; gap: 14px;
  margin: 28px 0; color: var(--gold); opacity: .5;
}
.divider-ornament::before, .divider-ornament::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* Info box */
.info-box {
  background: linear-gradient(135deg, var(--sand) 0%, var(--cream) 100%);
  border: 1px solid var(--border);
  border-right: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}

/* ════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ════════════════════════════════════════════════════ */

/* ── sm: 480px+ ──────────────────────────────────────── */
@media (min-width: 480px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero h2 { font-size: 28px; }
  .stat-num { font-size: 30px; }
  .stat { padding: 8px 32px; }
}

/* ── md: 640px+ ──────────────────────────────────────── */
@media (min-width: 640px) {
  .header-top  { padding: 14px 28px; }
  .site-title p { display: block; }
  nav          { padding: 0 28px; }
  .hero        { padding: 65px 32px; }
  .hero h2     { font-size: 32px; }
  .section     { padding: 40px 32px; }
  .grid-2      { grid-template-columns: repeat(2, 1fr); }
  .grid-3      { grid-template-columns: repeat(2, 1fr); }
  .grid-4      { grid-template-columns: repeat(3, 1fr); }
  .section-title { font-size: 21px; }
  .form-grid   { grid-template-columns: 1fr 1fr; }
}

/* ── lg: 900px+ (desktop) ────────────────────────────── */
@media (min-width: 900px) {
  .menu-toggle { display: none !important; }
  nav {
    max-height: none !important;
    overflow: visible;
    padding: 0 48px !important;
    flex-wrap: nowrap;
  }
  .header-top  { padding: 16px 48px; }
  .site-title h1 { font-size: 20px; }
  .hero        { padding: 80px 48px; }
  .hero h2     { font-size: 40px; }
  .hero p      { font-size: 16px; }
  .section     { padding: 52px 48px; }
  .section-title { font-size: 23px; }
  .grid-3      { grid-template-columns: repeat(3, 1fr); }
  .grid-4      { grid-template-columns: repeat(4, 1fr); }
  .person-layout { display: grid; grid-template-columns: 300px 1fr; gap: 36px; align-items: start; }
  .person-sidebar { margin-bottom: 0; }
  .event-layout  { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
  .event-sidebar { margin-bottom: 0; }
  .page-header   { padding: 36px 48px; }
  .page-header h1 { font-size: 28px; }
  .filter-bar  { padding: 16px 48px; }
}

/* ── xl: 1200px+ ─────────────────────────────────────── */
@media (min-width: 1200px) {
  .header-search { max-width: 440px; }
  .grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* ── Print ───────────────────────────────────────────── */
@media print {
  header, nav, footer, .btn, .filter-bar { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  body  { background: #fff; }
  body::before { display: none; }
}