/* 内页纯色标题条 | 2026-09-27：所有内页同一主色底，只显示页面名称 */

/**
 * 文件作用：轮播及内页标题区块：定义展示样式。主题覆盖版，保持当前布局。
 */

.page-hero {
    background-color: var(--bs-primary, #1a4f93);
    color: #fff;
}
.page-hero-inner {
    min-height: 168px;
    display: flex;
    align-items: center;
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
}
.page-hero-title {
    margin: 0;
    color: #fff;
    font-weight: 700;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    line-height: 1.25;
}
@media (max-width: 767.98px) {
    .page-hero-inner {
        min-height: 112px;
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }
}

/* Banner：aspect-ratio 自适应 + Grid 叠层；勿给 .banner-swiper.swiper 设 height:100%
 * 首页 hero 见下方「轮播图 Banner | 2026-09-17」
 */
.banner-swiper {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1920 / var(--banner-d, 600);
    height: auto;
    overflow: hidden;
    background-color: #212529;
    box-sizing: border-box;
}
/* 纯色 Banner：按后台像素高度，不用 1920 比例（内页常用 240–280） */
.banner-swiper.banner-swiper-bg {
    aspect-ratio: unset;
    height: calc(var(--banner-d, 280) * 1px);
    min-height: 160px;
    background-color: var(--banner-bg, var(--bs-primary));
}
.banner-swiper.banner-swiper-bg .swiper-slide.banner-slide-bg {
    background-color: var(--banner-bg, inherit);
}
.banner-swiper.banner-swiper-bg .swiper-wrapper,
.banner-swiper.banner-swiper-bg .swiper-slide {
    height: 100%;
}
.banner-swiper.banner-swiper-bg .swiper-txt {
    text-shadow: none;
}
.banner-swiper .swiper-wrapper {
    height: 100%;
    width: 100%;
}
.banner-swiper .swiper-slide {
    display: grid;
    grid-template: 1fr / 1fr;
    width: 100% !important;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}
.banner-swiper .swiper-slide.banner-slide-bg {
    display: flex;
    align-items: center;
}
.banner-swiper .swiper-slide > .container {
    grid-area: 1 / 1;
    z-index: 2;
    align-self: stretch;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.banner-swiper .swiper-slide.banner-slide-bg .container {
    height: 100%;
}
.banner-swiper .swiper-slide > .container .swiper-txt {
    width: 100%;
    pointer-events: none;
}
.banner-swiper .swiper-slide > picture {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    display: block;
    overflow: hidden;
}
.banner-swiper .slider-image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}
.banner-swiper .swiper-slide > .swiper-txt {
    grid-area: 1 / 1;
    z-index: 2;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 1rem 1.25rem;
    box-sizing: border-box;
    overflow: visible;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    pointer-events: none;
}
@media (min-width: 768px) {
    .banner-hero.banner-swiper .swiper-slide > .swiper-txt {
        justify-self: end;
        width: min(55%, 640px);
        padding: 1.25rem 2rem 1.25rem 1rem;
    }
}
@media (min-width: 1200px) {
    .banner-hero.banner-swiper .swiper-slide > .swiper-txt {
        width: min(50%, 720px);
        padding: 1.5rem 3rem;
    }
}
.banner-swiper .swiper-txt a,
.banner-swiper .swiper-txt button {
    pointer-events: auto;
}
.banner-swiper > .swiper-pagination {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    min-height: 0;
    z-index: 3;
}
.banner-swiper .swiper-button-prev,
.banner-swiper .swiper-button-next {
    z-index: 3;
    color: #fff;
}
/* 压缩合并后仍保证 Swiper 导航用图标字体，避免显示 prev/next 文字 */
.banner-swiper .swiper-button-prev:after,
.banner-swiper .swiper-button-next:after {
    font-family: swiper-icons !important;
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.banner-swiper .swiper-button-disabled {
    opacity: 0.35;
}
.banner-swiper .swiper-slide-title .icon {
    margin-right: 0.35em;
    vertical-align: -0.12em;
}
.banner-swiper .swiper-slide-title {
    font-size: clamp(1.25rem, 3.5vw, 2.5rem);
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin-bottom: 0;
}
.banner-swiper .swiper-caption {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    max-width: 100%;
}
@media (max-width: 767.98px) {
    .banner-swiper:not(.banner-swiper-bg) {
        aspect-ratio: 768 / var(--banner-m, 400);
        height: auto;
    }
    .banner-swiper.banner-swiper-bg {
        aspect-ratio: unset;
        height: calc(var(--banner-m, 220) * 1px);
        min-height: 140px;
    }
    .banner-swiper.banner-swiper-bg .swiper-wrapper,
    .banner-swiper.banner-swiper-bg .swiper-slide {
        height: 100% !important;
    }
    .banner-swiper.banner-swiper-bg .container .swiper-txt {
        background: transparent;
        text-shadow: none;
    }
    .banner-swiper:not(.banner-swiper-bg) .swiper-slide > .container .swiper-txt {
        background: transparent;
        padding: 0;
    }
    .banner-swiper .swiper-slide-title {
        font-size: clamp(1.125rem, 5vw, 1.5rem);
    }
    .banner-swiper .swiper-caption {
        font-size: 0.875rem;
    }
    .banner-swiper .lead {
        font-size: 16px;
    }
}

/* ========== 轮播图 Banner | 2026-09-17 ==========
 * 模板：template-parts/block/banner.php（首页 hero；查询仍走轮播图 CPT）
 * 作用：全宽大图叠字、左文案、红/描边双按钮、底部分页条+箭头
 */
.banner-hero {
    position: relative;
    color: #fff;
    background: var(--bs-primary);
}
.banner-hero .banner-hero-swiper {
    aspect-ratio: 1920 / var(--banner-d, 600);
    min-height: 420px;
    overflow: hidden;
}
.banner-hero .banner-hero-swiper .swiper-wrapper {
    display: flex;
    height: 100%;
}
.banner-hero .swiper-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(var(--bs-primary-rgb), 0.52) 0%, rgba(var(--bs-primary-rgb), 0.22) 50%, rgba(var(--bs-primary-rgb), 0.08) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, transparent 32%, rgba(var(--bs-primary-rgb), 0.28) 100%);
}
.banner-hero .swiper-slide {
    position: relative;
    overflow: hidden;
}
.banner-hero .swiper-slide > picture {
    z-index: 0;
}
.banner-hero .swiper-slide-active .slider-image {
    animation: banner-kenburns 18s ease-out forwards;
}
@keyframes banner-kenburns {
    from { transform: scale(1.04); }
    to { transform: scale(1.12); }
}
.banner-hero.banner-swiper .swiper-slide > .swiper-txt,
.banner-hero .swiper-slide > .swiper-txt {
    z-index: 2;
    justify-self: start;
    align-self: center;
    width: 100%;
    max-width: 100%;
    padding: 0;
    text-shadow: none;
    pointer-events: none;
}
.banner-hero-copy {
    padding-top: 2rem;
    padding-bottom: 4.5rem;
}
.banner-hero .swiper-slide-title {
    font-size: clamp(2rem, 4.4vw, 4.5rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.03em;
    max-width: 24ch;
    margin: 0;
    text-shadow: none;
    color: #fff;
    text-wrap: balance;
}
.banner-hero .swiper-caption {
    margin-top: 1.25rem;
    max-width: 36rem;
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: none;
}
.banner-hero .swiper-caption p {
    margin-bottom: 0.5rem;
}
.banner-hero .swiper-caption p:last-child {
    margin-bottom: 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.68);
}
.banner-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 2rem;
    pointer-events: auto;
}
.banner-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 26px;
    border: 0;
    border-radius: 0;
    background: var(--bs-warning);
    color: var(--bs-warning-contrast, #fff);
    font-size: 15px;
    font-weight: 500;
}
.banner-hero-btn:hover,
.banner-hero-btn:focus,
.banner-hero-btn:active {
    background: color-mix(in srgb, var(--bs-warning), #000 18%);
    color: var(--bs-warning-contrast, #fff);
}
.banner-hero-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 26px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}
.banner-hero-ghost:hover,
.banner-hero-ghost:focus,
.banner-hero-ghost:active {
    background: #fff;
    color: #1c334f;
    border-color: #fff;
}
.banner-hero-nav {
    position: absolute;
    right: max(1.5rem, calc((100vw - 1600px) / 2 + 1.5rem));
    bottom: 2rem;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 14px;
}
.banner-hero .swiper-pagination {
    position: static;
    width: auto;
    min-height: 0;
    display: flex;
    gap: 8px;
}
.banner-hero .swiper-pagination-bullet {
    width: 28px;
    height: 3px;
    margin: 0 !important;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.35);
    opacity: 1;
}
.banner-hero .swiper-pagination-bullet-active {
    background: #fff;
    width: 36px;
}
.banner-hero .swiper-button-prev,
.banner-hero .swiper-button-next {
    position: static;
    width: 48px;
    height: 48px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: transparent;
    color: #fff;
}
.banner-hero .swiper-button-prev:after,
.banner-hero .swiper-button-next:after {
    font-size: 1rem;
    text-shadow: none;
    color: #fff;
}
.banner-hero .swiper-button-prev:hover,
.banner-hero .swiper-button-next:hover {
    background: #fff;
}
.banner-hero .swiper-button-prev:hover:after,
.banner-hero .swiper-button-next:hover:after {
    color: #1c334f;
}
@media (min-width: 768px) {
    .banner-hero.banner-swiper .swiper-slide > .swiper-txt,
    .banner-hero .swiper-slide > .swiper-txt {
        justify-self: start;
        width: 100%;
        padding: 0;
    }
}
@media (max-width: 767.98px) {
    /* 覆盖内页 .banner-swiper 小屏「图文上下堆叠」；wrapper 必须保持 flex，否则两张幻灯片会同时竖排 */
    .banner-hero .banner-hero-swiper.banner-swiper {
        aspect-ratio: unset;
        height: calc(var(--banner-m, 400) * 1px);
        min-height: 320px;
        overflow: hidden;
        background-color: var(--bs-primary);
    }
    .banner-hero .banner-hero-swiper .swiper-wrapper {
        display: flex;
        height: 100% !important;
        width: 100%;
    }
    .banner-hero .banner-hero-swiper .swiper-slide {
        display: grid;
        grid-template: 1fr / 1fr;
        flex-shrink: 0;
        width: 100%;
        height: 100% !important;
        overflow: hidden;
    }
    .banner-hero .banner-hero-swiper .swiper-slide > picture {
        grid-area: 1 / 1;
        width: 100%;
        height: 100% !important;
        aspect-ratio: unset;
    }
    .banner-hero .banner-hero-swiper .swiper-slide > picture .slider-image {
        width: 100% !important;
        height: 100% !important;
        aspect-ratio: unset;
        object-fit: cover;
    }
    .banner-hero .banner-hero-swiper .swiper-slide > .swiper-txt {
        grid-area: 1 / 1;
        position: relative;
        width: 100%;
        height: 100%;
        background: transparent;
        padding: 0;
        align-self: center;
    }
    .banner-hero-copy {
        padding-top: 1.25rem;
        padding-bottom: 4rem;
    }
    .banner-hero .swiper-slide-title {
        font-size: clamp(1.5rem, 7vw, 2.1rem);
        max-width: 22ch;
    }
    .banner-hero .swiper-caption {
        font-size: 0.95rem;
        margin-top: 0.75rem;
    }
    .banner-hero-nav {
        right: 1rem;
        bottom: 1rem;
        gap: 8px;
    }
    .banner-hero .swiper-button-prev,
    .banner-hero .swiper-button-next {
        width: 40px;
        height: 40px;
    }
}
