/* hiwork-main.css 다음에 불러오는 메인 비주얼 롤링 전용 스타일 */
.hw-hero-rolling__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.hw-hero-rolling__viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hw-hero-rolling__slide {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hw-hero-rolling__slide.is-active {
  z-index: 1;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* 강점 영역(hw-hero__features)은 활성 배너의 공통 영역 사용 여부(data-feature-use)에 따라 노출 */
.hw-hero-rolling .hw-hero__features {
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.hw-hero-rolling .hw-hero__features.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.hw-hero-rolling__title {
  margin: 0;
  color: #fff;
  font-size: 36px;
  font-weight: 600;
  line-height: 1.3;
}

@media (min-width: 901px) {
  .hw-hero-rolling .hw-hero__content,
  .hw-hero-rolling .hw-hero__features {
    width: min(1300px, calc(100% - 128px));
  }
}

.hw-hero-rolling__controls {
  position: absolute;
  inset: 0;
  z-index: 5;
  color: #fff;
  pointer-events: none;
}

.hw-hero-rolling__arrow {
  position: absolute;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0;
  opacity: 0.82;
  pointer-events: auto;
  transform: translateY(-50%);
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.hw-hero-rolling__arrow::before {
  width: 12px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
}

.hw-hero-rolling__arrow[data-hero-prev] {
  left: max(16px, calc((100% - 1300px) / 4 - 16px));
}

.hw-hero-rolling__arrow[data-hero-prev]::before {
  transform: translateX(2px) rotate(-135deg);
}

.hw-hero-rolling__arrow[data-hero-next] {
  right: max(16px, calc((100% - 1300px) / 4 - 16px));
}

.hw-hero-rolling__arrow[data-hero-next]::before {
  transform: translateX(-2px) rotate(45deg);
}

.hw-hero-rolling__arrow:hover,
.hw-hero-rolling__arrow:focus-visible {
  opacity: 1;
}

.hw-hero-rolling__count {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
}

.hw-hero-rolling__count b {
  font-weight: 700;
}

.hw-hero-rolling__pagination {
  position: absolute;
  bottom: 18px;
  left: 50%;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transform: translateX(-50%);
}

.hw-hero-rolling__pagination button {
  display: block;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.25s ease, background-color 0.25s ease;
  cursor: pointer;
}

.hw-hero-rolling__pagination button.is-active {
  width: 28px;
  background: #fff;
}

.hw-hero-rolling__pagination button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (min-width: 901px) {
  .hw-hero-rolling__pagination {
    display: flex;
  }
}

@media (max-width: 900px) {
  .hw-hero-rolling__title {
    font-size: 32px;
    line-height: 1.28;
  }

  .hw-hero-rolling__controls {
    inset: auto auto 12px 50%;
    display: grid;
    grid-template-columns: 28px auto 28px;
    align-items: center;
    min-width: 108px;
    height: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.42);
    pointer-events: auto;
    transform: translateX(-50%);
    backdrop-filter: blur(6px);
  }

  .hw-hero-rolling__arrow {
    position: static;
    width: 28px;
    height: 28px;
    transform: none;
  }

  .hw-hero-rolling__count {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .hw-hero-rolling__title {
    font-size: clamp(21px, 6vw, 28px);
  }

  .hw-hero-rolling__controls {
    bottom: 10px;
    height: 28px;
    grid-template-columns: 26px auto 26px;
  }

  .hw-hero-rolling__arrow {
    width: 26px;
    height: 26px;
  }

  .hw-hero-rolling__arrow::before {
    width: 10px;
    height: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hw-hero-rolling__slide {
    transition: none;
  }
}
