@media (max-width: 1120px) {
    .service-grid,
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .header-cta {
        display: none;
    }
}

@media (max-width: 900px) {
    body {
        padding-bottom: calc(74px + env(safe-area-inset-bottom));
    }

    .topbar__inner {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px 16px;
        padding: 7px 0;
    }

    .header-main {
        min-height: 72px;
    }

    .site-logo {
        width: 176px;
        height: 52px;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 1002;
        width: min(86vw, 360px);
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        padding: 0 20px 24px;
        background: var(--light-color);
        border-left: 1px solid var(--border-color);
        box-shadow: var(--shadow);
        transform: translateX(100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform .24s ease;
        overflow-y: auto;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .main-nav.is-open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        z-index: 1001;
        display: block;
        background: rgba(7, 17, 27, .56);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .22s ease, visibility .22s ease;
    }

    .mobile-menu-overlay.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-nav-head {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        min-height: 78px;
        margin: 0 -20px 10px;
        padding: 14px 16px 12px 20px;
        background: var(--light-color);
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-nav-logo {
        display: inline-flex;
        width: min(190px, calc(100% - 58px));
        height: 52px;
        align-items: center;
    }

    .mobile-nav-logo__img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .mobile-nav-close {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--border-color);
        background: var(--muted-color);
        color: var(--primary-color);
        border-radius: 4px;
    }

    .mobile-nav-close:hover,
    .mobile-nav-close:focus-visible {
        border-color: var(--accent-color);
        color: var(--accent-color);
        background: var(--light-color);
    }

    .mobile-nav-close svg {
        width: 22px;
        height: 22px;
        fill: currentColor;
    }

    .main-nav ul {
        align-items: stretch;
        flex-direction: column;
        gap: 2px;
        width: 100%;
        min-width: 0;
    }

    .main-nav a {
        min-height: 46px;
        padding: 11px 0;
        border-bottom: 1px solid var(--border-color);
        font-weight: 600;
        overflow-wrap: anywhere;
    }

    .has-dropdown {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px;
        align-items: center;
        min-width: 0;
    }

    .has-dropdown > a {
        grid-column: 1;
    }

    .dropdown-toggle {
        display: inline-flex;
        grid-column: 2;
        width: 38px;
        height: 38px;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--border-color);
        background: var(--muted-color);
        border-radius: 4px;
    }

    .dropdown-toggle span {
        width: 10px;
        height: 10px;
        border-right: 2px solid var(--primary-color);
        border-bottom: 2px solid var(--primary-color);
        transform: rotate(45deg) translateY(-2px);
        transition: transform .18s ease;
    }

    .has-dropdown.is-open .dropdown-toggle span {
        transform: rotate(225deg) translate(-2px, -2px);
    }

    .dropdown {
        position: static;
        grid-column: 1 / -1;
        display: none !important;
        min-width: 0;
        width: 100%;
        padding: 2px 0 8px 12px !important;
        border: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
    }

    .has-dropdown.is-open .dropdown {
        display: grid !important;
    }

    .hero-slider,
    .hero-slide__content {
        min-height: 620px;
    }

    .slider-arrow {
        display: none;
    }

    .split-grid,
    .contact-grid,
    .contact-grid--wide,
    .detail-layout,
    .cta-band__inner {
        grid-template-columns: 1fr;
    }

    .cta-band__inner {
        display: grid;
    }

    .cta-band__actions {
        justify-content: flex-start;
    }

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

    .brand-card {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .detail-sidebar {
        position: static;
    }

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

    .fixed-contact {
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        max-width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        background: var(--light-color);
        border-top: 1px solid var(--border-color);
        padding: 8px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
        box-sizing: border-box;
    }

    .fixed-contact__item {
        width: auto;
        min-width: 0;
        height: 52px;
        border-radius: 5px;
        gap: 8px;
        padding-inline: 8px;
    }

    .fixed-contact__item span {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        padding: 0;
        background: transparent;
        color: inherit;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 620px) {
    .container,
    .narrow {
        width: min(100% - 28px, var(--container));
    }

    .topbar {
        display: none;
    }

    .hero-slider,
    .hero-slide__content {
        min-height: 560px;
    }

    .hero-slide__content h1,
    .hero-slide__content h2 {
        font-size: clamp(2rem, 8vw, 2.55rem);
        line-height: 1.1;
        letter-spacing: -0.02em;
        overflow-wrap: normal;
    }

    .hero-slide__content p,
    .page-hero p {
        font-size: 16px;
    }

    .hero-actions,
    .contact-actions,
    .cta-band__actions {
        width: 100%;
        align-items: stretch;
    }

    .hero-actions .btn,
    .contact-actions .btn,
    .cta-band__actions .btn {
        width: 100%;
    }

    .section {
        padding: 64px 0;
    }

    .section-title h2,
    .split-content h2,
    .contact-info h2,
    .form-panel h2,
    .detail-main h2,
    .cta-band h2 {
        font-size: 28px;
    }

    .why-grid,
    .three-grid,
    .service-grid,
    .gallery-grid,
    .brand-grid,
    .form-grid,
    .process-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .brand-card {
        padding: 22px;
    }

    .brand-card__logo {
        height: 96px;
    }

    .media-frame,
    .media-frame img,
    .media-frame .image-placeholder {
        min-height: 300px;
    }

    .service-card__media,
    .gallery-card__media {
        height: 190px;
    }

    .service-card__brands {
        top: 14px;
        left: 14px;
        gap: 8px;
    }

    .service-card__brands .service-card__brand-img {
        height: 26px;
        max-width: 64px;
    }

    .page-hero {
        padding: 58px 0;
    }

    .lightbox {
        padding: 72px 14px;
    }

    .lightbox__nav {
        top: auto;
        bottom: 18px;
    }

    .lightbox__content,
    .lightbox__content .image-placeholder {
        min-height: 300px;
    }

    .footer-logo {
        width: 190px;
        height: 62px;
    }
}

@media (max-width: 360px) {
    .site-logo {
        width: 150px;
    }

    .hero-slide__content h1,
    .hero-slide__content h2 {
        font-size: 30px;
        line-height: 1.12;
    }

    .btn {
        padding-inline: 12px;
    }
}
