/* =========================================================
   RESPONSIVE PATCH (PASTE AT END OF style.css)
   Fixes: huge paddings, tab arrows gap, search overlap,
   hero feature positioning, grids, footer spacing, etc.
   ========================================================= */

/* 1) Make all major sections use fluid container padding */
:root {
    --page-pad: clamp(18px, 4vw, 155px);
}

.header,
.hero,
.tabs-section,
.reviews {
    padding-left: var(--page-pad) !important;
    padding-right: var(--page-pad) !important;
}

/* Trusted section uses its own padding already */
.trusted.trusted-infinite {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* 2) Header: avoid crowding on smaller screens */
.header {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
}

/* 3) HERO: keep spacing sane on tablets/mobiles */
.hero {
    padding-top: clamp(32px, 5vw, 60px) !important;
    padding-bottom: clamp(150px, 5vw, 250px) !important;
    border-radius: 0 0 clamp(28px, 7vw, 70px) clamp(28px, 7vw, 70px);
}

.hero-wrapper {
    max-width: 1130px;
    margin: 0 auto;
}

/* Title scales better */
.hero-title {
    font-size: clamp(30px, 4.6vw, 60px) !important;
}

.hero-subtitle {
    font-size: clamp(14px, 2vw, 18px) !important;
}

/* 4) HERO center layout: remove the "right feature margin-top:-420px" on small */
.hero-content-center {
    grid-template-columns: 1fr auto 1fr;
    gap: clamp(16px, 3vw, 40px);
}

/* Tablet: stack hero */
@media (max-width: 900px) {
    .hero-content-center {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    .hero-feature.left,
    .hero-feature.right {
        justify-content: center !important;
        text-align: center !important;
        /* .hero-feature.right's -420px margin-top only makes sense in the
           desktop 3-column layout (pulling it up next to the phone) --
           left in place here it drags the stacked mobile content up and
           off-position. */
        margin-top: 0 !important;
        /* Both are empty decorative columns that flank the phone on
           desktop (min-height:620px, no content). Stacked into the single
           mobile column they each reserve 620px of dead space above and
           below the phone -- collapse them out entirely. */
        display: none !important;
        min-height: 0 !important;
        padding: 0 !important;
    }

    .hero-phone {
        margin-top: 20px;
        /* .phone-container below is scaled down with transform, which
           doesn't shrink its actual layout box (390px wide) -- without
           this, the untransformed box silently overflows the viewport
           even though the scaled-down phone looks fine visually. */
        overflow: hidden;
    }
}

/* 5) Phone mock: scale down more smoothly */
.phone-container {
    transform-origin: top center;
}

@media (max-width: 900px) {
    .phone-container {
        transform: scale(.82) !important;
    }
}

@media (max-width: 640px) {
    .phone-container {
        transform: scale(.72) !important;
    }
}

@media (max-width: 420px) {
    .phone-container {
        transform: scale(.62) !important;
    }
}

/* 6) SEARCH BOX: remove hard negative margin issues */
.search-box {
    margin-top: clamp(-240px, -18vw, -230px) !important;
    width: min(751px, 100%);
}

@media (max-width: 768px) {
    .search-box {
        margin-top: -80px !important;
        height: auto !important;
        padding: 18px !important;
    }
}

/* 7) TRUSTED infinite slider: keep edges aligned */
.trusted-title {
    padding-left: var(--page-pad) !important;
    padding-right: var(--page-pad) !important;
}

.trusted-viewport {
    padding-left: var(--page-pad) !important;
    padding-right: var(--page-pad) !important;
}

/* 8) Tabs section: fix arrow gap 850px + make it wrap */
.tabs-section {
    padding-top: 50px !important;
    padding-bottom: 50px !important;
}

.tabs-title {
    font-size: clamp(26px, 3.5vw, 48px) !important;
}


/* 9) Reviews grid: stable columns */
.reviews {
    padding-top: 50px !important;
    padding-bottom: 60px !important;
}

.reviews-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr)) !important;
    gap: 16px !important;
    max-width: 1100px;
}

@media (max-width: 1024px) {
    .reviews-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
    }
}

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

/* 10) Proven section: keep grid responsive */
.proven-section {
    padding-top: 50px !important;
    padding-bottom: 50px !important;
}

.design-bottom-grid {
    grid-template-columns: 1fr 0.9fr;
    gap: 18px;
}

@media (max-width: 991px) {
    .design-bottom-grid {
        grid-template-columns: 1fr !important;
    }

    .service-card {
        grid-template-columns: 1fr 120px !important;
    }
}

@media (max-width: 576px) {
    .service-card {
        grid-template-columns: 1fr !important;
        text-align: left;
    }

    .service-image {
        width: 100% !important;
        height: 180px !important;
        border-radius: 16px !important;
    }
}

/* 11) OWNER TESTIMONIALS: prevent overflow & huge fonts */
.owner-testimonials-container {
    padding-left: var(--page-pad) !important;
    padding-right: var(--page-pad) !important;
}

.owner-slider-wrapper {
    border-radius: clamp(18px, 4vw, 32px);
}

.testimonial-author,
.testimonial-company {
    font-size: clamp(22px, 3.2vw, 45px) !important;
}

.owner-slide-content {
    grid-template-columns: 1fr 1.2fr;
}

@media (max-width: 991px) {
    .owner-slide-content {
        grid-template-columns: 1fr !important;
    }

    .testimonial-metrics {
        margin-top: 20px !important;
    }

    .owner-slide-right {
        height: 360px !important;
    }
}

/* 12) Testimonials Carousel: make card stack earlier */
.testimonial-card {
    border-radius: clamp(18px, 4vw, 40px) !important;
    grid-template-columns: 380px 1fr;
    height: auto !important;
}

@media (max-width: 1024px) {
    .testimonial-card {
        grid-template-columns: 1fr !important;
        /* Grid items default to an "auto" minimum size based on their
           content, not their track's size -- without this the image
           column's unbreakable min-content (a raw <img width:100%> with
           no track width to resolve against) forces the whole card, and
           the flex slide/track it sits in, wider than the viewport. */
        min-width: 0 !important;
    }

    .testimonial-image {
        height: 260px !important;
        min-width: 0 !important;
    }

    .quote {
        margin-bottom: 30px !important;
    }

    /* .testimonial-slide only had min-width:100%, which is a floor, not
       a ceiling -- the oversized .testimonial-card above was stretching
       it past the carousel track's actual width. Pin it exactly. */
    .testimonial-slide {
        width: 100% !important;
        overflow: hidden;
    }
}

/* Decorative BG images: hide on small to avoid overlap */
@media (max-width: 768px) {

    .bg-left,
    .bg-right {
        display: none !important;
    }
}


/* 14) Image hero: fix left padding on mobile */
/* .image-hero{
  height: clamp(360px, 60vw, 600px) !important;
  border-radius: clamp(26px, 6vw, 70px) !important;
}
.image-hero-overlay{
  padding-left: var(--page-pad) !important;
  padding-right: var(--page-pad) !important;
  max-width: 100% !important;
}
.image-hero-overlay h1{
  font-size: clamp(26px, 4.2vw, 52px) !important;
} */

/* 15) Footer -- the footer's own layout, including its breakpoints, lives in
   main.css so there is a single source for it. Only the generic .d-flex
   utility is adjusted here. */
@media (max-width: 560px) {
    .d-flex {
        flex-direction: column !important;
        width: 100%;
    }
}
