*, *:before, *:after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
}

body {
  background: transparent;
}

.container {
  overflow: visible; /* чтобы внешняя тень не обрезалась */
  width: 100%;
}

.book-wrapper {
  position: relative;
  margin: 2% auto;
  user-select: none;
  overflow: visible;
  background-color: transparent;
  
  border-radius: 6px;
  transition: none !important;
}

/* --- МАСКА ДЛЯ ОТРЕЗАНИЯ ТЕНИ СВЕРХУ --- */
.book-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px; /* под ваше verticalShift = 70 */
    background: transparent;
    backdrop-filter: blur(0px); /* позволяет блокировать тень, даже если фон прозрачный */
    z-index: 9999;
    pointer-events: none;
}
/* --------------------------------------- */

/* Динамические тени */
.book-shadow-strong {
  box-shadow: none !important;
}

.book-shadow-weak {
  box-shadow: none !important;
}

/* Обложка */
.book-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  display: block;
  z-index: 0;
}

/* Страницы */
.pages-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.pages {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: auto !important;
}

.pages [class^="page-num-"] {
  width: 50%;
  height: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #fff;
  border-radius: 2px;
  overflow: visible;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  opacity: 1;
  transition: none !important;
}

.page-gloss::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 120px;
  height: 100%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 20;
}
.page-gloss.active::after {
  opacity: 1;
}

/* Внутренняя тень сгиба книги */
.book-inner-shadow::before {
    content: "";
    position: absolute;
    top: 70px; /* <-- СДВИГ ВНУТРЕННЕЙ ТЕНИ НА verticalShift */
    left: 50%;
    width: 60px;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    transform: translateX(-50%);
    background: 
        radial-gradient(circle at top center, rgba(0,0,0,0.05), rgba(0,0,0,0) 40%) top / 100% 20% no-repeat,
        radial-gradient(circle at bottom center, rgba(0,0,0,0.05), rgba(0,0,0,0) 40%) bottom / 100% 20% no-repeat,
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.02) 10%,
            rgba(0, 0, 0, 0.05) 25%,
            rgba(0, 0, 0, 0.15) 50%,
            rgba(0, 0, 0, 0.05) 75%,
            rgba(0, 0, 0, 0.02) 90%,
            rgba(0, 0, 0, 0) 100%
        );
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.book-inner-shadow.active::before {
    opacity: 1;
}

/* Правая страница — тень слева */
.page-num-2, .page-num-4, .page-num-6 {
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Фоны страниц */
.page-num-1 { background-image: url("https://cdn.prod.website-files.com/6876a3da655d2921901118fb/693c812f35e3cd0a90806ed5_Portfolio_1_.jpg"); left:0; top:0; }
.page-num-2 { background-image: url("https://cdn.prod.website-files.com/6876a3da655d2921901118fb/6931fd9e3a12f3f36135c7a4_Portfolio_2.jpg"); left:50%; top:0; }
.page-num-3 { background-image: url("https://cdn.prod.website-files.com/6876a3da655d2921901118fb/6931fd9e3a08c48706f6159f_Portfolio_3.jpg"); left:0; top:0; }
.page-num-4 { background-image: url("https://cdn.prod.website-files.com/6876a3da655d2921901118fb/6931fd9d90c12c68faab7e61_Portfolio_4.jpg"); left:50%; top:0; }
.page-num-5 { background-image: url("https://cdn.prod.website-files.com/6876a3da655d2921901118fb/6945cb99968056542b1e661c_Portfolio_5.jpg"); left:0; top:0; }
.page-num-6 { background-image: url("https://cdn.prod.website-files.com/6876a3da655d2921901118fb/6931fda217b74106b024db7f_Portfolio_6.jpg"); left:50%; top:0; }

/* Контент */
.pages-content {
  position: absolute;
  width: 100%;
  height: 100%;
  display: table;
  top: 0;
  left: 0;
  padding: 0;
  margin: 0;
}

.content-inner {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
}
