/* ============================================================
   onyx — theme styles for jamelakbar.com
   styled after suwaidan.com ("onyx") — RTL/LTR aware
   ============================================================ */

:root {
  --onyx-gold: #1877f2;
  --onyx-gold-a: #1669d6;
  --onyx-gold-b: #4c98f8;
  --onyx-dark: #151515;
  --onyx-body: #767c82;
  --onyx-grey: #f3f3f4;
  --onyx-footer: #121212;
  --onyx-white: #ffffff;
  --onyx-line: rgba(0, 0, 0, .08);
  --onyx-radius: 10px;
  --onyx-shadow: 0 7px 20px 3px rgba(0, 0, 0, .085);
  --onyx-shadow-hover: 0 18px 40px 3px rgba(0, 0, 0, .16);
  --onyx-font-latin: "Karim LT", "Open Sans", "Segoe UI", Arial, sans-serif;
  --onyx-font-arabic: "Karim LT", "Vazirmatn", "Cairo", "Tajawal", "Segoe UI", Arial, sans-serif;
  --header-h: 76px;
}

@font-face {
  font-family: "Careem";
  src: url("../fonts/CAREEM-REGULAR.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Karim LT";
  src: url("../fonts/KARIM-LT-REGULAR.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans/open-sans-v44-latin_latin-ext-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans/open-sans-v44-latin_latin-ext-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans/open-sans-v44-latin_latin-ext-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn/vazirmatn-v16-arabic_latin_latin-ext-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn/vazirmatn-v16-arabic_latin_latin-ext-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn/vazirmatn-v16-arabic_latin_latin-ext-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn/vazirmatn-v16-arabic_latin_latin-ext-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn/vazirmatn-v16-arabic_latin_latin-ext-800.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: calc(100% * 1.06); }
body {
  margin: 0;
  font-family: var(--onyx-font-latin);
  font-family: var(--onyx-font-arabic), var(--onyx-font-latin);
  color: var(--onyx-body);
  font-size: 1rem;
  line-height: 1.9;
  background: var(--onyx-white);
  overflow-x: hidden;
}
[dir="rtl"] body,
[dir="rtl"] input,
[dir="rtl"] button { font-family: var(--onyx-font-arabic), var(--onyx-font-latin); }
h1, h2, h3, h4, h5, h6 {
  color: var(--onyx-heading, var(--onyx-dark));
  line-height: 1.5;
  font-weight: 600;
  margin: 0 0 .6em;
}
p { margin: 0 0 1.1em; }
a { color: var(--onyx-gold); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--onyx-body); }
img { max-width: 100%; height: auto; }
figure { margin: 0; }
ul, ol { margin: 0 0 1.2em; padding-inline-start: 1.4em; }
.container { width: min(1180px, 92%); margin-inline: auto; }
::selection { background: var(--onyx-gold); color: #fff; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; inset-inline-start: -999px; top: 0; z-index: 300;
  background: var(--onyx-dark); color: #fff; padding: .6em 1em;
}
.skip-link:focus { inset-inline-start: 0; }

/* ============================================================
   Utility bar (top strip)
   ============================================================ */
.site-topbar {
  background: var(--onyx-dark);
  color: #b9b9b9;
  font-size: .8rem;
}
.site-topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 34px;
}
.topbar-info { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.topbar-info .dot { color: var(--onyx-gold); }
.topbar-social { display: flex; gap: .55rem; align-items: center; }
.topbar-social a {
  color: #b9b9b9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.topbar-social a:hover { color: var(--onyx-gold); }
.topbar-social svg { width: 15px; height: 15px; fill: currentColor; }

/* ============================================================
   Header / Nav
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: #fff;
  box-shadow: 0 0 18px rgba(0, 0, 0, .08);
  transition: box-shadow .3s ease;
}
.site-header.is-sticky { box-shadow: 0 6px 24px rgba(0, 0, 0, .12); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.brand img { height: 52px; width: auto; }
.brand-name { font-size: 1.05rem; font-weight: 700; color: var(--onyx-dark); line-height: 1.2; }
.brand-name small { display: block; font-size: .68rem; font-weight: 400; color: var(--onyx-body); }

.main-nav { display: flex; align-items: center; }
.main-nav > ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: .15rem;
}
.main-nav > ul > li { position: relative; }
.main-nav a.nav-link {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: 1.1em .55em;
  color: var(--onyx-body);
  font-size: .92rem;
  position: relative;
  white-space: nowrap;
}
.main-nav a.nav-link::after {
  content: "";
  position: absolute;
  inset-inline-start: .55em;
  bottom: .72em;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--onyx-gold-a), var(--onyx-gold-b));
  opacity: 0;
  transition: width .3s ease, opacity .3s ease;
}
.main-nav > ul > li:hover > a.nav-link,
.main-nav > ul > li.active > a.nav-link,
.main-nav a.nav-link.is-active { color: var(--onyx-dark); }
.main-nav > ul > li:hover > a.nav-link::after,
.main-nav a.nav-link.is-active::after { width: 28px; opacity: 1; }
.main-nav .has-drop > a .caret { border: solid currentColor; border-width: 0 2px 2px 0; padding: 2.5px; transform: rotate(45deg); display: inline-block; transition: transform .25s ease; }
[dir="rtl"] .main-nav .has-drop > a .caret { transform: rotate(225deg); }

/* Dropdown */
.main-nav .dropdown {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  min-width: 230px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .14);
  border-top: 3px solid var(--onyx-gold);
  padding: .5rem 0;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all .28s ease;
  z-index: 120;
  max-height: 70vh;
  overflow: auto;
}
.main-nav li:hover > .dropdown,
.main-nav li:focus-within > .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav .dropdown a {
  display: block;
  padding: .5rem 1.1rem;
  color: var(--onyx-body);
  font-size: .9rem;
}
.main-nav .dropdown a:hover { color: var(--onyx-gold); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-shrink: 0;
}
.icon-btn {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--onyx-body);
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color .2s ease, background .2s ease;
}
.icon-btn:hover { color: var(--onyx-gold); background: var(--onyx-grey); }
.icon-btn svg { width: 19px; height: 19px; fill: currentColor; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .38em .8em;
  border-radius: 50px;
  border: 1px solid var(--onyx-line);
  font-size: .82rem;
  color: var(--onyx-body);
}
.lang-switch:hover { border-color: var(--onyx-gold); color: var(--onyx-gold); }

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  width: 34px;
  height: 34px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0;
}
.hamburger span { display: block; height: 2px; width: 24px; background: var(--onyx-dark); transition: transform .25s ease, opacity .25s ease; }
body.menu-open .hamburger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.menu-open .hamburger span:nth-child(2) { opacity: 0; }
body.menu-open .hamburger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset-block-start: var(--header-h);
  inset-inline: 0;
  background: #fff;
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
  z-index: 89;
}
body.menu-open .mobile-drawer { max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.mobile-drawer ul { list-style: none; margin: 0; padding: 0; }
.mobile-drawer > ul > li > a {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9em 1.2em; color: var(--onyx-dark); font-size: .98rem; font-weight: 600;
  border-bottom: 1px solid var(--onyx-line);
}
.mobile-drawer .sub { display: none; background: var(--onyx-grey); padding: .2em 0; }
.mobile-drawer .sub a { display: block; padding: .5em 2.2em; color: var(--onyx-body); font-size: .9rem; font-weight: 400; }
.mobile-drawer .sub.open { display: block; }
.mobile-drawer .langrow { display: flex; gap: .5rem; padding: 1em 1.2em; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 50vh;
  background-position: center center;
  background-size: cover;
  isolation: isolate;
}
.hero-text { padding: 3.5rem 0 2.5rem; text-align: center; }
.hero-text .hero-inner { max-width: 800px; margin-inline: auto; padding: 0; }
.hero-text h1 {
  color: var(--onyx-heading, var(--onyx-dark));
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  margin: 0 0 .35em;
  letter-spacing: -.01em;
}
.hero-text p.lead { color: var(--onyx-body); font-size: clamp(1rem, 2vw, 1.25rem); max-width: 620px; margin-inline: auto; }
.hero-text .hero-rule {
  width: 90px; height: 3px; margin: 1.4rem auto;
  background: linear-gradient(90deg, var(--onyx-gold-a), var(--onyx-gold-b));
}
.hero-cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }

/* ============================================================
   Buttons
   ============================================================ */
.onyx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .85em 1.9em;
  border-radius: 50px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .35s ease, box-shadow .35s ease, background .3s ease, color .3s ease;
  box-shadow: var(--onyx-shadow);
}
.onyx-btn.gold { background: linear-gradient(90deg, var(--onyx-gold-a), var(--onyx-gold-b)); color: #fff; }
.onyx-btn.gold:hover { background: #fff; color: var(--onyx-gold); transform: translateY(-4px); box-shadow: var(--onyx-shadow-hover); }
.onyx-btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.65); box-shadow: none; }
.onyx-btn.ghost:hover { background: #fff; color: var(--onyx-dark); transform: translateY(-4px); }
.onyx-btn.dark { background: var(--onyx-dark); color: #fff; }
.onyx-btn.dark:hover { background: var(--onyx-gold); color: #fff; transform: translateY(-4px); box-shadow: var(--onyx-shadow-hover); }
.onyx-btn.link { background: none; border: 0; box-shadow: none; color: var(--onyx-gold); padding: .2em 0; }
.onyx-btn.link:hover { color: var(--onyx-dark); transform: translateX(4px); }

/* ============================================================
   Sections & section heads
   ============================================================ */
.onyx-section { padding: 60px 0; }
.onyx-section.hero-next { padding-top: 20px; }
.onyx-section.grey { background: var(--onyx-grey); }
.onyx-section.pattern {
  background: var(--onyx-footer);
  color: #ccc;
}
.section-head { text-align: center; margin-bottom: 38px; }
.section-head .kicker {
  color: var(--onyx-gold);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 600;
}
.section-head h2 {
  color: var(--onyx-dark);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: .2em 0 .45em;
}
.section-head hr {
  width: 56px; height: 3px; margin: 0 auto .9em; border: 0;
  background: linear-gradient(90deg, var(--onyx-gold-a), var(--onyx-gold-b));
}
.section-head p { color: var(--onyx-body); max-width: 640px; margin: 0 auto; }
.section-head .view-all { margin-top: .6rem; display: inline-block; }

/* ============================================================
   Grids & cards
   ============================================================ */
.onyx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.onyx-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.onyx-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1024px) { .onyx-grid.cols-4, .onyx-grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .onyx-grid.cols-4, .onyx-grid.cols-3, .onyx-grid { grid-template-columns: 1fr; } }

.onyx-card {
  background: #fff;
  border-radius: var(--onyx-radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 30px rgba(0,0,0,.06);
  transition: transform .45s ease, box-shadow .45s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.onyx-card:hover { transform: translateY(-6px); box-shadow: var(--onyx-shadow-hover); }
.card-media { position: relative; overflow: hidden; aspect-ratio: 16/10; background: #eee; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.onyx-card:hover .card-media img { transform: scale(1.06); }
.card-media .play {
  position: absolute; inset: 0; margin: auto;
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s ease, background .3s ease;
}
.card-media .play::before { content: ""; width: 0; height: 0; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-inline-start: 15px solid var(--onyx-gold); margin-inline-start: 4px; }
.onyx-card:hover .play { transform: scale(1.12); background: #fff; }
.card-body { padding: 1.25rem 1.3rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.02rem; line-height: 1.55; margin-bottom: .45em; }
.card-body h3 a { color: var(--onyx-dark); }
.card-body h3 a:hover { color: var(--onyx-gold); }
.card-meta { font-size: .78rem; color: var(--onyx-body); display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: .6em; }
.card-meta .tag { color: var(--onyx-gold); }
.card-excerpt { font-size: .9rem; line-height: 1.85; color: var(--onyx-body); margin-bottom: .8em; flex: 1; }
.card-excerpt > *:last-child { margin-bottom: 0; }
.read-more { font-size: .86rem; font-weight: 600; color: var(--onyx-gold); display: inline-flex; align-items: center; gap: .4em; }
.read-more::after { content: "←"; transition: transform .25s ease; }
[dir="rtl"] .read-more::after { content: "→"; }
.onyx-card:hover .read-more::after { transform: translateX(-4px); }
[dir="rtl"] .onyx-card:hover .read-more::after { transform: translateX(4px); }

/* Shorts (vertical video previews) */
.shorts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.4rem;
}
.short-card {
  display: flex; flex-direction: column;
  background: #fff; border-radius: var(--onyx-radius);
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 30px rgba(0,0,0,.07);
  overflow: hidden;
  transition: transform .45s ease, box-shadow .45s ease;
}
.short-card:hover { transform: translateY(-6px); box-shadow: var(--onyx-shadow-hover); }
.short-media {
  position: relative; aspect-ratio: 9/16; overflow: hidden;
  background: #111; cursor: pointer;
}
.short-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .3s ease; }
.short-media.playing img { opacity: 0; }
.short-media iframe {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.short-media.playing iframe { opacity: 1; }
.short-toggle {
  position: absolute; inset: 0; margin: auto;
  width: 52px; height: 52px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: rgba(255,255,255,.92);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s ease, background .3s ease, opacity .3s ease;
  z-index: 2;
}
.short-toggle::before { content: ""; width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-inline-start: 13px solid var(--onyx-gold); margin-inline-start: 3px; }
.short-media.playing .short-toggle { opacity: 0; transform: scale(1.3); pointer-events: none; }
.short-card:hover .short-toggle { transform: scale(1.12); background: #fff; }
.short-media.playing .short-chip { opacity: 1; }
.short-chip {
  position: absolute; top: 8px; inset-inline-end: 8px;
  z-index: 3; font-size: .74rem; font-weight: 600;
  color: #fff; background: rgba(17,17,17,.72);
  padding: .25em .6em; border-radius: 999px;
  opacity: 0; transition: opacity .25s ease;
  pointer-events: none;
}
.short-body { padding: .85rem .95rem .95rem; display: flex; flex-direction: column; flex: 1; gap: .25rem; }
.short-body h3 { font-size: .95rem; line-height: 1.45; margin: 0; }
.short-body h3 a { color: var(--onyx-dark); }
.short-body h3 a:hover { color: var(--onyx-gold); }
.short-meta { font-size: .78rem; color: var(--onyx-body); }

/* Book cards */
.onyx-book {
  display: flex; flex-direction: column;
  background: #fff; border-radius: var(--onyx-radius);
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 30px rgba(0,0,0,.07);
  overflow: hidden;
  transition: transform .45s ease, box-shadow .45s ease;
}
.onyx-book:hover { transform: translateY(-6px); box-shadow: var(--onyx-shadow-hover); }
.onyx-book .book-cover { aspect-ratio: 3/4; overflow: hidden; background: #eee; }
.onyx-book .book-cover img { width: 100%; height: 100%; object-fit: contain; }
.onyx-book .book-body { padding: 1rem 1.2rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.onyx-book .book-body h3 { font-size: 1rem; line-height: 1.5; margin-bottom: .3em; }
.onyx-book .book-body h3 a { color: var(--onyx-dark); }
.onyx-book .book-body h3 a:hover { color: var(--onyx-gold); }
.book-meta { font-size: .8rem; color: var(--onyx-body); display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .5em; }
.book-author { font-size: .82rem; color: var(--onyx-gold); margin-bottom: .5em; }
.book-excerpt { font-size: .86rem; line-height: 1.8; color: var(--onyx-body); flex: 1; margin-bottom: .7em; }
.book-excerpt > *:last-child { margin-bottom: 0; }

/* News / timeline */
.news-list { display: grid; gap: 1px; background: var(--onyx-line); border-radius: var(--onyx-radius); overflow: hidden; }
.news-item {
  display: flex; align-items: baseline; gap: 1.1rem;
  background: #fff; padding: 1.1rem 1.3rem;
  transition: background .25s ease;
}
.news-item:hover { background: var(--onyx-grey); }
.news-item time { color: var(--onyx-gold); font-size: .8rem; flex-shrink: 0; font-weight: 600; }
.news-item a { color: var(--onyx-dark); font-weight: 500; }

/* ---------- CTA banner ---------- */
.cta-strip {
  background: linear-gradient(120deg, var(--onyx-gold-a), var(--onyx-gold-b));
  color: #fff; padding: 34px 0;
}
.cta-strip .container { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; flex-wrap: wrap; }
.cta-strip h2 { color: #fff; margin: 0 0 .2em; font-size: 1.4rem; }
.cta-strip p { margin: 0; color: rgba(255,255,255,.9); }

/* ============================================================
   Content / article typography
   ============================================================ */
.onyx-page { padding: 46px 0 70px; }
.breadcrumbs { font-size: .84rem; color: var(--onyx-body); margin-bottom: 1.4rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.breadcrumbs a { color: var(--onyx-body); }
.breadcrumbs a:hover { color: var(--onyx-gold); }
.breadcrumbs .sep { opacity: .5; }
.breadcrumbs .current { color: var(--onyx-gold); box-shadow: inset 0 -2px 0 var(--onyx-gold); }

.page-head { margin-bottom: 2rem; }
.page-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-bottom: .5rem; }
.page-head .page-sub { color: var(--onyx-body); max-width: 720px; }
.page-head .page-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .84rem; color: var(--onyx-body); }

.article-grid { display: grid; grid-template-columns: 300px 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .article-grid { grid-template-columns: 1fr; } }
.article-cover { position: sticky; top: calc(var(--header-h) + 20px); }
.article-cover img { border-radius: var(--onyx-radius); box-shadow: var(--onyx-shadow); }
.article-cover .cover-actions { margin-top: 1rem; display: grid; gap: .6rem; }

.onyx-content { font-size: 1.02rem; color: #4a4f55; }
.onyx-content > *:first-child { margin-top: 0; }
.onyx-content h1, .onyx-content h2, .onyx-content h3, .onyx-content h4, .onyx-content h5, .onyx-content h6 { color: var(--onyx-dark); margin-top: 1.8em; }
.onyx-content h2 { font-size: 1.5rem; }
.onyx-content h3 { font-size: 1.2rem; }
.onyx-content h1 { border-bottom: 2px solid var(--onyx-line); padding-bottom: .4em; }
.onyx-content a { color: var(--onyx-gold); text-decoration: underline; text-underline-offset: 3px; }
.onyx-content a:hover { color: var(--onyx-dark); }
.onyx-content ul li, .onyx-content ol li { margin: .4em 0; }
.onyx-content blockquote {
  margin: 1.6em 0;
  padding: .9em 1.4em;
  border-inline-start: 4px solid var(--onyx-gold);
  background: var(--onyx-grey);
  border-radius: 0 var(--onyx-radius) var(--onyx-radius) 0;
  color: #55595f;
}
[dir="rtl"] .onyx-content blockquote { border-radius: var(--onyx-radius) 0 0 var(--onyx-radius); }
.onyx-content blockquote p:last-child { margin-bottom: 0; }
.onyx-content img:not(.emoji) { border-radius: var(--onyx-radius); }
.onyx-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .92rem; }
.onyx-content th, .onyx-content td { border: 1px solid var(--onyx-line); padding: .5em .8em; text-align: start; }
.onyx-content th { background: var(--onyx-grey); color: var(--onyx-dark); }
.onyx-content iframe { max-width: 100%; border: 0; border-radius: var(--onyx-radius); }

.onyx-content .video {
  position: relative; width: 100%; aspect-ratio: 16/9; margin: 1.6em 0;
  background: #000; border-radius: var(--onyx-radius); overflow: hidden;
}
.onyx-content .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Download / link boxes */
.dl-list { list-style: none; padding: 0; margin: 1.4em 0; display: grid; gap: .7em; }
.dl-list li { margin: 0; }
.dl {
  display: flex; align-items: center; gap: .8em;
  padding: .85em 1.1em;
  background: #fff;
  border: 1px solid var(--onyx-line);
  border-radius: var(--onyx-radius);
  color: var(--onyx-dark);
  font-weight: 500;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.dl:hover { border-color: var(--onyx-gold); transform: translateY(-2px); box-shadow: var(--onyx-shadow); color: var(--onyx-dark); }
.dl .icon { color: var(--onyx-gold); display: inline-flex; }
.dl .icon svg { width: 20px; height: 20px; fill: currentColor; }
.dl .meta { margin-inline-start: auto; font-size: .78rem; color: var(--onyx-body); font-weight: 400; }

/* Chapter prev/next */
.chapter-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.6rem; }
.chapter-nav a {
  display: block; padding: 1.1rem 1.3rem;
  border: 1px solid var(--onyx-line); border-radius: var(--onyx-radius);
  color: var(--onyx-body);
  transition: border-color .25s ease, transform .25s ease;
}
.chapter-nav a:hover { border-color: var(--onyx-gold); transform: translateY(-3px); color: var(--onyx-dark); }
.chapter-nav .prev { text-align: start; }
.chapter-nav .next { text-align: end; }
.chapter-nav small { display: block; color: var(--onyx-gold); font-weight: 600; font-size: .78rem; margin-bottom: .2em; }
@media (max-width: 600px) { .chapter-nav { grid-template-columns: 1fr; } }

/* TOC */
.toc-card {
  background: var(--onyx-grey);
  border-radius: var(--onyx-radius);
  padding: 1.2rem 1.4rem;
  margin: 1.6em 0;
  font-size: .92rem;
}
.toc-card strong { color: var(--onyx-dark); display: block; margin-bottom: .4em; }
.toc-card ol { margin: 0; padding-inline-start: 1.2em; }
.toc-card li { margin: .3em 0; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--onyx-footer);
  color: #999;
  position: relative;
  margin-top: 0;
}
.site-footer::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--onyx-gold-a), var(--onyx-gold-b), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.2rem;
  padding: 56px 0 40px;
}
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  color: #fff; font-size: 1rem; margin-bottom: 1.1em;
  position: relative; padding-bottom: .5em;
}
.site-footer h4::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; width: 34px; height: 2px; background: var(--onyx-gold); }
.footer-about .brand { margin-bottom: 1rem; }
.footer-about .brand span { color: #fff; }
.footer-about p { font-size: .9rem; line-height: 1.9; }
.footer-links { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 1.2rem; }
.footer-links li { break-inside: avoid; margin: 0 0 .5em; }
.footer-links a { color: #999; font-size: .9rem; }
.footer-links a:hover { color: var(--onyx-gold); }
.footer-social { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: #999;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .25s ease;
}
.footer-social a:hover { background: var(--onyx-gold); color: #fff; transform: translateY(-3px); }
.footer-social svg { width: 17px; height: 17px; fill: currentColor; }
.footer-sub p { font-size: .9rem; }
.footer-sub .subscribe { display: flex; margin-top: 1rem; }
.footer-sub input {
  flex: 1; min-width: 0;
  padding: .7em 1.1em;
  border: 0; border-radius: 50px 0 0 50px;
  font-size: .88rem;
  color: #333; outline: 0;
}
[dir="rtl"] .footer-sub input { border-radius: 0 50px 50px 0; }
.footer-sub button {
  background: linear-gradient(90deg, var(--onyx-gold-a), var(--onyx-gold-b));
  border: 0; color: #fff; cursor: pointer; padding: 0 1.4em;
  border-radius: 0 50px 50px 0;
  font-weight: 600; font-size: .88rem;
  transition: filter .25s ease;
}
[dir="rtl"] .footer-sub button { border-radius: 50px 0 0 50px; }
.footer-sub button:hover { filter: brightness(1.08); }
.copyrights {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 24px 0 30px;
  text-align: center;
  font-size: .85rem;
  color: #888;
}
.copyrights a { color: #bbb; }
.copyrights a:hover { color: var(--onyx-gold); }
.callig-credit {
  text-align: center;
  font-size: .75rem;
  color: #777;
  margin-top: 6px;
  line-height: 1.6;
}

/* ============================================================
   Search overlay
   ============================================================ */
.search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(18,18,18,.97);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 10vh 5%;
}
.search-overlay.open { display: flex; }
.search-box { width: min(640px, 100%); }
.search-box .close-search { float: inline-end; color: #bbb; background: none; border: 0; font-size: 1.6rem; cursor: pointer; }
.search-box input {
  width: 100%;
  background: transparent;
  border: 0; border-bottom: 2px solid rgba(255,255,255,.25);
  color: #fff; font-size: 1.6rem; padding: .5em 0; outline: 0;
  font-family: inherit;
}
.search-box input::placeholder { color: rgba(255,255,255,.35); }
.search-results { margin-top: 1.4rem; width: 100%; max-height: 60vh; overflow: auto; }
.search-results a {
  display: block; padding: .9em 1em; margin-bottom: 6px;
  background: rgba(255,255,255,.05); border-radius: 8px;
  color: #ddd; transition: background .2s ease;
}
.search-results a:hover { background: rgba(255,255,255,.12); color: #fff; }
.search-results .sr-section { color: var(--onyx-gold); font-size: .78rem; display: block; }

/* ============================================================
   Back to top
   ============================================================ */
#to-top {
  position: fixed;
  inset-block-end: 18px;
  inset-inline-end: 18px;
  z-index: 80;
  width: 42px; height: 42px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: linear-gradient(90deg, var(--onyx-gold-a), var(--onyx-gold-b));
  color: #fff;
  display: none;
  align-items: center; justify-content: center;
  box-shadow: var(--onyx-shadow);
  transition: transform .25s ease, opacity .25s ease;
}
#to-top.visible { display: inline-flex; }
#to-top:hover { transform: translateY(-4px); }
#to-top svg { width: 18px; height: 18px; fill: currentColor; transform: rotate(180deg); }

/* ============================================================
   Mobile nav responsive
   ============================================================ */
@media (max-width: 1024px) {
  .main-nav { display: none; }
  .hamburger { display: inline-flex; }
  .topbar-social { display: none; }
  .lang-switch .lbl { display: none; }
}
@media (min-width: 1025px) {
  .mobile-drawer { display: none; }
}
@media (max-width: 480px) {
  .brand img { height: 42px; }
  .hero { min-height: 46vh; }
}