/* ============================================================
   المركز العراقي لتوثيق الجرائم — Header & Hero
   ============================================================ */

:root {
  --primary: #3E5A0A;        /* Archival Olive Green */
  --primary-dark: #2A3E05;
  --secondary: #73551F;      /* Archive Brown */
  --accent: #B49258;    /* Warm Gold */
  --bg-body:rgb(255, 255, 255);      
  --bg: #f8f5ee;             /* Old Paper */
  --surface: #FFFFFF;
  --surface-alt: #E7DDCB;
  --text-primary: #1E1E1E;
  --text-secondary: #5A5A5A;
  --border-color1: #e5e0db;
  --header-h: 88px;
  --radius-lg: 28px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img, video { display: block; width: 100%; height: 100%; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), height .4s var(--ease);
  border-bottom: 1px solid var(--border-color1);
}

.header-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand-logo {
  height: 56px;
  width: auto;
  transition: height .4s var(--ease);
}
.brand-text {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.brand-text img {
  height: clamp(34px, 5.2vw, 45px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
}


/* Navigation */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
}
.main-nav a {
  position: relative;
  display: inline-block;
  padding: 8px 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  border-radius: 8px;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 2px; right: 12px; left: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s var(--ease);
}
.main-nav a:hover { color: var(--accent); }
.main-nav a:hover::after,
.main-nav a.active::after { transform: scaleX(1); }
.main-nav a.active { color: var(--accent); }

/* ---------- Dropdown menus ---------- */
.has-dropdown { position: relative; }
.has-dropdown > a { display: inline-flex; align-items: center; gap: 5px; }
.nav-caret {
  margin-top: 1px;
  opacity: .75;
  transition: transform .35s var(--ease), opacity .3s var(--ease);
}
.has-dropdown:hover > a .nav-caret,
.has-dropdown:focus-within > a .nav-caret { transform: rotate(180deg); opacity: 1; }

.dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 232px;
  background: var(--surface);
  border: 1px solid var(--border-color1);
  border-radius: 16px;
  box-shadow: 0 22px 55px -16px rgba(42,62,5,.30), 0 6px 18px rgba(0,0,0,.06);
  padding: 9px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.985);
  transform-origin: top right;
  transition: opacity .28s var(--ease), transform .28s var(--ease), visibility 0s linear .28s;
  z-index: 60;
}
/* invisible hover-bridge so the menu doesn't close in the gap */
.dropdown::before {
  content: ""; position: absolute;
  top: -16px; left: 0; right: 0; height: 16px;
}
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
  opacity: 1; visibility: visible;
  transform: translateY(0) scale(1);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}
.dropdown ul { display: flex; flex-direction: column; gap: 2px; }
.dropdown li { width: 100%; }
.dropdown a {
  position: relative;
  display: block;
  padding: 10px 16px 10px 22px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  border-radius: 10px;
  white-space: nowrap;
  transition: background .25s var(--ease), color .25s var(--ease), padding .25s var(--ease);
}
.dropdown a::after { display: none; }           /* kill the nav underline inside menus */
.dropdown a::before {                            /* gold marker on the start (right) edge */
  content: ""; position: absolute;
  right: 7px; top: 50%;
  width: 3px; height: 58%;
  background: var(--accent);
  border-radius: 3px;
  transform: translateY(-50%) scaleY(0);
  transition: transform .25s var(--ease);
}
.dropdown a:hover,
.dropdown a:focus-visible {
  background: var(--bg);
  color: var(--primary-dark);
  padding-right: 22px;
}
.dropdown a:hover::before,
.dropdown a:focus-visible::before { transform: translateY(-50%) scaleY(1); }

/* wide two-column panel (الذاكرة الحية) */
.dropdown-wide { min-width: 540px; }
.dropdown-wide ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
}
.dropdown-wide a { white-space: normal; }


/* Actions */
.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.search-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.search-btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.lang-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  background: transparent;
  color: var(--primary);
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.lang-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);

}
.site-header.scrolled .lang-btn { border-color: var(--primary-dark); color: var(--primary-dark); }
.site-header.scrolled .lang-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span { width: 24px; height: 2px; background: var(--primary); border-radius: 2px; transition: .3s var(--ease); }

/* Scrolled state */
.site-header.scrolled {
  background: var(--bg-body);
  /* backdrop-filter: blur(10px); */
  box-shadow: 0 6px 24px rgba(42,62,5,.08);
  /* height: 74px; */
}
/* .site-header.scrolled .brand-title { color: var(--primary-dark); }
.site-header.scrolled .brand-sub { color: var(--secondary); }
.site-header.scrolled .brand-logo { height: 48px; filter: none; }
.site-header.scrolled .brand-text img { height: clamp(30px, 4.6vw, 48px); }
.site-header.scrolled .main-nav a { color: var(--primary-dark); }
.site-header.scrolled .menu-toggle span { background: var(--primary-dark); } */

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 16px;
  padding-top: calc(var(--header-h) + 10px);
}

.heroSwiper {
  position: relative;
  height: calc(100vh - 114px);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Slide media — full bleed */
.slide-media { position: absolute; inset: 0; }
.media-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
}
/* Ken-burns on active slide */
.docsSwiper .swiper-wrapper{ margin: 20px 0; }
.swiper-slide-active .media-el {
  animation: kenburns 8s ease-out forwards;
}
@keyframes kenburns {
  from { transform: scale(1.12); }
  to   { transform: scale(1); }
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(60deg, rgba(42,62,5,.05) 0%, rgba(30,30,30,.35) 45%, rgba(30,30,30,.82) 100%);
}

/* Slide content (right-aligned RTL) */
.slide-content {
  position: relative;
  z-index: 3;
  height: 100%;
  margin: 0 auto;
  padding: 0 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: right;
}

/* Content entrance animation, triggered on active slide */
.eyebrow, .slide-title, .slide-cta {
  opacity: 0;
  transform: translateY(28px);
}
.swiper-slide-active .eyebrow   { animation: rise .7s var(--ease) .25s forwards; }
.swiper-slide-active .slide-title{ animation: rise .8s var(--ease) .40s forwards; }
.swiper-slide-active .slide-cta  { animation: rise .8s var(--ease) .74s forwards; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--accent);
  margin-bottom: 22px;
  text-shadow: 0 1px 6px rgba(0,0,0,.4);
}
.eyebrow-line { width: 38px; height: 2px; background: var(--accent); display: inline-block; }

.slide-title {
  font-size: clamp(34px, 4.4vw, 64px);
  font-weight: 900;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 24px;
  text-shadow: 0 4px 24px rgba(0,0,0,.45);
  max-width: 760px;
}
.slide-title .gold { color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15.5px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 15px 32px;
}
.btn-primary:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}
.btn-primary .arrow { transition: transform .25s var(--ease); }
.btn-primary:hover .arrow { transform: translateX(-5px); }

.btn-ghost {
  color: #fff;
  padding: 15px 26px;
  border: 1.5px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255,255,255,.12);
}

/* ============================================================
   SWIPER CONTROLS
   ============================================================ */
.hero-controls {
  position: absolute;
  z-index: 10;
  bottom: 34px;
  right: 70px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-arrow {
  position: static;
  width: 52px;
  height: 52px;
  margin: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.45);
  background: rgba(30,30,30,.25);
  backdrop-filter: blur(6px);
  color: #fff;
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.hero-arrow::after { font-size: 18px; font-weight: 700; }
.hero-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--primary-dark);
  transform: scale(1.08);
}

/* Pagination */
.heroSwiper .swiper-pagination {
  position: static;
  width: auto;
  display: flex;
  align-items: center;
  gap: 9px;
}
.heroSwiper .swiper-pagination-bullet {
  width: 11px; height: 11px;
  background: rgba(255,255,255,.5);
  opacity: 1;
  transition: width .3s var(--ease), background .3s var(--ease);
  border-radius: 6px;
}
.heroSwiper .swiper-pagination-bullet-active {
  width: 30px;
  background: var(--accent);
}

/* ============================================================
   KUFIC IDENTITY BANNER
   ============================================================ */
.kufic-banner {
  --kufic-navy: #2c3f0b;
  --tile-h: 73px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 73px;
  background: #FFFFFF;
  overflow: hidden;
}

/* Repeating Kufic pattern, recolored to exact navy via mask */
.kufic-strip {
  flex: 1 1 0;
  align-self: stretch;
  background-color: var(--kufic-navy);
  -webkit-mask: url('../images/title-kufa.png') repeat-x center / auto var(--tile-h);
          mask: url('../images/title-kufa.png') repeat-x center / auto var(--tile-h);
  filter:invert(0.4);
  opacity: 0.7;
}

/* Center branding area */
.banner-logos {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.6vw, 40px);
  padding: 0 clamp(16px, 3vw, 44px);
}
/* equal-width slots keep the cluster optically balanced & centered */
.b-logo-link {
  display: grid;
  place-items: center;
  width: clamp(74px, 9vw, 112px);
  flex-shrink: 0;
}
.b-logo {
  height: 72px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: grayscale(0.4);
  transition: filter .35s var(--ease), transform .35s var(--ease);
}
.b-logo-main { height: 75px; }
/* hover/focus a logo: full colour + gentle zoom */
.b-logo-link:hover .b-logo,
.b-logo-link:focus-visible .b-logo {
  filter: grayscale(0);
  transform: scale(1.02);
}
.b-logo-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }

/* fkrya logo is a white silhouette — recolor to navy so it reads on white */
.b-logo-fkrya {
  display: inline-block;
  height: 74px;
  width: 47px;
  background-color: var(--kufic-navy);
  -webkit-mask: url('../images/fkrya-logo.png') center / contain no-repeat;
          mask: url('../images/fkrya-logo.png') center / contain no-repeat;
}

/* ============================================================
   STATISTICS SECTION
   ============================================================ */
.stats {
  background:
    radial-gradient(120% 80% at 50% 0%, var(--bg-body) 0%, var(--bg) 60%);
  padding: clamp(56px, 8vw, 112px) clamp(16px, 4vw, 40px);
}

.stats-head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 78px); }
.eyebrow-line { width: 30px; height: 2px; background: var(--accent); display: inline-block; }
.stats-head h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  color: var(--primary-dark);
  margin: 0 0 14px;
  letter-spacing: -.5px;
}
.stats-sub {
  font-size: clamp(14px, 1.4vw, 17px);
  line-height: 1.9;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* Radial grid: cards in corners, center composition between */
.stats-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: center;
  gap: clamp(20px, 3vw, 38px) clamp(12px, 5vw, 12px);
}
.pos-tr { grid-column: 1; grid-row: 1; }
.pos-tl { grid-column: 3; grid-row: 1; }
.pos-br { grid-column: 1; grid-row: 2; }
.pos-bl { grid-column: 3; grid-row: 2; }
.stats-center { grid-column: 2; grid-row: 1 / span 2; }

/* Center concentric rings + logo */
.stats-center {
  position: relative;
  width: clamp(190px, 22vw, 290px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform: scale(2);
}
.ring { position: absolute; border-radius: 50%; }
.ring-1 { inset: 2%;   border: 1.5px solid var(--border-color1); }
.ring-2 { inset: 9%; border: 1.5px solid var(--border-color1); }
.ring-3 { 
  inset: 16%;
   border: 1.5px solid rgba(62,90,10,.12);
   }
.center-logo {
  position: relative;
  z-index: 2;
  width: 46%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  /* box-shadow: 0 14px 36px -14px rgba(42,62,5,.35); */
}
.center-logo img { width: 100%; height: auto; }

/* Cards (entire card is a link) */
.stat-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--surface-alt);
  border-radius: 18px;
  padding: 26px 26px 24px;
  text-align: right;
  color: inherit;
  box-shadow: 0 16px 44px -26px rgba(42,62,5,.45);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);

}
.stat-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 30px 56px -28px rgba(42,62,5,.5);
  border-color: rgba(180,146,88,.6);
}
.card-title {
  font-size: 16px; font-weight: 700;
  color: var(--text-secondary);
  margin: 0 0 8px;
}
.stat-number {
  font-size: clamp(42px, 4.4vw, 58px);
  font-weight: 900;
  line-height: 1.02;
  color: var(--primary-dark);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.stat-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 10px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

/* Bottom-left "go to details" badge holding a ~300deg arrow */
.card-go {
  align-self: flex-end;        /* left side in RTL */
  margin-top: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--primary);
  background: var(--bg);
  border: 1px solid rgba(62,90,10,.2);
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.card-go svg {
  width: 18px; height: 18px;
  transform: rotate(220deg);
  transition: all 0.4s;
}
.stat-card:hover .card-go {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.stat-card:hover .card-go svg { transform: rotate(180deg) }

/* ---- Statistics responsive ---- */
@media (max-width: 980px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    align-items: stretch;
    gap: clamp(18px, 3vw, 30px);
  }
  .stats-center { display: none; }
  .pos-tr, .pos-tl, .pos-br, .pos-bl { grid-column: auto; grid-row: auto; }
  .stat-card { max-width: 420px; justify-self: stretch; }
}

@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { max-width: 100%; }
  /* .stats-center { width: clamp(180px, 60vw, 230px);} */
}

/* ============================================================
   MAGAZINE BANNER (مجلة ذاكرة الألم) — 3 layers
   ============================================================ */
/* Layer 1: full-width paper background */
.mag-section {
  /* background: rgb(231 221 203 / 66%); */
  padding: clamp(36px, 6vw, 90px) clamp(16px, 4vw, 40px);
}

/* Layer 2: the banner card (max-width + background image cover) */
.mag-banner {
  position: relative;
  max-width: 1300px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  min-height: clamp(360px, 36vw, 500px);
  padding: clamp(20px, 3vw, 44px);
}
/* Background image as its own layer so its opacity is controllable */
.mag-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('../images/ojjs.png') no-repeat center / cover;
  opacity: 0.8;
}

.mag-content {
  position: relative;
  z-index: 1;
  flex: 1 1 50%;
  text-align: right;
  padding: clamp(8px, 2vw, 30px) clamp(16px, 3vw, 46px);
}
.mag-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  color: var(--secondary);
  margin-bottom: 18px;
}
.mag-eyebrow .eyebrow-line { width: 30px; height: 2px; background: var(--accent); display: inline-block; }
.mag-title {
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.25;
  color: var(--primary-dark);
  margin: 0 0 18px;
  letter-spacing: -.5px;
}
.mag-desc {
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 2;
  color: var(--text-secondary);
  margin: 0 0 32px;
  font-weight: 600;
}
.mag-btn { font-size: 15px; }

/* Left figure — framed engraved-map artwork */
.mag-figure {
  position: relative;
  z-index: 1;
  flex: 1 1 50%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mag-figure img {
  width: 100%;
  max-width: 480px;
  max-height: 420px;
  object-fit: contain;
  border-radius: 18px;
  filter: drop-shadow(0 22px 40px rgba(30,30,30,.35));
}

/* ---- Magazine banner responsive ----
   On small screens: banner grows taller, stacks as IMAGE then CONTENT */
@media (max-width: 860px) {
  .mag-banner {
    flex-direction: column;
    min-height: auto;
    padding: clamp(22px, 5vw, 40px);
    gap: 26px;
  }
  .mag-figure { order: 2; flex: none; width: 100%; }   /* image on top */
  .mag-figure img { max-width: 100%; max-height: 320px; }
  .mag-content { flex: none; width: 100%; padding: 4px clamp(6px, 3vw, 24px) 8px; }
}
@media (max-width: 480px) {
  .mag-figure img { max-height: 260px; border-radius: 14px; }
  .mag-title { font-size: clamp(26px, 8vw, 36px); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .header-inner { padding: 0 24px; }
  .main-nav ul { gap: 2px; }
  .main-nav a { padding: 8px 9px; font-size: 13.5px; }
  .slide-content { padding: 0 44px; }
}

@media (max-width: 1375px) {
  .menu-toggle { display: flex; }
  .brand { gap: 8px; }
  .brand-logo { height: 46px; }
  .brand-text img,
  .site-header.scrolled .brand-text img { height: clamp(30px, 6.2vw, 44px); }
  .main-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 82vw);
    background: var(--bg-body);
    padding: calc(var(--header-h) + 20px) 28px 28px;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .4s var(--ease), visibility 0s linear .4s;
  }
  .main-nav.open { transform: translateX(0); visibility: visible; transition: transform .4s var(--ease); overflow-y: auto; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav a { color: var(--primary-dark); font-size: 16px; padding: 12px 14px; }
  .main-nav a::after { display: none; }
  .menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.active span:nth-child(2) { opacity: 0; }
  .menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Dropdowns become accordions inside the mobile slide-in menu */
@media (max-width: 1375px) {
  .has-dropdown > a { justify-content: space-between; width: 100%; }
  .nav-caret { opacity: .85; }
  .has-dropdown.open > a .nav-caret { transform: rotate(180deg); }

  .dropdown {
    position: static;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(120,95,55,.1);
    border: none;
    border-radius: 12px;
    box-shadow: none;
    padding: 0 8px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s var(--ease), padding .4s var(--ease), margin .4s var(--ease);
  }
  .dropdown::before { display: none; }
  .has-dropdown.open > .dropdown {
    max-height: 640px;
    padding: 8px;
    margin: 4px 0 6px;
  }
  .dropdown ul, .dropdown-wide ul { display: flex; flex-direction: column; gap: 2px; }
  .dropdown-wide { min-width: 0; }
  .dropdown a {
    white-space: normal;
    color: var(--primary-dark);
    font-size: 14.5px;
    font-weight: 500;
    padding: 9px 14px;
  }
  .dropdown a::before { right: 4px; }
  .dropdown a:hover,
  .dropdown a:focus-visible { background: rgba(120,95,55,.13); }
}

@media (max-width: 900px) {
  .kufic-banner { --tile-h: 64px; height: 104px; }
  .banner-logos { gap: 36px; padding: 0 30px; width: auto; }
  .b-logo { height: 58px; }
  .b-logo-main { height: 68px; }
  .b-logo-fkrya { height: 60px; width: 38px; }
}

@media (max-width: 640px) {
  .header-inner { padding: 0 16px; }
  .brand { gap: 6px; }
  .brand-logo { height: 40px; }
  .brand-text img,
  .site-header.scrolled .brand-text img { height: clamp(26px, 7.5vw, 38px); }
  .kufic-banner { --tile-h: 48px; height: 86px; }
  .banner-logos { gap: 22px; padding: 0 16px; }
  .b-logo { height: 46px; }
  .b-logo-main { height: 54px; }
  .b-logo-fkrya { height: 48px; width: 30px; }
  .hero { padding: 8px; padding-top: calc(var(--header-h) + 8px); }
  .heroSwiper { height: clamp(560px, 80vh, 720px); border-radius: 20px; }
  .slide-content { padding: 0 24px; }
  .slide-cta { gap: 12px; }
  .btn { font-size: 14px; }
  .btn-primary { padding: 13px 24px; }
  .btn-ghost { padding: 13px 20px; }
  .hero-controls { right: 24px; left: 24px; bottom: 22px; gap: 12px; }
  .hero-arrow { width: 44px; height: 44px; }
}

/* ============================================================
   NEWS & ACTIVITIES SECTION
   ============================================================ */
.news-section {
  position: relative;
  padding: clamp(56px, 7vw, 96px) 0;
  overflow: hidden;
  background: rgb(231 221 203 / 66%);
}


.news-inner {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}

/* ── Header ── */
.news-header { text-align: center; margin-bottom: clamp(34px, 4vw, 56px); }
.news-header h2 {
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 900;
  color: var(--primary-dark);
  margin: 0;
  letter-spacing: -.5px;
  /* text-shadow: 0 2px 18px rgba(0,0,0,.35); */
}
.ornament { position: relative; display: block; width: 130px; height: 12px; margin: 14px auto 14px; }
.ornament::before {
  content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1.5px; transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
}
.ornament::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 9px; height: 9px;
  transform: translate(-50%, -50%) rotate(45deg); background: var(--accent);
}
.news-header p { font-size: clamp(14px, 1.4vw, 17px); color: var(--text-secondary); margin: 0; }

/* Scroll-reveal (progressive enhancement — hidden only after JS adds .reveal-ready) */
.news-header, .news-footer { transition: opacity .6s var(--ease), transform .6s var(--ease); }
.news-footer { transition-delay: .15s; }
.news-section.reveal-ready .news-header { opacity: 0; transform: translateY(-18px); }
.news-section.reveal-ready .news-footer { opacity: 0; transform: translateY(18px); }
.news-section.is-visible .news-header,
.news-section.is-visible .news-footer { opacity: 1; transform: translateY(0); }

/* ── Slider ── */
.news-slider-area { position: relative; }
.newsSwiper { overflow: hidden; padding: 10px 4px 8px; }
.newsSwiper .swiper-slide { height: auto; }

/* ── Card ── */
.news-card {
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  /* background: var(--surface); */
  box-shadow: 0 14px 40px -22px rgba(42,62,5,.5);
  border: 1px solid rgba(180,146,88,.18);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.news-card-link {
  display: flex; flex-direction: column; height: 100%;
  color: inherit; position: relative; overflow: hidden;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--i, 0) * .1s);
}
.news-section.reveal-ready .news-card-link { opacity: 0; transform: translateY(40px) scale(.97); }
.news-section.is-visible .news-card-link { opacity: 1; transform: none; }

/* Card top — image zone */
.news-card-top {
  position: relative;
  height: clamp(190px, 18vw, 240px);
  overflow: hidden;
  background: var(--surface-alt);
}
.news-card-top img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.news-card:hover .news-card-top img { transform: scale(1.06); }

/* Badge */
.news-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 4px 12px; border-radius: 6px;
  background: var(--primary-dark); color: #ffffff;
}

/* Card bottom — text */
.news-card-bottom {
  flex: 1; position: relative; z-index: 2;
  padding: 22px 22px 28px;
  background: var(--surface);
  transition: transform .4s var(--ease);
}
.news-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 10px;
  font-size: 12px; color: var(--secondary);
}
.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.news-card-meta svg { width: 15px; height: 15px; }
.news-card-date { color: var(--text-secondary); font-weight: 500; }
.news-card-views { font-weight: 600; }
.news-card-title {
  font-size: clamp(16px, 1.4vw, 18px); font-weight: 700;
  color: var(--primary-dark); line-height: 1.55; margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-desc {
  font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Reveal bar (slides up on hover) */
.news-card-reveal {
  position: absolute; inset: auto 0 0 0; z-index: 3;
  height: 44px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: var(--primary-dark);
  transform: translateY(100%);
  transition: transform .4s var(--ease);
}
.news-reveal-text { font-size: 12.5px; font-weight: 700; color: #fff; }
.news-card-reveal svg { stroke: #fff; }

/* Shine sweep */
.news-card-shine {
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%; z-index: 4; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
}

/* Hover */
.news-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 26px 50px -24px rgba(42,62,5,.55);
  border-color: rgba(180,146,88,.5);
}
.news-card:hover .news-card-bottom { transform: translateY(-44px); }
.news-card:hover .news-card-reveal { transform: translateY(0); }

/* ── Arrows ── */
.news-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; z-index: 10;
  display: grid; place-items: center; cursor: pointer;
  background: #ffffff; border: 1px solid #e5e0db;
  color: var(--primary);
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.news-arrow-prev { right: -55px; }
.news-arrow-next { left: -55px; }
.news-arrow:hover { background: var(--primary); color: #fff; }
.news-arrow.swiper-button-disabled { opacity: .35; cursor: default; }

/* ── Pagination ── */
.news-swiper-pagination {
  position: relative !important; margin-top: 22px;
  display: flex; justify-content: center; gap: 7px;
}
.news-swiper-pagination .swiper-pagination-bullet {
  width: 9px; height: 9px; border-radius: 6px; opacity: 1;
  background: rgba(255,255,255,.45); transition: width .3s var(--ease), background .3s var(--ease);
}
.news-swiper-pagination .swiper-pagination-bullet-active { width: 26px; background: var(--primary); }

/* ── Footer ── */
.news-footer { text-align: center; margin-top: clamp(24px, 3vw, 38px); }
.news-view-all {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 14.5px; color: #fff;
  background: var(--primary); padding: 13px 30px; border-radius: 12px;
  transition: background .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.news-view-all .arrow { transition: transform .3s var(--ease); }
.news-view-all:hover {
  background: var(--accent); transform: translateY(-2px);
}
.news-view-all:hover .arrow { transform: translateX(-5px); }

/* ── News responsive ── */
@media (max-width: 991px) {
  .news-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .news-card, .news-card-link, .news-card-bottom, .news-card-top img,
  .news-header, .news-footer { transition: none; }
  .news-card-link { opacity: 1; transform: none; }
  .news-card:hover { transform: none; }
  .news-card:hover .news-card-bottom { transform: none; }
  .news-card:hover .news-card-shine { animation: none; }
  .news-card-reveal { position: static; transform: none; height: auto; padding: 10px 20px; }
}

/* ============================================================
   MASS GRAVES MAP (خريطة الذاكرة) — premium dark archival section
   ============================================================ */
.cem {
  --cem-burgundy: #6E1F28;
  --cem-gold: #B8965A;
  --cem-gold-glow: #D8B06A;
  --cem-bg: #0D1016;
  --cem-bg2: #1A1F27;
  --cem-surface: #252B36;
  --cem-line: #3A414C;
  --cem-ink: #F5F2EB;
  --cem-ink2: #B6BBC4;
  --cem-danger: #8C2B32;

  position: relative;
  min-height: 100vh;
  padding: clamp(64px, 8vw, 120px) 0 clamp(56px, 6vw, 96px);
  background: radial-gradient(120% 90% at 50% -10%, #161b24 0%, var(--cem-bg) 55%), var(--cem-bg);
  color: var(--cem-ink);
  overflow: hidden;
  direction: rtl;
}

.cem-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    radial-gradient(60% 50% at 50% 0%, rgba(184,150,90,.10), transparent 70%),
    repeating-linear-gradient(45deg, rgba(184,150,90,.05) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-45deg, rgba(184,150,90,.05) 0 1px, transparent 1px 26px);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 35%, #000 30%, transparent 80%);
          mask-image: radial-gradient(80% 70% at 50% 35%, #000 30%, transparent 80%);
}

.cem-inner {
  position: relative;
  z-index: 2;
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 48px);
}

/* Header */
.cem-head { text-align: center; max-width: 760px; margin: 0 auto clamp(36px, 5vw, 64px); }
.cem-title {
  font-size: clamp(30px, 4.4vw, 56px); font-weight: 800; line-height: 1.2;
  margin: 0 0 16px; color: var(--cem-ink); letter-spacing: -.5px;
}
.cem-sub { font-size: clamp(15px, 1.4vw, 18px); line-height: 1.9; color: var(--cem-ink2); max-width: 620px; margin: 0 auto; }

/* Main 2-column (RTL ordering so map=right, panel=left; RTL text inside) */
.cem-main {
  direction: rtl;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 32%, 400px);
  gap: clamp(20px, 3vw, 44px);
  align-items: stretch;
}
.cem-map-col, .cem-panel { direction: rtl; }

/* Map */
.cem-map-col {
  position: relative;
  background: linear-gradient(160deg, rgba(37,43,54,.5), rgba(13,16,22,.2));
  border: 1px solid var(--cem-line);
  border-radius: 20px;
  padding: clamp(14px, 2.4vw, 32px);
  display: flex; flex-direction: column; gap: 14px;
}
.cem-map { position: relative; min-height: 280px; display: flex; align-items: center; justify-content: center; }
.cem-map svg { width: 100%; height: auto; max-height: 70vh; overflow: visible; display: block; }
.cem-map-loading { color: var(--cem-ink2); font-size: 14px; padding: 60px 0; }

.cem-map path[data-province] {
  stroke: #0D1016; stroke-width: 1.1; cursor: pointer;
  transform-box: fill-box; transform-origin: center;
  transition: transform .35s cubic-bezier(.22,.61,.36,1), filter .35s ease;
  will-change: transform, filter;
}
.cem-map path.cem-outline {
  fill: none !important; stroke: rgba(184,150,90,.22); stroke-width: 1; pointer-events: none;
}
.cem-map path[data-province]:hover,
.cem-map path[data-province].is-active {
  transform: scale(1.04);
  filter: brightness(1.4) drop-shadow(0 0 9px rgba(216,176,106,.6));
}
/* Hide the default focus rectangle on click; keep a glow for keyboard focus */
.cem-map path[data-province]:focus { outline: none; }
.cem-map path[data-province]:focus-visible {
  outline: none;
  filter: brightness(1.4) drop-shadow(0 0 9px rgba(216,176,106,.6));
}
.cem-map path[data-province].is-dim { filter: brightness(.62) saturate(.7); }

/* Grave-site markers */
.cem-marker { transform-box: fill-box; transform-origin: center; cursor: pointer; }
.cem-marker .mk-pulse { fill: var(--cem-gold-glow); transform-box: fill-box; transform-origin: center; animation: mkPulse 2.6s ease-out infinite; }
.cem-marker .mk-core { fill: var(--cem-gold-glow); stroke: #0D1016; stroke-width: .6; }
.cem-marker:hover .mk-core { fill: #fff; }
@keyframes mkPulse {
  0% { transform: scale(1); opacity: .55; }
  70% { transform: scale(3.4); opacity: 0; }
  100% { transform: scale(3.4); opacity: 0; }
}

/* Legend */
.cem-legend {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  padding-top: 6px; border-top: 1px solid var(--cem-line);
  font-size: 12.5px; color: var(--cem-ink2);
}
.cem-legend-title { font-weight: 700; color: var(--cem-ink); }
.cem-legend-item { display: inline-flex; align-items: center; gap: 7px; }
.cem-legend-item i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* Panel */
.cem-panel {
  position: relative;
  background: linear-gradient(165deg, rgba(37,43,54,.92), rgba(20,24,31,.92));
  backdrop-filter: blur(8px);
  border: 1px solid var(--cem-line);
  border-radius: 20px;
  padding: clamp(22px, 2vw, 30px);
  overflow: hidden;
  min-height: 420px;
}
.cem-panel::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--cem-gold), transparent);
  opacity: .7;
}
.cem-panel-empty {
  height: 100%; min-height: 360px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 14px; color: var(--cem-ink2);
}
.cem-panel-empty[hidden] { display: none; }
.cem-panel-empty svg { width: 56px; height: 56px; color: var(--cem-gold); opacity: .7; }
.cem-empty-title { font-size: 18px; font-weight: 700; color: var(--cem-ink); margin: 0; }
.cem-empty-text { font-size: 14px; line-height: 1.8; margin: 0; max-width: 240px; }

.cem-panel-detail { position: relative; }
.cem-panel-close {
  position: absolute; top: -4px; left: -4px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.05); border: 1px solid var(--cem-line);
  color: var(--cem-ink2); display: grid; place-items: center; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.cem-panel-close svg { width: 16px; height: 16px; }
.cem-panel-close:hover { background: var(--cem-burgundy); color: #fff; border-color: var(--cem-burgundy); }
.cem-panel-kicker { font-size: 14px; font-weight: 700; letter-spacing: 1px; color: var(--cem-gold); }
.cem-panel-name { font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; margin: 6px 0 22px; color: var(--cem-ink); }

.cem-panel-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.cem-pstat { background: rgba(13,16,22,.5); border: 1px solid var(--cem-line); border-radius: 12px; padding: 14px 8px; text-align: center; }
.cem-pstat-num { display: block; font-size: clamp(20px, 2vw, 26px); font-weight: 800; color: var(--cem-gold); font-variant-numeric: tabular-nums; }
.cem-pstat-label { display: block; font-size: 11.5px; color: var(--cem-ink2); margin-top: 4px; }

.cem-sites { margin-bottom: 26px; }
.cem-sites-title { display: block; font-size: 13px; font-weight: 700; color: var(--cem-ink); margin-bottom: 12px; }
.cem-sites-list { display: flex; flex-direction: column; gap: 8px; }
.cem-sites-list li {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  background: rgba(13,16,22,.4);
  border: 1px solid var(--cem-line); border-right: 2px solid var(--cem-gold);
  border-radius: 8px;
  overflow: hidden;
  transition: transform .28s var(--ease), background .28s var(--ease),
              border-color .28s var(--ease), box-shadow .28s var(--ease);
}
/* location pin marker (drawn via mask so it inherits the gold accent) */
.cem-sites-list li::before {
  content: ""; flex-shrink: 0;
  width: 15px; height: 18px;
  background-color: var(--cem-gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .28s var(--ease);
}
.cem-sites-list li a {
  flex: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0;
  font-size: 14px; color: var(--cem-ink2);
  transition: color .28s var(--ease);
}
.cem-sites-list .site-go {
  flex-shrink: 0;
  color: var(--cem-gold); font-size: 16px; line-height: 1;
  opacity: 0; transform: translateX(6px);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}
/* hover: gentle slide forward + reveal arrow + lift the pin */
.cem-sites-list li:hover,
.cem-sites-list li:focus-within {
  transform: translateX(-4px);
  background: rgba(13,16,22,.62);
  border-color: var(--cem-gold);
  box-shadow: -7px 0 20px -10px rgba(201,166,107,.55);
}
.cem-sites-list li:hover::before,
.cem-sites-list li:focus-within::before { transform: translateY(-2px) scale(1.08); }
.cem-sites-list li:hover a,
.cem-sites-list li:focus-within a { color: var(--cem-ink); }
.cem-sites-list li:hover .site-go,
.cem-sites-list li:focus-within .site-go { opacity: 1; transform: translateX(0); }

.cem-panel-btn {
  display: inline-flex; align-items: center; gap: 10px;
  width: 100%; justify-content: center;
  padding: 13px 20px; border-radius: 10px;
  border: 1px solid var(--cem-gold); color: var(--cem-gold);
  font-family: inherit; font-weight: 700; font-size: 14.5px; background: transparent;
  transition: background .3s, color .3s;
}
.cem-panel-btn .arrow { transition: transform .3s; }
.cem-panel-btn:hover { background: var(--cem-gold); color: #0D1016; }
.cem-panel-btn:hover .arrow { transform: translateX(-5px); }

/* Stats row */
.cem-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 2vw, 26px); margin-top: clamp(32px, 4vw, 56px); }
.cem-stat {
  text-align: center; padding: clamp(20px, 2.4vw, 32px) 16px;
  background: linear-gradient(165deg, rgba(37,43,54,.45), rgba(13,16,22,.2));
  border: 1px solid var(--cem-line); border-radius: 16px;
}
.cem-stat-num { display: block; font-size: clamp(30px, 4vw, 52px); font-weight: 800; line-height: 1; color: var(--cem-gold); font-variant-numeric: tabular-nums; }
.cem-stat-label { display: block; margin-top: 12px; font-size: clamp(12px, 1.2vw, 15px); color: var(--cem-ink2); }

/* Tooltip */
.cem-tooltip {
  position: fixed; top: 0; left: 0; z-index: 80; pointer-events: none;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 16px; border-radius: 12px;
  background: rgba(13,16,22,.82); backdrop-filter: blur(10px);
  border: 1px solid rgba(184,150,90,.55); box-shadow: 0 16px 40px rgba(0,0,0,.5);
  opacity: 0; transform: translate(-50%, calc(-100% - 14px)) scale(.9);
  transition: opacity .2s ease, transform .2s ease; white-space: nowrap;
}
.cem-tooltip.show { opacity: 1; transform: translate(-50%, calc(-100% - 14px)) scale(1); }
.cem-tip-name { font-size: 15px; font-weight: 700; color: var(--cem-ink); }
.cem-tip-graves { font-size: 12.5px; color: var(--cem-gold); }

/* Responsive */
@media (max-width: 980px) {
  .cem-main { grid-template-columns: 1fr; }
  .cem-map svg { max-height: 64vh; }
  .cem-panel {
    position: fixed; inset: auto 0 0 0; z-index: 70;
    min-height: 0; max-height: 82vh; overflow-y: auto;
    border-radius: 22px 22px 0 0;
    transform: translateY(110%);
    transition: transform .5s cubic-bezier(.22,.61,.36,1);
    box-shadow: 0 -20px 60px rgba(0,0,0,.6);
  }
  .cem-panel.is-open { transform: translateY(0); }
  .cem-panel-empty { display: none; }
}
@media (max-width: 560px) {
  .cem-stats { grid-template-columns: repeat(2, 1fr); }
  .cem-panel-stats { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .cem-map path[data-province] { transition: filter .2s ease; }
  .cem-map path[data-province]:hover,
  .cem-map path[data-province].is-active { transform: none; }
  .cem-marker .mk-pulse { animation: none; }
}

/* ============================================================
   DOCUMENTS ARCHIVE (الوثائق) — light documentary theme
   ============================================================ */
.docs {
  --doc-bg: #F8F5EF;
  --doc-card: #FAFAF7;
  --doc-border: #D6CFC2;
  --doc-text: #2E2E2E;
  --doc-text2: #666666;
  --doc-accent: #8B6F47;
  --doc-btn-border: #B5A58D;

  background: var(--bg-body);
  padding: 65px clamp(18px, 5vw, 48px);
  direction: rtl;
}
.docs-inner { max-width: 1400px; margin: 0 auto; }

/* Header */
.docs-head { text-align: center; margin-bottom: 60px; }
.docs-title {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -.5px;
}
.docs-sub {
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 500;
  color: var(--doc-text2);
  line-height: 1.9;
  max-width: 620px;
  margin: 0 auto;
}

/* Grid */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
@media (max-width: 992px) { .docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@media (max-width: 600px) { .docs-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; } }

/* Card */
.doc-card {
  position: relative;
  height: 475px;
  /* background: var(--bg-body); */
  /* border: 1px solid var(--doc-border); */
  border-radius: 12px;
  /* overflow: hidden; */
  /* box-shadow: 0 6px 22px -12px rgba(46,46,46,.22); */
  display: flex;
  flex-direction: column;
  transition: box-shadow .4s cubic-bezier(.22,.61,.36,1);
}
@media (max-width: 992px) { .doc-card { height: 460px; } }
@media (max-width: 600px) { .doc-card { height: 420px; } }

/* Image area — shows only the upper part of the document */
.doc-media {
  position: relative;
  height: 80%;
padding: 0 15px;
}
.doc-img {
  width: 100%;
  height: calc(100% + 26px);   /* slight overscan so the hover lift leaves no gap */
  object-fit: fill;
  object-position: center top;
  filter: grayscale(65%) brightness(.93);
  transition: transform .4s cubic-bezier(.22,.61,.36,1);
      border-radius: 12px;

}
.doc-card:hover .doc-img { transform: translateY(-20px); }

/* Torn-paper separator — straddles the image/content seam */
.doc-torn {
  position: absolute;
  left: 0; right: 0;
  top: calc(73% - 40px);
  width: 100%;
  height: 88px;
  object-fit: cover;
  object-position: top ;
  z-index: 3;
  pointer-events: none;
}

.doc-torn1{
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(8% - 45px);
    width: 100%;
    height: 88px;
    object-fit: cover;
    object-position: top;
    z-index: 3;
    pointer-events: none;
    transform: rotate(180deg);
}

/* Content — boxed inside the torn-paper band at the bottom of the card */
.doc-body {
  position: absolute;
  left: 0; right: 0;
  top: 70%;                      /* aligns with the top torn edge */
  bottom: 0;                     /* down to the card bottom (lower torn edge) */
  z-index: 4;                    /* above both torn-paper layers */
  display: flex;
  flex-direction: column;
  align-items: center;           /* horizontal centering */
  justify-content: center;       /* vertical centering inside the band */
  text-align: center;
  gap: 10px;
  padding: 6px clamp(14px, 2vw, 24px) 10px;
}
.doc-title-c {
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 600;
  color: var(--doc-text);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* reserve a uniform 2-line block so the link Y is identical on every card */
  min-height: calc(1.6em * 2);
}
/* link sits directly under the (fixed-height) title, centered in the band */
.doc-body .doc-link { margin-top: 0; }
.doc-btn {
  display: inline-block;
  padding: 14px 28px;
  border: 1px solid var(--doc-btn-border);
  border-radius: 8px;
  color: var(--doc-accent);
  font-family: inherit;
  font-weight: 500;
  font-size: 14.5px;
  background: transparent;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.doc-btn:hover {
  background: var(--doc-accent);
  border-color: var(--doc-accent);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .doc-img, .doc-card { transition: none; }
  .doc-card:hover .doc-img { transform: none; }
}

/* "التفاصيل" simple link — underlined word + arrow beside it */
.docs { --doc-link: #D32F2F; }
.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--doc-accent);
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
}
.doc-link-text {
  border-bottom: 1.6px solid currentColor;
  padding-bottom: 4px;
}
.doc-link-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform .3s var(--ease);
}
.doc-link:hover .doc-link-arrow { transform: translateX(-5px); }

/* Documents slider (Swiper) — keeps all card styling */
.docsSwiper { position: relative;  padding: 0px 0px 34px; }
.docsSwiper .swiper-slide { height: auto; display: flex; }
.docsSwiper .swiper-slide > .doc-card { width: 100%; }

/* Navigation arrows */
.docs-arrow {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  z-index: 6;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  background: var(--doc-card, #FAFAF7);
  border: 1px solid var(--doc-btn-border, #B5A58D);
  color: var(--doc-accent, #8B6F47);
  box-shadow: 0 6px 18px -8px rgba(46,46,46,.3);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.docs-arrow svg { width: 20px; height: 20px; }
.docs-arrow:hover { background: var(--doc-accent, #8B6F47); border-color: var(--doc-accent, #8B6F47); color: #fff; }
.docs-prev { right: 2px; }   /* RTL: previous on the right */
.docs-next { left: 2px; }
.docs-arrow.swiper-button-disabled { opacity: .35; cursor: default; box-shadow: none; }

/* Pagination */
.docs-pagination {
  position: absolute;
  bottom: 14px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 7px;
}
.docs-pagination .swiper-pagination-bullet {
  width: 9px; height: 9px; border-radius: 6px; opacity: 1;
  background: var(--doc-btn-border, #B5A58D);
  transition: width .3s var(--ease), background .3s var(--ease);
}
.docs-pagination .swiper-pagination-bullet-active { width: 26px; background: var(--doc-accent, #8B6F47); }

@media (max-width: 600px) {
  .docs-arrow { width: 40px; height: 40px; top: 34%; }
}

/* ============================================================
   INTELLECTUAL PUBLICATIONS (النتاج الفكري) — premium dark editorial
   ============================================================ */
.pubs {
  --pub-bg: #F4EFE6;          /* warm ivory section background */
  --pub-gold: #A77E3C;        /* deep antique gold (reads on light) */
  --pub-text: #36302A;        /* dark archival ink */
  --pub-text2: #756A5B;       /* muted secondary */

  position: relative;
  background: var(--pub-bg);
  color: var(--pub-text);
  padding: clamp(64px, 8vw, 120px) 0;
  direction: rtl;
  overflow: hidden;
}
.pubs::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 50% at 50% 0%, rgba(167,126,60,.07), transparent 70%);
}
.pubs-inner { position: relative; z-index: 2; max-width: 1340px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 48px); }

/* Header */
.pubs-head { text-align: center; max-width: 720px; margin: 0 auto clamp(26px, 3.4vw, 40px); }

.pubs-title {
  font-size: clamp(30px, 4.2vw, 50px); font-weight: 800; 
color: var(--primary-dark); letter-spacing: -.5px;
}
.pubs-sub { font-size: clamp(15px, 1.4vw, 18px); line-height: 1.9; color: var(--pub-text2); margin: 0; }

/* Filter tabs */
.pubs-tabs {
  display: flex; flex-wrap: nowrap; justify-content: start; gap: 10px;
  margin: 0 auto clamp(34px, 4vw, 52px);
}
.pubs-tab {
  font-family: inherit; font-size: 14px; font-weight: 600;
  color: #6f6453; cursor: pointer;
  background: transparent;
  border: 1px solid rgba(120,95,55,.3);
  border-radius: 8px;
  padding: 6px 16px;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
  
}
.pubs-tab:hover { border-color: var(--pub-gold); color: var(--pub-gold); }
.pubs-tab.is-active { background: var(--pub-gold); border-color: var(--pub-gold); color: #FBF7EE; }

/* Grid */
.pubs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2vw, 30px);
}
@media (max-width: 900px) { .pubs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .pubs-grid { grid-template-columns: minmax(0, 1fr); } }

/* Card — vintage paper background */
.pubs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: 28px 26px 24px;
  border-radius: 18px;
  background: #d9d3c8;
  border: 1px solid rgba(120,95,55,.3);
  box-shadow: 0 12px 30px -18px rgba(80,60,30,.4);
  overflow: hidden;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}
.pubs-card.is-hidden { display: none; }
/* paper image as its own layer so its opacity is controllable */
.pubs-card::before {
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url('../images/bookback1.png') left / cover;
  opacity: 0.45;
}
/* soft worn vignette over the paper — adds depth + lifts readability */
.pubs-card::after {
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 42%, rgba(250,246,238,.32), transparent 70%),
    radial-gradient(120% 90% at 0% 0%, rgba(90,62,28,.12), transparent 45%),
    radial-gradient(120% 90% at 100% 100%, rgba(90,62,28,.12), transparent 45%);
}
.pubs-card > * { position: relative; z-index: 1; }
.pubs-card { cursor: pointer; }
.pubs-card:hover {
  transform: translateY(-10px) scale(1.012);
  box-shadow: 0 34px 56px -24px rgba(80,58,26,.5);
  border-color: rgba(180,146,88,.7);
  transition-delay: 0s;          /* keep hover snappy regardless of reveal stagger */
}
.pubs-card:hover .pubs-card-title { color: var(--primary); }
.pubs-card:hover .pubs-avatar { border-color: var(--accent); }

/* Badge */
.pubs-badge {
  align-self: flex-start;
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
  color: #6e5631;
  border: 1px solid rgba(120,95,55,.45);
  padding: 5px 14px; border-radius: 8px;
  background: rgba(255,253,248,.5);
}

/* Title — fills most of the card */
.pubs-card-title {
  flex: 1;
  font-size: clamp(19px, 1.7vw, 25px);
  font-weight: 800;
  line-height: 1.55;
  color: var(--pub-text);
  margin: 22px 0 24px;
  transition: color .35s var(--ease);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer: author + read-more */
.pubs-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(120,95,55,.3);
}
.pubs-author { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pubs-avatar {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700;
  color: #6e5631;
  background: rgba(255,253,248,.6);
  border: 1px solid rgba(120,95,55,.45);
  transition: border-color .35s var(--ease);
}
.pubs-author-meta { min-width: 0; }
.pubs-author-name { display: block; font-size: 14.5px; font-weight: 700; color: #3a342c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pubs-more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 700; color: var(--pub-gold);
  white-space: nowrap; flex-shrink: 0;
  opacity: 0; transform: translateX(8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.pubs-more svg { width: 15px; height: 15px; }
.pubs-card:hover .pubs-more { opacity: 1; transform: none; }

/* Sequential fade-in (progressive enhancement, armed by JS) */
.pubs-card { transition-delay: 0s; }
.pubs.reveal-ready .pubs-card { opacity: 0; transform: translateY(30px); }
.pubs.is-in .pubs-card {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
  transition-delay: calc(var(--i, 0) * .12s);
}

@media (max-width: 600px) {
  .pubs-more { opacity: 1; transform: none; }   /* touch: always visible */
}
@media (prefers-reduced-motion: reduce) {
  .pubs-card, .pubs.is-in .pubs-card { transition: none; }
  .pubs.reveal-ready .pubs-card { opacity: 1; transform: none; }
  .pubs-card:hover { transform: none; }
}


/* ============================================================
   ENCYCLOPEDIAS (موسوعات المركز) — expanding accordion gallery
   ============================================================ */
.enc {
  position: relative;
  background: #f3eee35c;
  padding: clamp(60px, 8vw, 110px) clamp(16px, 4vw, 40px);
  direction: rtl;
  overflow: hidden;
}
/* cross-hatch geometric backdrop (matches .books-decor, tuned to this section) */
.enc::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: .55;
  background-image:
    repeating-linear-gradient(45deg, rgba(62,90,10,.045) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(-45deg, rgba(62,90,10,.045) 0 1px, transparent 1px 28px);
  -webkit-mask-image: radial-gradient(80% 80% at 50% 30%, #000 25%, transparent 80%);
          mask-image: radial-gradient(80% 80% at 50% 30%, #000 25%, transparent 80%);
}
.enc-container { position: relative; z-index: 1; width: 100%; max-width: 1300px; margin: 0 auto; }

/* Header */
.enc-header { text-align: center; max-width: 800px; margin: 0 auto clamp(34px, 4vw, 52px); }
.enc-header h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 900; color: var(--primary-dark); margin: 0 0 14px; letter-spacing: -.5px; }
.enc-title-line { display: block; width: 120px; height: 12px; margin: 0 auto 16px; position: relative; }
.enc-title-line::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1.5px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.enc-title-line::after { content: ""; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; transform: translate(-50%,-50%) rotate(45deg); background: var(--accent); }
.enc-header p { font-size: clamp(14px, 1.4vw, 17px); color: var(--text-secondary); line-height: 1.9; margin: 0; }

/* Cards grid (active track expands) */
.enc-cards {
  display: grid; width: 100%; gap: 10px; list-style: none; padding: 0; margin: 0;
  height: clamp(420px, 46vw, 520px);
  transition: grid-template-columns .55s var(--ease), grid-template-rows .55s var(--ease);
}
@media (min-width: 768px) { .enc-cards { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr; } }
@media (max-width: 767px) { .enc-cards { grid-template-columns: 1fr; grid-template-rows: repeat(3, 1fr); height: 560px; } }

/* Card */
.enc-card {
  position: relative; overflow: hidden; border-radius: 16px; cursor: pointer;
  min-width: 0; min-height: 0;
  box-shadow: 0 16px 44px -22px rgba(42,62,5,.55);
  transition: transform .3s var(--ease);
}
.enc-card:hover { transform: translateY(-2px); }
.enc-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.enc-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: grayscale(100%); transform: scale(1.08);
  transition: filter .6s var(--ease), transform .6s var(--ease);
}
.enc-card.active .enc-img { filter: grayscale(0%); transform: scale(1); }

.enc-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,28,6,.92) 0%, rgba(20,28,6,.45) 50%, rgba(20,28,6,.05) 100%);
}

/* Vertical label (inactive) */
.enc-label {
  position: absolute; bottom: 1.1rem; right: 1.1rem; z-index: 2;
  writing-mode: vertical-rl; text-orientation: mixed;
  font-size: 14px; font-weight: 600; letter-spacing: .04em;
  color: rgba(245,242,235,.92); text-shadow: 0 2px 8px rgba(0,0,0,.5);
  opacity: 1; transition: opacity .3s var(--ease);
}
.enc-card.active .enc-label { opacity: 0; }
@media (max-width: 767px) {
  .enc-label { writing-mode: horizontal-tb; inset: auto auto 50% 50%; transform: translate(50%, 50%); }
}

/* Content (revealed on active) */
.enc-content {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(1.2rem, 2vw, 1.9rem); gap: .5rem; text-align: right;
}
.enc-content > * { opacity: 0; transform: translateY(18px); }
.enc-card.active .enc-year  { opacity: 1; transform: none; transition: opacity .4s ease .16s, transform .4s var(--ease) .16s; }
.enc-card.active .enc-title { opacity: 1; transform: none; transition: opacity .4s ease .22s, transform .4s var(--ease) .22s; }
.enc-card.active .enc-desc  { opacity: 1; transform: none; transition: opacity .4s ease .28s, transform .4s var(--ease) .28s; }
.enc-card.active .enc-link  { opacity: 1; transform: none; transition: opacity .4s ease .34s, transform .4s var(--ease) .34s; }

.enc-year {
  align-self: flex-start;
  font-size: 12.5px; font-weight: 700; color: #F3EEE3;
  border: 1px solid rgba(180,146,88,.7); border-radius: 7px;
  padding: 3px 12px; font-variant-numeric: tabular-nums;
  background: rgba(180,146,88,.18);
}
.enc-title { font-size: clamp(20px, 2vw, 28px); font-weight: 800; color: #fff; margin: 4px 0 0; line-height: 1.45; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.enc-desc { font-size: clamp(13px, 1.1vw, 15px); color: rgba(245,242,235,.85); line-height: 1.7; max-width: 420px; margin: 0; }
.enc-link {
  align-self: flex-start; margin-top: .6rem;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 9px;
  background: var(--accent); color: var(--primary-dark);
  font-weight: 700; font-size: 14px;
  box-shadow: 0 8px 22px -8px rgba(180,146,88,.6);
  transition: background .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.enc-link svg { width: 16px; height: 16px; }
.enc-link:hover { background: #c9a86a; transform: translateY(-2px); box-shadow: 0 12px 26px -8px rgba(180,146,88,.7); }
.enc-link:hover svg { transform: translateX(-4px); transition: transform .3s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .enc-img, .enc-cards, .enc-content > * { transition: none; }
  .enc-content > * { opacity: 1; transform: none; }
}


/* ============================================================
   BOOKS CENTER (مركز الكتب) — magazine slider + 3D book mockups
   ============================================================ */
.books {
  position: relative;
  background: radial-gradient(90% 60% at 50% 0%, #f3eee35c 0%, var(--bg) 60%), var(--bg);
  padding: clamp(64px, 8vw, 110px) 0;
  direction: rtl;
  overflow: hidden;
}
.books-decor {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    repeating-linear-gradient(45deg, rgba(62,90,10,.04) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(-45deg, rgba(62,90,10,.04) 0 1px, transparent 1px 28px);
  -webkit-mask-image: radial-gradient(80% 80% at 50% 30%, #000 25%, transparent 80%);
          mask-image: radial-gradient(80% 80% at 50% 30%, #000 25%, transparent 80%);
}
.books-inner { position: relative; z-index: 2; max-width: 1340px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 48px); }

/* Header */
.books-head { position: relative; text-align: center; margin-bottom: clamp(36px, 4vw, 58px); }
.books-title { font-size: clamp(30px, 4vw, 48px); font-weight: 900; color: var(--primary-dark); letter-spacing: -.5px; }
.books-sub { font-size: clamp(14px, 1.4vw, 17px); color: var(--text-secondary); max-width: 600px; margin: 0 auto; line-height: 1.9; }
/* Slider shell */
.books-slider { position: relative; }
.booksSwiper { overflow: hidden; padding: 14px 6px 50px; }
.booksSwiper .swiper-slide { height: auto; }

/* Card — book + title + date, centered column */
.books-card {
  display: flex; align-items: center; gap: clamp(14px, 1.6vw, 22px);
  flex-direction: column;
  height: 100%;
  border-radius: 18px;
  transition: transform .5s var(--ease), filter .5s var(--ease), opacity .5s var(--ease);
}
/* Coverflow emphasis: side cards = smaller + black & white; center = larger + color */
.booksSwiper .swiper-slide .books-card { transform: scale(.78); filter: grayscale(1) brightness(.97); opacity: .68; }
.booksSwiper .swiper-slide-active .books-card { transform: scale(1); filter: grayscale(0); opacity: 1; }

/* 3D book mockup */
.book { position: relative; flex-shrink: 0; width: clamp(150px, 15vw, 200px); aspect-ratio: 1 / 1.42; perspective: 2000px; }
.book-cover {
  position: absolute; inset: 0;
  border-radius: 2px 6px 6px 2px;
  overflow: hidden;
  background: #e9e3d6;
  box-shadow: -11px 16px 26px -12px rgba(30,30,30,.42), 0 2px 6px rgba(30,30,30,.18);
  transform: rotateY(-11deg);
  transform-origin: right center;
  backface-visibility: hidden;       /* sharper layer rasterization */
  -webkit-backface-visibility: hidden;
  transition: transform .55s var(--ease), box-shadow .55s var(--ease);
}
/* real cover image fills the book face */
.book-cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
/* binding sheen on the right edge + page edge on the left, above the image */
.book-cover::before {
  content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 12px; z-index: 2;
  background: linear-gradient(270deg, rgba(0,0,0,.32), rgba(255,255,255,.16) 55%, transparent);
}
.book-cover::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 4px; z-index: 2;
  background: linear-gradient(90deg, rgba(255,255,255,.5), rgba(0,0,0,.12));
}
.books-card:hover .book-cover { transform: rotateY(-1deg) translateY(-1px); box-shadow: -15px 22px 32px -12px rgba(30,30,30,.48), 0 2px 6px rgba(30,30,30,.18); }

.book-cover-inner {
  position: absolute; inset: 9px;
  border: 1px solid rgba(180,146,88,.5);
  border-radius: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 9px; padding: 12px 9px;
}
.book-ornament { width: 9px; height: 9px; transform: rotate(45deg); background: var(--accent); flex-shrink: 0; }
.book-cover-title {
  font-size: clamp(11px, .95vw, 13px); font-weight: 800; line-height: 1.5; color: #F3EEE3;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.book-cover-org { margin-top: auto; font-size: 7.5px; font-weight: 600; letter-spacing: .2px; color: rgba(180,146,88,.95); }
.book-shadow {
  position: absolute; left: -2%; right: 8%; bottom: -12px; height: 16px; z-index: -1;
  background: radial-gradient(closest-side, rgba(30,30,30,.3), transparent 75%);
  filter: blur(5px);
}

/* Info side */
.book-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.book-title {
  font-size: clamp(16px, 1.5vw, 20px); font-weight: 800; line-height: 1.5; color: var(--text-primary);
  margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.book-desc {
  font-size: 13.5px; line-height: 1.8; color: var(--text-secondary); margin: 0 0 18px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.book-btn {
  align-self: flex-start; margin-top: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 13.5px; color: var(--primary);
  padding: 10px 20px; border: 1px solid rgba(62,90,10,.35); border-radius: 9px;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.book-btn .arrow { transition: transform .3s var(--ease); }
.book-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.book-btn:hover .arrow { transform: translateX(-4px); }

/* Arrows */
.books-arrow {
  position: absolute; top: 42%; transform: translateY(-50%); z-index: 6;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-color1);
  color: var(--primary); box-shadow: 0 8px 20px -10px rgba(42,62,5,.35);
  transition: background .3s var(--ease), color .3s var(--ease), transform .25s var(--ease);
}
.books-arrow svg { width: 20px; height: 20px; }
.books-arrow:hover { background: var(--primary); color: #fff; }
.books-prev { right: -6px; }
.books-next { left: -6px; }
.books-arrow.swiper-button-disabled { opacity: .35; cursor: default; }

/* Pagination */
.books-pagination { position: absolute !important; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 7px; }
.books-pagination .swiper-pagination-bullet { width: 9px; height: 9px; border-radius: 6px; opacity: 1; background: var(--surface-alt); transition: width .3s var(--ease), background .3s var(--ease); }
.books-pagination .swiper-pagination-bullet-active { width: 26px; background: var(--primary); }

/* Responsive */
@media (max-width: 768px) { .books-arrow { display: none; } }
@media (max-width: 480px) {
  .books-card { flex-direction: column; text-align: center; }
  .book-info { align-items: center; }
  .book { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .books-card, .book-cover { transition: none; }
  .books-card:hover { transform: none; }
  .books-card:hover .book-cover { transform: rotateY(-22deg); }
}

/* ============================================================
   VIDEO LIBRARY (المكتبة الفيديوية) — premium dark olive/gold
   ============================================================ */
.vlib {
  --v-gold: #B49258;
  --v-gold-dark: #8a6a38;       /* gold text on light surfaces */
  --v-cream: #F3EEE3;           /* light text — used ONLY over the featured image */
  --v-text: #1E1E1E;
  --v-muted: #5A5A5A;
  --v-card: #FFFFFF;
  --v-border: #e3dccb;

  position: relative;
  padding: clamp(60px, 8vw, 110px) clamp(16px, 4vw, 40px);
  background: #f3eee35c;
  color: var(--v-text);
  direction: rtl;
  overflow: hidden;
}
.vlib-glow {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(180,146,88,.10); filter: blur(90px);
}
.vlib-glow--tr { top: -6rem; left: -6rem; width: 24rem; height: 24rem; }
.vlib-glow--bl { bottom: -6rem; right: -6rem; width: 20rem; height: 20rem; }

.vlib-container { position: relative; z-index: 2; max-width: 1300px; margin: 0 auto; }

/* Header */
.vlib-header { text-align: center; max-width: 720px; margin: 0 auto clamp(36px, 4vw, 58px); }
.vlib-title { font-size: clamp(30px, 4vw, 48px); font-weight: 900; color: var(--primary-dark); margin: 0 0 14px; letter-spacing: -.5px; }
.vlib-ornament { display: block; width: 120px; height: 12px; margin: 0 auto 16px; position: relative; }
.vlib-ornament::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--v-gold), transparent); }
.vlib-ornament::after { content: ""; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; transform: translate(-50%,-50%) rotate(45deg); background: var(--v-gold); }
.vlib-sub { font-size: clamp(14px, 1.4vw, 17px); color: var(--v-muted); line-height: 1.9; margin: 0; }

/* Content layout */
.vlib-content { display: flex; flex-direction: column; gap: clamp(18px, 2vw, 28px); align-items: stretch; }
@media (min-width: 1024px) {
  .vlib-content { flex-direction: row; }
  .vlib-content > .vlib-featured { width: 57%; }
  .vlib-content > .vlib-list { width: 43%; }
}

/* Featured video */
.vlib-featured { width: 100%; }
.vlib-feature-card {
  position: relative; height: 100%; min-height: clamp(340px, 44vw, 480px);
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--v-border);
  box-shadow: 0 24px 60px -28px rgba(0,0,0,.7);
}
.vlib-feature-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transition: transform 1s var(--ease);
}
.vlib-feature-card:hover .vlib-feature-bg { transform: scale(1.05); }
.vlib-feature-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,20,4,.96) 0%, rgba(15,20,4,.55) 45%, rgba(15,20,4,.12) 100%);
}
.vlib-feature-body {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  padding: clamp(20px, 3vw, 40px); gap: 16px;
}
.vlib-feature-title {
  font-size: clamp(22px, 2.6vw, 34px); font-weight: 800; line-height: 1.4;
  color: #fff; margin: 0; max-width: 520px; text-shadow: 0 2px 14px rgba(0,0,0,.5);
  transition: color .3s var(--ease);
}
.vlib-feature-card:hover .vlib-feature-title { color: var(--v-gold); }

/* shared duration chip */
.vlib-duration {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--v-cream);
  background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.12);
  padding: 5px 12px; border-radius: 8px; backdrop-filter: blur(6px);
  font-variant-numeric: tabular-nums;
}
.vlib-duration svg { width: 14px; height: 14px; color: var(--v-gold); }

/* Play button */
.vlib-play-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--v-gold); color: #1d2606;
  padding: 8px 22px 8px 8px; border: none; border-radius: 50px;
  font-family: inherit; font-weight: 800; font-size: 15px; cursor: pointer;
  box-shadow: 0 10px 26px -8px rgba(180,146,88,.6);
  transition: background .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.vlib-play-ico {
  width: 40px; height: 40px; flex-shrink: 0;
  background: #1d2606; color: var(--v-gold);
  border-radius: 50%; display: grid; place-items: center;
  transition: transform .3s var(--ease);
}
.vlib-play-ico svg { width: 18px; height: 18px; margin-right: 1px; }
.vlib-play-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -10px rgba(180,146,88,.7); }
.vlib-play-btn:hover .vlib-play-ico { transform: scale(1.08); }

/* Video list */
.vlib-list { width: 100%; display: flex; flex-direction: column; gap: clamp(12px, 1.4vw, 18px); }

/* Episode card (enlarged, uniform) */
.vlib-episode {
  display: flex; align-items: center; gap: clamp(14px, 1.4vw, 20px);
  background: rgb(42 62 5 / 12%);
  padding: clamp(12px, 1.2vw, 16px);
  border: 1px solid var(--v-border); border-radius: 16px;
  color: inherit; cursor: pointer;
  box-shadow: 0 10px 26px -20px rgba(42,62,5,.4);
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.vlib-episode:hover {
  border-color: rgba(180,146,88,.6); background: rgb(42 62 5 / 25%);
  transform: translateY(-3px); box-shadow: 0 18px 34px -20px rgba(42,62,5,.4);
}
.vlib-ep-thumb {
  position: relative; flex-shrink: 0;
  width: clamp(112px, 11vw, 150px); aspect-ratio: 16 / 11;
  border-radius: 12px; overflow: hidden;
}
.vlib-ep-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .5s var(--ease); }
.vlib-episode:hover .vlib-ep-img { transform: scale(1.08); }
.vlib-ep-overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(15,20,4,.32); transition: background .3s var(--ease);
}
.vlib-episode:hover .vlib-ep-overlay { background: rgba(15,20,4,.15); }
.vlib-ep-play-big{
    width: 60px; height: 60px; border-radius: 50%;
  background: rgba(180,146,88,.92); color: #1d2606;
  display: grid; place-items: center;
  transform: scale(.85); transition: opacity .3s var(--ease), transform .3s var(--ease);
  z-index: 3;
}





.vlib-ep-play {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(180,146,88,.92); color: #1d2606;
  display: grid; place-items: center;
  opacity: 1; transform: scale(.85); transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.vlib-ep-play svg { width: 16px; height: 16px; margin-right: 1px; }
.vlib-episode:hover .vlib-ep-play { transform: scale(1); }

.vlib-ep-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.vlib-ep-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vlib-ep-cat {
  font-size: 11.5px; font-weight: 700; color: var(--v-gold-dark);
  background: rgba(180,146,88,.14); padding: 3px 10px; border-radius: 6px;
}

.vlib-ep-title {
  font-size: clamp(15px, 1.3vw, 17px); font-weight: 700; line-height: 1.5; color: var(--v-text); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .3s var(--ease);
}
.vlib-episode:hover .vlib-ep-title { color: var(--primary); }

/* CTA */
.vlib-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: auto; padding: 15px; border-radius: 14px;
  background: var(--primary);
  color: #fff; font-weight: 700; font-size: 14.5px;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.vlib-cta svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.vlib-cta:hover { background: var(--accent); color: #fff;  }
.vlib-cta:hover svg { transform: translateX(-4px); }

@media (max-width: 460px) {
  .vlib-episode { flex-direction: column; align-items: stretch; }
  .vlib-ep-thumb { width: 100%; aspect-ratio: 16 / 9; }
}
@media (prefers-reduced-motion: reduce) {
  .vlib-feature-bg, .vlib-ep-img, .vlib-episode, .vlib-play-btn { transition: none; }
  .vlib-feature-card:hover .vlib-feature-bg, .vlib-episode:hover .vlib-ep-img { transform: none; }
}

/* Featured play button — centered, glowing pulse */
.vlib-feature-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 3; width: 6rem; height: 6rem;
  display: grid; place-items: center;
  background: none; border: none; padding: 0; cursor: pointer; pointer-events: auto;
}
.vlib-fp-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(180,146,88,.7);
  animation: vlibPing 2.4s cubic-bezier(.22,.61,.36,1) infinite;
}
/* .vlib-fp-ring--2 { animation-delay: 2.2s; } */
.vlib-fp-inner {
  position: relative; z-index: 1;
  width: 4rem; height: 4rem; border-radius: 50%;
  background: rgba(180,146,88,.95); backdrop-filter: blur(4px);
  display: grid; place-items: center; color: #1d2606;
  animation: vlibGlow 2.4s ease-in-out infinite;
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.vlib-fp-inner svg { width: 30px; height: 30px; margin-right: 3px; }
.vlib-feature-card:hover .vlib-fp-inner { transform: scale(1.1); background: var(--v-gold); }

@keyframes vlibPing {
  0%   { transform: scale(.8); opacity: .85; border: 5px solid rgba(180,146,88,.7);}
  80%  { opacity: 0; }
  100% { transform: scale(0.9); opacity: 0;  }
}
@keyframes vlibGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180,146,88,.45), 0 14px 36px rgba(180,146,88,.4); }
  /* 50%      { box-shadow: 0 0 0 14px rgba(180,146,88,0), 0 14px 40px rgba(180,146,88,.55); } */
}
@media (prefers-reduced-motion: reduce) {
  .vlib-fp-ring, .vlib-fp-inner { animation: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  --f-gold: #C7A66B;
  --f-cream: #F3EEE3;
  --f-muted: rgba(243,238,227,.66);
  --f-line: rgba(199,166,107,.28);

  position: relative;
  background: linear-gradient(165deg, #2E4208 0%, #243305 55%, #1c2904 100%);
  color: var(--f-cream);
  direction: rtl;
  padding: clamp(48px, 6vw, 80px) clamp(18px, 4vw, 48px) 28px;
}
.site-footer::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--f-gold), transparent);
  opacity: .6;
}
.footer-inner { max-width: 1340px; margin: 0 auto; }

/* Top columns */
.footer-top {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.3fr;
  gap: clamp(28px, 4vw, 56px);
  margin-bottom: clamp(34px, 4vw, 50px);
}
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 36px 32px; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; gap: 30px; } }

/* Brand */
.footer-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.footer-logo img { height: 60px; width: auto; }
.footer-logo-name { font-size: 18px; font-weight: 800; line-height: 1.35; color: #fff; }
.footer-about { font-size: 14.5px; line-height: 1.95; color: var(--f-muted); max-width: 360px; margin: 0; }

/* Columns */
.footer-col-title {
  position: relative;
  font-size: 16px; font-weight: 700; color: var(--f-gold);
  margin: 0 0 20px; padding-bottom: 12px;
}
.footer-col-title::after {
  content: ""; position: absolute; bottom: 0; right: 0;
  width: 34px; height: 2px; border-radius: 2px; background: var(--f-gold);
}
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; color: var(--f-muted);
  width: fit-content;
  transition: color .25s var(--ease), transform .25s var(--ease);
}
.footer-links a::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--f-gold); opacity: .55; transition: opacity .25s var(--ease);
}
.footer-links a:hover { color: var(--f-cream); transform: translateX(-4px); }
.footer-links a:hover::before { opacity: 1; }

/* Contact */
.footer-contact-list { display: flex; flex-direction: column; gap: 16px; }
.footer-contact-list li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--f-muted); }
.footer-contact-list a { color: var(--f-muted); transition: color .25s var(--ease); }
.footer-contact-list a:hover { color: var(--f-gold); }
.footer-ico {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: var(--f-gold);
  background: rgba(199,166,107,.1); border: 1px solid var(--f-line);
}
.footer-ico svg { width: 17px; height: 17px; }

/* Divider */
.footer-divider {
  display: block; height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--f-line) 20%, var(--f-line) 80%, transparent);
  margin: 0 0 22px;
}

/* Bottom bar */
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 18px;
}
.footer-social { display: flex; align-items: center; gap: 12px; }
.footer-social-link {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--f-cream);
  background: rgba(255,255,255,.05); border: 1px solid var(--f-line);
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease), border-color .3s var(--ease);
}
.footer-social-link svg { width: 17px; height: 17px; }
.footer-social-link:hover {
  background: var(--f-gold); color: #243305; border-color: var(--f-gold);
  transform: translateY(-3px);
}
.footer-copy { font-size: 13px; color: var(--f-muted); margin: 0; }

@media (max-width: 560px) {
  .footer-bottom { flex-direction: column-reverse; align-items: center; text-align: center; gap: 16px; }
}

/* ============================================================
   UNIFIED SECTION CTA (عرض الكل / مشاهدة المزيد)
   ============================================================ */
.sec-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(34px, 4vw, 54px);
}
.sec-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 32px;
  border-radius: 8px;
  transition: background .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.sec-cta .link-arrow {
  display: inline-flex;
  transition: transform .3s var(--ease);
}
.sec-cta .link-arrow svg { width: 18px; height: 18px; }
.sec-cta:hover {
  background: var(--accent);
  transform: translateY(-2px);
}
.sec-cta:hover .link-arrow { transform: translateX(-6px); }

.invers{
  background: var(--accent) !important;

}
.invers:hover{
    background: var(--primary) !important;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.btt-btn {
  position: fixed;
  bottom: clamp(18px, 3vw, 32px);
  left: clamp(18px, 3vw, 32px);
  z-index: 60;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border: none; border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  box-shadow: 0 10px 28px -8px rgba(42,62,5,.55), 0 2px 6px rgba(0,0,0,.18);
  opacity: 0; visibility: hidden;
  transform: translateY(18px) scale(.85);
  transition: opacity .35s var(--ease), transform .35s var(--ease),
              visibility 0s linear .35s, background .3s var(--ease), box-shadow .3s var(--ease);
}
.btt-btn.show {
  opacity: 1; visibility: visible;
  transform: translateY(0) scale(1);
  transition: opacity .35s var(--ease), transform .35s var(--ease),
              background .3s var(--ease), box-shadow .3s var(--ease);
}
.btt-btn:hover {
  /* background: var(--accent); */
  box-shadow: 0 14px 32px -8px rgba(180,146,88,.6), 0 2px 6px rgba(0,0,0,.2);
  transform: translateY(-3px) scale(1.08);
}
.btt-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btt-icon { position: relative; z-index: 2; transition: transform .3s var(--ease); }
.btt-btn:hover .btt-icon { transform: translateY(-2px); }

/* circular scroll-progress ring */
.btt-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.btt-ring-track { fill: none; stroke: rgba(255,255,255,.22); stroke-width: 2.5; }
.btt-ring-progress {
  fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 131.95;            /* 2πr, r=21 */
  stroke-dashoffset: 131.95;
  transition: stroke-dashoffset .1s linear;
}

@media (prefers-reduced-motion: reduce) {
  .btt-btn, .btt-icon, .btt-ring-progress { transition: opacity .2s linear, visibility 0s; }
}