.s-ebooks {
  margin-bottom: -100px;
  position: relative;
}

@media (max-width:700px) {
  .s-ebooks {
    margin-bottom: -350px;
  }
}

.ebook__box {
  display: flex;
  align-items: center;
  text-align: left;
}

@media (max-width: 700px) {
  .ebook__box {
    flex-direction: column;
  }
}

.ebook__column-1 {
  width: 58%;
}

.ebook__column-1.main--new-ebook {
  left: 230px;
  position: relative;
  z-index: -1;
  height: 439px;
  object-fit: cover;
}

.ebook__column-2 {
  width: 40%;
}

@media (max-width: 1111px) {
  .ebook__column-1.main--new-ebook {
    height: auto;
    object-fit: initial;
  }
}

@media (max-width: 950px) {
  .ebook__column-1.main--new-ebook {
    left: 160px;
  }
}

@media (max-width:700px) {
  .ebook__column-1 {
    width: 100%;
    height: 100%;
    margin-left: -30%;
  } 

  .ebook__column-1.new-ebook,
  .ebook__column-1.main--new-ebook {
    margin-left: 30%;
    left: 0;
  }

  .ebook__column-2 {
    width: 85%;
    margin-bottom: 40px;
    text-align: center;
  } 
}

.ebook__column-2 p {
  color: var(--grey-500);
  font-size: var(--font-400);
  line-height: 160%;
  margin-bottom: 10px;
}

.title--ebook {
  color: var(--grey-800);
  font-size: var(--font-700);
  font-weight: 600;
  line-height: 120%;
  margin-bottom: 30px;
}

.buttons-slider,
.buttons-slider-modal {
  position: absolute;
  top: var(--swiper-navigation-top-offset,50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  left: 17%;
  right: 7%;
  z-index: 10;
}

@media (max-width:700px) {
  .buttons-slider {
    top: var(--swiper-navigation-top-offset);
    justify-content: center;
    gap: 15px;
  }
}

.swiper-slide {
  background: transparent !important;
}

.swiper-button-prev-ebooks,
.swiper-button-prev-ebooks-modal {
  transform: rotate(180deg);
}

.swiper-button-prev-ebooks,
.swiper-button-next-ebooks,
.swiper-button-prev-ebooks-modal,
.swiper-button-next-ebooks-modal {
  display: flex;
  align-items: center;
  width: fit-content;
  vertical-align: middle;
  background: none;

  border: 1px solid var(--green-400);
  border-radius: 4px;
  padding: 15px 20px;
}

.swiper-button-prev-ebooks:hover,
.swiper-button-next-ebooks:hover,
.swiper-button-prev-ebooks-modal:hover,
.swiper-button-next-ebooks-modal:hover {
  opacity: 0.8;
  transition: all 1s;
}

.swiper-button-disabled {
  background-color: #ebebeb;
  cursor:unset;
}

.swiper-button-prev-ebooks-modal.swiper-button-disabled,
.swiper-button-next-ebooks-modal.swiper-button-disabled {
  background-color: transparent;
  opacity: 0.4;
}

.swiper-button-disabled:hover {
  opacity: 1;
}

.swiper-button-prev-ebooks-modal.swiper-button-disabled:hover,
.swiper-button-next-ebooks-modal.swiper-button-disabled:hover {
  opacity: 0.4;
}

.buttons__box {
  display: flex;
  align-items: center;
  gap: 15px;
}

.buttons__box .btn {
  max-width: 150px;
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  border-radius: 100px;
  font-size: var(--font-400);
  font-weight: 500;
  cursor: pointer;
  gap: 15px;
  transition: all 500ms;
}

.buttons__box .btn:hover {
  opacity: 0.8;
}

.buttons__box .btn.js-ebooks-open-section-btn {
  display: none;
}

@media (max-width:700px) {
  .buttons__box {
    justify-content: center;
  }
  
  .buttons__box .btn {
    font-size: 12px;
  }

  .buttons__box .btn.js-ebooks-open-section-btn {
    display: flex;
  }

  .buttons__box .btn.js-ebooks-open-modal-btn {
    display: none;
  }
}

.button--filled {
  background-color: var(--green-400);
  color: var(--white);
}

.button--default,
.button--others {
  border: 1px solid var(--green-400);
  color: var(--green-400);
  background-color: var(--white);
}

.button--default:hover {
  background-color: var(--green-400);
  color: var(--white);
}

/* EBOOKS MODAL */

.modal--ebooks {
  width: 1060px;
  background-color: var(--green-400);
  border-radius: 14px;
  overflow: hidden;
  padding: 60px;
  height: max-content;
  font-family: Inter, sans-serif;
}

.header--modal {
  position: relative;
  margin-bottom: 40px;
}

.header--modal h1 {
  text-align:center;
  color: var(--white);
  font-size: var(--font-600);
  font-weight: 400;
}

.box__books {
  display:flex;
  align-items: center;
  justify-content: center;
  gap: 70px;
}

.m-wrapper {
  --border-box-height: 240px;
  --img-height: 240px;

  position: relative;
  max-width: 250px;
  width: 100%;
  height: calc(var(--border-box-height) + var(--img-height) - var(--img-height) / 2);
  overflow-x: hidden;
}

.m-wrapper span {
  display: block;
}

.m-wrapper .book img {
  position: absolute;
  top: 0;
  right: 50px;
  display: block;
  max-height: var(--img-height);
  height: 100%;
  width: auto;
  object-fit: cover;
}

.m-wrapper .book img.new-ebook {
  right: -132px;
  object-fit: cover;
  max-width: 360px;
  max-height: 230px;
}

.m-wrapper .book--text {
  height: var(--border-box-height);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 30px;
  border: 1px solid var(--green-300);
  border-radius: 14px;
  margin-top: calc(var(--img-height) / 2);
  transition: all .2s ease-in;
}

.m-wrapper .book--text * {
  max-width: 80%;
}

.m-wrapper .book--text h4 {
  color: var(--white);
  text-align: center;
  font-size: var(--font-500);
  font-weight: 700;
  line-height: 1.25;
}

.m-wrapper .book--text button {
  display: block;
  width: 100%;
  text-decoration: none;
  color: var(--green-400);
  background: var(--white);
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 12px;
  border-radius: 18px;
  height: 0;
  padding: 0;
  opacity: 0;
  margin-top: 0;
  cursor: pointer;
  line-height: 1.1;
  pointer-events: none;
}

.m-wrapper:hover img,
.m-wrapper:focus-within img {
  max-height: 200px;
  right: 30px;
}

.m-wrapper:hover .book--text,
.m-wrapper:focus-within .book--text {
  background-color: var(--green-300);
}

.m-wrapper:hover .book--text h4,
.m-wrapper:focus-within .book--text h4 {
  color: var(--green-500);
}

.m-wrapper:hover .book--text button,
.m-wrapper:focus-within .book--text button {
  height: max-content;
  padding: 10px 12px;
  opacity: 1;
  margin-top: 20px;
}

.modal-ebooks .box__books {
  gap: 40px;
}

.buttons-slider-modal {
  right: initial;
  left: initial;
  width: 100%;
}

.swiper-button-prev-ebooks-modal,
.swiper-button-next-ebooks-modal {
  border: none;
  padding: 0;
}

.swiper-button-prev-ebooks-modal img,
.swiper-button-next-ebooks-modal img {
  width: 20px;
}

.swiper-horizontal>.swiper-pagination-bullets, 
.swiper-pagination-bullets.swiper-pagination-horizontal {
  bottom: -30px !important;
}

.swiper-pagination-bullet {
  background: var(--white) !important;
  opacity: 1 !important;
}

.swiper-pagination-bullet-active {
  background: var(--green-300) !important;
}

/* ALL EBOOKS */

.s-all-ebooks {
  display: none;
  background-color: var(--green-200);
  padding-top: 445px;
}

.s-all-ebooks.active {
  display: block;
}

.all-ebooks-box {
  display: flex;
  flex-wrap: wrap;
}

.ebook__box.small {
  flex: 50%;
}

.ebook__box.small h2 {
  font-size: var(--font-400);
  text-align: center;
}

.ebook__box.small .buttons__box {
  justify-content: center;
}

.ebook__box.small a {
  font-size: 10px;
  height: 40px;
}

.ebook__box button img {
  transform: rotate(90deg);
  width: 10px;
}

.ebook__box button img.active {
  transform: rotate(-90deg);
}