/* ФИНАЛЬНЫЙ ПОЛНЫЙ КОД — КОПИРУЙ ВЕСЬ ЦЕЛИКОМ */

:root {
  --color-primary: #1e293b;
  --color-secondary: #475569;
  --color-accent: #3b82f6;
  --color-accent-hover: #2563eb;
  --color-success: #10b981;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #1e293b;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.12);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1. Глобальный сброс и фикс ширины */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  overflow-x: hidden; /* Запрещаем сайту расползаться вширь */
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: linear-gradient(135deg, #e0f2fe 0%, #cffafe 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* 2. Типографика */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; color: var(--color-primary); }
h3 { font-size: 1.75rem; }
p { margin-bottom: 1.25rem; font-size: 1.1rem; }

/* 3. Шапка */
.header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  height: 70px;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

/* 4. Навигация и Сайд-панель (ИСПРАВЛЕНО) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 6px;
  z-index: 1100;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 3px;
  transition: var(--transition);
}

.menu ul {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

.menu a {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: var(--transition);
}

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

/* Крестик для закрытия (добавлен стиль) */
.menu-close {
  display: none; /* Виден только на мобилках */
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  cursor: pointer;
  color: var(--color-primary);
  line-height: 1;
}

/* 5. Hero секция (Исправлена сетка) */
.hero {
  padding: 6rem 0 4rem;
  width: 100%;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr; /* Текст шире формы */
  gap: 4rem;
  align-items: start;
}

.hero h2 { font-size: 3.25rem; line-height: 1.1; margin-bottom: 1.5rem; }

.benefits {
  list-style: none;
  margin: 2rem 0;
  font-size: 1.25rem;
}

.benefits li {
  padding-left: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
}

.benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: bold;
}

/* 6. Форма (Из твоего скриншота) */
.form-container {
  background: var(--color-surface);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.form-group label {
  display: block;
  text-align: center; /* Как на скрине */
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  color: var(--color-muted);
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fafbff;
  font-size: 1rem;
}

.submit-btn {
  width: 100%;
  padding: 1.2rem;
  background: #0f172a; /* Темный цвет со скрина */
  color: white;
  border-radius: var(--radius-md);
  font-weight: 700;
  border: none;
  cursor: pointer;
  margin-top: 1rem;
}

/* 7. Страницы и PDF (Фикс "бесконечной ширины") */
.page-section { padding: 4rem 0; width: 100%; }
.page-section .container {
  background: #fff;
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 1000px; /* Ограничиваем контент других страниц */
}

.pdf-pages { width: 100%; display: flex; flex-direction: column; gap: 2rem; }
.pdf-page canvas { max-width: 100% !important; height: auto !important; border-radius: 8px; }

/* 8. Футер */
.footer { background: #0f172a; color: #e2e8f0; padding: 4rem 0; margin-top: auto; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 3rem; }

/* 9. АДАПТИВНОСТЬ (КРИТИЧЕСКИЕ ПРАВКИ) */
@media (max-width: 992px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
  .benefits li { text-align: left; max-width: 500px; margin: 0 auto 1rem; }
  .hero h2 { font-size: 2.75rem; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  
  /* Сайдбар - ТЕПЕРЬ ОН НЕ ЛОМАЕТ ЭКРАН */
  .menu {
    position: fixed;
    top: 0;
    right: -100%; /* Скрыто */
    width: 320px; /* Фиксированная ширина */
    height: 100vh;
    background: white;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    padding: 80px 40px;
    transition: var(--transition);
    z-index: 2000;
    display: block !important;
  }

  .menu.active { right: 0; }
  .menu-close { display: block; } /* Показываем крестик */

  .menu ul { flex-direction: column; gap: 2rem; align-items: flex-start; }
  .menu a { font-size: 1.25rem; }

  .hero h2 { font-size: 2.25rem; }
  .form-container { padding: 1.5rem; }
}

/* Анимации */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-content, .form-container { animation: fadeInUp 0.6s ease-out forwards; }
