/* ==========================================================================
   STEX — Premium Design System & Stylesheet
   Modern Obsidian Dark Aesthetic with Electric Indigo & Cyan Glow Accents
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-base: #06080d;
  --bg-surface: #0b0f19;
  --bg-surface-elevated: #111726;
  --bg-card: rgba(17, 23, 38, 0.75);
  --bg-card-hover: rgba(23, 32, 54, 0.85);
  --bg-input: #0e1320;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-focus: #4f46e5;
  --border-glow: rgba(99, 102, 241, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  --accent-indigo: #6366f1;
  --accent-indigo-glow: rgba(99, 102, 241, 0.4);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.4);
  --accent-teal: #14b8a6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-danger: #ef4444;

  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-surface: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 70%);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Dimensions & Spacing */
  --nav-height: 72px;
  --container-max: 1200px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.25);
  --shadow-glow-cyan: 0 0 30px rgba(6, 182, 212, 0.25);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background Atmosphere */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 80%);
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.ambient-orb-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  left: 10%;
  background: radial-gradient(circle, #4f46e5 0%, transparent 70%);
}

.ambient-orb-2 {
  width: 500px;
  height: 500px;
  top: 30%;
  right: -100px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  animation-duration: 25s;
  animation-delay: -5s;
}

.ambient-orb-3 {
  width: 550px;
  height: 550px;
  bottom: 10%;
  left: -150px;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  animation-duration: 30s;
  animation-delay: -10s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, 60px) scale(0.95); }
}

/* Layout Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(6, 8, 13, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  flex-shrink: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.90rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  line-height: 1;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-badge-pill {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  white-space: nowrap;
  line-height: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Language Selector */
.lang-selector {
  position: relative;
  display: inline-block;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.lang-btn:hover, .lang-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(99, 102, 241, 0.4);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 170px;
  background: rgba(11, 15, 25, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(99, 102, 241, 0.15);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  z-index: 1000;
  display: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.lang-dropdown.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.lang-option:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #ffffff;
}

.lang-option.active {
  color: var(--accent-cyan);
  font-weight: 700;
}

.lang-flag {
  font-size: 1rem;
  line-height: 1;
}

/* Language Suggestion Banner */
.lang-suggest-banner {
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.35);
  padding: 8px 0;
  font-size: 0.84rem;
  color: var(--text-primary);
  position: relative;
  z-index: 1001;
  animation: fadeInDown 0.25s ease-out;
}

.lang-suggest-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.lang-suggest-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color var(--transition-fast);
}

.lang-suggest-close:hover {
  color: var(--text-primary);
}

.btn-xs {
  padding: 4px 12px;
  font-size: 0.76rem;
  border-radius: var(--radius-sm);
}

/* Mobile Language Selector inside drawer */
.nav-mobile-lang {
  display: none;
  width: 100%;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-mobile-lang-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 700;
}

.nav-mobile-lang-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.nav-mobile-lang-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  gap: 2px;
  transition: all var(--transition-fast);
}

.nav-mobile-lang-chip:hover, .nav-mobile-lang-chip.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
}

.nav-mobile-cta {
  display: none;
}

/* Mobile Toggle */
.nav-mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.90rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  outline: none;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 4px 18px var(--accent-indigo-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5), 0 0 10px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-outline-cyan {
  background: rgba(6, 182, 212, 0.08);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.btn-outline-cyan:hover {
  background: rgba(6, 182, 212, 0.16);
  border-color: rgba(6, 182, 212, 0.6);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 80px 0 60px;
  position: relative;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  margin-bottom: 28px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c7d2fe;
}

.hero-pill .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.12;
  margin-bottom: 24px;
  max-width: 950px;
  margin-left: auto;
  margin-right: auto;
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 760px;
  margin: 0 auto 36px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 30px;
}

.hero-meta-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.hero-meta-note span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Visual Comparison Widget (Hero Interactive Graphic)
   ========================================================================== */
.hero-graphic-wrap {
  margin-top: 50px;
  position: relative;
}

.hero-graphic-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 30px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.hero-graphic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.hero-window-dots {
  display: flex;
  gap: 6px;
}

.hero-window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
}

.hero-window-dot.red { background: #ef4444; }
.hero-window-dot.yellow { background: #f59e0b; }
.hero-window-dot.green { background: #10b981; }

.hero-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  text-align: left;
}

.comparison-column {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: rgba(10, 14, 24, 0.7);
  position: relative;
}

.comparison-column.traditional {
  border-color: rgba(239, 68, 68, 0.25);
}

.comparison-column.stex-live {
  border-color: rgba(6, 182, 212, 0.4);
  background: radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.1), transparent 60%), rgba(10, 14, 24, 0.85);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.15);
}

.col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.col-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.col-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.col-badge.bad {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.col-badge.good {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Timeline bars inside comparison */
.timeline-flow {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
}

.flow-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flow-step-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  font-weight: 500;
}

.flow-progress-bar {
  width: 100%;
  height: 8px;
  background: #1e293b;
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.full-guide-article {
  scroll-margin-top: 100px;
  transition: border-color var(--transition-fast);
}

.full-guide-article:target {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.25);
}

.flow-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.flow-bar-fill.download { background: #3b82f6; width: 100%; }
.flow-bar-fill.extract { background: #8b5cf6; width: 65%; }
.flow-bar-fill.stex-stream { 
  background: linear-gradient(90deg, #6366f1, #06b6d4, #10b981); 
  width: 95%;
  animation: streamShimmer 2s linear infinite;
  background-size: 200% 100%;
}

@keyframes streamShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.comparison-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.comp-stat {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.comp-stat-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.comp-stat-val.loss { color: #f87171; }
.comp-stat-val.win { color: #34d399; }

/* ==========================================================================
   Trust Metrics Strip
   ========================================================================== */
.metrics-strip {
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(11, 15, 25, 0.4);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.metric-item-num {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.metric-item-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.metric-item-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section {
  padding: 90px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 50px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   The 4 Common Issues STEX Solves (Feature Cards)
   ========================================================================== */
.problems-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  backdrop-filter: blur(16px);
}

.problem-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-glow);
}

.problem-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}

.problem-card-badge.critical {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.problem-card-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.problem-card-badge.tech {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.problem-card-badge.hardware {
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.problem-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.problem-card-desc {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.problem-sol-box {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.sol-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #34d399;
  margin-bottom: 6px;
}

.sol-text {
  font-size: 0.86rem;
  color: #cbd5e1;
  line-height: 1.5;
}

/* ==========================================================================
   Interactive Savings Calculator
   ========================================================================== */
.calculator-wrap {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(99, 102, 241, 0.15);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.calc-control-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calc-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.calc-badge-val {
  font-size: 1.1rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.calc-slider {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: #1e293b;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--accent-indigo);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.calc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.calc-results-card {
  background: rgba(10, 14, 24, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.calc-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.calc-result-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.calc-res-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.calc-res-value {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #34d399;
  letter-spacing: -0.02em;
}

.calc-res-value.accent {
  color: #38bdf8;
}

/* ==========================================================================
   Side-by-Side Comparison Table
   ========================================================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.comp-table th, .comp-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.92rem;
}

.comp-table th {
  background: rgba(15, 23, 42, 0.85);
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.comp-table th.highlight, .comp-table td.highlight {
  background: rgba(99, 102, 241, 0.08);
  border-left: 1px solid rgba(99, 102, 241, 0.3);
  border-right: 1px solid rgba(99, 102, 241, 0.3);
}

.comp-table tr:last-child td {
  border-bottom: none;
}

.check-icon {
  color: #10b981;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cross-icon {
  color: #ef4444;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Format Compatibility Grid
   ========================================================================== */
.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.format-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  transition: all var(--transition-fast);
}

.format-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.format-ext {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.format-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Blog & Knowledge Base Section
   ========================================================================== */
.blog-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.search-box-wrap {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.search-icon-svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 20px;
  height: 20px;
}

.blog-search-input {
  width: 100%;
  padding: 14px 20px 14px 50px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition-fast);
}

.blog-search-input:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.category-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.category-pill:hover, .category-pill.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-indigo);
  color: #c7d2fe;
}

.blog-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  backdrop-filter: blur(14px);
  text-decoration: none;
  color: inherit;
}

.article-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-glow);
}

.article-header {
  padding: 24px 24px 12px;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.article-tag {
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.article-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  padding: 0 24px 16px;
  flex-grow: 1;
}

.article-searches-box {
  margin: 0 24px 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed var(--border-subtle);
  font-size: 0.75rem;
  color: #94a3b8;
}

.article-searches-box strong {
  color: #cbd5e1;
}

.article-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-indigo);
}

/* ==========================================================================
   Article Modal / Reader View
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 13, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content-card {
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  overflow-y: auto;
  padding: 40px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Article Prose */
.prose {
  color: #cbd5e1;
  line-height: 1.75;
  font-size: 0.98rem;
}

.prose h1, .prose h2, .prose h3 {
  color: var(--text-primary);
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  letter-spacing: -0.02em;
}

.prose h1 { font-size: 1.8rem; }
.prose h2 { font-size: 1.4rem; border-bottom: 1px solid var(--border-subtle); padding-bottom: 8px; }
.prose h3 { font-size: 1.15rem; }

.prose p {
  margin-bottom: 1.2em;
}

.prose ul, .prose ol {
  margin-bottom: 1.2em;
  padding-left: 24px;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose code {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: #38bdf8;
  border: 1px solid var(--border-subtle);
}

.prose pre {
  background: #020305;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 1.4em;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #f1f5f9;
}

.callout {
  padding: 18px;
  border-radius: var(--radius-md);
  margin-bottom: 1.4em;
  border-left: 4px solid var(--accent-indigo);
  background: rgba(99, 102, 241, 0.08);
}

.callout.warning {
  border-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.08);
}

.callout.success {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
}

/* ==========================================================================
   Developer & Power User Showcase
   ========================================================================== */
.code-preview-card {
  background: #020305;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.code-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #0b0e17;
  border-bottom: 1px solid var(--border-subtle);
}

.code-tabs {
  display: flex;
  gap: 8px;
}

.code-tab-btn {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.code-tab-btn.active, .code-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.code-copy-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.code-copy-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.code-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  color: #cbd5e1;
  overflow-x: auto;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-grid,
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item.active {
  border-color: var(--accent-indigo);
}

.faq-trigger,
.faq-question {
  width: 100%;
  padding: 20px 24px;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: color var(--transition-fast);
}

.faq-trigger span,
.faq-question span {
  flex: 1;
  text-align: inherit;
}

.faq-trigger:hover,
.faq-question:hover {
  color: var(--accent-cyan);
}

.faq-chevron {
  transition: transform var(--transition-fast), color var(--transition-fast);
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent-indigo);
}

.faq-body,
.faq-answer {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.7;
  display: none;
}

.faq-body p,
.faq-answer p {
  margin: 0;
}

.faq-item.active .faq-body,
.faq-item.active .faq-answer {
  display: block;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-box {
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.25) 0%, rgba(6, 8, 13, 0.9) 70%), var(--bg-surface-elevated);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  text-align: center;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.cta-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.cta-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 30px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #030408;
  padding: 60px 0 30px;
  position: relative;
  z-index: 10;
}

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

.footer-brand-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 14px;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
}

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

.cf-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(243, 128, 32, 0.1);
  border: 1px solid rgba(243, 128, 32, 0.25);
  color: #fb923c;
  font-size: 0.72rem;
  font-weight: 600;
}

/* ==========================================================================
   Responsive Queries
   ========================================================================== */
@media (max-width: 1140px) {
  .brand-badge {
    display: none;
  }
  .nav-links {
    gap: 16px;
  }
  .nav-link {
    font-size: 0.86rem;
  }
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(11, 15, 25, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-medium);
    padding: 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85);
    z-index: 999;
  }

  .nav-links.is-open {
    display: flex;
    animation: fadeInDown 0.2s ease-out;
  }

  .nav-links .nav-link {
    font-size: 1rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
  }

  .nav-mobile-cta {
    display: block;
    padding-top: 8px;
  }

  .nav-actions {
    display: none;
  }

  .nav-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-comparison-grid {
    grid-template-columns: 1fr;
  }
  .blog-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .calculator-wrap {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .problems-grid {
    grid-template-columns: 1fr;
  }
  .blog-articles-grid {
    grid-template-columns: 1fr;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ==========================================================================
   RTL (Arabic) Layout Support
   ========================================================================== */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
  font-family: 'Cairo', 'Plus Jakarta Sans', 'Segoe UI', Tahoma, Arial, sans-serif;
}

[dir="rtl"] .nav-brand {
  flex-direction: row;
}

[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .hero-comparison-grid {
  text-align: right;
}

[dir="rtl"] .comparison-column {
  text-align: right;
}

[dir="rtl"] .comparison-stats-row {
  text-align: right;
}

[dir="rtl"] .calc-slider-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .comp-table {
  text-align: right;
}

[dir="rtl"] .comp-table th,
[dir="rtl"] .comp-table td {
  text-align: right;
}

[dir="rtl"] .faq-trigger,
[dir="rtl"] .faq-question {
  text-align: right;
}

[dir="rtl"] .faq-body,
[dir="rtl"] .faq-answer {
  text-align: right;
}

[dir="rtl"] .footer-grid {
  direction: rtl;
  text-align: right;
}

/* ==========================================================================
   Thai (th) Typography Support
   ========================================================================== */
[lang="th"] {
  font-family: 'Prompt', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.65;
}

[lang="th"] .hero-title,
[lang="th"] .section-title,
[lang="th"] .cta-title {
  letter-spacing: normal;
  line-height: 1.35;
}


