@import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap");

:root {
  --color-1: orange;
  --color-2: #105fef;
  --grey-1: #1F1F1F;
  --grey-2: #bbb;
  --grey-3: #ccc;
  --blue-1: #006897;
  --font-1: "Roboto", sans-serif;
    --flip-duration: 800ms;
}

body {
    display: flex;
    position:relative;
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
    height: 100%;
    width: 850px;
    min-height: 100vh;
    padding: 0;
    background: var(--blue-1);
    overflow-x: auto;
    margin: 0 auto;

}

@media (max-width: 768px) {
    body {
        width: 100%;
    }
 
 }

 .carousel.pointer-event {
    /*Allow scrolling and pinch to zoom*/
    touch-action: pan-y pinch-zoom;
  }

 #carouselImages .carousel-item img {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.646);
    object-fit: cover;
    object-position: center;
    height: 75vh;
    overflow: hidden;
    margin-bottom: 20px;
 }


#book {
    user-select: none;
    display: flex;
    flex-direction: row;
    width: fit-content;
    height: fit-content;
    transition: transform ease-in-out var(--flip-duration);
    width: 100%;
    min-width: 850px;
    transform: scale(1);
    min-width: 100%;
    min-height: 100%;
    max-width: 1000px;
    max-height: 1000px;
    margin: 0 auto;
    height: auto;
}

#book.flipped {
    transform: rotateY(180deg) scale(1);
}

.page {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: transform ease-in-out var(--flip-duration);
    z-index: 1;
    margin: 0px auto;
    padding-bottom: 20px;
}

.page img {
    height: auto;
    width: 100%;
    min-height: 600px;
    max-height: 850px;
    margin: 0px auto;
    box-shadow: 0 4px 8px 0 #0003;
    pointer-events: none;
}


#p1 {
    transform-origin: left;
    left: 33.333333%;
}

#p2 {
    transform-origin: right;
    left: -33.333333%;
}

#p3 {
    z-index: 0;
}


.page>div {
    position: absolute;
    display: flex;
    transition: z-index linear 0s;
    transition-delay: calc(var(--flip-duration) / 2);
}

.front {
    height: 100%;
    width: 100%;
    z-index: 10;
    
}

.back {
    height: 100%;
    width: 100%;
    z-index: 9;
    transform: rotateY(180deg);
    
}

.page.flipped,
#book.flipped .page {
    transform: rotateY(180deg);
}


#book.flipped .back {
    z-index: 9;
}

#book.flipped .front {
    z-index: 10;
}


.page.flipped>.back {
    z-index: 10;
}

.page.flipped>.front {
    z-index: 9;
}

#book.flipped #p3 {
    transform: rotateY(0deg);
}

#book.flipped #p3>.back {
    z-index: 10;
}

#book.flipped #p3>.front {
    z-index: 9;
}

.top {
    z-index: 2;
}

