/* Шрифт Oswald */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;600&display=swap');

/* Общие стили и сброс */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Oswald', sans-serif; /* Резервный шрифт */
  line-height: 1.6;
  background-color: #f8f9fa; /* Светло-серый фон */
  color: #333;
  overflow-x: hidden; /* Предотвращение горизонтального скролла на body */
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  margin-bottom: 0.75em;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #007bff; /* Насыщенный синий для акцентов */
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #0056b3; /* Более темный синий при наведении */
}

ul {
  list-style: none;
}

.container {
  width: 90%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Цветовая палитра (пример) */
:root {
  --bg-light: #f8f9fa; /* Очень светлый */
  --bg-neutral: #e9ecef; /* Нейтральный серый */
  --bg-warm-beige: #f5f5dc; /* Теплый бежевый (если нужен) */
  --text-dark: #212529;
  --text-light: #ffffff;
  --accent-blue: #4a90e2; /* Мягкий синий */
  --accent-blue-darker: #357ABD;
  --border-color: #dee2e6;
  --tile-bg: #ffffff; /* Фон плиток */
  --tile-hover-bg: #e9ecef;
  --header-bg: #2c3e50; /* Темно-синий/серый для шапки */
}

/* Секции как плитки (общий стиль для отступов) */
section {
  padding: 40px 0;
  margin-bottom: 20px; /* Равномерные отступы между секциями */
  background-color: var(--bg-light); /* Фон для секций, можно менять */
}

section:nth-child(even) {
    background-color: var(--bg-neutral); /* Чередование фона для секций */
}

section#hero { /* Особый стиль для hero секции */
	background: linear-gradient(to bottom right, #f9f6f2, #e8e3dc);
  color: #212529;
 
    margin-bottom: 20px;
}


/* 3. Шапка */
.header {
  background-color: var(--header-bg);
  color: var(--text-light);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.brand {
  display: flex;
  align-items: center;
}

.logo-icon {
  width: 40px; /* Размер для logo.svg */
  height: 40px;
  margin-right: 10px;
  /* fill: var(--text-light); Если SVG и хотите менять цвет */
}

.logo-text {
  font-family: 'Oswald', sans-serif;
  font-size: 1.8rem; /* Размер как у H1 */
  font-weight: 600;
  color: var(--text-light);
}

.menu-toggle {
  display: none; /* Скрыт по умолчанию, показывается на мобильных */
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
}

.nav ul {
  display: flex;
  align-items: center;
}

.nav li {
  margin-left: 20px;
}

.nav a {
  font-family: 'Oswald', sans-serif;
  color: var(--text-light);
  padding: 8px 12px;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav a:hover,
.nav a.active { /* для активной ссылки, если нужно */
  background-color: var(--accent-blue);
  color: var(--text-light);
}

/* Плиточное меню для мобильных (когда раскрыто) */
.nav.expanded {
  display: grid;
  grid-template-columns: 1fr; /* Всегда одна колонка на мобильных */
  gap: 0;
  position: absolute;
  top: 100%; /* Под шапкой */
  left: 0;
  right: 0;
  background-color: var(--header-bg);
  padding: 10px 0;
  max-height: 500px; /* Для анимации */
  overflow: hidden;
  transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav:not(.expanded) {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden; /* чтобы не было видно при схлопывании */
}

.nav.expanded li {
  margin: 0;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1); /* Разделитель */
}
.nav.expanded li:last-child {
  border-bottom: none;
}

.nav.expanded a {
  display: block;
  padding: 15px;
  width: 100%;
}

/* Главный экран (Hero) */
.hero {
  position: relative;
  height: 85vh;
  background: linear-gradient(to bottom right, #f9f6f2, #e8e3dc);
  color: #212529;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  text-align: center;
  padding: 20px;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.hero-buttons .btn {
  padding: 12px 24px;
  margin: 5px;
  background-color: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: background-color 0.3s, transform 0.2s;
}
.hero-buttons .btn:hover{
  background-color: var(--accent-blue-darker);
  transform: scale(1.05);
}
/* Выделение первой кнопки (Оформить заявку) */
/* Кнопка "Оформить заявку" — выделение */
.btn-highlight {
  padding: 12px 24px;
  margin: 5px;
  background: linear-gradient(135deg, #4a90e2, #357ABD);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 12px rgba(74, 144, 226, 0.6);
  animation: pulse-strong 1.5s infinite;
  transition: background 0.3s, transform 0.2s;
}

.btn-highlight:hover {
  transform: scale(1.06);
}

@keyframes pulse-strong {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.6);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(74, 144, 226, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 144, 226, 0);
    transform: scale(1);
  }
}
@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-content {
  animation: fadeInScale 0.3s ease forwards;
}

.moving-truck {
  position: absolute;
  bottom: 0;
  left: -30%;
  height: 20vh;
  animation: drive 8s linear infinite;
  z-index: 1;
}

@keyframes drive {
  0% {
    left: -30%;
  }
  100% {
    left: 110%;
  }
}

/* Модальное окно */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  position: relative;
  background: white;
  padding: 40px 30px;
  border-radius: 12px;
  text-align: center;
  max-width: 300px;
  width: 90%;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.modal-content a {
  display: inline-block;
  margin-top: 10px;
  font-size: 1.1rem;
  color: var(--accent-blue);
  text-decoration: none;
}

/* Крестик */
.modal .close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.8rem;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  transition: color 0.2s;
}

.modal .close:hover {
  color: #000;
}

/* Статистика */
.stats .container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.stat-item {
  background-color: var(--tile-bg);
  padding: 25px;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  font-family: 'Oswald', sans-serif;
  font-size: 1.2rem;
  color: var(--text-dark);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.stat-item:hover {
  background-color: var(--tile-hover-bg);
  transform: translateY(-3px);
}

/* Преимущества */
.features h2, .faq h2, .partners h2, .gallery h2, .contact h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 30px;
  color: var(--text-dark);
}

.features-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.features-list li {
  background-color: var(--tile-bg);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  color: var(--text-dark);
  transition: background-color 0.3s ease, transform 0.3s ease;
}
.features-list li:hover {
  background-color: var(--tile-hover-bg);
  transform: translateY(-3px);
}

.features-list li::before { /* Для иконок, если будут */
  /* content: '✔'; */
  margin-right: 10px;
  font-weight: bold;
  color: var(--accent-blue);
}

/* Часто задаваемые вопросы */
.faq ul {
  max-width: 800px;
  margin: 0 auto;
}

.faq li {
  background-color: var(--tile-bg);
  padding: 15px 20px;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.faq li strong {
  font-family: 'Oswald', sans-serif;
  color: var(--accent-blue);
}

/* Партнёры (Слайдер) */
.partners .slider-wrapper {
  overflow: hidden; /* Скрывает все, что выходит за пределы */
  width: 100%;
  padding: 10px 0; /* Небольшой отступ для тени картинок */
}

.partners .slider-track {
  display: flex;
  gap: 15px; /* Расстояние между логотипами */
  animation: scrollPartners 1s linear infinite; /* Для автоматической прокрутки */
  width: max-content; /* Чтобы все элементы поместились в ряд */
}

.partners .slider-track img {
  height: 80px; /* Примерная высота логотипов */
  width: auto;
  object-fit: contain;
  background-color: var(--tile-bg); /* Если у логотипов прозрачный фон */
  padding: 5px;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Анимация для слайдера партнеров */
@keyframes scrollPartners {
  0% {
    transform: translateX(0);
  }
  100% {
    /* Прокручиваем на половину ширины, так как изображения дублируются */
    transform: translateX(calc(-10% - 10px)); /* 15px - половина gap */
  }
}
.partners .slider-wrapper:hover .slider-track {
    animation-play-state: paused; /* Пауза при наведении */
}

/* Стили для простого Лайтбокса */
.lightbox {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  max-width: 80%;
  max-height: 80%;
  border-radius: 5px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
}


/* Галерея (Плиточная сетка) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.gallery-grid img {
  width: 100%;
  height: 200px; /* Фиксированная высота для единообразия */
  object-fit: cover; /* Масштабирование с сохранением пропорций и обрезкой */
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Контактная форма */
.contact form {
  max-width: 700px;
  margin: 0 auto 20px auto;
  background-color: var(--tile-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact input[type="text"],
.contact input[type="tel"],
.contact input[type="email"],
.contact textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: 'Arial', sans-serif;
  font-size: 1rem;
}

.contact input[type="text"]:focus,
.contact input[type="tel"]:focus,
.contact input[type="email"]:focus,
.contact textarea:focus {
    border-color: var(--accent-blue);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

.contact textarea {
  min-height: 120px;
  resize: vertical;
}

.contact label {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.contact input[type="checkbox"] {
  margin-right: 8px;
  width: auto; /* чтобы чекбокс не растягивался на всю ширину */
}

.contact button[type="submit"] {
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
}

.contact-phone {
  text-align: center;
  font-size: 1.1rem;
}
.contact-phone a {
    font-weight: bold;
}


/* Подвал */
.footer {
  background-color: var(--header-bg); /* Такой же как шапка для консистентности */
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 25px 0;
  margin-top: 30px; /* Отступ от последнего контентного блока */
}


/* Плавная анимация при скроллинге (требует JS) */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px); /* Небольшой сдвиг для эффекта появления снизу */
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}


/* 5. Адаптивность и мобильные устройства */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.4rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
    .features-list {
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}


@media (max-width: 768px) {
  .header-inner {
    /* На мобильных toggle слева, бренд по центру или справа, или все в столбик */
  }

  .nav {
    /* По умолчанию скрыто на мобильных, JS будет добавлять .expanded */
    /* Стили для :not(.expanded) уже есть */
    /* Позиционирование и фон для .expanded уже есть */
    width: 100%; /* Растягиваем на всю ширину */
  }

  /* Если на мобильных .nav не является flex-элементом в .header-inner,
     то нужно будет скорректировать .header для правильного отображения .brand и .menu-toggle */
  .header .nav ul {
    display: none; /* Скрываем горизонтальное меню */
  }
  .header .nav.expanded ul { /* Если используем ul внутри .nav.expanded */
      display: flex;
      flex-direction: column;
      width: 100%;
  }
  .header .nav.expanded li {
      margin-left: 0;
      width: 100%;
  }
  .header .nav.expanded a {
      padding: 15px;
      text-align: center;
      border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .header .nav.expanded li:last-child a {
      border-bottom: none;
  }


  .menu-toggle {
    display: block; /* Показываем кнопку бургера */
  }

  /* Изменения для шапки по ТЗ: меню и заголовок по центру */
  /* Это немного конфликтует с .brand слева и .nav (меню) справа.
     Предполагаю, что на мобильных .brand (с лого и текстом) будет по центру,
     а меню будет выпадающим.
  */
  .header {
    /* display: grid; grid-template-columns: 1fr; уже не актуально из-за flex */
  }
  .header-inner {
    /* Если хотим бренд по центру на мобильных */
    /* justify-content: center; */
    /* position: relative; */ /* чтобы toggle не мешал */
  }
  /* .brand { flex-grow: 1; text-align: center; margin-left: -40px; /* Компенсация ширины toggle, если он слева */ } */


  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-buttons .btn {
    width: 80%;
    margin-bottom: 10px;
  }

  .stats .container,
  .features-list,
  .gallery-grid {
    grid-template-columns: 1fr; /* Один элемент в строке */
  }

  /* Партнёры - если хотим стек вместо прокрутки на мобильных */
  /* .partners .slider-track {
    flex-direction: column;
    align-items: center;
    animation: none; /* Отключаем автопрокрутку для вертикального стека */
  /* }
  .partners .slider-track img {
    margin-bottom: 15px;
    height: 50px;
  } */
  /* Оставляем горизонтальную прокрутку для партнеров, она обычно удобнее на мобильных */
  .partners .slider-track {
      animation-duration: 20s; /* Ускоряем немного для мобильных, если оставляем */
  }


  .contact form {
    padding: 20px;
  }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.5rem;
    }
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .btn, button[type="submit"] {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
     section {
        padding: 30px 0;
    }
    h2 {
        font-size: 1.8rem;
    }
}
/* Стили для Контактной формы - Вариант 1 */
#contact {
  padding: 40px 0;
  background-color: #e9ecef; /* Слегка отличный фон для выделения */
}

#contact h2 {
  margin-bottom: 40px; /* Больше отступ для заголовка формы */
}

#contact form {
  max-width: 600px; /* Ограничиваем ширину формы для лучшей читаемости */
  margin: 0 auto;
  padding: 30px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#contact input[type="text"],
#contact input[type="tel"],
#contact input[type="email"],
#contact textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box; /* Чтобы padding не влиял на общую ширину */
  font-size: 1em;
  transition: border-color 0.3s ease;
}

#contact input[type="text"]:focus,
#contact input[type="tel"]:focus,
#contact input[type="email"]:focus,
#contact textarea:focus {
  border-color: #007bff; /* Цвет при фокусе (можно выбрать свой) */
  outline: none; /* Убираем стандартный outline */
}

#contact textarea {
  min-height: 120px; /* Минимальная высота для текстового поля */
  resize: vertical; /* Разрешить изменять размер только по вертикали */
}

#contact label {
  display: flex; /* Для выравнивания чекбокса и текста */
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.9em;
  color: #555;
}

#contact input[type="checkbox"] {
  margin-right: 10px;
  accent-color: #007bff; /* Цвет для чекбокса */
}

#contact button[type="submit"] {
  background-color: #007bff; /* Основной цвет кнопки */
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
  display: block; /* Чтобы кнопка заняла всю доступную ширину, если нужно */
  width: 100%; /* Или 'auto' если не нужна во всю ширину */
}

#contact button[type="submit"]:hover {
  background-color: #0056b3; /* Более темный цвет при наведении */
}

.contact-phone {
  text-align: center;
  margin-top: 30px;
  font-size: 1.1em;
}

.contact-phone a {
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
}

.contact-phone a:hover {
  text-decoration: underline;
}

/* Стили для секции FAQ с карточками */
#faq .faq-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px; /* Пространство между карточками */
}

#faq .faq-card {
    background-color: #ffffff; /* Фон карточки */
    border: 1px solid #e0e0e0; /* Ненавязчивая рамка */
    border-radius: 8px; /* Скругление углов */
    /* padding: 20px; Убираем общий padding, т.к. вопрос будет иметь свой */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Мягкая тень */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Плавный переход для ховер-эффекта */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Важно для анимации max-height и для border-radius */
}

#faq .faq-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

#faq .faq-card-question {
    font-size: 1.15em;
    font-weight: 600;
    color: #333;
    margin: 0; /* Убираем стандартные отступы у h3 */
    padding: 20px; /* Добавляем padding сюда */
    cursor: pointer; /* Показываем, что на вопрос можно нажать */
    display: flex; /* Для расположения текста вопроса и значка */
    justify-content: space-between; /* Текст слева, значок справа */
    align-items: center; /* Выравнивание по центру вертикали */
    border-bottom: 1px solid #e0e0e0; /* Разделитель, если ответ скрыт */
}

#faq .faq-card.active .faq-card-question {
    /* Можно добавить стиль для активного вопроса, например, другой фон */
    /* background-color: #f0f0f0; */
    border-bottom: 1px solid #e0e0e0; /* Оставляем или убираем, если ответ видим */
}


#faq .faq-card-question span:first-child {
    margin-right: 10px; /* Небольшой отступ для текста вопроса от значка */
}

#faq .faq-toggle {
    font-size: 1.2em; /* Размер значка "+"/"-" */
    font-weight: bold;
    transition: transform 0.3s ease; /* Анимация для вращения значка */
}

#faq .faq-card.active .faq-toggle {
    transform: rotate(45deg); /* Превращаем "+" в "х" (или можно менять на "-") */
    /* content: "-";  Если бы это был псевдоэлемент, а не span с текстом */
}

#faq .faq-card-answer {
    font-size: 0.95em;
    color: #555;
    line-height: 1.6;
    padding: 0 20px; /* Отступы слева и справа, но не сверху/снизу */
    margin-bottom: 0;
    max-height: 0; /* Изначально ответ скрыт и не занимает места */
    overflow: hidden; /* Скрываем содержимое, которое выходит за max-height */
    transition: max-height 0.4s ease-out, padding-top 0.4s ease-out, padding-bottom 0.4s ease-out; /* Плавная анимация раскрытия */
}

#faq .faq-card.active .faq-card-answer {
    padding: 20px; /* Возвращаем вертикальные отступы при раскрытии */
    max-height: 500px; /* Достаточно большое значение для большинства ответов. Можно подобрать точнее или вычислить JS. */
    /* Или, если высота контента сильно варьируется, лучше использовать JS для установки max-height */
    border-top: none; /* Убираем верхнюю границу, если вопрос ее уже имеет */
}

/* Адаптация для мобильных устройств */
@media (max-width: 600px) {
    #faq .faq-cards-container {
        grid-template-columns: 1fr;
    }
}
