/* assets/css/style.css - Updated for InsightX Theme */

:root {
  --bg: #0C0C0C;
  --surface: #2D2D2D;
  --surface-alt: #212121;
  --border: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(187, 230, 99, 0.35);
  --text: #FFFFFF;
  --text-muted: #9C9C9C;
  --tunnel-a: #BBE663;
  --tunnel-b: #00FF26;
  --cta: #BBE663;
  --cta-hover: #A4CD4C;
  --danger: #EF4444;
  --radius: 16px;
  --toast-bg: rgba(45, 45, 45, 0.95);
  --toast-border: rgba(187, 230, 99, 0.2);
  --toast-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  --toast-text: #FFFFFF;
  --toast-icon-bg: rgba(187, 230, 99, 0.12);
}

[data-theme="light"] {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-alt: #eef2f9;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(187, 230, 99, 0.6);
  --text: #0f131f;
  --text-muted: #5a657e;
  --tunnel-a: #7BAF36;
  --tunnel-b: #00A61B;
  --cta: #7BAF36;
  --cta-hover: #5D8223;
  --toast-bg: rgba(255, 255, 255, 0.95);
  --toast-border: rgba(187, 230, 99, 0.3);
  --toast-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  --toast-text: #0f131f;
  --toast-icon-bg: rgba(187, 230, 99, 0.15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
  text-align: left;
}
[dir="rtl"] body {
  text-align: right;
}

::selection { background: var(--tunnel-a); color: #0C0C0C; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(12, 12, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s, background-color 0.3s;
}
[data-theme="light"] .header {
  background: rgba(244, 246, 251, 0.85);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; max-width: 1140px; margin: 0 auto; gap: 16px;
}
.logo {
  font-weight: 900; font-size: 1.35em; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 10px;
}
.logo-mark {
  width: 24px; height: 24px; border-radius: 7px;
  background: linear-gradient(135deg, var(--tunnel-a), var(--tunnel-b));
  box-shadow: 0 0 12px rgba(0, 255, 38, 0.4);
  flex-shrink: 0;
}
.nav { display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--text-muted); font-size: 0.92em; font-weight: 500;
  transition: color 0.25s ease;
}
.nav-links a:hover { color: var(--tunnel-a); }
.nav-auth { display: flex; gap: 10px; align-items: center; }

/* ---------- Theme Toggle ---------- */
.theme-toggle {
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; cursor: pointer; color: var(--text);
  display: flex; align-items: center; justify-content: center; font-size: 1em;
  transition: all 0.25s;
}
.theme-toggle:hover { border-color: var(--tunnel-a); }

/* ---------- Mobile Menu Button ---------- */
.menu-toggle {
  display: none; background: transparent; border: none;
  color: var(--text); font-size: 1.5em; cursor: pointer;
}

/* ---------- Mobile Drawer ---------- */
.mobile-drawer {
  position: fixed; top: 0; bottom: 0; left: -100%;
  width: 280px; background: var(--surface); border-right: 1px solid var(--border);
  z-index: 9999; padding: 30px 20px; transition: all 0.3s ease;
  display: flex; flex-direction: column; gap: 20px; box-shadow: 0 0 40px rgba(0,0,0,0.5);
}
[dir="rtl"] .mobile-drawer {
  left: auto;
  right: -100%;
  border-right: none;
  border-left: 1px solid var(--border);
}
.mobile-drawer.open {
  left: 0;
}
[dir="rtl"] .mobile-drawer.open {
  right: 0;
  left: auto;
}
.mobile-drawer a { color: var(--text); font-size: 1em; font-weight: 500; }
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 999;
  opacity: 0; visibility: hidden; transition: all 0.3s;
}
.drawer-overlay.open { opacity: 1; visibility: visible; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: 10px; font-weight: 600; font-size: 0.92em;
  border: none; cursor: pointer; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit; gap: 8px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cta), #8EB346);
  color: #0C0C0C;
  box-shadow: 0 4px 14px rgba(187, 230, 99, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--cta-hover), var(--cta));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(187, 230, 99, 0.45);
}
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--tunnel-a); color: var(--tunnel-a); background: rgba(187, 230, 99, 0.05); }
.btn-outline { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-outline:hover { color: var(--text); border-color: var(--text); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- Language Switcher ---------- */
.lang-dropdown { position: relative; }
.lang-btn {
  background: var(--surface-alt); border: 1px solid var(--border);
  padding: 8px 12px; border-radius: 10px; color: var(--text);
  font-size: 0.88em; font-weight: 500; display: flex; align-items: center;
  gap: 8px; cursor: pointer; transition: all 0.25s ease;
}
.lang-btn:hover { border-color: var(--tunnel-a); color: var(--tunnel-a); }
.lang-btn .arrow-down { font-size: 0.7em; transition: transform 0.25s ease; }
.lang-dropdown.open .arrow-down { transform: rotate(180deg); }

.flag-icon { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; }

.lang-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 6px; min-width: 150px; opacity: 0; visibility: hidden;
  transform: translateY(10px); display: flex; flex-direction: column;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3); z-index: 100; transition: all 0.25s ease;
}
[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}
.lang-dropdown.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu a { padding: 2px 12px; display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.88em; border-radius: 8px; }
.lang-menu a:hover, .lang-menu a.active { background: var(--surface-alt); color: var(--tunnel-a); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 90px 24px 40px; text-align: center; overflow: hidden; }
.hero-glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 750px; height: 750px; border-radius: 50%;
  background: radial-gradient(circle, rgba(187, 230, 99, 0.18), rgba(0, 255, 38, 0.05) 50%, transparent 70%);
  pointer-events: none; filter: blur(40px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-alt); border: 1px solid var(--border);
  color: var(--tunnel-a); font-size: 0.82em; font-weight: 600;
  padding: 6px 16px; border-radius: 100px; margin-bottom: 24px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--tunnel-a);
  box-shadow: 0 0 8px var(--tunnel-a); animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.3;} }

.hero h1 {
  font-size: clamp(2.2em, 5vw, 3.6em); font-weight: 900; letter-spacing: -0.02em; line-height: 1.25;
  margin: 0 0 20px; max-width: 850px; margin-inline: auto;
}
.hero h1 span {
  background: linear-gradient(90deg, var(--tunnel-a), var(--tunnel-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--text-muted); font-size: 1.05em; max-width: 620px; margin: 0 auto 32px; line-height: 1.8; }
.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }

/* ---------- Tunnel & Chart Container ---------- */
.tunnel-wrap {
  max-width: 960px; margin: 0 auto; position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; padding: 24px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.tunnel-labels { display: flex; justify-content: space-between; padding: 0 8px 16px; font-size: 0.85em; color: var(--text-muted); font-weight: 600; }
.tunnel-labels .exposed { color: var(--danger); }
.tunnel-labels .protected { color: var(--tunnel-a); }

.chart-box { margin-top: 20px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.chart-box h4 { margin: 0 0 12px; font-size: 0.95em; color: var(--text-muted); text-align: start; }

/* ---------- Trust Bar ---------- */
.trust-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  max-width: 960px; margin: 40px auto 0; padding: 0 8px;
}
.trust-item {
  text-align: center; background: var(--surface); padding: 18px; border-radius: 16px;
  border: 1px solid var(--border); transition: transform 0.3s, border-color 0.3s;
}
.trust-item:hover { transform: translateY(-3px); border-color: var(--border-hover); }
.trust-item strong {
  display: block; font-size: 1.6em; font-weight: 900; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--text), var(--tunnel-a)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.trust-item span { color: var(--text-muted); font-size: 0.82em; margin-top: 4px; display: block; }

/* ---------- Sections ---------- */
section { padding: 80px 24px; max-width: 1140px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: 2.1em; font-weight: 800; margin: 0 0 12px; letter-spacing: -0.01em; }
.section-head p { color: var(--text-muted); font-size: 1em; max-width: 540px; margin: 0 auto; line-height: 1.8; }

/* ---------- Features ---------- */
/* ---------- Features ---------- */
.features-grid { 
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 20px; 
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover { 
  transform: translateY(-6px); 
  border-color: var(--border-hover); 
  box-shadow: 0 12px 30px rgba(0,0,0,0.15); 
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 20px;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tunnel-a);
  font-size: 1.3em;
  border: 1px solid var(--border);
  transition: transform 0.3s;
}

.feature-card:hover .feature-icon { 
  transform: scale(1.1); 
}

.feature-card h3 { 
  font-size: 1.05em; 
  margin: 0 0 10px; 
  font-weight: 700; 
}

.feature-card p { 
  color: var(--text-muted); 
  font-size: 0.88em; 
  line-height: 1.7; 
  margin: 0; 
}

/* ---------- Mobile (2 columns) ---------- */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}


/* ---------- Investment Plans ---------- */
.plan-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
.plan-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 30px 24px; position: relative; display: flex; flex-direction: column; justify-content: space-between;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.plan-card:hover { transform: translateY(-8px); border-color: var(--border-hover); box-shadow: 0 16px 36px rgba(0,0,0,0.2); }
.plan-featured {
  border-color: var(--tunnel-a);
  background: linear-gradient(180deg, rgba(187, 230, 99, 0.08), var(--surface) 40%);
}
.plan-badge {
  position: absolute; top: -14px; right: 24px;
  background: linear-gradient(90deg, var(--tunnel-a), var(--tunnel-b)); color: #0C0C0C; font-size: 0.75em; font-weight: 800;
  padding: 6px 14px; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.5px;
}
[dir="rtl"] .plan-badge {
  right: auto;
  left: 24px;
}
.plan-card h3 { font-size: 1.2em; margin: 0 0 6px; font-weight: 800; }
.plan-tagline { color: var(--text-muted); font-size: 0.85em; margin: 0 0 20px; min-height: 38px; line-height: 1.5; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.plan-price strong { font-size: 1.5em; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--tunnel-a); }
.plan-price span { color: var(--text-muted); font-size: 0.85em; }
.plan-price-note { color: var(--text-muted); font-size: 0.8em; margin-bottom: 22px; }
.plan-meta {
  display: flex; justify-content: space-between; padding: 14px 0; margin-bottom: 20px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.plan-meta div { text-align: center; flex: 1; }
.plan-meta strong { display: block; font-size: 0.92em; margin-bottom: 2px; }
.plan-meta span { color: var(--text-muted); font-size: 0.75em; }
.plan-card ul { list-style: none; padding: 0; margin: 0 0 28px; }
.plan-card ul li {
  display: flex; align-items: flex-start; gap: 10px; font-size: 0.88em;
  color: var(--text-muted); margin-bottom: 12px; line-height: 1.5;
}
.plan-card ul li::before { content: "✓"; color: var(--tunnel-a); font-weight: 700; flex-shrink: 0; }

/* ---------- Calculator ---------- */
.calc-wrap { max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.calc-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 28px; display: flex; flex-direction: column; justify-content: space-between;
}
.calc-card h3 { margin: 0 0 8px; font-size: 1.15em; font-weight: 700; }
.calc-card p { margin: 0 0 20px; font-size: 0.88em; color: var(--text-muted); line-height: 1.6; }

.calc-field { margin-bottom: 16px; text-align: start; }
.calc-field label { display: block; font-size: 0.85em; margin-bottom: 8px; color: var(--text-muted); font-weight: 500; }
.calc-field input, .calc-field select {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface-alt);
  color: var(--text); font-family: inherit; font-size: 0.92em; outline: none; transition: border-color 0.2s;
}
.calc-field input:focus, .calc-field select:focus { border-color: var(--tunnel-a); }

.calc-result-row {
  display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.92em;
  padding-bottom: 8px; border-bottom: 1px dashed var(--border);
}
.calc-result-row span { color: var(--text-muted); }
.calc-result-row strong { font-variant-numeric: tabular-nums; color: var(--tunnel-a); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  margin-bottom: 12px; overflow: hidden; transition: border-color 0.25s;
}
.faq-item:hover { border-color: var(--border-hover); }
.faq-question {
  width: 100%; text-align: left; padding: 20px 24px; background: none; border: none;
  color: var(--text); cursor: pointer; font-size: 0.98em; font-weight: 600; font-family: inherit;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
[dir="rtl"] .faq-question {
  text-align: right;
}
.faq-question::after { content: "+"; color: var(--tunnel-a); font-size: 1.4em; transition: transform 0.25s ease; flex-shrink: 0; }
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s cubic-bezier(0,1,0,1), padding 0.35s ease; padding: 0 24px; }
.faq-item.open .faq-answer { max-height: 300px; padding-bottom: 20px; }
.faq-answer p { margin: 0; color: var(--text-muted); font-size: 0.92em; line-height: 1.8; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border); padding: 40px 24px; text-align: center;
  color: var(--text-muted); font-size: 0.88em; background: var(--bg);
}

/* ---------- Scroll Animations ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ============================================================
   TOAST NOTIFICATIONS (SOCIAL PROOF)
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  width: 100%;
  pointer-events: none;
}
[dir="rtl"] #toast-container {
  left: auto;
  right: 24px;
}

.toast-notification {
  pointer-events: auto;
  background: var(--toast-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--toast-border);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--toast-shadow);
  color: var(--toast-text);
  font-size: 0.9em;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-100% - 20px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, margin-bottom 0.3s;
  cursor: default;
  position: relative;
  overflow: hidden;
}
[dir="rtl"] .toast-notification {
  transform: translateX(100% + 20px);
}
.toast-notification.show {
  transform: translateX(0);
  opacity: 1;
}
.toast-notification.hiding {
  transform: translateX(100% + 20px);
  opacity: 0;
}
[dir="rtl"] .toast-notification.hiding {
  transform: translateX(-100% - 20px);
}

.toast-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--toast-icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
}
.toast-content {
  flex: 1;
  min-width: 0;
}
.toast-content .toast-time {
  display: block;
  font-size: 0.7em;
  color: var(--text-muted);
  margin-top: 2px;
  opacity: 0.7;
}
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(187, 230, 99, 0.15);
}
.toast-progress .bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--tunnel-a), var(--tunnel-b));
  border-radius: 0 0 0 2px;
  transition: width 0.1s linear;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  #toast-container {
    bottom: 16px;
    left: 16px;
    max-width: calc(100% - 32px);
  }
  [dir="rtl"] #toast-container {
    left: auto;
    right: 16px;
  }
  .toast-notification {
    padding: 12px 14px;
    font-size: 0.85em;
  }
}

@media (max-width: 1024px) {
  .features-grid, .plan-cards { grid-template-columns: repeat(2, 1fr); }
  .calc-wrap { grid-template-columns: 1fr; }
  .trust-bar { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }
  .plan-cards, .features-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.1em; }
  .header .logo {
    display: none !important;
  }
}