/* ==========================================================================
   BASHPEDIA - Main Stylesheet
   AI-Powered Bash Encyclopedia & Deployment System
   ========================================================================== */

/* ==========================================================================
   CSS VARIABLES - Enhanced Brand Colors for Better Visual Impact
   ========================================================================== */
:root {
  /* Background colors - slightly warmer dark tones */
  --bg-primary: #0a0f14;
  --bg-secondary: #121820;
  --bg-tertiary: #1a222c;
  --bg-elevated: #252d38;
  
  /* Brand colors - More vibrant and saturated */
  --brand-green: #00d68f;
  --brand-green-dark: #00a86b;
  --brand-green-light: #5cffb1;
  --brand-blue: #0095ff;
  --brand-blue-dark: #0077cc;
  --brand-blue-light: #66c2ff;
  --brand-cyan: #00e5ff;
  --brand-purple: #bf6bff;
  --brand-purple-dark: #9333ea;
  --brand-pink: #ff4d8d;
  --brand-orange: #ff8c42;
  
  /* Text colors - warmer white */
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Accent colors */
  --accent-red: #ff5757;
  --accent-orange: #ffa726;
  --accent-yellow: #ffca28;
  --accent-success: #00d68f;
  
  /* Borders */
  --border-default: #2a3441;
  --border-muted: #1e2733;
  --border-highlight: rgba(0, 213, 143, 0.3);
  
  /* Gradients - More dynamic */
  --gradient-brand: linear-gradient(135deg, #00d68f 0%, #0095ff 50%, #bf6bff 100%);
  --gradient-brand-hover: linear-gradient(135deg, #00a86b 0%, #0077cc 50%, #9333ea 100%);
  --gradient-hero: linear-gradient(180deg, rgba(0, 214, 143, 0.08) 0%, transparent 50%);
  --gradient-glow: linear-gradient(135deg, rgba(0, 213, 143, 0.15) 0%, rgba(0, 149, 255, 0.15) 50%, rgba(191, 107, 255, 0.1) 100%);
  --gradient-card: linear-gradient(145deg, rgba(26, 34, 44, 0.8) 0%, rgba(18, 24, 32, 0.9) 100%);
  --gradient-section-alt: linear-gradient(180deg, #0f151c 0%, #121820 100%);
  
  /* Shadows - Enhanced glow effects */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow-green: 0 0 60px rgba(0, 214, 143, 0.25), 0 0 100px rgba(0, 214, 143, 0.1);
  --shadow-glow-blue: 0 0 60px rgba(0, 149, 255, 0.25), 0 0 100px rgba(0, 149, 255, 0.1);
  --shadow-glow-purple: 0 0 60px rgba(191, 107, 255, 0.2);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(42, 52, 65, 0.5);
  --shadow-card-hover: 0 8px 40px rgba(0, 214, 143, 0.15), 0 0 0 1px rgba(0, 214, 143, 0.3);
  
  /* Spacing */
  --header-height: 72px;
  --section-padding: 100px;
  --container-max: 1200px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
  --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-cyan);
}

code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'Consolas', monospace;
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  color: var(--brand-cyan);
}

/* ==========================================================================
   BACKGROUND EFFECTS
   ========================================================================== */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(63, 185, 80, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 185, 80, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: -2;
}

.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
}

.bg-glow-1 {
  top: -200px;
  right: -100px;
  background: radial-gradient(circle, rgba(63, 185, 80, 0.3) 0%, transparent 70%);
}

.bg-glow-2 {
  bottom: 20%;
  left: -200px;
  background: radial-gradient(circle, rgba(88, 166, 255, 0.2) 0%, transparent 70%);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-default);
  z-index: 1000;
}

.header-inner {
  max-width: var(--container-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.main-logo {
  height: 48px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

/* Active nav link - cross-browser compatible */
.nav-link.active {
  color: var(--brand-green) !important;
  background: transparent;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background-color: var(--brand-green);
  border-radius: 1px;
}

/* ==========================================================================
   LANGUAGE SELECTOR
   ========================================================================== */
.lang-selector {
  position: relative;
  margin-right: 8px;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-current:hover {
  background: var(--bg-elevated);
  border-color: var(--brand-green);
}

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

.lang-code {
  font-weight: 600;
}

.lang-arrow {
  transition: transform var(--transition-fast);
}

.lang-dropdown.open + .lang-current .lang-arrow,
.lang-current[aria-expanded="true"] .lang-arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  z-index: 1001;
}

.lang-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-option:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.lang-option.active {
  background: rgba(63, 185, 80, 0.1);
  color: var(--brand-green);
}

.lang-option .lang-flag {
  font-size: 18px;
}

.lang-option .lang-name {
  flex: 1;
}

/* RTL Support */
html[dir="rtl"] body {
  text-align: right;
}

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

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

html[dir="rtl"] .lang-selector {
  margin-right: 0;
  margin-left: 8px;
}

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

/* Fix: Ensure flags are always visible in RTL */
html[dir="rtl"] .lang-flag {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", sans-serif;
}

html[dir="rtl"] .lang-option {
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] .lang-current {
  flex-direction: row-reverse;
}

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

html[dir="rtl"] .hero-actions {
  justify-content: flex-end;
}

html[dir="rtl"] .section-header {
  text-align: right;
}

html[dir="rtl"] .workflow-step {
  flex-direction: row-reverse;
}

html[dir="rtl"] .step-arrow {
  transform: rotate(180deg);
}

html[dir="rtl"] .audience-card,
html[dir="rtl"] .feature-card,
html[dir="rtl"] .component-card,
html[dir="rtl"] .capability-item {
  text-align: right;
}

html[dir="rtl"] .offering-table {
  direction: rtl;
}

html[dir="rtl"] .intro-grid {
  direction: rtl;
}

html[dir="rtl"] .footer-inner {
  flex-direction: row-reverse;
}

/* Custom scrollbar for dropdown */
.lang-dropdown::-webkit-scrollbar {
  width: 6px;
}

.lang-dropdown::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.lang-dropdown::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 3px;
}

.lang-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

@media (max-width: 900px) {
  .lang-selector {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .lang-code {
    display: none;
  }
  
  .lang-current {
    padding: 8px;
  }
}

.nav-link-cta {
  background: var(--brand-green-dark);
  color: white !important;
}

.nav-link-cta:hover {
  background: var(--brand-green);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

@media (max-width: 900px) {
  .header-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-default);
    padding: 16px;
    gap: 4px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-normal);
  }
  
  .header-nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .nav-link {
    width: 100%;
    text-align: center;
    padding: 12px;
  }
  
  .mobile-toggle {
    display: flex;
  }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  min-height: 100vh;
  padding: calc(var(--header-height) + 60px) 24px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  width: fit-content;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--brand-green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-title-line {
  display: block;
}

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

.hero-description {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient-brand);
  color: white;
  box-shadow: var(--shadow-glow-green);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(63, 185, 80, 0.3);
  color: white;
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--brand-green);
  color: var(--text-primary);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand-green);
  font-family: 'JetBrains Mono', monospace;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-default);
}

/* Hero Visual - Terminal */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.terminal-window {
  width: 100%;
  max-width: 500px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow-green);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-default);
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.terminal-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #f85149; }
.dot.yellow { background: #d29922; }
.dot.green { background: #3fb950; }

.terminal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
}

.terminal-body {
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.8;
}

.terminal-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.prompt {
  color: var(--brand-green);
  font-weight: 600;
}

.command {
  color: var(--text-primary);
}

.typing {
  border-right: 2px solid var(--brand-green);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { border-color: var(--brand-green); }
  51%, 100% { border-color: transparent; }
}

.terminal-line.output {
  color: var(--brand-cyan);
}

.output-label {
  color: var(--text-muted);
}

.output-cmd {
  background: var(--bg-tertiary);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}

.terminal-line.success {
  color: var(--brand-green);
}

.success-icon {
  font-weight: bold;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
    padding-top: calc(var(--header-height) + 40px);
  }
  
  .hero-content {
    align-items: center;
  }
  
  .hero-description {
    max-width: 100%;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .hero-visual {
    order: -1;
  }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.main-content {
  padding-bottom: 80px;
}

.section {
  padding: var(--section-padding) 24px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.section-alt {
  background: var(--bg-secondary);
  max-width: 100%;
  padding-left: 24px;
  padding-right: 24px;
}

.section-alt > * {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  margin-bottom: 40px;
  text-align: center;
}

.section-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--gradient-glow);
  border: 1px solid var(--border-default);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-green);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
}

.section-description {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto 40px;
  text-align: center;
}

/* ==========================================================================
   INTRO / WHAT SECTION
   ========================================================================== */
.intro-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: center;
}

.intro-text .lead {
  font-size: 20px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.intro-text p {
  color: var(--text-secondary);
  font-size: 16px;
}

.feature-icon-large {
  display: flex;
  justify-content: center;
}

.feature-icon-large img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(63, 185, 80, 0.3));
}

@media (max-width: 768px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .feature-icon-large {
    order: -1;
  }
  
  .feature-icon-large img {
    width: 150px;
    height: 150px;
  }
}

/* ==========================================================================
   AUDIENCE SECTION
   ========================================================================== */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.audience-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition-normal);
}

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

.audience-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.audience-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.audience-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ==========================================================================
   OFFERING TABLE
   ========================================================================== */
.offering-table {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.offering-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  border-bottom: 1px solid var(--border-default);
}

.offering-row:last-child {
  border-bottom: none;
}

.offering-header {
  background: var(--bg-tertiary);
}

.offering-header .offering-cell {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.offering-cell {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}

.offering-cell:first-child {
  background: var(--bg-tertiary);
  font-weight: 500;
}

.offering-icon {
  font-size: 20px;
}

@media (max-width: 600px) {
  .offering-row {
    grid-template-columns: 1fr;
  }
  
  .offering-cell:first-child {
    border-bottom: 1px solid var(--border-muted);
  }
}

/* ==========================================================================
   FEATURES GRID
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-normal);
}

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

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--gradient-glow);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--brand-green);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ==========================================================================
   COMPONENTS SECTION
   ========================================================================== */
.components-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.component-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: all var(--transition-normal);
}

.component-card:hover {
  border-color: var(--brand-green);
}

.component-number {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 48px;
  font-weight: 800;
  color: var(--bg-elevated);
  line-height: 1;
}

.component-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--brand-cyan);
}

.component-card > p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.component-example {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
}

.example-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.example-query {
  color: var(--text-secondary);
  font-size: 13px;
  font-style: italic;
  margin-bottom: 12px;
}

.example-result {
  background: var(--bg-primary);
  padding: 12px;
  border-radius: var(--radius-sm);
}

.example-result code {
  background: transparent;
  padding: 0;
  font-size: 14px;
}

.component-specs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spec {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.spec-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 80px;
}

.spec-value {
  color: var(--text-primary);
  font-size: 14px;
}

.script-types {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.script-type {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.script-icon {
  font-size: 24px;
}

.script-type div {
  display: flex;
  flex-direction: column;
}

.script-type strong {
  font-size: 14px;
  color: var(--text-primary);
}

.script-type span {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   WORKFLOW SECTION
   ========================================================================== */
.workflow-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.workflow-step {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--gradient-brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
}

.step-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-content code {
  font-size: 12px;
}

.step-arrow {
  display: none;
}

@media (max-width: 900px) {
  .workflow-container {
    grid-template-columns: 1fr;
  }
  
  .workflow-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
  }
  
  .step-number {
    flex-shrink: 0;
    margin-bottom: 0;
  }
}

/* ==========================================================================
   CAPABILITIES SECTION
   ========================================================================== */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.capability-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.capability-item:hover {
  border-color: var(--brand-green);
  background: var(--bg-tertiary);
}

.capability-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.capability-text h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.capability-text p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ==========================================================================
   DIAGRAMS SECTION
   ========================================================================== */
.diagrams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 24px;
}

.diagram-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
}

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

.diagram-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: #1a1e24;
}

.diagram-label {
  display: block;
  padding: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  border-top: 1px solid var(--border-default);
  background: var(--bg-secondary);
}

/* For wider diagrams - full width option */
.diagrams-grid.full-width {
  grid-template-columns: 1fr;
}

.diagrams-grid.full-width .diagram-card img {
  max-height: 500px;
  object-fit: contain;
  margin: 0 auto;
}

/* Two-column layout for medium diagrams */
@media (min-width: 900px) {
  .diagrams-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .diagrams-grid {
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
  }
}

@media (max-width: 480px) {
  .diagrams-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   LOGS SECTION
   ========================================================================== */
.logs-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.logs-frame {
  width: 100%;
  min-height: 400px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
}

/* ==========================================================================
   VIDEOS SECTION
   ========================================================================== */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.video-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.video-card iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-green);
}

.contact-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-icon.youtube {
  background: #ff0000;
  color: white;
}

.contact-icon.twitter {
  background: #1da1f2;
  color: white;
}

.contact-icon.email {
  background: var(--gradient-brand);
  color: white;
}

.contact-card span {
  font-weight: 500;
  color: var(--text-primary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-default);
  padding: 40px 24px;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  width: 32px;
  height: 32px;
}

.footer-brand span {
  font-size: 18px;
  font-weight: 700;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--brand-green);
}

/* Visitor Stats Widget */
.visitor-stats-widget {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-default);
}

.visitor-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.visitor-stat-icon {
  font-size: 20px;
}

.visitor-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand-green);
  font-family: 'JetBrains Mono', monospace;
}

.visitor-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 600px) {
  .visitor-stats-widget {
    gap: 24px;
  }
  
  .visitor-stat-value {
    font-size: 20px;
  }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   LOG PANELS - Iframe Log Display
   ========================================================================== */
.logs-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.log-frame-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.log-frame-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-default);
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-blue);
}

.log-iframe {
  width: 100%;
  height: 500px;
  border: none;
  background: #000;
}

@media (max-width: 600px) {
  .logs-container {
    grid-template-columns: 1fr;
  }
  
  .log-iframe {
    height: 400px;
  }
}

/* ==========================================================================
   COOKIE CONSENT BANNER & MODAL
   ========================================================================== */

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(18, 24, 32, 0.98) 0%, rgba(10, 15, 20, 0.99) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-default);
  padding: 20px;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
  min-width: 280px;
}

.cookie-banner-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Cookie Buttons */
.cookie-btn {
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  white-space: nowrap;
}

.cookie-btn-settings {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.cookie-btn-settings:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--brand-blue);
}

.cookie-btn-deny {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.cookie-btn-deny:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.cookie-btn-accept {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 214, 143, 0.3);
}

.cookie-btn-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 214, 143, 0.4);
}

/* Cookie Modal Overlay */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

/* Cookie Modal */
.cookie-modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-default);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-modal-overlay.show .cookie-modal {
  transform: scale(1) translateY(0);
}

.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border-default);
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

.cookie-modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.cookie-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-modal-close:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #fff;
}

.cookie-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.cookie-intro {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 24px;
}

.cookie-learn-more {
  color: var(--brand-blue);
  text-decoration: none;
  margin-left: 4px;
}

.cookie-learn-more:hover {
  text-decoration: underline;
}

/* Cookie Categories */
.cookie-category {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  border: 1px solid var(--border-default);
  overflow: hidden;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.cookie-category-header:hover {
  background: var(--bg-elevated);
}

.cookie-category-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.cookie-category-check.cookie-optional {
  background: var(--accent-red);
}

.cookie-category-check.cookie-optional.active {
  background: var(--brand-green);
}

.cookie-category-title {
  flex: 1;
  font-weight: 600;
  color: var(--text-primary);
}

.cookie-category-arrow {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.cookie-category-arrow.open {
  transform: rotate(180deg);
}

.cookie-category-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--bg-secondary);
  padding: 0 16px;
}

.cookie-category-content.open {
  max-height: 400px;
  padding: 16px;
  border-top: 1px solid var(--border-default);
}

.cookie-category-content h4 {
  color: var(--text-primary);
  font-size: 15px;
  margin-bottom: 8px;
}

.cookie-category-content p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.cookie-affected {
  font-size: 13px;
  color: var(--text-muted);
}

.cookie-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}

.cookie-list li {
  color: var(--text-secondary);
  font-size: 13px;
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.cookie-list li::before {
  content: "•";
  color: var(--brand-green);
  position: absolute;
  left: 0;
}

/* Cookie Toggle Switch */
.cookie-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.cookie-toggle-label {
  color: var(--text-muted);
  font-size: 13px;
}

.cookie-toggle {
  position: relative;
  width: 52px;
  height: 28px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-elevated);
  border-radius: 28px;
  transition: all var(--transition-normal);
  border: 1px solid var(--border-default);
}

.cookie-toggle-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: all var(--transition-normal);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: var(--brand-green);
  border-color: var(--brand-green-dark);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
  transform: translateX(24px);
  background: #fff;
}

.cookie-modal-footer {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--border-default);
  background: var(--bg-tertiary);
  justify-content: flex-end;
}

/* Responsive Cookie Styles */
@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-banner-actions {
    width: 100%;
    justify-content: center;
  }
  
  .cookie-btn {
    flex: 1;
    min-width: 120px;
  }
  
  .cookie-modal {
    max-height: 90vh;
    margin: 10px;
  }
  
  .cookie-modal-footer {
    flex-direction: column;
  }
  
  .cookie-modal-footer .cookie-btn {
    width: 100%;
  }
}

/* ==========================================================================
   ENHANCED VISUAL EFFECTS
   ========================================================================== */

/* Enhanced card hover effects */
.feature-card,
.component-card,
.audience-card,
.capability-item {
  background: var(--gradient-card);
  border: 1px solid var(--border-default);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before,
.component-card::before,
.audience-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.feature-card:hover::before,
.component-card:hover::before,
.audience-card:hover::before {
  opacity: 1;
}

.feature-card:hover,
.component-card:hover,
.audience-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 214, 143, 0.3);
  box-shadow: var(--shadow-card-hover);
}

/* Enhanced section backgrounds */
.section-alt {
  background: var(--gradient-section-alt);
  position: relative;
}

.section-alt::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 800px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-highlight) 50%, transparent 100%);
}

/* Enhanced hero badge */
.hero-badge {
  background: linear-gradient(135deg, rgba(0, 214, 143, 0.15) 0%, rgba(0, 149, 255, 0.15) 100%);
  border: 1px solid rgba(0, 214, 143, 0.3);
  box-shadow: 0 0 20px rgba(0, 214, 143, 0.1);
}

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

/* Enhanced stats */
.stat-value {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Enhanced buttons */
.btn-primary {
  background: var(--gradient-brand);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-brand-hover);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: -1;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 214, 143, 0.3), 0 0 0 1px rgba(0, 214, 143, 0.2);
}

/* Enhanced workflow steps */
.workflow-step {
  position: relative;
}

.workflow-step::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.workflow-step:hover::after {
  transform: scaleX(1);
}

/* Enhanced component numbers */
.component-number {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.9;
}

/* Enhanced contact cards */
.contact-card {
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 0;
}

.contact-card:hover::before {
  opacity: 0.1;
}

/* Animated background grid enhancement */
.bg-grid {
  background-image: 
    linear-gradient(rgba(0, 214, 143, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 214, 143, 0.03) 1px, transparent 1px);
}

/* Enhanced glows */
.bg-glow-1 {
  background: radial-gradient(ellipse at center, rgba(0, 214, 143, 0.15) 0%, transparent 70%);
}

.bg-glow-2 {
  background: radial-gradient(ellipse at center, rgba(0, 149, 255, 0.12) 0%, transparent 70%);
}

/* RTL Support for Cookie Modal */
html[dir="rtl"] .cookie-banner-content {
  flex-direction: row-reverse;
}

html[dir="rtl"] .cookie-category-header {
  flex-direction: row-reverse;
}

html[dir="rtl"] .cookie-toggle-row {
  flex-direction: row-reverse;
}

html[dir="rtl"] .cookie-modal-footer {
  flex-direction: row-reverse;
}

html[dir="rtl"] .cookie-list li {
  padding-left: 0;
  padding-right: 16px;
}

html[dir="rtl"] .cookie-list li::before {
  left: auto;
  right: 0;
}
