/* ============================================================
   index.css - 首页专属样式
   包含：轮播Banner（电脑端完全自适应，无遮挡）、卡片列表、数字统计、图文板块
   移动端优先设计
   ============================================================ */

/* ---------- 轮播Banner区域 ---------- */
.banner-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #1e293b;
    /* 移动端默认高度（视口相对高度） */
    height: 45vh;
    min-height: 280px;
}

/* 轮播轨道（使用transform平移） */
.banner-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* 每张幻灯片 */
.banner-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    flex-shrink: 0;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* 图片填满容器，不变形，居中裁剪 */
}

/* 幻灯片文字覆盖层 */
.banner-caption {
    position: absolute;
    bottom: 15%;        /* 使用百分比避免随高度剧烈偏移 */
    left: 0;
    right: 0;
    padding: var(--spacing-xl) var(--spacing-md);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #ffffff;
    text-align: center;
}

.banner-caption h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-caption p {
    font-size: 0.85rem;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 轮播箭头按钮 */
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.banner-arrow:hover {
    background-color: #ffffff;
    box-shadow: var(--shadow-md);
    transform: translateY(-50%) scale(1.05);
}

.banner-arrow-left {
    left: 12px;
}

.banner-arrow-right {
    right: 12px;
}

/* 轮播指示器圆点 */
.banner-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.banner-dot.active {
    background-color: #ffffff;
    width: 28px;
    border-radius: 5px;
}

.banner-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* ---------- 卡片列表区域 ---------- */
.cards-section {
    padding: var(--spacing-2xl) 0;
    background-color: var(--color-bg);
}

.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

/* 信息卡片 */
.info-card {
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all var(--transition-normal);
    cursor: default;
}

.info-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.info-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text);
}

.info-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

/* ---------- 数字统计滚动区域 ---------- */
.stats-section {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: #ffffff;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.stat-item {
    text-align: center;
    padding: var(--spacing-md);
}

.stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    display: inline-block;
}

.stat-suffix {
    font-size: 1.6rem;
    font-weight: 700;
    vertical-align: super;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-top: 4px;
    font-weight: 500;
}

/* ---------- 图文板块区域 ---------- */
.feature-section {
    padding: var(--spacing-2xl) 0;
    background-color: var(--color-bg-alt);
}

.feature-block {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-2xl);
}

.feature-block:last-child {
    margin-bottom: 0;
}

.feature-image {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.feature-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.feature-block:hover .feature-image img {
    transform: scale(1.03);
}

.feature-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.feature-content p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: var(--spacing-sm);
}

.feature-list {
    padding-left: 0;
}

.feature-list li {
    font-size: 0.9rem;
    color: var(--color-text-light);
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 700;
}

/* ============================================================
   响应式断点 - 平板及以上（≥768px）
   ============================================================ */
@media (min-width: 768px) {
    /* 电脑端banner高度自适应（占视口70%，且限制最大高度） */
    .banner-section {
        height: 70vh;
        min-height: 400px;
        max-height: 800px;
    }

    .banner-caption {
        padding: var(--spacing-2xl) var(--spacing-xl);
        bottom: 15%;
    }

    .banner-caption h2 {
        font-size: 2rem;
    }

    .banner-caption p {
        font-size: 1rem;
    }

    .banner-arrow {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    .banner-arrow-left {
        left: 20px;
    }

    .banner-arrow-right {
        right: 20px;
    }

    .banner-dots {
        bottom: 24px;
        gap: 10px;
    }

    .banner-dot {
        width: 12px;
        height: 12px;
    }

    .banner-dot.active {
        width: 32px;
    }

    /* 卡片2列布局 */
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }

    /* 统计4列布局 */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .stat-number {
        font-size: 2.8rem;
    }

    /* 图文板块：左右交替布局 */
    .feature-block {
        flex-direction: row;
        align-items: center;
        gap: var(--spacing-xl);
    }

    .feature-block-reverse {
        flex-direction: row-reverse;
    }

    .feature-image {
        flex: 1;
        min-width: 0;
    }

    .feature-content {
        flex: 1;
        min-width: 0;
    }

    .feature-content h3 {
        font-size: 1.4rem;
    }
}

/* ============================================================
   响应式断点 - 桌面端（≥1024px）
   ============================================================ */
@media (min-width: 1024px) {
    /* 可略微降低banner最大高度，避免过高 */
    .banner-section {
        max-height: 720px;
    }

    .banner-caption h2 {
        font-size: 2.6rem;
    }

    .banner-caption p {
        font-size: 1.1rem;
    }

    /* 卡片4列布局 */
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .stat-number {
        font-size: 3.2rem;
    }

    .feature-content h3 {
        font-size: 1.6rem;
    }
}

/* ============================================================
   额外优化：超宽屏（≥1440px）保持合理比例
   ============================================================ */
@media (min-width: 1440px) {
    .banner-section {
        height: 65vh;      /* 略微降低，避免过高 */
        max-height: 700px;
    }
}