/* ============================================
   ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ СТРАНИЦ
   AI Собеседник — Брендбук v1.0
   ============================================ */

/* Стабильная ширина под скроллбар — меньше сдвиг липкой шапки при смене страниц */
html {
  scrollbar-gutter: stable;
}

/* ===== СБРОС ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  color: #1b1f24;
  background: #f6f7f9;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

/* ===== КОНТЕЙНЕР ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== ЕДИНАЯ НАВИГАЦИЯ ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 255, 0.06);
  padding: 14px 0;
  margin-bottom: 32px;
}

.site-nav .container {
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0000ff;
  text-decoration: none;
  margin-right: auto;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: 32px;
  width: auto;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0000ff;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: #1b1f24;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: #0000ff;
}

/* Кнопка «Попробовать» в шапке — фиксированные метрики; перебивает локальные .btn на страницах */
.site-nav .nav-links > a.btn.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 14px;
  background: #0000ff;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(0, 0, 255, 0.18);
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.site-nav .nav-links > a.btn.btn-primary:hover {
  background: #0000d6 !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 255, 0.24);
}

/* ===== ЕДИНЫЕ КНОПКИ ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  border: none;
  white-space: nowrap;
  background: transparent;
  color: #1b1f24;
}

.btn-primary {
  background: #0000ff;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 255, 0.15);
}

.btn-primary:hover {
  background: #0000d6;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 255, 0.2);
}

.btn-secondary {
  background: white;
  color: #1b1f24;
  border: 1.5px solid #e5e7eb;
}

.btn-secondary:hover {
  border-color: #0000ff;
  color: #0000ff;
  transform: translateY(-1px);
}

.btn-success {
  background: #10b981;
  color: white;
}

.btn-success:hover {
  background: #0ea771;
  transform: translateY(-1px);
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== ЕДИНЫЙ МАРКЕТИНГОВЫЙ ФУТЕР ===== */
.site-footer {
  background: #ffffff;
  border-top: 1px solid #eef2ff;
  padding: 48px 0 28px;
  margin-top: 60px;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 36px;
  align-items: stretch;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr));
  gap: 32px 40px;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 320px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0000ff;
}

.footer-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.footer-logo-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.footer-tagline {
  margin: 0;
  color: #646b75;
  font-size: 14px;
  line-height: 1.5;
}

.footer-cta {
  margin-top: 4px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 10px;
}

.footer-col-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #1b1f24;
}

.footer-col-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-links a,
.footer-col-list a {
  color: #646b75;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
}

.footer-col-links a:hover,
.footer-col-list a:hover {
  color: #0000ff;
}

/* На случай старой разметки с <ul> из кэша HTML */
.footer-col-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-list li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col-list li::marker {
  content: '';
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 20px;
  border-top: 1px solid #eef2ff;
}

.footer-copy {
  margin: 0;
  color: #9ca3b0;
  font-size: 13px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer-legal a {
  color: #9ca3b0;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s ease;
}

.footer-legal a:hover {
  color: #0000ff;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.footer-social a {
  color: #646b75;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-social a:hover {
  color: #0000ff;
}

/* legacy flat footer links (если где-то остались) */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
}

.footer-links a {
  color: #646b75;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #0000ff;
}

/* ============================================
   МОБИЛЬНАЯ НАВИГАЦИЯ (БУРГЕР-МЕНЮ)
   ============================================ */

@media (max-width: 760px) {
  .container {
    padding: 0 16px;
  }

  .site-nav {
    padding: 12px 0;
  }

  .site-nav .container {
    flex-wrap: wrap;
    gap: 0;
  }

  .logo {
    font-size: 18px;
    width: auto;
    text-align: left;
    margin-right: auto;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 255, 0.08);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 12px 0;
    width: 100%;
    text-align: center;
    font-size: 16px;
  }

  .nav-links .btn,
  .nav-links > a.btn.btn-primary {
    margin-top: 8px;
    width: 100%;
    justify-content: center;
  }

  .site-nav .nav-links > a.btn.btn-primary:hover {
    transform: none;
  }

  /* Кнопка бургера */
  .menu-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: auto;
  }

  .menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #1b1f24;
    border-radius: 2px;
    position: relative;
    transition: all 0.15s ease;
    flex-shrink: 0;
  }

  .menu-toggle span::before,
  .menu-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: #1b1f24;
    border-radius: 2px;
    transition: all 0.15s ease;
    transform-origin: center;
  }

  .menu-toggle span::before {
    top: -6px;
  }

  .menu-toggle span::after {
    bottom: -6px;
  }

  .menu-toggle.active span {
    background: transparent;
  }

  .menu-toggle.active span::before {
    top: 0;
    transform: rotate(45deg);
  }

  .menu-toggle.active span::after {
    bottom: 0;
    transform: rotate(-45deg);
  }

  .site-footer {
    padding: 36px 0 24px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-brand {
    max-width: none;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-links {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (min-width: 761px) {
  .menu-toggle {
    display: none;
  }
}

@media (max-width: 480px) {
  .site-nav {
    padding: 12px 0;
    margin-bottom: 20px;
  }

  .nav-links {
    gap: 4px;
  }

  .nav-links a {
    font-size: 16px;
  }
}