@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@600&family=Roboto:wght@400;500&display=swap");

/* ----- Общие параметры ----- */
body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  color: #f5f5f5;

  background: linear-gradient(
      rgba(0, 0, 0, 0.45),
      rgba(0, 0, 0, 0.7)
    ),
    url("los-santos-neon.jpg") no-repeat top center / cover;

  background-attachment: fixed;
  overflow-x: hidden;
  transition: background-position 0.3s ease-out;
  box-sizing: border-box;
}

*, *::before, *::after { box-sizing: inherit; }

/* ----- мобильный фон ----- */
.mobile-bg {
  display: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---------------------------------------------------------
      📱 МОБИЛЬНАЯ ВЕРСИЯ
   --------------------------------------------------------- */
@media (max-width: 768px) {

  html, body { overflow-x: hidden !important; width:100% !important; }

  body {
    background: none !important;
    background-attachment: scroll !important;
  }

  .mobile-bg {
    display:block;
    background-image: url("combined_reversed.jpg");
  }

  header {
    padding: 80px 12px !important;
    text-align:center !important;
    width:100% !important;
  }

  header p {
    margin: 0 auto 8px auto !important;
    text-align:center !important;
  }

  header h1 {
    font-size: clamp(28px, 10.5vw, 48px) !important;
    line-height: 1.05 !important;
    margin: 0 auto !important;
  }

  .wrench-animation {
    width:140px !important;
    height:140px !important;
    margin-top:18px !important;
  }

  .services {
    flex-direction:column !important;
    align-items:center !important;
    gap:18px !important;
    width:100% !important;
  }

  .service-card {
    width:94% !important;
    max-width:420px !important;
    text-align:center !important;
    padding:18px !important;
  }

  /* Мобильная карта */
  #map-mobile {
    display: block !important;
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
  }

  #map-mobile iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }

  /* Прячем ПК-карту */
  #map-desktop {
    display: none !important;
  }

  /* Красивое оформление контактов на мобильной версии */
  .contact {
    padding: 10px 5px !important;
    text-align: center !important;
  }

  .contact p {
    font-size: 18px !important;
    line-height: 1.55 !important;
    margin: 12px auto !important;
    width: 95% !important;
  }

  .contact a {
    display: inline-block !important;
    color: #ff2a2a !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    margin-top: 5px !important;
    text-decoration: none !important;
  }

  .contact a:hover {
    opacity: 0.8;
  }

  .hours {
    margin-top: 20px !important;
    font-size: 17px !important;
    line-height: 1.6 !important;
  }

  .hours p {
    margin: 6px 0 !important;
  }

  /* Карточки услуг для мобильной версии */
  .service-card {
    width: 92% !important;
    margin: 20px auto !important;
    padding: 20px 15px !important;
    border-radius: 18px !important;

    background: rgba(0, 0, 0, 0.55) !important;
    backdrop-filter: blur(6px) !important;

    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.6) !important;

    text-align: center !important;
  }

  .service-card h3 {
    font-size: 22px !important;
    color: #ff2a2a !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
    text-align: center !important;
  }

  .service-card p {
    font-size: 17px !important;
    line-height: 1.55 !important;
    color: #ffffff !important;
    margin: 0 auto !important;
    width: 95% !important;
  }

  /* отключаем ненужный ПК-стиль */
  .services-grid {
    display: block !important;
  }
}

/* ВОССТАНОВЛЕНИЕ ЦЕНТРА ДЛЯ ПК */
@media (min-width: 769px) {
  .contact,
  .contact p,
  .contact a,
  .hours {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* ----- HEADER ----- */
header {
  text-align: center;
  padding: 120px 20px;
}

header p {
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #ddd;
  margin-top: 10px;
  font-size: 15px;
  opacity: 0;
  animation: fadeIn 1.5s ease forwards 0.8s;
}

header h1 {
  font-family: "Orbitron", sans-serif;
  font-size: 90px;
  margin: 0;
  letter-spacing: 3px;
  opacity: 0;
  transform: translateY(40px);
  animation: slideUpFade 1.6s ease forwards;
  color: #fff;
  text-shadow: 0 0 25px #ff0000;
}

@keyframes slideUpFade {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* ----- Анимация ключа ----- */
.wrench-animation {
  margin-top: 100px;
  width: 200px;
  height: 200px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  filter: drop-shadow(0 0 25px rgba(255, 0, 0, 0.65));
  animation: glowPulse 3s ease-in-out infinite;
}

.wrench {
  animation: spin 6s linear infinite;
}

.wrench img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ----- Sections ----- */
section {
  padding: 60px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

h2 {
  text-align: center;
  color: #fff;
  font-family: "Orbitron", sans-serif;
  font-size: 32px;
  margin-bottom: 40px;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

.services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  width: 100%;
}

.service-card {
  background: rgba(20,20,20,0.55);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  width: 300px;
  padding: 25px;
  text-align: left;
  box-shadow: 0 0 15px rgba(255,0,0,0.3);
  transition: 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  background-color: rgba(34, 34, 34, 0.7);
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.5);
}

.service-card h3 {
  color: #ff1a1a;
  margin-bottom: 15px;
}

/* Контакты */
.contact a {
  color: #ff1a1a !important;
  font-weight: 600;
  text-shadow: none !important;
}

.contact a:hover {
  color: #ff3a3a !important;
  text-shadow: none !important;
}

/* ПК карта */
#map-desktop {
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  margin: 25px auto;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

#map-desktop iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Мобильная карта — скрыта по умолчанию */
#map-mobile {
  display: none;
}

footer {
  text-align: center;
  background: rgba(0, 0, 0, 0.6);
  color: #ccc;
  padding: 20px;
  font-size: 14px;
  margin-top: 60px;
}
