/* =============================================
   MarketIQ — Main Stylesheet
   Financial Clarity Design System
   ============================================= */

:root {
  --primary:       #1e3a5f;
  --primary-light: #2d5282;
  --accent:        #3b82f6;
  --accent-hover:  #2563eb;
  --green:         #10b981;
  --green-light:   #d1fae5;
  --red:           #ef4444;
  --red-light:     #fee2e2;
  --gold:          #f59e0b;

  --bg:            #f8fafc;
  --bg-card:       #ffffff;
  --bg-dark:       #0f1c2e;
  --bg-dark-card:  #1a2d44;
  --bg-light:      #f1f5f9;

  --text:          #1e293b;
  --text-muted:    #64748b;
  --text-light:    #94a3b8;

  --border:        #e2e8f0;
  --border-dark:   #334155;

  --radius-sm:     8px;
  --radius:        12px;
  --radius-lg:     20px;
  --radius-xl:     28px;

  --shadow:        0 2px 16px rgba(0,0,0,0.07);
  --shadow-md:     0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.14);

  --transition:    0.2s ease;
  --font:          'Heebo', sans-serif;
}

[data-theme="dark"] {
  --bg:         #0f1c2e;
  --bg-card:    #1a2d44;
  --bg-light:   #162236;
  --bg-dark:    #08111c;
  --text:       #e2e8f0;
  --text-muted: #94a3b8;
  --border:     #1e3a5f;
  --shadow:     0 2px 16px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  direction: rtl;
  transition: background var(--transition), color var(--transition);
}

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

img { max-width: 100%; }

ul { list-style: none; }

/* ─── Layout ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section.bg-light { background: var(--bg-light); }
.section.bg-dark { background: var(--bg-dark); color: #e2e8f0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.section.bg-dark .section-header h2 { color: #e2e8f0; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; }
.section-footer { text-align: center; margin-top: 40px; }

.cards-grid { display: grid; gap: 24px; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }

/* ─── Navbar ─── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
[data-theme="dark"] .navbar {
  background: rgba(15,28,46,0.96);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}
[data-theme="dark"] .nav-logo { color: #e2e8f0; }
.logo-icon { font-size: 1.5rem; }
.logo-iq { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: rgba(59,130,246,0.1);
}

.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
}
.theme-toggle:hover { background: var(--bg-light); }

.nav-mobile-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
}

/* ─── Ticker ─── */
.ticker-bar {
  background: var(--primary);
  overflow: hidden;
  padding: 10px 0;
  position: relative;
}
.ticker-inner {
  display: flex;
  gap: 0;
  width: max-content;
  animation: ticker 30s linear infinite;
}
.ticker-item {
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.2);
}
.ticker-name { color: rgba(255,255,255,0.7); font-size: 0.85rem; }
.ticker-val { font-weight: 700; font-size: 0.9rem; }
.ticker-val.positive { color: #4ade80; }
.ticker-val.negative { color: #f87171; }
.ticker-val.neutral  { color: #fbbf24; }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── Hero ─── */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 60px;
}
.hero-content { flex: 1; }
.hero-badge {
  display: inline-block;
  background: rgba(59,130,246,0.1);
  color: var(--accent);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 100px;
  padding: 6px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 20px;
}
[data-theme="dark"] .hero h1 { color: #e2e8f0; }
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.8;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { flex: 1; display: flex; justify-content: center; }

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--font);
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59,130,246,0.35);
  color: white;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--font);
  transition: all var(--transition);
  text-decoration: none;
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59,130,246,0.05);
}
[data-theme="dark"] .btn-secondary { color: #e2e8f0; border-color: var(--border-dark); }
.btn-large { padding: 18px 40px; font-size: 1.1rem; }
.btn-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}
.btn-link:hover { gap: 8px; }
.btn-card {
  display: inline-block;
  background: var(--bg);
  color: var(--accent);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  transition: all var(--transition);
  text-decoration: none;
  margin-top: auto;
}
.btn-card:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* ─── Badge ─── */
.badge {
  display: inline-block;
  background: #22c55e;
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  vertical-align: middle;
  margin-inline-start: 8px;
}
.badge::before { content: '● '; animation: blink 1.5s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ─── Market Cards ─── */
.market-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.market-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.market-card-icon { font-size: 1.8rem; }
.market-card-name { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.market-card-price { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.market-card-change { font-size: 0.9rem; font-weight: 600; }
.market-card-change.positive { color: var(--green); }
.market-card-change.negative { color: var(--red); }
.market-card-change.neutral  { color: var(--gold); }
.mini-chart { height: 40px; margin-top: auto; }

/* VIX Gauge */
.vix-card { position: relative; }
.vix-gauge {
  width: 100%;
  height: 8px;
  background: linear-gradient(to left, #ef4444 0%, #f59e0b 40%, #10b981 80%);
  border-radius: 100px;
  position: relative;
  margin-top: 8px;
}
.vix-needle {
  width: 14px;
  height: 14px;
  background: var(--primary);
  border: 2px solid white;
  border-radius: 50%;
  position: absolute;
  top: -3px;
  transform: translateX(50%);
  transition: right 1s ease;
}

/* ─── Candle of the Day ─── */
.candle-of-day {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-md);
}
.cod-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 140px;
}
.candle-svg { width: 100px; }
.cod-sentiment {
  font-weight: 700;
  font-size: 0.875rem;
  padding: 6px 18px;
  border-radius: 100px;
}
.cod-sentiment.bullish { background: var(--green-light); color: #065f46; }
.cod-sentiment.bearish { background: var(--red-light); color: #991b1b; }
.cod-content { flex: 1; }
.cod-content h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 12px; }
.cod-intro { color: var(--text-muted); margin-bottom: 24px; line-height: 1.8; }
.cod-psychology, .cod-conditions { margin-bottom: 20px; }
.cod-psychology h4, .cod-conditions h4 { font-weight: 700; margin-bottom: 8px; color: var(--primary); }
[data-theme="dark"] .cod-psychology h4, [data-theme="dark"] .cod-conditions h4 { color: var(--accent); }
.cod-psychology p { color: var(--text-muted); line-height: 1.8; }
.cod-conditions ul { padding-inline-start: 20px; }
.cod-conditions li { color: var(--text-muted); padding: 3px 0; }
.cod-conditions li::before { content: '✓ '; color: var(--green); font-weight: 700; }

/* ─── Academy Cards ─── */
.academy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border-top: 4px solid transparent;
}
.academy-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.academy-card.card-blue  { border-top-color: var(--accent); }
.academy-card.card-green { border-top-color: var(--green); }
.academy-card.card-purple{ border-top-color: #8b5cf6; }
.academy-card-icon { font-size: 2rem; }
.academy-level {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 100px;
  width: fit-content;
}
.level-blue   { background: rgba(59,130,246,0.1);  color: var(--accent); }
.level-green  { background: rgba(16,185,129,0.1);  color: var(--green); }
.level-purple { background: rgba(139,92,246,0.1);  color: #8b5cf6; }
.academy-card h3 { font-size: 1.15rem; font-weight: 800; }
.academy-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; flex: 1; }
.academy-meta { font-size: 0.85rem; color: var(--text-light); }

/* ─── Split Layout ─── */
.split-layout {
  display: flex;
  gap: 64px;
  align-items: center;
}
.split-content { flex: 1; }
.split-visual { flex: 1; }
.split-badge {
  display: inline-block;
  background: rgba(59,130,246,0.15);
  color: #93c5fd;
  border-radius: 100px;
  padding: 5px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.section.bg-dark .split-content h2 { font-size: 2rem; font-weight: 800; color: #e2e8f0; margin-bottom: 16px; }
.section.bg-dark .split-content p { color: #94a3b8; margin-bottom: 24px; line-height: 1.8; }
.feature-list { list-style: none; padding: 0; margin-bottom: 32px; }
.feature-list li { padding: 6px 0; color: #94a3b8; font-size: 0.95rem; }

/* Checklist Preview */
.checklist-preview {
  background: var(--bg-dark-card);
  border: 1px solid #1e3a5f;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  transition: all var(--transition);
}
.check-item.checked {
  background: rgba(16,185,129,0.1);
  color: #6ee7b7;
}
.check-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  flex-shrink: 0;
}
.check-item.checked .check-box {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

/* ─── AI Teaser ─── */
.ai-teaser {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 64px;
  background: linear-gradient(135deg, rgba(59,130,246,0.05) 0%, rgba(139,92,246,0.05) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
.ai-icon { font-size: 4rem; margin-bottom: 16px; }
.ai-teaser h2 { font-size: 2rem; font-weight: 800; margin-bottom: 14px; }
.ai-teaser p { color: var(--text-muted); line-height: 1.8; margin-bottom: 32px; }

/* ─── Candle Demo (SVG animation) ─── */
.candle-demo {
  width: 300px;
  height: 280px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

/* ─── Footer ─── */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.85);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .footer-logo {
  font-size: 1.4rem;
  font-weight: 900;
  color: white;
  margin-bottom: 14px;
}
.footer-brand .footer-logo span { color: var(--accent); }
.footer-brand p { font-size: 0.9rem; color: rgba(255,255,255,0.6); line-height: 1.7; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a { font-size: 1.3rem; opacity: 0.7; transition: opacity var(--transition); }
.footer-social a:hover { opacity: 1; }
.footer-col h4 { color: white; font-weight: 700; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { padding: 4px 0; }
.footer-col a { color: rgba(255,255,255,0.6); font-size: 0.9rem; transition: color var(--transition); }
.footer-col a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}
.disclaimer-note { font-size: 0.8rem; }

/* ─── Page Hero (inner pages) ─── */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
}
.page-hero h1 { font-size: 2.5rem; font-weight: 900; margin-bottom: 12px; }
.page-hero p { font-size: 1.1rem; opacity: 0.8; max-width: 600px; margin: 0 auto; }

/* ─── Options Section Grid ─── */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { gap: 32px; }
  .hero-visual { display: none; }
}
@media (max-width: 768px) {
  .cards-3 { grid-template-columns: 1fr; }
  .cards-2 { grid-template-columns: 1fr; }
  .cards-4 { grid-template-columns: 1fr; }
  .split-layout { flex-direction: column; gap: 32px; }
  .candle-of-day { flex-direction: column; padding: 24px; gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    right: 0; left: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 8px;
    z-index: 99;
  }
  .nav-mobile-btn { display: block; }
  .section { padding: 40px 0; }
  .section-header { margin-bottom: 28px; }
  .section-header h2 { font-size: 1.6rem; }
  .hero { padding: 36px 16px; min-height: auto; }
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: 1rem; margin-bottom: 24px; }
  .hero-cta { flex-direction: column; gap: 10px; }
  .hero-cta .btn-primary,
  .hero-cta .btn-secondary { width: 100%; justify-content: center; }
  .ai-teaser { padding: 32px 16px; }
  .options-grid { grid-template-columns: 1fr; gap: 28px; }
  .btn-ghost { display: none; }
  .ai-teaser h2 { font-size: 1.5rem; }
  .container { padding: 0 16px; }
  .market-card { padding: 18px; }
  .market-card-price { font-size: 1.35rem; }
  .footer { padding: 48px 0 24px; }
  .page-hero { padding: 48px 0; }
  .page-hero h1 { font-size: 1.8rem; }
}