/**
 * 메인 배너 위 키워드 로테이션 (중괄호 고정, 내부만 fade / slide 전환)
 */

.main-banner-stack {
  position: relative;
  width: 100%;
}

.main-banner-stack > .carousel {
  position: relative;
  z-index: 0;
}

/* 배너 이미지 위 문구·그라데이션 오버레이 비표시 (다시 보이게: display를 flex로) */
.main-hero-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(1.75rem, 5vw, 3.75rem) 1rem 1rem;
  box-sizing: border-box;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.52) 0%,
    rgba(0, 0, 0, 0.28) 42%,
    transparent 78%
  );
}

.main-hero-copy-inner {
  max-width: 1072px;
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

.main-hero-title {
  margin: 0;
  font-size: clamp(1.25rem, 3.2vw, 1.875rem);
  font-weight: 600;
  line-height: 1.45;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* 키워드 + 고정 중괄호 */
.main-hero-title .highlight {
  color: #ef4044;
  font-weight: 700;
  display: inline;
  vertical-align: baseline;
}

.rolling-bracket {
  color: #ef4044;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* 가변 키워드만 이 영역에서 페이드 */
.rolling-text-slot {
  display: inline-block;
  vertical-align: baseline;
  text-align: center;
  min-width: min(100%, 9.5em);
  max-width: 100%;
}

@media (min-width: 768px) {
  .rolling-text-slot {
    min-width: 10.5em;
  }
}

.rolling-text {
  display: inline-block;
  width: 100%;
  white-space: nowrap;
  will-change: opacity, transform;
}

/* duration은 JS에서 --rolling-animation-ms */
.rolling-text--fade {
  transition:
    opacity var(--rolling-animation-ms, 500ms) ease,
    transform var(--rolling-animation-ms, 500ms) ease;
}

.rolling-text--fade.is-dimmed {
  opacity: 0;
  transform: translateY(4px);
}

.rolling-text--slide {
  transition:
    opacity var(--rolling-animation-ms, 500ms) ease,
    transform var(--rolling-animation-ms, 500ms) ease;
}

.rolling-text--slide.is-dimmed {
  opacity: 0;
  transform: translateY(0.6em);
}

.main-hero-title-suffix {
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.main-hero-sub {
  display: block;
  margin-top: 0.35em;
  font-size: 0.92em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.5;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

@media (max-width: 576px) {
  .main-hero-banner-overlay {
    padding: 1.35rem 0.75rem 0.75rem;
  }

  .rolling-text-slot {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rolling-text--fade,
  .rolling-text--slide {
    transition: none !important;
  }

  .rolling-text--fade.is-dimmed,
  .rolling-text--slide.is-dimmed {
    transform: none;
  }
}
