/* Shared responsive layer for the fluid YOPT layout. */
html {
    overflow-x: clip;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 0;
    overflow-wrap: break-word;
}

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

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

.catalog-layout,
.catalog-main {
    min-width: 0;
    max-width: 100%;
}

.catalog-category-box a {
    overflow-wrap: anywhere;
}

.site-mobile-menu summary {
    list-style: none;
}

.site-mobile-menu summary::-webkit-details-marker {
    display: none;
}

.site-mobile-menu[open] .site-mobile-menu-icon {
    transform: rotate(90deg);
}

@media (max-width: 767px) {
    body {
        overflow-x: hidden;
    }

    .site-header-inner {
        height: 4rem;
        padding-inline: 1.25rem !important;
    }

    .site-header-logo {
        font-size: 1.125rem !important;
    }

    .site-mobile-action,
    .site-mobile-menu summary {
        display: inline-flex;
        width: 2.75rem;
        height: 2.75rem;
        align-items: center;
        justify-content: center;
        border-radius: .5rem;
        color: #0f172a;
        transition: background-color .2s ease, transform .2s ease;
    }

    .site-mobile-action:active,
    .site-mobile-menu summary:active {
        background: #f0edef;
    }

    .site-mobile-menu-panel {
        position: absolute;
        inset: 4rem 0 auto;
        z-index: 60;
        display: grid;
        gap: .25rem;
        padding: .75rem 1.25rem 1.25rem;
        border-top: 1px solid rgba(148, 163, 184, .2);
        border-bottom: 1px solid rgba(148, 163, 184, .3);
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 18px 35px rgba(15, 23, 42, .12);
        backdrop-filter: blur(18px);
    }

    .site-mobile-menu-panel a {
        display: flex;
        min-height: 3rem;
        align-items: center;
        justify-content: space-between;
        border-radius: .5rem;
        padding: .7rem .85rem;
        color: #334155;
        font-size: .9375rem;
        font-weight: 700;
        text-decoration: none;
    }

    .site-mobile-menu-panel a[aria-current="page"],
    .site-mobile-menu-panel a:active {
        background: #ccfbf1;
        color: #0f766e;
    }

    main.max-w-7xl,
    main.max-w-6xl,
    main.max-w-5xl,
    main.max-w-4xl {
        width: 100%;
        padding-inline: clamp(1.125rem, 5vw, 1.5rem) !important;
    }

    main.max-w-7xl {
        padding-top: 2.5rem !important;
        padding-bottom: 3.5rem !important;
    }

    main h1 {
        max-width: 100%;
        font-size: clamp(2.25rem, 11vw, 3.25rem) !important;
        line-height: 1 !important;
        letter-spacing: -.04em !important;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .home-hero-title {
        font-size: clamp(2.125rem, 8.8vw, 2.75rem) !important;
        line-height: 1.02 !important;
    }

    main h2 {
        overflow-wrap: anywhere;
    }

    main p,
    main li {
        line-height: 1.65;
    }

    .mobile-compact-section {
        margin-bottom: 3.5rem !important;
    }

    .mobile-section-stack {
        gap: 3.5rem !important;
    }

    .mobile-search-row {
        min-width: 0;
        padding: .375rem !important;
    }

    .mobile-search-row input {
        min-width: 0;
        padding-block: .75rem !important;
        font-size: 1rem !important;
    }

    .mobile-search-row .material-symbols-outlined {
        padding-inline: .65rem !important;
    }

    .mobile-search-row a {
        min-height: 2.75rem;
        padding: .75rem 1rem !important;
    }

    .catalog-layout {
        display: block !important;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .catalog-main {
        width: 100%;
        min-width: 0;
        padding: 2rem clamp(1.125rem, 5vw, 1.5rem) 3.5rem !important;
    }

    .catalog-main > header,
    .catalog-main > section,
    .catalog-main > div {
        min-width: 0;
        max-width: 100%;
    }

    .catalog-breadcrumbs {
        flex-wrap: wrap;
        row-gap: .35rem;
    }

    .catalog-category-box {
        padding: 1.25rem !important;
    }

    .catalog-card {
        gap: 1.25rem !important;
        padding: 1.25rem !important;
        border-radius: .75rem;
    }

    .catalog-card > a {
        height: auto !important;
        aspect-ratio: 16 / 9;
        border-radius: .5rem;
    }

    .catalog-card-title-row {
        flex-direction: column;
        gap: .5rem !important;
    }

    .catalog-card-title-row > div:first-child {
        min-width: 0;
    }

    .catalog-card-title-row h3 {
        overflow-wrap: anywhere;
    }

    .company-content-grid {
        padding: 3.5rem clamp(1.125rem, 5vw, 1.5rem) !important;
        gap: 3rem !important;
    }

    .company-content-main {
        gap: 3.5rem !important;
    }

    .company-mobile-logo {
        display: flex;
        min-height: 8rem;
        align-items: center;
        justify-content: center;
        margin-bottom: 1.75rem;
        padding: 1rem;
        border: 1px solid rgba(179, 177, 180, .25);
        border-radius: .75rem;
        background: #fff;
    }

    .company-mobile-logo img {
        width: auto;
        max-width: 100%;
        max-height: 9rem;
        object-fit: contain;
    }

    .company-services-card {
        padding: 1.25rem !important;
    }

    .company-gallery {
        display: grid !important;
        grid-template-columns: none !important;
        grid-auto-flow: column;
        grid-auto-columns: min(82vw, 19rem);
        gap: .75rem !important;
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: .5rem;
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .company-gallery > * {
        scroll-snap-align: start;
    }

    .company-contact-card {
        position: static !important;
        padding: 1.25rem !important;
    }

    .company-similar-mobile {
        grid-column: 1 / -1;
        width: 100%;
        padding-top: .5rem;
    }

    #catalog-results > div:first-child {
        width: 100%;
        align-items: flex-start;
        gap: .75rem !important;
    }

    #catalog-results > div:first-child > span {
        padding-top: .2rem;
    }

    form input,
    form select,
    form textarea {
        min-height: 3rem;
        font-size: 1rem !important;
    }

    form button,
    main > a,
    nav[aria-label="Пагинация"] a {
        min-height: 2.75rem;
    }

    .wysiwyg,
    .page-content {
        font-size: 1rem !important;
        line-height: 1.75 !important;
    }

    .wysiwyg table,
    .page-content table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .site-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 2.5rem 1.25rem !important;
        padding: 2.75rem 1.25rem !important;
    }

    .site-footer-brand {
        grid-column: 1 / -1;
        gap: 1rem !important;
        order: 99;
        padding-top: .5rem;
        border-top: 1px solid rgba(148, 163, 184, .25);
    }

    .site-footer-brand p {
        max-width: 32rem;
    }

    .site-footer-grid h4 {
        margin-bottom: 1rem !important;
        line-height: 1.35;
    }

    .site-footer-grid ul {
        display: grid;
        gap: .25rem !important;
    }

    .site-footer-grid li a {
        display: inline-flex;
        min-height: 2.75rem;
        align-items: center;
        line-height: 1.35;
    }
}

@media (max-width: 339px) {
    .site-footer-grid {
        grid-template-columns: 1fr !important;
    }

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

@media (pointer: coarse) {
    a,
    button,
    summary,
    input,
    select {
        touch-action: manipulation;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
