/* ===========================================
   HISTORICUM GLOBAL LAYOUT GUARD
   Loaded last. No page or component may create horizontal document overflow.
   Decorative full-bleed sections must clip on the X axis inside their own frame.
   =========================================== */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}

body {
    position: relative;
}

#page,
.site,
.site-content,
#content,
.content-area,
.entry-content,
#main,
.site-main,
.content-wrapper,
.page-wrap,
.historicum-homepage,
.h-page-wrapper,
.h-static-page,
.h-ref-page,
.h-shop-page,
.h-product-page,
.woocommerce,
.woocommerce-page {
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: visible;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

.h-hero-diagonal-bands,
.diagonal-bands,
.diagonal-band-wrap {
    max-width: 100%;
    overflow: hidden !important;
}

@media (hover: none), (pointer: coarse), (max-width: 767px) {
    html,
    body {
        height: auto !important;
        min-height: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        touch-action: auto !important;
    }

    #page,
    .site,
    .site-content,
    #content,
    .content-area,
    .entry-content,
    #main,
    .site-main,
    .content-wrapper,
    .page-wrap,
    .historicum-homepage,
    .h-page-wrapper,
    .h-static-page,
    .h-ref-page,
    .h-shop-page,
    .h-product-page,
    .woocommerce,
    .woocommerce-page,
    #historicum-home {
        overflow-x: visible !important;
        overflow-y: visible !important;
    }

    .h-bs-carousel,
    .historicum-product-review-viewport,
    .h-testimonials-viewport,
    .carousel-container {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    .h-ws-viewport,
    .h-ss-viewport {
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    .h-testimonials-track,
    .h-sponsors-track {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    .h-blog-track {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    .h-shop-fighter-carousel {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    .h-bs-carousel.is-dragging,
    .h-shop-fighter-carousel.is-dragging,
    .h-ws-viewport.is-dragging,
    .h-ss-viewport.is-dragging,
    .h-blog-track.is-dragging,
    .historicum-product-review-viewport.is-dragging,
    .h-testimonials-carousel.is-dragging .h-testimonials-viewport,
    .h-testimonials-track.is-dragging,
    .h-sponsors-track.is-dragging,
    .carousel-track.is-dragging,
    .carousel-container.is-dragging {
        cursor: grabbing;
    }
}

@media (max-width: 767px) {
    .h-sponsors-track {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    /* Mobile torn-paper contract: wider rip artwork prevents the paper edge from looking squeezed on narrow screens. */
    .h-torn-edge-top,
    .h-torn-edge-bottom {
        background-size: 273% 100% !important;
        background-position: center center !important;
        -webkit-mask-size: 230% 100% !important;
        mask-size: 230% 100% !important;
    }

    .h-torn-top::after,
    .h-torn-bottom::after,
    body.historicum-shop-page .h-torn-top::after,
    body.historicum-shop-page .h-torn-bottom::after,
    body.historicum-shop-page .h-shop-mobile-widgets .h-torn-bottom::after,
    .h-commerce-paper-section > .h-torn-top::after,
    .h-commerce-paper-section > .h-torn-bottom::after,
    .h-ref-page .h-torn-top::after,
    .h-ref-page .h-torn-bottom::after,
    body.historicum-training-page .h-ref-page .h-ref-paper-section .h-torn-top::after,
    body.historicum-training-page .h-ref-page .h-ref-paper-section .h-torn-bottom::after,
    body.historicum-community-page .h-ref-page .h-ref-paper-section .h-torn-top::after,
    body.historicum-community-page .h-ref-page .h-ref-paper-section .h-torn-bottom::after,
    body.single-product .historicum-product-shell::before,
    body.single-product .historicum-product-shell::after {
        -webkit-mask-size: 323% 100% !important;
        mask-size: 323% 100% !important;
    }
}

@media (min-width: 992px) {
    @supports (overflow: clip) {
        html,
        body,
        #page,
        .site,
        .site-content,
        #content,
        .content-area,
        .entry-content,
        #main,
        .site-main,
        .content-wrapper,
        .page-wrap,
        .historicum-homepage,
        .h-page-wrapper,
        .h-static-page,
        .h-ref-page,
        .h-shop-page,
        .h-product-page,
        .woocommerce,
        .woocommerce-page {
            overflow-x: clip !important;
        }
    }
}
