.portfolio-section {
  width: 100%;
  max-width: 1850px;
  height: 1100px;
  padding: 0 20px;
  border-radius: 30px;
  overflow: hidden;
  margin: 40px auto;
}

.portfolio-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  object-fit: cover;
  z-index: 1;
}

/* Header */
.portfolio-header {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 978px;
  max-width: 90%;
}

.portfolio-section .portfolio-title {
  font-size: 4.5rem;
  font-weight: 500;
  font-family: "Clash Display", sans-serif;
  line-height: 78px;
  letter-spacing: -0.02em;
}

.portfolio-section .portfolio-subtitle {
  font-size: 18px;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
  line-height: 28px;
  margin-top: 8px;
}

/* Filters */
.portfolio-filters {
  position: absolute;
  top: 219px;
  left: 50%;
  transform: translateX(-50%);
  width: 1601px;
  max-width: 95%;
  z-index: 3;
}

.filter-btn {
  border: 1px solid #dd630f;
  color: black;
  font-family: "Montserrat", sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 28px;
  transition: all 0.2s ease-in-out;
  height: 50px;
}

.filter-btn.active {
  background: linear-gradient(180deg, #dd630f 0%, #ffa245 100%);
  color: #fff;
}

/* Books */
.book-row {
  gap: 32px;
  opacity: 0.5;
  z-index: 2;
}

.book-cover {
  width: 200px;
  height: 319px;
  border-radius: 24px;
  object-fit: cover;
}

/* Position */
.left-books {
  left: -170px;
  top: 413px;
}

.right-books {
  right: 135px;
  top: 413px;
}

/* Shadow ellipse */
.portfolio-shadow {
  position: absolute;
  left: 852px;
  top: 772px;
  z-index: 2;
  opacity: 0.7;
  filter: blur(11.8px);
  transform: rotate(-7.8deg);
}

/* Slider wrapper */
.portfolio-slider {
  position: absolute;
  top: 400px;
  left: 0%;
  width: 100%;
  /* transform: translateX(-50%); */
  /* width: 100%;
  max-width: 1400px; */
  z-index: 5;
}

/* Swiper */
.mySwiper {
  width: 100%;
  height: 500px;
}

.book-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.book-cover {
  width: 300px;
  height: 380px;
  border-radius: 20px;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.6s ease;
  opacity: 0.6;
  transform: scale(0.8);
}

/* Active (center) slide */
.swiper-slide-active .book-cover {
  transform: scale(1.25) rotate(-6deg);
  opacity: 1;
  /* box-shadow: 0px 15px 35px rgba(0, 0, 0, 0.35); */
  z-index: 10;
}

/* Side slides */
.swiper-slide-prev .book-cover,
.swiper-slide-next .book-cover {
  transform: scale(0.95);
  opacity: 0.8;
}

@media (min-width: 1024px) and (max-width: 1550px) {
  .portfolio-section {
    max-width: 96%;
    height: 900px;
    border-radius: 24px;
    margin: 20px auto;
    padding: 0 20px;
  }

  .portfolio-bg {
    border-radius: 24px;
  }

  .portfolio-header {
    top: 45px;
    width: 750px;
  }

 .portfolio-section .portfolio-title {
    font-size: 3.5rem;
    line-height: 60px;
  }

  .portfolio-section .portfolio-subtitle {
    font-size: 16px;
    line-height: 24px;
  }

  .portfolio-filters {
    top: 200px;
    width: 1100px;
    max-width: 92%;
  }

  .filter-btn {
    font-size: 1rem;
    height: 45px;
    padding: 8px 14px;
  }

  .portfolio-slider {
    top: 290px;
    height: 500px;
  }

  .mySwiper {
    height: 500px;
  }

  .book-cover {
    width: 170px;
    height: 270px;
  }

  .swiper-slide-active .book-cover {
    transform: scale(1.35) rotate(-5deg);
    opacity: 1;
    box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.4);
  }

  .left-books {
    left: -100px;
    top: 330px;
  }

  .right-books {
    right: 60px;
    top: 330px;
  }

  .portfolio-shadow {
    left: 650px;
    top: 640px;
  }
}

@media (max-width: 835px) {
  .portfolio-section {
    width: 100%;
    border-radius: 24px;
    padding: 0 15px;
  }

  .portfolio-header {
    top: 30px;
    width: 90%;
  }

  .portfolio-section .portfolio-title {
    font-size: 2.5rem;
    line-height: 45px;
  }

 .portfolio-section .portfolio-subtitle {
    font-size: 14px;
    line-height: 22px;
  }

  .portfolio-filters {
    top: 160px;
    width: 95%;
  }

  .filter-btn {
    font-size: 14px;
    height: 42px;
    padding: 6px 12px;
  }

  .portfolio-slider {
    top: 360px;
    height: 990px;
    left: 0;
    width: 100%;
  }

  .mySwiper {
    height: 550px;
  }

  /* .book-cover {
    width: 540px;
    height: 420px;
  } */
}

@media (max-width: 576px) {
  .portfolio-section {
    width: 100%;
    border-radius: 20px;
    padding: 0 10px;
    margin: 20px auto;
  }

  .portfolio-header {
    top: 25px;
    width: 95%;
  }

  .portfolio-section .portfolio-title {
    font-size: 1.8rem;
    line-height: 35px;
  }

  .portfolio-section .portfolio-subtitle {
    font-size: 12px;
    line-height: 18px;
    margin-top: 5px;
  }

  .portfolio-filters {
    top: 180px;
    width: 98%;
  }

  .filter-btn {
    font-size: 12px;
    height: 38px;
    padding: 5px 10px;
  }

  .portfolio-slider {
    top: 440px;
    height: 990px;
    left: 0;
    width: 100%;
  }

  .mySwiper {
    height: 520px;
    padding: 0 20px;
  }

  .book-cover {
    width: 160px;
    height: 250px;
    border-radius: 16px;
  }

  .left-books,
  .right-books {
    display: none;
  }

  .portfolio-shadow {
    display: none;
  }
}
