:root {
   --book-height: 80vh;
   --book-width: 820px;
}

.book {
   transition: opacity 0.4s 0.2s;
   perspective: 250vw;
   margin-top: 40px;
   margin-bottom: 40px;

   -webkit-user-select: none;
   -moz-user-select: none;
   -ms-user-select: none;
   user-select: none;
}

@media (max-width: 767px) {
   .book {
      margin-bottom: 0;
   }
}

.book .pages {
   height: var(--book-height);
   max-width: var(--book-width);
   width: 100%;
   margin-left: auto;
   margin-right: auto;
   position: relative;
   transform-style: preserve-3d;
   backface-visibility: hidden;
   border-radius: 4px;
}

.book .page {
   float: none;
   clear: none;
   margin: 0;
   position: absolute;
   top: 0;
   width: 50%;
   height: var(--book-height);
   min-height: 450px;
   max-height: 450px;
   transform-origin: 0 0;
   transition: transform 1.4s;
   backface-visibility: hidden;
   transform-style: preserve-3d;
   cursor: pointer;
   user-select: none;
   background-color: #f0f0f0;
}


@media (min-width: 1400px) {
   :root {
      --book-height: 50vh;
   }
}

@media (max-width: 660px) {
   .book .page {
      transform-origin: 0 100%;
      top: 0;
      height: 50%;
      min-height: auto;
      width: 100%;
   }
}

.book .page:nth-child(odd):before,
.book .page:nth-child(even):before {
   content: "";
   position: absolute;
   left: 10px;
   top: 10px;
   right: 10px;
   bottom: 10px;
   border: 1px dashed #016d38;
}

.book .page:nth-child(even):before {
   border: 1px dashed #fff;
}

.page:nth-child(even) {
   clear: both;
}

.book .page:nth-child(odd) {
   pointer-events: all;
   transform: rotateY(0deg);
   right: 0;
   border-radius: 0 4px 4px 0;
   background-image: linear-gradient(to right, rgba(0, 0, 0, 0.1) 0%, rgb(250 250 250 / 0.8) 10%);
   filter: drop-shadow(3px 3px 3px rgba(0, 0, 0, 0.02));
}

@media (max-width: 660px) {
   .book .page:nth-child(odd) {
      transform: rotateX(0deg);
      border-radius: 0 0 4px 4px;
      background-image: linear-gradient(to top, rgba(0, 0, 0, 0.1) 0%, rgb(250 250 250 / 0.8) 10%);
   }
}

.book .page:nth-child(odd):hover {
   transform: rotateY(-15deg);
}

@media (max-width: 660px) {
   .book .page:nth-child(odd):hover {
      transform: rotateX(-15deg);
   }
}

.book .page:nth-child(even) {
   pointer-events: none;
   transform: rotateY(180deg);
   transform-origin: 100% 0;
   left: 0;
   border-radius: 4px 0 0 4px;
   border-color: black;
   background-image: linear-gradient(to right, rgba(0, 0, 0, 0.1) 0%, rgb(250 250 250 / 80%) 10%);
}

@media (max-width: 660px) {
   .book .page:nth-child(even) {
      transform: rotateX(180deg);
      transform-origin: 0 0;
      top: auto;
      bottom: 0;
      border-radius: 4px 4px 0 0;
      background-image: linear-gradient(to bottom, rgba(0, 0, 0, .12) 0%, rgb(250 250 250 / 0) 10%);
   }
}

.book .page.grabbing {
   transition: none;
}

.book .page.flipped:nth-child(odd) {
   pointer-events: none;
   transform: rotateY(-180deg);
}

@media (max-width: 660px) {
   .book .page.flipped:nth-child(odd) {
      transform: rotateX(-180deg);
   }
}

.book .page.flipped:nth-child(even) {
   pointer-events: all;
   transform: rotateY(0deg);
}

@media (max-width: 660px) {
   .book .page.flipped:nth-child(even) {
      transform: rotateX(0deg);
   }
}

.book .page.flipped:nth-child(even):hover {
   transform: rotateY(15deg);
}

@media (max-width: 660px) {
   .book .page.flipped:nth-child(even):hover {
      transform: rotateX(15deg);
   }
}

.page:nth-child(odd) {
   background-position: right top;
}

.custom {
   height: 100%;
   padding: 20px;
   overflow: auto;
   display: flex;
   align-items: center;
   justify-content: center;
}

.custom img {
   max-width: 100%;
   max-height: 100%;
   mix-blend-mode: multiply;
}


.textContainer {
   position: absolute;
   padding: 20px;
   height: 90%;
   top: 5%;
   overflow-y: auto;
   width: 90%;
   left: 5%;
   display: flex;
   align-items: center;
   justify-content: center;
   flex-wrap: wrap;
}

@media (max-width: 767px) {
   .textContainer {
      top: 0%;
   }
}

/*.longText{
   overflow-y: scroll;
   width: 90%;
   left: 5%;
}*/

/*Scrollbar styles*/
.textContainer::-webkit-scrollbar {
   width: 8px;
   /* Tamaño del scroll en vertical */
   height: 8px;
   /* Tamaño del scroll en horizontal */
   right: 10px;
   /*display: none;  /* Ocultar scroll */
}

.textContainer::-webkit-scrollbar-thumb {
   border-radius: 4px;
   background: rgba(255, 255, 255, .3);
}

.textContainer::-webkit-scrollbar-thumb:hover {
   background: rgba(255, 255, 255, .7);
   box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.2);
}

.textContainer::-webkit-scrollbar-thumb:active {
   background-color: #ffffff;
}

/* Ponemos un color de fondo y redondeamos las esquinas del track */
.textContainer::-webkit-scrollbar-track {
   background: rgba(0, 0, 0, 0.3);
   ;
   border-radius: 4px;
}

/* Cambiamos el fondo cuando esté en active o hover */
/*.textContainer::-webkit-scrollbar-track:hover,
.textContainer::-webkit-scrollbar-track:active {
   background: rgb(255, 255, 255);
}*/
/*Scrollbar styles*/

.textBook,
.textContainer ol li {
   font-size: 26px;
   font-family: "Roboto";
   /*color: #fff;*/
   text-align: center;
   line-height: 1.3;
   text-shadow: 4px 3px 2px rgba(0, 0, 0, .1);
}

.textContainer ol li {
   text-align: left;
}

.textContainer ol {
   margin-bottom: 0;
   margin-left: -1rem;
}

/*.longText{
   font-size: 14px;
}*/

@media (max-width: 992px) {

   .textBook,
   .textContainer ol li {
      font-size: 23px;
   }
}

@media (max-width: 660px) {

   .textBook,
   .textContainer ol li {
      font-size: 22px;
      margin-bottom: 0;
   }
}

@media (max-width: 576px) {

   .textBook {
      font-size: 18px;
      line-height: 1.2;
   }

   .textContainer ol li {
      font-size: 18px;
      line-height: 1.2;
   }
}

.pageno {
   top: 0;
   position: absolute;
   width: 50%;
   height: var(--book-height);
   display: flex;
   flex-direction: column;
   justify-content: flex-end;
   align-items: center;
   font-size: 1rem;
}

.custom.coverPage__portada {
   display: flex;
   flex-flow: column;
   justify-content: space-evenly;
}

.custom.coverPage__portada h2 {
   margin: 0;
   text-align: center;
   font-family: "Roboto";
   font-weight: bold;
   margin: 0 auto;
   background: #fff5d9;
   padding: 10px 20px;
   border-radius: 10px;
   border: 2px dashed #ffdc5d;
   color: #016d38;
   font-size: 30px;
   display: inline-block;
   max-width: 90%;
}

.custom.coverPage__portada img {
   max-width: 100%;
   mix-blend-mode: multiply;
}

.custom.coverPage__portada img.tituloRedi {
   margin-top: 10px;
}

@media (max-width:660px) {
   .custom.coverPage__portada img {
      max-height: 60%;
   }

   .custom.coverPage__portada h2 {
      font-size: 22px;
      max-width: max-content;
      border-radius: 10px;
      padding: 5px;
   }

   .custom.coverPage__portada img.tituloRedi {
      margin-top: 0;
      max-width: 200px;
   }
}



.coverPage {
   background-image: url(../img/pattern.png);
   background-repeat: repeat;
   /*background-position: left top;*/
   /*background-size: 30px;*/
   background-blend-mode: multiply;
}

.coverPage1 {
   background-color: #016d38;
   color: #fff;
}

.coverPage2 {
   background-color: #ffdc5d;
   color: #016d38;
}

.reinit {
   background-color: #ffdc5d;
   border: none;
   padding: 10px;
   border-radius: 7px;
   color: #016d38;
   font-size: 25px;
   font-weight: bold;
   font-family: "Roboto";
}

.reinit img {
   width: 40px;
   margin-right: 10px;
}