:root {
  /* Цветовая палитра - глубокие профессиональные тона */
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary: #0f172a;
  --secondary-light: #1e293b;
  --accent: #06b6d4;
  --accent-dark: #0891b2;
  --light: #f8fafc;
  --light-gray: #e2e8f0;
  --medium-gray: #94a3b8;
  --dark-gray: #475569;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  /* Градиенты */
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-dark));
  --gradient-accent: linear-gradient(135deg, var(--primary-light), var(--accent));
  --gradient-dark: linear-gradient(135deg, var(--secondary), var(--secondary-light));
  
  /* Эффекты */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --transition: all 0.3s ease;
  --transition-fast: all 0.2s ease;
  
  /* Отступы */
  --card-padding: 30px;
  --section-padding: 80px;
  --container-padding: 20px;
}

/* Сброс и База */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--light);
  color: var(--secondary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Утилиты */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.text-center { text-align: center; }
.text-muted { color: var(--dark-gray); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section {
  padding: var(--section-padding) 0;
  content-visibility: auto;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--dark-gray);
  max-width: 600px;
  margin: 0 auto 3rem auto;
  text-align: center;
}

/* Прелоадер */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}
.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--light-gray);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Кнопка "Наверх" */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 99;
  box-shadow: var(--shadow-lg);
}
.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
  min-height: 44px;
}
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: width 0.4s ease;
  z-index: -1;
}
.btn:hover::before { width: 100%; }
.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}
.btn-large {
  padding: 16px 36px;
  font-size: 1.125rem;
}

/* Навигация */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo, .logo-1 {
  width: 50px;
  height: 50px;
  background: var(--gradient-accent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.5rem;
  box-shadow: var(--shadow-md);
}
.brand-text h3 {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-text p {
  font-size: 0.875rem;
  color: var(--medium-gray);
}
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-link {
  text-decoration: none;
  color: var(--secondary);
  font-weight: 500;
  position: relative;
  padding: 8px 0;
  transition: var(--transition-fast);
}
.nav-link:hover, .nav-link.active { color: var(--primary); }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--secondary);
  cursor: pointer;
  z-index: 1001;
}
.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

/* Hero Section */
.hero-section {
  padding-top: 150px;
  padding-bottom: 100px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
  z-index: -1;
}
.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 2rem;
}
.hero-form-wrapper {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-xl);
}

/* Формы */
.form-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--secondary);
}
.form-group { margin-bottom: 1.25rem; }
.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: var(--transition-fast);
  background: white;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.message-box {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  display: none;
  font-weight: 500;
}
.success-msg {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}
.error-msg {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

/* Карточки Общие */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--card-padding);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--light-gray);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

/* Услуги */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}
.service-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-accent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: white;
  font-size: 1.5rem;
}
.service-features {
  list-style: none;
  margin-top: 1.5rem;
}
.service-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.9375rem;
}
.service-features li i { color: var(--success); }
.service-card-btn {
  margin-top: auto;
  width: 100%;
}

/* Цены */
.pricing-section {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}
.pricing-tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 3rem;
}
.pricing-table {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--card-padding);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  border: 1px solid var(--light-gray);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.pricing-table:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}
.pricing-table-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--light-gray);
}
.pricing-icon {
  width: 70px;
  height: 70px;
  background: var(--gradient-accent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  font-size: 1.8rem;
}
.pricing-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}
.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
  flex-grow: 1;
}
.pricing-features li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--light-gray);
  display: flex;
  justify-content: space-between;
}
.pricing-btn {
  width: 100%;
  margin-top: auto;
}
.pricing-note {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-md);
  margin-top: 30px;
}

/* Отзывы */
.reviews-section { background-color: #f8fafc; }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}
.review-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 1.5rem;
}
.review-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}
.review-rating {
  color: var(--warning);
  margin-bottom: 1rem;
}
.review-text {
  color: var(--dark-gray);
  font-style: italic;
  border-left: 3px solid var(--light-gray);
  padding-left: 15px;
}

/* О нас */
.about-section {
  background-color: var(--secondary);
  color: white;
}
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-content h2 { color: white; }
.stats-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 3rem;
}
.stat-item {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), white);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.image-placeholder {
  height: 400px;
  background: var(--gradient-dark);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}
.image-overlay {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: var(--gradient-accent);
  padding: 20px;
  border-radius: var(--radius-lg);
  max-width: 250px;
}

/* Контакты */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}
.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.pricing-hint-icon {
  width: 50px;
  height: 50px;
  background: var(--success);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.contact-pricing-hint {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  background: rgba(16, 185, 129, 0.1);
  padding: 20px;
  border-radius: var(--radius-lg);
}

/* Футер */
.footer {
  background-color: var(--secondary);
  color: white;
  padding: 60px 0 30px;
}
.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 40px;
}
.footer-links h4 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.footer-links ul { list-style: none; }
.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition-fast);
}
.footer-links a:hover { color: white; }
.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* Модальное окно */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal.active {
  display: flex;
  opacity: 1;
}
.modal-content {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 500px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}
.price-tag {
  background: var(--success);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
}
.checkbox-label {
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
}

/* КАРУСЕЛИ (Только для мобилок) */
.carousel {
  display: none; /* По умолчанию скрыты на десктопе */
  width: 100%;
  overflow: hidden;
  position: relative;
}
.carousel__wrapper {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 20px;
  -webkit-overflow-scrolling: touch; /* Инерция iOS */
  scrollbar-width: none; /* Скрыть скроллбар Firefox */
}
.carousel__wrapper::-webkit-scrollbar { display: none; } /* Скрыть скроллбар Chrome */
.carousel__slide {
  display: flex; /* Контейнер для карточек внутри слайда */
  gap: 20px;
}

/* Анимации */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.8s ease forwards; }
.reveal { opacity: 0; transition: all 0.6s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- MEDIA QUERIES (Адаптивность) --- */

/* Планшеты и ниже (<= 1024px) */
@media (max-width: 1024px) {
  .hero-container,
  .about-container,
  .contact-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-content { text-align: center; }
  .hero-actions { justify-content: center; }
  
  /* СКРЫВАЕМ СЕТКИ, ПОКАЗЫВАЕМ КАРУСЕЛИ */
  .services-grid,
  .pricing-tables,
  .reviews-grid {
    display: none !important;
  }
  
  .carousel {
    display: block !important;
  }
  
  /* Настройка карточек внутри карусели */
  .carousel__wrapper .card,
  .carousel__wrapper .pricing-table {
    min-width: 85vw; /* Карточка занимает 85% ширины экрана */
    max-width: 350px;
    scroll-snap-align: center;
    flex-shrink: 0;
    margin: 0;
  }
  
  /* Центрируем первую карточку при старте */
  .carousel__wrapper::after {
    content: '';
    min-width: 20px; /* Отступ справа */
  }
  
  .carousel__controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
  }
  
  .carousel__prev, .carousel__next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--light-gray);
    background: white;
  }
}

/* Мобилки (<= 768px) */
@media (max-width: 768px) {
  .hero-content h1 { font-size: 2.5rem; }
  
  /* Навигация (Бургер) */
  .menu-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding-top: 80px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
  }
  .nav-links.active { right: 0; }
  .menu-overlay.active { display: block; }
  
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-links h4::after { left: 50%; transform: translateX(-50%); }
  
  .stats-container { grid-template-columns: 1fr; }
}

/* Мелкие экраны (<= 480px) */
@media (max-width: 480px) {
  .hero-content h1 { font-size: 2rem; }
  .section-title { font-size: 1.8rem; }
  .btn-large { width: 100%; }
  
  /* Уменьшаем отступы в карусели */
  .carousel__wrapper .card {
    min-width: 80vw;
  }
}