/* ==========================================================================
   العنوان — Style variants (choose in Customizer → إعدادات موقع العنوان → ستايل التصميم)
   html[data-style="base"]    : الأصلي (Almarai)       — main.css only
   html[data-style="modern"]  : حديث وقوي (Alexandria)
   html[data-style="classic"] : الجريدة الكلاسيكية (Amiri + IBM Plex)
   html[data-style="noir"]    : الذهبي الداكن (Cairo)
   ========================================================================== */

/* Shared: headline font hook */
[data-style] .card__title, [data-style] .ov__title, [data-style] .section-title, [data-style] .article__title,
[data-style] .widget-title, [data-style] .timeline__head, [data-style] .entry-content h2, [data-style] .entry-content h3,
[data-style] .archive-head h1, [data-style] .headlines a, [data-style] .most-read a, [data-style] .timeline__list a,
[data-style] .menu a, [data-style] .site-footer h3 { font-family: var(--font-head, var(--font)); }

/* =====================================================================
   1) MODERN — حديث وقوي
   ===================================================================== */
[data-style="modern"] {
  --font: "Almarai", sans-serif;
  --font-head: "Alexandria", "Almarai", sans-serif;
  --bg: #F6F5F1;
  --r: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 30px rgba(0,0,0,.07);
}
[data-style="modern"] .card__title, [data-style="modern"] .ov__title, [data-style="modern"] .article__title { font-weight: 700; letter-spacing: -.2px; }
[data-style="modern"] .masthead { box-shadow: 0 1px 0 var(--line); }
[data-style="modern"] .masthead__search { border-width: 0; background: #F1EFE8; }
[data-style="modern"] .masthead__search button { border-radius: 50%; width: 36px; height: 36px; margin: 3px; }
[data-style="modern"] .icon-btn { border: 0; background: #F1EFE8; }

/* black nav with gold pills */
[data-style="modern"] .mainnav { background: #000; box-shadow: none; }
[data-style="modern"] .mainnav .container { min-height: 58px; }
[data-style="modern"] .menu a { color: #F3F0E6; font-weight: 600; font-size: 15px; padding: 8px 16px; margin: 9px 2px; border-radius: 999px; }
[data-style="modern"] .mainnav .menu > li > a:hover { background: #1E1E1E; color: var(--gold-1); }
[data-style="modern"] .mainnav .menu > .current-menu-item > a { background: var(--gold-grad); color: #000; }
[data-style="modern"] .mainnav__search { background: var(--gold-grad); color: #000; width: 40px; height: 40px; border-radius: 50%; }
[data-style="modern"] .mainnav__mini .logo-light { display: none; }
[data-style="modern"] .mainnav__mini .logo-dark { display: block; }
[data-style="modern"] .ticker__label { border-radius: 0 0 0 14px; }

/* soft cards, no borders */
[data-style="modern"] .strip, [data-style="modern"] .widget, [data-style="modern"] .timeline,
[data-style="modern"] .opinion, [data-style="modern"] .article, [data-style="modern"] .list .card { border: 0; box-shadow: var(--shadow); }
[data-style="modern"] .ov, [data-style="modern"] .card__media { border-radius: var(--r); }
[data-style="modern"] .ov--xl::before { display: none; }
[data-style="modern"] .ov--xl .ov__title { font-size: clamp(24px, 2.8vw, 36px); }
[data-style="modern"] .badge { border-radius: 999px; padding: 3px 12px; }

/* section titles: big text + gold highlighter */
[data-style="modern"] .section-head { border-bottom: 1px solid var(--line); padding-bottom: 10px; align-items: center; }
[data-style="modern"] .section-title { background: none; color: var(--ink); padding: 0; font-size: 24px; font-weight: 800; border-radius: 0; z-index: 0; }
[data-style="modern"] .section-title::after { left: -4px; right: -4px; bottom: 2px; height: 10px; z-index: -1; border-radius: 3px; }
[data-style="modern"] .section-head .more { padding: 6px 14px; border-radius: 999px; background: #000; color: var(--gold-1); }
[data-style="modern"] .band .section-title { color: #fff; background: none; }
[data-style="modern"] .band .section-title::after { display: block; opacity: .55; }
[data-style="modern"] .band .section-head { border-color: #2A2A2A; }

/* numbered headlines */
[data-style="modern"] .headlines { counter-reset: hl; }
[data-style="modern"] .headlines li { counter-increment: hl; }
[data-style="modern"] .headlines li::before { content: counter(hl, arabic-indic); transform: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #000; color: var(--gold-1); font-size: 13px; font-weight: 700; }
[data-style="modern"] .widget-title { background: none; color: var(--ink); border-bottom: 1px solid var(--line); margin: -4px 0 12px; padding: 0 0 10px; font-size: 18px; }
[data-style="modern"] .newsletter .widget-title { color: var(--gold-1); border-color: #2A2A2A; }
[data-style="modern"] .timeline__head { background: var(--gold-grad); color: #000; }
[data-style="modern"] .timeline__head .dot { background: #C8102E; }
[data-style="modern"] .opinion { border-top: 0; }
[data-style="modern"] .opinion::before { content: ""; height: 4px; width: 50px; border-radius: 4px; background: var(--gold-grad); }

/* =====================================================================
   2) CLASSIC — الجريدة الكلاسيكية
   ===================================================================== */
[data-style="classic"] {
  --font: "IBM Plex Sans Arabic", sans-serif;
  --font-head: "Amiri", "Noto Naskh Arabic", serif;
  --bg: #FBF8F1;
  --surface: #FBF8F1;
  --line: #D9D2C1;
  --line-2: #E6DFCF;
  --r: 0px;
}
[data-style="classic"] .card__title { font-size: 19px; font-weight: 700; line-height: 1.5; }
[data-style="classic"] .ov__title { font-weight: 700; font-size: 21px; }
[data-style="classic"] .ov--xl .ov__title { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.35; }
[data-style="classic"] .article__title { font-weight: 700; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.35; }
[data-style="classic"] .headlines a, [data-style="classic"] .most-read a, [data-style="classic"] .timeline__list a { font-size: 17px; font-weight: 700; line-height: 1.5; }
[data-style="classic"] .entry-content { font-family: "Noto Naskh Arabic", "Amiri", serif; font-size: 20px; }

/* centered newspaper masthead */
[data-style="classic"] .topbar { background: var(--bg); color: var(--ink); border-bottom: 1px solid var(--line); }
[data-style="classic"] .topbar .social a { color: var(--ink); }
[data-style="classic"] .masthead { background: var(--bg); }
[data-style="classic"] .masthead .container { display: grid; grid-template-columns: 1fr auto 1fr; padding-block: 22px 16px; }
[data-style="classic"] .masthead .brand { grid-column: 2; grid-row: 1; justify-self: center; }
[data-style="classic"] .masthead .brand img { height: 96px; }
[data-style="classic"] .masthead__tools { grid-column: 3; grid-row: 1; justify-self: end; }
[data-style="classic"] .masthead__search { width: 220px; border-width: 1px; border-radius: 0; }
[data-style="classic"] .btn-live, [data-style="classic"] .icon-btn { border-radius: 0; }
[data-style="classic"] .mainnav { background: var(--bg); box-shadow: none; border-top: 4px double #000; border-bottom: 1px solid #000; }
[data-style="classic"] .mainnav .container { justify-content: center; }
[data-style="classic"] .menu { flex: 0 1 auto; }
[data-style="classic"] .menu a { font-family: var(--font); font-weight: 700; font-size: 15px; }
[data-style="classic"] .mainnav .menu > li > a:hover,
[data-style="classic"] .mainnav .menu > .current-menu-item > a { background: none; color: #000; box-shadow: inset 0 -4px 0 var(--gold-3); }
[data-style="classic"] .mainnav__search { background: none; color: #000; }
[data-style="classic"] .ticker { background: var(--bg); }
[data-style="classic"] .ticker__label { background: #000; color: var(--gold-1); }

/* rules instead of boxes */
[data-style="classic"] .strip, [data-style="classic"] .widget, [data-style="classic"] .timeline, [data-style="classic"] .article,
[data-style="classic"] .list .card { background: transparent; border: 0; box-shadow: none; padding-inline: 0; }
[data-style="classic"] .strip { border-block: 1px solid #000; padding-block: 16px; }
[data-style="classic"] .strip .card + .card { border-color: var(--line); }
[data-style="classic"] .cols3 > .colblock + .colblock { border-inline-start: 1px solid var(--line); padding-inline-start: 22px; }
[data-style="classic"] .cols3 { gap: 0 22px; }
[data-style="classic"] .ov--xl::before { width: 0; }
[data-style="classic"] .ov::after { background: linear-gradient(0deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,0) 70%); }
[data-style="classic"] .badge { background: none; color: var(--gold-ink); padding: 0; font-size: 13px; border-bottom: 2px solid var(--gold-3); border-radius: 0; }
[data-style="classic"] .ov .badge { color: var(--gold-1); }
[data-style="classic"] .badge--urgent { background: #C8102E; color: #fff; padding: 2px 8px; border: 0; }

[data-style="classic"] .section-head { border-top: 3px solid #000; border-bottom: 1px solid #000; padding: 6px 0; align-items: center; }
[data-style="classic"] .section-title { background: none; color: #000; padding: 0; font-size: 26px; font-weight: 700; }
[data-style="classic"] .section-title::after { display: none; }
[data-style="classic"] .section-title::before { content: ""; width: 10px; height: 10px; background: var(--gold-3); }
[data-style="classic"] .section-head .more { padding: 0; }
[data-style="classic"] .widget-title { background: none; color: #000; margin: 0 0 10px; padding: 6px 0; border-top: 3px solid #000; border-bottom: 1px solid #000; border-radius: 0; font-size: 22px; }
[data-style="classic"] .timeline__head { background: none; color: #000; padding: 6px 0; border-top: 3px solid #000; border-bottom: 1px solid #000; font-size: 22px; }
[data-style="classic"] .timeline__list { padding-inline: 0; }
[data-style="classic"] .timeline__more { background: #000; color: var(--gold-1); }
[data-style="classic"] .most-read li::before { background: none; color: var(--gold-3); font-family: "Amiri", serif; font-size: 34px; border-radius: 0; }
[data-style="classic"] .newsletter { background: #000; padding: 16px; }
[data-style="classic"] .newsletter .widget-title { color: var(--gold-1); border-color: var(--gold-3); }
[data-style="classic"] .opinion { background: transparent; border: 0; border-top: 1px solid #000; border-radius: 0; }
[data-style="classic"] .opinion__avatar { filter: grayscale(1); border-color: #000; border-width: 1px; }
[data-style="classic"] .opinion .card__title::before { content: "«"; color: var(--gold-3); }
[data-style="classic"] .opinion .card__title::after { content: "»"; color: var(--gold-3); }
[data-style="classic"] .band .section-head { border-color: var(--gold-3); }
[data-style="classic"] .band .section-title { color: var(--gold-1); }
[data-style="classic"] .article__lead { background: none; border: 0; border-block: 1px solid var(--line); padding: 14px 0; font-family: "Amiri", serif; font-size: 22px; font-weight: 400; }

/* =====================================================================
   3) NOIR — الذهبي الداكن
   ===================================================================== */
[data-style="noir"] {
  --font: "Cairo", sans-serif;
  --font-head: "Cairo", sans-serif;
  --bg: #0A0A0A;
  --surface: #131313;
  --ink: #F3F0E6;
  --ink-2: #CFC9BA;
  --muted: #8E887C;
  --line: #242424;
  --line-2: #1C1C1C;
  --gold-ink: #ECCC65;
  --r: 10px;
}
[data-style="noir"] body { background: radial-gradient(1200px 500px at 80% -10%, #1d1708 0%, #0A0A0A 60%) fixed; }
[data-style="noir"] .card__title, [data-style="noir"] .ov__title, [data-style="noir"] .article__title { font-weight: 700; }
[data-style="noir"] .brand .logo-light, [data-style="noir"] .mainnav__mini .logo-light { display: none; }
[data-style="noir"] .brand .logo-dark, [data-style="noir"] .mainnav__mini .logo-dark { display: block; }
[data-style="noir"] [data-toggle-theme] { display: none; }
[data-style="noir"] .topbar { background: #050505; border-bottom: 1px solid #1A1A1A; }
[data-style="noir"] .masthead { background: transparent; }
[data-style="noir"] .masthead__search { border-color: #2A2A2A; background: #111; }
[data-style="noir"] .masthead__search button { background: var(--gold-grad); color: #000; }
[data-style="noir"] .btn-live { background: #1A1A1A; border: 1px solid #333; }
[data-style="noir"] .icon-btn { border-color: #2A2A2A; }
[data-style="noir"] .mainnav { background: rgba(10,10,10,.92); backdrop-filter: blur(8px); box-shadow: none; border-block: 1px solid #2A2A2A; }
[data-style="noir"] .mainnav::after { content: ""; display: block; height: 2px; background: var(--gold-grad); }
[data-style="noir"] .menu a { color: #E9E4D6; font-weight: 600; }
[data-style="noir"] .mainnav .menu > li > a:hover { background: none; color: var(--gold-1); }
[data-style="noir"] .mainnav .menu > .current-menu-item > a { background: none; color: var(--gold-2); box-shadow: inset 0 -3px 0 var(--gold-3); }
[data-style="noir"] .mainnav__search { background: none; color: var(--gold-2); }
[data-style="noir"] .ticker { background: #0F0F0F; border-color: #1E1E1E; }
[data-style="noir"] .ticker__label { background: var(--gold-grad); color: #000; }
[data-style="noir"] .ticker__label .dot { background: #C8102E; }

[data-style="noir"] .strip, [data-style="noir"] .widget, [data-style="noir"] .timeline, [data-style="noir"] .opinion,
[data-style="noir"] .article, [data-style="noir"] .list .card { background: var(--surface); border-color: #222; }
[data-style="noir"] .card:hover .card__title a, [data-style="noir"] .opinion:hover { color: var(--gold-1); border-color: #4A3A12; }
[data-style="noir"] .section-head { border-bottom: 1px solid #2A2A2A; align-items: center; padding-bottom: 8px; }
[data-style="noir"] .section-title { background: none; padding: 0; font-size: 24px; color: transparent; background-image: var(--gold-grad); -webkit-background-clip: text; background-clip: text; }
[data-style="noir"] .section-title::after { display: none; }
[data-style="noir"] .section-title::before { content: ""; width: 4px; height: 24px; border-radius: 2px; background: var(--gold-grad); }
[data-style="noir"] .widget-title, [data-style="noir"] .timeline__head { background: #0D0D0D; color: var(--gold-2); border-bottom: 1px solid #2A2A2A; }
[data-style="noir"] .timeline__more { background: #0D0D0D; color: var(--gold-2); border-color: #2A2A2A; }
[data-style="noir"] .badge { background: rgba(236,204,101,.12); color: var(--gold-1); border: 1px solid rgba(236,204,101,.35); }
[data-style="noir"] .ov .badge { background: rgba(0,0,0,.55); }
[data-style="noir"] .badge--urgent { background: #C8102E; color: #fff; border: 0; }
[data-style="noir"] .band { background: #050505; border-block: 1px solid #1E1E1E; }
[data-style="noir"] .band .section-title { color: transparent; background-image: var(--gold-grad); }
[data-style="noir"] .opinion { border-top-color: var(--gold-3); }
[data-style="noir"] .ad-slot { background: #111; border-color: #2A2A2A; }
[data-style="noir"] .article__lead { background: #17140A; }
[data-style="noir"] .newsletter { background: linear-gradient(135deg, #1A1406, #0D0D0D); border: 1px solid #3A2E10; }
[data-style="noir"] .site-footer { background: #050505; }
[data-style="noir"] .tags a { background: #151515; }

/* responsive tweaks for variants */
@media (max-width: 900px) {
  [data-style="classic"] .masthead .container { display: flex; }
  [data-style="classic"] .masthead .brand img { height: 56px; }
  [data-style="classic"] .cols3 > .colblock + .colblock { border: 0; padding: 0; }
  [data-style="modern"] .menu a { margin: 6px 2px; }
}

/* =====================================================================
   Headline font option: Amiri (html[data-font="amiri"]) — works with any style
   ===================================================================== */
[data-font="amiri"] { --font-head: "Amiri", "Noto Naskh Arabic", serif; }
[data-font="amiri"] .card__title { font-size: 19px; font-weight: 700; line-height: 1.5; letter-spacing: 0; }
[data-font="amiri"] .mini .card__title, [data-font="amiri"] .row .card__title, [data-font="amiri"] .strip .card__title { font-size: 17.5px; }
[data-font="amiri"] .ov__title { font-size: 22px; font-weight: 700; line-height: 1.45; }
[data-font="amiri"] .ov--xl .ov__title { font-size: clamp(30px, 3.3vw, 46px); line-height: 1.35; }
[data-font="amiri"] .article__title { font-size: clamp(30px, 3.6vw, 48px); font-weight: 700; line-height: 1.35; }
[data-font="amiri"] .section-title { font-size: 28px; font-weight: 700; }
[data-font="amiri"] .widget-title, [data-font="amiri"] .timeline__head { font-size: 22px; font-weight: 700; }
[data-font="amiri"] .headlines a, [data-font="amiri"] .most-read a, [data-font="amiri"] .timeline__list a { font-size: 17px; font-weight: 700; line-height: 1.55; }
[data-font="amiri"] .menu a { font-size: 18px; font-weight: 700; }
[data-font="amiri"] .entry-content h2 { font-size: 28px; }
[data-font="amiri"] .entry-content h3 { font-size: 23px; }
[data-font="amiri"] .site-footer h3 { font-size: 19px; }
[data-font="amiri"][data-style="classic"] .menu a { font-family: var(--font-head); }
@media (max-width: 600px) {
  [data-font="amiri"] .ov--xl .ov__title { font-size: 28px; }
  [data-font="amiri"] .menu a { font-size: 16.5px; }
}

/* Amiri mode on phones/tablets: keep Amiri for big headlines, use the clear UI font for small text */
@media (max-width: 900px) {
  [data-font="amiri"] .headlines a,
  [data-font="amiri"] .most-read a,
  [data-font="amiri"] .timeline__list a,
  [data-font="amiri"] .mini .card__title,
  [data-font="amiri"] .row .card__title,
  [data-font="amiri"] .strip .card__title,
  [data-font="amiri"] .grid-4 .card__title,
  [data-font="amiri"] .menu a {
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.7;
  }
  [data-font="amiri"] .menu a { font-size: 14.5px; }
}
