/* ============================================
   BIOMED ENG 2026 — Global Design System
   Futuristic Glassmorphism / Cyber-Medical
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

/* --- CSS Variables --- */
:root {
  --bg-deep: #0F172A;
  --bg-deeper: #060d1f;
  --primary: #8198ff;
  --secondary: #00D4FF;
  --success: #00DD88;
  --alert: #FF4444;
  --glass: rgba(15, 23, 42, 0.6);
  --glass-border: rgba(168, 85, 247, 0.2);
  --glass-hover: rgba(168, 85, 247, 0.12);
  --text: #E2E8F0;
  --text-dim: #94A3B8;
  --font-main: 'Poppins', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --blur: blur(14px);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.35s cubic-bezier(.4, 0, .2, 1);
  --glow-primary: 0 0 20px rgba(168, 85, 247, .3);
  --glow-secondary: 0 0 20px rgba(0, 212, 255, .25);
  --card-bg: rgba(15, 23, 42, 0.7);
}

/* --- Light Mode Variables --- */
[data-theme="light"] {
  --bg-deep: #F8FAFC;
  --bg-deeper: #F1F5F9;
  --glass: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-hover: rgba(0, 0, 0, 0.03);
  --text: #0F172A;
  --text-dim: #475569;
  --glow-primary: 0 4px 20px rgba(168, 85, 247, .2);
  --glow-secondary: 0 4px 20px rgba(0, 212, 255, .15);
  --card-bg: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] body {
  background: var(--bg-deep);
}

[data-theme="light"] body::before {
  background: radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, .04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, .04) 0%, transparent 60%);
}

[data-theme="light"] .site-header {
  background: rgba(241, 245, 249, .85);
  border-bottom-color: rgba(0, 0, 0, .06);
}

[data-theme="light"] .header-nav a:hover {
  color: var(--text);
  background: rgba(0, 0, 0, .04);
}

[data-theme="light"] .header-nav a.active {
  background: rgba(0, 212, 255, .08);
}

[data-theme="light"] .site-footer {
  background: rgba(241, 245, 249, .85);
  border-top-color: rgba(0, 0, 0, .06);
}

[data-theme="light"] .glass-card {
  background: rgba(255, 255, 255, .7);
  border-color: rgba(0, 0, 0, .06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
}

[data-theme="light"] .glass-card:hover {
  box-shadow: 0 8px 30px rgba(0, 212, 255, .1);
  border-color: rgba(0, 212, 255, .2);
}

[data-theme="light"] .form-control {
  background: rgba(0, 0, 0, .03);
  border-color: rgba(0, 0, 0, .1);
  color: var(--text);
}

[data-theme="light"] .data-row {
  border-bottom-color: rgba(0, 0, 0, .05);
}

[data-theme="light"] .progress-bar-wrap {
  background: rgba(0, 0, 0, .06);
}

[data-theme="light"] .circular-progress .track {
  stroke: rgba(0, 0, 0, .06);
}

[data-theme="light"] .map-placeholder {
  background: rgba(0, 0, 0, .02);
  border-color: rgba(0, 0, 0, .06);
}

[data-theme="light"] .map-placeholder::before {
  background: repeating-linear-gradient(0deg, transparent, transparent 20px, rgba(0, 0, 0, .03) 20px, rgba(0, 0, 0, .03) 21px),
    repeating-linear-gradient(90deg, transparent, transparent 20px, rgba(0, 0, 0, .03) 20px, rgba(0, 0, 0, .03) 21px);
}

[data-theme="light"] .spec-tag {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.15);
  color: #005f73;
}

[data-theme="light"] .device-img {
  background: rgba(0, 0, 0, .02);
}

[data-theme="light"] .device-img::after {
  background: linear-gradient(transparent, rgba(255, 255, 255, .7));
}

[data-theme="light"] label,
[data-theme="light"] .support-form label,
[data-theme="light"] .dash-card-title,
[data-theme="light"] .stat-card h4 {
  color: var(--text);
}

[data-theme="light"] .support-form input,
[data-theme="light"] .support-form textarea,
[data-theme="light"] .support-form select {
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] #particles-canvas {
  opacity: 0.3;
}

/* --- Light Mode Footer Overrides --- */
[data-theme="light"] .footer-col a:hover {
  color: var(--text);
}

[data-theme="light"] .footer-col a i {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .footer-col a:hover i {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(129, 152, 255, 0.3);
}

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

[data-theme="light"] .social-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

[data-theme="light"] .newsletter-input {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text);
}

[data-theme="light"] .smart-search-input {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .smart-results {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .header-sub {
  background: rgba(0, 0, 0, 0.02);
  border-top-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .team-role {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-dim);
}

[data-theme="light"] .btn-outline:hover {
  background: rgba(129, 152, 255, 0.1);
  color: var(--text);
  border-color: var(--primary);
}

[data-theme="light"] .lang-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

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

a:hover {
  color: var(--secondary);
}

[data-theme="dark"] a:hover {
  color: #fff;
}

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

ul {
  list-style: none;
}

.no-scroll {
  overflow: hidden;
}

/* --- Global Glass Cards --- */
.glow-border {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.glow-border:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 212, 255, 0.15);
}

.glow-content {
  position: relative;
  z-index: 2;
  padding: 1.5rem;
  height: 100%;
}

[data-theme="light"] .glow-border {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.04);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .glow-border:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
  border-color: var(--primary);
}

/* ============ SPLASH SCREEN ============ */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-deeper);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1s cubic-bezier(.4, 0, .2, 1), visibility 1s;
}

.splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  text-align: center;
  width: 100%;
  max-width: 400px;
  padding: 2rem;
}

.splash-logo {
  width: 120px;
  height: auto;
  margin: 0 auto 2.5rem;
  filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.4));
  animation: splash-logo-pulse 2s ease-in-out infinite;
}

@keyframes splash-logo-pulse {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.4));
  }

  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 25px rgba(0, 212, 255, 0.6));
  }
}

.splash-loader-wrap {
  height: 4px;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  position: relative;
}

.splash-loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: 0 0 15px var(--primary);
  transition: width 0.4s ease;
}

.splash-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 3px;
  opacity: 0.8;
}

.splash-status span {
  display: inline-block;
  min-width: 180px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  position: relative;
}

/* --- Animated Background --- */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 160px;
  /* Offset for two-tier floating capsule header */
}

.page-content {
  flex: 1;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, .06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, .06) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

/* ============ HEADER (Professional) ============ */
/* ============ HEADER (Two-Tier Floating Capsule) ============ */
.site-header {
  position: fixed;
  top: 1.5rem;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 90%;
  max-width: 1200px;
  z-index: 1000;
  background: rgba(6, 13, 31, 0.7);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 30px;
  padding: 0;
  /* Handle padding in children */
  display: flex;
  flex-direction: column;
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.site-header:hover {
  background: rgba(6, 13, 31, 0.85);
  border-color: var(--primary);
  box-shadow: 0 20px 60px rgba(0, 212, 255, 0.15);
}

.site-header.scrolled {
  top: 0.75rem;
  border-radius: 50px;
  width: 85%;
}

/* --- Top Floor: Navigation --- */
.header-main {
  height: 60px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
  z-index: 10;
}

/* --- Bottom Floor: Search --- */
.header-sub {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  padding: 0 2rem;
  transition: all 0.4s ease;
}

.site-header.scrolled .header-sub {
  height: 0;
  opacity: 0;
  padding: 0;
  pointer-events: none;
}

/* --- Smart Inline Search (Centered) --- */
.smart-search-wrap {
  width: 100%;
  max-width: 600px;
  position: relative;
}

.smart-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  padding: 0.45rem 1rem 0.45rem 2.5rem;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.3s ease;
  text-align: center;
}

.smart-search-input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
  text-align: left;
}

.smart-search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.8rem;
  pointer-events: none;
}

.smart-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  width: 500px;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 2000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.smart-search-input:focus+.smart-results,
.smart-results:hover {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1200px) {
  .site-header {
    width: 95%;
  }
}

@media (max-width: 992px) {
  .site-header {
    border-radius: 50px;
    top: 1rem;
    width: calc(100% - 2rem);
    height: 65px;
    left: 0;
    right: 0;
    margin: 0 auto;
    padding: 0 0.8rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
  }

  .header-main {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 100%;
  }

  /* RTL Fix for Header Main */
  [dir="rtl"] .header-main {
    /* Removed row-reverse, let browser handle RTL flex */
  }

  .header-right {
    display: none;
  }

  .header-sub {
    display: none;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(6, 13, 31, 0.99);
    backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1000;
  }

  [dir="rtl"] .header-nav {
    right: auto;
    left: -100%;
  }

  .header-nav.open {
    right: 0;
  }

  [dir="rtl"] .header-nav.open {
    left: 0;
  }

  .header-nav a {
    font-size: 1.4rem;
    padding: 1.2rem 2rem;
    width: 85%;
    justify-content: center;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
  }

  .mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    z-index: 2000;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    align-items: center;
    flex-shrink: 0;
  }

  .mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    border-radius: 2px;
  }

  .mobile-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .mobile-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .mobile-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* --- Ultimate Mobile Footer Fixes --- */
@media (max-width: 768px) {
  .site-footer {
    padding: 3rem 1.5rem 2rem;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .footer-brand {
    align-items: center;
  }

  .footer-links-grid {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    padding: 2rem 1rem;
  }

  .footer-terminal {
    width: 100%;
    order: -1;
    margin-bottom: 0.5rem;
  }

  .terminal-text {
    font-size: 0.95rem;
    letter-spacing: 1px;
  }

  .system-status {
    width: 100%;
    justify-content: center;
  }

  .copyright {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .footer-links-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: relative;
  text-decoration: none;
}

/* --- Floating Logo Elements --- */
.logo-orbit {
  position: absolute;
  inset: -15px;
  pointer-events: none;
  z-index: 1;
}

.orbit-item {
  position: absolute;
  font-size: 0.65rem;
  color: var(--primary);
  opacity: 0.4;
  filter: blur(0.5px);
}

.orbit-item.i1 {
  top: 10%;
  left: 0;
  animation: drift 4s infinite ease-in-out;
}

.orbit-item.i2 {
  bottom: 10%;
  right: 0;
  animation: drift 5s infinite ease-in-out reverse;
}

.orbit-item.i3 {
  top: 50%;
  left: -10px;
  animation: drift 6s infinite ease-in-out 1s;
}

@keyframes drift {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  50% {
    transform: translate(10px, -10px) rotate(20deg);
  }
}

.header-logo:hover .orbit-item {
  opacity: 0.8;
  filter: blur(0);
}

.header-logo:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

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

.header-nav {
  display: flex;
  gap: 0.15rem;
}

.header-nav a {
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.header-nav a i {
  font-size: 0.85rem;
  opacity: 0.7;
  transition: var(--transition);
}

.header-nav a:hover i,
.header-nav a.active i {
  opacity: 1;
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: var(--transition);
  transform: translateX(-50%);
  border-radius: 2px;
}

.header-nav a:hover {
  color: var(--primary);
  background: rgba(0, 212, 255, .05);
}

.header-nav a.active {
  color: var(--primary);
  background: rgba(0, 212, 255, .1);
}

.header-nav a:hover::after,
.header-nav a.active::after {
  width: 50%;
}

/* --- Search Results Item Styling --- */
.search-result-item {
  display: block;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  margin-bottom: 0.25rem;
  border: 1px solid transparent;
}

.search-result-item:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--primary);
  transform: translateX(5px);
}

[data-theme="light"] .search-result-item:hover {
  background: rgba(129, 152, 255, 0.08);
  color: var(--text);
}

[dir="rtl"] .search-result-item:hover {
  transform: translateX(-5px);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05);
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 212, 255, .08);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  transition: var(--transition);
}

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

.theme-toggle .icon-moon {
  position: absolute;
}

[data-theme="light"] .theme-toggle {
  border-color: rgba(0, 0, 0, .1);
  background: rgba(0, 0, 0, .04);
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.search-trigger {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

.search-trigger:hover {
  color: var(--primary);
  transform: scale(1.1);
}

/* --- Search Overlay --- */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 13, 31, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10vh 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.search-container {
  width: 100%;
  max-width: 600px;
}

.search-box {
  position: relative;
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 1.2rem 1.5rem;
  color: var(--text);
  font-size: 1.2rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

.search-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 2rem;
  cursor: pointer;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
}

.search-result-item:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: var(--primary);
  transform: translateX(10px);
}

.search-result-item i {
  color: var(--primary);
  font-size: 1.1rem;
}

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

[data-theme="light"] .search-input {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

[data-theme="light"] .search-result-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
  color: #1e293b;
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .header-sub {
  border-top-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .smart-search-input {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

[data-theme="light"] .smart-search-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

[data-theme="light"] .smart-search-input::placeholder {
  color: #64748b;
}

[data-theme="light"] .smart-search-icon {
  color: #64748b;
}

[data-theme="light"] .smart-results {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.1);
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05);
  color: var(--text-dim);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.lang-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 212, 255, .08);
}

.lang-btn i {
  font-size: 0.75rem;
  transition: var(--transition);
  pointer-events: none;
}

.lang-dropdown.open .lang-btn i {
  transform: rotate(180deg);
}

[data-theme="light"] .lang-btn {
  border-color: rgba(0, 0, 0, .1);
  background: rgba(0, 0, 0, .04);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 3000;
  box-shadow: var(--shadow);
}

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

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

[data-theme="light"] .lang-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.1);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
  width: 100%;
  font-family: var(--font-main);
  text-align: inherit;
}

.lang-option:hover {
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary);
}

[data-theme="light"] .lang-option:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--primary);
}

.lang-option.active {
  color: var(--primary);
  background: rgba(0, 212, 255, 0.05);
}

.lang-option .lang-flag {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 221, 136, .5);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(0, 221, 136, 0);
  }
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============ FOOTER ============ */
.site-footer {
  background: rgba(6, 13, 31, 0.95);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid rgba(0, 212, 255, 0.1);
  padding: 6rem 2rem 2rem;
  margin-top: 5rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 4rem;
}

.footer-brand .header-logo {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  display: inline-flex;
}

.footer-mission {
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.7;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1rem;
}

.footer-col a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.84rem;
  padding: 0.3rem 0;
}

.footer-col a i {
  font-size: 0.75rem;
  opacity: 0.5;
}

.footer-col a:hover {
  color: #fff;
  padding-left: 4px;
}

.footer-col a:hover i {
  opacity: 1;
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .05);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
}

/* ============ GLASS CARD ============ */
.glass-card {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--glow-primary);
  border-color: rgba(0, 212, 255, .3);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #0090cc);
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 212, 255, .3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 35px rgba(0, 212, 255, .5);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--secondary);
  color: var(--secondary);
}

.btn-outline:hover {
  background: rgba(139, 92, 246, .15);
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(139, 92, 246, .3);
  color: #fff;
}

/* ============ SECTION UTILS ============ */
.section {
  padding: 8rem 2rem;
  width: 100%;
  margin: 0 auto;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section-title span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-sub {
  color: var(--text-dim);
  max-width: 560px;
  font-size: 0.95rem;
}

.dashboard-page-content {
  padding-top: 180px;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 1.5rem 80px;
  overflow: hidden;
}

.hero-bg-accent {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
  filter: blur(80px);
  z-index: -1;
  animation: pulse-glow 10s ease-in-out infinite;
}

@keyframes pulse-glow {

  0%,
  100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.scroll-indicator .mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--text-dim);
  border-radius: 15px;
  position: relative;
}

.scroll-indicator .mouse::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
  animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(15px);
  }
}

/* Stats Section */
.stats-section {
  padding: 4rem 0;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .stats-section {
    padding: 5rem 1.5rem;
  }
}

.stats-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 0 1.5rem;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: color 0.3s ease;
}

/* --- Hero Scanning & Pulse Effects --- */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(0, 212, 255, 0.05), transparent);
  transform: skewX(-25deg);
  animation: scan-beam 8s infinite cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

@keyframes scan-beam {
  0% {
    left: -100%;
  }

  30%,
  100% {
    left: 150%;
  }
}

.hero-bg-accent {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
  animation: neural-pulse 4s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes neural-pulse {
  0% {
    opacity: 0.3;
    transform: scale(0.95);
  }

  100% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.hero-content h1 {
  position: relative;
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-floating-items {
  position: absolute;
  inset: -30px;
  pointer-events: none;
  z-index: 0;
}

.h-item {
  position: absolute;
  font-size: 1.4rem;
  color: var(--primary);
  opacity: 0.25;
  filter: blur(1px) drop-shadow(0 0 5px var(--primary));
}

.h-item.i1 {
  top: -10%;
  left: 10%;
  animation: drift-h 7s infinite ease-in-out;
}

.h-item.i2 {
  top: 20%;
  right: 5%;
  animation: drift-h 9s infinite ease-in-out reverse;
}

.h-item.i3 {
  bottom: 0%;
  left: -5%;
  animation: drift-h 6s infinite ease-in-out 1s;
}

.h-item.i4 {
  bottom: 20%;
  right: 15%;
  animation: drift-h 8s infinite ease-in-out 2s;
}

@keyframes drift-h {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }

  50% {
    transform: translate(25px, -25px) rotate(45deg) scale(1.2);
  }
}

.hero-content:hover .h-item {
  opacity: 0.5;
  filter: blur(0);
}

.hero-btns .btn {
  transition: transform 0.2s cubic-bezier(0.1, 0.7, 0.1, 1);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  background: rgba(0, 212, 255, .08);
  border: 1px solid rgba(0, 212, 255, .2);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-dim);
  max-width: 650px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}


/* ============ SECTION HEADERS ============ */
.section-header {
  max-width: 900px;
  margin: 0 auto 5rem;
  text-align: center;
}

.section-header h2 {
  font-size: 3.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin-bottom: 2rem;
  position: relative;
  z-index: 10;
}

.section-header h2 span {
  display: block;
  background: linear-gradient(135deg, var(--primary) 0%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.3));
}

.section-header p {
  font-size: 1.15rem;
  color: var(--text-dim);
  line-height: 1.6;
}

[data-theme="light"] .section-header h2 {
  color: var(--text);
}

[data-theme="light"] .section-header h2 span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: none;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 5rem;
}

.feature-card {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 3.5rem 2.5rem;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg,
      transparent,
      rgba(255, 255, 255, 0.05),
      transparent);
  transition: 0.6s;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 212, 255, 0.1);
}

.feat-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  transition: all 0.4s ease;
}

margin-bottom: 1.1rem;
background: rgba(0, 212, 255, .1);
border: 1px solid rgba(0, 212, 255, .2);
color: var(--primary);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ============ DASHBOARD ============ */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
}

.dash-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: transparent;
  display: flex;
  flex-direction: column;
}

.dash-card .glow-content {
  padding: 2.2rem;
  flex: 1;
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.dash-card-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-card-title i {
  color: var(--primary);
  font-size: 1.1rem;
}

.dash-card-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.badge-active {
  background: rgba(0, 221, 136, .15);
  color: var(--success);
}

.badge-alert {
  background: rgba(255, 68, 68, .15);
  color: var(--alert);
  animation: pulse-dot 1.5s infinite;
}

.badge-warning {
  background: rgba(255, 170, 0, .15);
  color: #ffaa00;
}

.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}

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

.data-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.data-label i {
  font-size: 0.8rem;
  opacity: 0.6;
}

.data-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
}

.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, .06);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 1.2s cubic-bezier(.4, 0, .2, 1);
  width: 0;
}

.fill-primary {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.fill-success {
  background: var(--success);
}

.fill-warning {
  background: #ffaa00;
}

.fill-alert {
  background: var(--alert);
}

.circular-progress {
  position: relative;
  width: 90px;
  height: 90px;
}

.circular-progress svg {
  transform: rotate(-90deg);
}

.circular-progress .track {
  fill: none;
  stroke: rgba(255, 255, 255, .06);
  stroke-width: 6;
}

.circular-progress .fill-ring {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s cubic-bezier(.4, 0, .2, 1);
}

.circular-progress .progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
}

.gauge-wrap {
  text-align: center;
}

.gauge-container {
  position: relative;
  width: 120px;
  height: 70px;
  margin: 0 auto 0.5rem;
  overflow: hidden;
}

.gauge-container svg {
  width: 120px;
  height: 70px;
}

.gauge-label {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.gauge-value {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.mini-chart {
  width: 100%;
  height: 80px;
  margin: 1rem 0 0.5rem;
  position: relative;
}

.mini-chart svg {
  width: 100%;
  height: 100%;
}

/* ============ DEVICES GRID ============ */
top: 1rem;
right: 1rem;
background: var(--primary);
color: #fff;
padding: 0.25rem 0.75rem;
border-radius: 20px;
font-size: 0.7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1px;
box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
z-index: 2;
}

.device-body {
  padding: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.device-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.device-body p {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.device-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.75rem;
}


/* ============ TEAM (Professional Redesign) ============ */
.team-group {
  margin-bottom: 3.5rem;
}

.team-group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 212, 255, .1);
}

.team-group-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: rgba(0, 212, 255, .1);
  border: 1px solid rgba(0, 212, 255, .15);
  color: var(--primary);
}

.team-group-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.team-group-header p {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.1rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2rem;
}

.team-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-align: left;
  padding: 0;
  position: relative;
  background: transparent;
  border: none !important;
  box-shadow: none !important;
}

.team-card .glow-content {
  padding: 1.25rem;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.team-card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.1);
}

transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.team-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: 0.5s;
  pointer-events: none;
}

.team-card:hover::after {
  left: 100%;
}

/* Removed heart emoji pseudo-elements */
.team-card:hover {
  border-color: rgba(0, 212, 255, 0.4);
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 212, 255, 0.1);
  background: var(--glass);
  z-index: 20;
}

/* Removed sparkles */
[data-theme="light"] .team-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .team-avatar {
  background: #fff;
  border-color: rgba(0, 212, 255, 0.3);
}

/* --- Supervisor/Lead Specific --- */
.supervisor-card {
  border: 1.5px solid rgba(255, 215, 0, 0.3) !important;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), var(--glass)) !important;
  animation: supervisor-float 4s ease-in-out infinite alternate !important;
}

.supervisor-card .team-avatar {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2)) !important;
  border-color: rgba(255, 215, 0, 0.4) !important;
  color: #FFD700 !important;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.supervisor-card:hover {
  border-color: #FFD700 !important;
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.25), 0 0 20px rgba(255, 215, 0, 0.1) !important;
}

@keyframes supervisor-float {
  0% {
    transform: translateY(0) scale(1);
  }

  100% {
    transform: translateY(-10px) scale(1.02);
  }
}

@keyframes float-sparkle {
  0% {
    transform: translate(0, 0) scale(0.8) rotate(-10deg);
  }

  100% {
    transform: translate(15px, -20px) scale(1.2) rotate(20deg);
  }
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 14px;
  /* ID card look */
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, rgba(0, 212, 255, .15), rgba(139, 92, 246, .15));
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: var(--primary);
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}

.team-avatar::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  background: var(--success);
  border: 3px solid var(--bg-deep);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
}

.team-card:hover .team-avatar {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(0, 212, 255, .2);
}

.team-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.team-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  position: relative;
  z-index: 1;
}

.team-role {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, .05);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  width: fit-content;
  position: relative;
  z-index: 1;
}

.btn-details {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn-details i {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.btn-details:hover {
  color: var(--secondary);
}

.btn-details:hover i {
  transform: translateX(5px);
}

.team-role i {
  font-size: 0.65rem;
}

/* Lead cards special */
.team-card.lead-card {
  border-color: rgba(0, 221, 136, .2);
  background: linear-gradient(135deg, rgba(0, 221, 136, .05), var(--glass));
}

.team-card.lead-card .team-avatar {
  width: 84px;
  height: 84px;
  background: linear-gradient(135deg, rgba(0, 221, 136, .15), rgba(0, 212, 255, .15));
  border-color: rgba(0, 221, 136, .3);
  font-size: 1.5rem;
  color: var(--success);
}

.team-card.lead-card .team-role {
  color: var(--success);
}

/* ============ CONTACT ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, .1);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

select.form-control {
  appearance: none;
  cursor: pointer;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, .1);
  border: 1px solid rgba(0, 212, 255, .15);
  font-size: 1rem;
  flex-shrink: 0;
  color: var(--primary);
}

.contact-info-item h4 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.contact-info-item p {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.map-placeholder {
  width: 100%;
  height: 200px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

.map-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 20px, rgba(0, 212, 255, .03) 20px, rgba(0, 212, 255, .03) 21px),
    repeating-linear-gradient(90deg, transparent, transparent 20px, rgba(0, 212, 255, .03) 20px, rgba(0, 212, 255, .03) 21px);
}

/* ============ ANIMATIONS ============ */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* ============ RTL Support (Arabic) ============ */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .team-card {
  text-align: right;
}

[dir="rtl"] .team-role {
  align-self: flex-start;
}

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

[dir="rtl"] .footer-col a {
  justify-content: flex-start;
}

[dir="rtl"] .footer-col a:hover {
  padding-left: 0;
  padding-right: 4px;
}

[dir="rtl"] .footer-col a i {
  transform: rotate(180deg);
}

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

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

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {

  .features-grid,
  .devices-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(6, 13, 31, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2101;
  }

  [data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .site-header .header-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .site-header .header-logo img {
    height: 32px !important;
    display: block;
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    margin: 0;
    z-index: 2102;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    height: 40px;
    z-index: 2102;
  }

  .header-right .lang-btn {
    height: 32px;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    font-size: 0.8rem;
    margin: 0;
  }

  .header-right .theme-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
  }

  /* Footer Mobile Refinement */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    text-align: right;
    gap: 3rem 1.5rem;
  }

  [dir="ltr"] .footer-grid {
    text-align: left;
  }

  .footer-brand {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
  }

  .footer-brand .header-logo {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    display: inline-block;
  }

  .footer-mission {
    margin: 1rem auto 0;
    text-align: center;
    max-width: 100%;
    line-height: 1.6;
    font-size: 0.95rem;
  }

  .footer-col {
    display: flex;
    flex-direction: column;
  }

  [dir="rtl"] .footer-col {
    align-items: flex-start;
  }

  [dir="ltr"] .footer-col {
    align-items: flex-start;
  }

  .footer-col:last-child {
    grid-column: 1 / -1;
    align-items: center;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    margin-top: 1rem;
  }

  .footer-col a {
    justify-content: flex-start;
    padding: 0.5rem 0;
  }

  [dir="rtl"] .footer-col a {
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.6rem;
  }

  /* Flip chevron for RTL */
  [dir="rtl"] .footer-col a i.fa-chevron-right {
    transform: rotate(180deg);
  }

  .footer-col:last-child a {
    justify-content: center;
  }

  .header-nav {
    position: fixed;
    inset: 0;
    top: 0;
    height: 100vh;
    width: 100%;
    background: rgba(6, 13, 31, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 2100;
    transform: translateY(-100%);
    transition: all 0.6s cubic-bezier(0.85, 0, 0.15, 1);
    opacity: 0;
    visibility: hidden;
  }

  [data-theme="light"] .header-nav {
    background: rgba(255, 255, 255, 0.98);
  }

  [data-theme="light"] .header-nav a {
    color: var(--text);
  }

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

  .header-nav a {
    font-size: 1.8rem;
    font-weight: 700;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
  }

  .header-nav.open a {
    transform: translateY(0);
    opacity: 1;
  }

  .header-nav.open a:nth-child(1) {
    transition-delay: 0.2s;
  }

  .header-nav.open a:nth-child(2) {
    transition-delay: 0.3s;
  }

  .header-nav.open a:nth-child(3) {
    transition-delay: 0.4s;
  }

  .header-nav.open a:nth-child(4) {
    transition-delay: 0.5s;
  }

  .header-nav.open a:nth-child(5) {
    transition-delay: 0.6s;
  }

  .mobile-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .mobile-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .features-grid,
  .devices-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .stats-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .stat-value {
    font-size: 2.8rem;
  }

  .hero h1 {
    font-size: 2.4rem;
    line-height: 1.2;
  }

  .section {
    padding: 4rem 1.5rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .team-card {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
    gap: 1rem;
  }

  .team-avatar {
    width: 90px;
    height: 90px;
    margin: 0 auto;
  }

  .team-info {
    align-items: center;
  }

  .team-role {
    margin: 0.2rem auto;
  }

  [dir="rtl"] .team-card {
    text-align: center;
  }

  .team-group-header {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .team-group-icon {
    margin: 0 auto;
  }

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


/* --- Hero Stats Fixed Layout --- */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  padding: 2.5rem 1.5rem;
  width: 100%;
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 2;
}

.stat-item {
  text-align: center;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 10;
}

.stat-item:hover {
  transform: translateY(-5px);
}


/* --- Stats Styling Removed to Consolidate Above --- */

@media (max-width: 992px) {
  .hero-stats {
    gap: 2rem;
  }

  .stat-value {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 2rem 1rem;
  }
}


/* --- Featured Devices Preview --- */
.devices-preview {
  padding: 10rem 0;
  background: radial-gradient(circle at 100% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 60%);
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-block;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--primary);
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
}


.view-all-wrap {
  margin-top: 5rem;
  text-align: center;
}

[data-theme="light"] .device-body h3 {
  color: var(--text);
}

[data-theme="light"] .device-img-wrap {
  background: var(--bg-deeper);
}

/* --- End of Global Styles --- */
.view-all-wrap .btn {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.2rem 2.5rem;
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.view-all-wrap .btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 212, 255, 0.3);
}

[data-theme="light"] .view-all-wrap .btn {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.05);
  color: var(--text);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .view-all-wrap .btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.devices-preview .container {
  max-width: 1400px;
}

/* ============ MASTER DEVICE CARD SYSTEM (Consolidated) ============ */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3.5rem;
  margin-top: 4rem;
}

.device-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.device-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  height: 200px;
  background: #000;
  margin-bottom: 1.8rem;
}

.device-img-card {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease;
}

.device-card:hover .device-img-card {
  transform: scale(1.08);
  opacity: 1;
}

.device-body {
  padding: 0 0.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.device-body h3 {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.8rem;
}

.device-body p {
  color: var(--text-dim);
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.device-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 1rem;
}

.spec-tag {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--primary);
  padding: 0.45rem 1rem;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

[data-theme="light"] .device-body h3 {
  color: var(--text);
}

[data-theme="light"] .spec-tag {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.15);
  color: #005f73;
}

/* ============ CUSTOM CYBER-INDUSTRIAL DEVICE CARDS (Home Exclusive) ============ */
.home-device-card {
  position: relative;
  background: rgba(10, 15, 25, 0.7);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 30px;
  padding: 1.5rem;
  transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.home-device-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 212, 255, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.home-device-card:hover::before {
  opacity: 1;
}

.home-device-card:hover {
  transform: translateY(-15px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 212, 255, 0.2);
}

.home-device-card .device-img-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  height: 220px;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Light Sweep Animation */
.home-device-card .device-img-wrap::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(45deg, transparent 45%, rgba(0, 212, 255, 0.3) 50%, transparent 55%);
  transition: all 0.8s ease-in-out;
  transform: rotate(45deg);
  pointer-events: none;
  opacity: 0;
}

.home-device-card:hover .device-img-wrap::after {
  top: -50%;
  left: -50%;
  opacity: 1;
}

.home-device-card .device-img-card {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) brightness(0.9);
  transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.home-device-card:hover .device-img-card {
  transform: scale(1.1) rotate(1deg);
  filter: saturate(1.2) brightness(1.1);
}

.home-device-card h3 {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(to right, #fff, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.home-device-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  flex-grow: 1;
}

.home-device-card .device-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: auto;
}

.home-device-card .spec-tag {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--primary);
  padding: 0.5rem 1.2rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  backdrop-filter: blur(5px);
}

/* Light Mode Adaptations */
[data-theme="light"] .home-device-card {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.05);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .home-device-card h3 {
  background: linear-gradient(to right, var(--text), var(--primary));
  -webkit-background-clip: text;
}

/* ============ DASHBOARD PREVIEW ============ */
.dashboard-preview {
  padding: 10rem 0;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 70%);
}

.dash-preview-container {
  max-width: 1000px;
  margin: 0 auto;
  perspective: 2000px;
}

.dash-preview-card {
  padding: 3rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  transform: rotateX(5deg);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

.dash-preview-card:hover {
  transform: rotateX(0deg) scale(1.02);
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 50px 120px rgba(0, 212, 255, 0.1);
}

.dash-card-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  font-family: 'Space Mono', monospace;
  letter-spacing: 2px;
  font-size: 0.9rem;
  color: var(--primary);
}

.status-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 15px var(--primary);
  animation: pulse 2s infinite;
}

.dash-timer {
  margin-left: auto;
  color: var(--text-dim);
}

.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 4rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-icon {
  font-size: 1.5rem;
  color: var(--primary);
  opacity: 0.8;
}

.stat-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.stat-val-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.stat-value {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
}

.unit {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 600;
}

.stat-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.stat-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #fff);
  box-shadow: 0 0 10px var(--primary);
}

.stat-bar.pulse {
  animation: bar-pulse 3s infinite;
}

.stat-bar.stability {
  background: linear-gradient(90deg, #00ff88, #fff);
  box-shadow: 0 0 10px #00ff88;
}

.dash-graph-decor {
  height: 100px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 3rem;
  opacity: 0.3;
}

.graph-line {
  flex: 1;
  background: var(--primary);
  height: 20%;
  animation: graph-anim 2s infinite alternate ease-in-out;
}

.graph-line:nth-child(2) {
  animation-delay: 0.4s;
  height: 40%;
}

.graph-line:nth-child(3) {
  animation-delay: 0.8s;
  height: 60%;
}

.dash-card-footer {
  text-align: center;
}

@keyframes bar-pulse {

  0%,
  100% {
    opacity: 1;
    width: 65%;
  }

  50% {
    opacity: 0.7;
    width: 80%;
  }
}

@keyframes graph-anim {
  from {
    height: 10%;
  }

  to {
    height: 90%;
  }
}

@media (max-width: 768px) {
  .dashboard-preview {
    padding: 6rem 0;
  }

  .dash-preview-card {
    padding: 2rem;
    transform: none !important;
  }

  .stat-value {
    font-size: 2.5rem;
  }
}

/* ============ DASHBOARD PREVIEW - LIGHT MODE ENHANCEMENTS ============ */
[data-theme="light"] .dashboard-preview {
  background: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.08) 0%, #f8fafc 100%);
}

[data-theme="light"] .dash-preview-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow: 0 30px 70px rgba(0, 95, 115, 0.1);
}

[data-theme="light"] .dash-preview-card:hover {
  box-shadow: 0 40px 90px rgba(0, 212, 255, 0.15);
  border-color: var(--primary);
}

[data-theme="light"] .dash-card-header {
  border-bottom-color: rgba(0, 95, 115, 0.1);
  color: var(--primary);
}

[data-theme="light"] .stat-value {
  color: #0f172a;
}

[data-theme="light"] .stat-label {
  color: #64748b;
}

[data-theme="light"] .stat-progress {
  background: rgba(0, 95, 115, 0.05);
}

[data-theme="light"] .stat-bar {
  background: linear-gradient(90deg, var(--primary), #0099cc);
}

[data-theme="light"] .dash-graph-decor {
  opacity: 0.15;
}

[data-theme="light"] .dash-timer {
  color: #64748b;
}

[data-theme="light"] .btn-glow {
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

/* ============ TEAM MARQUEE SHOWCASE ============ */
.team-showcase {
  padding: 8rem 0;
  background: rgba(0, 212, 255, 0.02);
  overflow: hidden;
}

.team-marquee-wrap {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 4rem 0;
}

.marquee-row {
  display: flex;
  width: 100%;
  overflow: hidden;
  user-select: none;
}

.marquee-content {
  display: flex;
  gap: 2rem;
  padding: 1rem 0;
  animation: marquee-scroll 40s linear infinite;
}

.marquee-right .marquee-content {
  animation-direction: reverse;
}

.team-mini-card {
  flex: 0 0 400px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(15px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ID Card Background Pattern */
.team-mini-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 2px 2px, rgba(0, 212, 255, 0.05) 1px, transparent 0);
  background-size: 15px 15px;
  opacity: 0.5;
  pointer-events: none;
}

[data-theme="light"] .team-mini-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 212, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.team-mini-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.id-card-left {
  flex: 0 0 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  border-right: 1px dashed rgba(0, 212, 255, 0.2);
  padding-right: 1rem;
  margin-right: 1rem;
  position: relative;
  z-index: 2;
}

.id-chip {
  width: 35px;
  height: 25px;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-radius: 4px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.id-chip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(0, 212, 255, 0.2);
}

.team-mini-card:hover .id-chip {
  animation: chip-scan 2s linear infinite;
}

@keyframes chip-scan {
  0% {
    filter: brightness(1) hue-rotate(0deg);
  }

  50% {
    filter: brightness(1.5) hue-rotate(180deg);
  }

  100% {
    filter: brightness(1) hue-rotate(360deg);
  }
}

.id-card-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.id-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.id-label {
  font-size: 0.55rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1px;
  opacity: 0.8;
}

.id-number {
  font-family: monospace;
  font-size: 0.65rem;
  color: var(--text-dim);
}

/* ============ FOOTER (High-Fidelity Cyber Footer) ============ */
.site-footer {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(6, 13, 31, 0.95) 20%);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(168, 85, 247, 0.2);
  padding: 80px 0 30px;
  margin-top: 100px;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 15px var(--primary);
  opacity: 0.3;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 3rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-brand .header-logo img {
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.3));
}

.footer-mission {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-dim);
  max-width: 350px;
}

.footer-certifications {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.cert-icon {
  width: 45px;
  height: 45px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  color: var(--primary);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.cert-icon:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: var(--primary);
  transform: translateY(-3px);
}

.footer-col h4 {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

[dir="rtl"] .footer-col h4::after {
  left: auto;
  right: 0;
}

.footer-col a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  width: fit-content;
}

.footer-col a i {
  font-size: 0.7rem;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.footer-col a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

[dir="rtl"] .footer-col a:hover {
  transform: translateX(-5px);
}

.footer-col a:hover i {
  opacity: 1;
  color: var(--primary);
}

/* --- Newsletter & Socials Fix --- */
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.newsletter-form {
  position: relative;
  display: flex;
  margin-top: 0.5rem;
  max-width: 300px;
}

.newsletter-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  color: var(--text);
  outline: none;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.newsletter-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 15px rgba(129, 152, 255, 0.2);
}

.newsletter-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

[dir="rtl"] .newsletter-btn {
  right: auto;
  left: 6px;
}

.newsletter-btn:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 15px var(--primary);
}

.footer-socials {
  display: flex;
  flex-direction: row; /* Ensure horizontal alignment */
  gap: 0.8rem;
  margin-top: 1rem;
}

.social-link {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-link:hover {
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-5px);
  background: rgba(129, 152, 255, 0.1);
  box-shadow: 0 5px 20px rgba(129, 152, 255, 0.3);
}

/* --- Icon Upgrades (Professional Cyber Style) --- */
.footer-col a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-col a i {
  font-size: 0.9rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(129, 152, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(129, 152, 255, 0.1);
  color: var(--primary);
  transition: all 0.4s ease;
}

.footer-col a:hover {
  color: #fff;
  transform: translateX(5px);
}

[dir="rtl"] .footer-col a:hover {
  transform: translateX(-5px);
}

.footer-col a:hover i {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px var(--primary);
  transform: rotate(360deg);
}

/* Cert Icons Polish */
.footer-certifications {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.cert-icon {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-dim);
  transition: all 0.3s ease;
}

.cert-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(129, 152, 255, 0.05);
  transform: translateY(-3px);
}

/* --- Compact Terminal Typography --- */
.footer-terminal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  perspective: 1000px;
}

.terminal-text {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

.footer-terminal:hover .terminal-text {
  transform: scale(1.1) translateZ(10px);
  filter: drop-shadow(0 0 10px var(--primary));
  letter-spacing: 3px;
}

.footer-terminal:hover .terminal-text::before,
.footer-terminal:hover .terminal-text::after {
  content: attr(data-terminal);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.footer-terminal:hover .terminal-text::before {
  color: #ff00c1;
  z-index: -1;
  animation: glitch 0.3s cubic-bezier(.25,.46,.45,.94) both infinite;
}

.footer-terminal:hover .terminal-text::after {
  color: #00fff9;
  z-index: -2;
  animation: glitch 0.3s cubic-bezier(.25,.46,.45,.94) reverse both infinite;
}

.terminal-loader {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--secondary);
}

.terminal-cursor {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--primary);
  animation: terminal-blink 0.8s infinite;
}

/* --- Footer Bottom & Status --- */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 40px;
  padding-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
  gap: 1.5rem;
}

.copyright {
  font-size: 0.85rem;
  color: var(--text-dim);
  flex: 1;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: rgba(0, 221, 136, 0.05);
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  border: 1px solid rgba(0, 221, 136, 0.1);
  flex: 1;
  justify-content: flex-end;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 221, 136, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(0, 221, 136, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 221, 136, 0);
  }
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

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

  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}

.team-info h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  color: #fff;
}

[data-theme="light"] .team-info h4 {
  color: #0f172a;
}

.id-field {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.id-value {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
}

.id-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 0.8rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.id-status {
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.id-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
}

.id-barcode {
  width: 60px;
  height: 15px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0, rgba(255, 255, 255, 0.2) 2px, transparent 2px, transparent 4px);
}

[data-theme="light"] .id-barcode {
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0, rgba(0, 0, 0, 0.2) 2px, transparent 2px, transparent 4px);
}

.team-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
  transition: all 0.3s ease;
}

.team-mini-card:hover .team-icon-wrap {
  background: var(--primary);
  color: #fff;
  transform: rotate(360deg);
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-100% - 2rem));
  }
}

.marquee-row:hover .marquee-content {
  animation-play-state: paused;
}

@media (max-width: 768px) {
  .team-mini-card {
    flex: 0 0 320px;
  }
}

[data-theme="light"] .team-icon-wrap {
  background: rgba(0, 212, 255, 0.05);
  border-color: rgba(0, 212, 255, 0.2);
}

/* ============ ARABIC TYPOGRAPHY SYSTEM ============ */
.lalezar-regular {
  font-family: "Lalezar", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.marhey-modern {
  font-family: "Marhey", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

/* Automatic Application for Arabic Language */
[lang="ar"] h1,
[lang="ar"] h2,
[lang="ar"] h3,
[lang="ar"] .header-logo,
[lang="ar"] .stat-value,
[lang="ar"] .badge {
  font-family: "Lalezar", system-ui, sans-serif !important;
  letter-spacing: 0 !important;
}

[lang="ar"] body,
[lang="ar"] p,
[lang="ar"] span,
[lang="ar"] a,
[lang="ar"] input,
[lang="ar"] button:not(.badge) {
  font-family: "Marhey", system-ui, sans-serif !important;
}

/* ============ DEVICES FULL PAGE OPTIMIZATION ============ */
.devices-full-container {
  max-width: 1400px !important;
  margin: 0 auto;
}

@media (max-width: 1450px) {
  .devices-full-container {
    padding: 0 4rem;
  }
}

@media (max-width: 768px) {
  .devices-full-container {
    padding: 0 1.5rem;
  }

  .devices-grid {
    gap: 2rem;
  }
}

/* ============ CONTACT PAGE OPTIMIZATION ============ */
.contact-grid {
  max-width: 1300px;
  margin: 0 auto;
  gap: 3rem;
}

[lang="ar"] .contact-grid {
  text-align: right;
}

[lang="ar"] .form-group label {
  font-family: "Lalezar", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0;
  margin-bottom: 0.6rem;
}

[lang="ar"] .form-control {
  font-family: "Marhey", sans-serif;
  font-size: 0.85rem;
}

[lang="ar"] .contact-info-item {
  flex-direction: row-reverse;
  text-align: right;
}

[lang="ar"] .contact-icon {
  margin-left: 0;
  margin-right: 0;
}

.map-placeholder {
  height: 300px !important;
  margin-top: 2rem;
  border-radius: var(--radius-sm);
  position: relative;
}

[data-theme="light"] .form-control {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text);
}

[data-theme="light"] .contact-icon {
  background: rgba(0, 212, 255, 0.05);
}
/* ============================================================
   ULTIMATE MOBILE FIXES (HEADER & FOOTER) - FINAL OVERRIDE
   ============================================================ */

@media (max-width: 992px) {
  /* 1. Mobile Header (Floating Capsule) */
  .site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    height: 65px !important;
    border-radius: 0 !important;
    background: rgba(6, 13, 31, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 0 1.2rem !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .header-main {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 !important;
  }

  /* RTL Support for Header Main */
  [dir="rtl"] .header-main {
    /* Removed row-reverse, let browser handle RTL flex */
  }

  .header-logo {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  .header-logo img {
    height: 38px !important;
    width: auto !important;
  }

  /* Hide Desktop Elements */
  .header-nav:not(.open),
  .header-right,
  .header-sub {
    display: none !important;
  }

  /* 2. Mobile Menu Overlay */
  .header-nav.open {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    background: rgba(6, 13, 31, 0.98) !important;
    backdrop-filter: blur(30px) !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1.5rem !important;
    z-index: 9998 !important;
    padding: 2rem !important;
  }

  .header-nav.open a {
    font-size: 1.4rem !important;
    width: 85% !important;
    padding: 1.2rem !important;
    border-radius: 15px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    text-align: center !important;
    color: #fff !important;
    text-decoration: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
  }

  /* 3. Hamburger Toggle */
  .mobile-toggle {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    width: 45px !important;
    height: 45px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    z-index: 10000 !important;
    margin: 0 !important;
  }

  .mobile-toggle span {
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    background: var(--primary) !important;
    transition: all 0.3s ease !important;
  }

  .mobile-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg) !important; }
  .mobile-toggle.open span:nth-child(2) { opacity: 0 !important; }
  .mobile-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg) !important; }

  /* 4. Footer Polish on Mobile */
  .footer-main {
    grid-template-columns: 1fr !important;
    text-align: center !important;
    gap: 3rem !important;
  }

  .footer-brand {
    align-items: center !important;
  }

  .footer-links-grid {
    grid-template-columns: 1fr 1fr !important;
    text-align: left !important;
  }

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

  .footer-bottom {
    flex-direction: column !important;
    gap: 1.5rem !important;
    text-align: center !important;
    padding: 2rem 1rem !important;
  }

  .footer-terminal {
    width: 100% !important;
    order: -1 !important;
  }

  .system-status {
    width: 100% !important;
    justify-content: center !important;
  }
}

@media (max-width: 480px) {
  .footer-links-grid {
    grid-template-columns: 1fr !important;
    text-align: center !important;
  }
  
  [dir="rtl"] .footer-links-grid {
    text-align: center !important;
  }
}

/* ============================================================
   FORCED RTL & VISIBILITY FIXES
   ============================================================ */
@media (max-width: 992px) {
  [dir="rtl"] .header-logo {
    order: 2 !important;
  }
  [dir="rtl"] .mobile-toggle {
    order: 1 !important;
  }
  
  .mobile-toggle {
    background: var(--primary) !important;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3) !important;
  }
  
  .mobile-toggle span {
    background: #fff !important;
  }
}

/* ============================================================
   PREMIUM MOBILE BOTTOM NAVIGATION (APP-STYLE)
   ============================================================ */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 992px) {
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 1.5rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 3rem) !important;
    height: 65px !important;
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 25px !important;
    z-index: 9999 !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 0 1rem !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4) !important;
  }

  .mobile-bottom-nav a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-dim) !important;
    text-decoration: none !important;
    font-size: 0.65rem !important;
    gap: 4px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    width: 20% !important;
  }

  .mobile-bottom-nav a i {
    font-size: 1.2rem !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  }

  .mobile-bottom-nav a.active {
    color: var(--primary) !important;
  }

  .mobile-bottom-nav a.active i {
    transform: translateY(-8px) scale(1.2) !important;
    text-shadow: 0 0 15px var(--primary) !important;
  }

  .mobile-bottom-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    width: 5px;
    height: 5px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
  }
  
  /* Prevent content overlap with bottom nav */
  body {
    padding-bottom: 100px !important;
  }
}

/* ============================================================
   ULTIMATE MINIMALIST MOBILE HEADER (SEARCH + THEME + LANG)
   ============================================================ */
@media (max-width: 992px) {
  .site-header {
    height: 70px !important;
    padding: 0 0.8rem !important;
    border-radius: 0 !important;
    top: 0 !important;
    width: 100% !important;
    background: rgba(6, 13, 31, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  }

  .header-main {
    justify-content: space-between !important;
    gap: 0.5rem !important;
  }

  /* Show Logo */
  .header-logo {
    flex-shrink: 0 !important;
  }
  
  .header-logo img {
    height: 32px !important;
  }
  
  .logo-orbit {
    display: none !important; /* Hide orbit on mobile for space */
  }

  /* 1. Hide Hamburger Toggle (Replaced by bottom nav) */
  .mobile-toggle {
    display: none !important;
  }

  /* 2. Show Theme and Lang in Header */
  .header-right {
    display: flex !important;
    gap: 0.4rem !important;
    align-items: center !important;
    flex-shrink: 0 !important;
  }

  .theme-toggle, .lang-btn {
    width: 38px !important;
    height: 38px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
  }

  /* 3. Integrate Smart Search in Header */
  .smart-search-wrap {
    display: flex !important;
    flex: 1 !important;
    margin: 0 0.2rem !important;
    position: relative !important;
  }

  .smart-search-input {
    width: 100% !important;
    height: 38px !important;
    padding: 0 1rem 0 2.2rem !important;
    font-size: 0.75rem !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.05) !important;
  }

  .smart-search-icon {
    left: 0.8rem !important;
    font-size: 0.7rem !important;
  }
  
  /* Hide desktop nav links in header */
  .header-nav {
    display: none !important;
  }
}

/* ============================================================
   MINIMALIST MOBILE HEADER REFINEMENT
   ============================================================ */
.mobile-only-search {
  display: none;
}

@media (max-width: 992px) {
  .site-header {
    background: rgba(6, 13, 31, 0.98) !important;
    height: 70px !important;
  }

  .header-main {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
  }

  [dir="rtl"] .header-main {
    /* Removed row-reverse, let browser handle RTL flex */
  }

  .mobile-only-search {
    display: flex !important;
    flex: 1 !important;
    margin: 0 0.5rem !important;
  }

  .mobile-only-search .smart-search-input {
    width: 100% !important;
    height: 38px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 0 1rem 0 2rem !important;
    font-size: 0.8rem !important;
    color: #fff !important;
  }

  [dir="rtl"] .mobile-only-search .smart-search-input {
    padding: 0 2rem 0 1rem !important;
  }

  .header-right {
    display: flex !important;
    gap: 0.4rem !important;
  }

  .header-logo img {
    height: 30px !important;
  }

  /* Hide regular elements on mobile */
  .header-sub, .mobile-toggle, .header-nav {
    display: none !important;
  }
}

/* Ensure desktop doesn't see mobile search */
@media (min-width: 993px) {
  .mobile-only-search {
    display: none !important;
  }
}

/* ============================================================
   MOBILE HEADER OVERFLOW & ALIGNMENT FIX
   ============================================================ */
@media (max-width: 992px) {
  .site-header {
    padding: 0 0.5rem !important; /* Reduce side padding */
    overflow: visible !important;
  }

  .header-main {
    gap: 0.3rem !important; /* Tighter gaps */
    width: 100% !important;
  }

  .header-logo {
    min-width: 40px !important;
  }

  .mobile-only-search {
    margin: 0 0.3rem !important;
    min-width: 0 !important; /* Allow shrinking */
    flex: 1 1 auto !important;
  }

  .mobile-only-search .smart-search-input {
    padding: 0 0.8rem 0 1.8rem !important; /* Compact padding */
    font-size: 0.7rem !important;
  }

  [dir="rtl"] .mobile-only-search .smart-search-input {
    padding: 0 1.8rem 0 0.8rem !important;
  }

  .header-right {
    gap: 0.2rem !important;
  }

  .theme-toggle, .lang-btn {
    width: 34px !important; /* Slightly smaller buttons */
    height: 34px !important;
    border-radius: 10px !important;
  }
}

/* ============================================================
   LIGHT MODE SUPPORT FOR HEADER & BOTTOM NAV
   ============================================================ */
[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.8) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  backdrop-filter: blur(20px) !important;
}

[data-theme="light"] .mobile-only-search .smart-search-input {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #0f172a !important;
}

[data-theme="light"] .theme-toggle, 
[data-theme="light"] .lang-btn {
  background: rgba(0, 0, 0, 0.03) !important;
  color: #0f172a !important;
}

[data-theme="light"] .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .mobile-bottom-nav a {
  color: #64748b !important;
}

[data-theme="light"] .mobile-bottom-nav a.active {
  color: var(--primary) !important;
}

/* Fix Search Icon Color in Light Mode */
[data-theme="light"] .smart-search-icon {
  color: #64748b !important;
}

/* ============================================================
   FINAL PRECISION HEADER ADJUSTMENT (RTL + MOBILE)
   ============================================================ */
@media (max-width: 992px) {
  .site-header {
    height: 60px !important;
    padding: 0 0.5rem !important;
  }

  .header-main {
    gap: 0.2rem !important;
  }

  .header-logo {
    width: 32px !important;
    flex: 0 0 32px !important;
    display: flex !important;
    justify-content: center !important;
  }

  .header-logo img {
    height: 28px !important;
    width: auto !important;
  }

  .mobile-only-search {
    flex: 1 1 auto !important;
    max-width: 160px !important; /* Prevent search from crushing other items */
    margin: 0 0.2rem !important;
  }

  .mobile-only-search .smart-search-input {
    height: 34px !important;
    font-size: 0.65rem !important;
    padding: 0 0.5rem 0 1.5rem !important;
  }

  [dir="rtl"] .mobile-only-search .smart-search-input {
    padding: 0 1.5rem 0 0.5rem !important;
  }

  .header-right {
    flex: 0 0 auto !important;
    gap: 0.2rem !important;
  }

  .theme-toggle, .lang-btn {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.8rem !important;
  }
}

/* Light Mode Polish for Bottom Nav Active State */
[data-theme="light"] .mobile-bottom-nav a.active i {
  color: var(--primary) !important;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3) !important;
}

/* ============================================================
   MOBILE SEARCH RESULTS POSITIONING FIX
   ============================================================ */
@media (max-width: 992px) {
  .mobile-only-search {
    position: relative !important;
  }

  .mobile-only-search .smart-results {
    top: 50px !important;
    left: 0 !important;
    width: calc(100vw - 2rem) !important;
    max-width: 350px !important;
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 15px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
  }

  [data-theme="light"] .mobile-only-search .smart-results {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
  }
}

/* ============================================================
   ULTIMATE SEARCH RESULTS VISIBILITY FIX (MOBILE)
   ============================================================ */
@media (max-width: 992px) {
  .mobile-only-search .smart-results {
    display: block !important; /* Ensure it's not hidden by display:none */
    z-index: 10001 !important;
    padding: 0.5rem !important;
  }

  .search-result-item {
    background: rgba(255, 255, 255, 0.05) !important;
    margin-bottom: 5px !important;
    border-radius: 10px !important;
    padding: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    display: block !important;
  }

  [data-theme="light"] .search-result-item {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
    color: #0f172a !important;
  }

  .search-result-item div {
    color: inherit !important;
  }

  /* Force visibility properties for JS-controlled elements */
  .smart-results[style*="opacity: 1"] {
    display: block !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
  }
}
