/* Amanat Auto shared responsive and menu layer for static SEO pages. */
.main-menu {
  background: #ffffff;
  border-bottom: 1px solid #dbe7e7;
  position: relative;
  top: auto;
  z-index: 50;
  margin-bottom: 18px;
}

.main-menu > ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: 0 auto;
  padding: 10px 14px;
  max-width: 1180px;
}

.main-menu li {
  position: relative;
}

.main-menu a,
.main-menu .phoneText {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 999px;
  color: #007a75;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.2;
  background: #ffffff;
  border: 1px solid #dbe7e7;
  box-shadow: 0 1px 0 rgba(0, 48, 46, .04);
  max-width: 310px;
  min-height: 38px;
  font-size: 14px;
  text-align: center;
}

.main-menu a:hover {
  color: #fff;
  background: #007a75;
  border-color: #007a75;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 88, 82, .12);
}

.main-menu .menu-primary {
  background: #f59e0b;
  color: #111;
  border-color: #f59e0b;
}

.main-menu .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 300px;
  padding: 10px;
  background: #fff;
  border: 1px solid #dbe7e7;
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(0, 48, 46, 0.14);
  z-index: 1000;
}

.main-menu .dropdown:hover .dropdown-menu,
.main-menu .dropdown:focus-within .dropdown-menu {
  display: block;
}

.main-menu .dropdown > a::after {
  content: "⌄";
  font-size: 12px;
  margin-left: 6px;
}

.main-menu .dropdown-menu li,
.main-menu .dropdown-menu a {
  width: 100%;
}

/* Match the homepage desktop nav when a standalone page uses both classes. */
.navbar.main-menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  width: calc(100% - 30px);
  max-width: 1200px;
  margin: 12px auto 18px;
  padding: 10px;
  background: #f8fbfb;
  border: 1px solid #dbe7e7;
  border-radius: 18px;
  box-shadow: none;
}

.navbar.main-menu > ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  margin: 0 auto;
  max-width: 1180px;
}

.navbar.main-menu li {
  margin: 0;
  padding: 0;
}

.navbar.main-menu a {
  color: #666666;
  padding: 9px 11px;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 999px;
  line-height: 1.2;
  background: #ffffff;
  border: 1px solid #dbe7e7;
  box-shadow: 0 1px 0 rgba(0, 48, 46, .04);
  max-width: 310px;
  min-height: 38px;
  font-size: 14px;
  text-align: center;
}

.navbar.main-menu a:hover {
  color: #ffffff;
  background-color: #007a75;
  border-color: #007a75;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 88, 82, .12);
  text-decoration: none;
}

.navbar.main-menu .menu-primary {
  background: #f59e0b;
  color: #111;
  border-color: #e0910a;
  box-shadow: 0 8px 18px rgba(245, 158, 11, .18);
}

.navbar.main-menu .menu-primary:hover {
  background: #d97706;
  color: #ffffff;
}

/* Shared top navigation used on auto landing pages. */
.nav {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dbe7e7;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(0, 48, 46, 0.10);
  padding: 12px !important;
  margin-bottom: 26px;
}

.nav .logo,
.nav > .logo {
  color: #007a75 !important;
  background: #eefaf8;
  border: 1px solid #cfe8e5;
  border-radius: 999px;
  padding: 9px 13px;
  line-height: 1.1;
}

.nav-links {
  gap: 7px !important;
  align-items: center;
}

.nav-links a {
  color: #006d66 !important;
  background: #ffffff;
  border: 1px solid #dbe7e7;
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(0, 48, 46, 0.04);
  padding: 9px 11px !important;
  min-height: 38px;
  max-width: 290px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  font-weight: 800 !important;
  line-height: 1.2;
}

.nav-links a:hover {
  color: #ffffff !important;
  background: #007a75;
  border-color: #007a75;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 88, 82, 0.12);
}

.nav-links a[href*="avto-v-horgose-ceny"],
.nav-links a[href*="#contact"],
.nav-links a[href*="wa.me"] {
  background: #f59e0b;
  border-color: #e0910a;
  color: #111 !important;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.16);
}

.nav-links a[href*="avto-v-horgose-ceny"]:hover,
.nav-links a[href*="#contact"]:hover,
.nav-links a[href*="wa.me"]:hover {
  background: #d97706;
  border-color: #d97706;
  color: #ffffff !important;
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    -webkit-text-size-adjust: 100%;
  }

  img,
  video,
  iframe {
    max-width: 100% !important;
    height: auto !important;
  }

  video {
    max-height: 62vh !important;
    object-fit: contain !important;
  }

  table {
    width: 100%;
  }

  .container,
  main,
  section,
  article,
  .content,
  .wrapper {
    max-width: 100% !important;
  }

  .container {
    width: 100% !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  header,
  .hero,
  .auto-hero,
  .topBox,
  .bottomRow,
  footer {
    max-width: 100% !important;
  }

  h1 {
    font-size: clamp(26px, 8vw, 34px) !important;
    line-height: 1.16 !important;
    overflow-wrap: anywhere;
  }

  h2,
  .section-title {
    font-size: clamp(23px, 6.6vw, 29px) !important;
    line-height: 1.22 !important;
    overflow-wrap: anywhere;
  }

  h3 {
    font-size: clamp(18px, 5.2vw, 22px) !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere;
  }

  p,
  li,
  td,
  th {
    font-size: 16px !important;
    line-height: 1.58 !important;
    overflow-wrap: anywhere;
  }

  a,
  button,
  input,
  select,
  textarea {
    max-width: 100% !important;
  }

  .btn,
  .cta-button,
  .btn-primary,
  .btn-secondary,
  .hero-buttons a,
  .cta-row a,
  .auto-hero-actions a {
    width: 100% !important;
    min-height: 46px;
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal !important;
  }

  .hero-buttons,
  .cta-row,
  .auto-hero-actions,
  .nav-links {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .nav {
    border-radius: 14px !important;
    padding: 10px !important;
    margin-bottom: 18px !important;
  }

  .nav .logo,
  .nav > .logo {
    width: 100%;
    text-align: center;
    justify-content: center;
    box-sizing: border-box;
  }

  .grid,
  .cards-container,
  .hero,
  .hero-points,
  .features,
  .steps,
  .footer-columns,
  .footer-content,
  .footer-column,
  .car-flex {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .card,
  .faq-item,
  .step,
  .price-box,
  .cta,
  .info-section {
    width: 100% !important;
    max-width: 100% !important;
    padding: 18px !important;
    border-radius: 12px !important;
    box-sizing: border-box;
  }

  .section {
    padding: 34px 0 !important;
  }

  .topBox {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 10px 12px !important;
  }

  .logo {
    margin: 0 auto !important;
  }

  .logo img {
    max-width: 118px !important;
  }

  .navbar {
    width: 100% !important;
    margin-top: 4px !important;
    display: block !important;
    overflow: visible !important;
    padding: 8px !important;
    border-radius: 14px !important;
  }

  .navbar ul,
  nav ul {
    width: 100% !important;
    max-height: 58vh;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 10px !important;
    background: #ffffff;
    border: 1px solid #dbe7e7;
    border-radius: 14px;
    box-shadow: inset 0 -18px 18px -22px rgba(0,0,0,.28);
  }

  .navbar .dropdown-menu,
  .main-menu .dropdown-menu,
  nav .dropdown-menu {
    display: grid !important;
    position: static !important;
    min-width: 0 !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 8px 0 0 12px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .navbar .dropdown > a::after,
  .main-menu .dropdown > a::after {
    content: "" !important;
  }

  .navbar::after {
    content: "Прокрутите меню вниз";
    display: block;
    margin: 6px auto 0;
    color: #667;
    font-size: 13px;
    text-align: center;
  }

  .navbar li,
  nav li {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .navbar a,
  nav li a,
  .nav-links a {
    width: 100% !important;
    display: block !important;
    padding: 12px 13px !important;
    border-radius: 12px !important;
    background: rgba(0, 160, 143, 0.08);
    box-sizing: border-box;
    line-height: 1.28 !important;
    max-width: 100% !important;
    text-align: left;
  }

  .navbar .menu-primary,
  .main-menu .menu-primary {
    background: #f59e0b !important;
    color: #111 !important;
    border-color: #e0910a !important;
  }

  .nav-links a[href*="avto-v-horgose-ceny"],
  .nav-links a[href*="#contact"],
  .nav-links a[href*="wa.me"] {
    background: #f59e0b !important;
    color: #111 !important;
    border-color: #e0910a !important;
  }

  .bottomRow,
  .cartAndSearch {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .search {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 8px !important;
  }

  .search input,
  #search-placeholder {
    width: 100% !important;
    min-width: 0 !important;
    padding-right: 10px !important;
    box-sizing: border-box;
  }

  #searchResults {
    left: 0 !important;
    width: 100% !important;
    max-height: 50vh !important;
  }

  .auto-hero {
    min-height: 720px !important;
    border-radius: 14px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .auto-hero > img {
    object-fit: cover !important;
    object-position: 50% center !important;
    filter: brightness(1.13) saturate(1.06) !important;
  }

  .auto-hero-content {
    width: 100% !important;
    padding: 24px 14px 26px !important;
    max-width: 100% !important;
  }

  .auto-hero-badges,
  .auto-hero-content > div[style*="grid-template-columns"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .auto-hero-badges span {
    width: 100% !important;
    box-sizing: border-box;
    text-align: center;
  }

  .price-table-wrap,
  .table-wrap,
  .responsive-table {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .price-table,
  table {
    min-width: 680px;
  }

  .model-chip {
    margin: 4px 3px !important;
    padding: 8px 10px !important;
  }

  [style*="position: fixed"][style*="bottom: 20px"] {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    width: auto !important;
  }

  #contactMenu {
    width: 100% !important;
    max-height: 62vh;
    overflow-y: auto;
    box-sizing: border-box;
  }

  #contactMenu a,
  #contactMenu div {
    font-size: 15px !important;
  }

  footer {
    padding-bottom: 96px !important;
  }
}

@media (max-width: 390px) {
  .auto-hero {
    min-height: 760px !important;
  }

  h1 {
    font-size: 24px !important;
  }

  .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .card,
  .faq-item,
  .step,
  .price-box,
  .cta,
  .info-section {
    padding: 15px !important;
  }
}
