/* Short desktop viewports share a vertical budget across the header and heroes.
   Keep content in normal flow so longer copy and form errors can still expand. */
@media (min-width: 992px) and (max-height: 850px) {
    /* Retain both header rows while returning space to the first section. */
    .myHeader .top-bar {
        padding-block: 4px;
    }

    .myHeader .top-bar .contact-item,
    .myHeader .top-bar .contact-item a {
        font-size: 0.875rem;
        line-height: 1.4;
    }

    .myHeader .top-bar .header-quote-btn {
        min-height: 32px;
        padding: 6px 14px;
        font-size: 0.8125rem;
    }

    .myHeader .navbar {
        padding-block: 4px;
    }

    .myHeader .navbar-brand {
        padding-block: 0;
    }

    .myHeader .navbar-brand img {
        width: 180px;
    }

    .myHeader .navbar-nav .nav-link {
        padding-block: 12px !important;
        font-size: 0.9375rem;
        line-height: 1.35;
    }

    .myHeader .navbar-nav .nav-link::before {
        bottom: 8px;
    }

    /* A two-line message control and three field rows keep the form usable.
       Scope above the later shared card rule, without changing other forms. */
    main :is([data-viewport-hero], .location-hero) .location-hero__form {
        padding: 12px 16px;
    }

    main :is([data-viewport-hero], .location-hero) .location-hero__form h2 {
        margin-bottom: 4px;
        font-size: 1.25rem;
        line-height: 1.2;
    }

    main :is([data-viewport-hero], .location-hero) .location-hero__form-intro {
        margin-bottom: 8px;
        line-height: 1.4;
    }

    main :is([data-viewport-hero], .location-hero) .location-enquiry__grid {
        gap: 8px 16px;
    }

    main
        :is([data-viewport-hero], .location-hero)
        .location-enquiry__field--wide {
        grid-column: auto;
    }

    main :is([data-viewport-hero], .location-hero) .location-enquiry label {
        margin-bottom: 4px;
        line-height: 1.25;
    }

    main :is([data-viewport-hero], .location-hero) .location-enquiry textarea {
        height: 64px;
        min-height: 64px;
    }

    main :is([data-viewport-hero], .location-hero) .location-enquiry > button {
        margin-top: 8px;
    }

    /* Home keeps the copy, proof points and recognition within one stage. */
    .homepage-hero-shell[data-homepage-hero] .homepage-image-hero__main {
        padding-block: clamp(16px, 3svh, 24px);
    }

    .homepage-hero-shell[data-homepage-hero] .homepage-image-hero__eyebrow {
        margin-bottom: 12px;
    }

    .homepage-hero-shell[data-homepage-hero]
        .homepage-image-hero__title
        .homepage-image-hero__title-support {
        margin-top: 16px;
        font-size: 1rem;
        line-height: 1.5;
    }

    .homepage-hero-shell[data-homepage-hero] .homepage-image-hero__actions {
        margin-top: 16px;
    }

    .homepage-hero-shell[data-homepage-hero] .homepage-image-hero__stats {
        margin-bottom: 16px;
    }

    .homepage-hero-shell[data-homepage-hero] .homepage-image-hero__stats-list {
        padding-block: 12px;
    }

    .homepage-hero-shell[data-homepage-hero]
        .homepage-image-hero__stats-list
        li {
        min-height: 48px;
    }

    .homepage-hero-shell[data-homepage-hero]
        .homepage-image-hero__stats-list
        strong {
        font-size: clamp(1.25rem, 4svh, 1.65rem);
    }

    .homepage-hero-shell[data-homepage-hero]
        .homepage-image-hero__stats-list
        span {
        font-size: 0.85rem;
    }

    .homepage-hero-shell[data-homepage-hero] .certificates-section__inner {
        min-height: 80px;
        padding-block: 0;
    }

    .homepage-hero-shell[data-homepage-hero] .certificates-slider__item {
        height: 80px;
    }

    /* Services reserves vertical space for the bottom trust strip. */
    .services-hub__hero-grid {
        padding-block: 8px;
    }

    .services-hub__hero .site-hero-heading .site-heading-accent {
        display: inline;
    }

    .services-hub__hero .services-hub__hero-lead {
        margin-block: 12px;
        font-size: 1rem;
        line-height: 1.5;
    }

    .services-hub .services-hub__hero .site-section-label {
        margin-bottom: 8px;
    }

    .services-hub__hero .services-hub__trust {
        padding-bottom: 8px;
    }

    .services-hub__hero .services-hub__trust-grid {
        padding-block: 8px;
    }

    .services-hub__trust-grid strong {
        font-size: 1.35rem;
    }

    /* Locations keeps the same two columns, with height-aware spacing. */
    .locations-hub .location-hero {
        padding-block: 16px;
    }

    .locations-hub .location-hero__grid {
        align-items: center;
    }

    .locations-hub .location-hero__content {
        gap: 16px;
    }

    .locations-hub .location-hero__content .site-section-label {
        margin-bottom: 0;
    }

    .locations-hub .location-hero__actions {
        margin-top: 0;
    }

    /* Keep the existing city heading sizes; recover space from the copy gaps. */
    .location-city-page .city-page-hero {
        gap: 8px;
        padding-block: 12px;
    }

    .city-page-hero .city-page-breadcrumb {
        margin-bottom: 8px;
    }

    .location-city-page .city-page-hero .site-section-label {
        margin-bottom: 8px;
    }

    .city-page-hero .city-page-hero__lead {
        margin-top: 8px;
    }

    .city-page-hero__copy > .city-page-richtext {
        margin-top: 8px;
    }

    .city-page-hero .city-page-hero__actions {
        margin-top: 12px;
    }

    .city-page-hero .city-page-richtext > :last-child {
        margin-bottom: 0;
    }

    .city-page-hero .city-page-stats {
        padding-top: 12px;
    }

    /* Service-location detail banners have their own content-driven layout. */
    .inner-banner .inner-banner-content {
        padding-block: clamp(24px, 6svh, 44px);
    }

    .inner-banner h1 {
        margin-bottom: 12px;
    }

    .inner-banner p {
        font-size: 1.05rem;
        line-height: 1.5;
    }
}

/* Narrow desktop columns need a little more room for city copy and labels. */
@media (min-width: 992px) and (max-width: 1199.98px) and (max-height: 850px) {
    .location-city-page .city-page-hero {
        padding-block: 8px;
    }

    .city-page-hero .city-page-stats {
        padding-top: 0;
    }

    .city-page-hero .city-page-stats article:first-child {
        flex-grow: 1.4;
    }

}
