/* //////////////////////////////////// section05 //////////////////////////////////// */

#section05 .sec_content {
  justify-content: flex-start;
}

.sec05_swipe {
  width: 55%;
}

#section05 {
  background: url(../images/bg_sec05.webp);
  background-position: center bottom;
  height: 100vh;
  background-size: 100% auto;
}

.sec05_dragon {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 450px;
  z-index: 10;
  margin-bottom: 5%;
  margin-right: 5%;
  pointer-events: none;
  cursor: none;
}

/* === 基本 Swiper 結構 === */
#section05 .swiper {
  width: 100%;
  height: 100%;
  position: relative;
  padding: 0 100px; /* 給左右箭頭預留空間 */
}

#section05 .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  text-align: center;
  transition: left 0.3s ease;
}

#section05 .swiper-slide img {
  display: block;
  width: 200%;
  height: auto;
  object-fit: cover;
  padding: 0;
  position: relative;
  padding: 1rem 0.8rem;
}

#section05 .swiper-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 100%;
  background-image: url('../images/sec06_frame.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  z-index: 4;
  pointer-events: none;
}

/* 中間圖層遮罩效果 */
#section05 .swiper-slide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 100%;
  background-image: url('../images/sec06_b.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  z-index: 5;
  pointer-events: none;
}

.swiper-slide-active::after {
  opacity: 0;
}

/* === 滑動前後位置微調 === */
#section05 .swiper-slide.swiper-slide-prev {
  justify-content: left !important;
  left: 7% !important;
}

#section05 .swiper-slide.swiper-slide-next {
  justify-content: right !important;
  right: 7% !important;
}

/* 滑動前  */
#section05 .swiper-slide.swiper-slide-prev::before,
#section05 .swiper-slide.swiper-slide-prev::after {
  left: 102% !important;
}

#section05 .swiper-slide.swiper-slide-next::before,
#section05 .swiper-slide.swiper-slide-next::after {
  left: -1.5% !important;
}

/* 滑動後  */
#section05.has-swiped .swiper-slide.swiper-slide-prev::before,
#section05.has-swiped .swiper-slide.swiper-slide-prev::after {
  left: 100% !important;
}

#section05.has-swiped .swiper-slide.swiper-slide-next::before,
#section05.has-swiped .swiper-slide.swiper-slide-next::after {
  left: -0% !important;
}

/* === 箭頭樣式 === */
.swiper-button-next,
.swiper-button-prev {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 10;
  width: 100px;
  height: 80px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center top;
}
.swiper-button-next {
  right: 15%;
  background-image: url(../images/p5_bn_r.webp);
}
.swiper-button-prev {
  left: 15%;
  background-image: url(../images/p5_bn_l.webp);
}
.swiper-button-prev:after,
.swiper-button-next:after {
  display: none !important;
}

/* === 分頁點樣式 === */
.pagination-wrapper {
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  z-index: 10;
  pointer-events: none;
}
.pagination-wrapper .swiper-pagination {
  position: static !important;
  display: flex !important;
  gap: 12px;
  pointer-events: auto;
  align-items: center;
  justify-content: center;
}
.pagination-decor.left {
  transform: rotate(180deg);
}
.swiper-pagination-bullet {
  width: 50px;
  padding: 7px 0;
  background: none !important;
  margin: 0 0.5rem !important;
  border: none;
  opacity: 0.8 !important;
  padding-bottom: 45px;
}
.swiper-pagination-bullet-active img {
  filter: brightness(1.5) !important;
  opacity: 1 !important;
  animation: btn_light2 0.8s infinite alternate;
}
@keyframes btn_light2 {
  from {
    filter: saturate(100%);
  }
  to {
    filter: saturate(200%);
  }
}

@keyframes imgPopIn {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(0.92);
  }
  60% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.img-animate {
  animation: imgPopIn 0.5s cubic-bezier(0.25, 1.5, 0.5, 1) forwards;
}

/* === RWD === */
@media screen and (max-width: 1600px) {
  /* //////////////////////////////////// section05 //////////////////////////////////// */
  .sec05_swipe {
    width: 60%;
  }

  .sec05_dragon {
    width: 400px;
    margin-bottom: 4%;
    margin-right: 3%;
  }

  #section05 .swiper-slide.swiper-slide-prev {
    left: 17px !important;
  }
  #section05 .swiper-slide.swiper-slide-next {
    right: 17px !important;
  }
  #section05.has-swiped .swiper-slide.swiper-slide-prev {
    left: 19px !important;
  }
  #section05.has-swiped .swiper-slide.swiper-slide-next {
    right: 19px !important;
  }

  .swiper-button-next,
  .swiper-button-prev {
    width: 80px;
  }
  .swiper-button-next {
    right: 15%;
  }
  .swiper-button-prev {
    left: 15%;
  }

  .swiper-pagination-bullet {
    width: 40px;
    padding-bottom: 40px;
  }
}

@media screen and (max-width: 1400px) {
  /* //////////////////////////////////// section05 //////////////////////////////////// */
  #section05 .sec_content {
    margin-top: 3%;
  }

  .sec05_dragon {
    width: 350px;
    margin-bottom: 8%;
    margin-right: 3%;
  }

  #section05 .swiper-slide.swiper-slide-prev {
    left: -4px !important;
  }
  #section05 .swiper-slide.swiper-slide-next {
    right: -4px !important;
  }
  #section05.has-swiped .swiper-slide.swiper-slide-prev {
    left: 0px !important;
  }
  #section05.has-swiped .swiper-slide.swiper-slide-next {
    right: 0px !important;
  }
  .pagination-wrapper {
    top: 65%;
  }
}

@media screen and (max-width: 1281px) {
  .pagination-wrapper {
    top: 70%;
  }
}

@media screen and (max-width: 1025px) {
  #section05 .sec_content {
    margin-top: 30%;
  }

  .swiper-button-next,
  .swiper-button-prev {
    top: 25%;
  }

  .swiper-button-next {
    right: 5%;
  }

  .swiper-button-prev {
    left: 5%;
  }

  .pagination-wrapper {
    top: 45%;
  }

  #section05 .swiper-slide img {
    width: 100% !important;
    object-fit: contain;
  }

  #section05 .swiper-slide::before,
  #section05 .swiper-slide::after {
    width: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  #section05 .swiper-slide.swiper-slide-prev,
  #section05 .swiper-slide.swiper-slide-next,
  #section05.has-swiped .swiper-slide.swiper-slide-prev,
  #section05.has-swiped .swiper-slide.swiper-slide-next {
    left: 0 !important;
    right: 0 !important;
    justify-content: center !important;
  }
  #section05 .swiper-slide:not(.swiper-slide-active) {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  #section05 .swiper-slide:not(.swiper-slide-active)::before,
  #section05 .swiper-slide:not(.swiper-slide-active)::after {
    display: none !important;
  }

  #section05 .swiper {
    padding: 0 0px;
  }

  .swiper-pagination-bullet {
    width: 32px;
    padding-bottom: 36px;
  }

  /* 特別設定 */
  .light {
    top: -1%;
  }

  /*平板以下 橫版 X 設定 */
  .sec05_swipe {
    width: 70%;
  }

  .sec05_dragon {
    width: 300px;
    margin-right: -4%;
    margin-bottom: 50%;
  }
  /* 特別設定 */
}

@media screen and (max-width: 992px) {
  /* 特別設定 */
  .light {
    top: 1%;
  }
  /* 特別設定 */
}

@media screen and (max-width: 769px) {
  /* 特別設定 */
  .sec05_swipe {
    margin: 0 auto;
  }

  /* 特別設定 */
}

@media screen and (max-width: 640px) {
  /* 特別設定 */
  .light {
    top: 3%;
  }
  .p5_lightl,
  .p5_lightr {
    width: 100%;
  }
  .p5_lightl {
    left: -70px;
    transform: rotate(6deg);
  }
  .p5_lightr {
    right: -45px;
    transform: rotate(-6deg);
  }
  /* 特別設定 */

  #section05 .sec_content {
    margin-top: 0%;
  }
}

@media screen and (max-width: 576px) {
  /* 特別設定 */

  .sec05_swipe {
    width: 80%;
  }
  #section05 .swiper-slide img {
    padding: 0.4rem 0.3rem;
  }
  .swiper-button-prev {
    left: -1%;
  }

  .swiper-button-next {
    right: -1%;
  }
  /* 特別設定 */
}

@media screen and (max-width: 480px) {
  .sec05_swipe {
    width: 90%;
    margin: 20%;
  }

  .pagination-wrapper {
    display: none;
  }

  .swiper-pagination-bullet {
    width: 30px;
    padding-bottom: 38px;
  }

  .pagination-wrapper .swiper-pagination {
    gap: 0px;
  }

  img.pagination-decor {
    width: 40px;
  }

  .swiper-button-next,
  .swiper-button-prev {
    top: 38%;
    width: 40px;
    height: 55px;
  }

  .sec05_dragon {
    width: 220px;
    margin-right: -6%;
    margin-bottom: 15%;
  }
}

@media screen and (max-width: 376px) {
  /* 特別設定 */
  .light {
    top: -3%;
  }

  .swiper-button-next,
  .swiper-button-prev {
    top: 50%;
    width: 40px;
    height: 45px;
  }

  /* 特別設定 */
  .sec05_dragon {
    width: 140px;
    margin-right: -18%;
    margin-bottom: 15%;
  }
}
