/* Rocket Auto mobile/adaptive fixes — v7 */
html,
body,
#root {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden !important;
}

@supports (overflow: clip) {
  html,
  body,
  #root {
    overflow-x: clip !important;
  }
}

body {
  margin: 0;
  position: relative;
}

main,
header,
footer,
section {
  max-width: 100%;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

/* Header is deliberately solid at all scroll positions. */
header.fixed {
  background: hsl(220 18% 10%) !important;
  border-bottom: 1px solid hsla(220, 12%, 32%, 0.82) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.38) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow-x: clip;
}

/* A real opaque mobile dropdown instead of a transparent layer over content. */
header .rocket-mobile-menu {
  position: fixed !important;
  top: 4rem !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 70 !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: calc(100dvh - 4rem) !important;
  overflow-y: auto !important;
  padding: 1rem !important;
  border-top: 1px solid hsl(220 12% 27%) !important;
  border-bottom: 1px solid hsl(220 12% 27%) !important;
  background: hsl(220 18% 10%) !important;
  box-shadow: 0 28px 52px rgba(0, 0, 0, 0.58) !important;
  opacity: 1 !important;
}

header .rocket-mobile-menu nav {
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
}

header .rocket-mobile-menu a {
  color: hsl(0 0% 98%) !important;
}

body.rocket-menu-open {
  overflow: hidden !important;
}

body.rocket-menu-open a.rocket-floating-telegram {
  visibility: hidden !important;
}

/* Prevent the off-screen anti-spam field from widening Safari's page canvas. */
.rocket-honeypot {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip-path: inset(50%) !important;
}

/* Smooth visual blending between the large site sections. */
.rocket-section-flow {
  position: relative;
  isolation: isolate;
}

.rocket-section-flow::before,
.rocket-section-flow::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  height: clamp(3.5rem, 9vw, 7rem);
  pointer-events: none;
}

.rocket-section-flow::before {
  top: -1px;
  background: linear-gradient(
    to bottom,
    hsl(220 18% 10%) 0%,
    hsla(220, 18%, 10%, 0.72) 30%,
    transparent 100%
  );
}

.rocket-section-flow::after {
  bottom: -1px;
  background: linear-gradient(
    to top,
    hsl(220 18% 10%) 0%,
    hsla(220, 18%, 10%, 0.68) 30%,
    transparent 100%
  );
}

.rocket-section-flow > .h-px {
  display: none !important;
}

/* Hero layout safety without overriding the original 1400px desktop container. */
main > section:first-child,
main > section:first-child .grid,
main > section:first-child .rocket-hero-media {
  min-width: 0 !important;
}

main > section:first-child .rocket-hero-media {
  max-width: 100% !important;
}

main > section:first-child a[href="#lead-form"].rocket-hero-cta {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
}

main > section:first-child a[href="#lead-form"].rocket-hero-cta button {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  font-size: 1rem !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}

main > section:first-child .rocket-hero-phone-row {
  min-width: 0 !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 0.25rem !important;
}

main > section:first-child .rocket-hero-phone-row .rocket-phone-number {
  font-size: 1rem !important;
  white-space: nowrap !important;
}

.rocket-stats-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  max-width: 64rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 3rem !important;
  padding-bottom: 3rem !important;
}

.rocket-stat-card {
  min-width: 0 !important;
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
}

.rocket-stat-card-title {
  max-width: 100% !important;
  font-size: 1.15rem !important;
  line-height: 1.25 !important;
  text-wrap: balance;
}

.rocket-stat-card-subtitle {
  max-width: 22rem !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  text-wrap: balance;
}


#contact h2 .whitespace-nowrap {
  white-space: normal !important;
}

@media (max-width: 767px) {
  header .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  header a[aria-label*="главную"] {
    min-width: 0 !important;
    gap: 0.5rem !important;
  }

  header a[aria-label*="главную"] img {
    width: 3rem !important;
    height: 3rem !important;
    flex: 0 0 auto !important;
  }

  header a[aria-label*="главную"] > span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 1rem !important;
  }

  header button[aria-label*="меню"] {
    flex: 0 0 auto !important;
  }

  main > section:first-child {
    padding-bottom: 4rem !important;
  }
}

@media (min-width: 640px) {
  main > section:first-child a[href="#lead-form"].rocket-hero-cta {
    display: inline-block !important;
    width: auto !important;
  }

  main > section:first-child a[href="#lead-form"].rocket-hero-cta button {
    width: auto !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    font-size: 1.25rem !important;
    white-space: nowrap !important;
  }

  main > section:first-child .rocket-hero-phone-row {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
  }

  main > section:first-child .rocket-hero-phone-row .rocket-phone-number {
    font-size: 1.125rem !important;
  }

}


@media (min-width: 768px) {
  .rocket-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .rocket-stat-card-title {
    font-size: 1.25rem !important;
  }
}

/* Small desktop breathing room between the solid header and the phone card. */
@media (min-width: 1024px) {
  main > section:first-child .rocket-hero-contact-card {
    margin-top: 1rem !important;
  }
}
