/* فونت‌ها و متغیرهای پیشرفته */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/font-face.css');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
  /* پالت رنگی پیشرفته */
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --primary-800: #3730a3;
  --primary-900: #312e81;
  
  --secondary-50: #fdf2f8;
  --secondary-100: #fce7f3;
  --secondary-200: #fbcfe8;
  --secondary-300: #f9a8d4;
  --secondary-400: #f472b6;
  --secondary-500: #ec4899;
  --secondary-600: #db2777;
  --secondary-700: #be185d;
  --secondary-800: #9d174d;
  --secondary-900: #831843;
  
  --accent-50: #f0f9ff;
  --accent-100: #e0f2fe;
  --accent-200: #bae6fd;
  --accent-300: #7dd3fc;
  --accent-400: #38bdf8;
  --accent-500: #0ea5e9;
  --accent-600: #0284c7;
  --accent-700: #0369a1;
  --accent-800: #075985;
  --accent-900: #0c4a6e;
  
  /* تم روشن */
  --bg-color: #f9fafb;
  --text-color: #111827;
  --card-bg: #ffffff;
  --card-border: #e5e7eb;
  --header-bg: rgba(255, 255, 255, 0.8);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] {
  /* تم تاریک */
  --bg-color: #0f172a;
  --text-color: #f8fafc;
  --card-bg: #1e293b;
  --card-border: #334155;
  --header-bg: rgba(15, 23, 42, 0.8);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.25), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(51, 65, 85, 0.8);
}

/* متغیرهای عمومی */
:root {
  --max-width: 1440px;
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-primary: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  --gradient-accent: linear-gradient(135deg, var(--accent-500), var(--accent-700));
  --gradient-secondary: linear-gradient(135deg, var(--secondary-500), var(--secondary-700));
}

/* ریست استایل‌ها و پایه */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Vazirmatn FD', sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* پس‌زمینه سه‌بعدی پیشرفته */
.bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
}

#vanta-bg {
  width: 100%;
  height: 100%;
  opacity: 0.6;
  transition: opacity 0.5s ease;
}

.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.9) 0%,
    rgba(15, 23, 42, 0.7) 50%,
    rgba(15, 23, 42, 0.9) 100%
  );
  z-index: -1;
}

[data-theme="light"] #vanta-bg {
  opacity: 0.3;
}

[data-theme="light"] .bg-overlay {
  background: linear-gradient(
    to bottom,
    rgba(249, 250, 251, 0.9) 0%,
    rgba(249, 250, 251, 0.7) 50%,
    rgba(249, 250, 251, 0.9) 100%
  );
}

/* اسکرول بار سفارشی */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-700);
}

/* نوار پیشرفت اسکرول */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 4px;
  background: var(--gradient-primary);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* لینک‌ها */
a {
  color: var(--primary-600);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-700);
}

/* تصاویر */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

/* کانتینر اصلی */
.main-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
}

/* هدر */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
  z-index: 1000;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  transition: var(--transition);
}

.logo:hover .logo-icon {
  transform: rotate(15deg) scale(1.1);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: var(--transition);
}

.logo:hover .logo-text {
  background: var(--gradient-accent);
}

/* نویگیشن */
nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

nav a {
  color: var(--text-color);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 0;
  position: relative;
  display: inline-block;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--primary-600);
  transition: var(--transition);
}

nav a:hover::after {
  width: 100%;
  left: 0;
}

/* دکمه‌های هدر */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle, .lang-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-color);
}

.theme-toggle:hover, .lang-toggle:hover {
  background: var(--primary-600);
  color: white;
  transform: translateY(-2px);
}

.cta-button {
  padding: 0.75rem 1.5rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cta-button:hover {
  background: var(--gradient-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* منوی موبایل */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}

/* بخش هیرو */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.hero-content::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  z-index: -1;
  transition: var(--transition);
  opacity: 0;
}

.hero-content:hover::before {
  opacity: 1;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  background: linear-gradient(to right, var(--primary-600), var(--accent-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: var(--text-color);
  opacity: 0.9;
  margin: 1.5rem auto 2.5rem;
  max-width: 700px;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
  opacity: 0;
}

.hero-btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 180px;
  justify-content: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

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

.primary-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-accent);
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

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

.secondary-btn {
  background: transparent;
  border: 2px solid var(--primary-600);
  color: var(--primary-600);
}

.secondary-btn:hover {
  background: var(--primary-600);
  color: white;
  transform: translateY(-3px);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  animation: fadeInUp 0.8s ease-out 0.6s forwards;
  opacity: 0;
}

.stat-item {
  text-align: center;
  position: relative;
  padding: 0 1rem;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -1.5rem;
  transform: translateY(-50%);
  width: 1px;
  height: 40px;
  background: var(--card-border);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-600);
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.stat-item:hover .stat-number {
  color: var(--accent-600);
  transform: scale(1.1);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
}

/* بخش‌های اصلی */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin-bottom: 1.5rem;
  color: var(--text-color);
  position: relative;
  font-weight: 800;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  right: 50%;
  transform: translateX(50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-color);
  opacity: 0.8;
  max-width: 700px;
  margin: 0 auto 3rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* کارت‌های سرویس */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--card-border);
  transition: var(--transition);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-600);
}

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

.service-icon {
  font-size: 3rem;
  color: var(--primary-600);
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  color: var(--accent-600);
  transform: scale(1.2) rotate(10deg);
}

.service-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.service-description {
  font-size: 0.95rem;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.service-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.service-link:hover {
  background: var(--gradient-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* انیمیشن‌ها */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* رسپانسیو */
@media (max-width: 1024px) {
  .hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
  }
  
  .hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6rem 2rem 2rem;
    transition: var(--transition);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }
  
  nav.active {
    right: 0;
  }
  
  nav ul {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .hero-section {
    padding-top: 5rem;
  }
  
  .hero-content {
    padding: 2rem 1.5rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-btn {
    width: 100%;
    max-width: 300px;
  }
  
  .stat-item:not(:last-child)::after {
    display: none;
  }
  
  .hero-stats {
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0.5rem 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
}