/* ===================================================================
   Mobile + tablet polish — loaded after master_m.css
   Targets: home hero (priority), inner page banner, sticky nav,
   footer container. Uses small-viewport units (svh) so the iOS
   address-bar collapse doesn't push content off-screen.
   =================================================================== */

/* --------- HOME HERO ---------------------------------------------- */
@media (max-width: 1100px) {

    .landingBanner,
    .landing {
        height: 100vh;
        height: 100svh;
        min-height: 540px;
    }

    /* Header bar — proper flex layout, no float artefacts */
    .header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 14px;
        height: 70px;
        box-sizing: border-box;
    }
    .headerLMain {
        height: 100%;
        padding-left: 0;
        margin-top: 0;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }
    .headerLMain a {
        height: 70%;
        padding: 0;
        float: none;
        display: block;
    }
    .headerLMain a img {
        height: 100%;
        width: auto;
        display: block;
    }
    .headerR {
        width: auto;
        height: auto;
        float: none;
        flex: 0 0 auto;
        margin-right: 90px; /* clear the 77px hamburger + breathing room */
        padding: 0;
    }

    /* REQUEST A QUOTE pill — readable, tappable, doesn't overlap menu */
    .broch,
    .brochBlk {
        margin: 0;
        padding: 11px 16px;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.5px;
        white-space: nowrap;
        display: inline-block;
        line-height: 1.1;
        float: none;
    }
    .broch {
        background-color: rgba(255, 255, 255, 0.95);
        color: #1a1a1a;
        border: 1px solid rgba(255, 255, 255, 0.6);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    }

    /* Hero copy block */
    .bottomInfo {
        width: auto;
        left: 16px;
        right: 16px;
        bottom: 100px;
        text-align: left;
    }
    .bottomInfo h2 {
        font-size: 1.7em;
        line-height: 1.18em;
        margin-bottom: 6px;
    }
    .bottomInfo a,
    .bottomInfo span {
        font-size: 1em;
        margin-bottom: 14px;
    }

    /* Read More CTA — centred via auto margins so it's exactly mid-screen
       regardless of the button's own width. */
    .bottomButtom {
        left: 0;
        right: 0;
        bottom: 28px;
        margin: 0 auto;
        transform: none;
        width: -moz-fit-content;
        width: fit-content;
        padding: 10px 22px;
        box-sizing: border-box;
        white-space: nowrap;
        text-align: center;
    }

    /* Sticky scroll header — same flex layout as the home hero header so
       the logo and the dark "REQUEST A QUOTE" pill stay vertically aligned. */
    .scrollMenuBar {
        height: 70px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 14px;
        box-sizing: border-box;
    }
    .scrollMenuBar .headerL {
        height: 100%;
        padding-left: 0;
        margin: 0;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        float: none;
    }
    .scrollMenuBar .headerL a {
        height: 70%;
        padding: 0;
        margin: 0;
        float: none;
        display: block;
    }
    .scrollMenuBar .headerL a img {
        height: 100%;
        width: auto;
        display: block;
    }
    .scrollMenuBar .headerR {
        height: auto;
        margin: 0 90px 0 0;
        padding: 0;
        flex: 0 0 auto;
        float: none;
    }
    .scrollMenuBar .brochBlk {
        display: inline-block;
        margin: 0;
        padding: 11px 16px;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.5px;
        white-space: nowrap;
        line-height: 1.1;
        float: none;
        border: 1px solid #1a1a1a;
        background-color: #fff;
        color: #1a1a1a;
        border-radius: 3px;
    }

    /* Hamburger — same height as the header bar so it sits flush. */
    .menuButton {
        width: 70px;
        height: 70px;
        padding: 0;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        line-height: 1;
        gap: 4px;
    }
    .menuButton .line {
        width: 26px;
        margin: 0;
        border-bottom: 3px solid #fff;
        display: block;
    }
    .menuButton .menT {
        margin: 4px 0 0;
        margin-left: 0;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.5px;
        line-height: 1;
        width: auto;
        display: block;
        color: #fff;
    }
}

/* --------- PHONES (≤ 480px) -------------------------------------- */
@media (max-width: 480px) {
    .header,
    .scrollMenuBar { height: 64px; }
    .menuButton { width: 64px; height: 64px; padding: 0; }
    .menuButton .line { width: 24px; }
    .menuButton .menT { font-size: 10px; }

    .broch,
    .brochBlk {
        padding: 9px 12px;
        font-size: 11px;
    }
    .headerR { margin-right: 80px; }
    .scrollMenuBar .headerR { margin-right: 80px; }

    .bottomInfo { bottom: 80px; left: 14px; right: 14px; }
    .bottomInfo h2 { font-size: 1.4em; }
    .bottomInfo span,
    .bottomInfo a { font-size: 0.95em; margin-bottom: 10px; }

    .bottomButtom { bottom: 22px; padding: 9px 18px; font-size: 0.9em; left: 0; right: 0; margin: 0 auto; }

    .insideLandingMap { padding-top: 64px; min-height: 420px; }
}

/* --------- VERY SMALL PHONES (≤ 360px) --------------------------- */
@media (max-width: 360px) {
    .broch,
    .brochBlk { padding: 8px 10px; font-size: 10.5px; letter-spacing: 0.3px; }
    .headerR { margin-right: 72px; }
    .scrollMenuBar .headerR { margin-right: 72px; }
    .bottomInfo h2 { font-size: 1.25em; }
    .bottomInfo span,
    .bottomInfo a { font-size: 0.9em; }
}

/* --------- INNER-PAGE LANDING BANNER ----------------------------- */
/* Product pages use .insideLanding; gallery/projects pages use
   .insideLandingGallery; map page uses .insideLandingMap. */
@media (max-width: 1100px) {
    .insideLanding,
    .insideLandingGallery {
        height: auto;
        min-height: 60vh;
        min-height: 60svh;
        display: block;
        position: relative;
        overflow: visible;
    }
    .inLanding {
        height: 60vh;
        height: 60svh;
        min-height: 380px;
    }

    /* Map page — fill exactly one viewport with the header reserving
       its bar at the top. iframe stretches to fill the remaining space. */
    .insideLandingMap {
        height: 100vh;
        height: 100svh;
        min-height: 480px;
        padding-top: 70px;
        display: block;
        position: relative;
        overflow: hidden;
        box-sizing: border-box;
    }
    .insideLandingMap .inLanding {
        height: 100%;
        width: 100%;
        min-height: 0;
    }
    .insideLandingMap .inLanding iframe {
        display: block;
        width: 100%;
        height: 100%;
        border: 0;
    }
    .bottomInfoINside {
        width: auto;
        left: 16px;
        right: 16px;
        bottom: 28px;
        padding: 16px 18px;
        line-height: 1.45em;
        box-sizing: border-box;
    }
    .bottomInfoINside h2 {
        font-size: 1.45em;
        line-height: 1.2em;
    }
    .bottomInfoINside a,
    .bottomInfoINside span {
        font-size: 1em;
    }
}

/* --------- FOOTER & GENERAL CONTAINERS --------------------------- */
@media (max-width: 1100px) {
    /* The 75% wrap leaves too little room on small phones; widen it. */
    .footRap,
    .footRapInside {
        width: 92%;
        max-width: 720px;
    }
    .footCol1,
    .footCol2,
    .footCol3,
    .footCol4 {
        margin-bottom: 28px;
    }
    /* Footer bottom row — logo (left) and social icons (right) on the
       same baseline, vertically centred. */
    .footBot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
        height: auto;
        min-height: 71px;
        float: none;
    }
    .footBot .headerL,
    .footerBottom .footBot .headerL {
        height: auto;
        padding-left: 0;
        margin-top: 0;
        float: none;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }
    .footBot .headerL a {
        height: auto;
        padding: 0;
        float: none;
        display: block;
    }
    .footBot .headerL a img {
        height: 44px;
        width: auto;
        display: block;
    }
    .footBot .socialLinksBottom {
        width: auto;
        height: auto;
        float: none;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .footBot .socialLinksBottom a {
        width: auto;
        height: auto;
        float: none;
        margin: 0;
        display: block;
    }
    .footBot .socialLinksBottom a img {
        height: 30px;
        width: auto;
        display: block;
    }
}

@media (max-width: 600px) {
    .footRap,
    .footRapInside {
        width: 100%;
        padding: 40px 18px 24px;
        box-sizing: border-box;
    }
}

/* --------- TAP TARGETS ON FORMS ---------------------------------- */
@media (max-width: 1100px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px; /* prevents iOS auto-zoom on focus */
    }
}

/* --------- PROJECTS PAGE FALLBACK FOR OLDER BROWSERS ------------- */
@supports not (aspect-ratio: 4 / 3) {
    .projCard { padding-top: 75%; height: 0; }
    .projCardImg { position: absolute; inset: 0; }
}

/* --------- BACK-TO-TOP BUTTON (site-wide) ------------------------ */
.backToTop {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 46px;
    height: 46px;
    border: 0;
    padding: 0;
    border-radius: 50%;
    background-color: #1f6feb;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .25s ease, visibility .25s ease, transform .25s ease, background-color .2s ease;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.backToTop.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.backToTop:hover  { background-color: #1858bf; opacity: 1; }
.backToTop:focus  { outline: 2px solid #fff; outline-offset: 2px; }
.backToTop svg    { width: 20px; height: 20px; fill: currentColor; display: block; }

@media (max-width: 480px) {
    .backToTop { right: 14px; bottom: 14px; width: 42px; height: 42px; }
    .backToTop svg { width: 18px; height: 18px; }
}
