/* ==========================================================================
   Audifab - Stacked Arc-Tab Carousel Styles
   File: format-accordion.css
   ========================================================================== */

/* 容器基本尺寸与透视 */
.stacked-accordion-wrapper {
  position: relative;
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
  perspective: 1200px;
  padding-top: 38px; /* 留出右上角扇形角标的展示空间 */
}

/* 右上角弧形层叠小角标容器 */
.arc-tabs-container {
  position: absolute;
  top: 0;
  right: 18px;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  pointer-events: auto;
}

/* 扇形角标按钮 */
.arc-tab-btn {
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 7px 11px 12px;
  border-radius: 9px 9px 0 0;
  background-color: #e5e9f2;
  color: #6c757d;
  margin-left: -5px;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom center;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.04);
  /* 利用 CSS 变量与角度计算形成自然的扇形微弧度 */
  transform: translateY(calc(var(--arc-index, 0) * 2px)) rotate(calc((var(--arc-index, 0) - 2) * 3.5deg));
}

.arc-tab-btn:hover {
  background-color: #d8deec;
  color: #335eea;
  transform: translateY(-3px) scale(1.04);
  z-index: 15;
}

.arc-tab-btn.is-active {
  background-color: #335eea; /* Audifab 品牌主色 */
  color: #ffffff;
  padding-top: 10px;
  z-index: 20;
  transform: translateY(-6px) scale(1.08);
  box-shadow: 0 -4px 14px rgba(51, 94, 234, 0.38);
}

/* 主卡片叠层容器 */
.stacked-cards-deck {
  position: relative;
  width: 100%;
  height: 370px;
  background: #ffffff;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* 单张卡片（叠放隐藏态） */
.deck-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96) translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* 轮播激活置顶卡片 */
.deck-card.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  z-index: 5;
}

/* 动态背景图层（通过 style="--card-bg: url(...)" 动态注入） */
.deck-card__backdrop {
  position: absolute;
  inset: 0;
  background-image: var(--card-bg);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transition: transform 0.8s ease;
}

.deck-card.is-active .deck-card__backdrop {
  transform: scale(1.03);
}

/* 卡片下方文字蒙版与内容 */
.deck-card__content {
  position: relative;
  z-index: 2;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.92) 26%, #ffffff 100%);
  backdrop-filter: blur(5px);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
}

.deck-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #161c2d;
  margin-bottom: 0.35rem;
}

.deck-card__desc {
  font-size: 0.875rem;
  color: #6c757d;
  line-height: 1.55;
  margin-bottom: 0;
}

/* 右侧文本里的跟随高亮标签（去除了点击手型和 hover 干扰，纯作为轮播进度指示） */
.interactive-format-trigger {
  display: inline-block;
  cursor: default;
  font-weight: 700;
  color: #506690;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.04);
  transition: all 0.35s ease;
  user-select: none;
}

.interactive-format-trigger.is-active {
  background: #335eea;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(51, 94, 234, 0.25);
}

/* Audifab 配色辅助类 */
.bg-primary-soft   { background-color: rgba(51, 94, 234, 0.12); }
.bg-warning-soft   { background-color: rgba(246, 195, 67, 0.18); }
.bg-info-soft      { background-color: rgba(23, 162, 184, 0.15); }
.bg-success-soft   { background-color: rgba(66, 186, 150, 0.15); }
.bg-secondary-soft { background-color: rgba(108, 117, 125, 0.15); }

/* 移动端响应式适配 */
@media (max-width: 767.98px) {
  .stacked-cards-deck {
    height: 330px;
  }
  .stacked-accordion-wrapper {
    max-width: 100%;
  }
}