/* ============================================================
 * Weekly Rewind — magazine-style editorial page.
 * Scoped under .wr-* so no selector leaks into the rest of the
 * site. Uses the site's theme tokens (--bg, --text, --accent)
 * so dark mode works automatically.
 * ========================================================== */

.wr-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0 80px;
  font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  color: var(--text, #1a1a2e);
}

/* ---- HERO COVER ------------------------------------------- */
.wr-hero {
  position: relative;
  min-height: 420px;
  padding: 60px 28px 48px;
  margin: 0 auto 0;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: #0f172a var(--wr-cover) center/cover no-repeat;
  isolation: isolate;
}
.wr-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
              rgba(15, 23, 42, 0.55) 0%,
              rgba(15, 23, 42, 0.85) 70%,
              rgba(15, 23, 42, 0.95) 100%);
  z-index: -1;
}
.wr-hero-content {
  max-width: 780px;
  margin: 0 auto;
  width: 100%;
}
.wr-hero-kicker {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 14px; margin-bottom: 18px;
  font-size: 13px; font-weight: 600;
}
.wr-hero-badge {
  background: rgba(245, 158, 11, 0.95);
  color: #1a1a2e;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 800;
}
.wr-hero-date {
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.3px;
}
.wr-hero-title {
  font-size: 42px;
  line-height: 1.25;
  margin: 0 0 14px;
  font-weight: 900;
  letter-spacing: -0.5px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.wr-hero-subtitle {
  font-size: 19px;
  line-height: 1.65;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.92);
  max-width: 680px;
}
.wr-hero-stats {
  display: flex; flex-wrap: wrap; gap: 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 16px;
}

/* ---- INTRO ------------------------------------------------ */
.wr-intro {
  max-width: 720px;
  margin: 48px auto 0;
  padding: 0 28px;
  position: relative;
}
.wr-intro-mark {
  font-size: 56px;
  color: var(--accent-2, #0d9488);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
}
.wr-intro p {
  font-size: 19px;
  line-height: 1.85;
  color: var(--text-2, #374151);
  margin: 0;
  font-weight: 500;
}

/* ---- SHARED SECTION HEADING ------------------------------- */
.wr-section-h {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 800;
  color: var(--accent-2, #0d9488);
  margin: 0 0 20px;
  display: flex; align-items: center; gap: 12px;
}
.wr-section-h::before,
.wr-section-h::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border, #e3e6ec);
}

/* ---- NUMBERS STRIP ---------------------------------------- */
.wr-numbers {
  max-width: 820px;
  margin: 60px auto 0;
  padding: 0 28px;
}
.wr-numbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.wr-number-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e3e6ec);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.wr-number-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px rgba(13, 148, 136, 0.25);
}
.wr-number-value {
  font-size: 30px;
  font-weight: 900;
  color: var(--accent-2, #0d9488);
  line-height: 1.1;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.wr-number-label {
  font-size: 13px;
  color: var(--muted, #6b7280);
  line-height: 1.5;
}

/* ---- STORIES ---------------------------------------------- */
.wr-stories {
  max-width: 820px;
  margin: 60px auto 0;
  padding: 0 28px;
}
.wr-story {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border, #e3e6ec);
}
.wr-story:last-child { border-bottom: 0; }
.wr-story-num {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.wr-story-ico {
  font-size: 32px;
  line-height: 1;
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(26, 92, 92, 0.08));
  border-radius: 14px;
}
.wr-story-idx {
  font-size: 16px;
  font-weight: 900;
  color: var(--muted-2, #9ca3af);
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  letter-spacing: -0.5px;
}
.wr-story-body { min-width: 0; }
.wr-story-cat {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-2, #0d9488);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}
.wr-story-headline {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.35;
  margin: 0 0 14px;
  color: var(--text, #1a1a2e);
  letter-spacing: -0.3px;
}
.wr-story-summary {
  font-size: 16.5px;
  line-height: 1.9;
  color: var(--text-2, #374151);
  margin: 0 0 18px;
}
.wr-story-why {
  background: rgba(245, 158, 11, 0.08);
  border-right: 3px solid #f59e0b;
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-2, #374151);
  margin-bottom: 18px;
}
.wr-story-why-tag {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.wr-story-sources {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border, #e3e6ec);
}
.wr-story-sources-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #6b7280);
  margin-bottom: 8px;
}
.wr-story-sources ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wr-story-sources a {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 10px;
  padding: 7px 10px;
  text-decoration: none;
  color: var(--text, #1a1a2e);
  border-radius: 6px;
  transition: background .15s;
}
.wr-story-sources a:hover {
  background: var(--bg-2, #fdfaf2);
}
.wr-src-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent, #1a73e8);
  padding: 2px 8px;
  background: rgba(26, 115, 232, 0.1);
  border-radius: 4px;
  white-space: nowrap;
}
.wr-src-title {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2, #374151);
  flex: 1;
  min-width: 0;
}

/* ---- WATCHING NEXT ---------------------------------------- */
.wr-watching {
  max-width: 820px;
  margin: 60px auto 0;
  padding: 0 28px;
}
.wr-watching-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.wr-watching-list li {
  display: flex; gap: 16px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e3e6ec);
  border-right: 4px solid var(--accent-2, #0d9488);
  border-radius: 12px;
  padding: 16px 18px;
}
.wr-watching-list li strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--text, #1a1a2e);
  margin-bottom: 4px;
}
.wr-watching-list li span {
  font-size: 14px;
  color: var(--muted, #6b7280);
  line-height: 1.65;
}
.wr-watching-ico {
  font-size: 26px;
  flex: 0 0 44px;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(13, 148, 136, 0.12);
  border-radius: 10px;
}

/* ---- FOOTER: share + archive ------------------------------ */
.wr-footer {
  max-width: 820px;
  margin: 60px auto 0;
  padding: 32px 28px 0;
  border-top: 1px solid var(--border, #e3e6ec);
  display: flex; flex-direction: column; gap: 24px; align-items: center;
  text-align: center;
}
.wr-share {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center;
}
.wr-share-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted, #6b7280);
  margin-left: 4px;
}
.wr-share-btn {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e3e6ec);
  color: var(--text, #1a1a2e);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
.wr-share-wa { background: #25D366; color: #fff; border-color: #25D366; }
.wr-share-tw { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
.wr-share-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(0,0,0,0.25); }
.wr-archive-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-2, #0d9488);
  text-decoration: none;
}
.wr-archive-link:hover { text-decoration: underline; }

/* ---- ARCHIVE PAGE ----------------------------------------- */
.wr-archive-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.wr-archive-head { text-align: center; margin-bottom: 32px; }
.wr-archive-head h1 {
  font-size: 32px; font-weight: 900; margin: 12px 0 8px;
}
.wr-archive-head p {
  font-size: 15px; color: var(--muted, #6b7280); margin: 0;
}
.wr-back {
  display: inline-block; font-size: 13px; color: var(--accent-2, #0d9488);
  text-decoration: none; font-weight: 700;
}
.wr-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.wr-archive-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e3e6ec);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.wr-archive-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -14px rgba(13, 148, 136, 0.25);
}
.wr-archive-img {
  aspect-ratio: 16/9;
  background: var(--bg-3, #f1ede2);
  overflow: hidden;
}
.wr-archive-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.wr-archive-img-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  background: linear-gradient(135deg, var(--accent-2, #0d9488), var(--accent, #1a73e8));
  color: rgba(255, 255, 255, 0.7);
}
.wr-archive-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.wr-archive-meta {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--accent-2, #0d9488); font-weight: 800; margin-bottom: 8px;
}
.wr-archive-body h3 {
  font-size: 18px; font-weight: 800; line-height: 1.45; margin: 0 0 8px;
  color: var(--text, #1a1a2e);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wr-archive-body p {
  font-size: 13.5px; color: var(--muted, #6b7280); line-height: 1.65;
  margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wr-archive-stats {
  margin-top: auto;
  display: flex; gap: 14px;
  font-size: 12px; color: var(--muted, #6b7280); font-weight: 600;
  padding-top: 10px;
  border-top: 1px dashed var(--border, #e3e6ec);
}

/* ---- EMPTY STATE ------------------------------------------ */
.wr-empty-state { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.wr-empty-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e3e6ec);
  border-radius: 18px;
  padding: 48px 32px;
  text-align: center;
  max-width: 480px;
}
.wr-empty-ico { font-size: 64px; margin-bottom: 16px; }
.wr-empty-card h1 { font-size: 22px; font-weight: 900; margin: 0 0 10px; }
.wr-empty-card p { font-size: 15px; color: var(--muted, #6b7280); margin: 0 0 24px; line-height: 1.75; }
.wr-btn-primary {
  display: inline-block; padding: 12px 24px;
  background: var(--accent-2, #0d9488); color: #fff;
  border-radius: 10px; font-weight: 800; text-decoration: none;
  margin: 0 6px 8px;
}
.wr-btn-ghost {
  display: inline-block; padding: 12px 24px;
  background: transparent; color: var(--text, #1a1a2e);
  border: 1px solid var(--border, #e3e6ec);
  border-radius: 10px; font-weight: 800; text-decoration: none;
  margin: 0 6px 8px;
}

/* ---- RESPONSIVE ------------------------------------------- */
@media (max-width: 720px) {
  .wr-hero { min-height: 340px; padding: 44px 20px 36px; }
  .wr-hero-title { font-size: 30px; }
  .wr-hero-subtitle { font-size: 16px; }
  .wr-intro, .wr-numbers, .wr-stories, .wr-watching, .wr-footer { padding-left: 20px; padding-right: 20px; }
  .wr-intro p { font-size: 17px; }
  .wr-story { grid-template-columns: 60px 1fr; gap: 14px; padding: 24px 0; }
  .wr-story-ico { width: 44px; height: 44px; font-size: 24px; }
  .wr-story-idx { font-size: 13px; }
  .wr-story-headline { font-size: 21px; }
  .wr-story-summary { font-size: 15px; line-height: 1.8; }
  .wr-number-value { font-size: 24px; }
}
@media (max-width: 480px) {
  .wr-hero-title { font-size: 24px; }
  .wr-hero-kicker { gap: 8px; }
  .wr-hero-badge { padding: 4px 10px; font-size: 11px; }
  .wr-hero-date { font-size: 12px; }
  .wr-story-why { padding: 12px 14px; font-size: 14px; }
  .wr-archive-head h1 { font-size: 24px; }
}

/* ---- DARK THEME ADJUSTMENTS ------------------------------- */
[data-theme="dark"] .wr-number-card,
[data-theme="dark"] .wr-watching-list li,
[data-theme="dark"] .wr-archive-card,
[data-theme="dark"] .wr-empty-card {
  background: var(--surface, #1a1e33);
  border-color: var(--border, #2a2f48);
}
[data-theme="dark"] .wr-story-why {
  background: rgba(245, 158, 11, 0.14);
}
[data-theme="dark"] .wr-src-name {
  background: rgba(96, 165, 250, 0.15);
  color: var(--accent, #60a5fa);
}
