/* 首页特定样式 */








/* 英雄区域 - 幻灯片 */
.hero-slider {
    position: relative;
    width: 100%;
    /* 使用宽高比确保同步缩放 - 调整为更宽的21:9比例以降低高度 */
    aspect-ratio: 21 / 9;
    /* 使用视口单位确保响应式缩放 - 作为aspect-ratio的后备方案 */
    height: 42.86vw; /* 21:9 比例，高度 = 宽度 * 9/21 */
    min-height: 300px;
    max-height: 70vh;
    overflow: hidden;
    /* 确保容器随窗口大小变化 */
    box-sizing: border-box;
}

.hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
    /* 重置 ul 默认样式 */
    list-style: none;
    margin: 0;
    padding: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    /* 重置 li 默认样式 */
    list-style: none;
    margin: 0;
    padding: 0;
}

.hero-slide.active {
    opacity: 1;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 使用 cover 确保图片覆盖整个区域 */
    background-size: cover;
    /* 固定聚焦位置 - 可以根据实际需要调整（center, top, bottom, 或具体百分比） */
    background-position: center center;
    background-repeat: no-repeat;
    /* 确保背景图片随容器同步缩放 */
    background-attachment: scroll;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.hero-content {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    color: white;
    text-align: left;
    max-width: 600px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.1;
    color: white;
    /* 主标题背景颜色 - 使用变量，可在 base.css 的 :root 中调节 */
    background-color: var(--hero-title-bg);
    padding: 0.5rem 1.2rem;
    display: inline-block;
    border-radius: 4px;
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    font-weight: 400;
    letter-spacing: 1px;
    color: white;
    /* 副标题背景颜色 - 使用变量，可在 base.css 的 :root 中调节 */
    background-color: var(--hero-subtitle-bg);
    padding: 0.4rem 1.2rem;
    display: inline-block;
    border-radius: 4px;
}

.hero-decorative-lines {
    margin-bottom: 1.5rem;
}

.hero-decorative-lines .line {
    height: 3px;
    margin-bottom: 0.3rem;
}

.hero-decorative-lines .line-red {
    width: 60px;
    background-color: #ff4444;
}

.hero-decorative-lines .line-white {
    width: 120px;
    background-color: white;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 500px;
    color: white;
    /* 描述文字背景颜色 - 使用变量，可在 base.css 的 :root 中调节 */
    background-color: var(--hero-description-bg);
    padding: 0.6rem 1.2rem;
    display: inline-block;
    border-radius: 4px;
    white-space: nowrap;
}

.hero-content .btn {
    background-color: var(--accent);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    border: none;
    color: white;
    text-decoration: none;
    display: inline-block;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.hero-content .btn:hover {
    background-color: #ea580c;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

/* 幻灯片指示器 */
.hero-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
    z-index: 4;
}

.indicator {
    width: 20px;
    height: 3px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #ff4444;
    width: 20px;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* 幻灯片导航箭头 */
.hero-prev,
.hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s ease;
    font-size: 1.2rem;
    z-index: 4;
    opacity: 0;
    visibility: hidden;
}

.hero-prev {
    left: -60px;
}

.hero-next {
    right: -60px;
}

.hero-slider:hover .hero-prev {
    left: 2rem;
    opacity: 1;
    visibility: visible;
}

.hero-slider:hover .hero-next {
    right: 2rem;
    opacity: 1;
    visibility: visible;
}

.hero-prev:hover,
.hero-next:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

/* 产品展示部分 */
.products {
    padding: 5rem 0;
}

/* 平板/手机：自适应列数，间距适中 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem;
}

/* 电脑模式：固定每行 3 个，列宽 280px～450px，仅用 gap 控制间距以保证横竖一致 */
@media (min-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(280px, 450px));
        gap: 2.5rem;
        justify-content: center;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .products-grid {
        gap: 3rem;
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .products-grid {
        gap: 3rem;
    }
}

/* 首页产品卡片样式 - 与产品中心保持一致，保持正方形；填满网格格，间距仅由 grid gap 控制 */
.products .product-card {
    background: linear-gradient(135deg, #fcfcfc, #f6f3f3);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    aspect-ratio: 1/1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
}

.products .product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.products .product-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.products .product-link:hover {
    text-decoration: none;
    color: inherit;
}

.products .product-header {
    background: #009A91;
    padding: 0.8rem 1rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.products .product-header h3 {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.products .product-img {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    position: relative;
}

.products .product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
    filter: var(--image-grayscale);
}

.products .product-card:hover .product-img img {
    transform: scale(1.05);
}

.products .product-content { 
    display: none; 
}

.products .product-content p { 
    display: none; 
}

/* 首页产品卡片响应式设计（卡片保持正方形，仅调整字体等） */
@media (max-width: 768px) {
    .products .product-header h3 {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .products .product-header h3 {
        font-size: 0.9rem;
    }
}

/* 首页产品卡片按钮 & 关于我们按钮：默认浅色，悬停高亮（统一样式） */
.products .product-cta .btn,
.about .about-text .btn {
    background-color: rgba(249, 115, 22, 0.12); /* 浅橙底 */
    color: var(--accent);
    box-shadow: none;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.products .product-cta .btn:hover,
.about .about-text .btn:hover {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
}

/* 我们的客户部分 */
.clients {
    padding: 0 0 5rem 0;
    background: #ffffff;
}

.clients .section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.clients .section-title h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.clients .section-title p {
    
    color: var(--text);
    max-width: 800px;
    margin: 0 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 平板/手机：自适应列数 */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2rem;
    align-items: center;
    justify-items: center;
}

/* 电脑模式：固定每行 5 个 */
@media (min-width: 992px) {
    .clients-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 250px;
    height: 120px;
}

.client-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.client-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    
    transition: filter 0.3s ease;
}

.client-logo:hover img {
    filter: grayscale(0%);
}

/* 响应式设计 - 客户区域（保持 5 列 2 行） */
/* 平板横屏 */
@media (min-width: 992px) and (max-width: 1199px) {
    .clients-grid {
        gap: 2rem;
    }
    
    .client-logo {
        height: 110px;
        padding: 1.2rem;
    }
}

/* 平板竖屏 */
@media (min-width: 769px) and (max-width: 991px) {
    .clients-grid {
        gap: 1.5rem;
    }
    
    .client-logo {
        height: 100px;
        padding: 1rem;
    }
}

/* 手机竖屏 */
@media (max-width: 768px) {
    .clients-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
    }
    
    .client-logo {
        height: 80px;
        padding: 0.8rem;
    }
}

/* 高分辨率屏幕优化 */
@media (min-width: 1920px) {
    .hero-content h1 {
        font-size: 4rem;
    }
    
    .hero-description {
        font-size: 1.3rem;
    }
}

/* 平板横屏 */
@media (min-width: 992px) and (max-width: 1199px) {
    .hero-slider {
        /* 保持宽高比，继续使用视图单位同步缩放 */
        height: 42.86vw;
        min-height: 350px;
        max-height: 65vh;
    }
    
    .hero-content {
        left: 2rem;
        top: 50%;
        transform: translateY(-50%);
        max-width: 500px;
        padding: 2rem;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
        max-width: 450px;
    }
}

/* 平板竖屏 */
@media (min-width: 769px) and (max-width: 991px) {
    .hero-slider {
        /* 保持宽高比，继续使用视图单位同步缩放 */
        height: 42.86vw;
        min-height: 300px;
        max-height: 60vh;
    }
    
    .hero-content {
        left: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        max-width: 400px;
        padding: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        max-width: 350px;
        white-space: normal;
    }
    
    .hero-decorative-lines .line-red {
        width: 35px;
    }
    
    .hero-decorative-lines .line-white {
        width: 70px;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        /* 保持宽高比，继续使用视口单位同步缩放 */
        height: 42.86vw;
        min-height: 250px;
        max-height: 50vh;
    }
    
    .hero-content {
        left: 3rem;
        top: 50%;
        transform: translateY(-50%);
        max-width: 300px;
        padding: 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.85rem;
        max-width: 280px;
        white-space: normal;
    }
    
    .hero-decorative-lines .line-red {
        width: 30px;
    }
    
    .hero-decorative-lines .line-white {
        width: 60px;
    }
    
    .hero-prev,
    .hero-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .hero-slider:hover .hero-prev {
        left: 1rem;
    }
    
    .hero-slider:hover .hero-next {
        right: 1rem;
    }
    
    .hero-indicators {
        bottom: 1rem;
    }
    
    .products-grid {
        gap: 3rem;
    }
    
    .clients .section-title h2 {
        font-size: 2rem;
    }
    
    .clients-grid {
        gap: 1rem;
    }
    
    .client-logo {
        height: 80px;
        padding: 0.8rem;
    }
}

@media (max-width: 576px) {
    .hero-slider {
        /* 保持宽高比，继续使用视口单位同步缩放 */
        height: 42.86vw;
        min-height: 220px;
        max-height: 45vh;
    }
    
    .hero-content {
        left: 2.5rem;
        top: 50%;
        transform: translateY(-50%);
        max-width: 250px;
        padding: 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.4rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-description {
        font-size: 0.75rem;
        max-width: 220px;
        white-space: normal;
    }
    
    .hero-decorative-lines .line-red {
        width: 25px;
    }
    
    .hero-decorative-lines .line-white {
        width: 50px;
    }
    
    .hero-prev,
    .hero-next {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .hero-slider:hover .hero-prev {
        left: 0.5rem;
    }
    
    .hero-slider:hover .hero-next {
        right: 0.5rem;
    }
    
    .hero-indicators {
        bottom: 0.5rem;
        gap: 0.5rem;
    }
    
    .indicator {
        width: 15px;
        height: 2px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        max-width: 400px;
        margin: 0 auto;
    }

    /* 首页产品卡片在手机/平板端保持正方形，与桌面一致 */
    .products .product-card {
        max-width: 100%;
        width: 100%;
        aspect-ratio: 1 / 1;
    }
    .products .product-content {
        height: 40%;
        padding: 1.1rem;
    }
    .products .product-content h3 {
        font-size: 1.15rem;
        margin-bottom: 0.6rem;
    }
    .products .product-content p {
        font-size: 0.95rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
    .products .product-cta {
        padding-top: 0.6rem;
    }
    .products .product-cta .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
    
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .client-logo {
        height: 70px;
        padding: 0.6rem;
    }
    
    .clients .section-title h2 {
        font-size: 1.8rem;
    }
    
    .clients .section-title p {
        font-size: 1rem;
        white-space: normal;
        max-width: 100%;
    }
}
