/* ========================================
   Hero Video Section
   ======================================== */

.hero-video-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 0;
  border: none;
  margin-top: -7px;
  background-color: #2d2d2d;
}

.hero-video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center center;
  max-width: 100%;
  /* 初期表示を出す（JS遅延・本番キャッシュでも真っ黒にしない） */
  opacity: 1;
  transition: opacity 0.5s ease;
}

.hero-video.hero-video-visible {
  opacity: 1;
}

.hero-video.hero-video-fade-out {
  opacity: 0;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  /* flex-end 時：余白が大きいほどタイトルが上寄り（直前位置から約30%上） */
  padding-bottom: clamp(21px, 6.5vh, 62px);
  box-sizing: border-box;
  pointer-events: none;
  z-index: 2;
}

.hero-video-content {
  pointer-events: auto;
  color: #fff;
  text-shadow: none;
  padding: clamp(16px, 2.5vw, 40px);
  padding-bottom: 0;
  margin-left: clamp(8px, 3vw, 32px);
  max-width: min(760px, 92%);
  transition: opacity 700ms ease;
}

/* 表示後：タイトル画像ブロック全体を薄く表示 */
.hero-video-content:has(.hero-video-title.is-visible) {
  opacity: 0.5;
}

/* タイトルSVG用：動画幅に比例させるためコンテナ制限を緩和 */
.hero-video-content:has(.hero-video-title[src$=".svg"]) {
  max-width: 55%;
}

.hero-video-title {
  margin: 0;
  font-size: clamp(44px, 7.5vw, 72px);
  line-height: 1.15;
  font-weight: 600;
  text-align: left;
  opacity: 0;
  transform: translateX(-24px);
  transition: transform 700ms ease, opacity 700ms ease;
}

/* SVG差し替え時: 動画幅に比例して拡大 */
.hero-video-content .hero-video-title[src$=".svg"] {
  display: block;
  height: 10.5vw;
  min-height: 56px;
  width: auto;
  max-width: none;
}

.hero-video-title.is-visible {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 768px) {
  .hero-video-overlay {
    padding-bottom: clamp(13px, 5.2vh, 42px);
  }

  .hero-video-content {
    margin-left: clamp(8px, 4vw, 20px);
  }
}

/* ========================================
   Carousel Styles - PC版専用
   ======================================== */

.carousel-pc {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* display: block; */
  margin: 0;
  border: none;
  margin-top: -7px;
}

.carousel-mobile {
  display: none;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: auto;
  margin: 0;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  flex: 0 0 100%;
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}

.carousel-slide-bg {
  position: relative;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center center;
  z-index: 1;
  display: block;
}

.carousel-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem;
  box-sizing: border-box;
  z-index: 3;
  text-align: left;
  color: white;
}

.carousel-logo {
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 3;
}

.carousel-logo img {
  max-height: 80px;
  width: auto;
}

.carousel-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
}

.carousel-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-subtitle {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.carousel-text {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.carousel-indicators {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 3;
}

.carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicator.is-active {
  background: white;
  border-color: white;
}

.carousel-indicator:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.5);
}

/* ワイドスクリーン対応 */
@media (min-width: 1920px) {
  .carousel-content {
    padding: 4rem;
  }
  
  .carousel-title {
    font-size: 4rem;
  }
  
  .carousel-subtitle {
    font-size: 2rem;
  }
  
  .carousel-text {
    font-size: 1.3rem;
  }
  
  .carousel-logo img {
    max-height: 120px;
  }
}

/* ウルトラワイド対応 */
@media (min-width: 2560px) {
  .carousel-content {
    padding: 5rem;
  }
  
  .carousel-title {
    font-size: 5rem;
  }
  
  .carousel-subtitle {
    font-size: 2.5rem;
  }
  
  .carousel-text {
    font-size: 1.5rem;
  }
}