/* ═══════════════════════════════════════════════════════════════════
   ShSar – Arabic-first Entertainment News
   styles.css  ·  v2.0 — Premium Apple-inspired redesign
   Brand: Royal Navy #1a3a8f · Gold #c9a84c
   ═══════════════════════════════════════════════════════════════════ */

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

:root {
  --primary:       #1a3a8f;
  --primary-deep:  #0f2460;
  --primary-light: #2451c8;
  --accent:        #c9a84c;
  --accent-light:  #e4c97a;
  --danger:        #c0392b;
  --bg:            #070d18;
  --surface:       #0d1626;
  --surface2:      #152032;
  --surface3:      #1c2d45;
  --border:        #1c2d45;
  --border-soft:   rgba(28,45,69,.55);
  --text:          #e8edf5;
  --text-muted:    #6882a0;
  --text-dim:      #95aec6;
  --white:         #ffffff;
  --radius:        10px;
  --radius-lg:     18px;
  --radius-xl:     28px;
  --shadow:        0 4px 32px rgba(0,0,0,.65);
  --shadow-card:   0 8px 40px rgba(0,0,0,.55);
  --shadow-gold:   0 8px 32px rgba(201,168,76,.25);
  --headline-size: 38px;
  --font-scale:    1;
  --font-family:   "Cairo";
  --font-ar:       var(--font-family), "Cairo", "Tajawal", system-ui, sans-serif;
  --font-en:       "Inter", system-ui, sans-serif;
  --transition:    .25s ease;
  --transition-slow: .4s cubic-bezier(.25,.46,.45,.94);
}

html {
  font-size: calc(16px * var(--font-scale));
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  direction: rtl;
}
body.lang-en { font-family: var(--font-en); direction: ltr; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Google Fonts ───────────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Tajawal:wght@300;400;700&family=Inter:wght@300;400;600;700&display=swap");

/* ── Utilities ──────────────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.small-note { font-size: .8rem; color: var(--text-muted); }
.spacer { flex: 1; }

/* ══════════════════════════════════════════════════════════════════
   TOP NAV — Frosted glass, Apple-style
   ══════════════════════════════════════════════════════════════════ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 2rem;
  background: rgba(7, 13, 24, 0.78);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-bottom: 1px solid rgba(28, 45, 69, 0.5);
  transition: background var(--transition);
}
.site-nav:hover { background: rgba(7, 13, 24, 0.92); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(201,168,76,.25));
  transition: filter var(--transition), transform var(--transition);
}
.nav-logo:hover .nav-logo-img {
  filter: drop-shadow(0 4px 16px rgba(201,168,76,.4));
  transform: scale(1.04);
}
.nav-logo .logo-ar {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -.01em;
}
.nav-logo .logo-en {
  font-size: .82rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .02em;
}

.nav-links {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  list-style: none;
  overflow: hidden;
}
.nav-links a {
  display: block;
  padding: .35rem .75rem;
  border-radius: var(--radius);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .01em;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,.06);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-inline-start: auto;
  flex-shrink: 0;
}

.search-pill {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50px;
  padding: .3rem .9rem;
  gap: .45rem;
  transition: background var(--transition), border-color var(--transition);
}
.search-pill:focus-within {
  background: rgba(255,255,255,.1);
  border-color: rgba(201,168,76,.4);
}
.search-pill input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: .82rem;
  width: 140px;
}
.search-pill input::placeholder { color: var(--text-muted); }
.search-pill svg { opacity: .4; flex-shrink: 0; }

.lang-toggle {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50px;
  padding: .3rem .85rem;
  color: var(--text-dim);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: all var(--transition);
}
.lang-toggle:hover {
  background: rgba(201,168,76,.12);
  border-color: rgba(201,168,76,.3);
  color: var(--accent);
}

/* ══════════════════════════════════════════════════════════════════
   ANNOUNCEMENT BAR
   ══════════════════════════════════════════════════════════════════ */
.site-announcement {
  background: linear-gradient(90deg, var(--primary-deep), var(--primary), var(--primary-deep));
  color: var(--white);
  text-align: center;
  padding: .65rem 1.5rem;
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: .01em;
}

/* ══════════════════════════════════════════════════════════════════
   AD TICKER
   ══════════════════════════════════════════════════════════════════ */
.ad-ticker {
  background: linear-gradient(90deg, var(--primary-deep) 0%, #1a2d6b 100%);
  color: var(--white);
  font-size: .8rem;
  font-weight: 700;
  overflow: hidden;
  height: 2.1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(201,168,76,.15);
}
.ticker-label {
  background: rgba(201,168,76,.18);
  border-inline-end: 1px solid rgba(201,168,76,.2);
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--accent);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.ticker-track { flex: 1; overflow: hidden; position: relative; }
.ticker-inner {
  display: inline-flex;
  gap: 3rem;
  white-space: nowrap;
  animation: ticker-scroll 28s linear infinite;
  padding-inline-start: 100%;
}
.ticker-inner span { flex-shrink: 0; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════════════════════════
   HERO / LEAD — Full-height cinematic
   ══════════════════════════════════════════════════════════════════ */
.hero-section {
  position: relative;
  min-height: min(88vh, 680px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--surface);
}

.hero-section img.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .52;
  transition: transform 12s ease, opacity .6s ease;
  transform-origin: center;
}
.hero-section:hover img.hero-img { transform: scale(1.025); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(7, 13, 24, 1)   0%,
    rgba(7, 13, 24, .85) 30%,
    rgba(7, 13, 24, .35) 65%,
    rgba(7, 13, 24, .05) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 2.5rem 3.5rem;
  max-width: 900px;
  animation: hero-rise .6s ease both;
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content .eyebrow { margin-bottom: .75rem; }

.hero-title {
  font-size: clamp(1.9rem, 4.5vw, var(--headline-size));
  font-weight: 900;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 1rem;
  letter-spacing: -.02em;
  text-shadow: 0 2px 24px rgba(0,0,0,.4);
}

.hero-summary {
  font-size: 1.05rem;
  color: rgba(232,237,245,.72);
  max-width: 580px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.hero-meta {
  font-size: .78rem;
  color: rgba(104,130,160,.85);
  display: flex;
  gap: 1.2rem;
  align-items: center;
  margin-bottom: 1.4rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent);
  color: #0d0d0d;
  padding: .75rem 1.9rem;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .01em;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  box-shadow: 0 4px 20px rgba(201,168,76,.35);
}
.hero-cta:hover {
  transform: scale(1.05) translateY(-1px);
  box-shadow: 0 12px 40px rgba(201,168,76,.5);
  background: var(--accent-light);
  color: #0d0d0d;
}

/* ══════════════════════════════════════════════════════════════════
   CONTENT SECTIONS
   ══════════════════════════════════════════════════════════════════ */
.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 3rem 1.8rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.section-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  inset-inline-start: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.section-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--white);
}
.section-header .see-all {
  margin-inline-start: auto;
  font-size: .78rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .03em;
  transition: opacity var(--transition);
}
.section-header .see-all:hover { opacity: .75; color: var(--accent); }

/* ══════════════════════════════════════════════════════════════════
   ARTICLE GRID & CARDS — Premium Apple-style
   ══════════════════════════════════════════════════════════════════ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.4rem;
}
.articles-grid.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.articles-grid.grid-2 { grid-template-columns: repeat(2, 1fr); }

.article-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition:
    transform var(--transition-slow),
    box-shadow var(--transition-slow),
    border-color var(--transition);
  will-change: transform;
}
.article-card:hover {
  transform: translateY(-7px) scale(1.012);
  box-shadow: 0 24px 64px rgba(0,0,0,.72);
  border-color: rgba(201,168,76,.22);
}

.thumb {
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  background: var(--surface2);
  min-height: 150px;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform var(--transition-slow);
}
.article-card:hover .thumb img { transform: scale(1.06); }

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,13,24,.65) 0%, transparent 55%);
  pointer-events: none;
}

.thumb .category-badge {
  position: absolute;
  top: .7rem;
  inset-inline-start: .7rem;
  background: rgba(201,168,76,.9);
  color: #0d0d0d;
  font-size: .66rem;
  font-weight: 800;
  padding: .22rem .6rem;
  border-radius: 50px;
  letter-spacing: .06em;
  text-transform: uppercase;
  z-index: 1;
  backdrop-filter: blur(8px);
}

/* Badge shown inline inside card-body when there is no thumbnail */
.category-badge--inline {
  display: inline-block;
  background: rgba(201,168,76,.18);
  color: var(--accent);
  border: 1px solid rgba(201,168,76,.35);
  font-size: .66rem;
  font-weight: 800;
  padding: .2rem .6rem;
  border-radius: 50px;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

/* Card with no image: slightly taller body padding so it doesn't feel empty */
.article-card--no-image .card-body {
  padding-top: 1.4rem;
}

.card-body {
  padding: 1rem 1.1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-title {
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--white);
  margin-bottom: .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -.005em;
}
.card-summary {
  font-size: .8rem;
  color: var(--text-muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-top: .8rem;
  padding-top: .7rem;
  border-top: 1px solid var(--border-soft);
  font-size: .72rem;
  color: var(--text-muted);
}
.card-meta .views::before { content: "👁 "; }
.card-meta .read-time::before { content: "🕐 "; }

/* ══════════════════════════════════════════════════════════════════
   FEATURED STRIP
   ══════════════════════════════════════════════════════════════════ */
.featured-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .9rem;
}

/* ══════════════════════════════════════════════════════════════════
   SIDEBAR LAYOUT
   ══════════════════════════════════════════════════════════════════ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.8rem;
  align-items: start;
}
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

.sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sidebar-widget-header {
  padding: .8rem 1.1rem;
  border-bottom: 1px solid var(--border-soft);
  font-size: .82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--white);
  letter-spacing: -.01em;
}
.sidebar-widget-header::before {
  content: "";
  display: block;
  width: 3px;
  height: 1.1em;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.sidebar-list { list-style: none; }
.sidebar-list li {
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  gap: .6rem;
  align-items: center;
}
.sidebar-list li:last-child { border: none; }
.sidebar-list a {
  display: flex;
  gap: .6rem;
  align-items: center;
  padding: .65rem 1.1rem;
  width: 100%;
  font-size: .83rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}
.sidebar-list a:hover { background: var(--surface2); color: var(--accent); }
.sidebar-list .rank {
  color: var(--accent);
  font-weight: 900;
  font-size: .78rem;
  min-width: 1.4rem;
  text-align: center;
}
.sidebar-list .views-count { color: var(--text-muted); font-size: .72rem; margin-inline-start: auto; }

/* ══════════════════════════════════════════════════════════════════
   VIDEO SECTION
   ══════════════════════════════════════════════════════════════════ */
.video-section .video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
}
.video-section .video-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ══════════════════════════════════════════════════════════════════
   CUSTOM PAGE
   ══════════════════════════════════════════════════════════════════ */
.custom-page .page-body { font-size: 1.02rem; line-height: 1.85; }
.custom-page .page-body h2 { font-size: 1.3rem; font-weight: 700; margin: 1.5rem 0 .6rem; }
.custom-page .page-body p { margin-bottom: 1.1rem; }
.custom-page .page-body ul, .custom-page .page-body ol { margin: 0 1.4rem 1.1rem; }
.custom-page .page-body a { color: var(--accent); font-weight: 600; }

/* ══════════════════════════════════════════════════════════════════
   ARTICLE VIEW — Immersive read
   ══════════════════════════════════════════════════════════════════ */
.article-view {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.8rem;
}
.article-view .article-header { margin-bottom: 1.8rem; }
.article-view .article-header .eyebrow { margin-bottom: .55rem; }
.article-view .article-header h1 {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 1rem;
  letter-spacing: -.025em;
}
.article-view .article-header .summary {
  font-size: 1.1rem;
  color: var(--text-dim);
  border-inline-start: 3px solid var(--accent);
  padding-inline-start: 1.1rem;
  margin-bottom: 1.1rem;
  line-height: 1.6;
}
.article-view .article-meta {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  font-size: .78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.article-view .article-image {
  width: 100%;
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
  aspect-ratio: 16/9;
  object-fit: cover;
  box-shadow: var(--shadow-card);
}
.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}
.article-body h2 { font-size: 1.3rem; font-weight: 800; margin: 2rem 0 .75rem; color: var(--white); }
.article-body p { margin-bottom: 1.1rem; }
.article-body blockquote {
  border-inline-start: 3px solid var(--accent);
  padding-inline-start: 1.4rem;
  margin: 1.8rem 0;
  font-style: italic;
  color: var(--text-dim);
  background: rgba(201,168,76,.04);
  padding: 1rem 1rem 1rem 1.4rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 2rem; }
.tag-badge {
  background: var(--surface2);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  border-radius: 50px;
  padding: .3rem .9rem;
  font-size: .76rem;
  font-weight: 600;
  transition: all var(--transition);
}
.tag-badge:hover { border-color: var(--accent); color: var(--accent); background: rgba(201,168,76,.07); }

/* ══════════════════════════════════════════════════════════════════
   SEARCH PAGE
   ══════════════════════════════════════════════════════════════════ */
.search-view {
  max-width: 920px;
  margin: 0 auto;
  padding: 3rem 1.8rem;
}
.search-hero { text-align: center; padding: 2.5rem 1rem 2rem; }
.search-hero h1 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 1.2rem;
  color: var(--white);
  letter-spacing: -.02em;
}
.search-input-wrap {
  display: flex;
  gap: .6rem;
  max-width: 560px;
  margin: 0 auto;
}
.search-input-wrap input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: .75rem 1.2rem;
  color: var(--text);
  font-size: .95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input-wrap input:focus {
  border-color: rgba(201,168,76,.5);
  box-shadow: 0 0 0 3px rgba(201,168,76,.1);
}
.search-input-wrap button {
  background: var(--accent);
  color: #0d0d0d;
  border: none;
  border-radius: 50px;
  padding: .75rem 1.4rem;
  font-size: .9rem;
  font-weight: 700;
  transition: transform var(--transition), box-shadow var(--transition);
}
.search-input-wrap button:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-gold);
}
.search-filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
  justify-content: center;
}
.filter-chip {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 50px;
  padding: .35rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-chip.active,
.filter-chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #0d0d0d;
  font-weight: 700;
}
.search-results-count { color: var(--text-muted); font-size: .84rem; margin-bottom: 1.2rem; }

/* ══════════════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.pagination button {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  color: var(--text);
  border-radius: 50px;
  padding: .45rem 1rem;
  font-size: .84rem;
  transition: all var(--transition);
  min-width: 40px;
}
.pagination button:hover,
.pagination button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0d0d0d;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(201,168,76,.3);
}
.pagination button:disabled { opacity: .35; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════════════
   FOOTER — Premium dark navy
   ══════════════════════════════════════════════════════════════════ */
.site-footer {
  background: linear-gradient(180deg, var(--surface) 0%, #060c16 100%);
  border-top: 1px solid rgba(201,168,76,.12);
  padding: 4rem 2rem 2rem;
  margin-top: 5rem;
}
.footer-brand-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 12px rgba(201,168,76,.2));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand .logo-text {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -.02em;
  margin-bottom: .3rem;
}
.footer-brand .logo-text span { color: var(--accent); }
.footer-brand .tagline { font-size: .84rem; color: var(--text-muted); line-height: 1.55; }
.footer-col h4 {
  font-size: .75rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-dim);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-col ul a {
  font-size: .84rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-col ul a:hover { color: var(--accent); }
.social-row { display: flex; gap: .6rem; margin-top: 1rem; }
.social-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: .88rem;
  transition: all var(--transition);
  color: var(--text-muted);
}
.social-btn:hover {
  background: rgba(201,168,76,.15);
  border-color: rgba(201,168,76,.4);
  color: var(--accent);
  transform: translateY(-2px);
}
.footer-bottom {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,.05);
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: .76rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.footer-bottom a { color: var(--text-muted); transition: color var(--transition); }
.footer-bottom a:hover { color: var(--accent); }

/* Gold divider accent */
.footer-gold-line {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
  margin-bottom: 1rem;
}

/* ══════════════════════════════════════════════════════════════════
   LOADING / SKELETON
   ══════════════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes skeleton-wave {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card { height: 295px; }
.skeleton-hero { height: 480px; border-radius: var(--radius-xl); }
.skeleton-text { height: 1em; margin-bottom: .4em; }

/* ══════════════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  inset-inline-start: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}
.toast {
  background: var(--surface2);
  border: 1px solid var(--border-soft);
  border-inline-start: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: .85rem 1.2rem;
  font-size: .86rem;
  max-width: 320px;
  box-shadow: var(--shadow-card);
  pointer-events: all;
  animation: toast-in .3s cubic-bezier(.25,.46,.45,.94) forwards;
}
.toast.success { border-inline-start-color: #27ae60; }
.toast.error   { border-inline-start-color: var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ══════════════════════════════════════════════════════════════════
   ADMIN PORTAL STYLES
   ══════════════════════════════════════════════════════════════════ */
.portal-body {
  font-family: var(--font-ar);
  background: #080d10;
  color: var(--text);
  min-height: 100vh;
  direction: rtl;
}
.portal-body.lang-en { font-family: var(--font-en); direction: ltr; }

/* Portal header */
.portal-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: .7rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.portal-logo { font-size: 1.1rem; font-weight: 900; color: var(--white); }
.portal-logo span { color: var(--accent); }
.portal-status { font-size: .78rem; color: var(--text-muted); }
.portal-controls { margin-inline-start: auto; display: flex; gap: .5rem; align-items: center; }

/* Auth section */
.auth-section { max-width: 480px; margin: 3rem auto; padding: 0 1rem; }
.auth-tabs {
  display: flex;
  gap: .2rem;
  margin-bottom: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  padding: .3rem;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: .5rem .8rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition);
}
.auth-tab.active { background: var(--primary); color: var(--white); }
.auth-form { display: none; flex-direction: column; gap: .8rem; }
.auth-form[data-auth-panel].active { display: flex; }
.auth-form label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; font-weight: 600; }
.auth-form input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .65rem .9rem;
  color: var(--text);
  font-size: .9rem;
  outline: none;
  transition: border-color var(--transition);
}
.auth-form input:focus { border-color: var(--primary); }
.auth-form button[type="submit"] {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: .7rem;
  font-size: .9rem;
  font-weight: 700;
  margin-top: .3rem;
  transition: opacity var(--transition);
}
.auth-form button[type="submit"]:hover { opacity: .85; }

/* Admin grid */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1.2rem;
}
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } }

.admin-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.admin-panel.full-width { grid-column: 1 / -1; }
.panel-title { padding: 1rem 1.2rem .6rem; border-bottom: 1px solid var(--border); }
.panel-title .eyebrow::before { display: none; }
.panel-title .eyebrow { font-size: .7rem; margin-bottom: .2rem; }
.panel-title h2 { font-size: 1rem; font-weight: 700; }

/* Command panel */
#siteCommand {
  background: #080d10;
  border: none;
  color: var(--text);
  font-family: var(--font-ar);
  font-size: .9rem;
  height: 130px;
  padding: 1rem 1.2rem;
  resize: vertical;
  width: 100%;
  outline: none;
  border-bottom: 1px solid var(--border);
}
.button-row {
  display: flex;
  gap: .6rem;
  padding: .8rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.primary-action {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: .5rem 1.1rem;
  font-size: .85rem;
  font-weight: 700;
  transition: opacity var(--transition);
}
.primary-action:hover { opacity: .85; }
.button-row button:not(.primary-action) {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .5rem .9rem;
  font-size: .85rem;
  color: var(--text-muted);
}
.command-log {
  padding: .9rem 1.2rem;
  flex: 1;
  font-size: .8rem;
  color: var(--text-muted);
  min-height: 100px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.log-entry { display: flex; gap: .5rem; align-items: flex-start; }
.log-entry.success { color: #2ecc71; }
.log-entry.error { color: var(--danger); }

/* Source panel */
.source-list {
  padding: .8rem 1.2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.source-list label { display: flex; align-items: center; gap: .5rem; font-size: .83rem; cursor: pointer; }
.source-list input[type="checkbox"] { accent-color: var(--primary); }
.queue-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}
.queue-list > div { padding: .8rem 1rem; border-inline-end: 1px solid var(--border); text-align: center; }
.queue-list > div:last-child { border: none; }
.queue-list strong { display: block; font-size: .75rem; color: var(--text-muted); margin-bottom: .2rem; }
.queue-list span { font-size: 1.1rem; font-weight: 700; color: var(--white); }
.source-form { padding: .9rem 1.2rem; display: flex; flex-direction: column; gap: .7rem; }
.source-form label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; font-weight: 600; }
.source-form input, .source-form textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .5rem .8rem;
  color: var(--text);
  font-size: .85rem;
  outline: none;
}
.source-form textarea { height: 80px; resize: vertical; }
.source-form input:focus, .source-form textarea:focus { border-color: var(--primary); }

/* Articles panel */
.articles-panel { grid-column: 1 / -1; }
.panel-toolbar {
  display: flex;
  gap: .5rem;
  align-items: center;
  padding: .7rem 1.2rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.panel-toolbar input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .4rem .8rem;
  color: var(--text);
  font-size: .83rem;
  outline: none;
}
.panel-toolbar select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .4rem .7rem;
  color: var(--text);
  font-size: .83rem;
}
.articles-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.articles-table th {
  padding: .6rem 1rem;
  text-align: start;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.articles-table td { padding: .65rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.articles-table tr:hover td { background: var(--surface2); }
.articles-table .status-badge { padding: .2rem .55rem; border-radius: 4px; font-size: .72rem; font-weight: 700; }
.status-badge.published { background: rgba(46,204,113,.15); color: #2ecc71; }
.status-badge.draft { background: rgba(201,168,76,.15); color: var(--accent); }
.status-badge.archived { background: rgba(122,138,150,.15); color: var(--text-muted); }
.table-actions { display: flex; gap: .4rem; }
.table-actions button {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .25rem .6rem;
  font-size: .75rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.table-actions button:hover { background: var(--primary); border-color: var(--primary); color: var(--white); }
.table-actions button.danger:hover { background: var(--danger); border-color: var(--danger); color: var(--white); }

/* Article editor (admin) */
.article-editor {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  min-height: 500px;
}
.editor-main { padding: 1.2rem; border-inline-end: 1px solid var(--border); display: flex; flex-direction: column; gap: .8rem; }
.editor-sidebar { padding: 1rem; display: flex; flex-direction: column; gap: .9rem; }
.field-group { display: flex; flex-direction: column; gap: .3rem; }
.field-group label { font-size: .78rem; font-weight: 700; color: var(--text-muted); }
.field-group input,
.field-group textarea,
.field-group select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .55rem .8rem;
  color: var(--text);
  font-size: .88rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}
.field-group textarea { min-height: 180px; resize: vertical; }
.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus { border-color: var(--primary); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; font-size: .85rem; }
.toggle-row input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; cursor: pointer; }
.editor-actions {
  display: flex;
  gap: .6rem;
  padding: .9rem 1.2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.btn-secondary {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .5rem 1rem;
  font-size: .85rem;
  color: var(--text);
  font-weight: 600;
  transition: background var(--transition);
}
.btn-secondary:hover { background: var(--surface3); }
.btn-danger {
  background: transparent;
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: .5rem 1rem;
  font-size: .85rem;
  color: var(--danger);
  font-weight: 600;
  margin-inline-start: auto;
  transition: all var(--transition);
}
.btn-danger:hover { background: var(--danger); color: var(--white); }

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto 1rem;
  padding: 0 1.2rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem;
}
.stat-card .stat-label { font-size: .75rem; color: var(--text-muted); margin-bottom: .3rem; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 900; color: var(--white); }
.stat-card .stat-sub { font-size: .72rem; color: var(--text-muted); margin-top: .2rem; }

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
  backdrop-filter: blur(4px);
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-close {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.modal-close:hover { background: var(--danger); color: var(--white); border-color: var(--danger); }

/* ── Image upload box ───────────────────────────────────────────── */
.upload-box { display: flex; flex-direction: column; gap: .55rem; }
.upload-box input[type="file"] {
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: .45rem .6rem;
  color: var(--text);
  font-size: .82rem;
  cursor: pointer;
  width: 100%;
}
.upload-box input[type="file"]::-webkit-file-upload-button {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  color: var(--text);
  padding: .25rem .6rem;
  cursor: pointer;
  font-size: .8rem;
}
.upload-box-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.upload-box-actions .btn-secondary { flex: 1; min-width: 7rem; text-align: center; }
.upload-preview {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-top: .2rem;
}

/* ── Light theme override ────────────────────────────────────────── */
.theme-light {
  --bg:        #f5f6f9;
  --surface:   #ffffff;
  --surface2:  #f0f2f6;
  --surface3:  #e8eaf0;
  --border:    #dde2ea;
  --border-soft: rgba(221,226,234,.6);
  --text:      #0f1829;
  --text-muted:#6882a0;
  --text-dim:  #455879;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-nav { padding: 0 1rem; height: 54px; }
  .nav-links { display: none; }
  .search-pill input { width: 100px; }
  .hero-section { min-height: 65vh; }
  .hero-content { padding: 2rem 1.2rem 2.5rem; }
  .hero-title { font-size: 1.65rem; }
  .content-section { padding: 2rem 1rem; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .admin-grid { padding: 0 .7rem; }
  .article-editor { grid-template-columns: 1fr; }
  .articles-table { font-size: .75rem; }
  .two-col { grid-template-columns: 1fr; }
}
