html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html[lang="ar"] body,
html[dir="rtl"] body {
  font-family: 'Cairo', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html[lang="ar"] *,
html[dir="rtl"] * {
  font-family: 'Cairo', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html[lang="en"] *,
html[dir="ltr"] * {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ========== Glassmorphism Navbar ========== */
.glass-nav {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

[data-theme="dark"] .glass-nav {
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-nav .navbar-brand {
  font-size: 1.4rem;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== Navbar Link Styles ========== */
.nav-link-styled {
  font-weight: 500;
  font-size: 0.92rem;
  padding: 8px 14px !important;
  border-radius: 8px;
  transition: all 0.25s ease;
  color: var(--text-primary) !important;
}
.nav-link-styled i {
  font-size: 0.85rem;
  opacity: 0.6;
  transition: opacity 0.25s ease;
}
.nav-link-styled:hover {
  background: rgba(59, 130, 246, 0.08);
  color: #3b82f6 !important;
}
.nav-link-styled:hover i {
  opacity: 1;
}

/* ========== Navbar Icon Buttons (Theme + Lang) ========== */
.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: auto;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}
.nav-icon-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}
.nav-icon-btn i {
  transition: transform 0.3s ease;
}
.nav-icon-btn:hover i {
  transform: rotate(15deg);
}
.nav-icon-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Theme toggle active state (dark mode) */
[data-theme="dark"] #themeToggle {
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.3);
  color: #facc15;
}
[data-theme="dark"] #themeToggle:hover {
  background: rgba(250, 204, 21, 0.2);
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.2);
}

/* ========== Scroll Reveal Animation ========== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal.reveal-left {
  transform: translateX(-40px);
}
.scroll-reveal.reveal-left.revealed {
  transform: translateX(0);
}

.scroll-reveal.reveal-right {
  transform: translateX(40px);
}
.scroll-reveal.reveal-right.revealed {
  transform: translateX(0);
}

.scroll-reveal.reveal-scale {
  transform: scale(0.9);
}
.scroll-reveal.reveal-scale.revealed {
  transform: scale(1);
}

/* Staggered children */
.stagger-children .scroll-reveal:nth-child(1) { transition-delay: 0s; }
.stagger-children .scroll-reveal:nth-child(2) { transition-delay: 0.08s; }
.stagger-children .scroll-reveal:nth-child(3) { transition-delay: 0.16s; }
.stagger-children .scroll-reveal:nth-child(4) { transition-delay: 0.24s; }
.stagger-children .scroll-reveal:nth-child(5) { transition-delay: 0.32s; }
.stagger-children .scroll-reveal:nth-child(6) { transition-delay: 0.4s; }
.stagger-children .scroll-reveal:nth-child(7) { transition-delay: 0.48s; }
.stagger-children .scroll-reveal:nth-child(8) { transition-delay: 0.56s; }

/* ========== Hero Section ========== */
.hero-section {
  padding-top: 120px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  animation: float-orb 12s ease-in-out infinite;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
  animation: float-orb 15s ease-in-out infinite reverse;
}

/* Floating particle dots */
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.hero-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.2);
  animation: particle-float linear infinite;
}
.hero-particle:nth-child(1) { left: 10%; top: 20%; width: 8px; height: 8px; animation-duration: 20s; background: rgba(99, 102, 241, 0.15); }
.hero-particle:nth-child(2) { left: 25%; top: 60%; animation-duration: 25s; animation-delay: -5s; }
.hero-particle:nth-child(3) { left: 50%; top: 15%; width: 10px; height: 10px; animation-duration: 18s; animation-delay: -8s; background: rgba(139, 92, 246, 0.12); }
.hero-particle:nth-child(4) { left: 70%; top: 45%; animation-duration: 22s; animation-delay: -3s; }
.hero-particle:nth-child(5) { left: 85%; top: 75%; width: 8px; height: 8px; animation-duration: 28s; animation-delay: -12s; background: rgba(59, 130, 246, 0.15); }
.hero-particle:nth-child(6) { left: 40%; top: 80%; animation-duration: 24s; animation-delay: -7s; }

@keyframes particle-float {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100vh) translateX(30px); opacity: 0; }
}

@keyframes float-orb {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  33% { transform: translateY(-30px) rotate(3deg) scale(1.05); }
  66% { transform: translateY(15px) rotate(-2deg) scale(0.97); }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #3b82f6);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  animation: gradient-text 4s ease infinite;
}

@keyframes gradient-text {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.7;
  max-width: 520px;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-hero-primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border: none;
  color: #fff;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-hero-primary::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #3b82f6);
  background-size: 200% 200%;
  animation: gradient-text 3s ease infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.45);
  color: #fff;
}
.btn-hero-primary:hover::after {
  opacity: 1;
}

.btn-hero-outline {
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 32px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.btn-hero-outline:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

/* ========== Hero Icon Grid ========== */
.hero-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  perspective: 800px;
}

.hero-icon-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px 16px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.hero-icon-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hero-icon-item:hover {
  transform: translateY(-8px) rotateX(5deg);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
}

.hero-icon-item:hover::before {
  opacity: 1;
}

.hero-icon-item i {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.4s ease;
  position: relative;
  z-index: 1;
}

.hero-icon-item:hover i {
  transform: scale(1.15);
}

.hero-icon-item span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

/* ========== Feature Cards ========== */
.feature-card {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  background-color: var(--card-bg);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

/* ========== Stats Section ========== */
.stats-section {
  padding: 80px 0;
}

.stat-counter {
  text-align: center;
  padding: 24px;
}

.stat-counter .counter-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-counter .counter-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ========== Landing Footer ========== */
.landing-footer {
  padding: 48px 0 24px;
  position: relative;
}

.landing-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #3b82f6, #8b5cf6, transparent);
}

/* ========== Auth Pages (Split-screen) ========== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
}

.auth-brand-panel {
  flex: 0 0 45%;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e1b4b 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -20%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  animation: float-orb 12s ease-in-out infinite;
}

.auth-brand-panel::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  animation: float-orb 15s ease-in-out infinite reverse;
}

.auth-brand-panel .brand-logo {
  font-size: 3rem;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  animation: float-orb 6s ease-in-out infinite;
}

.auth-brand-panel .brand-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.auth-brand-panel .brand-tagline {
  font-size: 1.1rem;
  opacity: 0.8;
  text-align: center;
  max-width: 320px;
  position: relative;
  z-index: 1;
}

.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background-color: var(--bg-primary);
}

.auth-form-card {
  width: 100%;
  max-width: 420px;
}

.auth-form-card h2 {
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-form-card .auth-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.auth-input-group {
  position: relative;
  margin-bottom: 20px;
}

.auth-input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  z-index: 2;
  transition: color 0.3s ease;
}

[dir="rtl"] .auth-input-group .input-icon {
  left: auto;
  right: 14px;
}

.auth-input-group .form-control {
  padding-left: 42px;
  padding-right: 14px;
  height: 48px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.auth-input-group .form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-input-group .form-control:focus + .input-icon,
.auth-input-group:focus-within .input-icon {
  color: #3b82f6;
}

[dir="rtl"] .auth-input-group .form-control {
  padding-left: 14px;
  padding-right: 42px;
}

.btn-auth {
  height: 48px;
  border-radius: 10px;
  font-weight: 600;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border: none;
  color: #fff;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-auth::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}

.btn-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
  color: #fff;
}
.btn-auth:hover::before {
  left: 100%;
}

@media (max-width: 991.98px) {
  .auth-brand-panel {
    display: none;
  }
  .auth-form-panel {
    padding: 24px;
  }
}

/* ========== Login Modal Enhanced ========== */
.login-modal .modal-content {
  border-radius: 20px;
  overflow: hidden;
  border: none;
  background: var(--card-bg);
  animation: modal-entrance 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-entrance {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.login-modal .modal-body {
  padding: 0;
}

.login-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
}

/* Brand Panel */
.login-modal-brand {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.login-modal-brand::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  animation: float-orb 10s ease-in-out infinite;
}
.login-modal-brand::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
  animation: float-orb 13s ease-in-out infinite reverse;
}

.login-brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  animation: float-orb 6s ease-in-out infinite;
}
.login-brand-logo i {
  font-size: 2rem;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-modal-brand h4 {
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.login-brand-tagline {
  opacity: 0.55;
  font-size: 0.85rem;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

.login-brand-divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  margin: 24px auto;
  position: relative;
  z-index: 1;
}

.login-brand-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  position: relative;
  z-index: 1;
}
.login-brand-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  opacity: 0.8;
  text-align: start;
  transition: all 0.3s ease;
}
.login-brand-feature:hover {
  opacity: 1;
  transform: translateX(4px);
}
[dir="rtl"] .login-brand-feature:hover {
  transform: translateX(-4px);
}
.login-feature-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background 0.3s ease;
}
.login-brand-feature:hover .login-feature-icon {
  background: rgba(255, 255, 255, 0.12);
}

/* Form Panel */
.login-modal-form {
  padding: 44px 40px;
  position: relative;
}

.login-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  opacity: 0.5;
  transition: all 0.3s ease;
}
[dir="rtl"] .login-close-btn {
  right: auto;
  left: 16px;
}
.login-close-btn:hover {
  opacity: 1;
  transform: rotate(90deg);
}

.login-form-header {
  text-align: center;
  margin-bottom: 28px;
}
.login-form-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.1); }
  50% { box-shadow: 0 0 0 12px rgba(59, 130, 246, 0); }
}

.login-form-avatar i {
  font-size: 1.6rem;
  color: #3b82f6;
}
.login-form-header h4 {
  font-weight: 800;
  font-size: 1.35rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.login-form-header p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 0;
}

.login-error {
  border-radius: 10px;
  font-size: 0.88rem;
  border: none;
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}

.login-btn-text,
.login-btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-secure-badge {
  text-align: center;
  margin-top: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.7;
}

@media (max-width: 767.98px) {
  .login-modal-grid {
    grid-template-columns: 1fr;
  }
  .login-modal-brand {
    display: none;
  }
  .login-modal-form {
    padding: 32px 24px;
  }
}

/* ========== Animations ========== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in-up.delay-1 { animation-delay: 0.1s; }
.fade-in-up.delay-2 { animation-delay: 0.2s; }
.fade-in-up.delay-3 { animation-delay: 0.3s; }
.fade-in-up.delay-4 { animation-delay: 0.4s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== Section Shared Styles ========== */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.7;
}

.section-pill {
  display: inline-block;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ========== Section Wave Dividers ========== */
.section-wave {
  position: relative;
  overflow: hidden;
}
.section-wave::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-primary);
  clip-path: ellipse(55% 100% at 50% 0%);
  z-index: 1;
}

.section-wave-bottom::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-primary);
  clip-path: ellipse(55% 100% at 50% 100%);
  z-index: 1;
}

/* ========== Module Cards (Landing Page) ========== */
.modules-section {
  padding: 100px 0;
}

.module-card {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 28px;
  background: var(--card-bg);
  border-left: 4px solid transparent;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Shimmer overlay on hover */
.module-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  transition: left 0.6s ease;
}

.module-card:hover::after {
  left: 150%;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.module-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

.module-card:hover::before {
  opacity: 1;
}

.module-card-blue   { border-left-color: #3b82f6; }
.module-card-purple { border-left-color: #8b5cf6; }
.module-card-green  { border-left-color: #22c55e; }
.module-card-amber  { border-left-color: #f59e0b; }
.module-card-teal   { border-left-color: #14b8a6; }
.module-card-indigo { border-left-color: #6366f1; }
.module-card-red    { border-left-color: #ef4444; }
.module-card-cyan   { border-left-color: #06b6d4; }

.module-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.module-card-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.4s ease;
}

.module-card:hover .module-card-icon {
  transform: scale(1.1) rotate(-5deg);
}

.module-card-header h5 {
  font-weight: 700;
  margin: 0;
  font-size: 1.05rem;
}

.module-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.module-card ul li {
  background: rgba(59, 130, 246, 0.06);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.module-card:hover ul li {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.15);
}

/* ========== POS Highlight Banner ========== */
.pos-highlight {
  padding: 80px 0;
}

.pos-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  border-radius: 24px;
  padding: 56px 48px;
  position: relative;
  overflow: hidden;
  color: #ffffff;
}

.pos-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  animation: float-orb 10s ease-in-out infinite;
}

.pos-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  animation: float-orb 13s ease-in-out infinite reverse;
}

.pos-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  animation: pulse-glow 3s ease-in-out infinite;
}

.pos-icon i {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pos-badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

.pos-card h3 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.pos-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 600px;
  position: relative;
  z-index: 1;
  margin: 0;
}

.pos-ghost-icon {
  font-size: 10rem;
  opacity: 0.06;
  position: relative;
  z-index: 1;
  animation: float-orb 8s ease-in-out infinite;
}

/* ========== Benefits Section ========== */
.benefits-section {
  padding: 100px 0;
}

.benefit-card {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 36px 28px;
  background: var(--card-bg);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.benefit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: center;
}

.benefit-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.1);
}

.benefit-card:hover::before {
  transform: scaleX(1);
}

.benefit-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
  transition: transform 0.4s ease;
}

.benefit-card:hover .benefit-icon {
  transform: scale(1.1) rotate(-5deg);
}

.benefit-card h5 {
  font-weight: 700;
  margin-bottom: 10px;
}

.benefit-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

/* ========== Dark Stats Section ========== */
.stats-dark {
  padding: 100px 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  position: relative;
  overflow: hidden;
}

.stats-dark::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 20%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  animation: float-orb 15s ease-in-out infinite;
}

.stats-dark .stat-counter {
  text-align: center;
  padding: 32px 24px;
}

.stats-dark .counter-value {
  font-size: 3.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stats-dark .counter-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  margin-top: 8px;
  font-weight: 500;
}

/* Decorative line under each stat */
.stats-dark .stat-counter::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  border-radius: 2px;
  margin: 16px auto 0;
  opacity: 0.5;
}

/* ========== CTA Section ========== */
.cta-section {
  padding: 100px 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
  animation: float-orb 10s ease-in-out infinite;
}

.cta-section::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -5%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  animation: float-orb 12s ease-in-out infinite reverse;
}

.cta-section h2 {
  font-size: 2.4rem;
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  line-height: 1.7;
}

.btn-cta-white {
  background: white;
  color: #1e293b;
  padding: 16px 40px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.btn-cta-white::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.08), transparent);
  transition: left 0.5s ease;
}

.btn-cta-white:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  color: #1e293b;
}
.btn-cta-white:hover::before {
  left: 100%;
}

/* ========== Responsive ========== */
@media (max-width: 767.98px) {
  .hero-section {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-icon-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .hero-icon-item {
    padding: 16px 10px;
  }

  .hero-icon-item i {
    font-size: 1.6rem;
  }

  .modules-section,
  .benefits-section,
  .pos-highlight {
    padding: 60px 0;
  }

  .stats-dark,
  .cta-section {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .cta-section h2 {
    font-size: 1.8rem;
  }

  .pos-card {
    padding: 36px 24px;
  }

  .pos-card h3 {
    font-size: 1.5rem;
  }

  .stats-dark .counter-value {
    font-size: 2.4rem;
  }

  .hero-particles {
    display: none;
  }
}

/* ========== Footer Links ========== */
.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.25s ease;
}
.footer-link:hover {
  color: #3b82f6;
}

/* ========== Legal Pages (Privacy & Terms) ========== */
.legal-page {
  padding-top: 120px;
  padding-bottom: 80px;
  min-height: 80vh;
}
.legal-header {
  text-align: center;
  margin-bottom: 48px;
}
.legal-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #3b82f6;
  margin: 0 auto 20px;
}
.legal-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.legal-date {
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.legal-content {
  max-width: 800px;
  margin: 0 auto;
}
.legal-intro {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 32px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.legal-intro p {
  margin: 0;
}
.legal-section {
  display: flex;
  gap: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}
.legal-section:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.legal-section-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-top: 2px;
}
.legal-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.legal-section p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}
.legal-back {
  text-align: center;
  margin-top: 48px;
}

@media (max-width: 767.98px) {
  .legal-page { padding-top: 100px; padding-bottom: 60px; }
  .legal-header h1 { font-size: 1.6rem; }
  .legal-section { flex-direction: column; gap: 12px; padding: 20px 24px; }
  .legal-intro { padding: 20px 24px; }
}
