/* カスタムカルーセル（jQueryなし） - シックなデザイン */
.carousel-container {
  position: relative;
  width: 85%;
  max-width: 800px;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 
              0 1px 3px rgba(255, 255, 255, 0.1) inset;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  min-height: 400px; /* 最小高さを保証 */
  display: block; /* 表示を確保 */
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
  background: rgba(0, 0, 0, 0.1);
  display: block; /* 表示を確保 */
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  list-style: none;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  filter: brightness(0.85) contrast(1.1) saturate(0.9);
  transition: filter 0.3s ease;
}

.carousel-slide:hover img {
  filter: brightness(0.9) contrast(1.15) saturate(1);
}

.carousel-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  color: #f8f8f8;
  padding: 24px 20px 20px;
  text-align: center;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  backdrop-filter: blur(8px);
}

.carousel-content h2 {
  margin: 0;
  font-size: 1.3em;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  color: #e8e8e8;
}

/* インジケーター - 線状デザイン（画像内配置） */
.carousel-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.carousel-dot {
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.4s ease;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.carousel-dot.active {
  background: rgba(255, 255, 255, 0.9);
  width: 30px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4),
              0 1px 3px rgba(0, 0, 0, 0.3);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.6);
  width: 25px;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .carousel-container {
    width: 95%;
    max-width: 500px;
    min-height: 280px;
  }
  
  .carousel-wrapper {
    height: 280px;
  }
  
  .carousel-content {
    padding: 18px 16px 20px;
  }
  
  .carousel-content h2 {
    font-size: 1.1em;
  }
  
  .carousel-dot {
    width: 18px;
    height: 3px;
  }
}

@media (max-width: 480px) {
  .carousel-container {
    width: 98%;
    max-width: 400px;
    min-height: 220px;
  }
  
  .carousel-wrapper {
    height: 220px;
  }
  
  .carousel-content {
    padding: 15px 12px 18px;
  }
  
  .carousel-content h2 {
    font-size: 0.95em;
    letter-spacing: 0.3px;
  }
  
  .carousel-dot {
    width: 16px;
    height: 2px;
  }
}

/* アニメーション - よりスムーズで洗練された効果 */
@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: scale(1.02);
    filter: blur(1px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

.carousel-slide.slide-in {
  animation: fadeInSlide 0.6s ease-out;
}

/* スライド切り替え時のスムーズな効果 */
.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  list-style: none;
}

.carousel-slide.active {
  opacity: 1;
}
