.custom-carousel {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 900px;
  overflow: hidden;
}
@media (min-width: 1700px) {
  .custom-carousel {
    max-width: 1400px;
    transform: translateX(-50%);
  }
}
@media (max-width: 1440px) {
  .custom-carousel {
    max-width: 850px;
    transform: translateX(-50%);
  }
}
@media (max-width: 1250px) {
  .custom-carousel {
    max-width: 650px;
  }
}
@media (max-width: 1030px) {
  .custom-carousel {
    max-width: unset;
    transform: translateX(-50%);
  }
}
.carousel-slides {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8; /* 横16:縦8などお好みで */ /*MV系は使える*/
  overflow: hidden;
}
.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.6s;
  z-index: 1;
}
.carousel-slide.active {
  opacity: 1;
  z-index: 2;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 0;
  transition:
    filter 1s,
    opacity 1s;
  filter: blur(0);
  opacity: 1;
}
.carousel-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 450px;
  max-width: 90vw;
  color: #000;
  font-size: 1.5rem;
  text-align: center;
  opacity: 0;
  padding: 20px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 10px;
  transition: opacity 1s;
  pointer-events: none;
  box-sizing: border-box;
}
@media (max-width: 600px) {
  .carousel-overlay {
    width: 300px;
    max-width: 90vw;
    font-size: 1rem;
  }
}
@media (max-width: 500px) {
  .carousel-overlay {
    width: 300px;
    font-size: 0.9rem;
    padding: 10px;
  }
}
@media (max-width: 400px) {
  .carousel-overlay {
    font-size: 0.8rem;
  }
}
.carousel-overlay .sub-text {
  display: block;
  margin-top: 10px;
  font-size: 1rem;
  color: #000;
}
@media (max-width: 600px) {
  .carousel-overlay .sub-text {
    font-size: 0.8rem;
  }
}
@media (max-width: 400px) {
  .carousel-overlay .sub-text {
    font-size: 0.6rem;
  }
}
.carousel-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.carousel-overlay .btn-area {
  text-align: center;
  margin-top: 10px;
}
@media (max-width: 500px) {
  .carousel-overlay .btn-area {
    text-align: right;
  }
}
.carousel-btn {
  display: inline-block;
  padding: 10px 30px;
  background: #004ea2;
  color: #fff;
  font-size: 1rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  box-sizing: border-box;
  border: 1px solid transparent; /* ←追加 */
}
.carousel-btn:hover {
  background: #fff;
  color: #004ea2;
  border: 1px solid #004ea2;
  box-sizing: border-box;
}
@media (hover: none) {
  .carousel-btn:hover {
    background: #004ea2;
    color: #fff;
    border: 1px solid transparent;
  }
}
@media (max-width: 600px) {
  .carousel-btn {
    font-size: 0.8rem;
    padding: 10px;
  }
}
@media (max-width: 400px) {
  .carousel-btn {
    font-size: 0.6rem;
  }
}
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border: none;
  font-size: 2em;
  padding: 0.2em 0.6em;
  cursor: pointer;
  z-index: 3;
}
@media (max-width: 500px) {
  .carousel-prev,
  .carousel-next {
    font-size: 1.2em;
    padding: 0.3em 0.4em;
  }
}
.carousel-prev {
  left: 10px;
}
.carousel-next {
  right: 10px;
}
.carousel-pagination {
  position: absolute;
  left: 50%;
  bottom: 15px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.5;
  cursor: pointer;
  border: 1px solid #888;
  transition: opacity 0.3s;
}
.carousel-dot.active {
  opacity: 1;
  background: #333;
}
