/* Shared responsive adjustments. Loaded after each page's existing styles. */

img,
video,
iframe {
    max-width: 100%;
}

main,
section,
header,
footer,
.container,
.container-fluid,
.row,
[class*="col-"] {
    min-width: 0;
}

@media (max-width: 1199px) {
    .hero-content {
        margin-left: 0;
    }

    .custom-hero-title {
        font-size: 64px !important;
    }

    .reviewSlider .swiper-slide {
        width: min(450px, 85vw) !important;
    }
}

@media (max-width: 991px) {
    .navbar .navbar-collapse {
        max-height: calc(100vh - 76px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .navbar .navbar-nav {
        padding-top: 10px;
    }

    .navbar .dropdown-menu .dropdown-menu {
        position: static;
        width: 100%;
        margin: 0;
        padding-left: 20px;
        border: 0;
        border-radius: 0;
    }

    .navbar .nav-right {
        align-items: stretch !important;
        flex-direction: column;
        padding: 8px 0 14px;
    }

    .navbar .btn-nav-cta {
        width: 100%;
        text-align: center;
    }

    .hero-section {
        min-height: 0;
    }

    .custom-hero-title {
        font-size: 52px !important;
        overflow-wrap: anywhere;
    }

    .custom--review-badge {
        max-width: 100%;
        white-space: normal;
    }

    .product-tabs-section {
        width: 100%;
    }

    .feature-box {
        border-right: 0;
    }

    .map-wrapper {
        height: auto;
    }

    .map-wrapper iframe {
        height: 420px;
    }

    .office-card {
        position: relative;
        inset: auto;
        transform: none;
        width: min(100% - 32px, 560px);
        margin: -50px auto 24px;
    }

    .process-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .process-item::after {
        display: none;
    }

    .reviewSlider .swiper-slide {
        width: min(450px, 80vw) !important;
    }
}

@media (max-width: 767px) {
    .container > .row.g-5,
    .container > .row.align-items-center.g-5 {
        margin-right: 0;
        margin-left: 0;
    }

    .custom-hero-title {
        font-size: 42px !important;
        line-height: 1.12 !important;
    }

    .custom-text {
        font-size: 22px;
    }

    .hero-section {
        background-position: center;
    }

    .hero-section .container > .row {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .hero-buttons {
        flex-wrap: wrap;
        gap: 12px;
    }

    .hero-buttons .btn {
        max-width: 100%;
    }

    .contact-section {
        padding: 64px 0;
    }

    .contact-title {
        font-size: 32px;
    }

    .feature-box {
        padding: 20px 12px;
    }

    .map-wrapper iframe {
        height: 340px;
    }

    .office-card {
        padding: 28px 24px;
    }

    .office-card h2 {
        font-size: 32px;
    }

    .coverage-guide-wrapper {
        padding: 56px 18px;
    }

    .product-tabs-section {
        width: 100%;
    }

    .product-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        overscroll-behavior-x: contain;
    }

    .product-tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .product-tab-pane,
    .product-tab-pane p {
        overflow-wrap: anywhere;
    }

    .pq-card,
    .faq-quote-wrapper,
    .showcase-wrapper {
        padding: 24px;
    }

    .pq-readout {
        flex-wrap: wrap;
    }

    .pq-readout .pq-box {
        min-width: min(100%, 140px);
    }

    .where-to-use-section .use-item {
        flex-wrap: wrap;
    }

    .where-to-use-section .use-img,
    .where-to-use-section .use-img img {
        max-width: 100%;
    }

    .backing-border-section .col-lg-6:first-child {
        border-right: 0;
        border-bottom: 0;
    }

    .backing-border-section .row.g-5.align-items-start > .col-lg-12:last-child .bb-box > .row > .col-4 {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    .process-wrapper {
        grid-template-columns: 1fr;
    }

    .table-responsive {
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive > table {
        min-width: 620px;
    }

    .footer-bottom {
        gap: 12px;
    }

    .payment-icons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
}

@media (max-width: 575px) {
    .container,
    .container-fluid {
        --bs-gutter-x: 1.5rem;
    }

    .custom-hero-title {
        font-size: 36px !important;
    }

    .custom-text {
        font-size: 19px;
    }

    .hero-subtitle,
    .hero-breadcrumb {
        overflow-wrap: anywhere;
    }

    .contact-title {
        font-size: 28px;
    }

    .contact-section .form-control,
    .contact-section .form-select,
    .faq-quote-section .form-control,
    .faq-quote-section .form-select {
        max-width: 100%;
    }

    .support-card {
        padding: 26px 20px;
    }

    .office-card {
        width: calc(100% - 24px);
        padding: 24px 20px;
    }

    .coverage-guide-wrapper {
        padding: 44px 14px;
    }

    .coverage-carousel-card img {
        height: 200px;
    }

    .backing-card,
    .choose-card,
    .process-card {
        min-width: 0;
    }

    .color-chart-grid {
        gap: 18px;
    }

    .swatch .chip {
        width: 96px;
        height: 96px;
    }

    .pq-readout .pq-box {
        flex-basis: 100%;
    }

    .footer-contact li,
    .footer-contact li span {
        overflow-wrap: anywhere;
    }

    .info-item > div:last-child {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 767px) {
    .hero-section::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 0;
        background: rgba(0, 0, 0, .24);
        pointer-events: none;
    }

    .hero-section > .container {
        position: relative;
        z-index: 1;
    }

    .hero-section .container > .row {
        margin-right: 0;
        margin-left: 0;
    }

    .hero-section .hero-content {
        width: 100%;
        text-align: left;
    }

    .hero-section .hero-content h1,
    .hero-section .hero-content h2,
    .hero-section .hero-content p,
    .hero-section .hero-content span,
    .hero-section .hero-content .hero-subtitle,
    .hero-section .hero-content .hero-description,
    .hero-section .hero-content .custom--review-badge,
    .hero-section .hero-content .custom--review-text {
        text-align: left;
    }

    .hero-section .hero-content .hero-feature-item {
        align-items: flex-start;
        text-align: left;
    }

    .hero-section .hero-content .hero-features,
    .hero-section .hero-content .hero-buttons,
    .hero-section .hero-content .hero-btns {
        justify-content: flex-start;
        align-items: flex-start;
    }

    .hero-section .hero-content .hero-buttons .btn,
    .hero-section .hero-content .hero-btns .btn {
        text-align: left;
        justify-content: flex-start;
    }

    #stats .stats-grid {
        width: 100%;
        max-width: none;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    #stats .stats-grid::-webkit-scrollbar {
        display: none;
    }

    #stats .stat-divider {
        display: none;
    }

    #stats .stat-item {
        flex: 0 0 50%;
        width: 50%;
        min-width: 50%;
        justify-content: center;
        scroll-snap-align: start;
    }

    .top-benefits-bar {
        display: flex !important;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        scrollbar-width: none;
    }

    .top-benefits-bar::-webkit-scrollbar {
        display: none;
    }

    .top-benefits-bar .top-benefit-item {
        flex: 0 0 50%;
        width: 50%;
        min-width: 50%;
        min-height: 54px;
        padding: 8px 10px;
        border-right: 1px solid rgba(255, 255, 255, .18);
        border-bottom: 0;
        scroll-snap-align: start;
    }

    .top-benefits-bar .top-benefit-item:nth-child(2n) {
        border-right: 1px solid rgba(255, 255, 255, .18);
    }

    .top-benefits-bar .top-benefit-item:last-child {
        border-right: 0;
    }

    .top-benefits-bar .top-benefit-item span {
        min-width: 0;
        text-align: center;
        overflow-wrap: anywhere;
    }

    .top-benefits-bar.top-benefits-marquee {
        display: block !important;
        overflow: hidden;
        padding: 0;
        scroll-snap-type: none;
        scroll-behavior: auto;
    }

    .top-benefits-track {
        display: flex;
        width: max-content;
        will-change: transform;
        animation: top-benefits-marquee 24s linear infinite;
    }

    .top-benefits-bar.top-benefits-marquee .top-benefit-item {
        flex: 0 0 var(--top-benefit-item-width, 50vw);
        width: var(--top-benefit-item-width, 50vw);
        min-width: var(--top-benefit-item-width, 50vw);
        min-height: 54px;
        padding: 8px 6px;
        gap: 6px;
        font-size: 10px;
        white-space: nowrap;
        scroll-snap-align: none;
    }

    .top-benefits-bar.top-benefits-marquee .top-benefit-item:nth-child(4n) {
        border-right: 0;
    }

    .top-benefits-bar.top-benefits-marquee .top-benefit-item i {
        flex: 0 0 auto;
        font-size: 14px;
    }

    .top-benefits-bar.top-benefits-marquee .top-benefit-item span {
        min-width: 0;
        white-space: nowrap;
        overflow-wrap: normal;
    }

    @keyframes top-benefits-marquee {
        to {
            transform: translate3d(-50%, 0, 0);
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .top-benefits-bar.top-benefits-marquee {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .top-benefits-bar.top-benefits-marquee .top-benefits-track {
            animation: none;
        }
    }
}

@media (max-width: 480px) {
    .custom-hero-title {
        font-size: 34px !important;
    }

    .hero-section {
        padding-top: 76px;
        padding-bottom: 32px;
    }

    .hero-section[style*="background-image"] {
        min-height: 0;
    }

    .hero-buttons .btn,
    .hero-btns .btn {
        width: 100%;
        min-width: 0;
    }

    .custom--review-text {
        overflow-wrap: anywhere;
    }

    .section-title,
    .cta-title {
        overflow-wrap: anywhere;
    }

    .gallery-badge {
        left: 12px;
        bottom: 12px;
        max-width: calc(100% - 24px);
        padding: 10px 14px;
        border-radius: 12px;
    }

    .pq-card,
    .faq-quote-wrapper,
    .showcase-wrapper {
        padding: 20px 16px;
    }

    .pq-head h3 {
        font-size: 20px;
    }

    .pq-note-top {
        margin-left: 0;
    }

    .product-tab {
        padding-right: 14px;
        padding-left: 14px;
    }

    .reviewSlider .swiper-slide {
        width: 86vw !important;
    }
}

@media (max-width: 374px) {
    .hero-title .text-primary-blue {
        overflow-wrap: anywhere;
    }

    .custom-hero-title {
        font-size: 30px !important;
    }

    .custom-text {
        font-size: 17px;
    }

    .hero-section {
        padding-top: 68px;
    }

    .hero-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .patch-type-card {
        padding: 18px 14px;
    }

    .office-card h2 {
        font-size: 28px;
    }

    .swatch .chip {
        width: 78px;
        height: 78px;
    }

    .footer-bottom {
        overflow-wrap: anywhere;
    }
}

/* Hero layout and typography across all page variants. */
.hero-section .hero-content {
    min-width: 0;
    margin-left: 0;
}

.hero-section .hero-content h1 {
    max-width: 100%;
    font-size: clamp(1.75rem, 4.2vw, 3.875rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.hero-section .hero-content .custom-hero-title {
    font-size: clamp(1.875rem, 5vw, 5rem) !important;
    line-height: 1.06 !important;
}

.hero-section .hero-content .custom-text {
    max-width: 100%;
    font-size: clamp(1.125rem, 2.25vw, 1.75rem);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.hero-section .hero-content .hero-description {
    max-width: min(100%, 38rem);
    overflow-wrap: anywhere;
}

.hero-section .hero-content .hero-buttons,
.hero-section .hero-content .hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(.5rem, 1.5vw, 1rem);
}

.hero-section .hero-content .hero-buttons .btn,
.hero-section .hero-content .hero-btns .btn {
    max-width: 100%;
}

.hero-section .hero-image-col img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23000' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (min-width: 1600px) {
    .container {
        max-width: 1440px;
    }

    .work-process-section > .container-fluid,
    .google-review-section > .container-fluid,
    .backing-options-section > .container-fluid {
        width: min(calc(100% - 4rem), 1440px);
        margin-right: auto;
        margin-left: auto;
    }

    .coverage-guide-content {
        width: min(100%, 1440px);
        margin-right: auto;
        margin-left: auto;
    }
}

@media (max-width: 991px) {
    .hero-section {
        min-height: 0;
        padding-top: clamp(6rem, 12vw, 7.5rem);
        padding-bottom: clamp(2rem, 7vw, 3.5rem);
    }

    .hero-section .hero-content {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .hero-section .hero-content h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .hero-section .hero-content .custom-hero-title {
        font-size: clamp(1.875rem, 8vw, 2.75rem) !important;
    }

    .hero-section .hero-content .hero-buttons,
    .hero-section .hero-content .hero-btns {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-section .hero-content .hero-buttons .btn,
    .hero-section .hero-content .hero-btns .btn {
        width: 100%;
    }
}