@media (max-width: 1180px) {
  :root {
    --header-height: 80px;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 24px;
    width: min(360px, calc(100vw - 48px));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .site-nav a {
    min-height: 45px;
    display: flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 10px;
  }

  .site-nav a::after {
    display: none;
  }

  .site-nav a:hover {
    background: var(--primary-soft);
  }

  .menu-toggle {
    display: flex;
  }

  .header-cta {
    order: 2;
  }

  .menu-toggle {
    order: 3;
    margin-left: 0;
  }

  .brand {
    margin-right: auto;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 0.96fr) minmax(390px, 0.75fr);
    gap: 62px;
  }

  .hero h1 {
    font-size: clamp(3.4rem, 6.6vw, 5.2rem);
  }

  .benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benefit-card {
    min-height: 210px;
  }

  .contacts-card {
    grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.72fr);
  }

  .contacts-actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }
}

@media (max-width: 1024px) {
  .hero {
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.7fr);
    gap: 45px;
  }

  .hero-note {
    left: -28px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .gallery-card-copy {
    padding: 18px;
  }

  .gallery-card h3 {
    font-size: 1.43rem;
  }

  .about-grid {
    gap: 65px;
  }

  .about-visual {
    min-height: 590px;
  }

  .steps-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reviews-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-card:last-child {
    min-height: 230px;
    grid-column: 1 / -1;
  }

  .step-card:nth-child(3),
  .step-card:nth-child(4) {
    border-top: 0;
  }

  .step-card:nth-child(3) {
    border-left: 0;
  }

  .location-card {
    grid-template-columns: minmax(0, 0.9fr) minmax(330px, 0.65fr);
  }

  .location-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .lightbox {
    width: calc(100vw - 32px);
    height: calc(100svh - 32px);
  }

  .lightbox-shell {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

  .lightbox-info {
    padding-inline: 27px;
  }
}

@media (max-width: 860px) {
  .section {
    padding-block: 90px;
  }

  .hero {
    padding-top: calc(var(--header-height) + 64px);
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 690px;
  }

  .hero h1 {
    font-size: clamp(3.7rem, 10.4vw, 5.5rem);
  }

  .hero-visual {
    width: min(82%, 580px);
    justify-self: center;
  }

  .hero-note {
    left: -42px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-heading > p,
  .section-heading > div > p:last-child {
    justify-self: start;
  }

  .gallery-cta {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .gallery-cta .button {
    width: fit-content;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-visual {
    width: min(100%, 620px);
    min-height: 660px;
    margin-inline: auto;
  }

  .about-copy {
    max-width: 720px;
  }

  .faq-layout {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .faq-intro {
    max-width: 650px;
  }

  .location-card {
    grid-template-columns: 1fr;
  }

  .location-actions {
    flex-direction: row;
  }

  .location-map,
  .location-map iframe {
    min-height: 390px;
  }

  .contacts-card {
    grid-template-columns: 1fr;
  }

  .contacts-actions {
    grid-column: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 55px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .lightbox-shell {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .legal-layout,
  .error-layout {
    grid-template-columns: 1fr;
  }

  .legal-hero {
    position: static;
  }

  .error-address {
    max-width: 620px;
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: 72px;
  }

  .container {
    width: min(100% - 32px, var(--container));
  }

  .section {
    padding-block: 74px;
  }

  .header-inner,
  .site-header.is-compact .header-inner {
    min-height: var(--header-height);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-copy strong {
    font-size: 1.08rem;
  }

  .brand-copy small {
    display: none;
  }

  .header-cta {
    display: none;
  }

  .menu-toggle {
    margin-left: auto;
  }

  .site-nav {
    right: 16px;
    width: calc(100vw - 32px);
  }

  .site-nav .menu-avito {
    width: 100%;
    display: inline-flex;
    margin-top: 8px;
  }

  .hero {
    padding-top: calc(var(--header-height) + 48px);
    padding-bottom: 72px;
  }

  .hero-grid {
    gap: 48px;
  }

  .hero h1 {
    margin-bottom: 22px;
    font-size: clamp(3.05rem, 15.5vw, 4.8rem);
    line-height: 0.94;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-address {
    align-items: flex-start;
    padding: 16px;
  }

  .hero-address > span {
    grid-template-columns: 1fr;
  }

  .hero-address small {
    grid-column: auto;
  }

  .hero-visual {
    width: min(88%, 500px);
  }

  .hero-image-frame {
    border-width: 7px;
    border-radius: 43% 43% 22px 22px;
  }

  .hero-note {
    right: -28px;
    bottom: 18px;
    left: auto;
    padding: 11px 13px;
    font-size: 0.68rem;
  }

  .hero-note svg {
    width: 24px;
    height: 24px;
  }

  h2 {
    font-size: clamp(2.45rem, 12vw, 3.5rem);
  }

  .section-heading {
    margin-bottom: 32px;
  }

  .gallery-filters {
    flex-wrap: nowrap;
    margin-right: -16px;
    margin-left: -16px;
    padding: 2px 16px 9px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-padding-inline: 16px;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 38px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 38px), transparent 100%);
  }

  .gallery-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-button {
    flex: 0 0 auto;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-card-copy {
    padding: 19px;
  }

  .gallery-card h3 {
    font-size: 1.65rem;
  }

  .gallery-cta {
    margin-top: 54px;
    padding: 29px 24px;
    border-radius: 22px;
  }

  .gallery-cta .button {
    width: 100%;
  }

  .about-visual {
    min-height: 490px;
  }

  .about-image {
    border-width: 5px;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .benefit-card {
    min-height: 0;
    padding: 24px;
  }

  .benefit-icon {
    margin-bottom: 19px;
  }

  .steps-list {
    grid-template-columns: 1fr;
  }

  .step-card,
  .step-card:nth-child(3),
  .step-card:nth-child(4) {
    min-height: 0;
    padding: 26px 10px;
    border-top: 1px solid var(--border-strong);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .step-card:last-child {
    border-bottom: 1px solid var(--border-strong);
  }

  .step-number {
    margin-bottom: 22px;
  }

  .steps-action .button {
    width: 100%;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .review-card,
  .review-card:last-child {
    min-height: 0;
    grid-column: auto;
    padding: 26px 24px;
  }

  .review-card blockquote {
    margin: 0;
  }

  .review-card blockquote p {
    font-size: 1.42rem;
  }

  .faq-layout {
    gap: 34px;
  }

  .faq-item summary {
    min-height: 74px;
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 14px;
    padding: 18px 0;
    font-size: 1.3rem;
  }

  .faq-toggle {
    width: 32px;
    height: 32px;
  }

  .faq-answer {
    padding: 0 46px 23px 0;
  }

  .location {
    padding-top: 12px;
  }

  .location-card {
    width: calc(100% - 32px);
    border-radius: 24px;
  }

  .location-content {
    padding: 34px 24px;
  }

  .location-address strong {
    font-size: 1.55em;
  }

  .location-actions {
    flex-direction: column;
  }

  .location-actions .button {
    width: 100%;
  }

  .location-map,
  .location-map iframe {
    min-height: 360px;
  }

  .location-map-badge {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: 310px;
    padding: 10px 12px;
  }

  .contacts-card {
    padding: 30px 24px;
    border-radius: 24px;
  }

  .contacts-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding-top: 62px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-bottom: 48px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .mobile-cta {
    position: fixed;
    z-index: 950;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(233, 221, 223, 0.9);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 -8px 30px rgba(61, 39, 47, 0.1);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    transition: transform 200ms ease, opacity 200ms ease;
  }

  .mobile-cta.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(110%);
  }

  .mobile-cta .button {
    width: 100%;
  }

  .toast {
    right: 16px;
    bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .lightbox {
    width: calc(100vw - 20px);
    height: calc(100svh - 20px);
  }

  .lightbox-shell {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    border-radius: 20px;
  }

  .lightbox-info {
    max-height: 37svh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 20px;
    overflow: auto;
    padding: 21px;
  }

  .lightbox-info h2 {
    margin-bottom: 7px;
    font-size: 1.9rem;
  }

  .lightbox-info p {
    font-size: 0.84rem;
  }

  .lightbox-count {
    margin-bottom: 8px;
  }

  .lightbox-info .button {
    min-width: 170px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .info-modal-card {
    max-height: calc(100svh - 32px);
    overflow: auto;
    padding: 42px 24px 28px;
  }

  .inner-back-link {
    min-height: 44px;
    padding-inline: 15px;
    font-size: 0.78rem;
  }

  .inner-back-link svg {
    display: none;
  }

  .legal-page {
    padding: calc(var(--header-height) + 48px) 0 72px;
  }

  .legal-hero h1 {
    font-size: clamp(2.55rem, 12vw, 4rem);
  }

  .legal-content {
    padding: 30px 23px;
    border-radius: 22px;
  }

  .legal-content section + section {
    margin-top: 32px;
    padding-top: 32px;
  }

  .simple-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .error-page {
    min-height: auto;
    padding: calc(var(--header-height) + 58px) 0 70px;
  }

  .error-layout {
    gap: 48px;
  }

  .error-code {
    top: -90px;
    left: -8px;
    font-size: 11rem;
  }

  .error-copy h1 {
    font-size: clamp(3.45rem, 17vw, 5.1rem);
  }

  .error-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .error-actions .button {
    width: 100%;
  }

  .error-address {
    padding: 31px 25px;
    border-radius: 23px;
  }
}

@media (min-width: 390px) and (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .gallery-card-copy {
    padding: 15px 13px 17px;
  }

  .gallery-category {
    margin-bottom: 8px;
    padding: 4px 7px;
    font-size: 0.68rem;
    letter-spacing: 0.025em;
  }

  .gallery-card h3 {
    font-size: 1.25rem;
    line-height: 1.06;
  }

  .gallery-card p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.84rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .gallery-zoom {
    top: 9px;
    right: 9px;
    width: 39px;
    height: 39px;
  }
}

@media (max-width: 560px) {
  .brand-copy strong {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-orbit-one {
    right: -20%;
  }

  .hero-note {
    display: none;
  }

  .about-visual {
    min-height: 430px;
  }

  .about-image-main {
    width: 72%;
  }

  .about-image-small {
    width: 48%;
  }

  .lightbox-info {
    grid-template-columns: 1fr;
    max-height: 42svh;
  }

  .lightbox-info .button {
    width: 100%;
  }
}

@media (max-width: 359px) {
  .container {
    width: calc(100% - 24px);
  }

  .brand {
    gap: 8px;
  }

  .brand-copy strong {
    max-width: 170px;
    font-size: 0.88rem;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
  }

  .hero h1 {
    font-size: 2.92rem;
  }

  .hero-address {
    font-size: 0.9rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .location-card {
    width: calc(100% - 24px);
  }

  .info-modal {
    width: calc(100vw - 20px);
  }
}
