* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* CSS переменные для цветов неона */
:root {
  --deep-cherry: #ff3131;
  --ice-blue: #b0fbff;
  /* Цвета для красного неона */
  --red-tube-hot: #ffcccc;
  --red-glow-inner: #ff3300;
  --red-glow-outer: #ff0000;
  /* Цвета для голубого неона */
  --blue-tube-hot: #dffff;
  --blue-glow-inner: #00e6e6;
  --blue-glow-outer: #0099ff;
}

body {
  font-family: "Inter", "Syncopate", sans-serif;
  background: #000000;
  overflow-x: hidden;
}

/* Блокировка скролла во время прелоадера */
body.preloader-active {
  overflow: hidden;
  height: 100vh;
  position: fixed;
  width: 100%;
}

/* Прелоадер */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 30%,
      rgba(255, 49, 49, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(176, 251, 255, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(circle at center, #0a0a0a 0%, #000000 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.75s ease-out, visibility 0.75s ease-out,
    transform 0.75s ease-out;
  will-change: opacity, transform;
  overflow: hidden;
}

.preloader::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.01) 2px,
    rgba(255, 255, 255, 0.01) 4px
  );
  opacity: 0.3;
  animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(20px);
  }
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
}

/* Контейнер неоновой вывески */
.sign-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: skewY(-2deg);
  will-change: transform, filter;
}

/* Общий стиль для всех неоновых трубок */
.neon-tube {
  font-size: 5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
  margin: 0;
  padding: 0;
  line-height: 1.1;
  text-shadow: none;
  opacity: 1;
  will-change: opacity, text-shadow, filter;
  font-family: "Comfortaa", "Syncopate", "Inter", sans-serif;
}

.neon-tube span {
  display: inline-block;
  color: transparent;
  text-shadow: none;
  opacity: 1;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
}

/* RS - Красный неон с многослойными тенями */
.neon-rs.on {
  opacity: 1;
}

.neon-rs.on span {
  opacity: 1 !important;
  color: #fff !important;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.1) !important;
  text-shadow: 0 0 5px #fff, /* Слой 1: Раскаленная нить */ 0 0 10px #fff,
    /* Слой 2: Раскаленная нить чуть шире */ 0 0 20px var(--red-glow-inner),
    /* Слой 3: Яркий газ у трубки */ 0 0 40px var(--red-glow-outer),
    /* Слой 4: Средний ореол */ 0 0 80px var(--red-glow-outer),
    /* Слой 5: Широкое свечение */ 0 0 120px var(--red-glow-outer) !important; /* Слой 6: Атмосферная засветка */
  animation: flicker-red 0.15s infinite alternate;
}

/* DETAILING - Голубой неон с многослойными тенями */
.neon-detailing {
  font-size: 2.5rem;
}

.neon-detailing.on {
  opacity: 1;
}

.neon-detailing.on span {
  opacity: 1 !important;
  color: #fff !important;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.1) !important;
  text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px var(--blue-glow-inner),
    0 0 40px var(--blue-glow-outer), 0 0 80px var(--blue-glow-outer),
    0 0 100px var(--blue-glow-outer) !important;
  animation: flicker-blue 0.12s infinite alternate;
}

/* Анимации дрожания (Физика газа) */
@keyframes flicker-red {
  0% {
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px var(--red-glow-inner),
      0 0 40px var(--red-glow-outer), 0 0 80px var(--red-glow-outer),
      0 0 120px var(--red-glow-outer);
  }
  100% {
    text-shadow: 0 0 6px #fff, 0 0 12px #fff, 0 0 25px var(--red-glow-inner),
      0 0 50px var(--red-glow-outer), 0 0 90px var(--red-glow-outer),
      0 0 130px var(--red-glow-outer);
  }
}

@keyframes flicker-blue {
  0% {
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px var(--blue-glow-inner),
      0 0 40px var(--blue-glow-outer), 0 0 80px var(--blue-glow-outer),
      0 0 100px var(--blue-glow-outer);
  }
  100% {
    text-shadow: 0 0 4px #fff, 0 0 8px #fff, 0 0 18px var(--blue-glow-inner),
      0 0 35px var(--blue-glow-outer), 0 0 70px var(--blue-glow-outer),
      0 0 90px var(--blue-glow-outer);
  }
}

/* Навигация */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

/* Логотип слева */
.logo-neon {
  display: flex;
  align-items: center;
}

.logo-text {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #fff;
  text-shadow: none;
  white-space: nowrap;
}

/* Instagram капсула по центру */
.instagram-capsule {
  flex: 0 0 auto;
  margin: 0 auto;
}

.instagram-link {
  display: inline-block;
  padding: 8px 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  color: #fff;
  text-decoration: none;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.instagram-link:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

/* Переключатель языков справа (Минималистичный) */
.lang-switcher {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-option {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  padding: 4px 8px;
  background: transparent;
  border: none;
  opacity: 0.3;
}

.lang-option.active {
  color: #b0fbff;
  opacity: 1;
}

.lang-option.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 1px;
  background: #b0fbff;
  box-shadow: 0 0 3px #b0fbff;
}

.lang-option:not(.active):hover {
  opacity: 0.6;
}

/* Hero секция */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 80% center;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.8) 80%,
    #000000 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: #fff;
  padding: 0 20px;
  max-width: 800px;
  width: 100%;
  box-sizing: border-box;
}

.hero-title {
  font-family: "Syncopate", sans-serif;
  font-size: 72px;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 20px;
  text-transform: uppercase;
  color: #fff;
  text-shadow: none;
  opacity: 0;
  animation: fadeInUp 0.5s ease-out 0.25s forwards;
  line-height: 1.2;
  word-wrap: break-word;
}

.hero-subtitle {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 10px;
  opacity: 0;
  animation: fadeInUp 0.5s ease-out 0.35s forwards;
}

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

/* Адаптивность для Hero и Header */
@media (max-width: 768px) {
  .header-container {
    padding: 15px 20px;
    gap: 10px;
  }

  .logo-text {
    font-size: 12px;
  }

  .instagram-link {
    font-size: 12px;
    padding: 6px 14px;
  }

  .lang-toggle {
    padding: 6px 12px;
    gap: 15px;
  }

  .lang-option {
    font-size: 12px;
    padding: 3px 6px;
  }

  .hero-title {
    font-size: 42px;
    letter-spacing: 0.1em;
    line-height: 1.2;
    word-wrap: break-word;
  }

  .hero-subtitle {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 12px 15px;
    gap: 8px;
  }

  .logo-text {
    font-size: 12px;
    letter-spacing: 0.1em;
  }

  .instagram-link {
    font-size: 12px;
    padding: 5px 12px;
  }

  .lang-toggle {
    padding: 5px 10px;
    gap: 12px;
  }

  .lang-option {
    font-size: 12px;
    padding: 2px 5px;
  }

  .hero-title {
    font-size: 32px;
    letter-spacing: 0.08em;
    line-height: 1.2;
    word-wrap: break-word;
  }

  .hero-subtitle {
    font-size: 16px;
  }
}

/* Адаптивность */
@media (max-width: 768px) {
  .neon-rs {
    font-size: 4rem;
  }
  .neon-detailing {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .neon-rs {
    font-size: 3.5rem;
  }
  .neon-detailing {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .neon-rs {
    font-size: 2.5rem;
  }
  .neon-detailing {
    font-size: 1.3rem;
  }
}

@media (max-width: 360px) {
  .neon-rs {
    font-size: 2rem;
  }
  .neon-detailing {
    font-size: 1rem;
  }
}

/* Footer с бегущей строкой машин - закреплен внизу Hero */
.footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: transparent;
  z-index: 4;
  overflow: hidden;
}

.footer-marquee {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.marquee {
  display: flex;
  align-items: center;
  gap: 80px;
  height: 100%;
  width: fit-content;
  will-change: transform;
}

.marquee .brand-logo {
  width: 250px;
  height: 35px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.marquee .logo-svg {
  width: 100%;
  height: 100%;
  opacity: 0.2;
  transition: all 0.6s ease;
  filter: none;
}

.marquee .logo-svg text {
  font-family: "Comfortaa", "Syncopate", "Inter", sans-serif;
  transition: all 0.6s ease;
}

.marquee .logo-char {
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1;
  transition: all 0.6s ease;
}

/* Логотипы изначально скрыты, появляются постепенно */
.marquee {
  opacity: 0;
  transition: opacity 1.5s ease-out;
}

.marquee.visible {
  opacity: 1;
}

.marquee .logo-svg {
  opacity: 1;
}

/* Применяем неоновое свечение к активным символам (как в прелоадере) */
.marquee .logo-char {
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1;
  transition: all 0.3s ease;
}

.marquee .logo-char.active {
  fill: #ffffff !important;
  stroke: rgba(255, 255, 255, 0.1) !important;
  stroke-width: 2 !important;
  filter: url(#neon-white-glow);
  animation: flicker-neon-svg 0.15s infinite alternate;
}

/* Анимация мерцания для SVG (имитация flicker-red из прелоадера) */
@keyframes flicker-neon-svg {
  0% {
    filter: url(#neon-red-glow);
    opacity: 1;
  }
  100% {
    filter: url(#neon-red-glow);
    opacity: 0.95;
  }
}

/* Стили для текста в SVG */
.marquee .logo-svg text {
  font-family: "Comfortaa", "Syncopate", "Inter", sans-serif;
  transition: all 0.3s ease;
}

/* Применяем неоновое свечение к символам (как в прелоадере) */
.marquee .logo-char {
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1;
  transition: all 0.3s ease;
}

/* Анимация мерцания для логотипов (как в прелоадере) */
@keyframes flicker-red {
  0% {
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px #ff0000, 0 0 40px #ff0000,
      0 0 80px #ff0000;
  }
  100% {
    text-shadow: 0 0 6px #fff, 0 0 12px #fff, 0 0 25px #ff0000, 0 0 50px #ff0000,
      0 0 90px #ff0000;
  }
}

/* Анимация пульсации свечения */
@keyframes pulse {
  0%,
  100% {
    color: #ff0000;
    filter: drop-shadow(0 0 5px #ff0000)
      drop-shadow(0 0 10px rgba(255, 0, 0, 0.8))
      drop-shadow(0 0 20px rgba(255, 0, 0, 0.6))
      drop-shadow(0 0 30px rgba(255, 0, 0, 0.4));
  }
  50% {
    color: #ff3333;
    filter: drop-shadow(0 0 8px #ff0000)
      drop-shadow(0 0 15px rgba(255, 0, 0, 0.9))
      drop-shadow(0 0 25px rgba(255, 0, 0, 0.7))
      drop-shadow(0 0 40px rgba(255, 0, 0, 0.5));
  }
}

/* Анимация вращения "искр" */
@keyframes rotate-spark {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.2);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Services секция - Neon Pulse */
.services {
  position: relative;
  width: 100%;
  min-height: auto;
  background: #000000;
  padding: 50px 40px 15px; /* Увеличен верхний padding */
  z-index: 3;
}

.services-container {
  max-width: 1400px;
  margin: 0 auto;
}

.services-title {
  font-family: "Syncopate", sans-serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  color: #ffffff;
  margin-bottom: 50px;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.services-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  opacity: 1; /* Сразу видимые, так как карточки уже имеют opacity: 1 !important */
  transform: translateY(0);
  transition: opacity 0.8s ease-out 0.2s, transform 0.8s ease-out 0.2s;
}

.services-grid.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   НЕОНОВЫЕ ВЫВЕСКИ 80-Х - СТИЛЬ ПРЕЛОАДЕРА
   ============================================ */

/* Карточка - каркас для вывески */
.service-card {
  background: transparent !important; /* Без фона */
  border: 1px solid rgba(255, 255, 255, 0.08); /* Тонкая рамка каркаса */
  border-radius: 8px;
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: visible;
  transition: border-color 0.4s ease; /* Только рамка */
  opacity: 1 !important;
  box-shadow: none !important; /* Убираем все тени */
}

/* ============================================
   СОСТОЯНИЕ "ВЫКЛЮЧЕННОЙ ТРУБКИ" (Resting)
   ============================================ */

/* SVG иконки - белые */
.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 30px;
  color: #ffffff; /* Белый цвет */
  transition: color 0.4s ease; /* Только цвет */
  filter: none !important; /* Без фильтров */
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

/* Текст заголовков - белый */
.service-name {
  font-family: "Syncopate", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ffffff; /* Белый цвет */
  margin-bottom: 12px;
  text-transform: uppercase;
  transition: color 0.4s ease; /* Только цвет */
  line-height: 1.4;
  text-shadow: none !important; /* Без тени */
}

.service-name .brand-name {
  color: #ffffff; /* Белый цвет */
  transition: color 0.4s ease;
  text-shadow: none !important;
}

/* Описание - белый */
.service-description {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: #ffffff; /* Белый цвет */
  transition: color 0.4s ease;
  text-shadow: none !important;
}

/* ============================================
   СОСТОЯНИЕ "ВКЛЮЧЕННОЙ ВЫВЕСКИ" (Active)
   ============================================ */

/* КРАСНЫЙ НЕОН (1-я и 3-я карточки) */
/* Только рамка светится */
.service-card.neon-red.on .service-icon,
.service-card.neon-red:hover .service-icon,
.service-card.neon-red.active .service-icon {
  color: #ffffff; /* Белый цвет */
  filter: none !important;
}

/* Рамка карточки - красный неон (более яркое свечение) */
.service-card.neon-red.on,
.service-card.neon-red:hover,
.service-card.neon-red.active {
  border-color: #ff0000;
  border-width: 2px;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.8), 0 0 30px rgba(255, 0, 0, 0.6),
    0 0 50px rgba(255, 0, 0, 0.4), 0 0 80px rgba(255, 0, 0, 0.2);
  animation: flicker-neon-red-border 0.2s infinite alternate;
}

.service-card.neon-red.on .service-name,
.service-card.neon-red:hover .service-name,
.service-card.neon-red.active .service-name {
  color: #ffffff; /* Белый цвет */
  text-shadow: none !important;
}

.service-card.neon-red.on .service-name .brand-name,
.service-card.neon-red:hover .service-name .brand-name,
.service-card.neon-red.active .service-name .brand-name {
  color: #ffffff; /* Белый цвет */
  text-shadow: none !important;
}

.service-card.neon-red.on .service-description,
.service-card.neon-red:hover .service-description,
.service-card.neon-red.active .service-description {
  color: #ffffff; /* Белый цвет */
  text-shadow: none !important;
}

/* ГОЛУБОЙ НЕОН (2-я и 4-я карточки) */
/* Только рамка светится */
.service-card.neon-blue.on .service-icon,
.service-card.neon-blue:hover .service-icon,
.service-card.neon-blue.active .service-icon {
  color: #ffffff; /* Белый цвет */
  filter: none !important;
}

/* Рамка карточки - голубой неон (более яркое свечение) */
.service-card.neon-blue.on,
.service-card.neon-blue:hover,
.service-card.neon-blue.active {
  border-color: #b0fbff;
  border-width: 2px;
  box-shadow: 0 0 15px rgba(176, 251, 255, 0.8),
    0 0 30px rgba(176, 251, 255, 0.6), 0 0 50px rgba(176, 251, 255, 0.4),
    0 0 80px rgba(176, 251, 255, 0.2);
  animation: flicker-neon-blue-border 0.18s infinite alternate;
}

.service-card.neon-blue.on .service-name,
.service-card.neon-blue:hover .service-name,
.service-card.neon-blue.active .service-name {
  color: #ffffff; /* Белый цвет */
  text-shadow: none !important;
}

.service-card.neon-blue.on .service-name .brand-name,
.service-card.neon-blue:hover .service-name .brand-name,
.service-card.neon-blue.active .service-name .brand-name {
  color: #ffffff; /* Белый цвет */
  text-shadow: none !important;
}

.service-card.neon-blue.on .service-description,
.service-card.neon-blue:hover .service-description,
.service-card.neon-blue.active .service-description {
  color: #ffffff; /* Белый цвет */
  text-shadow: none !important;
}

/* Эффект мерцания при розжиге - мерцает рамка (более заметно) */
.service-card.flickering {
  border-color: rgba(255, 255, 255, 0.3) !important;
  border-width: 1px !important;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2) !important;
  transition: border-color 0.1s ease, box-shadow 0.1s ease,
    border-width 0.1s ease;
}

/* Красный неон - мерцание (более яркое) */
.service-card.neon-red.flickering {
  border-color: rgba(255, 0, 0, 0.7) !important;
  border-width: 2px !important;
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.5), 0 0 25px rgba(255, 0, 0, 0.3) !important;
}

/* Голубой неон - мерцание (более яркое) */
.service-card.neon-blue.flickering {
  border-color: rgba(176, 251, 255, 0.7) !important;
  border-width: 2px !important;
  box-shadow: 0 0 12px rgba(176, 251, 255, 0.5),
    0 0 25px rgba(176, 251, 255, 0.3) !important;
}

/* Анимации мерцания только для рамки (более заметные) */
@keyframes flicker-neon-red-border {
  0% {
    border-color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.8), 0 0 30px rgba(255, 0, 0, 0.6),
      0 0 50px rgba(255, 0, 0, 0.4), 0 0 80px rgba(255, 0, 0, 0.2);
  }
  100% {
    border-color: #ff3333;
    box-shadow: 0 0 20px rgba(255, 0, 0, 1), 0 0 40px rgba(255, 0, 0, 0.8),
      0 0 60px rgba(255, 0, 0, 0.6), 0 0 100px rgba(255, 0, 0, 0.3);
  }
}

@keyframes flicker-neon-blue-border {
  0% {
    border-color: #b0fbff;
    box-shadow: 0 0 15px rgba(176, 251, 255, 0.8),
      0 0 30px rgba(176, 251, 255, 0.6), 0 0 50px rgba(176, 251, 255, 0.4),
      0 0 80px rgba(176, 251, 255, 0.2);
  }
  100% {
    border-color: #d0ffff;
    box-shadow: 0 0 20px rgba(176, 251, 255, 1),
      0 0 40px rgba(176, 251, 255, 0.8), 0 0 60px rgba(176, 251, 255, 0.6),
      0 0 100px rgba(176, 251, 255, 0.3);
  }
}

/* Анимированные машины внизу блока Services */
.car-animation {
  position: relative;
  width: 100vw; /* Используем viewport width для полной ширины экрана */
  margin-left: calc(
    (100vw - 100%) / -2
  ); /* Выравниваем по левому краю viewport */
  height: 120px; /* Увеличена высота чтобы машины не обрезались */
  margin-top: 80px;
  overflow: hidden;
}

.car-image {
  width: 200px;
  height: auto;
  max-height: 100px; /* Ограничение высоты */
  object-fit: contain;
  opacity: 0.6;
  position: absolute;
  left: 0; /* Используем left для правильной работы transform */
  bottom: 20px;
  animation: car-drive-reverse 8s linear infinite; /* Та же анимация что и в Contacts */
  will-change: transform;
  transform: none; /* Без поворота для Services */
}

.car-image:nth-child(1) {
  animation-delay: 0s;
}

.car-image:nth-child(2) {
  animation-delay: 2.5s;
}

.car-image:nth-child(3) {
  animation-delay: 5s;
}

/* Анимация движения машины слева направо */
@keyframes car-drive {
  0% {
    transform: translateX(-250px) rotate(0deg); /* Начинаем за левым краем, без поворота - едут передом */
  }
  100% {
    transform: translateX(calc(100vw + 250px)) rotate(0deg); /* Заканчиваем за правым краем */
  }
}

/* Анимация движения машины справа налево (для Contacts и Services) */
@keyframes car-drive-reverse {
  0% {
    transform: translateX(
      calc(100vw + 200px)
    ); /* Начинаем за правым краем экрана */
  }
  100% {
    transform: translateX(
      -200px
    ); /* Заканчиваем за левым краем экрана, проезжая всю ширину */
  }
}

/* Адаптивность для Services */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .services {
    padding: 50px 20px 30px;
  }

  .services-title {
    font-size: 36px;
    margin-bottom: 60px;
  }

  .car-animation {
    height: 80px;
    margin-top: 60px;
  }

  .car-silhouette {
    width: 150px;
    height: 45px;
    animation-duration: 6s;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .service-card {
    padding: 40px 30px;
  }

  .service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 25px;
  }

  .service-name {
    font-size: 16px;
  }

  .service-description {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .service-card {
    padding: 35px 25px;
  }

  .car-animation {
    height: 60px;
    margin-top: 40px;
  }

  .car-silhouette {
    width: 120px;
    height: 36px;
    animation-duration: 5s;
  }

  .service-icon {
    width: 55px;
    height: 55px;
    margin-bottom: 20px;
  }

  .service-name {
    font-size: 15px;
  }

  .service-description {
    font-size: 12px;
  }
}

/* Showcase секция с разлетающимися карточками */
.showcase {
  position: relative;
  width: 100%;
  background: #000000;
  z-index: 2;
  padding: 0;
  margin-top: -5px; /* Минимальный отрицательный margin */
  margin-bottom: -30px; /* Увеличен отрицательный margin снизу для полного убирания отступа */
  overflow: hidden; /* Скрываем лишнее пространство */
}

.scroll-section {
  position: relative;
  height: 120vh; /* Уменьшено для убирания пустого места */
  width: 100%;
}

.sticky-wrapper {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: visible; /* Изменено с hidden на visible, чтобы карточки были видны */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  position: relative;
}

/* Фоновое видео для showcase */
.sticky-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("merge.mp4");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  z-index: 0;
}

/* Затемнение фона для лучшей читаемости */
.sticky-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.showcase-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  width: 100%;
  text-align: center;
}

.showcase-text {
  font-family: "Syncopate", sans-serif;
  font-size: 32px; /* Уменьшен размер */
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #ffffff;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 0 10px rgba(176, 251, 255, 0.3),
    0 0 20px rgba(176, 251, 255, 0.2), 0 0 30px rgba(176, 251, 255, 0.1);
  white-space: nowrap;
  max-width: 90vw; /* Ограничение ширины */
  padding: 0 20px;
  pointer-events: none;
}

/* Кнопка "Посмотреть все работы" */
.showcase-button {
  display: block;
  padding: 12px 32px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #ffffff;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(176, 251, 255, 0.4);
  border-radius: 50px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  pointer-events: auto;
  cursor: pointer;
  text-align: center;
  margin: 20px auto 0 auto; /* Небольшой отступ сверху, центрирование */
  width: fit-content;
}

.showcase-button:hover {
  border-color: #b0fbff;
  background: rgba(176, 251, 255, 0.1);
  box-shadow: 0 0 20px rgba(176, 251, 255, 0.3),
    0 0 40px rgba(176, 251, 255, 0.15);
  transform: translateY(-2px);
}

.car-cards-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.car-card {
  position: absolute;
  width: 320px; /* Увеличено с 280px */
  height: 480px; /* Увеличено с 420px */
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  will-change: transform;
  opacity: 0.7; /* Видны изначально */
  transform-origin: center center;
  /* Начальное состояние - все в центре */
  left: 50%;
  top: 50%;
  margin-left: -160px; /* Половина ширины (320px / 2) */
  margin-top: -240px; /* Половина высоты (480px / 2) */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.car-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.3s ease;
}

/* Видео в карточках */
.car-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  position: absolute;
  top: 0;
  left: 0;
}

.car-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
  border: 1px solid rgba(176, 251, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(176, 251, 255, 0.1),
    0 0 40px rgba(176, 251, 255, 0.05), inset 0 0 20px rgba(176, 251, 255, 0.02);
  transition: all 0.3s ease;
  pointer-events: none;
}

.car-card:hover .car-overlay {
  border-color: var(--ice-blue);
  box-shadow: 0 0 30px rgba(176, 251, 255, 0.3),
    0 0 60px rgba(176, 251, 255, 0.15), inset 0 0 30px rgba(176, 251, 255, 0.05);
}

.car-card:hover .car-image {
  transform: scale(1.05);
}

.car-card:hover .car-video {
  transform: scale(1.05);
}

/* Видео в карточках */
.car-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.3s ease;
}

/* Адаптивность для Showcase */
@media (max-width: 1024px) {
  .showcase-text {
    font-size: 28px;
    letter-spacing: 0.12em;
    max-width: 85vw;
  }

  .car-card {
    width: 240px;
    height: 360px;
    margin-left: -120px;
    margin-top: -180px;
  }
}

@media (max-width: 768px) {
  .showcase-text {
    font-size: 22px;
    letter-spacing: 0.1em;
    max-width: 90vw;
    padding: 0 15px;
  }

  .showcase-button {
    padding: 10px 24px;
    font-size: 12px;
  }

  .car-card {
    width: 240px;
    height: 360px;
    margin-left: -120px;
    margin-top: -180px;
  }

  .scroll-section {
    height: 250vh;
  }
}

@media (max-width: 480px) {
  .showcase-text {
    font-size: 18px;
    letter-spacing: 0.08em;
    max-width: 95vw;
    padding: 0 10px;
  }

  .car-card {
    width: 200px;
    height: 300px;
    margin-left: -100px;
    margin-top: -150px;
  }

  .scroll-section {
    height: 120vh;
  }
}

/* Адаптивность для Footer */
@media (max-width: 768px) {
  .footer {
    height: 100px;
  }

  .marquee {
    gap: 80px;
  }

  .marquee .brand-logo {
    width: 200px;
    height: 30px;
  }
}

@media (max-width: 480px) {
  .footer {
    height: 50px;
  }

  .marquee {
    gap: 50px;
  }

  .marquee .brand-logo {
    width: 180px;
    height: 28px;
  }
}

/* ============================================
   CONTACTS СЕКЦИЯ - Компактная версия
   ============================================ */

.contacts {
  position: relative;
  width: 100%;
  min-height: auto;
  background: #000000;
  padding: 5px 40px 20px; /* Минимальный верхний padding для уменьшения расстояния от showcase */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* Анимированные машины над блоком контакты */
.contacts .car-animation {
  position: relative;
  width: 100%;
  height: 120px; /* Увеличена высота чтобы машины не обрезались */
  margin-bottom: 30px;
  overflow: hidden;
}

.contacts .car-image {
  width: 200px;
  height: auto;
  max-height: 100px; /* Ограничение высоты */
  object-fit: contain;
  opacity: 0.6;
  position: absolute;
  left: 0; /* Используем left для правильной работы transform */
  bottom: 20px;
  animation: car-drive-reverse 8s linear infinite; /* Обратная анимация */
  will-change: transform;
  transform: none; /* Без поворота для Contacts */
}

.contacts .car-image:nth-child(1) {
  animation-delay: 0s;
}

.contacts .car-image:nth-child(2) {
  animation-delay: 2.5s;
}

.contacts .car-image:nth-child(3) {
  animation-delay: 5s;
}

.contacts-container {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}

/* Неоновая карточка с контактами - стиль как у showcase */
.contacts-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(15px);
  border-radius: 12px;
  padding: 35px 30px;
  position: relative;
  border: 1px solid rgba(176, 251, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  transition: all 0.4s ease;
}

/* Двойная неоновая рамка */
.contacts-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 12px;
  background: linear-gradient(
    45deg,
    #ff0000,
    #ff0000,
    #b0fbff,
    #b0fbff,
    #ff0000,
    #ff0000
  );
  background-size: 400% 400%;
  z-index: -1;
  opacity: 0.5;
  animation: neon-border-flow 3s ease infinite;
}

.contacts-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 11px;
  background: #000000;
  z-index: -1;
}

@keyframes neon-border-flow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Заголовок - простой белый цвет */
.contacts-title {
  font-family: "Syncopate", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ffffff;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 25px;
  text-shadow: none;
  animation: none;
}

/* Instagram кнопка */
.contacts-instagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 25px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(176, 251, 255, 0.2);
  border-radius: 50px;
  text-decoration: none;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-bottom: 25px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.contacts-instagram::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(176, 251, 255, 0.15),
    transparent
  );
  transition: left 0.5s ease;
}

.contacts-instagram:hover::before {
  left: 100%;
}

.contacts-instagram:hover {
  border-color: #b0fbff;
  box-shadow: 0 0 15px rgba(176, 251, 255, 0.3),
    0 0 30px rgba(176, 251, 255, 0.15);
  transform: translateY(-2px);
}

.instagram-icon {
  width: 20px;
  height: 20px;
  color: #b0fbff;
  transition: all 0.3s ease;
}

.contacts-instagram:hover .instagram-icon {
  color: #ffffff;
  filter: drop-shadow(0 0 6px #b0fbff);
}

.instagram-text {
  font-family: "Inter", sans-serif;
  font-weight: 600;
}

/* Телефон и мессенджеры */
.contacts-phone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.contacts-phone {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.contacts-phone:hover {
  color: #b0fbff;
  text-shadow: 0 0 8px rgba(176, 251, 255, 0.5);
}

.contacts-messengers {
  display: flex;
  gap: 12px;
}

.messenger-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(176, 251, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b0fbff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.messenger-btn svg {
  width: 20px;
  height: 20px;
}

.messenger-btn:hover {
  background: rgba(176, 251, 255, 0.1);
  border-color: #b0fbff;
  box-shadow: 0 0 12px rgba(176, 251, 255, 0.3);
  transform: translateY(-2px);
}

/* Стилизованная карта-заглушка - стиль как у contacts-card */
.contacts-map-placeholder {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(15px);
  border: 1px solid transparent; /* Такой же как у contacts-card */
  border-radius: 12px;
  padding: 35px 30px;
  text-align: center;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  cursor: default;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  position: relative;
}

/* Двойная неоновая рамка как у contacts-card */
.contacts-map-placeholder::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 12px;
  background: linear-gradient(
    45deg,
    #ff0000,
    #ff0000,
    #b0fbff,
    #b0fbff,
    #ff0000,
    #ff0000
  );
  background-size: 400% 400%;
  z-index: -1;
  opacity: 0.5;
  animation: neon-border-flow 3s ease infinite;
}

.contacts-map-placeholder::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 11px;
  background: #000000;
  z-index: -1;
}

.contacts-map-placeholder:hover {
  border-color: transparent;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.03);
}

.map-title {
  font-family: "Syncopate", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 15px;
  text-shadow: none;
  animation: none;
}

.map-address {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
  line-height: 1.6;
}

/* Footer */
.main-footer {
  background: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 25px 40px;
  z-index: 1;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-copyright {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.05em;
  margin: 0;
}

/* Footer "Made with ❤️ by TTMMs" */
.footer-made-by {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.made-with-text {
  color: rgba(255, 255, 255, 0.4);
}

.heart-icon {
  width: 14px;
  height: 14px;
  color: #ff0000;
  filter: drop-shadow(0 0 4px #ff0000) drop-shadow(0 0 8px rgba(255, 0, 0, 0.6));
  animation: heart-pulse 1.5s ease-in-out infinite;
}

@keyframes heart-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 4px #ff0000)
      drop-shadow(0 0 8px rgba(255, 0, 0, 0.6));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 6px #ff0000)
      drop-shadow(0 0 12px rgba(255, 0, 0, 0.8));
    transform: scale(1.1);
  }
}

.footer-link {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.footer-link:hover {
  color: #b0fbff;
  text-shadow: 0 0 8px rgba(176, 251, 255, 0.5);
}

.footer-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: #b0fbff;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 0 4px #b0fbff;
}

.footer-link:hover::after {
  opacity: 1;
}

/* Адаптивность для Contacts */
@media (max-width: 1024px) {
  .contacts-container {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .contacts-card {
    padding: 30px 25px;
  }

  .contacts-title {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .contacts {
    padding: 40px 20px 25px;
  }

  .contacts-container {
    gap: 20px;
  }

  .contacts-card {
    padding: 25px 20px;
  }

  .contacts-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .contacts-instagram {
    padding: 10px 20px;
    font-size: 13px;
    margin-bottom: 20px;
  }

  .contacts-phone {
    font-size: 16px;
  }

  .contacts-map-placeholder {
    min-height: 200px;
    padding: 30px 20px;
  }

  .map-title {
    font-size: 18px;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .contacts-card {
    padding: 20px 15px;
  }

  .contacts-title {
    font-size: 18px;
  }

  .contacts-phone-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .contacts-messengers {
    width: 100%;
    justify-content: flex-start;
  }
}
