/* 首页特定样式 */

/* 轮播图样式 */
.hero-slider {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    margin-top: 0;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    animation: fadeIn 1s;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 3rem;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.slide-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    transform: translateY(-50%);
    z-index: 10;
}

.prev-btn,
.next-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.prev-btn svg,
.next-btn svg {
    width: 24px;
    height: 24px;
}

.prev-btn:hover,
.next-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.dot.active,
.dot:hover {
    background: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 优势卡片 */
.advantages-grid {
    margin-top: 2rem;
}

.advantage-card {
    text-align: center;
    padding: 2.5rem 2rem;
}

.advantage-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.advantage-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.advantage-card:hover .advantage-icon img {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 12px rgba(30, 58, 138, 0.2));
}

/* 图标图片加载失败时的占位 */
.advantage-icon img:not([src]),
.advantage-icon img[src=""],
.advantage-icon img[src*="undefined"] {
    display: none;
}

.advantage-icon::after {
    content: '';
    display: none;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    opacity: 0.1;
}

.advantage-icon img:not([src]) ~ .advantage-icon::after,
.advantage-icon img[src=""] ~ .advantage-icon::after {
    display: block;
}

.advantage-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.advantage-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* 产品预览 */
.bg-light {
    background-color: var(--bg-light);
}

.products-preview {
    margin-top: 2rem;
}

.product-item {
    text-align: center;
    padding: 2rem 1.5rem;
}

.product-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.product-item:hover .product-icon img {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 4px 10px rgba(30, 58, 138, 0.25));
}

/* 产品图标加载失败时的占位 */
.product-icon img:not([src]),
.product-icon img[src=""],
.product-icon img[src*="undefined"] {
    display: none;
}

.product-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-item p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    min-height: 3rem;
}

/* 公司简介 */
.company-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.intro-text p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.intro-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1rem;
    opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-slider {
        height: 400px;
    }

    .slide-content {
        padding: 2rem 1.5rem;
    }

    .slide-content h1 {
        font-size: 2rem;
    }

    .slide-content p {
        font-size: 1.2rem;
    }

    .company-intro {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .intro-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }
}

