/* Общие стили */
body {
  margin: 0;
  font-family: 'Montserrat', Arial, sans-serif;
  background: linear-gradient(120deg, #181e26 0%, #232b36 100%);
  color: #e6e6e6;
  overflow-x: hidden;
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

.hero {
  min-height: 100vh;
  background: linear-gradient(120deg, #232b36 70%, #181e26 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
  justify-content: center; /* По умолчанию центрируем */
  align-items: center;
  overflow: hidden;
}
.hero .overlay {
  position: absolute;
  inset: 0;
  /* 
    Изображение по умолчанию (например, для ПК или как fallback).
    Замените 'hero_bg_desktop.jpeg' на ваше реальное имя файла для десктопа.
  */
  background: url('../images/hero_bg_desktop.jpeg') center/cover no-repeat; 
  opacity: 0.12;
  z-index: 1;
  transition: background-image 0.3s ease-in-out; /* Плавный переход при изменении фона, если браузер успеет */
}
nav {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px 40px 0 40px;
  z-index: 1001; 
  position: relative; 
}
.logo {
  font-size: 2.3rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.09);
  z-index: 1002; 
}
nav ul {
  list-style: none;
  display: flex;
  gap: 36px;
  margin: 0;
  padding: 0;
}
nav a {
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: color .2s;
  position: relative;
}
nav a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: #fff; /* Изменено с #ffb300 */
  transition: width .3s;
  position: absolute;
  bottom: -5px; left: 0;
}
nav a:hover {
  color: #fff; /* Изменено с #ffb300 (текст уже белый, так что это не изменит цвет при наведении, если только основной цвет не изменится) */
}
nav a:hover::after {
  width: 100%;
}
.hero-content {
  z-index: 2;
  position: relative;
  text-align: center;
  margin-top: 80px; 
  padding: 0 20px; 
  animation: fadeInDown 1.2s;
}
.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: 1px;
  text-shadow: 0 4px 16px rgba(0,0,0,0.14);
  color: #fff;
}
.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
  color: #cfcfcf;
}
.btn {
  background: #fff; /* Изменен градиент на сплошной белый */
  color: #232b36; /* Текст остался темным, хорошо для белого фона */
  padding: 16px 44px;
  border: none;
  border-radius: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,0.13);
  transition: background .2s, color .2s, transform .2s, box-shadow .2s; /* Добавил box-shadow в transition */
  text-decoration: none;
  display: inline-block;
}
.btn:hover {
  background: #f0f0f0; /* Слегка другой белый или светло-серый для ховера */
  color: #181e26; /* Можно немного темнее текст при ховере */
  transform: scale(1.05);
  box-shadow: 0 6px 22px rgba(0,0,0,0.15);
}
section {
  max-width: 1200px;
  margin: 0 auto 80px auto;
  padding: 0 30px;
}
.parallax {
  background: url('../images/parallax_bg.jpg') center/cover no-repeat fixed;
  min-height: 220px;
  margin-bottom: 60px;
  border-radius: 24px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 4px 16px rgba(0,0,0,0.24);
  position: relative;
  overflow: hidden;
}
.parallax::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(24,30,38,0.65);
  z-index: 1;
}
.parallax-text {
  position: relative;
  z-index: 2;
}

.features-list, .car-list {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}
.features-list .feature {
  background: linear-gradient(135deg, #232b36 80%, #181e26 100%);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.16);
  padding: 36px 30px;
  min-width: 240px;
  max-width: 300px;
  flex: 1;
  text-align: center;
  margin-bottom: 20px;
  transition: transform .2s, box-shadow .2s;
  border: 1.5px solid #232b36;
}
.features-list .feature:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 8px 32px rgba(255,255,255,0.13); /* Изменено с rgba(255,179,0,0.13) */
  border-color: #fff; /* Изменено с #ffb300 */
}
.features-list .feature h3 {
  color: #fff; /* Изменено с #ffb300 */
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.social-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}
.social-link {
  display: block;
  text-decoration: none;
}
.social-link:hover .social-icon {
  transform: scale(1.1);
}
.feature:nth-child(3) .social-link:hover .social-icon {
  animation: shakeSocialIcon 0.5s;
}
@keyframes shakeSocialIcon {
  0% { transform: rotate(0deg) scale(1.1); }
  25% { transform: rotate(15deg) scale(1.1); }
  50% { transform: rotate(-15deg) scale(1.1); }
  75% { transform: rotate(10deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1.1); }
}

.steps-list {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
  padding: 20px 0;
}
.steps-list::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fff; /* Изменено с #ffb300 */
  transform: translateX(-50%);
  z-index: 0;
}
.step {
  background: #232b36;
  border-radius: 8px;
  padding: 20px 30px;
  font-size: 1.15rem;
  position: relative;
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.07); /* Изменено с rgba(255, 179, 0, 0.07) */
  color: #e6e6e6;
  width: 45%;
  z-index: 1;
  text-align: center;
  opacity: 0; 
  transform: translateY(20px); 
  transition: opacity 0.6s ease, transform 0.6s ease; 
}
.step span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #fff; /* Изменено с #ffb300 */
  color: #232b36; /* Текст внутри кружка остался темным, хорошо для белого фона */
  font-weight: bold;
  font-size: 1.4rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15); /* Изменено с rgba(255, 179, 0, 0.15) */
  z-index: 2;
}
.step:nth-child(odd) {
  margin-right: 55%; 
  border-right: 5px solid #fff; /* Изменено с #ffb300 */
}
.step:nth-child(odd) span {
  left: calc(100% + 15px); 
}
.step:nth-child(even) {
  margin-left: 55%; 
  border-left: 5px solid #fff; /* Изменено с #ffb300 */
}
.step:nth-child(even) span {
  right: calc(100% + 15px); 
}

.cars h2, .features h2, .steps h2, .contact h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.2rem;
  color: #fff; /* Изменено с #ffb300 */
  font-weight: 800;
  letter-spacing: 1px;
}
.car-card {
  background: linear-gradient(135deg, #232b36 80%, #181e26 100%);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.19);
  padding: 28px;
  width: 340px;
  min-height: 420px; 
  text-align: center;
  transition: transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1.3s; 
  border: 1.5px solid #232b36;
  cursor: pointer;
  display: flex; 
  flex-direction: column; 
  justify-content: space-between; 
}
.car-card:hover {
  transform: translateY(-10px) scale(1.04);
  box-shadow: 0 12px 36px rgba(255,255,255,0.13); /* Изменено с rgba(255,179,0,0.13) */
  border-color: #fff; /* Изменено с #ffb300 */
}
.car-card img {
  width: 100%;
  height: 200px; 
  object-fit: cover; 
  border-radius: 10px;
  margin-bottom: 20px;
  transition: filter .2s;
  border: 1.5px solid #232b36;
}
.car-card:hover img {
  filter: brightness(1.07) saturate(1.2);
  border-color: #fff; /* Изменено с #ffb300 */
}
.car-card h3 {
  color: #fff; /* Изменено с #ffb300 */
  font-size: 1.25rem;
  margin-bottom: 8px;
}
/* Стиль для цен в карточке автомобиля */
.car-card p strong {
  color: #fff; /* Изменено с #ffb300 (ранее был инлайн стиль) */
}
.gallery-hint {
  background: #fff; /* Изменено с #ffb300 */
  color: #232b36; /* Текст остался темным, хорошо для белого фона */
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  margin-top: 15px; 
  opacity: 0.9; 
  transition: all 0.3s;
}
 .gallery-hint:hover {
    opacity: 1;
    transform: scale(1.05);
}

.contact form {
  background: #232b36;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.19);
  padding: 36px 28px 20px 28px;
  max-width: 470px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: fadeInUp 1.4s; 
  border: 1.5px solid #232b36;
}
.contact label {
  font-weight: 500;
  margin-bottom: 3px; 
  color: #fff; /* Изменено с #ffb300 */
}
.contact input, .contact select {
  padding: 12px 14px;
  border: 1.5px solid #3a4350;
  border-radius: 6px;
  font-size: 1.05rem;
  background: #181e26;
  color: #fff;
  outline: none;
  transition: border .2s;
  width: 100%; 
}
.contact input:focus, .contact select:focus {
  border: 1.5px solid #fff; /* Изменено с #ffb300 */
}
.contact .btn { /* Кнопка в форме контактов также станет белой */
  margin-top: 10px;
}
#successMessage {
  color: #4caf50; /* Оставляем зеленым для успеха */
  text-align: center;
  margin-top: 25px;
  font-size: 1.2rem;
  animation: fadeInDown 1.2s;
}
.hidden {
  display: none !important; 
}
footer {
  background: linear-gradient(90deg, #181e26 80%, #232b36 100%);
  color: #fff; /* Изменено с #ffb300 */
  text-align: center;
  padding: 28px 0;
  margin-top: 80px;
  font-size: 1.05rem;
  letter-spacing: 1px;
  font-weight: 500;
  border-top: 1.5px solid #232b36;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-40px);}
  to { opacity: 1; transform: translateY(0);}
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px);}
  to { opacity: 1; transform: translateY(0);}
}

.modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(24,30,38,0.93);
  transition: opacity 0.2s;
}
.modal-content {
  background: #232b36;
  border-radius: 12px;
  padding: 24px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  text-align: center;
  max-width: 90vw;
  max-height: 90vh;
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  align-items: center; 
}
.modal-content img {
  max-width: 70vw; 
  max-height: 70vh; 
  border-radius: 10px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px #0006;
  object-fit: contain; 
}
.close {
  position: absolute;
  top: 12px; right: 18px;
  font-size: 2.3rem;
  color: #fff; /* Изменено с #ffb300 */
  cursor: pointer;
  font-weight: bold;
  z-index: 10000; 
  transition: color 0.2s;
}
.close:hover {
  color: #e0e0e0; /* Слегка темнее белого при наведении, если основной цвет #fff */
}
.gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center; 
  gap: 24px;
}
.gallery-controls button {
  background: #fff; /* Изменено с #ffb300 */
  color: #232b36; /* Текст остался темным */
  border: none;
  border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 2rem;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
  display: flex; 
  align-items: center; 
  justify-content: center; 
  line-height: 1; 
}
.gallery-controls button:hover {
  background: #e0e0e0; /* Слегка темнее белого */
  color: #181e26; /* Можно текст темнее */
}
#photoCounter {
    font-size: 1.1rem;
    color: #e6e6e6;
    min-width: 50px; 
    text-align: center;
}

#phone:valid {
    border-color: #4CAF50 !important; /* Оставляем зеленым для валидации */
}
#phone:focus {
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.3); /* Оставляем зеленым для валидации */
}
#phone::placeholder {
    color: #999;
    opacity: 1; 
}
#phone.invalid, #tg.invalid { 
    border-color: #ff4444 !important; /* Оставляем красным для ошибок */
    animation: shakeInput 0.5s; 
}
.error-message { 
    color: #ff4444; /* Оставляем красным для ошибок */
    font-size: 0.9em;
    margin-top: 5px;
    display: none; 
}
@keyframes shakeInput { 
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

.hamburger {
  display: none; 
  cursor: pointer;
  z-index: 1002; 
  padding: 10px; 
  margin: -10px; 
}
.hamburger .line {
  width: 30px;
  height: 3px;
  background: #fff;
  margin: 5px 0;
  transition: 0.3s;
}
.hamburger.active .line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.hamburger.active .line:nth-child(2) {
    opacity: 0;
}
.hamburger.active .line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

html {
  scroll-behavior: smooth;
}

/* --- Адаптация --- */
@media (max-width: 900px) {
  .features-list, .car-list { 
    flex-direction: column; 
    align-items: center; 
    gap: 30px; 
  }
  .hero-content h1 { font-size: 2.6rem; } 
  .car-card { 
    width: 85%; 
    max-width: 400px; 
    min-height: unset; 
  }
  .parallax { font-size: 1.8rem; } 
  .hero-content { margin-top: 60px; }
}

@media (max-width: 768px) {
  .hero .overlay {
    background-image: url('../images/hero_bg_mobile.jpeg');
    /* background-size: cover; все еще наследуется и применяется */
  }

@media (max-width: 768px) {


  nav {
    padding: 10px 15px; 
    align-items: center; 
    position: relative; 
  }
  .logo { 
    font-size: 1.8rem; 
  } 
  .hamburger {
    display: block; 
  }
  nav ul { 
    display: none; 
    flex-direction: column;
    gap: 20px; 
    text-align: center;
    position: absolute;
    top: 100%; 
    left: 0;
    width: 100%;
    background: #181e26; 
    padding: 20px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border-top: 1px solid #2a3441; 
    z-index: 1000; 
  }
  nav.active ul { 
    display: flex;
  }

  .hero-content { 
    margin-top: 25px; 
    text-align: center; 
    width: 100%; 
  }
  .hero-content h1 {
    font-size: 1.8rem; 
  }
  .hero-content p {
    font-size: 0.95rem; 
    margin-bottom: 30px; 
  }
  .btn { 
    padding: 12px 28px;
    font-size: 1rem;
  }

  section { 
    padding: 0 15px;
    margin-bottom: 60px;
  }
  .cars h2, .features h2, .steps h2, .contact h2 { 
    font-size: 1.8rem; 
    margin-bottom: 30px;
  }

  .step {
    width: 95%; 
    font-size: 0.9rem; 
    padding: 15px; 
    margin-right: 0 !important; 
    margin-left: 0 !important; 
    border-right: none !important; 
    border-left: none !important; 
    text-align: left; 
  }
  .step span { 
    font-size: 1.2rem; 
    width: 34px; 
    height: 34px; 
    margin: 0 auto 10px auto; 
    position: static; 
    transform: none; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
  }
  .steps-list::before {
    display: none; 
  }
  
  .features-list .feature { 
    width: 90%;
    max-width: 320px; 
    padding: 25px 20px;
  }
  .features-list .feature h3 { 
    font-size: 1.15rem;
  }
  .social-icon { 
    width: 50px;
    height: 50px;
  }

  .car-card {
     width: 90%; 
     max-width: 350px; 
  }
  .car-card img {
      height: 180px; 
  }

  .contact form {
    width: 100%; 
    padding: 25px 15px; 
    gap: 15px; 
  }
  .contact label { 
    font-size: 0.9rem;
  }
  .contact input, .contact select { 
    font-size: 0.95rem;
    padding: 10px 12px;
  }

  .modal-content {
      padding: 15px; 
  }
  .modal-content img {
    max-width: 90vw;
    max-height: 60vh; 
  }
  .gallery-controls button { 
    width: 40px;
    height: 40px;
    font-size: 1.8rem;
  }
  #photoCounter { 
    font-size: 1rem;
  }
  .close { 
    font-size: 2rem;
    top: 8px;
    right: 12px;
  }
  footer { 
    padding: 20px 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 10px;
    }
    nav {
        padding: 8px 15px;
    }
    .logo {
        font-size: 1.7rem;
    }
    .hero-content {
        margin-top: 20px;
    }
    .hero-content h1 { font-size: 1.7rem; }
    .hero-content p { font-size: 0.9rem; }
    .btn { padding: 10px 20px; font-size: 0.9rem; }
    .cars h2, .features h2, .steps h2, .contact h2 { font-size: 1.6rem; margin-bottom: 25px;}
    .step { font-size: 0.85rem; padding: 10px; }
    .step span { 
        font-size: 1.1rem; 
        width: 30px; 
        height: 30px; 
    }
    .car-card h3 { font-size: 1.1rem; }
    .gallery-hint { padding: 10px 18px; font-size: 0.9rem; }
    .contact label { font-size: 0.85rem; }
    .contact input, .contact select { font-size: 0.9rem; padding: 8px 10px; }
}

/* Ensure background image paths in CSS are relative to the CSS file's location */
/* For example, if hero background is in static/images/hero-bg.jpg */
/* .hero .overlay { background-image: url('../images/hero-bg.jpg'); } */
/* .parallax { background-image: url('../images/parallax-bg.jpg'); } */