/*
 * EMMA•MED Core 1.9.2
 * Compact laptop / Windows scaling fixes
 *
 * The physical diagonal is not the key metric. On 12–14" Windows notebooks
 * with 125–150% scaling, a 1920px screen can expose only ~1280–1536 CSS px.
 * Earlier desktop grids had minimum widths that could exceed this viewport.
 */

html,
body{
    max-width:100%;
}

@supports (overflow:clip){
    html,
    body{
        overflow-x:clip!important;
    }
}

@supports not (overflow:clip){
    html,
    body{
        overflow-x:hidden!important;
    }
}

body img,
body svg{
    max-width:100%;
}

/* =========================================================
   COMPACT LAPTOP: 1025–1450 CSS px
   ========================================================= */
@media (min-width:1025px) and (max-width:1450px){

    /* ---------- GLOBAL HEADER ---------- */

    .emh__desktop-wrap{
        width:calc(100% - 28px)!important;
        max-width:100%!important;
        grid-template-columns:245px minmax(0,1fr)!important;
    }

    .emh__desktop-logo{
        padding-right:18px!important;
    }

    .emh__desktop-logo img{
        height:90px!important;
        max-width:235px!important;
    }

    .emh__desktop-right,
    .emh__desktop-top,
    .emh__desktop-bottom{
        min-width:0!important;
    }

    .emh__desktop-top{
        grid-template-columns:
            minmax(0,1fr)
            minmax(160px,.62fr)
            minmax(175px,.68fr)!important;

        column-gap:12px!important;
    }

    .emh__top-item{
        min-width:0!important;
        font-size:11.5px!important;
        white-space:normal!important;
    }

    .emh__top-item > span,
    .emh__top-item > div{
        min-width:0!important;
    }

    .emh__top-phone,
    .emh__top-phone a{
        white-space:nowrap!important;
    }

    .emh__desktop-bottom{
        grid-template-columns:minmax(0,1fr) auto!important;
        column-gap:16px!important;
    }

    .emh__nav{
        min-width:0!important;
        gap:0!important;
    }

    .emh__nav a{
        padding-left:5px!important;
        padding-right:5px!important;
        font-size:13px!important;
        font-weight:700!important;
    }

    .emh__book{
        width:178px!important;
        min-width:178px!important;
        height:40px!important;
        font-size:12.5px!important;
    }


    /* ---------- GLOBAL FOOTER ---------- */

    .emma-site-footer__container{
        width:calc(100% - 36px)!important;
        max-width:100%!important;
    }

    .emma-site-footer__main{
        grid-template-columns:
            minmax(200px,1.05fr)
            minmax(115px,.66fr)
            minmax(135px,.76fr)
            minmax(145px,.82fr)
            minmax(205px,1.02fr)!important;

        gap:26px!important;
    }

    /* Route card goes to a full row instead of being squeezed at far right. */
    .emma-site-footer__map{
        grid-column:1 / -1!important;

        width:100%!important;
        min-width:0!important;
        min-height:132px!important;

        display:grid!important;
        grid-template-columns:
            minmax(220px,.9fr)
            minmax(250px,1.1fr)
            minmax(175px,200px)!important;

        align-items:center!important;
        gap:20px!important;
    }

    .emma-site-footer__transport{
        margin:0!important;
    }

    .emma-site-footer__route{
        width:100%!important;
        max-width:200px!important;
        margin:0!important;
        justify-self:end!important;
    }


    /* ---------- ABOUT PAGE ---------- */

    .emma-about-page__container,
    .emma-about-hero__container{
        width:calc(100% - 36px)!important;
        max-width:100%!important;
        min-width:0!important;
    }

    .emma-about-hero__grid,
    .emma-about-intro__grid,
    .emma-about-comfort__grid{
        grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr)!important;
        gap:38px!important;
    }

    .emma-about-hero__content,
    .emma-about-hero__visual,
    .emma-about-intro__grid > *,
    .emma-about-comfort__grid > *,
    .emma-about-location-v2__box > *,
    .emma-about-final__box > *{
        min-width:0!important;
    }

    .emma-about-location-v2__box{
        grid-template-columns:minmax(360px,.78fr) minmax(0,1.22fr)!important;
    }

    .emma-about-location-v2__content{
        padding-left:28px!important;
        padding-right:28px!important;
    }

    .emma-about-final__box{
        grid-template-columns:minmax(0,1fr) auto!important;
        gap:20px!important;
        padding-left:26px!important;
        padding-right:26px!important;
    }


    /* ---------- CORE GENERATED PAGES ---------- */

    .emma-directions-page,
    .emma-direction-page,
    .emma-services-page,
    .emma-service-page,
    .emma-doctors-page,
    .emma-doctor-page,
    .emma-price-v4{
        max-width:100%!important;
        overflow-x:hidden!important;
    }

    .emma-dav2-shell,
    .emma-direction-shell,
    .emma-service-shell,
    .emma-doc-shell,
    .emma-price-v4__container{
        max-width:100%!important;
        min-width:0!important;
    }
}


/* =========================================================
   EFFECTIVE TABLET WIDTH ON HIGH-SCALE LAPTOPS
   ========================================================= */
@media (min-width:901px) and (max-width:1120px){

    /*
     * At ~1100 CSS px, desktop footer/navigation is technically possible,
     * but the layout is more usable if it switches earlier.
     */

    .emma-site-footer__main{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:28px 24px!important;
    }

    .emma-site-footer__brand,
    .emma-site-footer__contacts-column,
    .emma-site-footer__map{
        grid-column:1 / -1!important;
    }

    .emma-site-footer__map{
        grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
        gap:18px 22px!important;
    }

    .emma-site-footer__route{
        grid-column:1 / -1!important;
        max-width:none!important;
        justify-self:stretch!important;
    }

    .emma-about-hero__grid,
    .emma-about-intro__grid,
    .emma-about-comfort__grid,
    .emma-about-location-v2__box{
        grid-template-columns:1fr!important;
    }

    .emma-about-location-v2__visual img{
        max-height:390px!important;
    }

    .emma-about-final__box{
        grid-template-columns:1fr!important;
    }
}


/* =========================================================
   LAST RESORT: no component may force the document wider
   ========================================================= */
.emh,
.emma-site-footer,
.emma-about-page,
.emma-directions-page,
.emma-direction-page,
.emma-services-page,
.emma-service-page,
.emma-doctors-page,
.emma-doctor-page,
.emma-price-v4{
    max-width:100%!important;
}
