/* ============================================================
   إذاعة تفاصيل FM — التنسيقات الرئيسية
   ملف واحد فقط، بدون أي مكتبات خارجية.
   ============================================================ */

/* ---------- 1. المتغيرات والهوية ---------- */
/* الوضع الفاتح هو الأساسي: خلفية بيضاء ولمسات بنفسجية */
:root {
  --bg:            #ffffff;
  --bg-2:          #faf8fe;
  --surface:       #ffffff;
  --surface-2:     #f5f2fc;
  --border:        rgba(76,29,149,.11);
  --border-strong: rgba(76,29,149,.20);

  --text:          #17102b;
  --text-2:        #4b4066;
  --text-3:        #736a8c;

  --purple:        #6d28d9;
  --purple-2:      #7c3aed;
  --purple-deep:   #4c1d95;
  --orange:        #ea580c;
  --orange-2:      #f97316;
  --green:         #16a34a;
  --red:           #dc2626;

  --grad: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 55%, #4c1d95 100%);
  --grad-live: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);

  --radius:    18px;
  --radius-sm: 12px;
  --radius-lg: 26px;

  --shadow:    0 16px 40px -20px rgba(76,29,149,.30);
  --shadow-sm: 0 6px 18px -12px rgba(76,29,149,.28);
  --glow:      0 0 0 1px rgba(109,40,217,.14), 0 12px 30px -14px rgba(109,40,217,.45);

  --header-h: 68px;
  --player-h: 80px;
  --nav-h:    64px;

  --font: "Segoe UI", "Noto Kufi Arabic", "Tahoma", "Geeza Pro", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(.22,.68,.35,1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* الوضع الداكن (اختياري — يختاره الزائر) */
html[data-theme="dark"] {
  --bg:            #0b0614;
  --bg-2:          #120a20;
  --surface:       rgba(255,255,255,.045);
  --surface-2:     rgba(255,255,255,.07);
  --border:        rgba(255,255,255,.10);
  --border-strong: rgba(255,255,255,.18);

  --text:          #f2edff;
  --text-2:        #c3b8d9;
  --text-3:        #8f83a8;

  --purple:        #8b5cf6;
  --purple-2:      #a78bfa;
  --purple-deep:   #5b21b6;
  --orange:        #f97316;
  --orange-2:      #fb923c;
  --green:         #22c55e;
  --red:           #ef4444;

  --grad-live: linear-gradient(135deg, #fb923c 0%, #f97316 100%);

  --shadow:    0 18px 40px -18px rgba(0,0,0,.75);
  --shadow-sm: 0 8px 20px -12px rgba(0,0,0,.7);
  --glow:      0 0 0 1px rgba(139,92,246,.25), 0 14px 40px -14px rgba(139,92,246,.55);
}

/* ---------- 2. إعادة الضبط ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  font-size: 16px;
  overflow-x: hidden;
  padding-bottom: calc(var(--player-h) + var(--nav-h) + var(--safe-b));
  -webkit-font-smoothing: antialiased;
}

/* خلفية ثابتة خفيفة جدًا — بيضاء بلمسة بنفسجية باهتة */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 88% -10%, rgba(124,58,237,.07), transparent 62%),
    radial-gradient(700px 440px at 6% 2%, rgba(249,115,22,.045), transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
html[data-theme="dark"] body::before {
  background:
    radial-gradient(900px 520px at 85% -8%, rgba(139,92,246,.20), transparent 60%),
    radial-gradient(700px 460px at 8% 4%, rgba(249,115,22,.10), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.4; font-weight: 800; letter-spacing: -.2px; }
h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.95rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.3rem); }
p  { margin: 0 0 1em; }

::selection { background: var(--purple); color: #fff; }

/* التركيز بلوحة المفاتيح */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}

/* شريط التمرير */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }

/* تخطي إلى المحتوى */
.skip-link {
  position: absolute;
  top: -60px; right: 12px;
  z-index: 200;
  background: var(--purple);
  color: #fff;
  padding: .7rem 1.2rem;
  border-radius: 0 0 12px 12px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3. تخطيط عام ---------- */
.container {
  width: min(100% - 2rem, 1200px);
  margin-inline: auto;
}

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; display: flex; align-items: center; gap: .6rem; }
.section-head h2::before {
  content: "";
  width: 6px; height: 26px;
  border-radius: 6px;
  background: var(--grad);
  flex: none;
}
.section-head p { margin: .35rem 0 0; color: var(--text-3); font-size: .93rem; }

.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* تخطيط عمودين: محتوى + عمود جانبي (ينهار لعمود واحد على الشاشات الصغيرة) */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 1.6rem;
  align-items: start;
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
}

/* ---------- 4. البطاقات ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);           /* الظل هو ما يفصل البطاقة عن الخلفية البيضاء */
  overflow: hidden;
  position: relative;
  transition: transform .28s var(--ease), border-color .28s var(--ease), box-shadow .28s var(--ease);
}
/* في الوضع الداكن نعتمد على الشفافية الزجاجية بدل الظل */
html[data-theme="dark"] .card {
  box-shadow: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.card-body { padding: 1.1rem 1.2rem 1.3rem; }
.card-title { font-size: 1.06rem; margin: 0 0 .5rem; line-height: 1.6; }
.card-title a:hover { color: var(--purple-2); }
.card-text { color: var(--text-2); font-size: .92rem; margin: 0 0 .9rem; line-height: 1.8; }
.card-meta {
  display: flex; align-items: center; gap: .7rem;
  flex-wrap: wrap;
  color: var(--text-3); font-size: .82rem;
}
.card-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-2);
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.card:hover .card-media img { transform: scale(1.05); }
.card-media::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 55%;
  background: linear-gradient(to top, rgba(28,18,48,.50), transparent);
  pointer-events: none;
}
html[data-theme="dark"] .card-media::after {
  background: linear-gradient(to top, rgba(11,6,20,.85), transparent);
}

/* ---------- 5. الشارات ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .38rem;
  padding: .28rem .7rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  white-space: nowrap;
}
.badge-cat {
  background: rgba(124,58,237,.10);
  border-color: rgba(124,58,237,.26);
  color: var(--purple-deep);
}
html[data-theme="dark"] .badge-cat {
  background: rgba(139,92,246,.16);
  border-color: rgba(139,92,246,.35);
  color: var(--purple-2);
}

.badge-live {
  background: var(--grad-live);
  border: none;
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(249,115,22,.9);
}
.badge-live .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff;
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.7); }
}

.badge-soon { background: rgba(22,163,74,.10); border-color: rgba(22,163,74,.28); color: #15803d; }
html[data-theme="dark"] .badge-soon { background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.3); color: #4ade80; }

.card-badge {
  position: absolute;
  top: .7rem; inset-inline-start: .7rem;
  z-index: 2;
}

/* ---------- 6. الأزرار ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .78rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-size: .93rem;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--glow);
}
.btn-live {
  background: var(--grad-live);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(249,115,22,.8);
}
.btn-ghost { background: transparent; }
.btn-sm { padding: .5rem 1rem; font-size: .84rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-icon {
  width: 42px; height: 42px;
  padding: 0;
  border-radius: 50%;
  flex: none;
}

.link-more {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--purple-2);
  font-weight: 700;
  font-size: .9rem;
}
.link-more:hover { gap: .65rem; }
.link-more svg { transition: transform .2s var(--ease); }

/* ---------- 7. الهيدر ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(100% - 2rem, 1200px);
  margin-inline: auto;
}

.logo { display: flex; align-items: center; gap: .6rem; flex: none; }
.logo img { width: auto; height: 34px; max-width: 110px; object-fit: contain; }
.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-name { font-weight: 800; font-size: 1.02rem; }
.logo-tag  { font-size: .68rem; color: var(--text-3); }

.main-nav { display: flex; gap: .3rem; margin-inline-start: auto; }
.main-nav a {
  padding: .5rem .85rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-2);
  transition: color .2s, background .2s;
}
.main-nav a:hover { color: var(--text); background: var(--surface); }
.main-nav a.active { color: var(--text); background: var(--surface-2); }

.header-actions { display: flex; align-items: center; gap: .5rem; flex: none; }

.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }

.theme-toggle .sun  { display: none; }
.theme-toggle .moon { display: block; }
html[data-theme="dark"] .theme-toggle .sun  { display: block; }
html[data-theme="dark"] .theme-toggle .moon { display: none; }

.menu-btn { display: none; }

/* ---------- 8. القائمة الجانبية ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden; /* يمنع اللوح المخفي من توسيع عرض الصفحة */
}
.drawer[aria-hidden="false"] { visibility: visible; pointer-events: auto; }

.drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(5,2,12,.72);
  opacity: 0;
  transition: opacity .3s var(--ease);
  backdrop-filter: blur(3px);
}
.drawer[aria-hidden="false"] .drawer-backdrop { opacity: 1; }

/* الموقع عربي RTL: الدرج يفتح من جهة اليمين حيث يوجد زر القائمة */
.drawer-panel {
  position: absolute;
  inset-block: 0;
  right: 0;
  width: min(84vw, 330px);
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  padding: 1.2rem 1.1rem calc(1.5rem + var(--safe-b));
  transform: translateX(100%);
  transition: transform .32s var(--ease);
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.drawer[aria-hidden="false"] .drawer-panel { transform: translateX(0); }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.2rem;
}
.drawer-links { display: flex; flex-direction: column; gap: .2rem; }
.drawer-links a {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem .9rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-2);
  transition: background .2s, color .2s;
}
.drawer-links a:hover, .drawer-links a.active {
  background: var(--surface);
  color: var(--text);
}
.drawer-links svg { width: 19px; height: 19px; opacity: .75; flex: none; }
.drawer-divider { height: 1px; background: var(--border); margin: .9rem 0; }
.drawer-social { display: flex; gap: .5rem; margin-top: 1rem; }

/* ---------- 9. الهيرو ---------- */
.hero {
  position: relative;
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: rgba(249,115,22,.13);
  border: 1px solid rgba(249,115,22,.3);
  color: var(--orange-2);
  font-size: .8rem; font-weight: 700;
  margin-bottom: 1.1rem;
}
.hero h1 {
  margin: 0 0 .8rem;
  background: linear-gradient(120deg, var(--text) 15%, var(--purple-2) 55%, var(--orange-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.3;
}
.hero-desc {
  color: var(--text-2);
  font-size: clamp(.98rem, 2vw, 1.1rem);
  max-width: 56ch;
  margin-bottom: 1.6rem;
}
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* موجات صوتية متحركة */
.wave-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
}
.wave-rings {
  position: absolute;
  width: 260px; height: 260px;
  display: grid; place-items: center;
}
.wave-rings span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(139,92,246,.35);
  border-radius: 50%;
  animation: ripple 3.6s var(--ease) infinite;
}
.wave-rings span:nth-child(2) { animation-delay: 1.2s; }
.wave-rings span:nth-child(3) { animation-delay: 2.4s; }
@keyframes ripple {
  0%   { transform: scale(.45); opacity: .9; }
  100% { transform: scale(1.25); opacity: 0; }
}

.wave-disc {
  position: relative;
  width: 165px; height: 165px;
  border-radius: 50%;
  background: var(--grad);
  display: grid; place-items: center;
  box-shadow: 0 25px 60px -22px rgba(139,92,246,.95);
  z-index: 1;
}
.wave-disc img { width: 96px; height: auto; object-fit: contain; }

.equalizer {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 42px;
  margin-top: 1.4rem;
}
.equalizer span {
  width: 5px;
  border-radius: 4px;
  background: linear-gradient(to top, var(--purple), var(--orange));
  animation: eq 1.1s ease-in-out infinite;
}
.equalizer span:nth-child(1) { height: 40%; animation-delay: 0s; }
.equalizer span:nth-child(2) { height: 75%; animation-delay: .12s; }
.equalizer span:nth-child(3) { height: 55%; animation-delay: .24s; }
.equalizer span:nth-child(4) { height: 95%; animation-delay: .36s; }
.equalizer span:nth-child(5) { height: 45%; animation-delay: .48s; }
.equalizer span:nth-child(6) { height: 80%; animation-delay: .6s; }
.equalizer span:nth-child(7) { height: 35%; animation-delay: .72s; }
@keyframes eq {
  0%, 100% { transform: scaleY(.4); }
  50%      { transform: scaleY(1); }
}

/* ---------- 10. بطاقة "يُبث الآن" ---------- */
.onair {
  position: relative;
  padding: 1.3rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .onair {
  border-color: var(--border-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.onair-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; margin-bottom: 1rem;
}
.onair-main { display: flex; gap: 1rem; align-items: center; }
.onair-cover {
  width: 82px; height: 82px;
  border-radius: 16px;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--border);
}
/* غلاف كبير في صفحات التفاصيل (حلقة / تسجيل / برنامج) */
.onair-cover.lg {
  width: 165px; height: 165px;
  border-radius: 20px;
}
.onair-info { min-width: 0; flex: 1 1 260px; }
.onair-info h3 { margin: 0 0 .25rem; font-size: 1.15rem; }
.onair-host { color: var(--text-2); font-size: .88rem; margin: 0 0 .3rem; }
.onair-time { color: var(--text-3); font-size: .8rem; margin: 0; }

.onair-progress {
  height: 5px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0 .6rem;
}
.onair-progress i {
  display: block; height: 100%;
  background: var(--grad-live);
  border-radius: 4px;
}
.onair-next {
  display: flex; align-items: center; gap: .5rem;
  color: var(--text-3); font-size: .83rem;
  padding-top: .8rem;
  border-top: 1px solid var(--border);
  margin-top: .8rem;
}
.onair-next b { color: var(--text-2); font-weight: 700; }

/* ---------- 11. الخبر المميز ---------- */
.featured {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.2rem;
}
.featured-main .card-media { aspect-ratio: 16 / 9; }
.featured-main .card-title { font-size: clamp(1.2rem, 2.4vw, 1.6rem); }
.featured-side { display: grid; gap: 1rem; align-content: start; }

.mini-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: .9rem;
  align-items: center;
  padding: .6rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background .2s, transform .2s var(--ease);
}
.mini-card:hover { background: var(--surface-2); transform: translateX(-4px); }
.mini-card img {
  width: 92px; height: 70px;
  border-radius: 10px;
  object-fit: cover;
}
.mini-card h4 { margin: 0 0 .3rem; font-size: .93rem; line-height: 1.6; font-weight: 700; }
.mini-card span { font-size: .76rem; color: var(--text-3); }

/* ---------- 12. بطاقات البودكاست والمكتبة ---------- */
.ep-card { display: flex; flex-direction: column; }
.ep-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-2);
}
.ep-cover img { width: 100%; height: 100%; object-fit: cover; }
.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(11,6,20,.35);
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.card:hover .play-overlay,
.card:focus-within .play-overlay { opacity: 1; }
.play-btn-lg {
  width: 58px; height: 58px;
  border-radius: 50%;
  border: none;
  background: var(--grad);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 30px -10px rgba(139,92,246,.9);
  transition: transform .2s var(--ease);
}
.play-btn-lg:hover { transform: scale(1.1); }
.play-btn-lg svg { width: 22px; height: 22px; margin-inline-start: 2px; }

.ep-num {
  font-size: .74rem;
  color: var(--purple-2);
  font-weight: 700;
  letter-spacing: .3px;
}
.ep-actions {
  display: flex; align-items: center; gap: .5rem;
  margin-top: auto;
  padding-top: .9rem;
}

/* عنصر قائمة صوتي (المكتبة) */
.audio-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background .2s, border-color .2s;
}
.audio-row:hover { background: var(--surface-2); border-color: var(--border-strong); }
.audio-row .play-btn-sm {
  width: 44px; height: 44px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--purple-2);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.audio-row .play-btn-sm:hover { background: var(--grad); color: #fff; transform: scale(1.06); }
.audio-row .play-btn-sm svg { width: 16px; height: 16px; margin-inline-start: 2px; }
.audio-row-info { min-width: 0; flex: 1; }
.audio-row-info h4 { margin: 0 0 .25rem; font-size: .95rem; font-weight: 700; }
.audio-row-info p { margin: 0; font-size: .8rem; color: var(--text-3); }
.audio-row-meta { display: flex; gap: .8rem; font-size: .78rem; color: var(--text-3); flex: none; }

/* ---------- 13. بطاقات البرامج ---------- */
.program-card { display: flex; flex-direction: column; }
.program-card .card-media { aspect-ratio: 3 / 2; }
.program-time {
  display: flex; align-items: center; gap: .45rem;
  font-size: .82rem; color: var(--text-2);
  margin-top: .6rem;
}
.program-time svg { width: 15px; height: 15px; opacity: .7; flex: none; }

/* ---------- 14. جدول البث ---------- */
.day-tabs {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .6rem;
  margin-bottom: 1.5rem;
  scrollbar-width: none;
}
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab {
  flex: none;
  padding: .6rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  transition: all .2s var(--ease);
  white-space: nowrap;
}
.day-tab:hover { border-color: var(--border-strong); color: var(--text); }
.day-tab.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--glow);
}
.day-tab .today-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--orange);
  margin-inline-start: .35rem;
  vertical-align: middle;
}

.slot {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 1.1rem;
  align-items: center;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: .7rem;
  transition: border-color .2s, background .2s;
}
.slot:hover { border-color: var(--border-strong); }
.slot.is-live {
  border-color: rgba(249,115,22,.5);
  background: linear-gradient(90deg, rgba(249,115,22,.10), var(--surface) 60%);
}
.slot.is-past { opacity: .55; }
.slot-time {
  font-weight: 800;
  font-size: .95rem;
  color: var(--purple-2);
  display: flex; flex-direction: column; gap: .1rem;
}
.slot-time small { color: var(--text-3); font-weight: 500; font-size: .75rem; }
.slot-title { margin: 0 0 .2rem; font-size: 1rem; font-weight: 700; }
.slot-host { margin: 0; font-size: .83rem; color: var(--text-3); }

/* ---------- 15. النماذج ---------- */
.form-grid { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.field { display: flex; flex-direction: column; gap: .45rem; }
.field label { font-size: .88rem; font-weight: 700; color: var(--text-2); }
.field label .req { color: var(--orange); }
.field .hint { font-size: .78rem; color: var(--text-3); }

.input, .textarea, .select {
  width: 100%;
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s;
  font-size: .95rem;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(139,92,246,.18);
  background: var(--surface-2);
}
.textarea { resize: vertical; min-height: 130px; line-height: 1.8; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f83a8' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 1rem center;
  background-size: 16px;
  padding-inline-start: 2.6rem;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); opacity: .8; }

.check {
  display: flex; align-items: flex-start; gap: .65rem;
  font-size: .89rem; color: var(--text-2);
  cursor: pointer;
  line-height: 1.7;
}
.check input {
  width: 20px; height: 20px;
  margin: .2rem 0 0;
  accent-color: var(--purple);
  flex: none;
  cursor: pointer;
}

.alert {
  padding: .95rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: 1.1rem;
  border: 1px solid;
}
.alert svg { width: 20px; height: 20px; flex: none; }
.alert-success { background: rgba(22,163,74,.09);  border-color: rgba(22,163,74,.30);  color: #15803d; }
.alert-error   { background: rgba(220,38,38,.08);  border-color: rgba(220,38,38,.30);  color: #b91c1c; }
.alert-info    { background: rgba(124,58,237,.08); border-color: rgba(124,58,237,.28); color: var(--purple-deep); }
html[data-theme="dark"] .alert-success { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.35); color: #4ade80; }
html[data-theme="dark"] .alert-error   { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.35); color: #f87171; }
html[data-theme="dark"] .alert-info    { background: rgba(139,92,246,.12); border-color: rgba(139,92,246,.35); color: var(--purple-2); }

/* ---------- 16. قسم "صوتك جزء من التفاصيل" ---------- */
.voice-section {
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.8rem);
  background:
    radial-gradient(700px 320px at 85% 0%, rgba(249,115,22,.14), transparent 65%),
    var(--surface);
  border: 1px solid var(--border-strong);
  position: relative;
  overflow: hidden;
}
.voice-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.voice-intro h2 { margin-bottom: .7rem; }
.voice-intro p { color: var(--text-2); }
.voice-points { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .7rem; }
.voice-points li { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--text-2); }
.voice-points svg { width: 18px; height: 18px; color: var(--orange); flex: none; }

/* النشرة البريدية */
.newsletter {
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--grad);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter::before {
  content: "";
  position: absolute;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: rgba(255,255,255,.09);
  top: -160px; inset-inline-start: -90px;
}
.newsletter h2, .newsletter p { color: #fff; position: relative; }
.newsletter p { opacity: .9; max-width: 55ch; margin-inline: auto; }
.newsletter-form {
  display: flex; gap: .6rem;
  max-width: 480px;
  margin: 1.4rem auto 0;
  position: relative;
}
.newsletter-form .input {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.3);
  color: #fff;
}
.newsletter-form .input::placeholder { color: rgba(255,255,255,.75); }
.newsletter-form .input:focus { box-shadow: 0 0 0 4px rgba(255,255,255,.2); border-color: #fff; }
.newsletter-form .btn { background: #fff; color: var(--purple-deep); border-color: #fff; flex: none; }

/* ---------- 17. المشغل الثابت ---------- */
.player {
  position: fixed;
  inset-inline: 0;
  bottom: calc(var(--nav-h) + var(--safe-b));
  z-index: 100;
  height: var(--player-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 clamp(.7rem, 2vw, 1.4rem);
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-strong);
  transform: translateY(120%);
  transition: transform .35s var(--ease);
}
.player.is-open { transform: translateY(0); }
.player.is-min { height: 56px; }
.player.is-min .player-extra { display: none; }

.player-cover {
  width: 52px; height: 52px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--border);
}
.player.is-min .player-cover { width: 38px; height: 38px; }

.player-info { min-width: 0; flex: 1; }
.player-title {
  font-weight: 700; font-size: .93rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0;
  display: flex; align-items: center; gap: .5rem;
}
.player-sub {
  font-size: .78rem; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0;
}

.live-tag {
  display: none;
  align-items: center; gap: .3rem;
  padding: .12rem .5rem;
  border-radius: 5px;
  background: var(--grad-live);
  color: #fff;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .5px;
  flex: none;
}
.player.is-live .live-tag { display: inline-flex; }

.player-controls { display: flex; align-items: center; gap: .4rem; flex: none; }
.player-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-2);
  display: grid; place-items: center;
  cursor: pointer;
  transition: color .2s, background .2s, transform .2s;
}
.player-btn:hover { color: var(--text); background: var(--surface); }
.player-btn svg { width: 19px; height: 19px; }
.player-btn.hidden { display: none; }

.player-play {
  width: 50px; height: 50px;
  background: var(--grad);
  color: #fff;
  box-shadow: var(--glow);
}
.player-play:hover { background: var(--grad); color: #fff; transform: scale(1.06); }
.player-play svg { width: 22px; height: 22px; }
.player.is-live .player-play { background: var(--grad-live); box-shadow: 0 10px 26px -10px rgba(249,115,22,.9); }

/* شريط التقدم */
.player-progress {
  display: flex; align-items: center; gap: .6rem;
  flex: 1.4;
  min-width: 0;
}
.player.is-live .player-progress { visibility: hidden; }
.player-time { font-size: .72rem; color: var(--text-3); font-variant-numeric: tabular-nums; flex: none; }

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: var(--surface-2);
  cursor: pointer;
  outline-offset: 6px;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--purple-2);
  border: 2px solid var(--bg-2);
  box-shadow: 0 0 0 1px var(--purple);
}
.range::-moz-range-thumb {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--purple-2);
  border: 2px solid var(--bg-2);
}

.player-volume { display: flex; align-items: center; gap: .4rem; flex: none; width: 130px; }
.player-volume .range { height: 4px; }

/* موجات المشغل */
.player-wave {
  display: flex; align-items: flex-end; gap: 2.5px;
  height: 20px; flex: none;
}
.player-wave span {
  width: 3px; height: 30%;
  background: var(--purple-2);
  border-radius: 3px;
}
.player.is-playing .player-wave span { animation: eq .9s ease-in-out infinite; }
.player.is-playing.is-live .player-wave span { background: var(--orange-2); }
.player-wave span:nth-child(1) { animation-delay: 0s; height: 45%; }
.player-wave span:nth-child(2) { animation-delay: .15s; height: 85%; }
.player-wave span:nth-child(3) { animation-delay: .3s; height: 60%; }
.player-wave span:nth-child(4) { animation-delay: .45s; height: 100%; }

/* ---------- 18. شريط التنقل السفلي (الجوال) ---------- */
.bottom-nav {
  display: none;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 110;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--bg-2) 94%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}
.bottom-nav ul {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  height: var(--nav-h);
  margin: 0; padding: 0;
  list-style: none;
}
.bottom-nav a {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .18rem;
  height: 100%;
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-3);
  transition: color .2s;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav a svg { width: 21px; height: 21px; }
.bottom-nav a.active { color: var(--purple-2); }

.nav-live {
  position: relative;
  align-self: stretch;   /* حتى يأخذ العنصر ارتفاع الشريط كاملًا */
  height: 100%;
}
.nav-live button {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 58px; height: 58px;
  border-radius: 50%;
  border: 4px solid var(--bg-2);
  background: var(--grad-live);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 26px -8px rgba(249,115,22,.85);
  transition: transform .2s var(--ease);
}
.nav-live button:hover { transform: translateX(-50%) scale(1.06); }
.nav-live button svg { width: 24px; height: 24px; }
.nav-live span {
  position: absolute;
  bottom: 7px;
  left: 0; width: 100%;
  text-align: center;
  font-size: .64rem;
  font-weight: 600;
  color: var(--text-3);
}

/* ---------- 19. الفوتر ---------- */
.footer {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: clamp(2rem, 5vw, 3.2rem) 0 2rem;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer h4 { font-size: .95rem; margin-bottom: .9rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer a { color: var(--text-3); font-size: .88rem; transition: color .2s; }
.footer a:hover { color: var(--purple-2); }
.footer p { color: var(--text-3); font-size: .88rem; }
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  color: var(--text-3); font-size: .83rem;
}
.social-links { display: flex; gap: .6rem; }
.social-links a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all .2s var(--ease);
}
.social-links a:hover { background: var(--grad); border-color: transparent; color: #fff; transform: translateY(-3px); }
.social-links svg { width: 17px; height: 17px; }

/* ---------- 20. صفحات داخلية ---------- */
.page-head {
  padding: clamp(1.8rem, 4vw, 3rem) 0 clamp(1.2rem, 3vw, 2rem);
  border-bottom: 1px solid var(--border);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.page-head h1 { margin-bottom: .5rem; }
.page-head p { color: var(--text-2); max-width: 65ch; margin: 0; }

.breadcrumbs {
  display: flex; align-items: center; gap: .5rem;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--text-3);
  margin-bottom: 1rem;
  list-style: none; padding: 0;
}
.breadcrumbs li { display: flex; align-items: center; gap: .5rem; }
.breadcrumbs li:not(:last-child)::after { content: "‹"; opacity: .5; }
.breadcrumbs a:hover { color: var(--purple-2); }

.filters {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.8rem;
}
.filters form { display: flex; gap: .7rem; flex-wrap: wrap; flex: 1; min-width: 0; }
.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box .input { padding-inline-start: 2.8rem; }
.search-box svg {
  position: absolute;
  inset-inline-start: 1rem; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-3);
  pointer-events: none;
}
.chips { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: .45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: .84rem;
  font-weight: 600;
  transition: all .2s;
  white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { background: var(--grad); border-color: transparent; color: #fff; }

/* المقال */
.article { max-width: 780px; margin-inline: auto; }
.article-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.8rem;
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
}
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-meta {
  display: flex; align-items: center; gap: .8rem;
  flex-wrap: wrap;
  color: var(--text-3); font-size: .85rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}
.article-content { font-size: 1.04rem; line-height: 2.1; color: var(--text-2); }
.article-content p { margin-bottom: 1.3em; }
.article-content h2, .article-content h3 { color: var(--text); margin-top: 1.8em; }

.share-bar {
  display: flex; align-items: center; gap: .6rem;
  flex-wrap: wrap;
  padding: 1.2rem 0;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.share-bar span { font-size: .88rem; color: var(--text-3); font-weight: 700; }
.share-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.share-btn:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.share-btn svg { width: 16px; height: 16px; }
.share-wa:hover  { background: rgba(37,211,102,.15); color: #25d366; }
.share-x:hover   { background: var(--surface-2); }
.share-cp:hover  { background: rgba(139,92,246,.15); color: var(--purple-2); }

/* حالة فارغة */
.empty {
  text-align: center;
  padding: clamp(2.5rem, 8vw, 5rem) 1.5rem;
  color: var(--text-3);
}
.empty-icon {
  width: 82px; height: 82px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--purple-2);
}
.empty-icon svg { width: 34px; height: 34px; }
.empty h3 { color: var(--text-2); margin-bottom: .4rem; }
.empty p { margin: 0 0 1.3rem; font-size: .92rem; }

/* ترقيم الصفحات */
.pagination { margin-top: 2.2rem; }
.pagination ul {
  display: flex; justify-content: center;
  gap: .4rem; flex-wrap: wrap;
  list-style: none; padding: 0; margin: 0;
}
.pagination a, .pagination .current, .pagination .dots {
  display: grid; place-items: center;
  min-width: 42px; height: 42px;
  padding: 0 .8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-2);
  transition: all .2s;
}
.pagination a:hover { border-color: var(--purple); color: var(--text); }
.pagination .current { background: var(--grad); border-color: transparent; color: #fff; }
.pagination .dots { border: none; background: none; }

/* صفحة 404 */
.err-page {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}
.err-code {
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 900;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: .5rem;
}
.err-page p { color: var(--text-2); max-width: 45ch; margin-inline: auto; }

/* بطاقات إحصائية */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}
.stat {
  padding: 1.2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}
.stat b { display: block; font-size: 1.7rem; color: var(--purple-2); line-height: 1.2; }
.stat span { font-size: .84rem; color: var(--text-3); }

/* تنبيه تثبيت التطبيق */
.pwa-toast {
  position: fixed;
  bottom: calc(var(--player-h) + var(--nav-h) + var(--safe-b) + 12px);
  inset-inline: 1rem;
  z-index: 105;
  max-width: 420px;
  margin-inline: auto;
  display: none;
  align-items: center;
  gap: .9rem;
  padding: .9rem 1rem;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  animation: slideUp .4s var(--ease);
}
.pwa-toast.show { display: flex; }
.pwa-toast img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.pwa-toast p { margin: 0; font-size: .85rem; line-height: 1.6; flex: 1; }
@keyframes slideUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* نسخ الرابط - تنبيه عائم */
.toast {
  position: fixed;
  bottom: calc(var(--player-h) + var(--nav-h) + var(--safe-b) + 16px);
  inset-inline-start: 50%;
  transform: translateX(50%) translateY(20px);
  z-index: 130;
  background: var(--purple);
  color: #fff;
  padding: .7rem 1.3rem;
  border-radius: 999px;
  font-size: .87rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(50%) translateY(0); }

/* ---------- 21. الاستجابة ---------- */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
  .voice-grid { grid-template-columns: 1fr; }
  .featured { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .wave-visual { min-height: 210px; order: -1; }
  .wave-disc { width: 132px; height: 132px; }
  .wave-disc img { width: 76px; }
  .wave-rings { width: 210px; height: 210px; }
  .main-nav { display: none; }
  .menu-btn { display: grid; }
  .bottom-nav { display: block; }
  .header-actions .btn-listen { display: none; }
  /* صفحات التفاصيل: الغلاف فوق والنص تحته على الشاشات الصغيرة */
  .onair-main { flex-direction: column; align-items: stretch; }
  .onair-cover.lg { width: 100%; height: auto; aspect-ratio: 1 / 1; max-width: 260px; }
  .onair-main .btn { margin-inline-start: 0 !important; }
  .slot { grid-template-columns: 1fr; gap: .5rem; padding: 1rem; }
  .slot-time { flex-direction: row; align-items: baseline; gap: .5rem; }
  .form-row { grid-template-columns: 1fr; }
  .player-volume { display: none; }
  .player-extra { display: none; }
  .player { gap: .7rem; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form .btn { width: 100%; }
}

@media (min-width: 861px) {
  .bottom-nav { display: none; }
  .player { bottom: 0; }
  body { padding-bottom: calc(var(--player-h) + 10px); }
  .pwa-toast, .toast { bottom: calc(var(--player-h) + 16px); }
}

@media (max-width: 560px) {
  body { font-size: 15.5px; }
  /* تصغير الشعار في الهيدر حتى لا يزاحم أزرار التحكم */
  .header-inner { gap: .5rem; }
  .logo img { height: 28px; max-width: 76px; }
  .logo-tag { display: none; }
  .logo-name { font-size: .9rem; }
  .header-actions { gap: .35rem; }
  .icon-btn { width: 38px; height: 38px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .mini-card { grid-template-columns: 76px 1fr; }
  .mini-card img { width: 76px; height: 62px; }
  .audio-row { flex-wrap: wrap; gap: .7rem; }
  .audio-row-meta { width: 100%; justify-content: flex-start; }
  .hero-actions .btn { flex: 1; min-width: 140px; }
  .section-head { align-items: flex-start; }
  .player-progress { display: none; }
  .player { gap: .55rem; padding-inline: .7rem; }
  .player-cover { width: 44px; height: 44px; }
  .player-wave { display: none; }
}

@media (max-width: 400px) {
  .logo-name { display: none; }
}

/* ---------- 22. تقليل الحركة ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover { transform: none; }
}

/* ---------- 23. الطباعة ---------- */
@media print {
  .header, .player, .bottom-nav, .footer, .share-bar, .pwa-toast { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
}

/* ---------- زر «أسمعه لاحقًا» ---------- */
.save-btn.is-saved {
  background: rgba(249,115,22,.12);
  border-color: rgba(249,115,22,.42);
  color: var(--orange);
}
.save-btn.is-saved svg { filter: drop-shadow(0 0 6px rgba(249,115,22,.45)); }

/* ---------- النص المكتوب للحلقة ---------- */
.transcript {
  margin-top: 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.transcript-toggle {
  display: flex;
  align-items: center;
  gap: .8rem;
  width: 100%;
  padding: 1rem 1.2rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: start;
  transition: background .2s;
}
.transcript-toggle:hover { background: var(--surface-2); }
.transcript-toggle > span { flex: 1; min-width: 0; }
.transcript-toggle b { display: block; font-size: 1rem; }
.transcript-toggle small { color: var(--text-3); font-size: .8rem; }
.transcript-toggle > svg:last-child {
  flex: none;
  transition: transform .25s var(--ease);
  color: var(--text-3);
}
.transcript-toggle[aria-expanded="true"] > svg:last-child { transform: rotate(-90deg); }

.transcript-body {
  padding: 0 1.4rem 1.4rem;
  border-top: 1px solid var(--border);
  max-height: 460px;
  overflow-y: auto;
  color: var(--text-2);
  line-height: 2.1;
  font-size: .97rem;
}
.transcript-body p { margin: 1em 0 0; }
.transcript-body mark { background: rgba(249,115,22,.28); color: inherit; border-radius: 3px; }

/* ============================================================
   24. إيقاع بصري متنوّع للصفحة الرئيسية
   ============================================================ */

/* ---------- شريط أفقي قابل للسحب ---------- */
.rail-wrap { position: relative; }

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 1.1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1rem;
  padding: .4rem .2rem 1.2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  overscroll-behavior-x: contain;
}
.rail > * { scroll-snap-align: start; }
.rail::-webkit-scrollbar { height: 7px; }
.rail::-webkit-scrollbar-track { background: transparent; }
.rail::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }

/* البطاقة داخل الشريط لا ترتفع عند المرور حتى لا تُقص */
.rail .card:hover { transform: none; }

/* أزرار التمرير (تظهر على الشاشات الكبيرة فقط) */
.rail-btn {
  position: absolute;
  top: 40%;
  z-index: 3;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow);
  display: none;
  place-items: center;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s;
}
.rail-btn:hover { transform: scale(1.08); background: var(--surface-2); }
.rail-btn[hidden] { display: none !important; }
.rail-prev { inset-inline-end: -14px; }
.rail-next { inset-inline-start: -14px; }

@media (min-width: 900px) {
  .rail-btn { display: grid; }
}

/* ---------- شريط ممتد بعرض الشاشة ---------- */
.band {
  position: relative;
  margin-block: clamp(2rem, 5vw, 3.4rem);
  padding: clamp(1.8rem, 4vw, 3rem) 0;
  background:
    radial-gradient(760px 320px at 78% 0%, rgba(234,88,12,.10), transparent 65%),
    linear-gradient(180deg, var(--surface-2), transparent);
  border-block: 1px solid var(--border);
}
html[data-theme="dark"] .band {
  background:
    radial-gradient(760px 320px at 78% 0%, rgba(249,115,22,.14), transparent 65%),
    linear-gradient(180deg, rgba(255,255,255,.04), transparent);
}

/* ---------- بند تعريفي عريض (يكسر تكرار الشبكات) ---------- */
.pitch {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
}
.pitch h2 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); line-height: 1.45; margin-bottom: .7rem; }
.pitch p  { color: var(--text-2); font-size: 1.02rem; max-width: 52ch; }

.pitch-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .9rem;
}
.pitch-stat {
  padding: 1.2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.pitch-stat b {
  display: block;
  font-size: 1.9rem;
  line-height: 1.15;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pitch-stat span { font-size: .84rem; color: var(--text-3); }

@media (max-width: 860px) {
  .pitch { grid-template-columns: 1fr; }
}

/* ============================================================
   25. جدول البث كخط زمني
   ============================================================ */
.timeline {
  position: relative;
  margin: 1.4rem 0 2rem;
  padding: 2.2rem 1.2rem 1.6rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.tl-inner { position: relative; }

/* مسطرة الساعات */
.tl-hours {
  position: relative;
  height: 20px;
  margin-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.tl-hour {
  position: absolute;
  top: 0;
  transform: translateX(50%);
  font-size: .68rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.tl-hour::after {
  content: "";
  position: absolute;
  inset-inline-start: 50%;
  bottom: -6px;
  width: 1px; height: 5px;
  background: var(--border-strong);
}

/* مسار البرامج */
.tl-track {
  position: relative;
  height: 62px;
  border-radius: 10px;
  background: var(--surface-2);
  overflow: hidden;
}

.tl-slot {
  position: absolute;
  top: 5px;
  bottom: 5px;
  border-radius: 8px;
  padding: .35rem .55rem;
  overflow: hidden;
  color: #fff;
  font-size: .76rem;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: filter .2s, transform .2s var(--ease);
  min-width: 3px;
}
.tl-slot:hover { filter: brightness(1.12); transform: translateY(-1px); z-index: 2; }
.tl-slot b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-slot small { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-slot.is-past { opacity: .45; }
.tl-slot.is-live { box-shadow: 0 0 0 2px var(--orange), 0 8px 22px -8px rgba(234,88,12,.7); z-index: 3; }

/* علامة اللحظة الحالية — خارج المسار حتى لا يقصّها */
.tl-now {
  position: absolute;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: var(--orange);
  z-index: 4;
  pointer-events: none;
}
.tl-now::before {
  content: "";
  position: absolute;
  top: -4px;
  inset-inline-start: -4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(234,88,12,.25);
}
.tl-now-label {
  position: absolute;
  top: -26px;
  transform: translateX(50%);
  background: var(--orange);
  color: #fff;
  font-size: .64rem;
  font-weight: 800;
  padding: .1rem .45rem;
  border-radius: 5px;
  white-space: nowrap;
  z-index: 5;
}

/* على الجوال: نمرّر الخط الزمني أفقيًا بدل ضغطه */
@media (max-width: 760px) {
  .timeline { overflow-x: auto; padding-inline: 1rem; }
  .tl-inner { min-width: 900px; }
}

/* ============================================================
   أزرار الاشتراك في البودكاست
   ============================================================ */
.subrow {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}
.subrow-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-2);
  margin-inline-end: .2rem;
}
.sub-btn {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .48rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.sub-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.09);
}
.sub-apple:hover   { border-color: rgba(147,51,234,.55); color: #7e22ce; }
.sub-spotify:hover { border-color: rgba(29,185,84,.6);   color: #16a34a; }
.sub-youtube:hover { border-color: rgba(220,38,38,.55);  color: #dc2626; }
.sub-rss:hover     { border-color: rgba(234,88,12,.55);  color: #ea580c; }

html[data-theme="dark"] .sub-btn:hover { box-shadow: 0 6px 16px rgba(0,0,0,.4); }
html[data-theme="dark"] .sub-apple:hover   { color: #c084fc; }
html[data-theme="dark"] .sub-spotify:hover { color: #4ade80; }
html[data-theme="dark"] .sub-youtube:hover { color: #f87171; }
html[data-theme="dark"] .sub-rss:hover     { color: #fb923c; }

@media (max-width: 480px) {
  .subrow-label { width: 100%; margin-bottom: -.15rem; }
}

/* ============================================================
   تسجيل الرسائل الصوتية
   ============================================================ */
.recorder {
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: var(--surface-2);
  display: grid;
  gap: .8rem;
}
.recorder.is-recording {
  border-style: solid;
  border-color: rgba(224, 22, 79, .55);
  background: rgba(224, 22, 79, .05);
}
.rec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}
.rec-title {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .88rem;
  font-weight: 700;
}
.rec-time {
  font-variant-numeric: tabular-nums;
  font-size: .95rem;
  font-weight: 800;
  color: var(--text-3);
}
.recorder.is-recording .rec-time { color: #e0164f; }
.recorder.is-recording .rec-title svg { animation: pulse 1.1s infinite; }

.rec-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.rec-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.rec-btn:hover { transform: translateY(-1px); }
.rec-start { border-color: rgba(224, 22, 79, .45); color: #c1123f; }
.rec-stop  { border-color: rgba(224, 22, 79, .6); background: #e0164f; color: #fff; }
.rec-drop  { color: var(--text-3); }

.rec-play { width: 100%; height: 40px; }
.rec-note { margin: 0; font-size: .8rem; color: var(--text-3); line-height: 1.7; }

html[data-theme="dark"] .rec-start { color: #fb7185; }
html[data-theme="dark"] .recorder.is-recording .rec-time { color: #fb7185; }

/* ============================================================
   كود التضمين ورابط اللحظة
   ============================================================ */
.share-at { border-color: rgba(234, 88, 12, .4); }
.share-at:hover { border-color: rgba(234, 88, 12, .7); color: #c2410c; }
.share-em:hover { border-color: rgba(124, 58, 237, .6); color: var(--purple-deep); }

.embed-box {
  margin-top: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  padding: .85rem 1rem;
}
.embed-box summary {
  cursor: pointer;
  font-size: .88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .45rem;
  list-style: none;
}
.embed-box summary::-webkit-details-marker { display: none; }
.embed-box summary::after {
  content: "+";
  margin-inline-start: auto;
  color: var(--text-3);
  font-weight: 800;
}
.embed-box[open] summary::after { content: "−"; }
.embed-box p {
  margin: .7rem 0 .5rem;
  font-size: .83rem;
  color: var(--text-2);
  line-height: 1.7;
}
.embed-code {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: .6rem .7rem;
  background: var(--surface);
  color: var(--text-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .74rem;
  line-height: 1.6;
  resize: vertical;
}
