/* Presentation layer for imported pages. The client-approved Pasy layout is excluded. */
.subpage-main:not(.page-pasy-mocowania-wozka) .subpage-hero { min-height: 0; }
.subpage-main:not(.page-pasy-mocowania-wozka) .subpage-hero-inner { padding-block: 28px 30px; }
.subpage-main:not(.page-pasy-mocowania-wozka) .subpage-title {
    font-size: clamp(30px, 3.2vw, 44px);
    line-height: 1.12;
    letter-spacing: -.035em;
}
.subpage-main:not(.page-pasy-mocowania-wozka) .breadcrumbs { margin-bottom: 14px; }
.subpage-main:not(.page-pasy-mocowania-wozka) .page-layout.one-column { padding-block: 32px 72px; }
.subpage-main:not(.page-pasy-mocowania-wozka) .wpb-content-wrapper { gap: clamp(28px, 4vw, 48px); }
.ux-product-page .subpage-hero-inner { display: grid; grid-template-columns: 1fr auto; gap: 0 32px; align-items: center; }
.ux-product-page .breadcrumbs { grid-column: 1 / -1; }
.ux-product-page .subpage-title { max-width: 30ch; }
.ux-contact-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.ux-contact-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font-size: 15px; font-weight: 700; }
.ux-contact-phone { color: #fff; text-decoration: underline; text-underline-offset: 5px; }
.ux-contact-button { gap: 24px; padding: 10px 20px; border-radius: 9px; background: #c22930; color: #fff; }
.ux-contact-button:hover { background: #a81e25; }
.ux-contact-links a:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

.legacy-content .imported-row.ux-product-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 32px;
    padding: clamp(22px, 3vw, 36px);
    overflow: visible;
    border: 1px solid #e5e2dd;
    border-radius: 18px;
    background: #fff;
    box-shadow: none;
    align-items: center;
}
.legacy-content .ux-product-intro > .ux-product-lead { min-width: 0; }
.legacy-content .ux-product-intro .ux-product-lead > :is(h1, h2, h3) {
    max-width: 24ch;
    margin: 0 0 18px;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.12;
    text-align: left;
    text-wrap: balance;
}
.legacy-content .ux-product-intro .ux-product-lead > .wa-uppercase-tag {
    max-width: none; margin-bottom: 14px; font-size: 11px; line-height: 1.5;
}
.legacy-content .ux-product-lead p { margin: 0; max-width: 62ch; }
.legacy-content .ux-product-lead p, .legacy-content .ux-product-lead p span { font-size: 17px !important; line-height: 1.65; }
.legacy-content .imported-row.ux-product-intro > .ux-product-media {
    grid-column: 2; order: 0; width: 100%; height: auto; padding: 0; align-self: start;
}
.legacy-content .imported-row.ux-product-intro > .ux-product-media .imported-media {
    height: auto; aspect-ratio: 4 / 3; border-radius: 12px; background: #f5f3ef;
}
.legacy-content .imported-row.ux-product-intro > .ux-product-media .imported-media img {
    width: 100%; height: 100%; min-height: 0; max-height: none; object-fit: contain;
}
.legacy-content .ux-product-media > p { margin: 16px 0 0; }
.legacy-content .imported-row.ux-product-intro > .ux-product-copy {
    grid-column: 1 / -1; padding: 28px 0 0; border-top: 1px solid #e7e4df;
}
.legacy-content .imported-row.ux-product-intro > .ux-product-copy > * { max-width: 76ch; margin-inline: auto; }
.legacy-content .ux-product-copy .imported-text:empty { display: none; }
.ux-product-page .legacy-content .imported-row.is-image-only-section .imported-media { height: clamp(230px, 26vw, 360px); }
.ux-product-page .legacy-content .is-heading-section :is(h1, h2) { font-size: clamp(26px, 3vw, 38px); line-height: 1.2; }
.ux-product-page .legacy-content .is-first-section > .imported-column > .imported-video { width: 100%; max-width: 760px; margin-inline: auto; }

/* Rampy: the three benefits belong to the full-width section, not a narrow prose column. */
.page-rampy .legacy-content .ux-product-intro > .ux-product-copy {
    display: grid;
    gap: 28px;
}
.page-rampy .legacy-content .ux-product-intro > .ux-product-copy > * {
    width: 100%;
    max-width: none;
    margin: 0;
}
.page-rampy .legacy-content .ux-product-copy > .imported-text:not(:has(*)) { display: none; }
.page-rampy .legacy-content .ux-product-copy .wa-bullets ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
}
.page-rampy .legacy-content .ux-product-copy .wa-bullets li {
    padding: 22px;
    border-top-width: 2px;
    background: #f8f7f4;
    box-shadow: none;
}
@media (max-width: 900px) {
    .page-rampy .legacy-content .ux-product-copy .wa-bullets ul { grid-template-columns: minmax(0, 1fr); }
}

/* Model names lead to model pages; thumbnails retain their separate lightbox action. */
.page-lista-aut-do-adaptacji .legacy-content .imported-row.ux-model-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 0;
    background: transparent; border: 0; box-shadow: none;
}
.page-lista-aut-do-adaptacji .legacy-content .ux-model-grid > .ux-model-card {
    grid-column: auto; min-width: 0; padding: 14px; border: 1px solid #e3e1dd;
    border-radius: 14px; background: #fff; height: 100%;
}
.page-lista-aut-do-adaptacji .ux-model-card .hr_gap { display: none; }
.page-lista-aut-do-adaptacji .legacy-content .ux-model-card .imported-media {
    aspect-ratio: 3 / 2; margin: 0; height: auto; border-radius: 9px; background: #f3f2ef;
}
.page-lista-aut-do-adaptacji .legacy-content .ux-model-card img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.page-lista-aut-do-adaptacji .legacy-content .ux-model-card h3 { margin: 16px 0 4px; font-size: 18px; line-height: 1.45; text-align: left; }
.page-lista-aut-do-adaptacji .ux-model-card h3 a { display: block; color: inherit; text-decoration: underline; text-decoration-color: #be3035; text-underline-offset: 4px; }
.page-lista-aut-do-adaptacji .ux-model-card h3 a:focus-visible { outline: 3px solid #bd2930; outline-offset: 4px; }
.page-lista-aut-do-adaptacji .legacy-content .is-inline-media-section > .imported-column { grid-template-columns: minmax(0, 1fr) minmax(180px, .5fr); }
.page-lista-aut-do-adaptacji .legacy-content .is-inline-media-section .section-copy { padding: 28px; }
.page-lista-aut-do-adaptacji .legacy-content .is-inline-media-section .section-copy p { font-size: 20px; line-height: 1.6; }
.page-lista-aut-do-adaptacji .section-copy br { display: none; }
.page-lista-aut-do-adaptacji .legacy-content .is-inline-media-section .imported-media,
.page-lista-aut-do-adaptacji .legacy-content .is-inline-media-section .imported-media img { min-height: 0; height: 220px; object-fit: contain; background: #fff; }
.ux-model-filter { display: flex; justify-content: flex-end; }
.ux-model-filter select { width: min(100%, 320px); min-height: 48px; padding: 12px 16px; border: 1px solid #c9c5be; border-radius: 8px; background: #fff; color: #202528; font: inherit; }
/* Native gallery picker with a wrapping face: long model names must stay fully visible. */
.ux-gallery-select { position: relative; width: min(100%, 760px); min-width: 0; }
.ux-gallery-select select {
    position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
    min-width: 0; margin: 0; opacity: 0; cursor: pointer; font-size: 16px;
}
.ux-gallery-select-value {
    display: block; min-height: 48px; padding: 13px 48px 13px 16px;
    border: 1px solid #c9c5be; border-radius: 8px; background: #fff; color: #202528;
    font-size: 16px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere;
    pointer-events: none;
}
.ux-gallery-select::after {
    content: ''; position: absolute; top: 50%; right: 20px; width: 8px; height: 8px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: translateY(-75%) rotate(45deg); pointer-events: none;
}
.ux-gallery-select select:hover + .ux-gallery-select-value { border-color: #b82a30; }
.ux-gallery-select select:focus-visible + .ux-gallery-select-value { outline: 3px solid #bd2930; outline-offset: 3px; }
.ux-model-card[hidden], .ux-model-grid[hidden], .ux-model-group-empty { display: none !important; }

/* Gallery buttons are progressive enhancement: native scrolling remains available without JS. */
.ux-gallery-shell { position: relative; min-width: 0; width: 100%; grid-column: 1 / -1; }
.ux-gallery-shell { scroll-margin-top: 120px; margin-bottom: 28px; }
.ux-gallery-shell:last-child { margin-bottom: 0; }
.subpage-main:not(.page-pasy-mocowania-wozka) .legacy-content .has-gallery > .imported-column > .imported-separator { display: none; }
.subpage-main:not(.page-pasy-mocowania-wozka) .legacy-content .has-gallery > .imported-column > h2 { margin: 0 0 14px; font-size: 28px; line-height: 1.25; text-align: left; }
.subpage-main:not(.page-pasy-mocowania-wozka) .legacy-content .has-gallery > .imported-column > p.align-center { text-align: left; font-size: 18px; line-height: 1.5; }
.ux-gallery-controls { display: flex; justify-content: flex-end; gap: 8px; margin: 0 0 12px; }
.ux-gallery-controls button {
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 1px solid #d3d0ca; border-radius: 50%; background: #fff; color: #242a2d; cursor: pointer;
}
.ux-gallery-controls button:disabled { opacity: .32; cursor: default; }
.ux-gallery-controls button:hover:not(:disabled) { border-color: #b82a30; color: #b82a30; }
.ux-gallery-controls svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ux-gallery-controls button:focus-visible, .ux-model-filter select:focus-visible { outline: 3px solid #bd2930; outline-offset: 3px; }
.legacy-content .ux-gallery-shell .imported-gallery { margin: 0; }
.legacy-content .ux-gallery-shell .imported-gallery.is-scroll-gallery .imported-media { flex-basis: min(310px, 72vw); }
.legacy-content .ux-gallery-shell .imported-gallery.is-scroll-gallery img { width: 100%; height: 100%; min-height: 0; object-fit: contain; background: #efede8; }
.ux-gallery-shell .imported-gallery:focus-visible { outline: 3px solid #bd2930; outline-offset: 3px; }
.legacy-content .is-generated-gallery-section .ux-gallery-shell { grid-column: auto; }

/* Comparison tables reflow by parameter on small screens; every value remains visible. */
.legacy-content table.ux-table { width: 100%; min-width: 0; max-width: 100%; }
.legacy-content .ux-table :is(th, td) { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.legacy-content .ux-table tbody th { color: #202528; background: #fff; text-align: left; font-size: 14px; font-weight: 700; }
.ux-table-cell-label { display: none; }
@media (max-width: 900px) {
    .legacy-content .imported-row.is-comparison-section .wa-table-container { border: 0; border-radius: 0; }
    .legacy-content table.ux-table-comparison { display: block; border: 0; background: transparent; }
    .legacy-content .ux-table-comparison :is(thead, thead tr) { display: block; }
    .legacy-content .ux-table.ux-table-comparison thead th:first-child {
        display: block; padding: 0 0 16px; border: 0; background: transparent;
        color: #202528 !important; font-size: 16px; text-align: left;
    }
    /* Column labels move next to each value visually; native header associations remain. */
    .legacy-content .ux-table-comparison thead th:not(:first-child) {
        position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
        overflow: hidden; clip-path: inset(50%); white-space: nowrap;
    }
    .legacy-content .ux-table-comparison tbody { display: grid; gap: 16px; width: 100%; }
    .legacy-content .ux-table-comparison tbody tr {
        display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
        border: 1px solid #dedbd5; border-radius: 12px; background: #fff;
    }
    .legacy-content .ux-table.ux-table-comparison tbody :is(th, td) {
        display: block; width: auto; height: auto; min-width: 0; margin: 0; padding: 16px;
        border: 0; background: transparent; color: #202528; text-align: left; font-size: 16px; line-height: 1.5;
    }
    .legacy-content .ux-table.ux-table-comparison tbody th {
        grid-column: 1 / -1; border-bottom: 1px solid #dedbd5; border-radius: 11px 11px 0 0; background: #f5f3ef;
    }
    .legacy-content .ux-table.ux-table-comparison tbody td + td { border-left: 1px solid #dedbd5; }
    .legacy-content .ux-table-comparison .ux-table-cell-label {
        display: block; margin-bottom: 8px; font-size: 13px; line-height: 1.5; font-weight: 700; color: #535b60;
    }
}
@media (max-width: 540px) {
    .legacy-content .ux-table-comparison tbody tr { grid-template-columns: minmax(0, 1fr); }
    .legacy-content .ux-table.ux-table-comparison tbody td + td { border-left: 0; border-top: 1px solid #e9e6e0; }
}

/* Reuse the existing contact details; do not replace the disputed street number. */
.page-kontakt .legacy-content .is-first-section { align-items: start; gap: 36px; padding: 32px; border-radius: 18px; box-shadow: none; }
.page-kontakt .legacy-content .is-first-section > .imported-column { justify-content: start; padding: 0; }
.page-kontakt .legacy-content .is-first-section > .ux-contact-summary { grid-column: 1; grid-row: 1; }
.page-kontakt .legacy-content .is-first-section > .ux-contact-details { grid-column: 1; grid-row: 2; }
.page-kontakt .legacy-content .is-first-section > .ux-contact-fields { grid-column: 2; grid-row: 1 / 3; }
.page-kontakt .legacy-content .ux-contact-summary .ux-contact-person { margin: 0; }
.page-kontakt .legacy-content .is-first-section .imported-text { width: 100%; }
.page-kontakt .legacy-content address { font-style: normal; font-size: 16px; line-height: 1.65; margin: 0 0 8px; }
.page-kontakt .legacy-content address:has(img) { margin: 24px 0 20px; }
.page-kontakt .legacy-content address img { width: 165px; height: auto; max-height: 68px; object-fit: contain; }
.page-kontakt .legacy-content address:not(:has(img, a, strong)):empty { display: none; }
.page-kontakt .legacy-content .ux-contact-person { padding: 22px; border: 1px solid #dedbd5; border-radius: 12px; background: #f5f3ef; margin-bottom: 22px; }
.page-kontakt .ux-contact-person a { display: inline-flex; align-items: center; min-height: 44px; font-size: 18px; font-weight: 700; }
.page-kontakt .legacy-content .ux-contact-summary.has-facebook { padding: 22px; border: 1px solid #dedbd5; border-radius: 12px; background: #f5f3ef; }
.page-kontakt .legacy-content .ux-contact-summary.has-facebook .ux-contact-person { padding: 0; border: 0; border-radius: 0; background: transparent; }
.page-kontakt .legacy-content .ux-contact-social { margin: 8px 0 0; font-size: 0; line-height: 0; }
.page-kontakt .ux-contact-social > :not(a) { display: none; }
.page-kontakt .ux-contact-social .ux-facebook-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #1877f2; color: #fff; font-size: 0; line-height: 0; text-decoration: none; }
.page-kontakt .ux-facebook-link::before { content: ''; width: 24px; height: 24px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.5 21v-8.2h2.8l.4-3.2h-3.2v-2c0-.9.3-1.5 1.6-1.5h1.7V3.2c-.3 0-1.3-.2-2.5-.2-2.5 0-4.2 1.5-4.2 4.4v2.2H7.3v3.2h2.8V21z'/%3E%3C/svg%3E") center / contain no-repeat; }
.page-kontakt .ux-facebook-link:hover { background: #0866d9; }
.page-kontakt .ux-facebook-link:focus-visible { outline: 3px solid #0c4184; outline-offset: 4px; }
@media (max-width: 540px) { .page-kontakt .legacy-content .ux-contact-summary.has-facebook { padding: 18px; } }
.page-kontakt .legacy-content .is-first-section h2 { margin: 0 0 24px; font-size: 24px; line-height: 1.3; text-align: left; }
.page-kontakt .legacy-content .imported-contact-form { gap: 16px; margin: 0; }
.page-kontakt .legacy-content .imported-contact-form p { margin: 0; }
.page-kontakt .legacy-content .imported-contact-form p:has(textarea, [type="submit"]) { grid-column: 1 / -1; }
.page-kontakt .legacy-content .imported-contact-form :is(input, textarea) { font-size: 16px; }
.page-kontakt .legacy-content .imported-contact-form textarea { min-height: 140px; }
.ux-form-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ux-form-feedback { grid-column: 1 / -1; padding: 18px; border: 1px solid #c9c5be; border-radius: 10px; background: #f5f3ef; color: #202528; font-size: 16px; line-height: 1.6; scroll-margin-top: 120px; }
.ux-form-feedback[hidden] { display: none; }
.ux-form-feedback[data-success="true"] { border-color: #609776; background: #eff7f1; }
.imported-contact-form [type="submit"]:disabled { opacity: .6; cursor: wait; }
.ux-hub.page-layout.one-column { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ux-hub a { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 110px; padding: 24px; background: #fff; border: 1px solid #e1ddd6; border-radius: 14px; font-size: 20px; font-weight: 700; }
.ux-hub a span { color: #ba2930; }
.ux-hub a:focus-visible { outline: 3px solid #ba2930; outline-offset: 4px; }

/* Keep all homepage copy visible; reduce decoration, not readability. */
.home .service-image { aspect-ratio: 16 / 10; }
.home-guide-panel { padding: clamp(24px, 4vw, 48px); box-shadow: none; }
.home-guide-header, .home-guide-copy { max-width: 76ch; }
.home-guide-header h2 { max-width: 35ch; font-size: clamp(28px, 3vw, 38px); line-height: 1.2; }
.home-guide-copy { display: block; font-size: 17px; line-height: 1.7; }
.home-guide-copy p:first-child { max-width: none; font-size: 18px; }
.home-guide-copy p + p { margin-top: 24px; padding-top: 24px; }

@media (max-width: 900px) {
    .ux-product-page .subpage-hero-inner { grid-template-columns: 1fr; }
    .ux-contact-links { margin-top: 20px; }
    .legacy-content .imported-row.ux-product-intro { grid-template-columns: 1fr; gap: 24px; }
    .legacy-content .imported-row.ux-product-intro > .ux-product-media { grid-column: 1; }
    .legacy-content .imported-row.ux-product-intro > .ux-product-media .imported-media { max-height: 330px; aspect-ratio: 16 / 10; }
    .legacy-content .ux-product-intro .ux-product-lead > :is(h1, h2, h3) { max-width: 30ch; }
    .page-kontakt .legacy-content .is-first-section { grid-template-columns: 1fr; padding: 24px; gap: 32px; }
    .page-kontakt .legacy-content .is-first-section > .ux-contact-fields { grid-column: 1; grid-row: 2; }
    .page-kontakt .legacy-content .is-first-section > .ux-contact-details { grid-column: 1; grid-row: 3; }
    .page-lista-aut-do-adaptacji .legacy-content .imported-row.ux-model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 600px) {
    .subpage-main:not(.page-pasy-mocowania-wozka) .subpage-hero-inner { padding: 22px 20px; }
    .subpage-main:not(.page-pasy-mocowania-wozka) .page-layout.one-column { padding: 24px 20px 48px; }
    .legacy-content .imported-row.ux-product-intro { padding: 22px 18px; }
    .legacy-content .ux-product-lead p, .legacy-content .ux-product-lead p span { font-size: 16px !important; }
    .ux-contact-links { gap: 12px; justify-content: space-between; }
    .ux-contact-links a { font-size: 14px; }
    .page-lista-aut-do-adaptacji .legacy-content .ux-model-grid > .ux-model-card { padding: 9px; border-radius: 10px; }
    .page-lista-aut-do-adaptacji .legacy-content .ux-model-card h3 { margin-top: 12px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
    .page-lista-aut-do-adaptacji .legacy-content .is-inline-media-section > .imported-column { grid-template-columns: 1fr; }
    .page-lista-aut-do-adaptacji .legacy-content .is-inline-media-section .section-copy { padding: 22px; }
    .page-lista-aut-do-adaptacji .legacy-content .is-inline-media-section .section-copy p { font-size: 18px; }
    .page-lista-aut-do-adaptacji .legacy-content .is-inline-media-section .imported-media,
    .page-lista-aut-do-adaptacji .legacy-content .is-inline-media-section .imported-media img { height: 150px; }
    .page-kontakt .legacy-content .is-first-section { padding: 22px 18px; }
    .page-kontakt .legacy-content .ux-contact-person { padding: 18px; }
    .page-kontakt .ux-contact-person a { font-size: 17px; }
    .ux-hub.page-layout.one-column { grid-template-columns: 1fr; }
    .home .hero-slider, .home .hero-slide-main { height: 560px; }
    .home .hero-slide-main .hero-copy { left: 20px; right: 20px; bottom: 90px; }
    .home .hero-slide-main .hero-copy h2 { font-size: clamp(32px, 9vw, 40px); }
    .home .contact-band .contact-links { order: -1; }
    .home .contact-band { gap: 24px; padding: 24px 20px; }
    .home .services { padding: 28px 20px; }
    .home .service-grid { gap: 16px; }
    .home .service-card { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 14px; padding: 16px; align-items: center; }
    .home .service-image { aspect-ratio: 1.15; height: auto; border-radius: 9px; }
    .home .service-body { display: contents; }
    .home .service-body h3 { font-size: 17px; line-height: 1.3; }
    .home .service-body p { grid-column: 1 / -1; margin: 0; font-size: 16px; line-height: 1.6; }
    .home-guide-copy { font-size: 16px; }
    .home-guide-copy p:first-child { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
    .ux-gallery-shell .imported-gallery { scroll-behavior: auto; }
}
