/* ═══════════════════════════════════════════════
   בינה — AI Blog | Global Stylesheet
   Dark + Light Theme | RTL Hebrew | AdSense Ready
   ═══════════════════════════════════════════════ */

/* ── Dark mode (default) ── */
:root {
  --bg:         #0a0a12;
  --bg-card:    #12121f;
  --bg-code:    #0d1117;
  --border:     #1e1e32;
  --primary:    #7c3aed;
  --primary-h:  #9333ea;
  --accent:     #06b6d4;
  --accent-h:   #0891b2;
  --text:       #e2e8f0;
  --text-muted: #64748b;
  --heading:    #f8fafc;
  --tag-bg:     #1e1e3a;
  --radius:     12px;
  --font:       'Segoe UI', 'Arial', sans-serif;
  --max-w:      1200px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
}

/* ── Light mode ── */
[data-theme="light"] {
  --bg:         #f8fafc;
  --bg-card:    #ffffff;
  --bg-code:    #f1f5f9;
  --border:     #e2e8f0;
  --primary:    #6d28d9;
  --primary-h:  #7c3aed;
  --accent:     #0891b2;
  --accent-h:   #0e7490;
  --text:       #1e293b;
  --text-muted: #64748b;
  --heading:    #0f172a;
  --tag-bg:     #e8eaf6;
  --shadow:     0 4px 24px rgba(0,0,0,0.08);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }

img { max-width: 100%; height: auto; display: block; }

/* ── Container ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ══════════════════════════════
   HEADER / NAV
══════════════════════════════ */
header {
  background: #08080f;
  border-bottom: 1px solid rgba(124,58,237,0.35);
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: hidden;
}

/* Canvas fills the entire header behind the nav */
#header-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] header {
  background: #08080f; /* keep dark in light mode — it's a design element */
  border-bottom-color: rgba(124,58,237,0.4);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 20px;
  position: relative;
  z-index: 1; /* above the canvas */
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

nav { display: flex; gap: 8px; }
nav a {
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.2s;
}
nav a:hover, nav a.active {
  color: var(--text);
  background: var(--bg-card);
}

/* ══════════════════════════════
   HERO
══════════════════════════════ */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,58,237,0.15) 0%, transparent 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--tag-bg);
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--heading);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

/* ══════════════════════════════
   AD ZONES
══════════════════════════════ */
.ad-zone {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  overflow: hidden;
}

.ad-banner { width: 100%; min-height: 90px; margin: 24px 0; }
.ad-rectangle { width: 100%; min-height: 250px; margin: 20px 0; }

/* ══════════════════════════════
   MAIN LAYOUT (index)
══════════════════════════════ */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  padding: 40px 0 80px;
}

@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
}

/* ── Article Grid ── */
.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

/* Canvas background injected by card-bg.js */
.article-card .card-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  border-radius: var(--radius);
}

/* All direct children above canvas */
.article-card > *:not(.card-canvas) {
  position: relative;
  z-index: 1;
}

.article-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(124,58,237,0.25);
}

/* Card body text — on solid background */
.article-card .card-body .card-title {
  background: linear-gradient(135deg, var(--heading) 60%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}
.article-card .card-body .card-excerpt { color: var(--text); }
.article-card .card-body .card-meta    { border-top-color: var(--border); }
.article-card .card-body .card-meta span,
.article-card .card-body .card-meta a  { color: var(--text-muted); }
.article-card .card-body .card-meta a:hover { color: var(--accent); }

.card-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.4;
}

.card-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  background: var(--tag-bg);
  color: var(--text-muted);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 4px;
}

/* ── Sidebar ── */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.widget-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.widget-list { display: flex; flex-direction: column; gap: 10px; }
.widget-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.widget-item:last-child { border-bottom: none; padding-bottom: 0; }
.widget-item a { color: var(--text); font-size: 0.875rem; font-weight: 600; }
.widget-item a:hover { color: var(--accent); }
.widget-item span { font-size: 0.75rem; color: var(--text-muted); }

/* ══════════════════════════════
   ARTICLE PAGE LAYOUT
══════════════════════════════ */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 40px 0 80px;
  align-items: start;
}

@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
}

/* ── Article Header ── */
.article-header {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.article-header .category {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--heading);
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.article-header .meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-header .meta span { display: flex; align-items: center; gap: 4px; }

/* ── Article Body ── */
.article-body {
  padding-top: 32px;
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--heading);
  margin: 40px 0 16px;
  padding-right: 16px;
  border-right: 4px solid var(--primary);
}

.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading);
  margin: 28px 0 12px;
}

.article-body p { margin-bottom: 18px; }

.article-body ul, .article-body ol {
  padding-right: 24px;
  margin-bottom: 18px;
}

.article-body li { margin-bottom: 8px; }

.article-body strong { color: var(--heading); font-weight: 700; }

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
  background: var(--bg-code);
  border-radius: 8px;
  overflow: hidden;
}

.article-body table th {
  background: var(--primary);
  color: white;
  padding: 12px 16px;
  text-align: right;
  font-weight: 700;
}

.article-body table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.article-body table tr:last-child td { border-bottom: none; }
.article-body table tr:hover td { background: var(--tag-bg); }

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
}

/* CTA Box */
.cta-box {
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(6,182,212,0.1));
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
  text-align: center;
}

.cta-box a {
  display: inline-block;
  background: var(--primary);
  color: white !important;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.2s;
}

.cta-box a:hover { background: var(--primary-h); }

/* In-article ad */
.ad-in-article {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 8px;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 32px 0;
}

/* ── Sticky sidebar ── */
.sticky-sidebar { position: sticky; top: 80px; }

/* ══════════════════════════════
   CATEGORY TAGS
══════════════════════════════ */
.categories-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.cat-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.cat-btn:hover, .cat-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

.footer-brand .logo { font-size: 1.3rem; margin-bottom: 12px; }
.footer-brand p { font-size: 0.875rem; color: var(--text-muted); }

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { color: var(--text-muted); font-size: 0.875rem; }
.footer-col ul a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

/* ══════════════════════════════
   NEWSLETTER
══════════════════════════════ */
.newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.newsletter-form input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--text);
  font-size: 0.875rem;
  direction: rtl;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.newsletter-form button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.newsletter-form button:hover { background: var(--primary-h); }

/* ══════════════════════════════
   UTILS
══════════════════════════════ */
.featured-badge {
  background: var(--accent);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

@media (max-width: 600px) {
  .nav-inner nav { display: none; }
  .hero { padding: 50px 0 40px; }
  .articles-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════
   THEME TOGGLE BUTTON
══════════════════════════════ */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--text);
}

.theme-toggle .icon-dark  { display: inline; }
.theme-toggle .icon-light { display: none;   }

[data-theme="light"] .theme-toggle .icon-dark  { display: none;   }
[data-theme="light"] .theme-toggle .icon-light { display: inline; }

/* ══════════════════════════════
   LIGHT MODE SPECIFIC OVERRIDES
══════════════════════════════ */

/* Hero gradient softer in light */
[data-theme="light"] .hero {
  background: radial-gradient(ellipse at 50% 0%, rgba(109,40,217,0.08) 0%, transparent 70%);
}

/* Article card shadow in light */
[data-theme="light"] .article-card {
  box-shadow: var(--shadow);
}

[data-theme="light"] .article-card:hover {
  box-shadow: 0 12px 40px rgba(109,40,217,0.15);
}

/* Table header */
[data-theme="light"] .article-body table th {
  background: var(--primary);
}

[data-theme="light"] .article-body table td {
  color: var(--text);
}

[data-theme="light"] .article-body table tr:hover td {
  background: var(--tag-bg);
}

/* Ad zones */
[data-theme="light"] .ad-zone,
[data-theme="light"] .ad-in-article {
  background: var(--bg-code);
  border-color: var(--border);
  color: var(--text-muted);
}

/* Widgets */
[data-theme="light"] .widget {
  box-shadow: var(--shadow);
}

/* Footer */
[data-theme="light"] footer {
  background: var(--bg-code);
}

/* CTA box */
[data-theme="light"] .cta-box {
  background: linear-gradient(135deg, rgba(109,40,217,0.08), rgba(8,145,178,0.06));
}

/* Cat buttons */
[data-theme="light"] .cat-btn {
  background: var(--bg-card);
  color: var(--text-muted);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Blockquote */
[data-theme="light"] blockquote {
  background: var(--bg-code);
  border-radius: 8px;
  padding: 16px 20px !important;
}

/* Transition for smooth theme switch */
body, header, .article-card, .widget, .ad-zone, .ad-in-article,
footer, .cat-btn, .theme-toggle, .cta-box, blockquote {
  transition: background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s;
}

/* ══════════════════════════════
   GUIDE CARDS (redesigned)
══════════════════════════════ */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 32px 0 48px;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  box-shadow: var(--shadow);
}

.guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(124,58,237,0.22);
  border-color: var(--primary);
}

/* Image / illustration area */
.guide-thumb {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.guide-thumb svg {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3));
}

.guide-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(6,2,15,0.45);
  z-index: 1;
  pointer-events: none;
}

/* Body */
.guide-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.guide-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.guide-level {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.guide-level.beginner {
  background: rgba(16,185,129,0.15);
  color: #10b981;
  border: 1px solid rgba(16,185,129,0.3);
}

.guide-level.advanced {
  background: rgba(124,58,237,0.15);
  color: var(--primary);
  border: 1px solid rgba(124,58,237,0.3);
}

.guide-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.guide-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.4;
}

.guide-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.btn-guide {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff !important;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.2s;
  align-self: flex-start;
  text-decoration: none;
}

.btn-guide:hover {
  opacity: 0.88;
  transform: translateX(-3px);
}

.btn-guide.soon {
  background: var(--bg-code);
  color: var(--text-muted) !important;
  border: 1px solid var(--border);
}

.btn-guide.soon:hover {
  opacity: 1;
  transform: none;
  cursor: default;
}

/* Section header */
.section-header {
  text-align: center;
  padding: 48px 0 8px;
}

.section-num {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--heading);
}

.section-sub {
  color: var(--text-muted);
  margin-top: 8px;
  font-size: 1rem;
}

/* Light mode adjustments */
[data-theme="light"] .guide-card {
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

[data-theme="light"] .guide-card:hover {
  box-shadow: 0 16px 48px rgba(109,40,217,0.14);
}

/* ══════════════════════════════
   WEEKLY NEWS PAGE
══════════════════════════════ */
:root { --bg2: #0e0e1a; }
[data-theme="light"] { --bg2: #f1f5f9; }

.news-story {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.news-story:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 24px rgba(124,58,237,0.15);
}
.news-story h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 12px;
  line-height: 1.4;
}
.news-story p { color: var(--text); line-height: 1.75; margin-bottom: 10px; }
.news-story ul { padding-right: 20px; line-height: 2; color: var(--text); }

.weekly-date {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.weekly-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
}
.weekly-preview h3 { font-size: 1.3rem; font-weight: 800; color: var(--heading); margin-bottom: 12px; }

/* Archive */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 24px 0 48px;
}
.archive-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.archive-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}
.archive-card h4 { font-size: 0.95rem; font-weight: 700; color: var(--heading); margin: 10px 0 6px; line-height: 1.4; }

/* ══════════════════════════════
   AI CRAZY PAGE
══════════════════════════════ */
.crazy-hero {
  padding: 60px 0 40px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(239,68,68,0.12) 0%, transparent 65%);
}
.crazy-hero .hero-emoji { font-size: 3.5rem; display: block; margin-bottom: 16px; }
.crazy-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  color: var(--heading);
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.crazy-hero p { font-size: 1.1rem; color: var(--text-muted); }

.featured-story {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 40px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.featured-story::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 4px; height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
}
.featured-story h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: var(--heading);
  margin-bottom: 20px;
  line-height: 1.3;
}
.story-body p { color: var(--text); line-height: 1.8; margin-bottom: 14px; }
.story-body p:last-child { margin-bottom: 0; }

.daily-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.prev-stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 48px;
}
.prev-story-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.prev-story-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(124,58,237,0.15);
}
.card-date {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.prev-story-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.4;
  margin-bottom: 10px;
}
.prev-story-card p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.prev-story-card a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}
.prev-story-card a:hover { color: var(--primary); }

/* Light mode adjustments */
[data-theme="light"] .news-story,
[data-theme="light"] .featured-story,
[data-theme="light"] .archive-card,
[data-theme="light"] .prev-story-card,
[data-theme="light"] .weekly-preview {
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

/* ══════════════════════════════
   ENHANCED CARD DESIGN
══════════════════════════════ */

/* Category colors */
.cat-compare  { --cat-color: #7c3aed; --cat-bg: linear-gradient(135deg,#4c1d95,#7c3aed); }
.cat-tools    { --cat-color: #0891b2; --cat-bg: linear-gradient(135deg,#0e4f6e,#0891b2); }
.cat-guide    { --cat-color: #15803d; --cat-bg: linear-gradient(135deg,#14532d,#16a34a); }
.cat-news     { --cat-color: #dc2626; --cat-bg: linear-gradient(135deg,#7f1d1d,#dc2626); }
.cat-analysis { --cat-color: #4338ca; --cat-bg: linear-gradient(135deg,#1e1b4b,#4338ca); }
.cat-review   { --cat-color: #b45309; --cat-bg: linear-gradient(135deg,#451a03,#d97706); }
.cat-tips     { --cat-color: #0f766e; --cat-bg: linear-gradient(135deg,#042f2e,#0f766e); }

.card-category.cat-compare  { color: #a78bfa; }
.card-category.cat-tools    { color: #38bdf8; }
.card-category.cat-guide    { color: #4ade80; }
.card-category.cat-news     { color: #f87171; }
.card-category.cat-analysis { color: #818cf8; }
.card-category.cat-review   { color: #fbbf24; }
.card-category.cat-tips     { color: #2dd4bf; }

/* Thumb area inside card */
.card-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  background: #06020f; /* canvas draws its own bg */
  flex-shrink: 0;
  overflow: hidden;
}

.card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(6,2,15,0.45);
  z-index: 1;
  pointer-events: none;
}

.thumb-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 20px;
  z-index: 2;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.4;
  background: linear-gradient(135deg, #fff 20%, var(--primary) 55%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(124,58,237,0.55));
}

.featured-news-card .thumb-title,
.featured-story-card .thumb-title {
  font-size: 1.5rem;
  padding: 20px 28px;
}

[data-theme="light"] .thumb-title {
  background: linear-gradient(135deg, #fff 10%, var(--primary) 55%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-thumb svg {
  width: 64px;
  height: 64px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.4));
}

/* Card body — solid readable background */
.card-body {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* Reset for new card structure */
.article-card.has-thumb {
  padding: 0;
  flex-direction: column;
}

.article-card.has-thumb .card-body .card-category { font-size: 0.72rem; }
.article-card.has-thumb .card-body .card-title { font-size: 1rem; }
.article-card.has-thumb .card-body .card-meta { margin-top: auto; }

/* Featured card — spans full width, horizontal layout */
.article-card.featured-card {
  grid-column: 1 / -1;
  flex-direction: row;
  padding: 0;
  min-height: 220px;
}

.article-card.featured-card .card-thumb {
  width: 340px;
  min-width: 280px;
  height: auto;
  flex-shrink: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}

.article-card.featured-card .card-body {
  flex: 1;
  padding: 28px 32px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-card.featured-card .card-body .card-title {
  font-size: 1.35rem;
  line-height: 1.35;
}

.article-card.featured-card .card-body .card-excerpt {
  font-size: 0.95rem;
}

@media (max-width: 700px) {
  .article-card.featured-card { flex-direction: column; }
  .article-card.featured-card .card-thumb { width: 100%; height: 160px; border-radius: var(--radius) var(--radius) 0 0; }
  .article-card.featured-card .card-body { border-radius: 0 0 var(--radius) var(--radius); }
}

/* Badge: new */
.new-badge {
  background: linear-gradient(135deg, #dc2626, #f97316);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* Card meta with icons */
.card-meta-icon { opacity: 0.6; font-size: 0.75rem; }

/* Category badge pill (colored) */
.cat-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
}

/* ══════════════════════════════
   NEWSLETTER STRIP
══════════════════════════════ */
.newsletter-strip {
  background: linear-gradient(135deg, rgba(124,58,237,0.12) 0%, rgba(6,182,212,0.08) 100%);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 20px;
  padding: 40px 48px;
  margin: 48px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.newsletter-strip-text h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--heading);
  margin-bottom: 6px;
}

.newsletter-strip-text p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.newsletter-strip-form {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 260px;
  max-width: 440px;
}

.newsletter-strip-form input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 16px;
  color: var(--text);
  font-size: 0.9rem;
  direction: rtl;
}

.newsletter-strip-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.newsletter-strip-form button {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 22px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.newsletter-strip-form button:hover { opacity: 0.88; }

/* ══════════════════════════════
   HERO IMPROVEMENTS
══════════════════════════════ */
.hero-content { position: relative; z-index: 1; }
.hero { position: relative; }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(6,182,212,0.12);
  border: 1px solid rgba(6,182,212,0.35);
  color: var(--accent);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #06b6d4;
  border-radius: 50%;
  animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.3; transform: scale(0.8); }
}

.hero h1 span.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stats {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.stat-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 14px;
  padding: 18px 28px;
  text-align: center;
  min-width: 110px;
}

.stat-card span {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-card small {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 28px 0 0; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.2s;
  display: inline-block;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-2px); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.2s, color 0.2s;
  display: inline-block;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ══════════════════════════════
   BACK TO TOP
══════════════════════════════ */
#back-to-top {
  position: fixed;
  bottom: 32px;
  left: 28px;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 999;
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════
   MOBILE HAMBURGER
══════════════════════════════ */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
  display: block;
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 600px) {
  .hamburger { display: flex; }
  nav {
    display: none !important;
    position: fixed;
    top: 64px;
    right: 0;
    left: 0;
    background: #08080f;
    border-bottom: 1px solid rgba(124,58,237,0.3);
    flex-direction: column !important;
    padding: 16px;
    gap: 4px !important;
    z-index: 150;
  }
  nav.open { display: flex !important; }
  nav a { padding: 12px 16px !important; font-size: 1rem !important; }
}

/* ══════════════════════════════
   SECTION HEADER ENHANCED
══════════════════════════════ */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}

.section-header-row h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--heading);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header-row h2::before {
  content: '';
  width: 4px;
  height: 22px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  border-radius: 2px;
  flex-shrink: 0;
}

.section-header-row a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

/* ══════════════════════════════
   FOOTER SOCIAL
══════════════════════════════ */
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.social-icon {
  width: 36px;
  height: 36px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.social-icon:hover {
  border-color: var(--primary);
  background: rgba(124,58,237,0.1);
}

/* ══════════════════════════════
   SCROLL REVEAL
══════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ══════════════════════════════
   TRENDING BAR
══════════════════════════════ */
.trending-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 20px;
  margin-bottom: 24px;
  overflow: hidden;
}

.trending-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  white-space: nowrap;
  border-left: 2px solid var(--border);
  padding-left: 16px;
  flex-shrink: 0;
}

.trending-links {
  display: flex;
  gap: 0;
  overflow: hidden;
  flex: 1;
}

.trending-links a {
  font-size: 0.83rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 2px 14px;
  border-left: 1px solid var(--border);
  transition: color 0.2s;
}

.trending-links a:last-child { border-left: none; }
.trending-links a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .trending-bar { display: none; }
  .newsletter-strip { padding: 28px 20px; }
  .newsletter-strip-text { width: 100%; }
  .article-card.featured-card .card-thumb { height: 140px; }
}

/* ══════════════════════════════
   WEEKLY NEWS PAGE
══════════════════════════════ */
.news-issue-header {
  text-align: center;
  margin-bottom: 40px;
}
.news-issue-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.3);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.news-issue-title {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 900;
  color: var(--heading);
  margin: 0 0 10px;
}
.news-issue-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto;
}

.news-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}
.news-section-header .section-num {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.3);
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}
.news-section-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--heading);
  margin: 0;
}

.news-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 700px) {
  .news-cards-grid { grid-template-columns: 1fr; }
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(124,58,237,0.15);
}
.news-card .card-thumb {
  height: 160px;
  min-height: 160px;
}
.featured-news-card {
  grid-column: 1 / -1;
}
.featured-news-card .card-thumb {
  height: 220px;
  min-height: 220px;
}

.news-card .card-body {
  padding: 20px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.news-num {
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 6px;
  padding: 2px 8px;
  letter-spacing: 0.5px;
}
.new-badge {
  font-size: 0.68rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  padding: 2px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.news-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--heading);
  margin: 0 0 10px;
  line-height: 1.4;
}
.featured-news-card .news-card-title {
  font-size: 1.25rem;
}
.news-card-body {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 16px;
}
.news-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.news-tag {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(124,58,237,0.1);
  color: var(--primary);
  border: 1px solid rgba(124,58,237,0.25);
  padding: 3px 10px;
  border-radius: 20px;
}

.tools-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}
@media (max-width: 700px) {
  .tools-row { grid-template-columns: 1fr; }
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}
.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.tool-card .card-body { padding: 16px 18px; }
.tool-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--heading);
  margin: 0 0 6px;
}
.tool-card-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.news-forecast {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: linear-gradient(135deg, rgba(124,58,237,0.07), rgba(6,182,212,0.05));
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 18px;
  padding: 28px 32px;
  margin-top: 40px;
}
.news-forecast-icon { font-size: 2rem; flex-shrink: 0; }
.news-forecast h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--heading);
  margin: 0 0 12px;
}
.news-forecast ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.news-forecast ul li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-right: 14px;
  position: relative;
}
.news-forecast ul li::before {
  content: '→';
  position: absolute;
  right: 0;
  color: var(--accent);
  font-weight: 700;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 768px) {
  .archive-grid { grid-template-columns: 1fr; }
}

.archive-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}
.archive-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

.weekly-date {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  margin-bottom: 6px;
}

/* Light mode for new elements */
[data-theme="light"] .stat-card { background: rgba(109,40,217,0.04); }
[data-theme="light"] .trending-bar { box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
[data-theme="light"] .newsletter-strip { background: linear-gradient(135deg,rgba(109,40,217,0.06),rgba(8,145,178,0.04)); border-color: rgba(109,40,217,0.2); }
[data-theme="light"] .card-body { background: #ffffff; }
[data-theme="light"] .article-card .card-body .card-title {
  background: linear-gradient(135deg, #0f172a 50%, #0891b2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="light"] .article-card .card-body .card-excerpt { color: #334155; }
[data-theme="light"] .card-thumb { filter: brightness(1.08); }

/* ══════════════════════════════
   TOOLS PAGE
══════════════════════════════ */
.tools-filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.tools-filter-bar button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.tools-filter-bar button:hover,
.tools-filter-bar button.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
}
.tools-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.tools-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}
.tool-dir-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.tool-dir-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(124,58,237,0.15);
}
.tool-dir-card .card-thumb { height: 130px; }
.tool-dir-body {
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tool-dir-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tool-dir-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--heading);
}
.tool-dir-maker {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}
.tool-dir-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}
.tool-dir-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.tool-price {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.25);
  padding: 3px 10px;
  border-radius: 20px;
}
.tool-badge-pop  { background: rgba(124,58,237,0.12); color: var(--primary); border-color: rgba(124,58,237,0.3); }
.tool-badge-free { background: rgba(34,197,94,0.1);  color: #22c55e;         border-color: rgba(34,197,94,0.3);  }
.tool-badge-il   { background: rgba(59,130,246,0.1); color: #3b82f6;         border-color: rgba(59,130,246,0.3); }
.tool-cta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 5px 14px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.tool-cta:hover { background: var(--primary); color: #fff; }
.tool-hebrew-tag {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(239,68,68,0.1);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.25);
  padding: 2px 8px;
  border-radius: 20px;
}
@media (max-width: 600px) {
  .tools-directory-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════
   QUIZ PAGE
══════════════════════════════ */
.quiz-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 0 80px;
}
.quiz-progress-bar-wrap {
  background: var(--border);
  border-radius: 20px;
  height: 6px;
  margin-bottom: 40px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 20px;
  transition: width 0.4s ease;
}
.quiz-step { display: none; }
.quiz-step.active { display: block; }
.quiz-step-num {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 10px;
}
.quiz-question {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 900;
  color: var(--heading);
  margin-bottom: 28px;
  line-height: 1.3;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.quiz-option {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px 22px;
  text-align: right;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s;
  font-family: inherit;
  width: 100%;
}
.quiz-option:hover { border-color: var(--primary); color: var(--primary); }
.quiz-option.selected {
  background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(6,182,212,0.08));
  border-color: var(--primary);
  color: var(--primary);
}
.quiz-result {
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(6,182,212,0.05));
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 20px;
  padding: 36px;
  text-align: center;
  display: none;
}
.quiz-result.active { display: block; }
.quiz-result-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 12px;
}
.quiz-result-tool {
  font-size: 2.2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}
.quiz-result-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}
.quiz-restart {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  padding: 10px 22px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.quiz-restart:hover { border-color: var(--primary); color: var(--primary); }

/* ══════════════════════════════
   SEARCH
══════════════════════════════ */
.search-bar {
  position: relative;
  flex-shrink: 0;
}
.search-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 36px 8px 14px;
  border-radius: 10px;
  font-size: 0.83rem;
  font-family: inherit;
  width: 190px;
  transition: border-color 0.2s, width 0.3s;
  direction: rtl;
}
.search-input:focus { outline: none; border-color: var(--primary); width: 230px; }
.search-input::placeholder { color: var(--text-muted); }
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  pointer-events: none;
  color: var(--text-muted);
}
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 500;
  max-height: 320px;
  overflow-y: auto;
  display: none;
}
.search-dropdown.open { display: block; }
.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(124,58,237,0.06); }
.search-result-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 2px;
}
.search-result-cat {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.search-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.83rem;
}
@media (max-width: 768px) {
  .search-bar { display: none; }
}
