/* ========== СБРОС ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1e3a5f;
  --accent: #c9a961;
  --accent-dark: #a8874a;
  --text: #2c3e50;
  --light: #f5f7fa;
  --white: #ffffff;
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.08);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.12);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.18);
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --radius: 16px;
}

html {
  scroll-behavior: smooth;
  /* МОБИЛЬНО: не даём контенту вылезать за экран */
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  overflow-x: hidden;
  min-height: 100vh;
  /* МОБИЛЬНО: убирает "прыжок" при открытии меню */
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== НАВИГАЦИЯ ========== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.navbar.scrolled {
  box-shadow: var(--shadow-md);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* МОБИЛЬНО: фикс для узких экранов */
  gap: 1rem;
}
.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
  /* МОБИЛЬНО: чтобы лого не сжималось */
  flex-shrink: 0;
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  /* МОБИЛЬНО: на десктопе — строка */
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition);
  display: inline-block;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Бургер — скрыт на десктопе */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  /* МОБИЛЬНО: удобная зона нажатия (минимум 44x44) */
  width: 44px;
  height: 44px;
  z-index: 1001;
}
.burger span {
  width: 26px; height: 3px;
  background: var(--primary);
  border-radius: 3px;
  transition: var(--transition);
  display: block;
}
/* Анимация бургера в "крестик" */
.burger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.burger.active span:nth-child(2) {
  opacity: 0;
}
.burger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ========== КНОПКИ ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 2.2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-align: center;
  /* МОБИЛЬНО: удобная высота нажатия */
  min-height: 48px;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.6s;
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(201,169,97,0.4);
}
.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ========== КОНТЕЙНЕР / СЕКЦИИ ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  /* МОБИЛЬНО: clamp — меньше отступы на телефоне */
  padding: 0 clamp(1rem, 4vw, 2rem);
}
section {
  padding: clamp(3rem, 8vw, 5rem) 0;
}
.section-title {
  /* МОБИЛЬНО: плавный размер шрифта */
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  color: var(--primary);
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 800;
  line-height: 1.2;
}
.section-subtitle {
  text-align: center;
  color: #7f8c8d;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  padding: 0 0.5rem;
}

/* ========== ФУТЕР ========== */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.8);
  padding: 3rem clamp(1rem, 4vw, 2rem) 1.5rem;
  margin-top: 4rem;
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
footer h4 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
footer a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  display: block;
  margin: 0.5rem 0;
  transition: var(--transition);
  /* МОБИЛЬНО: удобное нажатие */
  padding: 0.25rem 0;
}
footer a:hover {
  color: var(--accent);
  transform: translateX(5px);
}
.copyright {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
}

/* ============================================================
   МОБИЛЬНО: АДАПТИВ (главное!)
   ============================================================ */

/* Планшеты и меньше */
@media (max-width: 768px) {
  /* Показываем бургер */
  .burger { display: flex; }

  /* Меню — выезжает справа */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(80%, 320px);
    height: 100vh;
    height: 100dvh; /* МОБИЛЬНО: корректная высота с учётом адресной строки */
    background: var(--white);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    padding: 5.5rem 1.5rem 2rem;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    transition: right 0.4s ease;
    overflow-y: auto;
    z-index: 1000;
  }
  .nav-links.open { right: 0; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 1rem 0.5rem;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  .nav-links a::after { display: none; }

  /* ЗАТЕМНЕНИЕ фона при открытом меню */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 999;
  }
  .nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Телефоны */
@media (max-width: 480px) {
  .btn {
    /* МОБИЛЬНО: кнопки на всю ширину */
    width: 100%;
    padding: 1rem 1.5rem;
  }
  .hero-btns {
    flex-direction: column;
    width: 100%;
  }
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  footer a:hover { transform: none; }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
  .nav-container { padding: 1rem; }
  .logo { font-size: 1.2rem; }
}