/* ==========================================================================
   STG-soft.site — Design System (Terracotta & Warm Editorial Agency)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* Фирменная теплая палитра */
  --bg:            #F7F3F0;
  --bg-soft:       #FBF8F5;
  --surface:       #FCEDE4;
  --peach:         #FADFD2;
  --salmon:        #F5A98C;
  --primary:       #F26A1B;
  --primary-soft:  #F9A06E;
  --rust:          #9C3A10;   /* заголовки */
  --rust-deep:     #7E2F0D;
  --ink:           #3A2417;   /* основной текст */
  --ink-muted:     #6D5545;   /* второстепенный текст */
  --ink-faint:     #A59283;   /* подписи, даты */
  --gold:          #D9C4A4;
  --gold-light:    #EFE3CC;

  /* Градиенты */
  --grad-accent:   linear-gradient(135deg, #F4711F 0%, #F9A06E 100%);
  --grad-glass:    radial-gradient(circle at 35% 30%, #FDF0D3 0%, #F3BE7C 100%);
  --grad-warm:     linear-gradient(180deg, #FBF8F5 0%, #F7F3F0 100%);

  /* Границы и тени */
  --border:        rgba(156, 58, 16, 0.12);
  --border-strong: rgba(156, 58, 16, 0.24);
  --border-active: #F26A1B;
  --shadow-subtle: 0 10px 30px -10px rgba(126, 47, 13, 0.08);
  --shadow-glow:   0 14px 34px -8px rgba(242, 106, 27, 0.28);

  /* Геометрия */
  --font-main:     'Manrope', -apple-system, sans-serif;
  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     22px;
  --radius-xl:     32px;
  --radius-pill:   9999px;
  --container:     1220px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--rust);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

p {
  margin: 0;
  color: var(--ink);
}

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

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.accent-text {
  color: var(--primary);
}

/* ==========================================================================
   КНОПКИ
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  height: 3rem;
  padding: 0 1.6rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-main);
  font-size: 0.925rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-sm {
  height: 2.35rem;
  padding: 0 1.15rem;
  font-size: 0.825rem;
}

.btn-lg {
  height: 3.45rem;
  padding: 0 2.2rem;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--grad-accent);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -6px rgba(242, 106, 27, 0.38);
}

.btn-outline {
  background: var(--bg-soft);
  border-color: var(--border-strong);
  color: var(--rust-deep);
}
.btn-outline:hover {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* ==========================================================================
   ШАПКА (Site Header)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(247, 243, 240, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.75rem;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--rust-deep);
  flex-shrink: 0;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
}

.nav-main {
  display: none;
  align-items: center;
  gap: 0.35rem;
}
@media (min-width: 1120px) {
  .nav-main { display: flex; }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
}
.nav-link:hover, .nav-link.active {
  color: var(--rust-deep);
  background: var(--surface);
}

.caret {
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform 0.2s ease;
}
.dropdown:hover .caret {
  transform: rotate(180deg);
}

.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  left: 0;
  top: 100%;
  display: none;
  padding-top: 0.6rem;
  animation: drop-in 0.2s ease;
}
@keyframes drop-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-panel {
  width: 25rem;
  padding: 0.75rem;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-subtle);
  display: grid;
  gap: 0.35rem;
}
.dp-item {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
}
.dp-item:hover {
  background: var(--surface);
}
.dp-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--rust-deep);
}
.dp-desc {
  font-size: 0.775rem;
  color: var(--ink-muted);
}

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

.header-phone {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--rust);
}
.header-phone:hover {
  color: var(--primary);
}

@media (max-width: 1200px) {
  .header-phone { display: none; }
}
@media (max-width: 640px) {
  .header-cta { display: none; }
}

/* Бургер меню */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
}
@media (min-width: 1120px) {
  .burger { display: none !important; }
}
.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--rust-deep);
  transition: all 0.2s ease;
}

/* Мобильное меню */
.mobile-menu {
  position: fixed;
  top: 4.75rem;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: calc(100vh - 4.75rem);
  background: var(--bg);
  border-top: 1px solid var(--border);
  overflow-y: auto;
  z-index: 9999;
  display: none;
  padding: 1.5rem;
}
.mobile-menu.is-open {
  display: block;
}

/* ==========================================================================
   КАРТОЧКИ И СЕТКИ
   ========================================================================== */

.card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-subtle);
  transition: all 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-soft);
  box-shadow: 0 16px 36px -10px rgba(156, 58, 16, 0.12);
}

.bento-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Теги и бейджи */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.775rem;
  font-weight: 700;
  background: var(--surface);
  color: var(--rust);
  border: 1px solid var(--border);
  width: fit-content;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

/* ==========================================================================
   ПОДВАЛ (Site Footer)
   ========================================================================== */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-top: 4.5rem;
  margin-top: 5rem;
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  padding-bottom: 3.5rem;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.2fr; }
}

.footer-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rust);
  margin-bottom: 1.25rem;
}
.footer-links {
  display: grid;
  gap: 0.75rem;
}
.footer-links a {
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  font-size: 0.825rem;
  color: var(--ink-faint);
}
@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ==========================================================================
   ТАБЛИЦА ЦЕН (Desktop & Mobile)
   ========================================================================== */

.price-table-wrap {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.price-table-header {
  display: grid;
  grid-template-columns: 1fr auto 160px;
  gap: 1.5rem;
  padding: 1.1rem 1.75rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 0.775rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rust-deep);
}

.price-item {
  display: grid;
  grid-template-columns: 1fr auto 160px;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}
.price-item:last-child {
  border-bottom: none;
}
.price-item:hover {
  background: var(--surface);
}

.price-link {
  font-weight: 700;
  color: var(--rust-deep);
  font-size: 1.05rem;
  line-height: 1.4;
}
.price-item:hover .price-link {
  color: var(--primary);
}

.price-badge {
  white-space: nowrap;
  font-size: 0.775rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--rust);
  border: 1px solid var(--border);
}

.price-val {
  text-align: right;
  font-weight: 800;
  color: var(--primary);
  font-size: 1.15rem;
  white-space: nowrap; /* Запрещает разрыв чисел и знака ₽ */
  font-variant-numeric: tabular-nums;
}

/* Мобильная адаптация таблицы под экраны смартфонов */
@media (max-width: 768px) {
  .price-table-header {
    display: none; /* Прячем десктопную шапку таблицы */
  }

  .price-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem;
  }

  .price-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.25rem;
  }

  .price-val {
    font-size: 1.2rem;
    text-align: right;
  }
}

/* ==========================================================================
   ФИКС МОБИЛЬНЫХ ФОРМ И ДЛИННЫХ КНОПОК (до 768px)
   ========================================================================== */

/* 1. Защита от распирания экрана */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

form {
  max-width: 100%;
  box-sizing: border-box;
}

input, textarea, select {
  max-width: 100%;
  box-sizing: border-box;
}

/* 2. Разрешаем длинным кнопкам переносить текст на смартфонах */
@media (max-width: 640px) {
  .btn,
  button[type="submit"].btn {
    white-space: normal !important;      /* Разрешает перенос длинного текста */
    height: auto !important;             /* Снимает фиксированную высоту */
    min-height: 3.2rem;
    padding: 0.85rem 1.25rem !important; /* Удобные тач-отступы */
    line-height: 1.3 !important;
    text-align: center;
    word-break: normal;
  }

  .btn-lg {
    font-size: 0.975rem !important;
  }

  /* 3. Адаптивные отступы формы на экранах телефонов */
  #zayavka form {
    padding: 1.35rem 1.15rem !important; /* Вместо огромных 40px */
    border-radius: var(--radius-lg) !important;
  }

  /* 4. Поля Имя и Телефон встают строго друг под друга */
  #zayavka form div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  /* 5. Уменьшаем паддинг контейнера на узких экранах */
  .container,
  .container-narrow {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}
/* Расширяем контейнеры заголовков секций на десктопе */
div[style*="max-width: 720px"],
div[style*="max-width: 600px"] {
  max-width: 880px !important;
}

/* Запрет разрыва важных фраз и названий */
.nowrap {
  white-space: nowrap;
}
/* Принудительно скрываем мобильное меню на экранах от 1120px */
@media (min-width: 1120px) {
  .mobile-menu,
  .mobile-menu.is-open {
    display: none !important;
  }
}

/* ==========================================================================
   КРАСИВАЯ МОДАЛЬНАЯ ВСПЛЫВАШКА БЛАГОДАРНОСТИ
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(58, 36, 23, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 2.75rem);
  text-align: center;
  box-shadow: 0 25px 60px -12px rgba(126, 47, 13, 0.28);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.modal-backdrop.is-active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--primary);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-size: 1.65rem;
  color: var(--rust-deep);
  margin-bottom: 0.65rem;
  font-weight: 800;
}

.modal-text {
  font-size: 0.975rem;
  color: var(--ink-muted);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.modal-btn {
  width: 100%;
}

/* ==========================================================================
   HERO ВИДЕО (640x360) И КВАДРАТНЫЕ КАРТИНКИ КАРТОЧЕК
   ========================================================================== */

/* Обертка видео 640x360 */
.hero-video-box {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  margin: 3rem auto 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 50px -15px rgba(126, 47, 13, 0.22);
}

.hero-video-el {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Кнопка включения звука */
.video-sound-btn {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(58, 36, 23, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
}
.video-sound-btn:hover {
  background: rgba(58, 36, 23, 0.95);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Квадратные медиа-блоки в карточках (1:1) */
.card-media-square {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
}

.card-media-square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .card-media-square img {
  transform: scale(1.05);
}

/* Аккуратное оформление блока капчи */
.captcha-container-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.captcha-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rust);
}

.smart-captcha {
  display: flex;
  justify-content: center;
  width: 100%;
}