body {
  font-family: 'Lato', Calibri, Arial, sans-serif;
  background: #f0f0f0;
}

html,
body,
.container-fluid,
.row {
  height: 100%;
}

/* maintain aspect ratio on resizing 
https://stackoverflow.com/questions/1495407/maintain-the-aspect-ratio-of-a-div-with-css */
#flipbook-wrapper {
  position: relative;
}

#flipbook .bb-bookblock {
  width: 100%;
  height: 650px;
  border-radius: 26px;
  border: 1px solid rgba(34, 197, 94, 0.15);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    0 20px 40px rgba(0, 0, 0, 0.18);
  background: #f9f5e9;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

#flipbook .bb-bookblock::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 24px;
  height: 100%;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 30%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.55) 70%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0.22;
  pointer-events: none;
  z-index: 4;
}

#flipbook .bb-bookblock::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(255, 255, 255, 0.9) 40%,
    rgba(34, 197, 94, 0.14) 50%,
    rgba(255, 255, 255, 0.9) 60%,
    rgba(0, 0, 0, 0.05) 100%
  );
  opacity: 0.45;
  pointer-events: none;
  z-index: 5;
}

#flipbook .bb-bookblock.book-closed .book-spine,
#flipbook .bb-bookblock.book-closed::before,
#flipbook .bb-bookblock.book-closed::after {
  opacity: 0 !important;
  visibility: hidden !important;
}

#flipbook .bb-bookblock .bb-page,
#flipbook .bb-bookblock .bb-outer,
#flipbook .bb-bookblock .bb-content,
#flipbook .bb-bookblock .bb-inner {
  background: #fffef8;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.book-spine {
  position: absolute;
  top: 0;
  left: 50%;
  width: 6px;
  height: 100%;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(0, 0, 0, 0.05) 20%,
    rgba(255, 255, 255, 0.7) 40%,
    rgba(34, 197, 94, 0.12) 50%,
    rgba(255, 255, 255, 0.7) 60%,
    rgba(0, 0, 0, 0.05) 80%,
    rgba(255, 255, 255, 0) 100%
  );
  box-shadow:
    inset 2px 0 12px rgba(255, 255, 255, 0.3),
    inset -2px 0 12px rgba(0, 0, 0, 0.12),
    0 0 18px rgba(34, 197, 94, 0.05);
  pointer-events: none;
  z-index: 20;
}

figure,
figure img {
  height: 100%;
  width: 100%;
}

figure {
  background-color: #fff;
}

.book-cover {
  background: none;
}

/* Modern minimal navigation */
#nav-wrapper {
  width: 50%;
  padding-bottom: 4%;
  position: relative;
  margin-top: 4%;
  display: flex;
  justify-content: center;
}

#nav-wrapper,
nav,
#page-counter,
#total-count {
  display: flex;
  align-items: center;
  justify-content: center;
}

nav {
  position: absolute;
  width: 100%;
  height: 74px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border-radius: 52px;
  padding: 14px 24px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  z-index: 60;
  transition: box-shadow 200ms ease;
}

nav:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

#page-counter {
  width: auto;
  height: 54px;
  margin: 0 14px;
  gap: 10px;
}

#page-counter input {
  height: 54px;
  width: 72px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 14px;
  border: 1px solid #f0f0f0;
  background: #fafafa;
  color: #222;
  padding: 8px 10px;
  box-shadow: none;
  transition: all 180ms ease;
}

#page-counter input:hover {
  background: #f5f5f5;
  border-color: #e0e0e0;
}

#page-counter input:focus {
  outline: none;
  background: #ffffff;
  border-color: #d0d0d0;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

#total-count {
  background: #f5f1ed;
  border: 1px solid #e5dcd2;
  color: #333;
  font-size: 1rem;
  font-weight: 600;
  width: auto;
  height: 54px;
  padding: 8px 16px;
  border-radius: 14px;
  box-shadow: none;
  transition: all 180ms ease;
  cursor: default;
}

#total-count:hover {
  background: #f0e9e0;
  border-color: #ddd0c6;
}

nav img {
  width: 54px;
  height: 54px;
  padding: 12px;
  background: #f5f5f5;
  border-radius: 50%;
  border: none;
  box-shadow: none;
  cursor: pointer;
  transition: all 160ms ease;
  opacity: 0.7;
}

nav img:hover {
  background: #efefef;
  opacity: 0.95;
}

nav img:active {
  background: #e8e8e8;
  opacity: 1;
}

#page-counter input:hover,
#page-counter input:focus,
#total-count:hover {
  cursor: pointer;
}

address {
  margin-left: 1%;
}

address img {
  position: absolute;
  width: 100%;
  height: 100%;
}

address a {
  width: 30%;
  padding-bottom: 30%;
  margin-top: 18%;
  position: relative;
  display: block;
}

address a:first-child {
  margin-top: 6%;
}

address a:hover {
  transform: scale(1.7, 1.7);
}

#flipbook-wrapper {
  background: rgba(245, 255, 244, 0.9);
  border: 1px solid rgba(34, 197, 94, 0.16);
  border-radius: 34px;
  padding: 18px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.16);
  background-size: cover;
  background-repeat: no-repeat;
  padding-top: 15px;
}

#flipbook-wrapper::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 24px;
  width: 4px;
  height: calc(100% - 48px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.35), transparent 80%);
  opacity: 0.8;
}
