/*
 * Hero2模块样式（Tab联动版本）
 */
.zpa-hero2-module {
  --zpa-hero2-primary: var(--main_color, #2f5cff);
  --zpa-hero2-bg: #eef3ff;
  --zpa-hero2-bottom: #ffffff;
  --zpa-hero2-left: 20%;
  --zpa-hero2-right: 80%;
  position: relative;
  overflow: hidden;
  background: var(--zpa-hero2-bottom);
}

.zpa-hero2-module .zpa-hero2-top {
  background: var(--zpa-hero2-bg);
  padding: 48px 0 88px;
  position: relative;
}

.zpa-hero2-module.zpa-hero2-has-slider-height .zpa-hero2-top {
  min-height: var(--zpa-hero2-slider-h-pc);
}

.zpa-hero2-module .zpa-hero2-top-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.zpa-hero2-module .zpa-hero2-top-bg-layer {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.zpa-hero2-module .zpa-hero2-top-bg-layer.is-active {
  opacity: 1;
}

.zpa-hero2-module .zpa-hero2-top .page-width {
  position: relative;
  z-index: 1;
}

.zpa-hero2-module .zpa-hero2-main {
  display: grid;
  grid-template-columns: var(--zpa-hero2-left) var(--zpa-hero2-right);
  gap: 24px;
  min-height: 280px;
  align-items: stretch;
}

.zpa-hero2-module .zpa-hero2-menu {
  border-right: 2px solid rgb(255, 255, 255);
  display: flex;
  align-items: center;
}

.zpa-hero2-module .zpa-hero2-menu-list {
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.zpa-hero2-module .zpa-hero2-menu-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 20px 28px 20px 8px;
  line-height: 1.25;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  user-select: none;
}

.zpa-hero2-module .zpa-hero2-menu-item:after {
  content: "";
  position: absolute;
  right: -2px;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--zpa-hero2-primary);
  opacity: 0;
  transform: scaleY(0.3);
  transform-origin: center;
  transition: width 0.32s ease, opacity 0.32s ease, transform 0.32s ease;
}

.zpa-hero2-module .zpa-hero2-menu-item.is-active {
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
}

.zpa-hero2-module .zpa-hero2-menu-item.is-active:after {
  width: 2px;
  opacity: 1;
  transform: scaleY(1);
}

.zpa-hero2-module .zpa-hero2-badge {
  min-width: 34px;
  padding: 2px 6px;
  text-align: center;
  border-radius: 3px;
  font-size: 11px;
  color: #fff;
  background: #ff4d4f;
}

.zpa-hero2-module .zpa-hero2-tab-title {
  color: #1d2433;
  font-size: 15px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 44px);
}

.zpa-hero2-module .zpa-hero2-right-wrap {
  position: relative;
  min-height: 280px;
}

.zpa-hero2-module .zpa-hero2-dots {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.zpa-hero2-module .zpa-hero2-panel {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(260px, 52%) minmax(200px, 48%);
  gap: 8px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  min-height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s ease;
}

.zpa-hero2-module .zpa-hero2-panel.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.zpa-hero2-module .zpa-hero2-panel:before {
  content: none;
}

.zpa-hero2-module .zpa-hero2-panel-content {
  position: relative;
  z-index: 2;
  padding-right: 10px;
  padding-left: 20px;
  animation: zpaHero2Fade 0.45s ease both;
}

.zpa-hero2-module .zpa-hero2-title {
  margin: 0 0 14px;
  font-size: 32px;
  line-height: 1.15;
  color: #1f2b3d;
  font-weight: 700;
}

.zpa-hero2-module .zpa-hero2-content-text {
  margin: 8px 0 36px;
  color: #5b6478;
  font-size: 16px;
  line-height: 1.65;
}

.zpa-hero2-module .zpa-hero2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 136px;
  height: 42px;
  border-radius: 4px;
  background: var(--zpa-hero2-primary);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(47, 92, 255, 0.28);
  transition: background-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}

.zpa-hero2-module .zpa-hero2-btn:hover {
  background: #5a7dff;
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(47, 92, 255, 0.34);
}

@supports (color: color-mix(in srgb, #000 50%, #fff)) {
  .zpa-hero2-module .zpa-hero2-btn:hover {
    background: color-mix(in srgb, var(--zpa-hero2-primary) 90%, #ffffff);
  }
}

.zpa-hero2-module .zpa-hero2-visual {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zpaHero2Fade 0.45s ease both;
}

.zpa-hero2-module .zpa-hero2-visual img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  animation: zpaHero2Float 4.6s ease-in-out infinite;
}

@keyframes zpaHero2Float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-9px) rotate(1.5deg); }
}

@keyframes zpaHero2Fade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.zpa-hero2-module .zpa-hero2-bottom {
  margin: -48px 0 48px;
  position: relative;
  z-index: 5;
}

.zpa-hero2-module .zpa-hero2-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.zpa-hero2-module .zpa-hero2-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 88px;
  background: #fff;
  border: 1px solid rgba(47, 92, 255, 0.1);
  border-radius: 6px;
  padding: 24px 26px;
  text-decoration: none;
  box-shadow: 0 10px 16px -8px rgba(40, 56, 98, 0.22);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  will-change: transform;
}

.zpa-hero2-module .zpa-hero2-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 92, 255, 0.1);
  box-shadow:
    0 20px 28px -12px rgba(40, 56, 98, 0.30),
    0 14px 24px -14px rgba(47, 92, 255, 0.32);
}

@supports (color: color-mix(in srgb, #000 50%, transparent)) {
  .zpa-hero2-module .zpa-hero2-card:hover {
    border-color: rgba(47, 92, 255, 0.1);
    box-shadow:
      0 20px 28px -12px rgba(40, 56, 98, 0.30),
      0 14px 24px -14px color-mix(in srgb, var(--zpa-hero2-primary) 34%, transparent);
  }
}

.zpa-hero2-module .zpa-hero2-card-body {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  text-align: left;
}

.zpa-hero2-module .zpa-hero2-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zpa-hero2-module .zpa-hero2-card-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.zpa-hero2-module .zpa-hero2-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.zpa-hero2-module .zpa-hero2-card-title {
  color: #1f2b3d;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
  transition: color 0.28s ease;
}

.zpa-hero2-module .zpa-hero2-card:hover .zpa-hero2-card-title {
  color: var(--zpa-hero2-primary);
}

.zpa-hero2-module .zpa-hero2-card-desc {
  color: #5f6980;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 1200px) {
  .zpa-hero2-module .zpa-hero2-title {
    font-size: 26px;
  }
}

@media (max-width: 980px) {
  .zpa-hero2-module .zpa-hero2-main {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .zpa-hero2-module .zpa-hero2-menu {
    border-right: 0;
    border-bottom: 1px solid rgba(47, 92, 255, 0.25);
    padding: 0 0 12px;
  }
  .zpa-hero2-module .zpa-hero2-menu-item {
    justify-content: flex-start;
    border-radius: 8px;
    padding-right: 10px;
  }
  .zpa-hero2-module .zpa-hero2-menu-item:after {
    right: auto;
    left: 0;
  }
  .zpa-hero2-module .zpa-hero2-tab-title {
    text-align: left;
    max-width: calc(100% - 44px);
  }
  .zpa-hero2-module .zpa-hero2-panel.is-active {
    grid-template-columns: 1fr;
  }
  .zpa-hero2-module .zpa-hero2-right-wrap {
    min-height: 360px;
  }
  .zpa-hero2-module .zpa-hero2-panel:before {
    width: 100%;
    opacity: 0.3;
  }
  .zpa-hero2-module .zpa-hero2-visual {
    justify-content: flex-start;
  }
  .zpa-hero2-module .zpa-hero2-bottom {
    margin-top: 12px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .zpa-hero2-module .zpa-hero2-main {
    grid-template-columns: minmax(180px, 30%) minmax(0, 70%);
    min-height: 260px;
  }

  .zpa-hero2-module .zpa-hero2-bottom {
    margin: -48px 0 48px;
  }

  .zpa-hero2-module .zpa-hero2-menu {
    border-right: 1px solid rgba(47, 92, 255, 0.25);
    border-bottom: 0;
    padding: 0 14px 0 0;
    min-height: 0;
  }

  .zpa-hero2-module .zpa-hero2-menu-item {
    justify-content: flex-end;
    border-radius: 8px 0 0 8px;
    padding-right: 16px;
  }

  .zpa-hero2-module .zpa-hero2-menu-item:after {
    right: -2px;
    left: auto;
  }

  .zpa-hero2-module .zpa-hero2-tab-title {
    text-align: right;
  }

  .zpa-hero2-module .zpa-hero2-right-wrap {
    min-height: 260px;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
  }

  .zpa-hero2-module .zpa-hero2-panel.is-active {
    grid-template-columns: 1fr;
  }

  .zpa-hero2-module .zpa-hero2-visual {
    display: none;
  }

  .zpa-hero2-module .zpa-hero2-cards {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .zpa-hero2-module .zpa-hero2-card {
    grid-column: span 2;
  }

  .zpa-hero2-module .zpa-hero2-card:last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
  }

  .zpa-hero2-module .zpa-hero2-card:last-child:nth-child(3n + 2),
  .zpa-hero2-module .zpa-hero2-card:nth-last-child(2):nth-child(3n + 1) {
    grid-column: span 3;
  }
}

@media (max-width: 767px) {
  .zpa-hero2-module .zpa-hero2-top {
    padding: 24px 0 56px;
  }

  .zpa-hero2-module.zpa-hero2-has-slider-height .zpa-hero2-top {
    min-height: var(--zpa-hero2-slider-h-mb);
    display: flex;
    align-items: flex-end;
  }

  .zpa-hero2-module .zpa-hero2-menu {
    display: none;
  }

  .zpa-hero2-module .zpa-hero2-panel {
    position: relative;
    inset: auto;
    display: none;
    opacity: 0;
    visibility: visible;
    transform: none;
    min-height: 220px;
    pointer-events: none;
    transition: none;
    max-width: 100%;
    width: 100%;
  }

  .zpa-hero2-module .zpa-hero2-panel.is-active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    pointer-events: auto;
    animation: zpaHero2Fade 0.35s ease both;
  }

  .zpa-hero2-module .zpa-hero2-panel-content {
    padding-left: 0;
    padding-right: 0;
    animation: none;
    text-align: center;
    max-width: 100%;
    width: 100%;
  }

  .zpa-hero2-module .zpa-hero2-title {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .zpa-hero2-module .zpa-hero2-content-text {
    margin: 0 0 16px;
    font-size: 12px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .zpa-hero2-module .zpa-hero2-btn {
    display: inline-flex;
    margin: 0 auto 12px;
  }

  .zpa-hero2-module .zpa-hero2-visual {
    display: none;
  }

  .zpa-hero2-module .zpa-hero2-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 4px;
  }

  .zpa-hero2-module .zpa-hero2-dot-item button {
    width: 44px;
    height: 7px;
    border-radius: 99px;
    border: 0;
    background: #d8dde3;
    padding: 0;
    cursor: pointer;
  }

  .zpa-hero2-module .zpa-hero2-dot-item.is-active button {
    background: var(--zpa-hero2-primary);
  }

  .zpa-hero2-module .zpa-hero2-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .zpa-hero2-module .zpa-hero2-card-title {
    font-size: 16px;
    line-height: 1.25;
  }

  .zpa-hero2-module .zpa-hero2-card-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .zpa-hero2-module .zpa-hero2-bottom {
    margin: -48px 0 48px;
  }

  .zpa-hero2-module .zpa-hero2-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
