:root {
  --navy: #0b1f3a;
  --navy-deep: #071426;
  --navy-card: #122a4a;
  --gold: #d97706;
  --gold-bright: #f59e0b;
  --teal: #0d9488;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-alt: #eef2f7;
  --text: #0f172a;
  --text-soft: #475569;
  --border: #dce3ed;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(11, 31, 58, 0.07);
  --font: "Vazirmatn", "Noto Sans Arabic", Tahoma, sans-serif;
}

[data-theme="dark"] {
  --bg: #08101c;
  --surface: #0f1b2d;
  --surface-alt: #16253c;
  --text: #f1f5f9;
  --text-soft: #cbd5e1;
  --border: #223552;
  --gold: #fbbf24;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font-family: inherit; }
.hidden { display: none !important; }

.container {
  width: min(1280px, 100% - 2rem);
  margin-inline: auto;
}

/* Broadcast Ribbon */
.broadcast-ribbon {
  background: var(--navy-deep);
  color: #e2e8f0;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
}
.ribbon-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 40px;
  flex-wrap: wrap;
  padding-block: 4px;
}
.ribbon-right, .ribbon-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.on-air-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(20, 184, 166, 0.18);
  color: #5eead4;
  border: 1px solid rgba(20, 184, 166, 0.4);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 800;
}
.on-air-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2dd4bf;
  animation: blinkDot 1.5s infinite;
}
@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.ribbon-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.gold-btn {
  background: var(--gold-bright);
  color: #0b1f3a;
  border-color: var(--gold-bright);
  font-weight: 900;
}
.saved-badge {
  background: #0d9488;
  color: #fff;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.72rem;
}

/* Header */
.hemin-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--surface);
  border-bottom: 3px solid var(--gold-bright);
  box-shadow: var(--shadow);
}
.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}
.hemin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-titles { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 1.3rem; font-weight: 900; color: var(--text); }
.brand-sub { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em; color: var(--gold); }

.hemin-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.hemin-nav::-webkit-scrollbar { display: none; }
.h-nav-link {
  padding: 8px 13px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-soft);
  white-space: nowrap;
}
.h-nav-link:hover, .h-nav-link.active {
  background: var(--navy);
  color: #fbbf24;
}

.hemin-search {
  display: flex;
  align-items: center;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px 4px 6px;
  width: 210px;
}
.hemin-search input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  font-size: 0.85rem;
}
.hemin-search button {
  border: none;
  background: var(--navy);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
}

/* Urgent Ticker */
.urgent-strip {
  background: linear-gradient(90deg, #0b1f3a 0%, #13315c 60%, #0d9488 100%);
  color: #ffffff;
}
.urgent-inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 44px;
}
.urgent-tag {
  background: var(--gold-bright);
  color: #0b1f3a;
  font-weight: 900;
  font-size: 0.78rem;
  padding: 3px 12px;
  border-radius: 6px;
  flex-shrink: 0;
}
.urgent-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}
.urgent-btns { display: flex; gap: 4px; }
.urgent-btns button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

/* Spotlight Dark Navy Hero */
.spotlight-hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  padding: 1.8rem 0 2.4rem;
  color: #ffffff;
}
.spotlight-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 1.4rem;
  align-items: stretch;
}
.spotlight-lead {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.3);
  cursor: pointer;
  min-height: 410px;
}
.spotlight-lead img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform 0.5s ease;
}
.spotlight-lead:hover img { transform: scale(1.03); }
.spotlight-caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 20, 38, 0.1) 20%, rgba(7, 20, 38, 0.94) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.8rem;
}
.gold-chip {
  align-self: flex-start;
  background: var(--gold-bright);
  color: #0b1f3a;
  font-weight: 900;
  font-size: 0.76rem;
  padding: 3px 11px;
  border-radius: 6px;
}
.spotlight-caption h1 {
  margin: 0.65rem 0 0.5rem;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  line-height: 1.35;
  font-weight: 900;
}
.spotlight-caption p {
  margin: 0 0 0.8rem;
  color: #cbd5e1;
  font-size: 0.94rem;
}
.meta-line {
  display: flex;
  gap: 1rem;
  font-size: 0.78rem;
  color: #94a3b8;
  flex-wrap: wrap;
}

.spotlight-rail {
  background: var(--navy-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
}
.rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--gold-bright);
  margin-bottom: 0.6rem;
}
.rail-header h2 { margin: 0; font-size: 1.05rem; font-weight: 900; }
.rail-pill {
  font-size: 0.74rem;
  background: rgba(20, 184, 166, 0.22);
  color: #5eead4;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 700;
}
.rail-cards { display: grid; gap: 0.75rem; }
.rail-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.45rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}
.rail-item:hover { background: rgba(245, 158, 11, 0.14); }
.rail-item img {
  width: 88px;
  height: 64px;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 8px;
}
.rail-item span { font-size: 0.72rem; color: #fbbf24; font-weight: 700; display: block; }
.rail-item h3 { margin: 2px 0 0; font-size: 0.86rem; line-height: 1.42; color: #f8fafc; }

/* Band Headings */
.programs-band, .news-wall { margin-top: 2.4rem; }
.band-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.55rem;
  margin-bottom: 1.15rem;
}
.band-heading h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 900;
  border-right: 5px solid var(--teal);
  padding-inline-start: 0.65rem;
}
.band-note { font-size: 0.84rem; color: var(--gold); font-weight: 800; }

/* Programs Strip */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}
.prog-card {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease;
}
.prog-card:hover { transform: translateY(-4px); }
.prog-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.prog-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.prog-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--gold-bright);
  color: #0b1f3a;
  font-weight: 900;
  font-size: 0.74rem;
  padding: 2px 9px;
  border-radius: 6px;
}
.prog-body { padding: 0.9rem; }
.prog-body h3 { margin: 0 0 0.35rem; font-size: 0.95rem; line-height: 1.45; }
.prog-body span { font-size: 0.75rem; color: #94a3b8; }

/* Filterable Magazine Wall */
.wall-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.wall-top h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 900;
  border-right: 5px solid var(--gold-bright);
  padding-inline-start: 0.65rem;
}
.filter-pills { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.f-pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
}
.f-pill.active, .f-pill:hover {
  background: var(--navy);
  color: #fbbf24;
  border-color: var(--navy);
}

.magazine-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.m-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.m-card:hover { transform: translateY(-3px); border-color: var(--teal); }
.m-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.m-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.m-cat {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--navy);
  color: #fbbf24;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}
.m-body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.m-body h3 { margin: 0 0 0.45rem; font-size: 1rem; font-weight: 800; line-height: 1.48; }
.m-body p {
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.m-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-soft);
}

/* Bottom Feature Band */
.bottom-feature-band {
  margin-top: 2.8rem;
  padding: 2.4rem 0;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
}
.bottom-feature-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.5rem;
}
.feature-stack { display: grid; gap: 0.9rem; }
.h-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem;
  cursor: pointer;
}
.h-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 10px;
}
.h-card span.tag { font-size: 0.74rem; font-weight: 800; color: var(--teal); }
.h-card h3 { margin: 0.25rem 0; font-size: 0.95rem; line-height: 1.45; }
.h-card span.dt { font-size: 0.75rem; color: var(--text-soft); }

.rates-card {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  display: grid;
  gap: 0.55rem;
}
.rate-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.14);
  padding-bottom: 0.35rem;
}
.rate-row:last-child { border-bottom: none; padding-bottom: 0; }
.editorials-stack { display: grid; gap: 0.8rem; }
.ed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-right: 4px solid var(--gold-bright);
  border-radius: 10px;
  padding: 0.95rem;
  cursor: pointer;
}
.ed-card h4 { margin: 0 0 0.3rem; font-size: 0.94rem; }
.ed-card span { font-size: 0.78rem; color: var(--text-soft); }

/* List & Detail Stages */
.list-stage, .detail-stage { padding: 2rem 0 3.5rem; }
.list-stage-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.9rem;
  margin-bottom: 1.5rem;
}
.list-kicker { color: var(--teal); font-weight: 800; font-size: 0.84rem; }
.list-stage-head h1 { margin: 0.2rem 0 0; font-size: 1.7rem; }
.return-btn {
  background: var(--navy);
  color: #fbbf24;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.86rem;
}
.empty-box { text-align: center; padding: 3rem; background: var(--surface); border-radius: var(--radius); }

.detail-wrap {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.8rem;
  align-items: start;
}
.detail-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.detail-article h1 { margin: 0.6rem 0; font-size: clamp(1.45rem, 2.6vw, 2.1rem); line-height: 1.38; }
.detail-figure { margin: 1.2rem 0; }
.detail-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 12px;
}
.detail-figure figcaption { font-size: 0.8rem; color: var(--text-soft); margin-top: 0.45rem; }
.detail-body { font-size: 1.05rem; line-height: 1.95; }
.detail-quote {
  margin: 1.3rem 0;
  padding: 1rem 1.25rem;
  background: rgba(13, 148, 136, 0.1);
  border-right: 4px solid var(--teal);
  border-radius: 8px;
  font-weight: 700;
}
.detail-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }
.act-pill {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}
.act-pill.active { background: var(--navy); color: #fbbf24; }
.related-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}
.related-panel h3 { margin: 0 0 0.9rem; border-bottom: 2px solid var(--gold-bright); padding-bottom: 0.45rem; }

/* Footer */
.hemin-footer {
  background: var(--navy-deep);
  color: #cbd5e1;
  padding-top: 2.8rem;
  border-top: 4px solid var(--gold-bright);
}
.hemin-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 2rem;
  padding-bottom: 2.2rem;
}
.footer-about { font-size: 0.88rem; color: #94a3b8; margin-top: 0.8rem; }
.hemin-footer h4 { margin: 0 0 0.8rem; color: #fff; }
.footer-menu { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.footer-menu a { color: #94a3b8; font-size: 0.88rem; }
.footer-menu a:hover { color: #fbbf24; }
.footer-note { font-size: 0.85rem; color: #94a3b8; margin-top: 0; }
.sub-form { display: flex; gap: 0.5rem; }
.sub-form input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  direction: ltr;
}
.sub-form button {
  border: none;
  background: var(--gold-bright);
  color: #0b1f3a;
  font-weight: 900;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: 0.95rem;
  font-size: 0.8rem;
  color: #94a3b8;
}
.legal-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

/* Modal & Toast */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(5, 10, 20, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-window {
  width: min(720px, 100%);
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.modal-top h3 { margin: 0; }
.close-modal-btn {
  border: none;
  background: var(--surface-alt);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}
.modal-content { padding: 1.2rem; }
.live-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; }
.live-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.live-frame-bar {
  position: absolute;
  bottom: 12px;
  right: 12px;
  left: 12px;
  background: rgba(11, 31, 58, 0.9);
  border-right: 4px solid var(--gold-bright);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: #fff;
}
.toast-msg {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 200;
  background: var(--navy);
  color: #fff;
  border-right: 4px solid var(--gold-bright);
  padding: 11px 16px;
  border-radius: 8px;
  font-weight: 700;
}

@media (max-width: 1050px) {
  .hemin-nav { display: none; }
  .spotlight-grid, .bottom-feature-grid, .detail-wrap { grid-template-columns: 1fr; }
  .programs-grid, .magazine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hemin-footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .programs-grid, .magazine-grid { grid-template-columns: 1fr; }
  .hemin-search { width: 155px; }
}
