/* Homepage Banner family; shared with scoped Admin previews. */

/* VA-507（Oil UI P2-6）：Banner 数据未就绪时，此前只是一行 16px 默认文字（22px 高），
   回填瞬间把 hero 从 70px 撑到 222px（canonical 15:2 图位）。这里按 canonical 图位比例
   做浅色骨架 + 定高占位，回填时高度不再跳变；文字保留为 role="status" 的状态说明，
   颜色取 #5A6F80（骨架底 5.22:1）。运营位（managed）更高，回填只有一次向上的高度变化。 */
.home-banner-loading {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 15 / 2;
  margin: 0;
  border: 1px solid rgba(0, 172, 235, .12);
  border-radius: 18px;
  background:
    linear-gradient(100deg, #eef8fd 0%, #f8fcfe 42%, #eef8fd 100%);
  color: #5A6F80;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
}

@media (max-width: 768px) {
  .home-banner-loading {
    aspect-ratio: 4 / 3;
    border-radius: 14px;
  }
}

.home-banner-slide {
  position: relative; isolation: isolate; display: flex; align-items: center;
  flex: 0 0 auto; height: var(--home-banner-height, clamp(320px, 26vw, 420px));
  overflow: hidden; background: #04182c; color: #fff;
}
.home-banner-slide__image { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.home-banner-slide--text::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgb(3 17 36 / 92%), rgb(3 17 36 / 64%) 45%, rgb(3 17 36 / 12%)); }
.home-banner-slide__copy { width: min(1332px, calc(100% - 48px)); margin-inline: auto; padding-block: 18px; }
.home-banner-slide__tag { display: inline-block; margin: 0 0 12px; padding: 5px 12px; border: 1px solid rgb(255 255 255 / 28%); border-radius: 999px; background: rgb(255 255 255 / 14%); font-size: 12px; color: #fff; }
.home-banner-slide__title { max-width: 680px; margin: 0; font-size: clamp(28px, 2.4vw, 34px); line-height: 1.2; color: #fff; overflow-wrap: anywhere; text-wrap: balance; }
.home-banner-slide__summary { max-width: 560px; margin: 12px 0 0; font-size: 14px; line-height: 1.65; color: rgb(255 255 255 / 85%); }
.home-banner-slide__cta { display: inline-flex; align-items: center; margin-top: 20px; padding: 11px 22px; border-radius: 999px; background: var(--brand-primary, #00aceb); color: #fff; text-decoration: none; font-size: 14px; font-weight: 700; line-height: 1.2; }
.home-banner-slide__cta:hover { background: #008ac1; color: #fff; }
/* The existing global theme forces link colors. Scope this exception to Banner actions. */
body[data-page="home"] .home-banner-slide__cta,
body[data-page="home"] .home-banner-slide__cta:visited,
body[data-page="home"] .home-banner-slide__cta:hover,
body[data-page="home"] .home-banner-slide__cta:focus-visible { color: #fff !important; }
.home-banner-slide__cta:focus-visible, .home-banner-slide__image-link:focus-visible { outline: 3px solid #fff; outline-offset: -4px; }
.home-banner-slide__image-link { position: absolute; inset: 0; }
.home-banner-carousel__controls { position: absolute; z-index: 3; bottom: 86px; right: 24px; display: flex; gap: 8px; }
.home-banner-carousel__controls button { width: 36px; height: 36px; border: 1px solid rgb(255 255 255 / 50%); border-radius: 50%; color: #fff; background: rgb(4 24 44 / 70%); cursor: pointer; }
.home-banner-carousel__controls button:focus-visible { outline: 3px solid #00aceb; outline-offset: 2px; }
.home-banner-carousel [hidden], .home-banner-carousel__controls[hidden] { display: none; }
body[data-page="home"]:not(.mobile-page) .hm-hero .home-banner-carousel .platform-strength-carousel__progress[hidden] { display: none; }
.mobile-page .home-banner-carousel { --home-banner-height: max(280px, calc((100vw - 32px) * .75)); }
.mobile-page .home-banner-slide__copy { width: calc(100% - 48px); padding-right: 16px; }
.mobile-page .home-banner-slide__title { font-size: 22px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mobile-page .home-banner-slide__summary { font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mobile-page .home-banner-slide__tag { margin-bottom: 8px; }
.mobile-page .home-banner-slide__cta { margin-top: 12px; padding: 9px 16px; }
.mobile-page .home-banner-carousel .platform-strength-carousel__viewport { height: var(--home-banner-height); }
.mobile-page .home-banner-carousel__controls { right: 16px; bottom: 10px; }
.mobile-page .home-banner-carousel .platform-strength-carousel__progress > span { background: rgb(255 255 255 / 40%); }
/* Keep only the original Home search overlay visible above the managed slides. */
[data-home-hero] > .platform-strength-carousel[hidden], .platform-strength-banner-section > .platform-strength-carousel[hidden] { display: none; }

/* One semantic control/progress family for both Home presentations. */
.home-banner-state {
  position: absolute; z-index: 3; left: 50%; bottom: 84px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; max-width: calc(100% - 32px);
  padding: 0 10px; min-height: 44px; border-radius: 12px; color: #fff;
  background: rgba(3, 23, 39, .72);
}
.home-banner-state__source { flex: none; font-size: 10px; white-space: nowrap; color: #d6edf8; }
.home-banner-state__counter { flex: none; min-width: 38px; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.home-banner-state__dots { display: flex; flex: 1 1 auto; min-width: 0; overflow: hidden; align-items: center; }
body[data-page="home"] .home-banner-state button {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0 !important;
  border: 0 !important; border-radius: 8px; color: #fff !important; background: transparent !important;
  box-shadow: none !important; cursor: pointer;
}
.home-banner-state__dots button > span { display: block; width: 6px; height: 6px; overflow: hidden; border-radius: 9px; background: #687382; }
.home-banner-state__dots button[aria-current="true"] > span { width: 24px; }
.home-banner-state__dots i { display: block; width: 100%; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.home-banner-state__pause svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.home-banner-state__pause[aria-pressed="true"] svg { fill: currentColor; stroke: none; }
.home-banner-state button:disabled { cursor: default; opacity: .6; }
body[data-page="home"] .home-banner-state button:focus-visible { outline: 2px solid #fff !important; outline-offset: -4px !important; }
[data-home-banner-controls] > .platform-strength-carousel__progress { display: none !important; }
.home-banner-slide__image-unavailable { position: absolute; inset: 0; display: grid; place-items: center; color: #d6edf8; background: #04182c; font-size: 13px; z-index: -2; }

/* Only the two canonical image slides adopt the final 3:1 presentation. */
body[data-page="home"]:not(.mobile-page) .hm-hero .home-banner-carousel[data-banner-source="canonical"] .platform-strength-carousel__viewport { height: auto; aspect-ratio: 15 / 2; }
.home-banner-carousel[data-banner-source="canonical"] .home-banner-slide { height: auto; aspect-ratio: 3 / 1; }
.home-banner-carousel[data-banner-source="canonical"] .home-banner-slide__image { object-fit: contain; }
.home-banner-hotspot { position: absolute; border-radius: 999px; cursor: pointer; }
.home-banner-hotspot:focus-visible { outline: 3px solid #007bcd; outline-offset: 2px; }
body#mobile-home.mobile-page[data-page="home"] .mobile-home-carousel[data-banner-source="canonical"] { padding-bottom: 44px; background: #edf7fd; }
body#mobile-home.mobile-page[data-page="home"] .mobile-home-carousel[data-banner-source="canonical"] .platform-strength-carousel__viewport { height: auto !important; aspect-ratio: 3 / 1; border: 0 !important; }
body#mobile-home.mobile-page[data-page="home"] .mobile-home-carousel[data-banner-source="canonical"] .platform-strength-carousel__track > article { height: auto !important; aspect-ratio: 3 / 1; }
body#mobile-home.mobile-page[data-page="home"] .mobile-home-carousel[data-banner-source="canonical"] .home-banner-slide__image { object-fit: contain !important; }
body#mobile-home.mobile-page[data-page="home"] .mobile-home-carousel[data-banner-source="canonical"] article::after { content: none; }
body#mobile-home.mobile-page[data-page="home"] .mobile-home-carousel[data-banner-source="canonical"] .home-banner-state { bottom: 0; color: #17649b; }
body#mobile-home.mobile-page[data-page="home"] .mobile-home-carousel[data-banner-source="canonical"] :is(.home-banner-state__counter,.home-banner-state__pause) { display: inline-flex !important; }
body#mobile-home.mobile-page[data-page="home"] .mobile-home-carousel[data-banner-source="canonical"] .home-banner-state button { color: #17649b !important; }

/* User adjustment: PC retains 40% of the previous image-frame height. */
body[data-page="home"]:not(.mobile-page) .home-banner-carousel[data-banner-source="canonical"] .home-banner-slide { aspect-ratio: 15 / 2; background: #eaf7fd; }
body[data-page="home"] .home-banner-state { background: transparent; padding: 0; }
body[data-page="home"]:not(.mobile-page) .home-banner-carousel[data-banner-source="canonical"] .home-banner-state { left: auto; right: 24px; bottom: 14px; transform: none; }
body#mobile-home.mobile-page[data-page="home"] .mobile-home-carousel[data-banner-source="canonical"] { background: transparent; }

/* PC fills the compact frame; the user approved top/bottom cropping. */
body[data-page="home"]:not(.mobile-page) .home-banner-carousel[data-banner-source="canonical"] .home-banner-slide__image { object-fit: cover; }
