/*
Theme Name: Sawt Al-Haq — صوت الحق
Theme URI: https://sawt-alhaq.example
Author: Client 001 Studio
Description: قالب إخباري فاخر ومستقبلي RTL لمنصة "صوت الحق" — هوية موريتانية أصيلة (الهلال والنجمة، ألوان العلم، الكثبان، الزخارف المغربية) مع حركات عصرية، شريط أخبار عاجلة وقارئ صوتي ذكي.
Version: 2.3.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: sawt-alhaq
Tags: news, rtl-language-support, custom-menu, featured-images, dark
*/

/* ============ Design Tokens — Mauritanian Futuristic ============ */
:root {
  /* desert night greens (from the flag's field, deepened) */
  --night: #0E0F13;
  --night-2: #16181E;
  --night-3: #1E2129;
  /* national colors */
  --green: #FF4D5E;
  --green-deep: #CF2F42;
  --gold: #FFC72C;
  --gold-strong: #C9971B;
  --gold-soft: #FFE08A;
  --red: #CE1126;
  /* sand papers */
  --paper: #FFFFFF;
  --paper-2: #F7F5F6;
  --ink: #121014;
  --muted: #6A6570;
  --border: #EAE6E8;
  --border-dark: rgba(255,199,44,.14);
  --hairline: rgba(255,255,255,.08);
  --font-head: 'Noto Kufi Arabic', 'Cairo', sans-serif;
  --font-body: 'Noto Naskh Arabic', 'Amiri', serif;
  --radius: 16px;
  --shadow-lux: 0 24px 60px -22px rgba(10,11,15,.45);
  --ease: cubic-bezier(.16,1,.3,1);
  /* Moorish eight-point star lattice, drawn once, tiled */
  --pattern-khatam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23FFC72C' stroke-opacity='.16'%3E%3Cpath d='M28 6l6 16 16 6-16 6-6 16-6-16-16-6 16-6z'/%3E%3Ccircle cx='28' cy='28' r='4'/%3E%3C/g%3E%3C/svg%3E");
  /* dune waves divider */
  --dunes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C240,10 420,85 720,55 C1020,25 1200,80 1440,45 L1440,90 L0,90 Z' fill='%2316181E'/%3E%3Cpath d='M0,75 C280,35 520,95 820,70 C1100,48 1260,88 1440,65 L1440,90 L0,90 Z' fill='%230E0F13' fill-opacity='.85'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.06rem;
  line-height: 1.9;
  color: var(--ink);
  background: var(--paper);
  direction: rtl;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5 { font-family: var(--font-head); line-height: 1.35; margin: 0 0 .5em; }
a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--green-deep); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.container { max-width: 1240px; margin-inline: auto; padding-inline: 20px; }

/* ============ Scroll reveal (JS adds .in; falls back to visible without JS) ============ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s var(--ease), transform .55s var(--ease); transition-delay: var(--rd, 0ms); }
.reveal.in, .no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ============ Flag ribbon: red / gold / green hairlines crowning the page ============ */
.flag-ribbon { height: 5px; background: linear-gradient(90deg, var(--red) 0 25%, var(--gold) 25% 50%, #00A651 50% 75%, var(--red) 75%); }

/* ============ Top bar ============ */
.topbar { background: var(--night); color: #FFFFFF; font-size: .82rem; border-bottom: 1px solid var(--hairline); }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 12px; }
.topbar .date { display: flex; align-items: center; gap: 10px; letter-spacing: .02em; }
.topbar .flag { width: 22px; height: 14px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.15); }
.topbar .clock { color: #FFFFFF; font-weight: 700; font-variant-numeric: tabular-nums; }
.topbar .social { display: flex; gap: 14px; align-items: center; }
.topbar .social a { opacity: .95; }
.topbar .social a:hover { opacity: 1; color: var(--gold-soft); }
.topbar .social svg { width: 15px; height: 15px; fill: currentColor; }

/* ============ Header — desert night + aurora + khatam lattice ============ */
.site-header {
  position: relative;
  background:
    radial-gradient(1100px 420px at 82% -30%, rgba(255,77,94,.22), transparent 60%),
    radial-gradient(900px 380px at 8% 130%, rgba(255,199,44,.13), transparent 65%),
    linear-gradient(160deg, #181B25 0%, #101117 55%, #0E0F13 100%);
  color: #fff;
  padding: 28px 0 0;
  overflow: hidden;
  isolation: isolate;
}
/* starfield */
.site-header::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, rgba(255,255,255,.95), transparent),
    radial-gradient(1px 1px at 32% 68%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.6px 1.6px at 55% 18%, rgba(255,199,44,.85), transparent),
    radial-gradient(1px 1px at 71% 52%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.4px 1.4px at 88% 30%, rgba(255,255,255,.8), transparent),
    radial-gradient(1px 1px at 44% 84%, rgba(255,199,44,.6), transparent),
    radial-gradient(1.2px 1.2px at 92% 78%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 5% 55%, rgba(255,255,255,.65), transparent);
  background-size: 340px 220px;
  animation: twinkle 4.5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }
/* comet streaking across the header */
.header-inner::after {
  content: ""; position: absolute; top: 18%; right: -150px; width: 130px; height: 2px;
  border-radius: 2px; background: linear-gradient(270deg, #fff, rgba(255,199,44,.9), transparent);
  box-shadow: 0 0 12px rgba(255,255,255,.8); opacity: 0; transform: rotate(-16deg);
  animation: comet 9s ease-in 3s infinite; pointer-events: none;
}
@keyframes comet {
  0% { right: -150px; top: 16%; opacity: 0; }
  4% { opacity: .95; }
  16% { right: 108%; top: 58%; opacity: 0; }
  100% { right: 108%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .site-header::before, .header-inner::after { animation: none; } }
.site-header::after {
  content: "";
  position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
/* ambient aurora blobs */
.aurora { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora i {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35;
  animation: drift 16s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { width: 420px; height: 420px; background: radial-gradient(circle, var(--green) 0%, transparent 70%); top: -160px; right: 8%; }
.aurora i:nth-child(2) { width: 340px; height: 340px; background: radial-gradient(circle, var(--gold) 0%, transparent 70%); top: -120px; left: 12%; opacity: .22; animation-delay: -6s; animation-duration: 20s; }
.aurora i:nth-child(3) { width: 260px; height: 260px; background: radial-gradient(circle, var(--green-deep) 0%, transparent 70%); bottom: -140px; right: 40%; animation-delay: -11s; }
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(-60px, 30px, 0) scale(1.15); }
}
@media (prefers-reduced-motion: reduce) { .aurora i { animation: none; } }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand img, .brand svg { height: 62px; width: auto; }
.header-search { position: relative; display: flex; }
.header-search input {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  color: #fff; padding: 11px 18px; padding-inline-end: 52px; width: 260px; font-family: inherit; font-size: .9rem;
  transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.header-search input:focus { background: rgba(255,255,255,.1); border-color: var(--green); box-shadow: 0 0 0 3px rgba(255,77,94,.18); outline: none; }
.header-search input::placeholder { color: #A2A6B0; }
.header-search button {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 10px;
  background: var(--green); color: #fff; display: grid; place-items: center;
  transition: background .2s var(--ease);
}
.header-search button:hover { background: var(--green-deep); }
.header-search button svg { width: 16px; height: 16px; }

/* ============ Navigation ============ */
.site-nav { background: rgba(10,11,15,.6); backdrop-filter: blur(12px); border-top: 1px solid var(--hairline); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.site-nav li a {
  position: relative; display: block; padding: 15px 17px; color: #E3E5EB;
  font-family: var(--font-head); font-size: .93rem; font-weight: 500;
  transition: color .25s var(--ease);
}
.site-nav li a::after {
  content: ""; position: absolute; inset-inline: 17px; bottom: 8px; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--green));
  transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease);
  border-radius: 2px;
}
.site-nav li a:hover, .site-nav li.current-menu-item a { color: var(--gold-soft); }
.site-nav li a:hover::after, .site-nav li.current-menu-item a::after { transform: scaleX(1); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-dark); color: #fff; border-radius: 8px; padding: 8px 12px; }

/* ============ Breaking ticker — flag red ============ */
.ticker { background: var(--night); border-bottom: 3px solid var(--gold); overflow: hidden; }
.ticker .container { display: flex; align-items: stretch; gap: 0; padding-inline: 0; }
.ticker-label {
  background: linear-gradient(135deg, var(--red), #8F0C1B);
  color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .88rem;
  display: flex; align-items: center; gap: 8px; padding: 11px 18px; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}
.ticker-label .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.ticker-track { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker-items { display: flex; gap: 48px; white-space: nowrap; animation: ticker 40s linear infinite; padding-inline: 24px; }
.ticker:hover .ticker-items { animation-play-state: paused; }
.ticker-items a { color: #E3E5EB; font-size: .92rem; }
.ticker-items a::before { content: "٭"; color: var(--gold); margin-left: 10px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-items { animation: none; flex-wrap: wrap; white-space: normal; }
  * { scroll-behavior: auto !important; }
}

/* ============ Hero ============ */
.hero { padding: 46px 0 10px; }
.hero-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 26px; }
.hero-main { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 470px; box-shadow: var(--shadow-lux); }
.hero-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.hero-main:hover img { transform: scale(1.04); }
.hero-main .overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, transparent 28%, rgba(10,11,15,.94) 100%);
  padding: 34px; color: #fff;
}
.hero-main h2 { font-size: clamp(1.5rem, 3.2vw, 2.3rem); font-weight: 800; }
.hero-main h2 a { color: #fff; }
.hero-side { display: grid; gap: 26px; }
.hero-card { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 222px; box-shadow: var(--shadow-lux); }
.hero-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.hero-card:hover img { transform: scale(1.05); }
.hero-card .overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, transparent 22%, rgba(10,11,15,.92) 100%);
  padding: 20px; color: #fff;
}
.hero-card h3 { font-size: 1.05rem; }
.hero-card h3 a { color: #fff; }

.cat-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--night);
  font-family: var(--font-head); font-size: .72rem; font-weight: 700;
  padding: 3px 12px; border-radius: 999px; margin-bottom: 12px; width: fit-content;
}
.cat-badge::before { content: "☾"; font-size: .9em; transform: translateY(-1px); }
.meta { display: flex; gap: 14px; align-items: center; color: #CBDDD2; font-size: .8rem; }

/* ============ Sections ============ */
.section { padding: 46px 0 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.section-title { display: flex; align-items: center; gap: 14px; font-size: 1.45rem; font-weight: 800; margin: 0; }
/* eight-point khatam star marker */
.section-title::before {
  content: ""; width: 26px; height: 26px; flex: none;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-strong));
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
  animation: spin-slow 14s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .section-title::before { animation: none; } }
/* gold shimmer sweep on titles */
.section-title span, .section-title { position: relative; }
.section-more {
  font-family: var(--font-head); font-size: .85rem; color: var(--green-deep);
  border: 1px solid var(--border); padding: 7px 16px; border-radius: 999px;
  transition: all .25s var(--ease);
}
.section-more:hover { background: var(--night-2); color: var(--gold-soft); border-color: var(--night-2); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lux); border-color: rgba(255,77,94,.35); }
.card .thumb { aspect-ratio: 16/9.6; overflow: hidden; position: relative; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .thumb img { transform: scale(1.06); }
.card .body { padding: 18px 20px 20px; }
.card .cat-badge { margin-bottom: 10px; }
.card h3 { font-size: 1.02rem; font-weight: 700; }
.card p { color: var(--muted); font-size: .88rem; margin: 6px 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { color: var(--muted); }

/* ============ Dark band — dunes on top, khatam lattice inside ============ */
.band-dark {
  position: relative;
  background: linear-gradient(165deg, var(--night-2), var(--night));
  color: #E3E5EB; padding: 96px 0 54px; margin-top: 64px;
}
.band-dark::before {
  content: ""; position: absolute; top: -1px; inset-inline: 0; height: 90px;
  background: var(--dunes); background-size: 100% 100%;
  transform: rotate(180deg);
}
.band-dark::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--pattern-khatam); opacity: .35;
  mask-image: radial-gradient(60% 60% at 20% 20%, rgba(0,0,0,.8), transparent);
  -webkit-mask-image: radial-gradient(60% 60% at 20% 20%, rgba(0,0,0,.8), transparent);
}
.band-dark .container { position: relative; z-index: 1; }
.band-dark .section-title { color: #fff; }
.band-dark .card { background: rgba(255,255,255,.05); border-color: var(--border-dark); backdrop-filter: blur(6px); }
.band-dark .card h3 a { color: #fff; }
.band-dark .card p { color: #A2A6B0; }
.band-dark .section-more { border-color: var(--border-dark); color: var(--gold-soft); }

/* ============ Article ============ */
.article-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 40px; padding: 44px 0; }
.article h1 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); font-weight: 800; }
.article-meta { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: .85rem; padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.article .featured { border-radius: var(--radius); overflow: hidden; margin: 22px 0; box-shadow: var(--shadow-lux); }
.article-content { font-size: 1.13rem; }
.article-content p { margin: 0 0 1.2em; }
.article-content blockquote {
  position: relative;
  border-right: 4px solid var(--gold); margin: 1.6em 0; padding: 16px 24px;
  background: var(--paper-2); border-radius: 10px; font-family: var(--font-head); font-size: 1.05em;
}
.article-content blockquote::before {
  content: "❝"; position: absolute; top: 6px; left: 14px; color: var(--gold); opacity: .5; font-size: 1.6em;
}

/* TTS Player */
.tts-player {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--night-2), var(--night-3));
  color: #fff; border-radius: var(--radius); padding: 14px 18px; margin: 20px 0;
  border: 1px solid var(--border-dark);
}
.tts-player::after { content: ""; position: absolute; inset: 0; background-image: var(--pattern-khatam); opacity: .25; pointer-events: none; }
.tts-player > * { position: relative; z-index: 1; }
.tts-player .tts-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; flex: none;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-strong));
  color: var(--night); display: grid; place-items: center;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  box-shadow: 0 0 0 0 rgba(255,199,44,.4);
}
.tts-player .tts-btn:hover { transform: scale(1.08); box-shadow: 0 0 24px 2px rgba(255,199,44,.35); }
.tts-player .tts-btn svg { width: 18px; height: 18px; fill: currentColor; }
.tts-title { font-family: var(--font-head); font-size: .9rem; }
.tts-sub { font-size: .75rem; color: #A2A6B0; }
.tts-bars { display: flex; gap: 3px; align-items: flex-end; height: 22px; margin-inline-start: auto; }
.tts-bars span { width: 4px; border-radius: 2px; background: var(--gold); height: 6px; }
.tts-player.playing .tts-bars span { animation: eq .9s ease-in-out infinite alternate; }
.tts-bars span:nth-child(2) { animation-delay: .15s; } .tts-bars span:nth-child(3) { animation-delay: .3s; }
.tts-bars span:nth-child(4) { animation-delay: .45s; } .tts-bars span:nth-child(5) { animation-delay: .6s; }
@keyframes eq { from { height: 5px; } to { height: 22px; } }
.tts-rate { background: rgba(255,255,255,.08); color: #fff; border: 1px solid var(--border-dark); border-radius: 8px; padding: 6px 10px; font-family: inherit; font-size: .8rem; }

/* Share */
.share-row { display: flex; gap: 10px; align-items: center; margin: 26px 0; flex-wrap: wrap; }
.share-row .lbl { font-family: var(--font-head); font-weight: 700; font-size: .9rem; }
.share-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--night-2); color: #fff; transition: all .25s var(--ease);
}
.share-btn:hover { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: var(--night); transform: translateY(-3px) scale(1.05); }
.share-btn svg { width: 17px; height: 17px; fill: currentColor; }

/* Sidebar */
.sidebar .widget { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 26px; }
.sidebar .widget-title { font-size: 1.05rem; font-weight: 800; display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.sidebar .widget-title::before {
  content: ""; width: 18px; height: 18px; flex: none;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-strong));
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
}
.mini-post { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.mini-post:last-child { border-bottom: 0; }
.mini-post img { width: 78px; height: 60px; object-fit: cover; border-radius: 8px; flex: none; }
.mini-post h4 { font-size: .88rem; margin: 0 0 4px; font-weight: 600; }
.mini-post .meta { color: var(--muted); font-size: .74rem; }

/* Archive */
.archive-head { position: relative; background: linear-gradient(165deg, var(--night-3), var(--night)); color: #fff; padding: 44px 0; overflow: hidden; }
.archive-head::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-khatam); opacity: .35; }
.archive-head .container { position: relative; }
.archive-head h1 { font-size: 1.8rem; margin: 0; }
.archive-head p { color: #A2A6B0; margin: 6px 0 0; }
.archive-grid { padding: 40px 0; }

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; padding: 30px 0; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; display: grid; place-items: center; padding-inline: 10px;
  border: 1px solid var(--border); border-radius: 10px; font-family: var(--font-head); font-size: .9rem;
}
.pagination .current { background: var(--night); color: var(--gold-soft); border-color: var(--night); }
.pagination a:hover { border-color: var(--gold); }

/* ============ Footer — dunes rise into the desert night ============ */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, var(--night-2), var(--night));
  color: #A2A6B0; margin-top: 120px; padding: 54px 0 0; font-size: .92rem;
}
.site-footer::before {
  content: ""; position: absolute; top: -89px; inset-inline: 0; height: 90px;
  background: var(--dunes); background-size: 100% 100%;
}
.site-footer::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--pattern-khatam); opacity: .3;
  mask-image: radial-gradient(50% 70% at 80% 100%, rgba(0,0,0,.9), transparent);
  -webkit-mask-image: radial-gradient(50% 70% at 80% 100%, rgba(0,0,0,.9), transparent);
}
.site-footer .container { position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 40px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 5px 0; }
.site-footer a:hover { color: var(--gold-soft); }
.footer-brand img, .footer-brand svg { height: 58px; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid var(--hairline); padding: 18px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .8rem; }
.footer-bottom .gold { color: var(--gold-soft); }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .article-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .grid-3, .hero-side, .grid-4 { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .header-search { width: 100%; } .header-search input { width: 100%; }
  .nav-toggle { display: block; margin: 8px 0; }
  .site-nav ul { display: none; flex-direction: column; }
  .site-nav ul.open { display: flex; }
  .hero-main { min-height: 340px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* WP core alignment classes */
.alignwide { margin-inline: -40px; } .alignfull { margin-inline: calc(50% - 50vw); }
.wp-caption, .wp-caption-text { max-width: 100%; font-size: .8rem; color: var(--muted); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ═══════════ V3 — Advanced Experience Layer ═══════════ */

/* ---------- Scroll progress (grows from the right, RTL) ---------- */
.scroll-progress {
  position: fixed; top: 0; right: 0; height: 4px; width: 100%; z-index: 1200;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transform: scaleX(0); transform-origin: right; pointer-events: none;
}

/* ---------- Intro gate — "المس الشاشة للدخول" ---------- */
.intro-gate {
  position: fixed; inset: 0; z-index: 2000; cursor: pointer;
  display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(900px 500px at 50% 120%, rgba(255,77,94,.25), transparent 60%),
    radial-gradient(700px 400px at 80% -10%, rgba(255,199,44,.12), transparent 60%),
    linear-gradient(165deg, var(--night-3), var(--night) 70%);
  color: #fff; text-align: center;
  transition: transform .9s var(--ease), opacity .9s var(--ease);
}
.intro-gate::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--pattern-khatam); opacity: .4;
  mask-image: radial-gradient(60% 60% at 50% 45%, transparent 30%, rgba(0,0,0,.9));
  -webkit-mask-image: radial-gradient(60% 60% at 50% 45%, transparent 30%, rgba(0,0,0,.9));
  animation: patternDrift 40s linear infinite;
}
@keyframes patternDrift { to { background-position: 0 -560px; } }
.intro-gate.leaving { transform: translateY(-100%); opacity: .2; }
.ig-center { position: relative; padding: 24px; }
.ig-emblem { width: 130px; height: auto; margin-inline: auto; filter: drop-shadow(0 0 34px rgba(255,199,44,.45)); animation: emblemFloat 5s ease-in-out infinite alternate; }
@keyframes emblemFloat { from { transform: translateY(0) } to { transform: translateY(-14px) } }
.ig-title {
  font-family: var(--font-head); font-size: clamp(3rem, 9vw, 5.5rem); font-weight: 800; margin: 18px 0 4px;
  background: linear-gradient(100deg, #fff 30%, var(--gold-soft) 50%, #fff 70%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmerText 4.5s ease-in-out infinite;
}
@keyframes shimmerText { 0%,100% { background-position: 120% 0; } 50% { background-position: -20% 0; } }
.ig-slogan { color: var(--gold); font-size: clamp(1rem, 2.4vw, 1.25rem); letter-spacing: .02em; margin: 0 0 46px; }
.ig-touch {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 14px;
  font-family: var(--font-head); font-size: .95rem; color: #D6D8DF;
}
.ig-ring {
  position: relative; width: 74px; height: 74px; border-radius: 50%;
  border: 1.5px solid rgba(255,199,44,.65); display: grid; place-items: center;
}
.ig-ring::before, .ig-ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid rgba(255,199,44,.55); animation: touchPulse 2.2s var(--ease) infinite;
}
.ig-ring::after { animation-delay: 1.1s; }
@keyframes touchPulse { from { transform: scale(1); opacity: .9; } to { transform: scale(2.1); opacity: 0; } }
.ig-ring svg { width: 30px; height: 30px; fill: var(--gold); }
.ig-hint { font-size: .75rem; color: #A2A6B0; }
.ig-ripple {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,199,44,.8), rgba(255,199,44,0) 70%);
  transform: translate(-50%,-50%) scale(1); pointer-events: none;
  animation: gateRipple .8s var(--ease) forwards;
}
@keyframes gateRipple { to { transform: translate(-50%,-50%) scale(30); opacity: 0; } }
body.gate-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .intro-gate::before, .ig-emblem, .ig-title, .ig-ring::before, .ig-ring::after { animation: none; }
}

/* ---------- Stats strip — أرقام تتحرك ---------- */
.stats-strip {
  position: relative; overflow: hidden; margin-top: 56px;
  background: linear-gradient(120deg, #FBF4F5, #FDFBF2);
  border-block: 1px solid var(--border);
}
.stats-strip::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-khatam); opacity: .3; }
.stats-strip .container { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-block: 34px; }
.stat { text-align: center; color: var(--ink); }
.stat b {
  display: block; font-family: var(--font-head); font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-strong));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: .85rem; color: var(--muted); }

/* ---------- iPhone 17 Pro Max showcase ---------- */
.phone-showcase { position: relative; padding: 70px 0 30px; }
.ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.ps-copy h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; }
.ps-copy h2 em { font-style: normal; background: linear-gradient(135deg, var(--green-deep), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ps-copy p { color: var(--muted); }
.ps-features { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.ps-features li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.ps-features .fi {
  width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--night-2), var(--night-3)); color: var(--gold);
}
.ps-features .fi svg { width: 18px; height: 18px; fill: currentColor; }
.ps-features b { font-family: var(--font-head); display: block; font-size: .92rem; }
.ps-features small { color: var(--muted); }
.ps-stage { position: relative; display: grid; place-items: center; min-height: 660px; }
.ps-glow {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,77,94,.28), rgba(255,199,44,.1) 55%, transparent 70%);
  filter: blur(30px); animation: glowBreath 6s ease-in-out infinite alternate;
}
@keyframes glowBreath { from { transform: scale(.92); opacity: .8; } to { transform: scale(1.08); opacity: 1; } }
.iphone {
  --pw: 302px;
  position: relative; width: var(--pw); aspect-ratio: 430/900;
  border-radius: 52px; padding: 9px;
  background: linear-gradient(160deg, #E8E4DC, #8D8A82 30%, #4A4843 60%, #C9C5BC);
  box-shadow: 0 40px 90px -30px rgba(10,11,15,.6), inset 0 0 3px rgba(255,255,255,.6);
  animation: phoneFloat 7s ease-in-out infinite alternate;
}
@keyframes phoneFloat { from { transform: translateY(8px); } to { transform: translateY(-10px); } }
.ip-inner { position: absolute; inset: 9px; border-radius: 44px; background: #000; overflow: hidden; }
.ip-island {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 26px; border-radius: 999px; background: #000; z-index: 3;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.ip-island::after { content: ""; position: absolute; left: 16px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #1d2b4d, #060a14 70%); }
.ip-screen {
  position: absolute; top: 0; left: 0; width: 430px; height: 932px; border: 0; background: var(--paper);
  transform: scale(calc((302 - 18) / 430)); transform-origin: top left;
}
.ip-btn { position: absolute; background: linear-gradient(90deg, #6d6a63, #3c3a35); border-radius: 3px; }
.ip-btn.power { right: -3px; top: 200px; width: 3px; height: 74px; }
.ip-btn.volu { left: -3px; top: 160px; width: 3px; height: 42px; }
.ip-btn.vold { left: -3px; top: 212px; width: 3px; height: 42px; }
.ip-btn.action { left: -3px; top: 112px; width: 3px; height: 26px; background: linear-gradient(90deg, #C9971B, #8a6812); }
@media (prefers-reduced-motion: reduce) { .iphone, .ps-glow { animation: none; } }

/* ---------- AI assistant — مساعد صوت الحق ---------- */
.ai-fab {
  position: fixed; bottom: 26px; inset-inline-end: 26px; z-index: 1500;
  width: 62px; height: 62px; border-radius: 50%; border: 0;
  background: linear-gradient(135deg, var(--green-deep), var(--night-3));
  color: var(--gold); display: grid; place-items: center;
  box-shadow: 0 12px 34px -8px rgba(0,98,51,.55), 0 0 0 1px var(--border-dark);
  transition: transform .25s var(--ease);
}
.ai-fab:hover { transform: scale(1.08) rotate(6deg); }
.ai-fab svg { width: 28px; height: 28px; fill: currentColor; }
.ai-fab::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid rgba(255,199,44,.5); animation: touchPulse 2.4s var(--ease) infinite;
}
.ai-panel {
  position: fixed; bottom: 102px; inset-inline-end: 26px; z-index: 1500;
  width: min(380px, calc(100vw - 40px)); max-height: min(560px, 70vh);
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(170deg, rgba(22,24,30,.96), rgba(10,11,15,.98));
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-dark); border-radius: 22px;
  box-shadow: var(--shadow-lux);
  opacity: 0; transform: translateY(16px) scale(.97); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.ai-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.ai-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--hairline); color: #fff; }
.ai-head .dot-live { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 1.6s infinite; }
.ai-head b { font-family: var(--font-head); font-size: .95rem; }
.ai-head small { display: block; color: #A2A6B0; font-size: .72rem; }
.ai-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: .88rem; line-height: 1.7; animation: msgIn .3s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.ai-msg.bot { background: rgba(255,255,255,.07); color: #E3E5EB; border-start-end-radius: 4px; align-self: flex-start; }
.ai-msg.user { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: var(--night); border-start-start-radius: 4px; align-self: flex-end; }
.ai-typing { display: inline-flex; gap: 4px; padding: 12px 16px; }
.ai-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: typDot 1s infinite; }
.ai-typing i:nth-child(2) { animation-delay: .18s; } .ai-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes typDot { 30% { transform: translateY(-5px); opacity: .5; } }
.ai-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--hairline); }
.ai-input input {
  flex: 1; background: rgba(255,255,255,.07); border: 1px solid var(--border-dark);
  border-radius: 999px; padding: 10px 16px; color: #fff; font-family: inherit; font-size: .88rem;
}
.ai-input input:focus { outline: none; border-color: var(--gold); }
.ai-input button {
  width: 42px; height: 42px; border-radius: 50%; border: 0; flex: none;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-strong)); color: var(--night);
  display: grid; place-items: center;
}
.ai-input button svg { width: 17px; height: 17px; fill: currentColor; }

/* ---------- AI summary box (article) ---------- */
.ai-summary {
  position: relative; margin: 22px 0; padding: 1.5px; border-radius: var(--radius);
  background: linear-gradient(120deg, var(--gold), var(--green), var(--gold));
  background-size: 250% 100%; animation: borderFlow 5s linear infinite;
}
@keyframes borderFlow { to { background-position: -250% 0; } }
.ai-summary-inner { border-radius: calc(var(--radius) - 1px); background: var(--paper-2); padding: 18px 20px; }
.ai-summary-head { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.ai-summary-head svg { width: 20px; height: 20px; fill: var(--gold-strong); }
.ai-summary-text { font-size: .95rem; color: #3d4a3f; min-height: 1.5em; }
.ai-summary-text .caret { display: inline-block; width: 2px; height: 1em; background: var(--gold-strong); vertical-align: text-bottom; animation: pulse .8s infinite; }
.ai-summary button {
  margin-top: 10px; border: 1px solid var(--gold-strong); background: none; color: var(--gold-strong);
  font-family: var(--font-head); font-size: .8rem; padding: 6px 16px; border-radius: 999px;
  transition: all .25s var(--ease);
}
.ai-summary button:hover { background: var(--gold-strong); color: #fff; }

/* ---------- Editorial drop cap + hero tilt depth ---------- */
.article-content > p:first-of-type::first-letter {
  font-family: var(--font-head); font-weight: 800; font-size: 3.1em; line-height: 1;
  float: right; margin: 4px 0 0 12px; color: var(--green-deep);
}
.hero-main { transform-style: preserve-3d; will-change: transform; }
.hero-main .overlay { transform: translateZ(30px); }

@media (max-width: 1024px) { .ps-grid { grid-template-columns: 1fr; } .ps-stage { min-height: 620px; } }
@media (max-width: 720px) { .stats-strip .container { grid-template-columns: 1fr 1fr; } }

/* ═══════════ V4 — White Luxe + Orbits + Phone Hero ═══════════ */

/* Orbiting planet-dot on news section titles (the khatam star is the sun) */
.section-title::after {
  content: ""; position: absolute; right: 10px; top: calc(50% - 3px);
  width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold-soft), var(--gold-strong));
  box-shadow: 0 0 8px rgba(255,199,44,.7);
  animation: orbit 3.2s linear infinite;
}
@keyframes orbit {
  from { transform: rotate(0deg) translateX(21px); }
  to   { transform: rotate(360deg) translateX(21px); }
}
.section-head { position: relative; }
.section-head::after {
  content: ""; position: absolute; right: 8px; top: calc(50% - 2px);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px rgba(255,77,94,.8);
  animation: orbit2 5.5s linear infinite reverse;
}
@keyframes orbit2 {
  from { transform: rotate(0deg) translateX(31px); }
  to   { transform: rotate(360deg) translateX(31px); }
}
@media (prefers-reduced-motion: reduce) { .section-title::after, .section-head::after { animation: none; display: none; } }

/* Phone hero — first thing visitors see */
.phone-showcase.at-top {
  position: relative; overflow: hidden; padding: 40px 0 10px;
  background:
    radial-gradient(700px 340px at 12% 8%, rgba(255,77,94,.09), transparent 60%),
    radial-gradient(600px 300px at 88% 90%, rgba(255,199,44,.12), transparent 60%),
    #FFFFFF;
}
.phone-showcase.at-top .ps-stage { min-height: 600px; }
.phone-showcase.at-top .ps-copy h2 { font-size: clamp(1.7rem, 3.8vw, 2.6rem); }
.ps-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.ps-cta a {
  font-family: var(--font-head); font-size: .92rem; font-weight: 700;
  padding: 12px 26px; border-radius: 999px; transition: all .25s var(--ease);
}
.ps-cta .primary {
  background: linear-gradient(135deg, var(--green), var(--green-deep)); color: #fff;
  box-shadow: 0 12px 28px -10px rgba(207,47,66,.5);
}
.ps-cta .primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(207,47,66,.6); color: #fff; }
.ps-cta .ghost { border: 1.5px solid var(--gold-strong); color: var(--gold-strong); }
.ps-cta .ghost:hover { background: var(--gold-strong); color: #fff; }

/* floating planet decor in the phone hero */
.planet { position: absolute; border-radius: 50%; pointer-events: none; }
.planet.p1 { width: 14px; height: 14px; top: 18%; left: 8%; background: radial-gradient(circle at 35% 35%, var(--gold-soft), var(--gold-strong)); animation: planetFloat 9s ease-in-out infinite alternate; }
.planet.p2 { width: 9px; height: 9px; top: 64%; left: 4%; background: radial-gradient(circle at 35% 35%, #FFB3BB, var(--green-deep)); animation: planetFloat 7s ease-in-out infinite alternate-reverse; }
.planet.p3 { width: 7px; height: 7px; top: 12%; right: 6%; background: radial-gradient(circle at 35% 35%, #FFD9D9, var(--red)); animation: planetFloat 11s ease-in-out infinite alternate; }
.planet.p4 { width: 20px; height: 20px; bottom: 10%; right: 10%; border: 2px solid rgba(255,199,44,.5); background: none; animation: planetFloat 8s ease-in-out infinite alternate-reverse; }
@keyframes planetFloat { from { transform: translateY(-14px) translateX(0); } to { transform: translateY(14px) translateX(10px); } }
@media (prefers-reduced-motion: reduce) { .planet { animation: none; } }

/* Compact phone below the article (news page) */
.phone-showcase.compact { padding: 30px 0 0; }
.phone-showcase.compact .ps-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.phone-showcase.compact .ps-stage { min-height: 560px; }
.phone-showcase.compact .iphone { --pw: 270px; }
.phone-showcase.compact .ip-screen { transform: scale(calc((270 - 18) / 430)); }

/* ═══════════ V5 — Cosmic header details + News Solar System ═══════════ */

/* Rotating-gradient glass card behind the logo */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.brand > a {
  position: relative; display: inline-block; padding: 12px 20px; border-radius: 22px;
  background: rgba(255,255,255,.055); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.1);
}
.brand > a::before {
  content: ""; position: absolute; inset: -1px; border-radius: 23px; padding: 1.5px;
  background: conic-gradient(from var(--ang), transparent 0 68%, #FF6B78 78%, #FFC72C 88%, transparent 96%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinAngle 5s linear infinite;
}
@keyframes spinAngle { to { --ang: 360deg; } }

/* Search: same glass family, border wakes up on focus */
.header-search { border-radius: 16px; }
.header-search::before {
  content: ""; position: absolute; inset: -1px; border-radius: 17px; padding: 1.5px;
  background: conic-gradient(from var(--ang), transparent 0 70%, rgba(255,107,120,.9) 80%, rgba(255,199,44,.9) 88%, transparent 96%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .35; animation: spinAngle 7s linear infinite; pointer-events: none;
}
.header-search:focus-within::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .brand > a::before, .header-search::before { animation: none; } }

/* ---------- مدار الأخبار — the news solar system ---------- */
.orbit-section { overflow: hidden; }
.solar {
  position: relative; width: min(680px, 94vw); aspect-ratio: 1;
  margin: 8px auto 20px;
}
.sun {
  position: absolute; inset: 0; margin: auto; width: 128px; height: 128px;
  border-radius: 50%; display: grid; place-items: center; text-align: center; z-index: 2;
  background: radial-gradient(circle at 35% 30%, #FFE08A, #FFC72C 55%, #C9971B);
  box-shadow: 0 0 60px 8px rgba(255,199,44,.45), 0 0 120px 30px rgba(255,199,44,.15);
  animation: sunBreath 5s ease-in-out infinite alternate;
}
@keyframes sunBreath {
  from { box-shadow: 0 0 46px 6px rgba(255,199,44,.4), 0 0 100px 24px rgba(255,199,44,.12); }
  to   { box-shadow: 0 0 70px 12px rgba(255,199,44,.55), 0 0 150px 40px rgba(255,199,44,.2); }
}
.sun b { font-family: var(--font-head); font-size: .95rem; color: #1E2129; display: block; }
.sun small { font-size: .62rem; color: rgba(30,33,41,.75); font-family: var(--font-head); }
.ring {
  position: absolute; inset: 0; margin: auto; border-radius: 50%;
  border: 1.5px dashed rgba(207,47,66,.28);
  animation: solarSpin var(--d) linear infinite;
}
.ring.r1 { width: 44%; height: 44%; --d: 30s; }
.ring.r2 { width: 72%; height: 72%; --d: 48s; border-color: rgba(255,199,44,.35); }
.ring.r3 { width: 99%; height: 99%; --d: 66s; }
@keyframes solarSpin { to { transform: rotate(360deg); } }
.pl { position: absolute; inset: -1px; transform: rotate(var(--a)); }
.pl .chip {
  position: absolute; top: 0; left: 50%; translate: -50% -50%;
}
.chip-in {
  rotate: calc(-1 * var(--a));
  animation: counterSpin var(--d) linear infinite;
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 14px; box-shadow: 0 10px 26px -12px rgba(10,11,15,.35);
  font-family: var(--font-head); font-size: .78rem; font-weight: 600; white-space: nowrap;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.chip-in:hover { box-shadow: 0 14px 32px -12px rgba(207,47,66,.45); border-color: rgba(255,77,94,.5); }
@keyframes counterSpin { to { transform: rotate(-360deg); } }
.chip-in .planet-dot {
  width: 12px; height: 12px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 32% 30%, #FF8A94, var(--green-deep));
}
.ring.r2 .chip-in .planet-dot { background: radial-gradient(circle at 32% 30%, var(--gold-soft), var(--gold-strong)); }
.ring.r3 .chip-in .planet-dot { background: radial-gradient(circle at 32% 30%, #B9BDC9, #5A5F6D); }
.solar:hover .ring, .solar:hover .chip-in { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .ring, .chip-in, .sun { animation: none; }
}
@media (max-width: 720px) {
  .solar { width: 96vw; }
  .chip-in { max-width: 128px; font-size: .68rem; padding: 6px 10px; }
  .sun { width: 92px; height: 92px; }
}


/* ═══ Phone screen: live dashboard — black, real map, clock, news ═══ */
.ip-map {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  padding: 48px 14px 14px; gap: 8px;
  background:
    radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    radial-gradient(60% 30% at 50% 0%, rgba(207,47,66,.16), transparent 70%),
    #050608;
  background-size: 18px 18px, auto, auto;
}
.ip-status { display: flex; align-items: center; justify-content: space-between; }
.ip-time {
  font-family: var(--font-head); font-weight: 800; font-size: 1.02rem; color: #fff;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.ip-live {
  display: inline-flex; align-items: center; gap: 5px;
  background: #CF2F42; color: #fff; font-family: var(--font-head);
  font-size: .58rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.ip-live i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.3s infinite; }
.ip-map svg { flex: 1; min-height: 0; width: 100%; overflow: visible; }
.mr-border {
  fill: rgba(255,90,107,.08);
  stroke: #FF5A6B; stroke-width: .9; stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(255,90,107,.35));
  stroke-dasharray: 425; stroke-dashoffset: 425;
  animation: drawMap 3s var(--ease) .4s forwards;
}
@keyframes drawMap { to { stroke-dashoffset: 0; } }
.mr-city { fill: #E3E5EB; }
.mr-cap { fill: #FFC72C; filter: drop-shadow(0 0 4px rgba(255,199,44,.7)); }
.mr-name { font-family: var(--font-head); font-size: 11px; font-weight: 800; fill: rgba(255,255,255,.07); }
.mr-lbl { font-family: var(--font-head); font-size: 3.2px; font-weight: 600; fill: #A2A6B0; }
.mr-lbl-cap { font-size: 3.6px; font-weight: 800; fill: #FF8A94; }
.ip-news { border-top: 1px solid rgba(255,255,255,.12); padding-top: 7px; }
.ip-news .lbl {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-head); font-size: .56rem; font-weight: 700; color: #FF8A94;
  margin-bottom: 4px;
}
.ip-news .lbl::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #FF5A6B; animation: pulse 1.6s infinite; }
.ip-news .itms { position: relative; min-height: 46px; }
.ip-news .itm {
  position: absolute; inset: 0; opacity: 0; transition: opacity .5s var(--ease);
  color: #ECEDEF; font-family: var(--font-head); font-size: .7rem; font-weight: 600; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ip-news .itm.on { opacity: 1; }
.ip-news .itm small { display: block; color: #8A8F99; font-size: .58rem; font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .mr-border { animation: none; stroke-dashoffset: 0; } .ip-live i, .ip-news .lbl::before { animation: none; } }

/* ===== شعار مركزي عصري — Centered futuristic brand (v2) ===== */
.header-inner { flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.brand { flex-direction: column; align-items: center; gap: 0; }
.brand > a { display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; }
.brand svg.brand-emblem { width: 68px; height: 68px; filter: drop-shadow(0 8px 22px rgba(230,57,78,.5)); transition: transform .3s ease; }
.brand > a:hover svg.brand-emblem { transform: translateY(-2px) scale(1.03); }

/* ===== v2.1.0 — iPhone 17 Pro Max «Cosmic Orange»: إطار تيتانيوم برتقالي + شاشة صفراء فاتحة ===== */
.iphone {
  background: linear-gradient(160deg, #FFC89A, #F08A4B 26%, #B85A1E 62%, #FFAE73);
  box-shadow: 0 40px 90px -30px rgba(150,70,10,.6), inset 0 0 3px rgba(255,255,255,.85);
}
.ps-glow {
  background: radial-gradient(circle, rgba(240,124,43,.32), rgba(255,199,44,.12) 55%, transparent 70%);
}
.ip-btn { background: linear-gradient(90deg, #E8935A, #9A5314); }
.ip-btn.action { background: linear-gradient(90deg, #CF2F42, #8E1F2E); }
.ip-island { box-shadow: 0 2px 8px rgba(90,45,5,.35); }
.ip-map {
  padding: 46px 14px 12px; gap: 7px;
  background:
    radial-gradient(rgba(180,105,20,.09) 1px, transparent 1px),
    radial-gradient(70% 34% at 50% 0%, rgba(255,150,60,.30), transparent 72%),
    linear-gradient(180deg, #FFF9E3 0%, #FFEDB8 48%, #FFD98F 100%);
  background-size: 18px 18px, auto, auto;
}
.ip-time { color: #6B3400; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.ip-chips { display: flex; gap: 5px; overflow: hidden; }
.ip-chips span {
  font-family: var(--font-head); font-size: .52rem; font-weight: 700; white-space: nowrap;
  color: #6B4A10; background: rgba(255,255,255,.6);
  border: 1px solid rgba(170,105,25,.28); border-radius: 999px; padding: 3px 9px;
}
.ip-chips span.on {
  background: linear-gradient(135deg, #FFA24E, #F07C1F); color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(240,124,31,.45);
}
.ip-map svg { filter: none; }
.mr-border {
  fill: rgba(212,43,63,.07);
  stroke: #D42B3F; filter: drop-shadow(0 1px 3px rgba(212,43,63,.25));
}
.mr-city { fill: #7A4A10; }
.mr-cap { fill: #E58F00; filter: drop-shadow(0 0 3px rgba(229,143,0,.55)); }
.mr-name { fill: rgba(140,80,10,.12); }
.mr-lbl { fill: #7A5A28; }
.mr-lbl-cap { fill: #C24A1B; }
.ip-news { border-top: 1px solid rgba(160,95,20,.28); }
.ip-news .lbl { color: #C2571B; }
.ip-news .lbl::before { background: #E8763A; }
.ip-news .itm { color: #3A2A10; }
.ip-news .itm small { color: #8A6A3A; }
.ip-meta {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(160,95,20,.28); padding-top: 6px;
  font-family: var(--font-head); font-size: .58rem; font-weight: 600; color: #7A5A28;
}
.ip-meta .wx { display: inline-flex; align-items: center; gap: 5px; }
.ip-meta .wx svg { width: 12px; height: 12px; fill: #F07C1F; filter: drop-shadow(0 0 3px rgba(240,124,31,.5)); }
.ip-meta .d247 { color: #D96C2E; }
.brand-tagline { font-size: clamp(.64rem, 1.6vw, .84rem); max-width: 620px; line-height: 1.9; }

/* ===== v2.1.0 — بوابة الدخول: شاشة قفل واقعية ===== */
.intro-gate { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ig-stars i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: #fff; opacity: .5; animation: igTwinkle 3.2s ease-in-out infinite alternate;
}
.ig-stars i:nth-child(1)  { top: 8%;  left: 12%; animation-delay: -.4s; }
.ig-stars i:nth-child(2)  { top: 14%; left: 78%; width: 2px; height: 2px; animation-delay: -1.1s; }
.ig-stars i:nth-child(3)  { top: 24%; left: 32%; animation-delay: -2s; }
.ig-stars i:nth-child(4)  { top: 30%; left: 88%; width: 2px; height: 2px; animation-delay: -.7s; }
.ig-stars i:nth-child(5)  { top: 44%; left: 6%;  animation-delay: -1.6s; }
.ig-stars i:nth-child(6)  { top: 52%; left: 92%; animation-delay: -.2s; }
.ig-stars i:nth-child(7)  { top: 64%; left: 16%; width: 2px; height: 2px; animation-delay: -2.6s; }
.ig-stars i:nth-child(8)  { top: 72%; left: 82%; animation-delay: -1.3s; }
.ig-stars i:nth-child(9)  { top: 84%; left: 28%; animation-delay: -.9s; }
.ig-stars i:nth-child(10) { top: 88%; left: 66%; width: 2px; height: 2px; animation-delay: -2.2s; }
.ig-stars i:nth-child(11) { top: 6%;  left: 52%; animation-delay: -1.8s; }
.ig-stars i:nth-child(12) { top: 38%; left: 62%; width: 4px; height: 4px; animation-delay: -.5s; }
@keyframes igTwinkle { from { opacity: .15; transform: scale(.8); } to { opacity: .85; transform: scale(1.25); } }
.ig-statusbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 26px; font-family: var(--font-head);
  font-size: .82rem; font-weight: 700; color: rgba(255,255,255,.92);
}
.ig-sysicons { display: inline-flex; align-items: center; gap: 8px; }
.ig-sysicons svg { width: 17px; height: 15px; fill: currentColor; opacity: .92; }
.ig-clockwrap { margin-top: 40px; text-align: center; }
.ig-clock {
  font-family: var(--font-head); font-weight: 500;
  font-size: clamp(3.6rem, 13vw, 6.4rem); line-height: 1.05; color: #fff;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
  text-shadow: 0 6px 40px rgba(255,199,44,.25);
}
.ig-date { color: var(--gold, #FFC72C); font-family: var(--font-head); font-size: clamp(.85rem, 2.2vw, 1.05rem); font-weight: 600; margin-top: 6px; }
.ig-center { padding: 12px 24px 0; }
.ig-emblem { width: 76px; }
.ig-title { font-size: clamp(2rem, 6vw, 3.4rem); margin: 12px 0 2px; }
.ig-slogan { font-size: clamp(.85rem, 2.1vw, 1.05rem); margin: 0 0 30px; max-width: 640px; margin-inline: auto; line-height: 2; }
.ig-fp {
  position: relative; width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  color: var(--gold, #FFC72C);
  background: rgba(255,255,255,.05);
  box-shadow: inset 0 0 0 1.5px rgba(255,199,44,.55), 0 0 34px rgba(255,199,44,.22);
}
.ig-fp::before {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 72%, rgba(255,199,44,.9) 86%, transparent 96%);
  animation: igSpin 2.6s linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #fff calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #fff calc(100% - 3px));
}
@keyframes igSpin { to { transform: rotate(360deg); } }
.ig-fpicon { width: 40px; height: 40px; }
.ig-fpcheck { width: 34px; height: 34px; display: none; color: #38D07A; }
.ig-scanline {
  position: absolute; left: 16%; right: 16%; height: 2px; top: 18%;
  background: linear-gradient(90deg, transparent, rgba(255,199,44,.95), transparent);
  filter: drop-shadow(0 0 6px rgba(255,199,44,.8));
  animation: igScan 2.1s ease-in-out infinite alternate;
}
@keyframes igScan { from { top: 18%; } to { top: 78%; } }
.intro-gate.scanning .ig-fp { color: #38D07A; box-shadow: inset 0 0 0 2px #38D07A, 0 0 44px rgba(56,208,122,.5); }
.intro-gate.scanning .ig-fp::before, .intro-gate.scanning .ig-scanline { display: none; }
.intro-gate.scanning .ig-fpicon { display: none; }
.intro-gate.scanning .ig-fpcheck { display: block; animation: igPop .35s var(--ease); }
@keyframes igPop { from { transform: scale(.4); opacity: 0; } }
.ig-unlock-txt { font-weight: 700; }
.ig-homebar {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  width: 140px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.85);
  animation: igNudge 2.4s ease-in-out infinite;
}
@keyframes igNudge { 0%,100% { transform: translateX(-50%) translateY(0); opacity: .85; } 50% { transform: translateX(-50%) translateY(-7px); opacity: 1; } }
.intro-gate.leaving { transform: translateY(-100%); opacity: .15; filter: blur(6px); }
@media (prefers-reduced-motion: reduce) {
  .ig-stars i, .ig-fp::before, .ig-scanline, .ig-homebar { animation: none; }
}
@media (max-height: 700px) {
  .ig-clockwrap { margin-top: 26px; }
  .ig-clock { font-size: clamp(2.6rem, 9vw, 4rem); }
  .ig-emblem { width: 58px; }
  .ig-slogan { margin-bottom: 16px; }
  .ig-fp { width: 68px; height: 68px; }
}

/* ===== v2.3.0 — خلفية خضراء موريتانية + خط أعرض + شريط أقسام متحرك ===== */
:root {
	--font-head: 'Cairo', 'Noto Kufi Arabic', sans-serif;
	--font-body: 'Tajawal', 'Cairo', sans-serif;
}
body { font-size: 1.03rem; letter-spacing: .1px; }
.topbar { background: #01331C; }
.site-header {
	background:
		radial-gradient(1100px 420px at 82% -30%, rgba(255,199,44,.14), transparent 60%),
		radial-gradient(900px 380px at 8% 130%, rgba(255,255,255,.05), transparent 65%),
		linear-gradient(160deg, #0A5C33 0%, #01552E 55%, #013B20 100%);
}
.band-dark {
	background: linear-gradient(165deg, #03301C 0%, #01552E 100%);
}
.site-footer {
	background: linear-gradient(165deg, #022B18 0%, #014426 100%);
}

/* شريط الأقسام: صفان أفقيان قابلان للتحريك (مكان شريط عاجل) */
.sec-scroller {
	background: linear-gradient(160deg, #014426 0%, #00351E 100%);
	border-bottom: 3px solid var(--gold);
}
.ss-track {
	overflow-x: auto; -webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	display: flex; flex-direction: column; gap: 9px;
	padding: 13px max(16px, calc((100% - 1200px) / 2));
}
.ss-track::-webkit-scrollbar { display: none; }
.ss-row { display: inline-flex; gap: 9px; width: max-content; }
.ss-row:nth-child(2) { margin-inline-start: 38px; }
.ss-chip {
	font-family: var(--font-head); font-weight: 700; font-size: .92rem;
	color: #EAF7EF; background: rgba(255,255,255,.09);
	border: 1px solid rgba(255,255,255,.18);
	padding: 9px 20px; border-radius: 999px; white-space: nowrap;
	transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.ss-chip:hover { background: var(--gold); color: #0E2B1B; transform: translateY(-2px); }
.ss-home { background: var(--gold); color: #123B24 !important; border-color: transparent; font-weight: 800; }
.ss-breaking {
	display: inline-flex; align-items: center; gap: 7px;
	background: #CE1126; color: #fff !important; border-color: transparent; font-weight: 800;
	animation: ssBreak 2s ease-in-out infinite;
}
.ss-breaking .ss-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes ssBreak {
	0%, 100% { box-shadow: 0 0 10px rgba(206,17,38,.4); }
	50%      { box-shadow: 0 0 22px rgba(206,17,38,.85); }
}
@media (prefers-reduced-motion: reduce) { .ss-breaking, .ss-breaking .ss-dot { animation: none; } }

/* ===== لافتة المواقع الصديقة — ذهبية براقة نابضة ===== */
.friends-band {
  position: relative; margin: 38px 0 28px; padding: 28px 22px 24px;
  border-radius: 22px; text-align: center; overflow: hidden;
  background: linear-gradient(110deg, #7A5A10, #C9971B 22%, #FFE9A8 50%, #C9971B 78%, #7A5A10);
  background-size: 240% 100%;
  border: 1px solid rgba(255,224,138,.9);
  animation: fbShimmer 7s linear infinite, fbPulse 2.4s ease-in-out infinite;
}
@keyframes fbShimmer { to { background-position: -240% 0; } }
@keyframes fbPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(255,199,44,.30), inset 0 0 22px rgba(255,255,255,.12); }
  50%      { box-shadow: 0 0 46px rgba(255,199,44,.75), inset 0 0 34px rgba(255,255,255,.22); }
}
.fb-title {
  font-family: var(--font-head); color: #241A02; font-size: 1.2rem; font-weight: 800;
  margin: 0 0 16px; letter-spacing: .02em;
}
.fb-star { color: #7A1022; animation: fbStar 1.6s ease-in-out infinite alternate; display: inline-block; }
@keyframes fbStar { from { transform: scale(.85); opacity: .7; } to { transform: scale(1.15); opacity: 1; } }
.fb-links { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-bottom: 18px; }
.fb-links a, .fb-links span {
  background: rgba(22,15,2,.85); color: #FFD86B;
  font-family: var(--font-head); font-size: .85rem; font-weight: 700;
  padding: 8px 20px; border-radius: 999px; border: 1px solid rgba(255,216,107,.4);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.fb-links a:hover, .fb-links span:hover { transform: translateY(-3px); box-shadow: 0 10px 22px -8px rgba(20,14,2,.7); }
.fb-contact {
  display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center; align-items: center;
  font-family: var(--font-head); color: #241A02; font-weight: 800; font-size: .95rem;
}
.fb-lbl small { font-weight: 700; opacity: .85; }
.fb-num {
  display: inline-flex; align-items: center; gap: 8px;
  background: #0E3B24; color: #fff !important;
  padding: 9px 18px; border-radius: 999px; font-weight: 800; font-size: .95rem;
  border: 1px solid rgba(37,211,102,.5);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.fb-num svg { width: 17px; height: 17px; fill: #25D366; }
.fb-num:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(14,59,36,.8); color: #fff; }
@media (prefers-reduced-motion: reduce) { .friends-band, .fb-star { animation: none; } }

/* ===== زر واتساب في الشريط العلوي ===== */
.social .wa-top {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #25D366, #128C4A); color: #fff !important;
  padding: 5px 13px; border-radius: 999px;
  font-family: var(--font-head); font-size: .74rem; font-weight: 800;
  box-shadow: 0 4px 14px -4px rgba(18,140,74,.6);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  animation: waPulse 2.6s ease-in-out infinite;
}
.social .wa-top svg { fill: #fff; width: 15px; height: 15px; }
.social .wa-top:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -6px rgba(18,140,74,.8); }
@keyframes waPulse {
  0%, 100% { box-shadow: 0 4px 14px -4px rgba(37,211,102,.5); }
  50%      { box-shadow: 0 4px 22px -2px rgba(37,211,102,.95); }
}
@media (prefers-reduced-motion: reduce) { .social .wa-top { animation: none; } }

/* ===== قسم «خارج النص» ===== */
.kharij-band { position: relative; overflow: hidden; }
.kharij-band::before {
  content: "❝"; position: absolute; top: -30px; inset-inline-start: 4%;
  font-size: 240px; line-height: 1; color: rgba(255,199,44,.07); pointer-events: none;
}
.kharij-sub {
  font-family: var(--font-head); color: var(--gold, #FFC72C);
  font-size: .95rem; margin: -6px 0 26px;
}
.brand-text { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.7rem, 4.4vw, 2.5rem); color: #fff; letter-spacing: .5px; }
.brand-tagline { font-family: var(--font-head); font-weight: 500; font-size: clamp(.72rem, 1.9vw, .92rem); color: var(--gold, #FFC72C); margin-top: 7px; letter-spacing: .3px; }
.header-search { width: min(460px, 92%); }
.header-search input { width: 100%; }
@media (max-width: 640px) {
  .header-inner { align-items: center; }
  .brand svg.brand-emblem { width: 58px; height: 58px; }
}
