/* ============================================================
   دقيقة ونص! (90 Seconds!) — Apple-Inspired Design + Tajawal Font
   Light: #ffffff / #f5f5f7 / #1d1d1f / #0071e3
   Dark:  #000000 / #161617 / #f5f5f7 / #2997ff
   ============================================================ */
:root {
  --bg: #ffffff;
  --band-light: #f5f5f7;
  --band-dark: #000000;
  --text: #1d1d1f;
  --text-light: #f5f5f7;
  --muted: #6e6e73;
  --nav-bg: rgba(251, 251, 253, 0.86);
  --nav-border: rgba(0, 0, 0, 0.08);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --border: #d2d2d7;
  --gutter: 12px;
}

[data-theme="dark"] {
  --bg: #000000;
  --band-light: #161617;
  --band-dark: #000000;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --nav-bg: rgba(22, 22, 23, 0.86);
  --nav-border: rgba(255, 255, 255, 0.12);
  --blue: #2997ff;
  --blue-hover: #40a4ff;
  --border: #424245;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
}
a { color: var(--blue); text-decoration: none; }

/* 48px Apple Global Nav with Bigger Icons */
.apple-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 50px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.apple-nav-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 7px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.apple-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--text);
  white-space: nowrap;
}
.apple-logo i {
  font-size: 1.25rem;
  color: var(--blue);
}
.apple-links {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.apple-links::-webkit-scrollbar { display: none; }
.apple-links a, .apple-links button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 5px 8px;
  border-radius: 980px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
  opacity: 0.82;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, background 0.15s;
}
.apple-links button i, .apple-links a i { font-size: 1.04rem; color: var(--blue); }
.apple-links a:hover, .apple-links button:hover, .apple-links .active {
  opacity: 1;
  font-weight: 700;
  background: var(--band-light);
}
.adapt-topics {
  border-top: 1px solid var(--nav-border);
  padding: 6px 14px;
}
.adapt-links {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.adapt-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 980px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.adapt-pill i { color: var(--blue); font-size: 0.96rem; }
.adapt-pill:hover, .adapt-pill.active {
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}
.active-sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 980px;
  border: 1px solid rgba(0, 113, 227, 0.28);
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.active-sec-badge i { font-size: 0.85rem; }
.active-sec-badge .badge-caret { display: none; font-size: 0.68rem; opacity: 0.8; }
@media (max-width: 1120px) {
  .adapt-pill {
    flex-direction: column;
    gap: 2px;
    padding: 5px 10px;
    border-radius: 12px;
    line-height: 1.15;
  }
  .adapt-pill i { font-size: 0.98rem; }
  .adapt-pill span { font-size: 0.72rem; }
}
@media (max-width: 640px) {
  .active-sec-badge .badge-caret { display: inline-block; }
  .adapt-topics { display: none; }
  .adapt-topics.open { display: block; }
}
.apple-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 980px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.nav-mini-btn i { font-size: 0.92rem; }
.nav-mini-btn:hover { background: var(--band-light); }

/* Search Ribbon */
.apple-search-ribbon {
  background: var(--band-light);
  border-bottom: 1px solid var(--nav-border);
  padding: 9px 18px;
  display: flex;
  justify-content: center;
}
.apple-search-ribbon input {
  width: 100%;
  max-width: 480px;
  padding: 7px 16px;
  border-radius: 980px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
  text-align: center;
  outline: none;
}
.apple-search-ribbon input:focus { border-color: var(--blue); }

/* Apple Pill CTAs */
.cta-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.btn-apple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 22px;
  border-radius: 980px;
  font-size: 0.92rem;
  font-weight: 700;
  background: var(--blue);
  color: #ffffff;
  border: 1px solid var(--blue);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  text-decoration: none;
}
.btn-apple:hover { background: var(--blue-hover); text-decoration: none; }
.btn-apple-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 22px;
  border-radius: 980px;
  font-size: 0.92rem;
  font-weight: 700;
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--blue);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.btn-apple-outline:hover { background: var(--blue); color: #ffffff; text-decoration: none; }

/* Full-Bleed Apple Hero Stack */
.apple-hero-stack {
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
}
.apple-hero {
  position: relative;
  width: 100%;
  min-height: 520px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 46px 20px 0;
}
.apple-hero.dark { background: #000000; color: #f5f5f7; }
.apple-hero.light { background: var(--band-light); color: var(--text); }

.apple-hero-copy { position: relative; z-index: 3; max-width: 760px; }
.apple-hero h1, .apple-hero h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  font-weight: 800;
  line-height: 1.18;
}
.apple-hero .sub {
  margin: 10px auto 0;
  font-size: clamp(1rem, 1.9vw, 1.35rem);
  line-height: 1.45;
  max-width: 650px;
}
.apple-hero.dark .sub { color: #d2d2d7; }
.apple-hero.light .sub { color: var(--muted); }
.apple-hero .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #f59e0b;
  margin-bottom: 8px;
}
.apple-hero .kicker i { font-size: 1.25rem; }

.apple-hero-img-wrap {
  margin-top: 24px;
  width: 100%;
  max-width: 980px;
  height: 290px;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
}
.apple-hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Main Content + Sidebar Shell */
.hub-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1020px) {
  .hub-shell { grid-template-columns: 1fr; }
}

/* Apple 2-Column Promo Grid */
.apple-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gutter);
}
@media (max-width: 720px) {
  .apple-grid { grid-template-columns: 1fr; }
  .apple-hero { min-height: 430px; padding-top: 34px; }
  .apple-hero-img-wrap { height: 200px; }
}

.apple-tile {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 20px 0;
  border-radius: 18px;
}
.apple-tile.dark { background: #000000; color: #f5f5f7; }
.apple-tile.light { background: var(--band-light); color: var(--text); }

.apple-tile-copy { position: relative; z-index: 3; max-width: 440px; }
.apple-tile h3 {
  margin: 0;
  font-size: clamp(1.32rem, 2.1vw, 1.75rem);
  font-weight: 800;
  line-height: 1.28;
}
.apple-tile .sub { margin: 8px auto 0; font-size: 0.95rem; line-height: 1.45; }
.apple-tile.dark .sub { color: #a1a1a6; }
.apple-tile.light .sub { color: var(--muted); }
.apple-tile .kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 6px;
}
.apple-tile .kicker i { font-size: 1.25rem; }

.apple-tile-img {
  margin-top: auto;
  width: 100%;
  height: 225px;
  padding-top: 18px;
}
.apple-tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
  display: block;
}

/* Sidebar Widgets (YouTube + Black Friday Deals + Markets) */
.hub-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 62px;
}
.side-box {
  background: var(--band-light);
  border: 1px solid var(--nav-border);
  border-radius: 18px;
  padding: 18px;
}
.side-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 9px;
}
.side-title i { font-size: 1.3rem; color: var(--blue); }
.side-list { display: flex; flex-direction: column; gap: 10px; }
.side-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--nav-border);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.side-item:hover { border-color: var(--blue); transform: translateY(-1px); text-decoration: none; }
.side-item i { font-size: 1.35rem; margin-top: 2px; flex-shrink: 0; }
.side-item strong { display: block; font-size: 0.88rem; line-height: 1.3; }
.side-item small { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* Topic Explorer Bottom Section */
.topic-explorer {
  background: var(--bg);
  border-top: 1px solid var(--nav-border);
  padding: 28px 20px;
}
.topic-explorer-inner {
  max-width: 1220px;
  margin: 0 auto;
  text-align: center;
}
.topic-explorer-inner h3 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.topic-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 980px;
  background: var(--band-light);
  border: 1px solid var(--nav-border);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.topic-chip i { color: var(--blue); font-size: 1rem; }
.topic-chip:hover, .topic-chip.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
  transform: translateY(-1px);
  text-decoration: none;
}
.topic-chip:hover i, .topic-chip.active i { color: #ffffff; }

/* Related Topics in Post View */
.related-section {
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--nav-border);
}
.related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.related-head h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: var(--band-light);
  border: 1px solid var(--nav-border);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.related-card:hover { border-color: var(--blue); transform: translateY(-1px); text-decoration: none; }
.related-card img {
  width: 74px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.related-card-body { min-width: 0; }
.related-card-body strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.35;
  margin-bottom: 3px;
}
.related-card-body small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.comments-box {
  margin-top: 36px;
  padding: 24px;
  border-radius: 18px;
  background: var(--band-light);
  border: 1px solid var(--nav-border);
}

/* Apple Minimal Footer */
.apple-footer {
  background: var(--band-light);
  color: var(--muted);
  border-top: 1px solid var(--nav-border);
  padding: 28px 20px;
  font-size: 0.82rem;
  text-align: center;
}

/* Article & Comparison Newsroom View */
.newsroom-wrap {
  max-width: 840px;
  margin: 0 auto;
  padding: 42px 20px 80px;
}
.newsroom-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 10px;
}
.newsroom-meta i { font-size: 1.25rem; }
.newsroom-title {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.22;
}
.newsroom-lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.55;
}
.newsroom-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 28px;
  display: block;
}
.newsroom-body { font-size: 1.06rem; line-height: 1.85; }
.comp-table-wrap { overflow-x: auto; margin: 26px 0; }
.comp-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--band-light);
  border-radius: 16px;
  overflow: hidden;
}
.comp-table th, .comp-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--nav-border);
  text-align: start;
  font-size: 0.94rem;
}
.comp-table th { font-weight: 700; color: var(--muted); font-size: 0.84rem; }
.verdict-box {
  background: var(--band-light);
  border-radius: 18px;
  padding: 20px 22px;
  margin-top: 20px;
  border-inline-start: 4px solid var(--blue);
}

/* Admin Studio Helpers */
.wrap { max-width: 1240px; margin: 0 auto; padding: 28px 20px 64px; }
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 180px;
  max-width: 230px;
}
.admin-actions .btn { padding: 5px 10px; font-size: 0.76rem; }
.role-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 980px;
  overflow: hidden;
  background: var(--bg);
}
.role-toggle button {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 5px 11px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.role-toggle button.active {
  background: var(--blue);
  color: #ffffff;
}
.admin-card {
  background: var(--band-light);
  border: 1px solid var(--nav-border);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 18px;
}
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 0.82rem; font-weight: 700; margin-bottom: 5px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 13px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.92rem;
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .row2 { grid-template-columns: 1fr; } }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 980px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 0.82rem;
  font-weight: 700; cursor: pointer; font-family: inherit; text-decoration: none;
}
.btn-primary { background: var(--blue); color: #fff; border-color: transparent; }
.btn-success { background: #008037; color: #fff; border-color: transparent; }
.btn-danger { background: #d93025; color: #fff; border-color: transparent; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 980px; font-size: 0.72rem; font-weight: 700; background: rgba(128,128,128,.16); }
.tag-pin { background: rgba(245,158,11,.18); color: #d97706; }
.tag-comp { background: rgba(0,128,55,.16); color: #059669; }

/* Share Bar, Modal & Admin Stats */
.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.hub-modal[hidden] { display: none; }
.hub-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.hub-modal-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--nav-border);
  border-radius: 20px;
  padding: 26px 22px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stat-box {
  background: var(--bg);
  border: 1px solid var(--nav-border);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
}
.stat-box strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1.2;
}
.stat-box small {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Mobile & Tablet Responsive Refinements */
@media (max-width: 1020px) {
  .hub-sidebar { position: static; }
}
@media (max-width: 720px) {
  .apple-nav-inner { padding: 8px 12px; gap: 8px; }
  .apple-logo { font-size: 1rem; }
  .apple-links {
    order: 3;
    width: 100%;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid var(--nav-border);
    -webkit-overflow-scrolling: touch;
  }
  .apple-links a, .apple-links button { padding: 5px 10px; font-size: 0.82rem; }
  .nav-mini-btn { padding: 5px 10px; font-size: 0.75rem; }
  .apple-search-ribbon { padding: 8px 12px; }
  .apple-search-ribbon input { font-size: 0.84rem; padding: 8px 14px; }
  .apple-hero { min-height: auto; padding: 28px 16px 0; }
  .apple-hero h1, .apple-hero h2 { font-size: 1.55rem; }
  .apple-hero .sub { font-size: 0.95rem; }
  .apple-hero-img-wrap { height: 190px; margin-top: 18px; }
  .apple-tile { min-height: auto; padding: 26px 16px 0; }
  .apple-tile-img { height: 190px; }
  .newsroom-wrap { padding: 24px 14px 56px; }
  .newsroom-title { font-size: 1.5rem; }
  .newsroom-hero-img { max-height: 240px; border-radius: 14px; margin-bottom: 20px; }
  .newsroom-body { font-size: 1rem; line-height: 1.75; }
  .related-grid { grid-template-columns: 1fr; }
  .comments-box { padding: 16px; border-radius: 14px; margin-top: 28px; }
  .topic-explorer { padding: 22px 14px; }
  .topic-chip { padding: 7px 12px; font-size: 0.82rem; }
  .wrap { padding: 16px 12px 48px; }
  .admin-card { padding: 16px 14px; border-radius: 14px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comp-table th, .comp-table td { padding: 10px; font-size: 0.85rem; }
}
