/*
 * Cen Theme - 首页轮播 Banner 样式
 * 配合 Tailwind CSS v4（tailwindcss-browser）使用：
 * 结构布局使用 Tailwind 工具类，本文件仅补充
 * 轮播切换、箭头、指示点及首页导航悬浮细节。
 * 文件修改时间：2026-09-01 01:40:00
 */

/* ========== 首页导航悬浮于 Banner 上层 ========== */
body.home .site-header {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
}

/* 登录态：给管理员工具栏让位 */
body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* ========== 幻灯片切换（淡入淡出） ========== */
.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    /* 切换动画由 GSAP（banner.js）驱动，此处不再设置 CSS transition，
       避免 CSS 过渡与 GSAP 逐帧动画冲突导致卡顿 */
}

.banner-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

.banner-slide__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-slide__mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.25) 45%,
        rgba(0, 0, 0, 0) 75%
    );
}

/* ========== 左右切换箭头 ========== */
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.banner-arrow:hover,
.banner-arrow:focus {
    background: rgba(249, 115, 22, 0.9);
    border-color: rgba(249, 115, 22, 0.9);
}

.banner-arrow--prev {
    left: 1.5rem;
}

.banner-arrow--next {
    right: 1.5rem;
}

/* ========== 指示点 ========== */
.banner-dots {
    position: absolute;
    right: 0;
    bottom: 1.5rem;
    left: 0;
    z-index: 30;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

/* 有底部统计条时，指示点上移到统计条上方 */
.banner-dots--has-stats {
    bottom: 6.5rem;
}

.banner-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease;
}

.banner-dot.is-active {
    width: 26px;
    background: #f97316;
}

/* ========== 响应式 ========== */
@media (max-width: 767px) {
    .banner-arrow {
        display: none;
    }
}
