/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Основные стили */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Устанавливаем плавную прокрутку для всей страницы */
html {
    scroll-behavior: smooth;
}

/* Добавляем отступ сверху для первого блока, чтобы он не перекрывался шапкой */
#hero {
    padding-top: 0px; /* Отступ сверху для первого блока */
}

/body {
    font-family: Arial, sans-serif;
}

/* Шапка */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0px;
    background-color: #111;
    color: #fff;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    left: 0;
}

/* Стили для кнопки меню */
.menu-toggle {
    background-color: #ff6600;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 5px;
    display: none; /* Скрыта по умолчанию */
}

header {
    display: flex;
    justify-content: center; /* Центрируем содержимое шапки */
    align-items: center;
    position: relative;
}

nav {
    display: flex;
    justify-content: space-between;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links li a {
    color: white;
    text-decoration: none;
}

.submenu-items {
    display: none;
    list-style: none;
    padding: 0;
    position: absolute;
    top: 30px;
    background-color: #444;
}

.submenu:hover .submenu-items {
    display: block;
}

#hero2 .hero-content {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px 0px;
    flex-wrap: wrap;

}


/* Стиль для блока Hero */
#hero .hero-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 10px ;
    flex-wrap: wrap;
}

#hero2 .hero-content {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px 0px;
    flex-wrap: wrap;
}


#hero .hero-text {
    width: 50%;
    text-align: left;
    padding-right: 20px; /* Отступ справа, чтобы текст не был слишком близко к изображению */

}

#hero .hero-text2 {
    width: 50%;
    text-align: right;
    padding-left: 20px; /* Отступ справа, чтобы текст не был слишком близко к изображению */

}


#hero .hero-image {
    width: 50%;
    display: flex;
    justify-content: flex-end;

}

#hero .hero-image img {
    width: 100%; /* Ширина изображения 100% */
    height: auto; /* Высота автоматически подстраивается */
    object-fit: cover; /* Изображение будет масштабироваться, сохраняя пропорции */
    border-radius: 8px; /* Закругление углов */
}

#hero .hero-text p {
    font-size: 1.25rem;
    margin-bottom: 0px;
}

#hero .hero-text h1 {
    font-size: 2.5rem; /* Уменьшаем размер заголовка для обычных устройств */
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Зачем? */
#why {

    justify-content: space-between;
    align-items: center;
    padding: 20px 10px;
    text-align: justify;
    width: 100vw; /* Растягиваем на всю ширину экрана */
    background-color: #f0f0f0; /* Светло-серый фон */
    margin: 50 auto;
    max-width: 1200px;
}

#why h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;

}

/* Контейнер для текста и изображения */
.why-content {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap; /* Отключаем перенос элементов */
    width: 100%; /* Убедимся, что контейнер занимает всю ширину */
    vertical-align: top;
    top: 0; /* Положение от верхнего края */


}

.why-text {
    vertical-align:text-top;
    width: 50%;
    text-align: justify;
}

.why-text h2 {
    font-size: 1.8rem; /* Уменьшаем размер заголовка для мобильных */
    line-height: 1.4;
    
}


.why-image {
    width: 50%;
    display: flex;
    justify-content: flex-end; /* Выравнивание изображения по правому краю */
}

.why-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain; /* Сохраняем пропорции изображения */
}


/* Чередование фонов для секций */
section:nth-of-type(even) {
    background-color: #f0f0f0; /* Светло-серый для чётных блоков */
}

section:nth-of-type(odd) {
    background-color: #ffffff; /* Белый для нечётных блоков */
}

/* Секции */
section {
    padding: 10px 10px;
    text-align: center;
    width: 100vw; /* Растягиваем на всю ширину экрана */
    margin: 0 auto;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 0px;
}

section p {
    font-size: 1.125rem;
    margin-bottom: 0px;
}

/* Карточки */
.card, .service-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

.card-left, .card-right {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: justify
}

.card img {
    max-width: 100%;
    border-radius: 8px;
    object-fit: contain;
}

.card-number {
    font-size: 2rem;
    color: #ff8800;
    font-weight: bold;
    margin-bottom: 0px;
    justify-content: space-between;
}


/* Блок с комплектами подогрева руля */
#services {
    padding: 20px 10px;
    width: 100vw; /* Растягиваем на всю ширину экрана */
    background-color: #f0f0f0; /* Светло-серый фон */
    align-items: flex-start;
}

#services h2 {
    font-size: 2.5rem;
    text-align: center; /* Заголовок по центру */
    margin-bottom: 40px;
}

.services-cards {
    max-width: 1200px; /* Ограничиваем ширину контента */
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap; /* Позволяет карточкам перенестись на новую строку */
    gap: 20px;
    margin: 0 auto;
}

.service-card {
    display: flex;
    justify-content: flex-start; /* Текст и изображения по левому краю */
    align-items: flex-start;
    flex-direction: column;
    text-align: left; /* Текст выравнивается по левому краю */
    padding: 5px;
    border-radius: 0px;
    max-width: 1200px; /* Ограничиваем ширину контента */
}

.service-card img {
    width: 40%;
    height: auto;
    margin-bottom: 15px;
}

.service-card p {
    font-size: 1.2rem;
    line-height: 1;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Универсальная кнопка CTA */
.cta-button {
    display: block; /* Делаем кнопку блочным элементом */
    width: fit-content; /* Ширина кнопки будет автоматически адаптироваться под текст */
    background-color: #ff6600;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px; /* Отступ сверху для отделения от текста */
    transition: background-color 0.3s ease;
    text-align: center; /* Центрируем текст внутри кнопки */
}

.cta-button:hover {
    background-color: #e65c00;
}

/* Контейнер карусели */
.image-carousel {

  width: 100%;
  max-width: 1200px; /* Ограничиваем ширину контента */
  overflow: hidden; /* Скрываем элементы, выходящие за пределы */
  margin: 0 auto;
}

/* Контейнер для изображений */
.carousel-images {
  display: flex; /* Используем flex для горизонтального выравнивания изображений */
  animation: slide 20s linear infinite; /* Прокрутка карусели */
}

/* Изображения в карусели */
.carousel-images img {
  width: 50%; /* Изображения растягиваются по ширине контейнера */
  height: auto; /* Сохраняем пропорции */
  object-fit: cover; /* Изображения будут заполнять контейнер без искажения */
  margin-right: 20px; /* Расстояние между изображениями */
  border-radius: 8px; /* Закругленные углы для картинок */
}

/* Анимация для прокрутки карусели */
@keyframes slide {
  0% {
    transform: translateX(0); /* Начинаем с первого изображения */
  }
  100% {
    transform: translateX(-25%); /* Перемещаем контейнер на 25% его ширины (половина ширины одного изображения) */
  }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Общие стили для секции */
.complect-desc {
    background-color: #f0f0f0; /* Фон секции */
    padding: 20px 10px; /* Отступы */
    width: 100%; /* Растягиваем на всю ширину экрана */
}

.complect-desc-title {
    font-size: 2rem; /* Размер шрифта для заголовка */
    text-align: center; /* Центрируем заголовок */
    margin-bottom: 30px; /* Отступ снизу */
    color: #333; /* Цвет заголовка */
}

.complect-desc-container {
    max-width: 1200px; /* Ширина контейнера с блоками */
    margin: 0 auto; /* Центрируем */
    display: flex; /* Располагаем блоки в строку */
    justify-content: space-between; /* Равномерное распределение */
    gap: 20px; /* Расстояние между блоками */
}

/* Стиль для каждого блока */
.complect-item {
    background-color: #fff; /* Белый фон для каждого блока */
    width: calc(25% - 20px); /* Четыре блока в строку (с учетом промежутков) */
    text-align: center; /* Центрируем текст */
    padding: 20px;
    border-radius: 0px; /* Скругленные углы */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Легкая тень для блока */
}

/* Текст в блоках */
.complect-item .text {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
}

/* Изображения в блоках */
.complect-item img {
    max-width: 100%; /* Ширина изображения 100% */
    height: auto; /* Сохраняем пропорции */
    border-radius: 8px; /* Скругляем углы изображения */
}



/* Стили для футера */
footer {
    background-color: #111; /* Темный фон для футера */
    color: white; /* Белый цвет текста */
    padding: 20px 0; /* Отступы сверху и снизу */
    width: 100%; /* Фон футера растягивается на всю ширину экрана */
    display: flex;
    justify-content: center; /* Центрируем содержимое футера */
}

.footer-content {
    max-width: 600px; /* Уменьшаем ширину футера в 2 раза */
    width: 100%; /* Ширина контента футера будет 100% от контейнера */
    text-align: center;
}

footer .footer-content p {
    margin: 0;
    font-size: 1.2rem;
}

footer .footer-content a {
    color: #ff6600; /* Цвет ссылки */
    text-decoration: none;
}

footer .footer-content a:hover {
    text-decoration: underline; /* Подчеркнутая ссылка при наведении */
}

/* Стили для кнопки "ВВЕРХ" */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    background-color: #ff6600;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.8;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.scroll-to-top:hover {
    opacity: 1;
    background-color: #e65c00;
}

/* Показ кнопки только после прокрутки страницы вниз */
.scroll-to-top.hidden {
    display: none;
}
