/* ==========================================
   NEXARION 2026 - MAIN STYLE SHEET
   PURE CSS3 & CSS VARIABLES
   ========================================== */

:root {
  /* Color Palette */
  --primary: #2563EB;
  --primary-light: #3B82F6;
  --secondary: #0EA5E9;
  --accent: #06B6D4;
  --dark: #0F172A;
  --dark-surface: #1E293B;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(226, 232, 240, 0.8);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 25px -5px rgba(37, 99, 235, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.25);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-fa: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
  --header-height: 84px;
}

[data-theme="dark"] {
  --bg: #0B1120;
  --surface: #0F172A;
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --border: #1E293B;
  --glass-bg: rgba(15, 23, 42, 0.82);
  --glass-border: rgba(51, 65, 85, 0.6);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 35px rgba(14, 165, 233, 0.35);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-en);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

[dir="rtl"] body {
  font-family: var(--font-fa);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

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

svg:not([class*="icon-"]) {
  display: block;
}

button, input, textarea, select {
  font: inherit;
  border: none;
  outline: none;
  background: none;
}

/* Custom Selection */
::selection {
  background: var(--primary);
  color: #FFFFFF;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

#loading-screen.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinLoader 0.9s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

/* Container */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Section Header Styles */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 64px auto;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  letter-spacing: 1px;
  margin-bottom: 16px;
  text-transform: uppercase;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.section-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
  color: var(--text);
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
}

/* Glassmorphic Card */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: rgba(14, 165, 233, 0.4);
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #FFFFFF !important;
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.6);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text) !important;
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
  transform: translateY(-3px);
}

/* ==========================================
   1. STICKY HEADER
   ========================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: all 0.4s ease;
  background: transparent;
}

.header.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  height: 74px;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 1.2rem;
  box-shadow: var(--shadow-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  padding: 8px 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}

[dir="rtl"] .nav-link::after {
  left: auto;
  right: 0;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Mega Menu */
.mega-menu-trigger:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  width: 680px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  z-index: 100;
}

[dir="rtl"] .mega-menu {
  left: auto;
  right: 50%;
  transform: translateX(50%) translateY(15px);
}

.mega-item {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.03);
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.mega-item:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--secondary);
}

.mega-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.mega-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  position: relative;
}

.icon-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  transform: rotate(15deg);
}

/* Theme toggle icon switching */
.icon-btn .icon-sun,
.icon-btn .icon-moon {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

html:not([data-theme="dark"]) .icon-btn .icon-sun {
  opacity: 1;
  transform: rotate(0deg);
}
html:not([data-theme="dark"]) .icon-btn .icon-moon {
  opacity: 0;
  transform: rotate(90deg);
}

html[data-theme="dark"] .icon-btn .icon-sun {
  opacity: 0;
  transform: rotate(-90deg);
}
html[data-theme="dark"] .icon-btn .icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}

/* Segmented Language Switcher */
.segmented {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.segmented button {
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s ease;
  position: relative;
  z-index: 1;
  letter-spacing: 0.5px;
}

.segmented button.on {
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.segmented button:not(.on):hover {
  color: var(--primary);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ==========================================
   2. HERO SECTION
   ========================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  position: relative;
  z-index: 1;
  padding: 60px 0;
}

.hero-content {
  max-width: 640px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  animation: pulseGlow 2s infinite;
}

.hero-title {
  font-size: 3.75rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 24px;
  color: var(--text);
}

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

.hero-typing-box {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 24px;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.typed-text {
  border-right: 3px solid var(--accent);
  padding-right: 4px;
  animation: typingCursor 0.8s infinite;
}

[dir="rtl"] .typed-text {
  border-right: none;
  border-left: 3px solid var(--accent);
  padding-right: 0;
  padding-left: 4px;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.15));
}

/* Floating Decorative Shapes */
.shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  z-index: -1;
}
.shape-1 {
  width: 350px;
  height: 350px;
  background: var(--primary);
  opacity: 0.18;
  top: -80px;
  left: -80px;
}
.shape-2 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  opacity: 0.15;
  bottom: -100px;
  right: -100px;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  animation: scrollBounce 2.5s infinite;
  z-index: 2;
}

.mouse-icon {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.mouse-wheel {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
}

/* ==========================================
   3. ABOUT COMPANY
   ========================================== */
.about {
  padding: 120px 0;
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

.about-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
}

.about-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 36px;
}

.about-mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.about-mini-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
}

.about-mini-card h4 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.about-mini-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.values-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.value-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.check-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

/* ==========================================
   4. SERVICES SECTION
   ========================================== */
.services {
  padding: 120px 0;
  background-color: rgba(37, 99, 235, 0.025);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(14, 165, 233, 0.5);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-icon {
  transform: scale(1.15) rotate(-5deg);
}

.service-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
  margin-top: auto;
}

.service-link svg {
  transition: transform 0.3s ease;
}

.service-card:hover .service-link svg {
  transform: translateX(6px);
}

[dir="rtl"] .service-card:hover .service-link svg {
  transform: translateX(-6px) rotate(180deg);
}

/* ==========================================
   5. WHY CHOOSE US
   ========================================== */
.why-us {
  padding: 120px 0;
}

.why-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.feature-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: all 0.3s ease;
}

.feature-box:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.feature-number {
  font-size: 2rem;
  font-weight: 900;
  color: rgba(37, 99, 235, 0.2);
  margin-bottom: 12px;
}

.feature-box h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.feature-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 2px solid var(--border);
}

[dir="rtl"] .timeline {
  padding-left: 0;
  padding-right: 32px;
  border-left: none;
  border-right: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -39px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px var(--secondary);
}

[dir="rtl"] .timeline-dot {
  left: auto;
  right: -39px;
}

.timeline-item h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.timeline-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================
   6. PORTFOLIO SECTION
   ========================================== */
.portfolio {
  padding: 120px 0;
  background-color: rgba(37, 99, 235, 0.02);
}

.portfolio-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.filter-btn {
  padding: 10px 24px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.portfolio-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.portfolio-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item:hover .portfolio-img {
  transform: scale(1.08);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.2));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay h4 {
  color: #FFFFFF;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 6px;
  transform: translateY(15px);
  transition: transform 0.4s ease 0.1s;
}

.portfolio-overlay span {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  transform: translateY(15px);
  transition: transform 0.4s ease 0.15s;
}

.portfolio-item:hover .portfolio-overlay h4,
.portfolio-item:hover .portfolio-overlay span {
  transform: translateY(0);
}

/* Modal Popup */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

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

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  padding: 36px;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
  transition: all 0.3s ease;
}

[dir="rtl"] .modal-close {
  right: auto;
  left: 24px;
}

.modal-close:hover {
  background: #EF4444;
  color: #FFFFFF;
}

/* ==========================================
   7. COMPANY STATISTICS
   ========================================== */
.stats-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--dark), #1E293B);
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
}

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

.stat-item {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #38BDF8, #06B6D4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.stat-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #94A3B8;
}

/* ==========================================
   8. TEAM MEMBERS
   ========================================== */
.team {
  padding: 120px 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary);
}

.team-img-wrapper {
  position: relative;
  overflow: hidden;
  background: var(--dark);
}

.team-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.team-card:hover .team-img {
  transform: scale(1.08);
}

.team-info {
  padding: 24px;
}

.team-info h4 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.team-info span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 12px;
}

.team-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 16px;
}

.team-social {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--primary);
  color: #FFFFFF;
  transform: translateY(-3px);
}

/* ==========================================
   9. TESTIMONIALS SLIDER
   ========================================== */
.testimonials {
  padding: 120px 0;
  background-color: rgba(37, 99, 235, 0.02);
}

.slider-container {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-card {
  min-width: 100%;
  padding: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.stars {
  color: #F59E0B;
  font-size: 1.4rem;
  margin-bottom: 24px;
  letter-spacing: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.quote-text {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 32px;
}

.author-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.author-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--primary);
}

.author-meta h5 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  text-align: left;
}
[dir="rtl"] .author-meta h5 {
  text-align: right;
}

.author-meta span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 36px;
}

.slider-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text);
}

.slider-arrow:hover {
  background: var(--primary);
  color: #FFFFFF;
}

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

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  width: 32px;
  border-radius: 6px;
  background: var(--primary);
}

/* ==========================================
   10. PRICING PLANS
   ========================================== */
.pricing {
  padding: 120px 0;
}

.pricing-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 56px;
}

.pricing-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: center;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.pricing-card.featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-glow);
  transform: scale(1.05);
  z-index: 2;
}

.pricing-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured:hover {
  transform: scale(1.05) translateY(-10px);
}

.featured-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pricing-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.price {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.pricing-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 36px;
}

.feature-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text);
}

/* ==========================================
   11. FAQ ACCORDION
   ========================================== */
.faq {
  padding: 120px 0;
  background-color: rgba(37, 99, 235, 0.02);
}

.accordion {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.accordion-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s ease;
}

.accordion-header {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  transition: all 0.3s ease;
}

.accordion-header:hover {
  color: var(--primary);
}

.accordion-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
  background: var(--primary);
  color: #FFFFFF;
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 28px;
}

.accordion-item.active .accordion-body {
  padding-bottom: 24px;
}

.accordion-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ==========================================
   12. BLOG PREVIEW
   ========================================== */
.blog {
  padding: 120px 0;
}

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

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.blog-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.blog-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.blog-cat {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.blog-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.blog-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.4;
}

.blog-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ==========================================
   13. CONTACT SECTION
   ========================================== */
.contact {
  padding: 120px 0;
  background-color: rgba(37, 99, 235, 0.02);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}

.contact-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.info-text h5 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-text p {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

/* Map Placeholder */
.map-box {
  margin-top: 32px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 220px;
  position: relative;
  background: var(--dark);
}

.contact-form-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  background: var(--surface);
}

.form-error {
  color: #EF4444;
  font-size: 0.8rem;
  margin-top: 6px;
  display: none;
}

/* Toast Notification */
#toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #10B981;
  color: #FFFFFF;
  padding: 16px 28px;
  border-radius: var(--radius-full);
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 99999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[dir="rtl"] #toast {
  right: auto;
  left: 30px;
}

#toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================
   14. NEWSLETTER SECTION
   ========================================== */
.newsletter {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #FFFFFF;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.newsletter-content {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.newsletter h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.newsletter p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 32px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}

.newsletter-input {
  flex-grow: 1;
  padding: 16px 24px;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  color: #0F172A;
  font-weight: 600;
}

.newsletter-btn {
  background: #0F172A;
  color: #FFFFFF;
  padding: 16px 32px;
  border-radius: var(--radius-full);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.newsletter-btn:hover {
  background: #1E293B;
  transform: scale(1.05);
}

/* ==========================================
   15. FOOTER
   ========================================== */
.footer {
  background: var(--dark);
  color: #94A3B8;
  padding: 80px 0 32px 0;
  border-top: 1px solid var(--border);
}

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

.footer-col h4 {
  color: #FFFFFF;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a:hover {
  color: var(--secondary);
  padding-inline-start: 6px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.footer-copyright {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  flex: 1;
}

.footer-dev {
  font-size: 0.8rem;
  color: #64748B;
}

.footer-dev a {
  color: var(--secondary);
  transition: color 0.3s ease;
}

.footer-dev a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.back-to-top {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.back-to-top:hover {
  background: var(--secondary);
  transform: translateY(-5px);
}
