/* home.css - Banner 最终样式 */
.banner {
    position: relative;
    height: calc(70vh - 80px); /* 视口高度 - header高度，确保占满剩余空间 */
    min-height: 450px;
    overflow: hidden;
}

.banner-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-position: center;
    background-size: cover;
}

.banner-slide.active {
    opacity: 1;
}

/* 遮罩层：覆盖整个Banner */
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* 内容容器：垂直+水平居中 */
.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 强制居中 */
    z-index: 2;
    text-align: center;
    color: var(--white-color);
    max-width: 800px;
    padding: 0 20px;
    animation: fadeIn 1s ease-out;
    opacity: 1;
}

/* 给标题、描述、按钮增加垂直间距 */
.banner-content h1 {
    font-size: 2.8rem;
    margin-bottom: 25px; /* 从20px改成30px，增加和描述的间距 */
    line-height: 1.3;
}

.banner-content p {
    font-size: 1.1rem;
    margin-bottom: 35px; /* 从30px改成40px，增加和按钮的间距 */
    opacity: 0.9;
}

/* 给按钮增加内边距，让按钮更舒展 */
.banner-content .btn-primary {
    padding: 12px 24px; /* 从12px 24px放大 */
    font-size: 1.05rem;
}

/* 轮播指示器（圆点） */
.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 4;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition-default);
}

.dot.active {
    background-color: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

/* Products Section (首页产品列表) */
.products {
    background-color: var(--light-color);
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-item {
    background-color: var(--white-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition-default);
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.product-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

/* 产品卡片内超链接样式 */
.product-info a {
    color: var(--secondary-color);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.product-info a:hover {
    color: var(--primary-color);
}

.product-info a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.product-info a:hover::after {
    width: 100%;
}

/* 产品图片链接优化 */
.product-img a {
    display: block;
}
.product-img img {
    transition: transform 0.3s ease;
}
.product-img a:hover img {
    transform: scale(1.03);
}

.product-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.product-info p {
    color: var(--gray-color);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: #555;
}

.product-specs i {
    color: var(--primary-color);
    margin-right: 5px;
}

/* Features Section (首页特性) */
.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-item {
    text-align: center;
    padding: 30px;
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition-default);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-default);
}

.feature-item:hover .feature-icon {
    background-color: var(--primary-color);
}

.feature-icon i {
    font-size: 2rem;
    color: var(--secondary-color);
}

.feature-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.feature-item p {
    color: var(--gray-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 首页响应式补充 */
@media (max-width: 768px) {
    /* 首页Banner */
    .banner {
        height: 60vh;
        min-height: 350px;
        margin-top: 70px;
    }
    .banner-content h1 {
        font-size: 2rem;
    }
    .banner-content p {
        font-size: 1rem;
    }

    .product-list,
    .features-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    /* 首页Banner */
    .banner-content h1 {
        font-size: 1.8rem;
    }
    .product-img img {
        height: 180px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0; /* 初始透明 */
    }
    to {
        opacity: 1; /* 结束后不透明 */
    }
}