:root {
    --swiper-theme-color: rgb(226 1 27);
    --swiper-theme-color-light: rgb(226, 1, 27, 0.9);
    --swiper-client-theme-color: #023e6c;
    --swiper-navigation-size: 44px;
    --swiper-navigation-sides-offset: 0;
    --padding: 4rem;
}

@media screen and (max-width: 768px) {
    :root {
        --padding: 1rem;
    }
}

html {
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

*,
::after,
::before {
    -webkit-box-sizing: inherit;
    box-sizing: inherit;
}

body {
    padding: 0;
    margin: 0;
    font-family: Arial;
    background: #e9e9e9;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    position: relative;
    min-height: 100%;
    height: 100vh;
}

.clearfix:after {
    clear: both;
}

.clearfix:after,
.clearfix:before {
    content: " ";
    display: table;
}

.swiper {
    padding: var(--padding);
    overflow: hidden;

    .swiper-wrapper {
        max-height: 100%;
    }
}

.swiper-slide img {
    max-height: 100%;
    width: fit-content;
    height: fit-content;
    max-width: 100%;
    /* object-fit: cover; */
}

.swiper-slide {
    display: flex;
    justify-content: center;
    width: auto;
    min-width: calc(50vw - var(--padding));
    max-width: calc(100vw - var(--padding) * 2);
    height: auto;
    max-height: 100%;
    height: 100%;
    align-items: center;
}

.swiper-slide:first-child,
.swiper-slide:nth-child(even):last-child {
    min-width: calc(100vw - var(--padding) * 2);
}

.swiper-slide:first-child .pages,
.swiper-slide:nth-child(even):last-child .pages {
    margin: 0 auto;
}

.swiper-slide:not(.swiper-slide-visible) {
    opacity: 0 !important;
}

.pages {
    display: flex;
    float: left;
    position: relative;
    max-height: 100%;
    height: fit-content;
    width: fit-content;
    max-width: 100%;
    aspect-ratio: 1240 / 1754;
}

@media screen and (min-width: 769px) {

    .swiper-slide {
        max-width: calc(50vw - var(--padding));
    }

    .swiper-slide .pages {
        max-width: calc(50vw - var(--padding));
    }

    .pages.page-left {
        margin-left: auto;
    }
    
    .pages.page-right {
        margin-right: auto;
    }
}

.swiper-button-prev,
.swiper-button-next {
    background-color: transparent;
}

.inline-video {
    background-color: transparent;
    background-color: var(--swiper-client-theme-color);
    position: absolute;
    height: auto;
    right: auto;
    left: auto;
}

.inline-video video {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    position: absolute;
    z-index: 0;
    object-fit: cover;
}



.poverlay {
    position: absolute;
    top: 0;
    bottom: auto;
    left: 0;
    width: 50%;
    height: 20%;
}

.fx-media,
.fx-cp,
.fx-surface {
    position: absolute !important;
}

.swiper-pagination {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 1em 0;
}

.swiper-slide-visible .pages {
    animation: openpage .5s ease;
}

.swiper-slide-visible .pages.pages.page-left {
    transform-origin: right center;
}

.swiper-slide-visible .pages.pages.page-right {
    transform-origin: left center;
}

.swiper-slide:first-child .pages,
.swiper-slide:nth-child(even):last-child .pages {
    transform-origin: center;
}

@keyframes openpage {
    from {
        transform: translateX(10rem) scale(0.8);
    }
    to {
        transform: none;
    }
}

@media screen and (max-width: 768px) {
    .swiper {
        height: 100%;
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: calc(100% - (var(--pagination, 5rem) + 1em)) auto;
        align-items: center;
        gap: 1em;
    }

    .swiper-pagination {
        position: static;
        grid-row-start: 2;
        grid-column-start: 2;
        align-self: stretch;
    }

    .swiper .swiper-wrapper {
        grid-column-end: span 3;
        max-height: calc(100vh - var(--padding) * 2);
        /* overflow: hidden; */
    }

    .swiper .swiper-button-prev,
    .swiper .swiper-button-next {
        display: block;
        position: static;
        transform: none;
        margin: 0;
    }
}