/* Shared hero carousel — home-page, portfolio-page */

body.business .hero.hero--landing.hero--carousel::before,
body.business .hero.hero--landing.hero--carousel .inftdes-hero-bg-layer {
  opacity: 0 !important;
  visibility: hidden !important;
}

body.business .inftdes-hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

body.business .inftdes-hero-slide {
  position: absolute;
  inset: 0;
  background-color: #1c1917;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition:
    opacity var(--inftdes-hero-fade-ms, 650ms) ease-out,
    transform 5s ease-out;
}

body.business .inftdes-hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

/* 首屏：JS 前先有第一張圖，減少空白等待 */
body.business.home-page .inftdes-hero-slide[data-hero-slide="0"] {
  background-image: url('/Image/Light_On_4.webp');
  background-position: center top;
}
body.business.portfolio-page .inftdes-hero-slide[data-hero-slide="0"] {
  background-image: url('/Image/Light_On_3.webp');
}
body.business.services-page .inftdes-hero-slide[data-hero-slide="0"] {
  background-image: url('/Image/Light_On_2.webp');
}
body.dark-mode.business.home-page .inftdes-hero-slide[data-hero-slide="0"] {
  background-image: url('/Image/Light_Off_4.webp');
}
body.dark-mode.business.portfolio-page .inftdes-hero-slide[data-hero-slide="0"] {
  background-image: url('/Image/Light_Off_3.webp');
}
body.dark-mode.business.services-page .inftdes-hero-slide[data-hero-slide="0"] {
  background-image: url('/Image/Light_Off_2.webp');
}
body.business .inftdes-hero-slide[data-hero-slide="0"] {
  opacity: 1;
  z-index: 1;
}

body.business .hero.hero--landing.hero--carousel .hero-layout,
body.business .hero.hero--landing.hero--carousel .hero-content,
body.business .hero.hero--landing.hero--carousel .hero-rail,
body.business .hero.hero--landing.hero--carousel .inftdes-hero-dots {
  position: relative;
  z-index: 3;
}

body.business .inftdes-hero-dots {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  z-index: 4;
}

body.business .inftdes-hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, width 0.25s ease;
  font-size: 0;
  line-height: 0;
  color: transparent;
  overflow: hidden;
  text-indent: -9999px;
  white-space: nowrap;
}

body.business .inftdes-hero-dot:hover {
  background: rgba(255, 255, 255, 0.85);
}

body.business .inftdes-hero-dot.is-active {
  width: 1.35rem;
  border-radius: 999px;
  background: var(--inftdes-accent, #d97706);
}

@media (prefers-reduced-motion: reduce) {
  body.business .inftdes-hero-slide {
    transition: opacity 0.01ms;
    transform: none !important;
  }
}
