/* common.css – глобальные стили, сброс, хедер, футер, переменные, кнопки, навигация */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  background: #050911;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #eef2f8;
  line-height: 1.4;
  scroll-behavior: smooth;
  padding-top: 80px;
  overflow-x: hidden;
}

:root {
  --body-bg: #050911;
  --header-bg: #0e162480;
  --headers-color: #f5f9fc;
  --inactive-tab: lab(67.45% -0.932187 -7.4149);
  --active-tab: lab(97.6882% -0.8232 -1.65225);
  --secondary-text: lab(67.45% -0.932187 -7.4149);
  --btn-gradient: linear-gradient(135deg, lab(65.9688% 57.7443 77.7888) 0%, lab(51.8127% 59.2393 -70.0043) 50%, lab(44.3191% 38.7476 -76.8339) 100%);
  --card-bg: linear-gradient(145deg, lab(7.06747% -0.19002 -10.6574 / 0.92), lab(3.61341% -0.0697747 -6.86977 / 0.75));
  --border-glow: rgba(255, 215, 120, 0.15);
  --muted: #2a2e3f;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  /* overflow-x не задаём, чтобы не обрезать выпадающее меню */
}

/* ========== Управление видимостью ссылок ========== */
.mobile-only {
  display: none;
}
.desktop-only {
  display: block;
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 14, 26, 0.5);
  backdrop-filter: blur(8px);
  z-index: 2000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 16px 0;
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  overflow: visible;
}
.logo {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.logo .logo-gradient {
  background: var(--btn-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s;
  color: var(--inactive-tab);
  font-size: 0.95rem;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--active-tab);
}
.btn-order-header {
  background: var(--btn-gradient);
  padding: 8px 20px;
  border-radius: 40px;
  color: #0a0f1a !important;
  font-weight: 700;
}
.btn-order-header:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}
.hamburger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--active-tab);
}

/* ========== ВЫПАДАЮЩЕЕ МЕНЮ (десктоп) ========== */
.dropdown {
  position: relative;
}
.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.dropdown-toggle i {
  font-size: 0.7rem;
  transition: transform 0.2s;
}
.dropdown:hover .dropdown-toggle i {
  transform: rotate(180deg);
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #0f1422cc;
  backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 12px 0;
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  border: 1px solid rgba(255,215,130,0.2);
  z-index: 10000;
}
.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  color: var(--secondary-text);
  font-size: 0.9rem;
}
.dropdown-menu a:hover {
  background: rgba(255,215,130,0.1);
  color: var(--active-tab);
}

/* ========== ОБЩИЕ КНОПКИ ========== */
.btn-primary {
  background: var(--btn-gradient);
  border: none;
  padding: 12px 28px;
  border-radius: 44px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #0a0f1a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(255, 170, 50, 0.25);
}
.btn-outline-light {
  background: transparent;
  border: 1px solid var(--active-tab);
  color: var(--active-tab);
  padding: 12px 28px;
  border-radius: 44px;
  font-weight: 600;
  transition: 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-outline-light:hover {
  background: rgba(255,255,240,0.08);
  border-color: #ffcd7e;
  transform: translateY(-2px);
}

/* ========== ФУТЕР ========== */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid rgba(255,215,130,0.1);
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 50px;
}
.footer a {
  color: var(--secondary-text);
  text-decoration: none;
  transition: 0.2s;
}
.footer a:hover {
  color: var(--active-tab);
}
.footer h4 {
  margin-bottom: 24px;
  font-weight: 600;
  font-family: 'Space Grotesk', system-ui;
}
.footer-links {
  list-style: none;
  line-height: 2;
}
.social-icons {
  display: flex;
  gap: 20px;
  margin-top: 16px;
}
.social-icons i {
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s;
}
.social-icons i:hover {
  transform: translateY(-3px);
  color: var(--active-tab);
}
.footer-description {
  color: var(--secondary-text);
}
.footer-copyright {
  border-top: 1px solid rgba(255,255,200,0.1);
  margin-top: 44px;
  padding-top: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: #5a6885;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.contact-item i {
  width: 24px;
  font-size: 1.2rem;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 980px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .hero-title {
    font-size: 3rem;
  }
  .centered-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 760px) {
  /* Скрываем выпадашку на мобильных */
  .desktop-only {
    display: none !important;
  }
  /* Показываем прямые ссылки */
  .mobile-only {
    display: block !important;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #0a0e1ae0;
    backdrop-filter: blur(20px);
    padding: 24px;
    border-radius: 28px;
    margin-top: 20px;
    gap: 18px;
  }
  .nav-links.show {
    display: flex;
  }
  .hamburger {
    display: block;
  }
  .container {
    padding: 0 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  /* Отключаем hover-эффект для дропдауна на мобильных */
  .dropdown:hover .dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
  }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    padding-left: 20px;
    margin-top: 8px;
    border: none;
    display: none;
  }
  .dropdown.active .dropdown-menu {
    display: block;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .centered-title {
    font-size: 1.9rem;
  }
  .btn-order-header {
    text-align: center;
    display: inline-block;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .hero-description {
    font-size: 1rem;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-buttons .btn-primary,
  .hero-buttons .btn-outline-light {
    text-align: center;
    justify-content: center;
  }
  .hero-stats {
    gap: 24px;
  }
  .stat-number {
    font-size: 1.5rem;
  }
  .centered-title {
    font-size: 1.6rem;
  }
  .section-subtitle {
    font-size: 0.85rem;
  }
  .check-col {
    padding: 20px;
  }
  .check-col-header h3 {
    font-size: 1.4rem;
  }
  .check-list li {
    gap: 10px;
  }
  .icon-bg {
    width: 30px;
    height: 30px;
    margin-left: 5px;
  }
  .card {
    padding: 20px;
  }
  .card h3 {
    font-size: 1.4rem;
  }
  .case-image {
    height: 200px;
  }
  .price-comparison,
  .case-stats {
    flex-direction: column;
    gap: 8px;
  }
  .saving-block {
    margin: 0 16px 16px;
  }
  .cta-section {
    padding: 40px 20px;
  }
  .cta-section h2 {
    font-size: 1.6rem;
  }
  .footer {
    padding: 32px 0 24px;
  }
}

/* ========== МОДАЛЬНОЕ ОКНО ========== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 10001;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: linear-gradient(145deg, #0a0e1a, #0f1422);
  border-radius: 32px;
  max-width: 500px;
  width: 90%;
  padding: 32px;
  position: relative;
  border: 1px solid rgba(255, 215, 130, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'Space Grotesk', system-ui;
  color: #ffffff;
  margin: 0;
}

.modal-close {
  font-size: 2rem;
  cursor: pointer;
  color: var(--secondary-text);
  transition: color 0.2s;
  line-height: 1;
}

.modal-close:hover {
  color: var(--active-tab);
}

.modal-form .form-group {
  margin-bottom: 20px;
}

.modal-form label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--secondary-text);
}

.modal-form input,
.modal-form select {
  width: 100%;
  padding: 12px 16px;
  background: #0e162480;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: var(--active-tab);
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s;
}

.modal-form input:focus,
.modal-form select:focus {
  outline: none;
  border-color: lab(65.9688% 57.7443 77.7888);
}

/* Кастомная стрелка для select */
.modal-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='lab(97.6882% -0.8232 -1.65225)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  cursor: pointer;
}

.modal-form select:hover {
  border-color: rgba(255, 215, 130, 0.5);
}

.modal-form select option {
  background: #0a0e1a;
  color: var(--active-tab);
  padding: 10px;
}

.modal-submit {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.modal-note {
  font-size: 0.75rem;
  color: var(--secondary-text);
  text-align: center;
  margin-top: 16px;
}

@media (max-width: 480px) {
  .modal-content {
    padding: 24px;
  }
  .modal-header h3 {
    font-size: 1.4rem;
  }
  .modal-form input,
  .modal-form select {
    padding: 10px 14px;
  }
}

/* ========== АКТИВНАЯ ВКЛАДКА И HOVER С ЗАТЕМНЕНИЕМ ФОНА (кроме кнопки Заказать) ========== */
.nav-links a:not(.btn-order-header),
.dropdown .dropdown-toggle:not(.btn-order-header) {
  transition: background 0.2s ease, color 0.2s ease;
  padding: 6px 12px;
  border-radius: 40px;
}

.nav-links a:not(.btn-order-header):hover,
.nav-links a:not(.btn-order-header).active,
.dropdown .dropdown-toggle:not(.btn-order-header):hover,
.dropdown .dropdown-toggle:not(.btn-order-header).active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--active-tab) !important;
  border: none;
  outline: none;
}

/* Кнопка "Заказать" – без изменений, не получает затемнение */
.btn-order-header {
  background: var(--btn-gradient);
  padding: 8px 20px;
  border-radius: 40px;
  color: #0a0f1a !important;
  font-weight: 700;
  transition: transform 0.2s, opacity 0.2s;
}
.btn-order-header:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  background: var(--btn-gradient);
  box-shadow: none;
}
.btn-order-header.active {
  background: var(--btn-gradient);
  color: #0a0f1a !important;
}