@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

body, html {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  background-color: #fff;
}

/* ================= NAVBAR ================= */
.custom-navbar {
  background-color: #1f103f !important;
  padding: 0.5rem 1rem;
  z-index: 1030;
}

.custom-navbar .navbar-brand {
  color: #fff !important;
  font-weight: 700;
}

.custom-navbar .nav-link {
  color: #fff !important;
  font-weight: 600;
  position: relative;
  margin: 0 0.3rem;
  transition: color 0.3s ease;
}

.custom-navbar .nav-link:hover,
.custom-navbar .nav-link.active {
  color: #7a3cff !important;
}

.custom-navbar .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background-color: #7a3cff;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.custom-navbar .nav-link:hover::after,
.custom-navbar .nav-link.active::after {
  transform: scaleX(1);
}

/* Бургер — белый */
.custom-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
  padding: 0.25rem 0.5rem;
}

.custom-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.8%29' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.custom-navbar .btn-phone img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}
#navbarNav {
  display: none;
}
#navbarNav.show {
  display: block;
}

a.text-white.text-decoration-none.fw-semibold {
  color: #fff !important;
  font-weight: 600;
  font-size: 1rem;
}

a.text-white.text-decoration-none.fw-semibold img {
  filter: brightness(0) invert(1);
}

/* чтобы на мобильных занимало место справа */
@media (max-width: 991.98px) {
  #navbarNav {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    background-color: #1f103f;
    width: 220px;
    padding: 1rem;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 999;
  }
}


/* ================= FOOTER ================= */
footer {
  background-color: #fff;
  padding: 3rem 0;
  border-top: 1px solid #ddd;
  padding-left: 55px; /* Добавляем отступ слева */
  padding-right: 15px;
}

footer h5 {
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-logo img {
  max-width: 160px;
}

.footer-menu a,
.footer-contacts a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #333;
  text-decoration: none;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.footer-menu a:hover,
.footer-contacts a:hover {
  text-decoration: underline;
}

.footer-contacts a img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.footer-social img {
  width: 36px;
  height: 36px;
  transition: transform 0.3s ease;
}

.footer-social a:hover img {
  transform: scale(1.1);
}

/* Иконки мессенджеров в строке */
.footer-messengers {
  display: flex;
  gap: 1rem; /* Расстояние между иконками */
  margin-top: 1rem; /* Отступ сверху */
  justify-content: flex-start; /* Выровнять по левому краю */
}

.footer-messengers img {
  width: 36px !important;
  height: 36px !important;
}

/* --- Мобильные устройства и планшеты --- */
@media (max-width: 768px) {
  .footer-messengers {
    justify-content: center; /* Иконки по центру на мобильных */
  }
}

/* --- Мобильные устройства (до 575px) --- */
@media (max-width: 575.98px) {
  .footer-menu,
  .footer-messengers,
  .footer-contacts,
  .footer-social {
    text-align: center;
    align-items: center;
  }

  .footer-contacts a {
    justify-content: center;
  }
}

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 100vh;
  background: url('/static/img/главная.png') center center / cover no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem;
}

.hero-text {
  max-width: 90%;
  text-align: left;
  word-break: break-word;
  line-height: 1.2;
}

.hero-text h1.page-title {
  font-size: 3rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.hero-text h2.display-3 {
  font-size: 4rem;
  font-weight: 900;
  margin: 1rem 0;
  color: #7a3cff;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8);
  animation: softGlow 2s infinite alternate ease-in-out;
}

.hero-text h1.lead {
  font-size: 2rem;
  font-weight: 400;
  margin-top: 1rem;
  margin-bottom: 2rem;
  line-height: 1.2;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.hero-text .btn-purple {
  display: inline-block;
  background-color: #7a3cff;
  color: #fff;
  padding: 0.7rem 2rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(122, 60, 255, 0.5);
  margin-top: 2rem;
}

.hero-text .btn-purple:hover {
  background-color: #5f2ed9;
  box-shadow: 0 4px 12px rgba(95, 46, 217, 0.6);
  transform: translateY(-2px);
}

@keyframes softGlow {
  0% {
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8), 0 0 10px #7a3cff;
  }
  100% {
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8), 0 0 20px #b399ff;
  }
}

/* адаптивность — уменьшаем шрифты */
@media (max-width: 1200px) {
  .hero-text h1.page-title {
    font-size: 2.5rem;
  }
  .hero-text h2.display-3 {
    font-size: 3.2rem;
  }
  .hero-text h1.lead {
    font-size: 1.6rem;
  }
}

@media (max-width: 992px) {
  .hero-text h1.page-title {
    font-size: 2rem;
  }
  .hero-text h2.display-3 {
    font-size: 2.8rem;
  }
  .hero-text h1.lead {
    font-size: 1.4rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 1rem;
  }
  .hero-text {
    max-width: 100%;
  }
  .hero-text h1.page-title {
    font-size: 1.8rem;
  }
  .hero-text h2.display-3 {
    font-size: 2.4rem;
  }
  .hero-text h1.lead {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .hero-text h1.page-title {
    font-size: 1.4rem;
  }
  .hero-text h2.display-3 {
    font-size: 1.8rem;
  }
  .hero-text h1.lead {
    font-size: 1rem;
  }
}



/* ================= CATEGORIES ================= */
.categories {
  text-align: center;
  padding: 5rem 0;
  background: #fff;
}

.categories h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.categories .underline {
  display: block;
  width: 100px;
  height: 6px;
  background: linear-gradient(90deg, #7a3cff, #5f2ed9);
  margin: 0.5rem auto 2rem auto;
  border-radius: 3px;
}

.categories p {
  font-size: 1.1rem;
  color: #555;
  max-width: 900px;
  margin: 0 auto 2rem auto;
}

.category-card {
  position: relative;
  height: 350px;
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  background-size: cover;
  background-position: center;
  color: #fff;

  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.category-card:nth-child(1) {
  animation-delay: 0.1s;
}
.category-card:nth-child(2) {
  animation-delay: 0.3s;
}
.category-card:nth-child(3) {
  animation-delay: 0.5s;
}

.category-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(122, 60, 255, 0.6),
    #1f103f
  );
  z-index: 1;
  border-radius: 1rem;
}

.category-card .content {
  position: relative;
  z-index: 2;
  padding: 1rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
}

.category-card h4 {
  color: #fff;
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.category-card p {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #fff;
}

.category-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-5px);
  transition: all 0.3s ease;
}

.btn-category {
  background-color: transparent;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: color 0.3s ease;
  margin: 0.3rem;
}

.btn-category::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background-color: #7a3cff;
  z-index: -1;
  transition: all 0.4s ease;
  transform: translate(-50%, -50%) rotate(45deg);
}

.btn-category:hover {
  color: #fff;
}

.btn-category:hover::before {
  width: 300%;
  height: 300%;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 767.98px) {
  .categories {
    padding-top: 0;    /* убрать верхний отступ у всей секции */
    padding-bottom: 0; /* убрать нижний отступ */
  }

  /* Убрать отступ сверху у заголовка */
  .categories h2 {
    margin-top: 0;
    padding-top: 0;
  }

  .row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center; /* центрировать карточки */
  }

  .category-card {
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 320px; /* квадраты ещё больше */
    width: 95vw;      /* почти вся ширина экрана */
    margin: 0 auto;
    border-radius: 1rem;
  }

  .category-card .content {
    padding: 1rem;
  }
}

/* ================= Преимущества ================= */

/* Секция преимуществ - контейнер */
.advantages {
  background: #fff;
  padding: 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Заголовок по центру */
.advantages h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
  color: #333;
}

/* Подчеркивание */
.advantages .underline {
  width: 100px;
  height: 6px;
  background: linear-gradient(90deg, #7a3cff, #5f2ed9);
  margin: 0.5rem auto 2rem auto;
  border-radius: 3px;
}

/* Список преимуществ */
.advantages ul.list-unstyled {
  text-align: left;
  margin: 0 auto 2rem auto;
  padding-left: 1.8rem;
  padding-right: 1rem;
  color: #555;
  font-size: 1.1rem;
  list-style: none;
  max-width: 100%;
  box-sizing: border-box;
}

.advantages ul.list-unstyled li {
  position: relative;
  margin-bottom: 0.7rem;
  padding-left: 1.5rem;
}

/* Галочка слева */
.advantages ul.list-unstyled li::before {
  content: "✅";
  position: absolute;
  left: 0;
  top: 0.45rem;
  color: #7a3cff;
  font-size: 0.8rem; /* уменьшенная галочка */
  line-height: 1;
}

/* Карточки преимуществ — общий контейнер */
.row.mt-5.g-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Карточка */
.adv-card {
  background-color: #f7f7f7;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, background-color 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
  height: 100%;
}

/* Наведение */
.adv-card:hover {
  background-color: #e5dbff;
  transform: translateY(-4px) scale(1.01);
}

/* Иконка */
.adv-icon {
  font-size: 3rem;
  color: #7a3cff;
  flex-shrink: 0;
  line-height: 1;
}

/* Текст в карточке */
.adv-text h5 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: #7a3cff;
}

.adv-text p {
  font-size: 0.95rem;
  color: #333;
  margin: 0;
}

/* Мобильный вид */
@media (max-width: 767.98px) {
  .row.mt-5.g-4 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0 0.5rem;
  }

  .adv-card {
    padding: 0.8rem;
  }

  .adv-icon {
    font-size: 2.5rem;
  }

  .adv-text h5 {
    font-size: 1rem;
  }

  .adv-text p {
    font-size: 0.9rem;
  }
}

/* Десктоп ≥992px — два в ряд */
@media (min-width: 992px) {
  .row.mt-5.g-4 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    gap: 1.2rem;
  }
}

/* ================= Usloviya ================= */
.usloviya h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.usloviya .underline {
  display: block;
  width: 100px;
  height: 6px;
  background: linear-gradient(90deg, #7a3cff, #5f2ed9);
  margin: 0.5rem auto 2rem auto;
  border-radius: 3px;
}

.usloviya p {
  font-size: 1.1rem;
}

.car-img {
  width: 250px;
  height: 160px;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

.car-img:nth-child(1) {
  animation-delay: 0.2s;
}

.car-img:nth-child(2) {
  animation-delay: 0.4s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= Forma ================= */

.contact-section {
  padding: 4rem 1rem;
  background-color: #1f103f;
  color: #fff;
  text-align: center;
}

.contact-section h2 {
  font-size: 2rem;
  font-weight: 700;
}

.contact-section p {
  margin-bottom: 2rem;
  font-size: 1rem;
}

.contact-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  background-color: #7a3cff;
  padding: 2rem 1rem; /* уменьшили боковые отступы */
  border-radius: 1rem;
  flex-direction: row;
  box-sizing: border-box;
}

.contact-form {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
  max-width: 600px; /* увеличили максимальную ширину */
  box-sizing: border-box;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.5rem;
  border-radius: 4px;
  border: none;
  font-size: 1rem;
  box-sizing: border-box;
}

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

.contact-form fieldset {
  border: none;
  padding: 0;
  margin: 1rem 0;
}

.contact-form button {
  background-color: #000;
  color: #fff;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
}

.contact-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-methods label {
  flex: 1 1 150px;
  max-width: 200px;
  white-space: normal;
  word-break: break-word;
}

.btn-submit {
  border-radius: 25px;
  padding: 0.5rem 2rem;
  font-weight: 600;
  float: left;
  background-color: #7a3cff;
  color: #fff;
  border: none;
  transition: background-color 0.3s ease;
}

.btn-submit:hover {
  background-color: #5f2ed9;
}

/* Карта */
.contact-map {
  width: 100%;
  max-width: 600px; 
  aspect-ratio: 4 / 3; 
  align-self: center;
  margin: 0 auto;
  margin-top: -20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
  padding: 0.5rem;
  box-sizing: border-box;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  border-radius: 10px;
}

/* Мобильная версия: под 768px */
@media (max-width: 768px) {
  .contact-content {
    flex-direction: column;
    padding: 1rem 1rem;
    gap: 1rem;
  }

  .contact-form {
    max-width: 100%;
  }

  .contact-map {
    max-width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0.25rem;
    margin-top: 1rem; /* Добавляем отступ между кнопкой и картой */
  }
}

/* Ещё более узкие экраны (iPhone ~390px) */
@media (max-width: 400px) {
  .contact-section {
    padding: 2rem 1rem;
  }

  .contact-section h2 {
    font-size: 1.5rem;
  }

  .contact-section p {
    font-size: 0.9rem;
  }

  .contact-content {
    padding: 1rem 1rem;
    gap: 1rem;
  }

  .contact-form {
    flex: 1 1 100%;
    max-width: 100%;
    gap: 0.5rem;
  }

  .contact-form input,
  .contact-form textarea,
  .contact-form select {
    padding: 0.4rem;
    font-size: 0.9rem;
  }

  .contact-form button,
  .btn-submit {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .contact-map {
    max-width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0.25rem;
    margin-top: 1rem; /* Добавляем отступ между кнопкой и картой */
  }
}

/* Планшеты: ограничиваем ширину карты до ширины формы */
@media (min-width: 769px) and (max-width: 1024px) {
  .contact-form {
    max-width: 450px;
    flex: 1 1 450px;
  }

  .contact-map {
    max-width: 450px;
    aspect-ratio: 4 / 3;
    padding: 0.25rem;
  }
}

/* Десктопы: увеличение высоты карты */
@media (min-width: 1025px) {
  .contact-map {
    /* Увеличиваем высоту карты до размеров формы */
    min-height: 600px; /* Сделаем карту выше по высоте */
    height: 600px; /* Прямо указываем высоту */
    margin-top: 0;
  }
}



/* ================= Thank You Message ================= */
.thank-you-message {
  display: none;
  margin-top: 20px;
  padding: 15px;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  border-radius: 8px;
  font-size: 1.1rem;
}

