
/* 1. Глобальный запрет горизонтального скролла */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* 2. Правильный расчет размеров элементов */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 3. Адаптивность карточек тарифов на узких экранах (320px) */
.container {
  width: 100%;
  padding-left: 15px;
  padding-right: 15px;
}

/* Если у карточек тарифов была фиксированная ширина */
.tariff-card, .tariff-grid {
  max-width: 100%;
  box-sizing: border-box;
}

:root {
  --bg-dark: #0a0f1a;
  --bg-card: #111827;
  --bg-card-hover: #1a2332;
  --accent: #00d4ff;
  --accent-hover: #00b8e0;
  --accent-soft: rgba(0, 212, 255, 0.12);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --success: #22c55e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== HEADER ========== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 26, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.logo span {
  color: var(--accent);
}

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

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ========== HEADER BUTTONS (INSTAGRAM & WHATSAPP) ========== */
.btn-whatsapp,
.btn-instagram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: #fff !important;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-whatsapp {
  background: var(--success);
}

.btn-whatsapp:hover {
  background: #16a34a;
  transform: translateY(-1px);
}

.btn-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  box-shadow: 0 4px 12px rgba(220, 39, 67, 0.2);
}

.btn-instagram:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: 0.3s;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== HERO ========== */
.hero {
  padding: 90px 0 70px;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(0, 212, 255, 0.08) 0%, transparent 60%);
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 212, 255, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ========== SECTIONS COMMON ========== */
section {
  padding: 80px 0;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 15px;
}

/* ========== CATALOG ========== */
.filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.4);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
  cursor: pointer;
}

.card-tag {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 10px;
}

.card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.specs-list {
  list-style: none;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.specs-list li {
  margin-bottom: 6px;
}

.price-block {
  margin-bottom: 16px;
}

.price-main {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
}

.price-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-card {
  width: 100%;
  background: var(--accent);
  color: #000;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.btn-card:hover {
  background: var(--accent-hover);
}

/* Skeletons */
.skeleton {
  pointer-events: none;
}
.skeleton-img {
  width: 100%;
  height: 200px;
  background: var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
}
.skeleton-line {
  height: 16px;
  background: var(--border);
  border-radius: 4px;
  margin-bottom: 10px;
}
.skeleton-line.short {
  width: 60%;
}

/* ========== TARIFFS ========== */
.tariffs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.tariff-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px 24px;
  position: relative;
}

.tariff-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.15);
}

.popular-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--accent);
  color: #000;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
}

.tariff-title {
  font-size: 20px;
  font-weight: 700;
}

.tariff-days {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.tariff-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.tariff-features {
  list-style: none;
  font-size: 14px;
}

.tariff-features li {
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.tariff-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.loyalty-banner {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.loyalty-banner h4 {
  font-size: 18px;
  margin-bottom: 4px;
}

.loyalty-banner p {
  color: var(--text-muted);
  font-size: 14px;
}

.btn-loyalty {
  /* Сбрасываем дефолтную рамку и обводку браузера */
  border: none;
  outline: none;
  
  /* Чистый цвет фона (без встроенных браузерных градиентов) */
  background-color: #2563eb; /* или твой фирменный голубой #00d2ff / #0284c7 */
  color: #ffffff;
  
  /* Размеры и скругление */
  padding: 10px 20px;
  border-radius: 8px; /* или другое скругление под стиль сайта */
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  
  /* Плавность при наведении */
  transition: background-color 0.2s ease, transform 0.1s ease;
}

/* Эффект при наведении */
.btn-loyalty:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
}

/* Эффект при клике */
.btn-loyalty:active {
  transform: translateY(0);
}

/* ========== B2B ========== */
.b2b-card {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(17, 24, 39, 1) 100%);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 24px;
  padding: 40px;
}

.b2b-badge {
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.b2b-content h2 {
  font-size: 28px;
  margin: 16px 0 10px;
}

.b2b-content p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.b2b-list {
  list-style: none;
  margin-bottom: 28px;
}

.b2b-list li {
  margin-bottom: 10px;
  font-weight: 500;
}

/* ========== CONDITIONS ========== */
.conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.condition-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.2s, border-color 0.2s;
}

.condition-card.clickable {
  cursor: pointer;
}

.condition-card.clickable:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.condition-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.condition-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.condition-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-more {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

/* ========== REVIEWS ========== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

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

.review-author {
  font-weight: 700;
}

.review-stars {
  font-size: 12px;
}

.review-text {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

/* ========== FAQ ========== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 24px;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: "+";
  font-size: 20px;
  color: var(--accent);
}

.faq-item.active .faq-question::after {
  content: "−";
}

.faq-answer {
  display: none;
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.faq-answer ul {
  margin-top: 8px;
  padding-left: 20px;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ========== FOOTER ========== */
footer {
  background: #060911;
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 12px;
}

.footer-col h4 {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--text-main);
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

/* ========== FLOATING WHATSAPP ========== */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
  z-index: 90;
  transition: transform 0.2s;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
}

/* ========== MODALS & LIGHTBOX ========== */
.modal-overlay,
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.active,
.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  max-width: 460px;
  position: relative;
}

.modal-close,
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-subtitle {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 20px;
}

.modal-info-body {
  color: var(--text-muted);
  font-size: 14px;
  margin: 16px 0 24px;
}

.modal-info-body ul,
.modal-info-body ol {
  padding-left: 20px;
  margin-top: 10px;
}

.modal-info-body li {
  margin-bottom: 8px;
}

/* Calculator inside order modal */
.calc-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.calc-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 10px;
}

.calc-range {
  width: 100%;
  accent-color: var(--accent);
  margin-bottom: 12px;
}

.calc-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

.calc-total-text {
  font-size: 14px;
}

.calc-total-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent);
}

.btn-submit {
  width: 100%;
  background: var(--accent);
  color: #000;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.btn-submit:hover {
  background: var(--accent-hover);
}

/* Lightbox Content */
.lightbox {
  flex-direction: column;
}

.lightbox img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 12px;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 16px;
  color: var(--text-main);
  font-weight: 600;
}

/* ========== ADAPTIVE (RESPONSIVE) ========== */
@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 65px;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .nav.active {
    display: flex;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero p {
    font-size: 15px;
  }

  .b2b-card {
    padding: 24px;
  }

  /* На мобилах кнопки чуть уменьшаем */
  .btn-whatsapp, .btn-instagram {
  white-space: nowrap; /* Запрещает разрыв слова */
  flex-shrink: 0;      /* Не дает кнопке сжиматься */
}

/* Фикс для узких экранов мобильных устройств */
@media (max-width: 480px) {
  .btn-whatsapp span, .btn-instagram span {
    font-size: 13px; /* Слегка уменьшаем текст на смартфонах */
  }
  .header-actions {
    gap: 6px; /* Уменьшаем зазор между элементами в шапке */
  }
}
}

/* ========== МОБИЛЬНАЯ АДАПТАЦИЯ (CSS) ========== */

/* Базовые боковые поля, чтобы контент не лип к краям экрана */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Стандартные отступы секций для ПК */
section {
  padding: 60px 0;
}

/* Адаптация под смартфоны (экраны до 768px) */
@media (max-width: 768px) {
  /* Уменьшаем вертикальные отступы между блоками в 2 раза */
  section {
    padding: 32px 0;
  }

  /* Адаптируем заголовки, чтобы они не разрывали экран */
  h1 {
    font-size: 28px !important;
    line-height: 1.2 !important;
  }

  h2 {
    font-size: 22px !important;
    line-height: 1.3 !important;
  }

  /* Сетка каталога: 1 карточка в ряд на мобильном */
  #catalog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Мобильная стилизация карточек */
  .card {
    padding: 16px;
    border-radius: 12px;
  }

  /* Кнопки фильтров с горизонтальным скроллом, если не помещаются */
  .filter-container {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 8px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    flex: 0 0 auto;
  }
}

/* ========== МОБИЛЬНАЯ КАРУСЕЛЬ И ПОДВАЛ ========== */

@media (max-width: 768px) {
  /* Горизонтальный свайп для каталога на смартфонах */
  #catalog-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
  }

  #catalog-grid .card {
    flex: 0 0 85% !important; /* Карточка занимает 85% ширины экрана */
    scroll-snap-align: center;
  }
}

/* ========== ОБНОВЛЕННЫЙ СТИЛЬНЫЙ ФУТЕР ========== */
.footer {
  background-color: #0d1117;
  padding: 50px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #8b949e;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  gap: 40px;
}

.brand-col .brand-desc {
  margin: 15px 0 20px;
  font-size: 14px;
  line-height: 1.5;
}

.legal-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  font-size: 13px;
}

.legal-links a {
  color: #58a6ff;
  text-decoration: none;
  transition: 0.2s;
}

.legal-links a:hover {
  text-decoration: underline;
  color: #79c0ff;
}

.legal-links span {
  color: #484f58;
}

.brand-ecosystem .copy-text {
  font-size: 13px;
  color: #8b949e;
  margin-bottom: 4px;
}

.brand-ecosystem .eco-text {
  font-size: 12px;
  color: #c9d1d9;
}

.footer-col h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 18px;
}

.footer-col a, .footer-col p {
  display: block;
  color: #8b949e;
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 14px;
}

.footer-col a:hover {
  color: #00f2fe;
}

/* ========== ГАРАНТИРОВАННО РАБОЧИЕ МОДАЛКИ (Legal) ========== */
.modal-legal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}

.modal-legal-card {
  background: #161b22;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  max-width: 550px;
  width: 100%;
  position: relative;
  color: #c9d1d9;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-legal-card h3 {
  color: #fff;
  margin-bottom: 15px;
  font-size: 20px;
}

.modal-legal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  color: #8b949e;
  font-size: 24px;
  cursor: pointer;
}

.modal-legal-close:hover {
  color: #fff;
}

.modal-legal-body p {
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.6;
}

/* Адаптив под смартфоны */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .legal-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .legal-links span {
    display: none;
  }
}

/* ==========================================
   ФИКС ШАПКИ НА ВСЕХ МОБИЛЬНЫХ (Включая Android/узкие экраны)
   ========================================== */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
}

/* На узких смартфонах делаем кнопки шапки компактнее, чтобы бургер не улетал */
@media (max-width: 480px) {
  .logo {
    font-size: 18px;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .btn-instagram, .btn-whatsapp {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Если на совсем маленьком экране не влезает текст — оставляем иконку/компактный вид */
  .btn-instagram span, .btn-whatsapp span {
    font-size: 11px;
  }

  .burger {
    flex-shrink: 0; /* Бургер никогда не сжимается и не уходит за экран */
    margin-left: 4px;
  }
}

/* ==========================================
   АДАПТИВНЫЙ ФУТЕР (ПК — В колонке, Мобилка — Внизу)
   ========================================== */
.brand-col .legal-links {
  margin-top: 15px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.brand-col .legal-links a {
  color: #94a3b8;
  font-size: 13px;
  text-decoration: underline;
}

.brand-col .brand-ecosystem {
  margin-top: 15px;
  font-size: 12px;
  color: #64748b;
}

/* Адаптив для мобильных устройств */
@media (max-width: 768px) {
  .footer-grid {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 30px;
  }

  .footer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Переносим юр-блок на мобилках в самом низу колонки */
  .brand-col {
    order: 10; /* Смещает блок бренда и документов в самый конец на мобилке */
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    width: 100%;
  }

  .brand-col .legal-links {
    justify-content: center;
  }
}

/* Базовое выравнивание шапки */
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Кнопки Instagram и WhatsApp */
.btn-instagram, .btn-whatsapp {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}

.btn-instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.btn-whatsapp {
  background-color: #25d366;
}

/* Кнопка бургера / шестерёнки */
.burger {
  display: none; /* На ПК скрыть */
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0; /* Гарантирует, что кнопка не сжимается */
}

/* ==========================================
   АДАПТИВ ПОД МОБИЛЬНЫЕ (до 768px и 320px)
   ========================================== */
@media (max-width: 992px) {
  /* Скрываем горизонтальную навигацию на планшетах и смартфонах */
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #0f172a;
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Показываем выпадающее меню при клике (класс active задается через JS) */
  .nav.active {
    display: flex;
  }

  /* Показываем бургер-шестерёнку */
  .burger {
    display: flex;
  }
}

@media (max-width: 480px) {
  .header-content {
    padding: 8px 10px;
  }

  /* Скрываем текст "Instagram" и "WhatsApp", оставляя только иконки */
  .btn-instagram .btn-text,
  .btn-whatsapp .btn-text {
    display: none;
  }

  .btn-instagram, .btn-whatsapp {
    padding: 8px;
  }

  .burger {
    width: 36px;
    height: 36px;
  }
}