/* ======================================================================
   MOBILE: generic + premium + NAV dropdown
   ====================================================================== */

   @media (max-width: 992px) {
    .footer-top { grid-template-columns: repeat(2, 1fr); }
    .contact-container { grid-template-columns: 1fr; gap: 30px; }
  }
  
  @media (max-width: 576px) {
    .footer-top { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
  
    .contact-info,
    .contact-form-container { padding: 20px; }
  
    .form-input { font-size: 0.95rem; }
    .form-label { font-size: 0.95rem; }
  
    .contact-icon { width: 35px; height: 35px; }
  }
  
  @media (max-width: 480px) {
    .modal__content {
      margin: 12vh auto 0;
      padding: 18px 16px 14px;
    }
    .modal__actions { gap: 10px; }
    .modal__btn { width: 100%; }
  }
  
  /* home quick adapt */
  @media (max-width: 768px) {
    .main-title { font-size: 2rem; }
    .features-grid { grid-template-columns: 1fr; gap: 1rem; }
    .feature-card { padding: 1.5rem 1rem; }
  }
  
  /* ======================================================================
     MOBILE PREMIUM + NAV (JS uses header.is-nav-open)
     ====================================================================== */
  
  @media (max-width: 768px) {
  
  .footer-column--nav .footer-links {
    columns: 2;
    column-gap: 18px;
  }

  .footer-column--nav .footer-links li {
    break-inside: avoid;
    margin-bottom: 8px;
  }

  .footer-column--nav .footer-links a {
    display: inline-block; /* чтобы красиво в колонке */
    width: 100%;
  }


    /* iOS: fixed bg jump fix */
    .static-background {
      background-attachment: scroll !important;
      background-position: center top;
      transform: translateZ(0);
      will-change: transform;
    }
  
    /* header tighter */
    header {
      padding: 10px 14px !important;
      min-height: 54px !important;
      border-bottom: 1px solid rgba(255,255,255,0.07);
    }
  
    .logo img { width: 90px; height: auto; }
  
    .nav-toggle { display: inline-flex; margin-left: auto; }
  
    /* pages */
    main { padding-top: 64px; }
  
    .page {
      padding: 22px 14px !important;
      min-height: auto !important;
    }
  
    .page-content {
      padding: 18px 14px !important;
      border-radius: 14px !important;
      background: rgba(26,26,26,0.72) !important;
      border: 1px solid rgba(255,255,255,0.06);
      box-shadow: 0 18px 50px rgba(0,0,0,0.35);
      backdrop-filter: blur(10px);
    }
  
    /* hero */
    .main-title {
      font-size: clamp(1.55rem, 4.8vw, 2.05rem) !important;
      line-height: 1.12 !important;
      letter-spacing: 0.6px !important;
      margin-bottom: 14px !important;
    }
  
    .main-subtitle {
      font-size: 1rem !important;
      line-height: 1.55 !important;
      margin-bottom: 22px !important;
      color: rgba(255,255,255,0.78) !important;
    }
  
    .hero-buttons {
      flex-direction: column;
      gap: 12px;
      align-items: stretch;
      margin-top: 18px;
    }
  
    .hero-buttons .btn {
      width: 100%;
      padding: 14px 18px;
      border-radius: 999px;
    }
  
    /* section headings */
    #services h2, #cars h2, #workshop h2, #contacts h2 {
      font-size: 1.8rem;
      margin-bottom: 1.1rem;
      padding-bottom: 12px;
    }
  
    #services p, #cars p, #workshop p, #contacts p {
      margin-bottom: 1.6rem;
      font-size: 0.95rem;
    }
  
    /* grids -> 1 column */
    .features-grid,
    .services-grid,
    .cars-grid,
    .workshop-content,
    .contact-container,
    .footer-top {
      grid-template-columns: 1fr !important;
      gap: 14px !important;
    }
  
    .feature-card,
    .service-card,
    .car-card {
      border-radius: 14px;
    }
  
    .service-card {
      padding: 18px 16px;
      background: rgba(40,40,40,0.62);
      border: 1px solid rgba(255,255,255,0.06);
    }
  
    /* cars improvements */
    .car-card {
      background: rgba(40,40,40,0.62);
      border: 1px solid rgba(255,255,255,0.06);
      overflow: hidden;
    }
  
    .car-image { height: 210px; }
    .car-title { font-size: 1.35rem; margin-bottom: 8px; }
  
    .car-price {
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
      margin-bottom: 12px;
    }
  
    .price-before { font-size: 0.95rem; opacity: 0.75; }
  
    .price-after {
      color: #e63946 !important;
      -webkit-text-fill-color: #e63946 !important;
      font-weight: 800 !important;
      font-size: 1.35rem !important;
    }
  
    .car-description {
      font-size: 0.95rem;
      line-height: 1.55;
      margin-bottom: 14px;
    }
  
    .car-button { border-radius: 12px; padding: 14px 16px; }
  
    /* workshop */
    .workshop-image {
      height: 240px !important;
      max-width: 100% !important;
      margin-top: 0 !important;
      border-radius: 16px !important;
    }
  
    .workshop-text { padding: 0 !important; }
    .workshop-text h3 { font-size: 1.35rem; }
    .workshop-features { grid-template-columns: 1fr !important; }
  
    /* contacts + footer */
    .contact-info,
    .contact-form-container {
      border-radius: 16px;
      border: 1px solid rgba(255,255,255,0.06);
      background: rgba(40,40,40,0.62);
    }
  
    .contact-text p,
    .footer-item--link span {
      overflow-wrap: anywhere;
      word-break: normal;
      line-height: 1.35;
    }
  
    .footer-container { padding: 40px 14px 22px; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 10px; }
  
    /* =========================
       MOBILE NAV (dropdown)
       ========================= */
  
    /* hide desktop list */
    header .nav ul { display: none !important; }
  
    /* dropdown container */
    nav.nav {
      position: absolute;
      left: 14px;
      right: 14px;
      top: calc(100% + 10px);
      display: none;
      padding: 10px;
      border-radius: 16px;
      background: rgba(15,15,15,0.92);
      border: 1px solid rgba(255,255,255,0.08);
      box-shadow: 0 24px 60px rgba(0,0,0,0.55);
      backdrop-filter: blur(14px);
      z-index: 1200;
    }
  
    header.is-nav-open nav.nav { display: block; }
  
    header.is-nav-open nav.nav ul {
      display: flex !important;
      flex-direction: column;
      gap: 6px;
    }
  
    header.is-nav-open nav.nav li { margin: 0 !important; }
  
    header.is-nav-open nav.nav a {
      display: block;
      padding: 12px 12px;
      border-radius: 12px;
      font-size: 1rem;
    }
  
    header.is-nav-open nav.nav a:hover {
      background: rgba(255,255,255,0.06);
    }
  }
  
  @media (max-width: 768px) {
    .car-button {
      font-size: 1.1rem;      /* увеличили шрифт */
      font-weight: 700;       /* чуть жирнее — выглядит дороже */
      padding: 16px 18px;     /* чтобы кнопка стала “премиальнее” */
      letter-spacing: 0.3px;  /* аккуратная типографика */
    }

    .car-button:active {
        transform: scale(0.98);
      }

      .price-before {
        opacity: 0.6;
      }
      
      .price-after {
        font-size: 1.4rem;
        font-weight: 800;
      }

      .unique-offer-card {
        padding: 18px 16px;
        border-radius: 16px;
      }
    
      .unique-offer-card p {
        font-size: 0.95rem;
        line-height: 1.4;
      }

      .contact-text p {
        padding-left: 12px;
        border-left: 2px solid rgba(230,57,70,0.35);
      }
  }


  @media (max-width: 768px) {
    .footer-container {
      padding: 34px 14px 18px;
    }
  
    .footer-top {
      gap: 16px;
    }
  
    .footer-column {
      padding: 14px 14px;
      border: 1px solid rgba(255,255,255,0.06);
      background: rgba(20,20,20,0.55);
      border-radius: 16px;
      backdrop-filter: blur(10px);
    }
  
    .footer-logo img {
      width: 120px;
      margin-bottom: 10px;
    }
  
    .footer-tagline {
      font-size: 0.88rem;
      margin-bottom: 12px;
    }
  
    .footer-links a,
    .footer-item--link {
      font-size: 1rem;
      padding: 8px 0;  /* делает “тап-зону” приятной */
      display: inline-flex;
    }
  
    .footer-social .social-icon {
      width: 40px;
      height: 40px;
    }
  
    .footer-bottom {
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px solid rgba(255,255,255,0.06);
    }
  
    /* Чтобы нижние ссылки не разъезжались */
    .footer-legal {
      flex-direction: column;
      gap: 8px;
    }
    .footer-legal .divider {
      display: none;
    }
  }
  

  /* Подсказка под картинкой — только мобильные */
.workshop-hint {
  display: none;
  margin-top: 10px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.3px;
  user-select: none;
}

/* Показываем только на touch-устройствах */
@media (hover: none) {
  .workshop-hint {
    display: block;
    animation: hintPulse 2.4s ease-in-out infinite;
  }
}

/* очень мягкая анимация */
@keyframes hintPulse {
  0%   { opacity: 0.4; }
  50%  { opacity: 0.75; }
  100% { opacity: 0.4; }
}

}

@media (max-width: 768px) {
  .footer-column--nav .footer-links {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px 16px !important;
  }

  .footer-column--nav .footer-links li {
    margin-bottom: 0 !important;
  }

  .footer-column--nav .footer-links a {
    display: block;
    padding: 8px 0; /* можно оставить, если нравится тап-зона */
  }
}



/* =========================================================
   iPhone LANDSCAPE: маленькая высота -> включаем mobile-режим
   ========================================================= */
@media (max-height: 520px) and (orientation: landscape) {

  /* 1) Хедер компактнее */
  header {
    padding: 8px 14px !important;
    min-height: 52px !important;
  }

  .logo img {
    width: 96px !important;
    height: auto !important;
  }

  /* 2) Секции перестают быть "на весь экран" */
  .page {
    min-height: auto !important;        /* вместо 100vh из layout.css */
    padding: 18px 14px !important;      /* вместо 60px 10% */
  }

  .page-content {
    padding: 16px 14px !important;
    border-radius: 14px !important;
  }

  /* 3) Главный экран (home) ужимаем по вертикали */
  #home {
    padding-top: 10px !important;
  }

  .home-content {
    padding: 18px 14px !important;
  }

  .main-title {
    font-size: 1.55rem !important;
    line-height: 1.1 !important;
    margin-bottom: 10px !important;
  }

  .main-subtitle {
    font-size: 0.98rem !important;
    margin-bottom: 14px !important;
  }

  .hero-buttons {
    flex-direction: row !important; /* в landscape обычно лучше 2 кнопки в ряд */
    gap: 10px !important;
  }

  .hero-buttons .btn {
    width: auto !important;
    padding: 12px 14px !important;
  }

  /* 4) Картинки (особенно в блоках/карточках) не должны съедать экран */
  .car-image {
    height: 160px !important;
  }

  .workshop-image {
    height: 200px !important;
  }
}
