/* ============================================
 * 模块: Banner 轮播图
 * 文件: assets/css/banner.css
 * 依赖: main.css
 * @since 3.0.0
 * ============================================ */

/* ---------- Banner 父容器 ---------- */
.section--banner {
    padding: 0;
    position: relative;
    overflow: hidden;
    background: #000;
    min-height: 400px;
    max-height: 600px;
}

/* ---------- 轮播轨道 ---------- */
.banner__slider {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    max-height: 600px;
}

/* ---------- 单张幻灯片 ---------- */
.banner__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.banner__slide--active {
    opacity: 1;
    pointer-events: auto;
}

/* 背景图片 */
.banner__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* 背景视频 */
.banner__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- 蒙层 ---------- */
.banner__slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
}

/* ---------- 文字内容 ---------- */
.banner__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    max-height: 600px;
    max-width: 600px;
    padding: var(--spacing-xxxxl) 0;
}
.banner__tag {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: #fff;
    background: var(--color-primary);
    padding: 2px var(--spacing-sm);
    border-radius: var(--radius-small);
    margin-bottom: var(--spacing-lg);
    letter-spacing: 0.05em;
}
.banner__title {
    font-size: var(--font-size-xxl);
    font-weight: var(--font-weight-bold);
    color: #fff;
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.banner__subtitle {
    font-size: var(--font-size-md);
    color: rgba(255, 255, 255, 0.85);
    line-height: var(--line-height-base);
    margin-bottom: var(--spacing-xl);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* CTA 按钮覆写 */
.banner__content .btn {
    font-size: var(--font-size-md);
    padding: var(--spacing-sm) var(--spacing-xxl);
    height: auto;
}

/* ---------- 轮播控件 ---------- */
.banner__controls {
    position: absolute;
    bottom: var(--spacing-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}
.banner__dots {
    display: flex;
    gap: var(--spacing-xs);
}
/* ---- 线条型指示器 ---- */
.banner__bar {
    width: 30px;
    height: 3px;
    border: none;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0;
    position: relative;
    overflow: hidden;
    transition: width 0.3s ease;
}
.banner__bar:hover {
    background: rgba(255, 255, 255, 0.5);
}
.banner__bar--active {
    width: 40px;
    background: rgba(255, 255, 255, 0.35);
}
/* 进度条填充 */
.banner__bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: #fff;
    border-radius: 2px;
}
.banner__bar--active .banner__bar-fill {
    animation: banner-progress 5s linear forwards;
}
@keyframes banner-progress {
    from { width: 0; }
    to   { width: 100%; }
}

/* 左右箭头 */
.banner__arrows {
    display: flex;
    gap: var(--spacing-md);
}
.banner__arrow {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-circle);
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base);
    font-size: var(--font-size-md);
}
.banner__arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .section--banner,
    .banner__slider,
    .banner__content {
        min-height: 320px;
        max-height: 420px;
    }
    .banner__title {
        font-size: var(--font-size-xl);
    }
    .banner__subtitle {
        font-size: var(--font-size-sm);
    }
    .banner__content {
        max-width: 100%;
        padding: var(--spacing-xxl) 0;
    }
}
