/* ============================================================
   ENKAURA — World-Class IT Solutions Website
   Complete Stylesheet
   ============================================================ */

/* ─── Arabic Loading Flash Prevention ─── */
html.lang-loading > body { visibility: hidden; }
html.lang-loading > body > .loader { visibility: visible; }

/* ─── CSS Custom Properties ─── */
:root {
  /* Background */
  --bg-primary: #050a15;
  --bg-secondary: #0a1628;
  --bg-tertiary: #0f1d35;
  --bg-card: rgba(13, 27, 55, 0.6);
  
  /* Text */
  --text-primary: #e8edf5;
  --text-secondary: #b8c5d6;
  --text-muted: #7a8da6;
  
  /* Brand Blues (from Enkaura logo gradient) */
  --accent-1: #1a7aab;   /* deep brand */
  --accent-2: #2e9dd4;   /* medium brand */
  --accent-3: #3ab4e9;   /* brand left */
  --accent-4: #32d0e9;   /* brand mid */
  --accent-5: #2aebeb;   /* brand right */
  --brand-gradient: linear-gradient(90deg, #3ab4e9, #2aebeb);
  
  /* Forge orange */
  --forge-orange: #FF6D00;
  --forge-glow: rgba(255, 109, 0, 0.3);
  
  /* Glow effects */
  --glow-sm: 0 0 10px rgba(58, 180, 233, 0.15);
  --glow-md: 0 0 20px rgba(58, 180, 233, 0.2);
  --glow-lg: 0 0 40px rgba(58, 180, 233, 0.25);
  --glow-xl: 0 0 60px rgba(58, 180, 233, 0.3);
  
  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-hover: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(58, 180, 233, 0.3);
  
  /* Layout */
  --nav-height: 80px;
  --container-max: 1400px;
  --section-padding: 120px;
  
  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.2s var(--ease-out-quart);
  --transition-med: 0.4s var(--ease-out-expo);
  --transition-slow: 0.8s var(--ease-out-expo);
}

/* ─── Light Mode Overrides ─── */
[data-theme="light"] {
  /* Background */
  --bg-primary: #f5f7fb;
  --bg-secondary: #eaeff6;
  --bg-tertiary: #dfe5ef;
  --bg-card: rgba(255, 255, 255, 0.75);

  /* Text */
  --text-primary: #141b2d;
  --text-secondary: #475569;
  --text-muted: #64748b;

  /* Brand Blues — slightly deeper for white backgrounds */
  --accent-1: #1a6d9a;
  --accent-2: #2589be;
  --accent-3: #2e9dd4;
  --accent-4: #2193c5;
  --accent-5: #1eb5c0;

  /* Glow effects — muted for light */
  --glow-sm: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 8px rgba(46, 157, 212, 0.08);
  --glow-md: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 16px rgba(46, 157, 212, 0.1);
  --glow-lg: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 24px rgba(46, 157, 212, 0.1);
  --glow-xl: 0 6px 24px rgba(0, 0, 0, 0.1), 0 0 32px rgba(46, 157, 212, 0.1);

  /* Glass — darker tint on light bg */
  --glass-bg: rgba(0, 0, 0, 0.03);
  --glass-bg-hover: rgba(0, 0, 0, 0.06);
  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-border-hover: rgba(46, 157, 212, 0.4);
}

/* Light mode — nav background */
[data-theme="light"] .nav::before {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .footer {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, transparent 100%);
  border-top-color: rgba(0, 0, 0, 0.08);
}

/* Light mode — mobile nav */
[data-theme="light"] .nav-links {
  background: #ffffff;
}

/* Light mode — dropdown panel */
[data-theme="light"] .dropdown-menu {
  background: #ffffff;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

/* Light mode — loading screen */
[data-theme="light"] .loader {
  background: var(--bg-primary);
}

/* Light mode — cursor glow */
[data-theme="light"] .cursor-glow {
  background: radial-gradient(circle, rgba(46, 157, 212, 0.1), transparent 70%);
}

/* Light mode — glow orbs — soft colored ambient blobs */
[data-theme="light"] .glow-orb {
  opacity: 0.22;
  mix-blend-mode: multiply;
  filter: blur(0px);
}

/* Light mode — hide grid lines */
[data-theme="light"] .grid-bg {
  display: none;
}

/* Light mode — noise overlay */
[data-theme="light"] .noise { opacity: 0.02; }

/* Light mode — three.js particles visible as soft dark specks */
[data-theme="light"] #three-canvas {
  opacity: 0.9;
  mix-blend-mode: multiply;
  filter: saturate(1.6) brightness(0.75);
}

/* Light mode — tier card number watermark */
[data-theme="light"] .tier-card-number { color: var(--text-muted); }

/* Light mode — table headers */
[data-theme="light"] .comparison-table thead th {
  background: rgba(234, 239, 246, 0.9);
}
[data-theme="light"] .comparison-table tbody td:first-child {
  background: rgba(245, 247, 251, 0.95);
}

/* Light mode — scrollbar */
[data-theme="light"]::-webkit-scrollbar-track { background: var(--bg-primary); }
[data-theme="light"]::-webkit-scrollbar-thumb { background: #c0cfe0; }
[data-theme="light"]::-webkit-scrollbar-thumb:hover { background: #a0b4cc; }

/* Light mode — selection */
[data-theme="light"] ::selection {
  background: var(--accent-3);
  color: #ffffff;
}

/* Light mode — tracking metric bg */
[data-theme="light"] .tracking-metric {
  background: rgba(0, 0, 0, 0.02);
}

/* Light mode — logo glow */
[data-theme="light"] .logo-icon {
  box-shadow: 0 1px 6px rgba(46, 157, 212, 0.15);
}
[data-theme="light"] .logo-img {
  filter: drop-shadow(0 1px 3px rgba(46, 157, 212, 0.2));
}
[data-theme="light"] .nav-logo:hover .logo-icon {
  box-shadow: 0 0 16px rgba(46, 157, 212, 0.35), 0 0 32px rgba(46, 157, 212, 0.15);
}

/* Light mode — pipeline/timeline hover subtle bg */
[data-theme="light"] .pipeline-stage:hover {
  background: rgba(46, 157, 212, 0.04);
}
[data-theme="light"] .comparison-table tbody tr:hover {
  background: rgba(46, 157, 212, 0.04);
}
[data-theme="light"] .hardware-table tr:hover td {
  background: rgba(46, 157, 212, 0.04);
}

/* Light mode — form select arrow */
[data-theme="light"] .form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23475569' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
}

/* Light mode — pipeline travel dots & orbital dots */
[data-theme="light"] .pipeline-travel-dot {
  box-shadow: 0 0 14px var(--accent-3), 0 0 28px rgba(46, 157, 212, 0.4);
}

[data-theme="light"] .orbital-dot-1 {
  box-shadow: 0 0 10px var(--accent-3), 0 0 20px rgba(46, 157, 212, 0.35);
}
[data-theme="light"] .orbital-dot-2 {
  box-shadow: 0 0 8px var(--accent-5), 0 0 16px rgba(30, 181, 192, 0.35);
}
[data-theme="light"] .orbital-dot-3 {
  box-shadow: 0 0 8px var(--accent-4), 0 0 16px rgba(33, 147, 197, 0.35);
}

/* Light mode — timeline/pipeline dots hover glow */
[data-theme="light"] .timeline-item:hover .timeline-dot,
[data-theme="light"] .timeline-item.expanded .timeline-dot {
  box-shadow: 0 0 16px rgba(46, 157, 212, 0.35), 0 0 32px rgba(46, 157, 212, 0.15);
}
[data-theme="light"] .pipeline-stage:hover .pipeline-icon {
  box-shadow: 0 0 20px rgba(46, 157, 212, 0.4), 0 0 40px rgba(46, 157, 212, 0.2);
}

/* Light mode — CSS particles fallback — darker for visibility */
[data-theme="light"] .particle {
  background: var(--accent-2);
  opacity: 0;
}

/* Light mode — page transition cols */
[data-theme="light"] .page-transition .col {
  background: var(--accent-3);
}

/* Light mode — marquee dots visible */
[data-theme="light"] .marquee-item .sep {
  box-shadow: 0 0 6px rgba(46, 157, 212, 0.5);
}

/* Light mode — hero badge dot */
[data-theme="light"] .hero-badge .dot {
  box-shadow: 0 0 0 0 rgba(46, 157, 212, 0.4);
}

/* Light mode — tier card hover radial */
[data-theme="light"] .tier-card::after {
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(46, 157, 212, 0.08), transparent 60%);
}

/* Light mode — dropdown item icon hover */
[data-theme="light"] .dropdown-item:hover .dropdown-item-icon {
  box-shadow: 0 0 12px rgba(46, 157, 212, 0.3);
}

/* ─── Nav Toggle Group (Search + Theme) ─── */
.nav-toggle-group {
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--glass-border);
  border-radius: 0;
  margin-left: -1px;
  background: var(--glass-bg);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  color: var(--accent-4);
  z-index: 1;
}

.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--glass-border);
  border-radius: 0 10px 10px 0;
  margin-left: -1px;
  background: var(--glass-bg);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.lang-toggle:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  color: var(--accent-4);
  z-index: 1;
}

.lang-toggle svg {
  width: 18px;
  height: 18px;
}

.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--glass-border);
  border-radius: 10px 0 0 10px;
  background: var(--glass-bg);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.search-toggle:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  color: var(--accent-4);
}

.search-toggle svg {
  width: 18px;
  height: 18px;
}

.search-toggle.active {
  background: var(--glass-bg-hover);
  border-color: var(--accent-4);
  color: var(--accent-4);
}

/* ─── Search Overlay ─── */
.search-overlay {
  position: fixed;
  top: calc(var(--nav-height) + var(--banner-height, 0px));
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  justify-content: center;
  padding: 1.5rem 2rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.search-overlay.open {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.search-container {
  width: 100%;
  max-width: 560px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 24px rgba(58, 180, 233, 0.08);
  overflow: hidden;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.2rem;
  gap: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
}

.search-input-wrap svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-size: 0.95rem;
  font-family: var(--font-primary);
  color: var(--text-primary);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-shortcut {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  border-radius: 5px;
  padding: 0.15rem 0.4rem;
  flex-shrink: 0;
}

.search-results {
  max-height: 340px;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.search-results:empty {
  display: none;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
  color: var(--text-primary);
}

.search-result-item:hover,
.search-result-item.active {
  background: rgba(58, 180, 233, 0.08);
  color: var(--text-primary);
}

.search-result-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(58, 180, 233, 0.12), rgba(42, 235, 235, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.search-result-text {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.search-result-title mark {
  background: none;
  color: var(--accent-4);
  font-weight: 700;
}

.search-result-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-3);
  background: rgba(58, 180, 233, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.search-empty {
  padding: 2rem 1.2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-backdrop {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(5, 10, 21, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.search-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

[data-theme="light"] .search-container {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .search-backdrop {
  background: rgba(255, 255, 255, 0.4);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.4s var(--ease-spring), opacity 0.3s ease;
  position: absolute;
}

.theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

@media (max-width: 768px) {
  .nav-toggle-group {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 100;
    margin-left: 0;
  }
  .search-toggle {
    width: 44px;
    height: 44px;
    border-radius: 14px 0 0 14px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    box-shadow: var(--glow-sm);
    border-right: none;
  }
  .theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 0 14px 14px 0;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    box-shadow: var(--glow-sm);
    border-left: none;
  }
}

/* Hide language & theme toggles on mobile (kept in DOM for later use).
   Search button stays visible — only the icon changes when it's alone. */
@media (max-width: 768px) {
  .theme-toggle,
  .lang-toggle { display: none !important; }

  /* Nav group and search button remain visible */
  .nav-toggle-group { display: flex !important; }
  .search-toggle {
    display: flex !important;
    /* Fully rounded when theme-toggle is hidden next to it */
    border-radius: 14px !important;
    border: 1px solid var(--glass-border) !important;
  }
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color 0.4s ease, color 0.4s ease;
}

::selection {
  background: var(--accent-3);
  color: #050a15;
}

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

a:hover {
  color: var(--accent-5);
}

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

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
}

.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Prevent background-clip from shearing the right edge and descenders of gradient text */
  padding: 0 0.08em 0.12em 0;
  text-rendering: geometricPrecision;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-3);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--accent-3);
}

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

.section {
  padding: var(--section-padding) 0;
  position: relative;
}

/* ─── Canvas Background ─── */
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ─── Page Transition Overlay ─── */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  pointer-events: none;
  display: flex;
}

.page-transition .col {
  flex: 1;
  background: var(--accent-1);
  transform: scaleY(0);
  transform-origin: bottom;
}

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: var(--banner-height, 0px);
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
  display: flex;
  align-items: center;
}

.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 21, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  opacity: 1;
  transition: none;
}

.nav.scrolled::before {
  opacity: 1;
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 0.5rem 0 0.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  position: absolute;
  left: 0.5rem;
  z-index: 2;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 10px;
  transition: background var(--transition-fast);
}

.nav-logo:hover {
  background: transparent;
  color: var(--text-primary);
}

.logo-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: transparent;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(58, 180, 233, 0.2);
  position: relative;
  perspective: 600px;
  transition: box-shadow 0.4s var(--ease-out-expo), border-radius 0.4s ease;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  backface-visibility: hidden;
  filter: drop-shadow(0 0 4px rgba(58, 180, 233, 0.3));
  transition: transform 0.5s var(--ease-spring), filter 0.4s ease;
  transform: rotateY(0deg);
}

.logo-icon .icon-home {
  width: 18px;
  height: 18px;
  position: absolute;
  backface-visibility: hidden;
  transition: transform 0.5s var(--ease-spring);
  transform: rotateY(180deg);
  color: #3ab4e9;
  filter: drop-shadow(0 0 4px rgba(58, 180, 233, 0.4));
}

.nav-logo:hover .logo-icon {
  box-shadow: 0 0 24px rgba(42, 235, 235, 0.6), 0 0 48px rgba(58, 180, 233, 0.2);
  border-radius: 50%;
}

.nav-logo:hover .logo-img {
  transform: rotateY(-180deg);
}

.nav-logo:hover .logo-icon .icon-home {
  transform: rotateY(0deg);
}

/* Logo hover ring pulse */
.logo-icon::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid var(--accent-5);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.4s var(--ease-spring);
}

.nav-logo:hover .logo-icon::after {
  opacity: 0.7;
  transform: scale(1.15);
  animation: ring-breathe 1.2s ease-in-out infinite;
}

@keyframes ring-breathe {
  0%, 100% { transform: scale(1.15); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 0.3; }
}

/* Logo text hover — glitch-reveal */
.nav-logo .logo-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  transition: letter-spacing 0.4s var(--ease-out-expo);
}

.nav-logo .logo-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  transition: letter-spacing 0.4s var(--ease-out-expo);
}

.nav-logo:hover .logo-text {
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, var(--accent-5), var(--accent-3), var(--accent-5));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: logo-color-sweep 0.8s ease forwards;
}

/* Underline beam on hover */
.nav-logo .logo-text::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-5), transparent);
  transform: scaleX(0);
  transition: transform 0.5s var(--ease-out-expo);
  transform-origin: left;
}

.nav-logo:hover .logo-text::after {
  transform: scaleX(1);
}

@keyframes logo-color-sweep {
  0% { background-position: 200% 0; }
  100% { background-position: 0% 0; }
}

/* Remove old sparkle pseudo-elements — replaced by ring pulse */
.nav-logo::before,
.nav-logo::after {
  content: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--glass-bg-hover);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent-3);
  border-radius: 1px;
}

.nav-cta {
  padding: 0.65rem 1.5rem !important;
  background: var(--brand-gradient) !important;
  color: white !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  font-size: 0.95rem !important;
  cursor: pointer !important;
  box-shadow: var(--glow-md);
  transition: all var(--transition-fast) !important;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--glow-lg) !important;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all var(--transition-fast);
}

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


/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 12px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.1));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

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

.btn-primary {
  background: var(--brand-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(58, 180, 233, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(42, 235, 235, 0.4);
  color: white;
}

.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  color: var(--text-primary);
}

.btn-icon {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.btn:hover .btn-icon {
  transform: translateX(3px);
}


/* ─── Footer ─── */
.footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--glass-border);
  position: relative;
  z-index: 2;
  margin-top: 4rem;
  background: linear-gradient(90deg, transparent 0%, rgba(5, 10, 21, 0.95) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

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

.footer-brand {
  max-width: 380px;
}

.footer-brand .nav-logo {
  position: relative;
  left: auto;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-col h4 {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--accent-4);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-legal a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.footer-legal a:hover {
  color: var(--accent-4);
}

.footer-legal-sep {
  color: var(--glass-border-hover);
  font-size: 0.7rem;
  user-select: none;
}

/* ─── Footer Contact Section ─── */
.footer-contact {
  margin-top: 1.25rem;
}

.footer-contact-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.footer-contact-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-email-form {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.footer-email-input {
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  font-family: var(--font-primary);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  outline: none;
  width: 340px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.footer-email-input::placeholder {
  color: var(--text-muted);
}

.footer-email-input:focus {
  border-color: var(--accent-4);
  background: rgba(255, 255, 255, 0.08);
}

.footer-email-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-family: var(--font-primary);
  font-weight: 600;
  color: #fff;
  background: var(--brand-gradient);
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  transition: filter var(--transition-fast);
  white-space: nowrap;
  min-height: 0 !important;
  min-width: 0 !important;
  align-self: stretch;
}

.footer-email-btn:hover {
  filter: brightness(1.15);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  transition: border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.footer-social-link .social-icon,
.footer-social-link .enkaura-social-logo {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-social-link:hover .social-icon,
.footer-social-link:hover .enkaura-social-logo {
  transform: rotate(360deg);
}

/* Reverse spin on mouse leave — handled by removing hover state, 
   CSS transitions naturally animate back to 0deg */
.footer-social-link[aria-label="Facebook"]:hover {
  border-color: #1877F2;
  color: #1877F2;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}
.footer-social-link[aria-label="YouTube"]:hover {
  border-color: #FF0000;
  color: #FF0000;
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}
.footer-social-link[aria-label="Instagram"]:hover {
  border-color: #E4405F;
  color: #E4405F;
  box-shadow: 0 4px 12px rgba(228, 64, 95, 0.3);
}
.footer-social-link[aria-label="WhatsApp"]:hover {
  border-color: #25D366;
  color: #25D366;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}
.footer-social-link[aria-label="X"]:hover {
  border-color: #fff;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}
[data-theme="light"] .footer-social-link[aria-label="X"]:hover {
  border-color: #000;
  color: #000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.footer-social-link[aria-label="Enkaura Community"]:hover {
  border-color: var(--accent-3);
  box-shadow: 0 4px 12px rgba(58, 180, 233, 0.3);
}

/* Enkaura logo in social links — theme-aware with blue hover swap */
.footer-social-link .enkaura-social-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  position: absolute;
  transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.footer-social-link .enkaura-logo-dark { opacity: 1; }
.footer-social-link .enkaura-logo-light { opacity: 0; }
.footer-social-link .enkaura-logo-hover { opacity: 0; }
[data-theme="light"] .footer-social-link .enkaura-logo-dark { opacity: 0; }
[data-theme="light"] .footer-social-link .enkaura-logo-light { opacity: 1; }

/* On hover, show the blue brand logo, hide the others */
.footer-social-link:hover .enkaura-logo-dark { opacity: 0; }
.footer-social-link:hover .enkaura-logo-light { opacity: 0; }
.footer-social-link:hover .enkaura-logo-hover { opacity: 1; }

/* Social media icons — theme-aware with brand color hover swap */
.footer-social-link .social-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  position: absolute;
  transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.footer-social-link .social-icon-dark { opacity: 1; }
.footer-social-link .social-icon-light { opacity: 0; }
.footer-social-link .social-icon-hover { opacity: 0; }
[data-theme="light"] .footer-social-link .social-icon-dark { opacity: 0; }
[data-theme="light"] .footer-social-link .social-icon-light { opacity: 1; }
.footer-social-link:hover .social-icon-dark { opacity: 0; }
.footer-social-link:hover .social-icon-light { opacity: 0; }
.footer-social-link:hover .social-icon-hover { opacity: 1; }
[data-theme="light"] .footer-social-link[aria-label="X"]:hover .social-icon-hover {
  filter: invert(1);
}

[data-theme="light"] .footer-email-input {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .footer-email-input:focus {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .footer-social-link {
  border-color: rgba(0, 0, 0, 0.1);
}


/* ─── Scroll Animations ─── */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate="fade-left"] {
  transform: translateX(-30px);
}

[data-animate="fade-left"].visible {
  transform: translateX(0);
}

[data-animate="fade-right"] {
  transform: translateX(30px);
}

[data-animate="fade-right"].visible {
  transform: translateX(0);
}

[data-animate="scale"] {
  transform: scale(0.9);
}

[data-animate="scale"].visible {
  transform: scale(1);
}

/* Staggered children */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

[data-stagger].visible > *:nth-child(1) { transition-delay: 0.05s; }
[data-stagger].visible > *:nth-child(2) { transition-delay: 0.1s; }
[data-stagger].visible > *:nth-child(3) { transition-delay: 0.15s; }
[data-stagger].visible > *:nth-child(4) { transition-delay: 0.1s; }
[data-stagger].visible > *:nth-child(5) { transition-delay: 0.25s; }
[data-stagger].visible > *:nth-child(6) { transition-delay: 0.3s; }
[data-stagger].visible > *:nth-child(7) { transition-delay: 0.35s; }
[data-stagger].visible > *:nth-child(8) { transition-delay: 0.4s; }
[data-stagger].visible > *:nth-child(9) { transition-delay: 0.45s; }

[data-stagger].visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* JS adds this class on small screens/reduced-motion to avoid reveal flicker. */
.reveal-no-anim [data-animate],
.reveal-no-anim [data-stagger] > *,
.reveal-no-anim .tier-card,
.reveal-no-anim .value-card {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}


/* ─── Floating Particles (CSS fallback) ─── */
.particles-css {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent-3);
  border-radius: 50%;
  opacity: 0;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) scale(1);
  }
}


/* ─── Ambient glow orbs ─── */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.glow-orb-1 {
  width: 600px;
  height: 600px;
  background: var(--accent-2);
  top: -10%;
  right: -10%;
  animation: orbit-1 20s ease-in-out infinite;
}

.glow-orb-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-3);
  bottom: -10%;
  left: -5%;
  animation: orbit-2 25s ease-in-out infinite;
}

.glow-orb-3 {
  width: 300px;
  height: 300px;
  background: var(--accent-5);
  top: 50%;
  left: 40%;
  animation: orbit-3 30s ease-in-out infinite;
}

@keyframes orbit-1 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-50px, 80px); }
  50% { transform: translate(-100px, 30px); }
  75% { transform: translate(-30px, -50px); }
}

@keyframes orbit-2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(70px, -60px); }
  66% { transform: translate(30px, -100px); }
}

@keyframes orbit-3 {
  0%, 100% { transform: translate(0, 0); opacity: 0.08; }
  50% { transform: translate(-80px, 60px); opacity: 0.15; }
}


/* ─── Grid lines background ─── */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(58, 180, 233, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 180, 233, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}


/* ─── Loading Screen ─── */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  opacity: 0;
  animation: loader-fade-in 0.6s ease forwards;
}

.loader-bar-track {
  width: 200px;
  height: 2px;
  background: var(--glass-border);
  border-radius: 1px;
  overflow: hidden;
  opacity: 0;
  animation: loader-fade-in 0.6s ease 0.2s forwards;
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-3), var(--accent-5));
  border-radius: 1px;
  animation: loader-progress 1.5s var(--ease-out-expo) 0.4s forwards;
}

@keyframes loader-fade-in {
  to { opacity: 1; }
}

@keyframes loader-progress {
  to { width: 100%; }
}


/* ─── Cursor Glow ─── */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58, 180, 233, 0.04), transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

/* ─── Scroll-to-Top Button ─── */
.scroll-top {
  position: fixed;
  bottom: calc(2rem + 56px + 0.75rem);
  right: calc(2rem + 4px);
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9000;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
  color: var(--accent-4);
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  border-color: var(--accent-3);
  box-shadow: var(--glow-md);
  transform: translateY(-2px);
}


/* ─── Responsive ─── */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px;
  }
  
  .hero-stats {
    gap: 2rem;
  }
  
  .tier-hero-content {
    grid-template-columns: 1fr;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px;
    --nav-height: 64px;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: auto;
    right: -100%;
    transform: none;
    flex: none;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    flex-direction: column;
    background: rgba(5, 10, 21, 0.98);
    backdrop-filter: blur(30px);
    padding: 6rem 2rem 2rem;
    gap: 0.5rem;
    transition: right var(--transition-med);
    border-left: 1px solid var(--glass-border);
  }
  
  .nav-links.open {
    right: 0;
  }
  
  .nav-links a {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    width: 100%;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .tiers-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .tier-card {
    padding: 1.5rem;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}


/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-2);
}


/* ─── Nav Dropdown Menus (Expanding Header) ─── */
.nav-dropdown {
  position: static;
}

.nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dropdown-arrow {
  width: 12px;
  height: 12px;
  transition: transform 0.4s var(--ease-spring);
  opacity: 0.5;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.dropdown-open .dropdown-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

/* Full-width expanding panel below the nav */
.dropdown-menu {
  position: fixed;
  top: calc(var(--nav-height) + var(--banner-height, 0px));
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(5, 10, 21, 0.97);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

/* Top glow line */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-gradient);
  opacity: 0;
  transition: opacity 0.4s ease 0.1s;
}

.nav-dropdown.dropdown-open > .dropdown-menu {
  max-height: 90px;
  opacity: 1;
  pointer-events: auto;
  padding: 1rem 2rem;
  transition: max-height 0.45s var(--ease-out-expo),
              opacity 0.35s var(--ease-out-expo),
              padding 0.45s var(--ease-out-expo);
}

.nav-dropdown.dropdown-open > .dropdown-menu::before {
  opacity: 1;
}

/* Exit animation — items fade up in reverse stagger */
.nav-dropdown.dropdown-closing .dropdown-item {
  opacity: 0;
  transform: translateY(-8px);
  transition-delay: 0s;
}
.nav-dropdown.dropdown-closing .dropdown-item:nth-child(1) {
  transition-delay: 0.06s;
}
.nav-dropdown.dropdown-closing .dropdown-item:nth-child(2) {
  transition-delay: 0.03s;
}
.nav-dropdown.dropdown-closing > .dropdown-menu::before {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Switch animation — smooth crossfade when moving between sub-menus */
.nav-dropdown.dropdown-switching > .dropdown-menu {
  transition: none;
  max-height: 90px;
  opacity: 1;
  pointer-events: auto;
  padding: 1rem 2rem;
}

/* Kill outgoing menu instantly when switching */
.nav-dropdown.dropdown-switch-kill > .dropdown-menu {
  transition: none !important;
  max-height: 0 !important;
  opacity: 0 !important;
  padding: 0 2rem !important;
  pointer-events: none !important;
}
.nav-dropdown.dropdown-switch-kill .dropdown-item {
  transition: none !important;
  opacity: 0 !important;
}

/* Items during switch — kill all transitions so animation is sole driver */
.nav-dropdown.dropdown-switching .dropdown-item {
  transition: none !important;
  transition-delay: 0s !important;
}

/* Right-to-left direction (moving to a menu further right) — slide from right */
.nav-dropdown.dropdown-switching.dropdown-switch-right .dropdown-item {
  animation: dropdown-switch-right 0.35s var(--ease-out-expo) both;
}

/* Left-to-right direction (moving to a menu further left) — slide from left */
.nav-dropdown.dropdown-switching.dropdown-switch-left .dropdown-item {
  animation: dropdown-switch-left 0.35s var(--ease-out-expo) both;
}

.nav-dropdown.dropdown-switching .dropdown-item:nth-child(1) { animation-delay: 0s; }
.nav-dropdown.dropdown-switching .dropdown-item:nth-child(2) { animation-delay: 0.04s; }
.nav-dropdown.dropdown-switching .dropdown-item:nth-child(3) { animation-delay: 0.08s; }
.nav-dropdown.dropdown-switching .dropdown-item:nth-child(4) { animation-delay: 0.12s; }

@keyframes dropdown-switch-right {
  0% { opacity: 0; transform: translateX(20px) scale(0.96); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes dropdown-switch-left {
  0% { opacity: 0; transform: translateX(-20px) scale(0.96); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

/* Dropdown items — inline row */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-secondary) !important;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  white-space: nowrap;
}

/* Staggered entrance */
.nav-dropdown.dropdown-open .dropdown-item {
  opacity: 1;
  transform: translateY(0);
}

.nav-dropdown.dropdown-open .dropdown-item:nth-child(1) {
  transition-delay: 0.06s;
}
.nav-dropdown.dropdown-open .dropdown-item:nth-child(2) {
  transition-delay: 0.12s;
}
.nav-dropdown.dropdown-open .dropdown-item:nth-child(3) {
  transition-delay: 0.18s;
}
.nav-dropdown.dropdown-open .dropdown-item:nth-child(4) {
  transition-delay: 0.24s;
}

.dropdown-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(58, 180, 233, 0.08), rgba(42, 235, 235, 0.03));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 10px;
}

.dropdown-item:hover {
  color: var(--text-primary) !important;
}

.dropdown-item:hover::before {
  opacity: 1;
}

/* Currently-viewed sub-page: show the matching dropdown item as
   selected (visible whenever the user hovers the parent and the
   dropdown is open). Mirrors the active-link treatment on the top
   nav so the user can see exactly which sub-page they're on. */
.dropdown-item.active {
  color: var(--text-primary) !important;
}
.dropdown-item.active::before {
  opacity: 1;
  background: linear-gradient(135deg, rgba(58, 180, 233, 0.18), rgba(42, 235, 235, 0.08));
  border: 1px solid rgba(58, 180, 233, 0.35);
}
.dropdown-item.active .dropdown-item-title {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.dropdown-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(58, 180, 233, 0.12), rgba(42, 235, 235, 0.06));
  border: 1px solid rgba(58, 180, 233, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
  z-index: 1;
}

.dropdown-item:hover .dropdown-item-icon {
  background: var(--brand-gradient);
  border-color: transparent;
  box-shadow: 0 0 16px rgba(58, 180, 233, 0.3);
  transform: scale(1.05);
}

.dropdown-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  position: relative;
  z-index: 1;
}

.dropdown-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.dropdown-item-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.dropdown-item:hover .dropdown-item-desc {
  color: var(--text-secondary);
}

/* Dropdown divider */
.dropdown-divider {
  width: 1px;
  height: auto;
  align-self: stretch;
  background: var(--glass-border);
  margin: 0 0.25rem;
}

/* Mobile dropdown behavior */
@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    width: auto;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    border-left: 2px solid var(--accent-3);
    border-radius: 0 12px 12px 0;
    padding: 0.25rem 0.5rem;
    margin-top: 0.25rem;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    gap: 0;
    transition: max-height 0.4s var(--ease-out-expo), padding 0.3s ease;
  }

  .dropdown-menu::before {
    display: none;
  }

  .nav-dropdown:hover > .dropdown-menu {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    padding: 0;
  }

  .nav-dropdown.mobile-open > .dropdown-menu {
    max-height: 300px;
    opacity: 1;
    pointer-events: auto;
    padding: 0.5rem;
  }

  .dropdown-item {
    opacity: 1;
    transform: none;
    padding: 0.65rem 0.75rem;
  }

  .dropdown-item-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
}


/* ─── Noise Texture Overlay (original) ─── */


/* ─── Cookie Consent Banner ─── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding: 1.5rem 2rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.cookie-banner.visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 280px;
}

.cookie-banner-text h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-banner-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cookie-banner-text a {
  color: var(--accent-4);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.cookie-btn {
  padding: 0.6rem 1.4rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
}

.cookie-btn--accept {
  background: var(--brand-gradient);
  color: #fff;
  border: none;
}

.cookie-btn--accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(58, 180, 233, 0.3);
}

.cookie-btn--reject {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--glass-border-hover);
}

.cookie-btn--reject:hover {
  border-color: var(--accent-4);
  color: var(--accent-4);
}

.cookie-btn--settings {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.6rem 0.5rem;
}

.cookie-btn--settings:hover {
  color: var(--accent-4);
}


/* ─── Cookie Settings Modal ─── */
.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cookie-modal-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}

.cookie-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 10002;
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-modal.visible {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.cookie-modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cookie-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.cookie-modal-close:hover {
  border-color: var(--accent-4);
  color: var(--accent-4);
}

.cookie-modal-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Cookie category items */
.cookie-category {
  padding: 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  margin-bottom: 0.75rem;
  transition: border-color var(--transition-fast);
}

.cookie-category:hover {
  border-color: var(--glass-border-hover);
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.cookie-category-info h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-category-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.3rem;
}

.cookie-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: rgba(58, 180, 233, 0.1);
  color: var(--accent-4);
  border: 1px solid rgba(58, 180, 233, 0.2);
  white-space: nowrap;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--glass-border-hover);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cookie-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--text-primary);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: linear-gradient(135deg, #3ab4e9, #2aebeb);
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-modal-footer {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}


/* ── Top Announcement Banner ── */
.top-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.55rem 2.5rem 0.55rem 1.25rem;
  min-height: 40px;
  background: linear-gradient(135deg, #3ab4e9, #2aebeb);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(.4,0,.2,1), opacity 0.5s ease;
}
.top-banner--enter {
  animation: tb-slideDown 0.6s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes tb-slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.top-banner-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* ── Type Themes ── */
.top-banner--info    { background: linear-gradient(135deg, #3ab4e9, #2aebeb); }
.top-banner--success { background: linear-gradient(135deg, #22c55e, #34d399); }
.top-banner--warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #1a1200; }
.top-banner--warning .top-banner-link,
.top-banner--warning .top-banner-close { color: #1a1200; }
.top-banner--urgent  { background: linear-gradient(135deg, #ef4444, #f87171); }
.top-banner--promo   { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.top-banner--launch  { background: linear-gradient(135deg, #06b6d4, #3b82f6, #8b5cf6); background-size: 200% 200%; animation: tb-bgShift 4s ease infinite; }
@keyframes tb-bgShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ── Size Variants ── */
.top-banner--compact { min-height: 32px; padding: 0.3rem 2.25rem 0.3rem 1rem; font-size: 0.78rem; }
.top-banner--large   { min-height: 56px; padding: 0.8rem 2.75rem 0.8rem 1.5rem; font-size: 0.95rem; }

/* ── Icon ── */
.top-banner-icon {
  font-size: 1.15em;
  flex-shrink: 0;
  line-height: 1;
}

/* ── Text ── */
.top-banner-text {
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.top-banner-link {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  margin-left: 0.35rem;
  transition: opacity 0.2s;
}
.top-banner-link:hover {
  opacity: 0.85;
}

/* ── Close Button ── */
.top-banner-close {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 50%;
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.top-banner-close:hover {
  opacity: 1;
  background: rgba(255,255,255,0.25);
}

/* ── Countdown Timer ── */
.top-banner-countdown {
  display: inline-flex;
  gap: 0.3rem;
  margin-left: 0.6rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.82em;
}
.top-banner-countdown span {
  background: rgba(0,0,0,0.18);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  min-width: 30px;
  text-align: center;
  backdrop-filter: blur(4px);
}

/* ── Animation: Shimmer ── */
@keyframes tb-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}
.top-banner--anim-shimmer::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  animation: tb-shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

/* ── Animation: Pulse Glow ── */
@keyframes tb-pulse {
  0%, 100% { box-shadow: inset 0 0 0 rgba(255,255,255,0); }
  50%      { box-shadow: inset 0 0 40px rgba(255,255,255,0.12), 0 0 20px rgba(255,255,255,0.06); }
}
.top-banner--anim-pulse { animation: tb-pulse 2.5s ease-in-out infinite; }

/* ── Animation: Breathing Glow ── */
@keyframes tb-glow {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.18); }
}
.top-banner--anim-glow { animation: tb-glow 3s ease-in-out infinite; }

/* ── Animation: Rainbow ── */
@keyframes tb-rainbow {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
.top-banner--anim-rainbow { animation: tb-rainbow 8s linear infinite; }

/* ── Animation: Neon Flicker ── */
@keyframes tb-neon {
  0%, 100% { text-shadow: 0 0 6px rgba(255,255,255,0.3); }
  25%      { text-shadow: 0 0 12px rgba(255,255,255,0.5), 0 0 25px rgba(255,255,255,0.2); }
  50%      { text-shadow: 0 0 4px rgba(255,255,255,0.2); }
  75%      { text-shadow: 0 0 18px rgba(255,255,255,0.6), 0 0 40px rgba(255,255,255,0.25); }
}
.top-banner--anim-neon { animation: tb-neon 2s ease-in-out infinite; }

/* ── Animation: Scrolling Text ── */
@keyframes tb-scroll {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
.top-banner--anim-slide .top-banner-text {
  display: inline-block;
  white-space: nowrap;
  animation: tb-scroll 15s linear infinite;
}

/* ── Light mode adjustments ── */
[data-theme="light"] .top-banner {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
[data-theme="light"] .top-banner-countdown span {
  background: rgba(0,0,0,0.1);
}

/* ── RTL adjustments ── */
[dir="rtl"] .top-banner-close {
  right: auto;
  left: 0.75rem;
}
[dir="rtl"] .top-banner-link {
  margin-left: 0;
  margin-right: 0.35rem;
}
[dir="rtl"] .top-banner-countdown {
  margin-left: 0;
  margin-right: 0.6rem;
}
[dir="rtl"] .top-banner--anim-slide .top-banner-text {
  animation-name: tb-scroll-rtl;
}
@keyframes tb-scroll-rtl {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}


/* ── Accessibility: Skip to Content ── */
.skip-to-content {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 99999;
  background: var(--brand-gradient);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 10px 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  opacity: 0;
  transition: top 0.3s, opacity 0.3s;
}
.skip-to-content:focus {
  top: 0;
  opacity: 1;
  outline: 2px solid var(--accent-3);
  outline-offset: 2px;
}


/* ── User Auth Nav Button ── */
.nav-user-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  position: relative;
  flex-shrink: 0;
  margin-left: 0.75rem;
}
.nav-user-btn:hover {
  border-color: var(--accent-3);
  box-shadow: 0 0 12px rgba(58,180,233,0.2);
}
.nav-user-btn.logged-in {
  border-color: var(--accent-3);
}
.nav-user-avatar-letter {
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
}

/* User Dropdown */
.nav-user-dropdown {
  position: fixed;
  top: calc(var(--nav-height, 72px) + var(--banner-height, 0px) + 4px);
  right: 1rem;
  width: 272px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 0;
  z-index: 10002;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px) scale(0.92);
  transform-origin: top right;
  transition: opacity 0.35s cubic-bezier(0.16,1,0.3,1), visibility 0.35s, transform 0.35s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 12px 48px rgba(0,0,0,0.35), 0 0 0 1px rgba(58,180,233,0.08), inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-user-dropdown::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #3ab4e9, #2aebeb, #3ab4e9, transparent);
  opacity: 0;
  transition: opacity 0.4s 0.1s;
}
.nav-user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.nav-user-dropdown.open::before {
  opacity: 1;
}
.nav-user-dropdown-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem 1rem;
  text-align: center;
  position: relative;
  background: transparent;
}
.nav-user-dropdown-header .nav-user-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  opacity: 0;
  transform: scale(0) rotate(-30deg);
  transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.1s, opacity 0.3s 0.1s;
  overflow: hidden;
}
.nav-user-dropdown.open .nav-user-dropdown-header .nav-user-avatar {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
.nav-user-dropdown-header .nav-user-dropdown-display {
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: translateY(6px);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1) 0.2s, opacity 0.3s 0.2s;
}
.nav-user-dropdown.open .nav-user-dropdown-header .nav-user-dropdown-display {
  opacity: 1;
  transform: translateY(0);
}
.nav-user-dropdown-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
  margin: 0;
}
.nav-user-dropdown-items {
  padding: 0.4rem 0.5rem;
}
.nav-user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.25s, transform 0.2s, color 0.25s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
  position: relative;
  opacity: 0;
  transform: translateX(-10px);
}
.nav-user-dropdown.open .nav-user-dropdown-item {
  opacity: 1;
  transform: translateX(0);
}
.nav-user-dropdown.open .nav-user-dropdown-item:nth-child(1) { transition: opacity 0.3s 0.15s, transform 0.35s cubic-bezier(0.16,1,0.3,1) 0.15s, background 0.25s, color 0.25s; }
.nav-user-dropdown.open .nav-user-dropdown-item:nth-child(2) { transition: opacity 0.3s 0.22s, transform 0.35s cubic-bezier(0.16,1,0.3,1) 0.22s, background 0.25s, color 0.25s; }
.nav-user-dropdown.open .nav-user-dropdown-item:nth-child(3) { transition: opacity 0.3s 0.29s, transform 0.35s cubic-bezier(0.16,1,0.3,1) 0.29s, background 0.25s, color 0.25s; }
.nav-user-dropdown-item:hover {
  background: rgba(58,180,233,0.1);
  transform: translateX(2px);
}
.nav-user-dropdown-item:active {
  transform: scale(0.97);
}
.nav-user-dropdown-item svg {
  width: 17px;
  height: 17px;
  opacity: 0.5;
  flex-shrink: 0;
  transition: opacity 0.25s;
}
.nav-user-dropdown-item:hover svg {
  opacity: 1;
}
.nav-user-dropdown-item.nav-user-dropdown-danger {
  color: #ff6b6b;
}
.nav-user-dropdown-item.nav-user-dropdown-danger:hover {
  background: rgba(255,70,70,0.08);
  color: #ff4444;
}

/* Auth Modal (site-wide) — Full-screen split layout */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 10010;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}
.auth-modal.open {
  opacity: 1;
  visibility: visible;
}
.auth-modal-backdrop {
  position: absolute;
  inset: 0;
}
.auth-modal-content {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-primary);
  z-index: 10011;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), opacity 0.35s;
}
.auth-modal.open .auth-modal-content {
  transform: translateY(0);
  opacity: 1;
}
.auth-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 1.6rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  z-index: 2;
}
.auth-modal-close:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  transform: rotate(90deg);
}

/* Left branded panel */
.auth-split-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3.5rem;
  background: linear-gradient(160deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-right: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}
.auth-split-left::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58,180,233,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.auth-split-left::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42,235,235,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}
.auth-brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(58, 180, 233, 0.28);
  background: linear-gradient(145deg, rgba(58, 180, 233, 0.14), rgba(42, 235, 235, 0.08));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(58, 180, 233, 0.16);
}
.auth-brand-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(58, 180, 233, 0.35));
}
.auth-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-hero-title {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}
.auth-hero-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 420px;
}
.auth-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.auth-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.auth-feature svg { flex-shrink: 0; }

/* Right form panel */
.auth-split-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 4rem;
  overflow-y: auto;
  max-height: 100vh;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--glass-border);
}
.auth-tab {
  flex: 1;
  padding: 1rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
  font-family: inherit;
}
.auth-tab:hover { color: var(--text-primary); }
.auth-tab.active {
  color: var(--accent-3);
  border-bottom-color: var(--accent-3);
}

/* Auth Form */
.auth-form-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-field {
  margin-bottom: 0.85rem;
}
.auth-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auth-input {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}
.auth-input:focus { outline: none; border-color: var(--accent-3); box-shadow: 0 0 0 3px rgba(58,180,233,0.15); }
.auth-input.invalid { border-color: #f44; box-shadow: 0 0 0 3px rgba(255,68,68,0.1); }
.auth-input.valid { border-color: #4caf50; }
.auth-hint {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  display: block;
}
.auth-hint.error { color: #f44; }
.auth-error {
  color: #f44;
  font-size: 0.85rem;
  margin: 0 0 1rem;
  padding: 0.7rem 1rem;
  background: rgba(255,68,68,0.08);
  border-radius: 10px;
  min-height: 1.2em;
}
.auth-submit {
  width: 100%;
  padding: 1.1rem;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  background: var(--brand-gradient);
  color: #0a1628;
  font-family: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-top: 0.75rem;
  letter-spacing: 0.02em;
}
.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(58,180,233,0.35);
}
.auth-switch {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.auth-switch a {
  color: var(--accent-3);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.auth-switch a:hover { text-decoration: underline; }
.auth-strength {
  height: 4px;
  border-radius: 2px;
  background: var(--glass-border);
  margin-top: 0.5rem;
  overflow: hidden;
}
.auth-strength-bar {
  height: 100%;
  border-radius: 2px;
  background: var(--glass-border);
  transition: width 0.3s, background 0.3s;
  width: 0;
}
.auth-strength-bar.weak { background: #f44; }
.auth-strength-bar.medium { background: #ff9800; }
.auth-strength-bar.strong { background: #4caf50; }

/* Auth form rows */
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Avatar on divider */
.auth-avatar-divider {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  border-right-color: transparent;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: visible;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 0 14px var(--bg-primary);
}
.auth-avatar-divider:hover,
.auth-avatar-divider:focus-visible {
  border-color: var(--accent-3);
  box-shadow: 0 0 0 14px var(--bg-primary), 0 0 0 17px rgba(58,180,233,0.12);
}
/* Lines extending above and below the avatar, connecting to border-right */
.auth-avatar-divider::before,
.auth-avatar-divider::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  background: var(--glass-border);
  pointer-events: none;
}
.auth-avatar-divider::before {
  bottom: calc(100% + 14px);
  height: 50vh;
}
.auth-avatar-divider::after {
  top: calc(100% + 14px);
  height: 50vh;
}
.auth-avatar-placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}
.auth-avatar-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.auth-avatar-edit {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a1628;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

/* Auth modal responsive */
@media (max-width: 768px) {
  .auth-modal-content {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    overflow-y: auto;
    width: 100%;
    height: 100%;
    height: 100dvh;
  }
  .auth-split-left { display: none; }
  .auth-avatar-divider { display: none; }
  .auth-split-right {
    padding: 5rem 1.5rem 2.5rem;
    max-height: unset;
    min-height: 100%;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
  }
  .auth-modal-close { top: 1rem; right: 1rem; }
  .auth-row { grid-template-columns: 1fr; }
}

/* Profile page */

/* ── Chat Widget ── */
.chat-widget-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-gradient);
  border: none;
  cursor: pointer;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(58,180,233,0.4);
  transition: transform 0.3s, box-shadow 0.3s;
  color: #fff;
}
.chat-widget-btn:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(58,180,233,0.55); }
.chat-widget-btn svg { width: 26px; height: 26px; }
.chat-widget-badge {
  position: absolute; top: -2px; right: -2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #4ade80; border: 2px solid var(--bg-primary);
}
.chat-window {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  width: 370px;
  max-height: 520px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  z-index: 9001;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 48px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.chat-window.open {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}
.chat-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.chat-header-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #4ade80; flex-shrink: 0;
}
.chat-header h4 { margin: 0; font-size: 0.95rem; flex: 1; }
.chat-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.2rem; padding: 0;
  transition: color 0.2s;
}
.chat-close:hover { color: var(--text-primary); }
.chat-maximize {
  background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0;
  display: flex; align-items: center; transition: color 0.2s;
}
.chat-maximize svg { width: 16px; height: 16px; }
.chat-maximize:hover { color: var(--text-primary); }
.chat-fullscreen {
  background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0; margin-left: auto;
  display: flex; align-items: center; transition: color 0.2s;
}
.chat-fullscreen svg { width: 16px; height: 16px; }
.chat-fullscreen:hover { color: var(--text-primary); }

/* Maximized / Fullscreen — smooth animated transitions */
.chat-window {
  transition: bottom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              right 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              max-height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-radius 0.4s ease,
              opacity 0.3s ease,
              transform 0.3s ease;
}
.chat-window.maximized {
  bottom: 1rem; right: 1rem; left: 1rem; top: 1rem;
  width: auto; max-height: none; border-radius: 20px;
}
.chat-window.fullscreen {
  bottom: 0; right: 0; left: 0; top: 0;
  width: 100%; max-height: 100vh; border-radius: 0;
}
.chat-window.maximized .chat-messages,
.chat-window.fullscreen .chat-messages { max-height: none; flex: 1; }

/* Minimizing — shrink back to compact */
.chat-window.minimizing {
  animation: chatMinimize 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes chatMinimize {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  max-height: 340px; min-height: 200px;
}
.chat-msg {
  max-width: 85%; padding: 0.6rem 0.9rem;
  border-radius: 12px; font-size: 0.88rem; line-height: 1.45;
  box-sizing: border-box;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.chat-msg.bot {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  background: var(--brand-gradient);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-input-area {
  padding: 0.75rem;
  border-top: 1px solid var(--glass-border);
  display: flex; gap: 0.5rem;
}
.chat-input {
  flex: 1; border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 0.55rem 0.85rem;
  background: var(--bg-primary); color: var(--text-primary);
  font-family: inherit; font-size: 0.85rem; outline: none;
}
.chat-input:focus { border-color: var(--accent-3); }
.chat-send {
  background: var(--brand-gradient); border: none;
  border-radius: 10px; padding: 0 0.75rem;
  cursor: pointer; color: #fff;
  display: flex; align-items: center;
}
.chat-send svg { width: 18px; height: 18px; }
.chat-disclaimer {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem 0.6rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(58, 180, 233, 0.04);
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--text-muted);
}
.chat-disclaimer svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--accent-3);
  opacity: 0.85;
}
.chat-disclaimer-text { flex: 1; }
[dir="rtl"] .chat-disclaimer { direction: rtl; text-align: right; }
.chat-typing { font-size: 0.8rem; color: var(--text-muted); padding: 0 0.5rem; }
.chat-typing .dots { display: inline-block; }
.chat-typing .dots span {
  display: inline-block; width: 4px; height: 4px; background: var(--text-muted);
  border-radius: 50%; margin: 0 1px;
  animation: chatBounce 1.4s infinite;
}
.chat-typing .dots span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing .dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatBounce {
  0%,60%,100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

/* Suggestion chips beneath the latest bot reply */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.6rem 0.2rem 0.2rem;
  margin-top: 0.25rem;
}
.chat-suggestions:empty { display: none; }
.chat-suggestion {
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.2;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--bg-card, rgba(255,255,255,0.04));
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}
.chat-suggestion:hover {
  background: var(--accent-4, rgba(99,102,241,0.18));
  border-color: var(--accent-4, var(--glass-border-hover, var(--glass-border)));
  color: #fff;
  transform: translateY(-1px);
}
.chat-suggestion:focus-visible {
  outline: 2px solid var(--accent-4, #6366f1);
  outline-offset: 2px;
}

/* Chat response formatting */
.chat-resp-title {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}
.chat-msg.bot .chat-resp-title {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.chat-resp-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.chat-resp-list li {
  padding: 0.2rem 0;
  font-size: 0.84rem;
  line-height: 1.4;
}
.chat-resp-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  border-top: 1px solid var(--glass-border);
}
.chat-msg.bot p {
  margin: 0.25rem 0;
  font-size: 0.85rem;
}
.chat-msg.bot ul,
.chat-msg.bot ol {
  display: block !important;
  width: 100%;
  max-width: 100%;
  margin: 0.35rem 0 0.1rem;
  padding-left: 1.15rem;
  list-style-position: outside;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.chat-msg.bot li {
  display: list-item !important;
  margin: 0.18rem 0;
  padding: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.chat-msg.bot a {
  color: var(--accent-4);
  text-decoration: underline;
  text-underline-offset: 2px;
  /* Hard-scope so the link styling cannot bleed into adjacent text if the
     model emits a malformed anchor. The sanitizer also unwraps runaway
     <a> elements client-side, but this guarantees the visual fix. */
  display: inline;
  background: transparent;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.chat-msg.bot a *,
.chat-msg.bot a strong,
.chat-msg.bot a em {
  color: inherit;
  text-decoration: inherit;
}
.chat-msg.bot a:hover {
  color: var(--accent-3);
}

@media (max-width: 500px) {
  .chat-window { right: 0.5rem; left: 0.5rem; width: auto; bottom: 5.5rem; }
  .chat-window.maximized { bottom: 0; right: 0; left: 0; top: 0; border-radius: 0; }
  .chat-widget-btn { bottom: 1.2rem; right: 1.2rem; width: 48px; height: 48px; }
  .scroll-top { bottom: calc(1.2rem + 48px + 0.6rem); right: 1.2rem; width: 40px; height: 40px; }
}

/* ── Get Started Modal ── */
.gs-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.28s ease;
}
.gs-overlay.open { opacity: 1; pointer-events: auto; }
.gs-modal {
  background: var(--bg-secondary); border: 1px solid var(--glass-border);
  border-radius: 24px; max-width: 580px; width: 92%;
  position: relative; transform: translateY(34px) scale(0.94);
  opacity: 0;
  transition: transform 0.42s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.3s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
  overflow: hidden;
}
.gs-overlay.open .gs-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.gs-modal-close {
  position: absolute; top: 1rem; right: 1rem; background: none; border: none;
  color: rgba(255,255,255,0.7); font-size: 1.5rem; cursor: pointer; line-height: 1;
  transition: color 0.2s; z-index: 2;
}
.gs-modal-close:hover { color: #fff; }
.gs-header {
  position: relative; padding: 2.5rem 2.5rem 1.5rem;
  background: linear-gradient(135deg, rgba(58,180,233,0.15), rgba(42,235,235,0.08));
  border-bottom: 1px solid var(--glass-border);
  overflow: hidden;
}
.gs-header-glow {
  position: absolute; top: -40px; right: -40px; width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(58,180,233,0.25), transparent 70%);
  pointer-events: none; filter: blur(30px);
}
.gs-header h3 {
  font-size: 1.5rem; margin-bottom: 0.4rem; position: relative; z-index: 1;
}
.gs-header h3 .gradient-text {
  background: var(--brand-gradient); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
}
.gs-header p {
  color: var(--text-secondary); font-size: 0.9rem; position: relative; z-index: 1;
}
.gs-options { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.5rem 2rem 2rem; }
.gs-option {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem;
  background: var(--bg-card); border: 1px solid var(--glass-border);
  border-radius: 16px; cursor: pointer; text-decoration: none; color: inherit;
  transition: transform 0.28s ease, border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.34s ease;
  position: relative; overflow: hidden;
  opacity: 0;
  transform: translateY(14px) scale(0.985);
}
.gs-overlay.open .gs-option { opacity: 1; transform: translateY(0) scale(1); }
.gs-overlay.open .gs-option:nth-child(1) { transition-delay: 0.06s; }
.gs-overlay.open .gs-option:nth-child(2) { transition-delay: 0.12s; }
.gs-overlay.open .gs-option:nth-child(3) { transition-delay: 0.18s; }
.gs-option::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(58,180,233,0.06), rgba(42,235,235,0.03));
  opacity: 0; transition: opacity 0.3s;
}
.gs-option:hover::before { opacity: 1; }
.gs-option:hover {
  border-color: var(--accent-3); transform: translateX(6px);
  box-shadow: 0 4px 20px rgba(58,180,233,0.15);
}
.gs-option-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  background: linear-gradient(135deg, var(--accent-5), var(--accent-3));
  color: #fff; box-shadow: 0 0 12px rgba(58,180,233,0.3);
}
.gs-option-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  background: linear-gradient(135deg, rgba(58,180,233,0.12), rgba(42,235,235,0.06));
}
.gs-option-text { flex: 1; }
.gs-option-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.15rem; }
.gs-option-desc { font-size: 0.82rem; color: var(--text-secondary); }
.gs-option-arrow {
  color: var(--text-muted); transition: transform 0.3s, color 0.3s; flex-shrink: 0;
}
.gs-option:hover .gs-option-arrow { transform: translateX(4px); color: var(--accent-4); }

/* ── Get Started RTL ── */
[dir="rtl"] .gs-modal-close { right: auto; left: 1rem; }
[dir="rtl"] .gs-header { text-align: right; }
[dir="rtl"] .gs-header-glow { right: auto; left: -40px; }
[dir="rtl"] .gs-option { flex-direction: row-reverse; }
[dir="rtl"] .gs-option:hover { transform: translateX(-6px); }
[dir="rtl"] .gs-option-arrow { transform: scaleX(-1); }
[dir="rtl"] .gs-option:hover .gs-option-arrow { transform: scaleX(-1) translateX(-4px); }
[dir="rtl"] .gs-option-text { text-align: right; }

@media (max-width: 500px) {
  .gs-modal { border-radius: 20px; }
  .gs-header { padding: 2rem 1.25rem 1.25rem; }
  .gs-options { padding: 1rem 1.25rem 1.5rem; }
  .gs-option { padding: 0.9rem 1rem; gap: 0.75rem; }
  .gs-option-icon { width: 38px; height: 38px; font-size: 1.1rem; }
  .gs-option-num { width: 24px; height: 24px; font-size: 0.7rem; }
}

/* ── Quick Quote Form ── */
.gs-quote-panel {
  padding: 1rem 2rem 2rem;
}
.gs-quote-back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: none; border: none; color: var(--text-secondary);
  font-size: 0.85rem; cursor: pointer; padding: 0.25rem 0; margin-bottom: 1rem;
  transition: color 0.2s;
}
.gs-quote-back:hover { color: var(--accent-3); }
.gs-quote-form { display: flex; flex-direction: column; gap: 0.85rem; }
.gs-quote-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.gs-quote-field { display: flex; flex-direction: column; gap: 0.3rem; }
.gs-quote-field label {
  font-size: 0.8rem; font-weight: 600; color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.gs-quote-field .form-asterisk { color: var(--accent-3); }
.gs-quote-field input,
.gs-quote-field select,
.gs-quote-field textarea {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 0.65rem 0.9rem; color: var(--text-primary);
  font-size: 0.88rem; font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none; width: 100%; box-sizing: border-box;
}
.gs-quote-field input:focus,
.gs-quote-field select:focus,
.gs-quote-field textarea:focus {
  border-color: var(--accent-3);
  box-shadow: 0 0 0 3px rgba(58,180,233,0.12);
}
.gs-quote-field input.invalid,
.gs-quote-field select.invalid,
.gs-quote-field textarea.invalid {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231,76,60,0.1);
}
.gs-quote-field textarea { resize: vertical; min-height: 70px; }
.gs-quote-field select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.8rem center; padding-right: 2rem;
}
.gs-quote-submit {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin-top: 0.5rem; padding: 0.8rem 1.5rem;
  background: var(--brand-gradient); color: #fff; border: none;
  border-radius: 12px; font-size: 0.95rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.3s;
}
.gs-quote-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(58,180,233,0.3);
}
.gs-quote-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* ── Quick Quote RTL ── */
[dir="rtl"] .gs-quote-panel { direction: rtl; }
[dir="rtl"] .gs-quote-back { flex-direction: row-reverse; }
[dir="rtl"] .gs-quote-back svg { transform: scaleX(-1); }
[dir="rtl"] .gs-quote-field label { text-align: right; }
[dir="rtl"] .gs-quote-field select {
  background-position: left 0.8rem center; padding-right: 0.9rem; padding-left: 2rem;
}

@media (max-width: 500px) {
  .gs-quote-panel { padding: 0.75rem 1.25rem 1.5rem; }
  .gs-quote-row { grid-template-columns: 1fr; }
}

/* ── Tier Recommendation Quiz ── */
.quiz-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.35s ease;
}
.quiz-overlay.open { opacity: 1; pointer-events: auto; }
.quiz-modal {
  background: var(--bg-secondary); border: 1px solid var(--glass-border);
  border-radius: 24px; padding: 2rem 2.5rem 2.5rem; max-width: 580px; width: 92%;
  position: relative; transform: translateY(30px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
}
.quiz-overlay.open .quiz-modal { transform: translateY(0) scale(1); }
.quiz-close {
  position: absolute; top: 1rem; right: 1rem; background: none; border: none;
  color: var(--text-muted); font-size: 1.5rem; cursor: pointer; line-height: 1;
  transition: color 0.2s;
}
.quiz-close:hover { color: var(--text-primary); }
.quiz-progress {
  height: 4px; background: var(--glass-border); border-radius: 2px;
  overflow: hidden; margin-bottom: 2rem;
}
.quiz-progress-bar {
  height: 100%; background: var(--brand-gradient); border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1); width: 0;
}
.quiz-step {
  font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 0.75rem;
}
.quiz-question {
  font-size: 1.2rem; font-weight: 700; margin-bottom: 1.5rem;
  line-height: 1.4;
}
.quiz-options { display: flex; flex-direction: column; gap: 0.6rem; }
.quiz-option {
  display: block; width: 100%; text-align: left;
  padding: 0.9rem 1.25rem; background: var(--bg-card);
  border: 1px solid var(--glass-border); border-radius: 14px;
  color: var(--text-primary); font-size: 0.92rem; font-family: inherit;
  cursor: pointer; transition: all 0.25s ease; position: relative; overflow: hidden;
}
.quiz-option::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(58,180,233,0.08), rgba(42,235,235,0.04));
  opacity: 0; transition: opacity 0.25s;
}
.quiz-option:hover::before { opacity: 1; }
.quiz-option:hover {
  border-color: var(--accent-3); transform: translateX(6px);
  box-shadow: 0 2px 12px rgba(58,180,233,0.12);
}
/* Quiz result */
.quiz-result { text-align: center; }
.quiz-result-badge {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 1.25rem;
  display: flex; align-items: center; justify-content: center;
  animation: quizBadgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes quizBadgePop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.quiz-result-number {
  color: #fff; font-weight: 800; font-size: 0.95rem; text-transform: uppercase;
  letter-spacing: 0.05em;
}
.quiz-result-name {
  font-size: 1.6rem; font-weight: 800; margin-bottom: 0.25rem;
}
.quiz-result-emp {
  font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem;
}
.quiz-result-desc {
  font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 1rem;
}
.quiz-result-alt {
  font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem;
  padding: 0.5rem; border-radius: 8px;
  background: linear-gradient(135deg, rgba(58,180,233,0.06), rgba(42,235,235,0.03));
}
.quiz-result-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.quiz-result-btn {
  padding: 0.7rem 1.5rem !important; font-size: 0.92rem !important;
}
.quiz-retake {
  background: var(--bg-card) !important; border: 1px solid var(--glass-border) !important;
  color: var(--text-secondary) !important; padding: 0.7rem 1.5rem; border-radius: 10px;
  cursor: pointer; font-family: inherit; font-size: 0.92rem;
  transition: all 0.2s ease;
}
.quiz-retake:hover { border-color: var(--accent-3) !important; color: var(--text-primary) !important; }

/* ── Quiz RTL ── */
[dir="rtl"] .quiz-close { right: auto; left: 1rem; }
[dir="rtl"] .quiz-step { text-align: right; }
[dir="rtl"] .quiz-question { text-align: right; }
[dir="rtl"] .quiz-option { text-align: right; }
[dir="rtl"] .quiz-option:hover { transform: translateX(-6px); }

@media (max-width: 500px) {
  .quiz-modal { padding: 1.5rem 1.25rem 2rem; }
  .quiz-question { font-size: 1.05rem; }
  .quiz-option { padding: 0.75rem 1rem; font-size: 0.85rem; }
}


/* ── RTL Support ── */
[dir="rtl"] { direction: rtl; text-align: right; }
[dir="rtl"] .nav-inner {
  direction: ltr;
  flex-direction: row-reverse;
  padding: 0 0.5rem;
}
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .nav-toggle-group { flex-direction: row-reverse; }
[dir="rtl"] .nav-toggle-group .search-toggle { border-radius: 0 10px 10px 0; margin-right: 0; }
[dir="rtl"] .nav-toggle-group .lang-toggle { border-radius: 10px 0 0 10px; margin-left: 0; margin-right: -1px; }
[dir="rtl"] .nav-toggle-group .theme-toggle { margin-left: 0; margin-right: -1px; }
[dir="rtl"] .nav-user-btn { margin-left: 0; margin-right: 0.75rem; }
[dir="rtl"] .nav-logo { left: auto; right: 0.5rem; direction: ltr; flex-direction: row-reverse; }
[dir="rtl"] .nav-user-dropdown { right: auto; left: 1rem; }
[dir="rtl"] .dropdown-menu { left: auto; right: 0; text-align: right; }
[dir="rtl"] .dropdown-item { flex-direction: row-reverse; }
[dir="rtl"] .footer-grid { direction: rtl; }
[dir="rtl"] .skip-to-content { left: auto; right: 1rem; }
[dir="rtl"] .search-input { direction: rtl; }
[dir="rtl"] .contact-grid { direction: rtl; }
[dir="rtl"] .hero-content { text-align: right; }
[dir="rtl"] .hero-actions { justify-content: flex-start; }
[dir="rtl"] .hero-stats { direction: rtl; }
[dir="rtl"] .section-label { text-align: right; }
[dir="rtl"] .feature-card { text-align: right; }
[dir="rtl"] .footer-contact-label { text-align: right; }
[dir="rtl"] .footer-email-form {
  direction: ltr;
}
[dir="rtl"] .footer-col ul { padding-right: 0; }
[dir="rtl"] .footer-bottom { direction: rtl; }
[dir="rtl"] .chat-window { right: auto; left: 2rem; }
[dir="rtl"] .chat-window.maximized { right: 1rem; left: 1rem; }
[dir="rtl"] .chat-window.fullscreen { right: 0; left: 0; }
[dir="rtl"] .chat-widget-btn { right: auto; left: 2rem; }
[dir="rtl"] .chat-input-area { direction: rtl; }
[dir="rtl"] .chat-input { text-align: right; }
[dir="rtl"] .chat-send svg { transform: scaleX(-1); }
[dir="rtl"] .marquee-section { direction: ltr; }
[dir="rtl"] .marquee-track { direction: ltr; }
[dir="rtl"] .marquee-item { flex-direction: row-reverse; }
[dir="rtl"] .scroll-top { right: auto; left: calc(2rem + 4px); }
[dir="rtl"] .timeline { direction: rtl; }
[dir="rtl"] .timeline-row h4 { text-align: right; }
[dir="rtl"] .timeline-chevron { margin-left: 0; margin-right: auto; }
[dir="rtl"] .timeline-detail-inner p, [dir="rtl"] .timeline-details { text-align: right; }
[dir="rtl"] .timeline-details li { padding-left: 0; padding-right: 1.1rem; }
[dir="rtl"] .timeline-details li::before { left: auto; right: 0; }
[dir="rtl"] .tier-card-number { right: auto; left: 1.5rem; }
[dir="rtl"] .btn-icon { transform: scaleX(-1); }
[dir="rtl"] .card-link svg { transform: scaleX(-1); }


@media (max-width: 768px) {
  [dir="rtl"] .nav-toggle-group { left: auto; right: 2rem; }
  [dir="rtl"] .nav-links {
    right: auto;
    left: -100%;
    border-left: none;
    border-right: 1px solid var(--glass-border);
  }
  [dir="rtl"] .nav-links.open {
    left: 0;
    right: auto;
  }
}
@media (max-width: 500px) {
  [dir="rtl"] .chat-window { right: 0.5rem; left: 0.5rem; }
  [dir="rtl"] .chat-widget-btn { right: auto; left: 1.2rem; }
  [dir="rtl"] .scroll-top { right: auto; left: 1.2rem; }
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

/* ════════════════════════════════════════════════════════════════
   TIGHTER VERTICAL RHYTHM — about-family pages (mission, vision,
   values, goals) load base.css instead of style.css, so the same
   override that lives in style.css is mirrored here.
   ════════════════════════════════════════════════════════════════ */
body[data-page="about"],
body[data-page="mission"],
body[data-page="vision"],
body[data-page="values"],
body[data-page="goals"],
body[data-page="services"],
body[data-page="solutions"] {
  --section-padding: 40px;
}
@media (max-width: 768px) {
  body[data-page="about"],
  body[data-page="mission"],
  body[data-page="vision"],
  body[data-page="values"],
  body[data-page="goals"],
  body[data-page="services"],
  body[data-page="solutions"] {
    --section-padding: 28px;
  }
}
@media (max-width: 480px) {
  body[data-page="about"],
  body[data-page="mission"],
  body[data-page="vision"],
  body[data-page="values"],
  body[data-page="goals"],
  body[data-page="services"],
  body[data-page="solutions"] {
    --section-padding: 20px;
  }
}

/* Services page hard-codes inline `padding-top/bottom` on most of its
   sections (2–4rem), bypassing --section-padding. Halve those inline
   values via higher-specificity overrides so the rhythm matches the
   other tightened pages. */
body[data-page="services"] section.section[style*="padding-top"],
body[data-page="services"] section.section[style*="padding-bottom"] {
  padding-top: 1rem !important;
  padding-bottom: 1.5rem !important;
}
body[data-page="services"] section#services-hero[style] {
  padding-top: calc(var(--nav-height) + 2rem) !important;
  padding-bottom: 1rem !important;
}
body[data-page="services"] section#services-wheel-section[style] {
  padding-top: 0 !important;
  padding-bottom: 1.5rem !important;
}

/* Halve the empty space inside the about hero so the next section
   sits closer to the headline instead of below a 70vh slab. */
body[data-page="about"] .about-hero,
body[data-page="mission"] .about-hero,
body[data-page="vision"] .about-hero,
body[data-page="values"] .about-hero,
body[data-page="goals"] .about-hero {
  min-height: 0;
  padding-bottom: 1.5rem;
}

/* Halve dominant inner-block margins inside about-family sections. */
body[data-page="about"] .timeline,
body[data-page="mission"] .timeline,
body[data-page="vision"] .timeline,
body[data-page="values"] .timeline,
body[data-page="goals"] .timeline,
body[data-page="mission"] .mission-drive-grid {
  margin-top: 1.5rem;
}
body[data-page="values"] .values-sequence-line {
  margin-top: 2rem;
}
