/* One height policy for page-opening banners, based on the Contact map.
   Networking is a content section and deliberately stays outside this rule. */
:root { color-scheme: only light; --ht-banner-height:457px; }
@media (max-width:675.99px) { :root { --ht-banner-height:383px; } }
@media (max-width:599.99px) { :root { --ht-banner-height:var(--ht-mobile-hero-height,300px); } }

body.home #Content .mcb-section-93bf6973c,
#Content:is(.ht-info-page,.ht-partners-page) > .mcb-section-903c665fc,
#Content.ht-support-page .ht-support-hero,
#Content.ht-cookie-page .ht-cookie-hero,
#Content .ht-contact-map {
    box-sizing:border-box;
    height:var(--ht-banner-height)!important;
    min-height:var(--ht-banner-height)!important;
    max-height:var(--ht-banner-height)!important;
    aspect-ratio:auto;
}
body.home #Content .mcb-section-93bf6973c,
#Content:is(.ht-info-page,.ht-partners-page) > .mcb-section-903c665fc,
#Content.ht-support-page .ht-support-hero,
#Content.ht-cookie-page .ht-cookie-hero {
    display:flex;
    align-items:center;
    padding-block:24px;
}
#Content .ht-contact-map iframe { height:100%; }
/* Keep the service names visible on short laptop screens with the shared banner. */
@media (min-width:1240px) and (max-height:675px) {
    #Content.ht-info-page .ht-services-overview { padding-top:18px!important; }
    #Content.ht-info-page .ht-services-overview .image_wrapper { margin-bottom:8px; }
}

/* Center the natural content block rather than an inherited full-height wrapper. */
body.home #Content .mcb-section-93bf6973c>.section_wrapper,#Content:is(.ht-info-page,.ht-partners-page)>.mcb-section-903c665fc>.section_wrapper,#Content.ht-support-page .ht-support-hero>.section_wrapper,#Content.ht-cookie-page .ht-cookie-hero>.section_wrapper{height:auto!important;min-height:0;flex-shrink:0;align-self:center}

/* Keep the support team and desks in frame without resizing the banner. */
#Content.ht-support-page .ht-support-hero {
    background:#142944;
}
#Content.ht-support-page .ht-support-hero > .ht-support-hero-video {
    object-position: 74% 89%;
}
@media (min-width: 1240px) {
    #Content.ht-support-page .ht-support-hero > .ht-support-hero-video {
        object-position: 50% 80%;
    }
}
@media (min-width: 1800px) {
    #Content.ht-support-page .ht-support-hero > .ht-support-hero-video {
        object-position: 50% 73%;
    }
}
@media (min-width: 2300px) {
    #Content.ht-support-page .ht-support-hero > .ht-support-hero-video {
        object-position: 50% 69%;
    }
}


/* Give opening videos more vertical room on large desktop monitors. */
@media (min-width: 1920px) {
    body.home #Content .mcb-section-93bf6973c,
    #Content:is(.ht-info-page,.ht-partners-page) > .mcb-section-903c665fc,
    #Content.ht-support-page .ht-support-hero,
    #Content.ht-cookie-page .ht-cookie-hero {
        --ht-wide-banner-min:clamp(457px, calc(457px + (100vw - 2100px) * .23), 575px);
        --ht-banner-height:max(var(--ht-wide-banner-min), min(calc(457px + (100vw - 1920px) * .30), 870px, 65vh));
    }
}
/* Center the Info machinery at 66% of the 16:9 frame.
   The offset is 16% of the scaled video height, capped at the crop edges. */
#Content.ht-info-page > .mcb-section-903c665fc {
    container-type:inline-size;
    background-image:url("wp-content/uploads/video/info-servizi-azienda-poster-optimized.webp");
    background-position:center 66%;
    background-repeat:no-repeat;
    background-size:cover;
}
#Content.ht-info-page > .mcb-section-903c665fc > .ht-info-hero-video {
    object-position:50% min(0px, max(100%, calc(50% - 9cqw)));
}

/* Keep the Partners faces in the opening banner as its aspect ratio changes. */
#Content.ht-partners-page > .mcb-section-903c665fc {
    container-type:inline-size;
    background-image:url("wp-content/uploads/video/partners-clienti-sfondo-poster-optimized.webp?v=31a13e0bfb");
    background-position:48% 42%;
    background-repeat:no-repeat;
    background-size:cover;
}
#Content.ht-partners-page > .mcb-section-903c665fc > .ht-partners-hero-video {
    object-position:48% min(0px, max(100%, calc(50% + 4.4cqw)));
}


@media (min-width:1450px) {
    #Content.ht-partners-page > .mcb-section-903c665fc > .ht-partners-hero-video {
        object-position:48% min(0px, max(100%, calc(50% + 6.8cqw)));
    }
}

/* Match opening video heights on large displays. Partners retains its side framing. */
@media (min-width:1950px),
       (min-width:1650px) and (min-resolution:1.2dppx),
       (min-width:1450px) and (min-resolution:1.45dppx) {
    body.home #Content .mcb-section-93bf6973c,
    #Content:is(.ht-info-page,.ht-partners-page) > .mcb-section-903c665fc,
    #Content.ht-support-page .ht-support-hero,
    #Content.ht-cookie-page .ht-cookie-hero {
        --ht-banner-height:max(var(--ht-wide-banner-min, 457px), min(max(calc(457px + (100vw - 1920px) * .57), 31vw), 930px, 75vh));
    }
    #Content.ht-partners-page > .mcb-section-903c665fc {
        background-image:url("wp-content/uploads/video/partners-clienti-sfondo-laterale.webp?v=38e612248e");
        background-position:center 33%;
        background-repeat:no-repeat;
        background-size:cover;
    }
    #Content.ht-partners-page > .mcb-section-903c665fc > .ht-partners-hero-video {
        --ht-partners-wide-video:1;
        inset-inline:0;
        margin-inline:auto;
        width:min(100%, calc(var(--ht-banner-height) * 4.1));
        object-position:center 29%;
        mask-image:linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
    }
}


/* Scale the Home headline while retaining the banner's centered content wrapper. */
body.home #Content .mcb-section-93bf6973c p.title {
    zoom:1.13;
}
@media (min-width:600px) {
    body.home #Content .mcb-section-93bf6973c h2.title {
        font-size:clamp(39px, calc(16px + 2.2vw), 53px);
        line-height:1.12;
        zoom:1.12;
    }
}
@media (max-width:599.99px) {
    body.home #Content .mcb-section-93bf6973c :is(h2.title,p.title) {
        zoom:1.05;
    }
}


/* Keep the Info service links in one row on phones. */
@media (max-width: 599.99px) {
    #Content.ht-info-page .ht-services-overview > .section_wrapper {
        width: calc(100% - 24px);
        padding-inline: 0 !important;
    }
    #Content.ht-info-page .ht-services-overview .mcb-wrap-inner-872d0eb96 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    #Content.ht-info-page .ht-services-overview .column_icon_box {
        width: auto !important;
        padding: 10px 4px;
        border-top: 0;
    }
    #Content.ht-info-page .ht-services-overview .column_icon_box + .column_icon_box {
        border-left: 1px solid #d8e0dc;
    }
    #Content.ht-info-page .ht-services-overview .image_wrapper {
        height: auto;
        padding: 0;
        margin: 0 0 10px;
    }
    #Content.ht-info-page .ht-services-overview .image_wrapper img {
        width: 54px;
        height: 54px;
    }
    #Content.ht-info-page .ht-services-overview .desc_wrapper h3.title {
        font-size: clamp(16px, 5vw, 23px);
        line-height: 1.2;
        min-height: 2.4em;
        margin-bottom: 5px;
        overflow-wrap: anywhere;
    }
    #Content.ht-info-page .ht-services-overview .desc_wrapper .desc {
        font-size: 15px;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }
}

/* Match the mobile browser backdrop to the header or the end of the footer. */
@media (max-width: 767px) {
    html {
        background-color: #fff;
    }
    html.ht-footer-in-view {
        background-color: #002458;
    }
}

/* Keep the embedded map at native scale inside the zoomed mobile page. */
@media (max-width: 767.99px), (hover: none) and (pointer: coarse) {
    #Content .ht-contact-map iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        zoom: calc(1 / .675);
    }
}

@media (max-width: 599.99px) {
    #Content .ht-contact-map iframe {
        zoom: 1.5;
    }

    /* Give the introduction its own row and keep both values side by side. */
    #Content.ht-info-page .ht-about-overview .mcb-wrap-inner-4f0dde4a1 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px 22px;
        align-items: start;
    }
    #Content.ht-info-page .ht-about-overview .mcb-item-64c6f3977 {
        grid-column: 1 / -1;
    }
    #Content.ht-info-page .ht-about-overview .column_attr p {
        font-size: 19.5px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }
    #Content.ht-info-page .ht-about-overview .column_attr h3 {
        font-size: 27px;
        transform: none;
    }
}
