* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Banner Section */
.banner-section {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
}

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

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.3), rgba(0,0,0,0.1));
}

.banner-content {
    color: white;
    position: absolute;
    top: 50%;
    left: 20%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
}

.banner-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Breadcrumb */
.breadcrumb {
    background-color: #f8f9fa;
    padding: 15px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #007bff;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.company-intro {
    padding: 80px 0;
    background-color: #fff;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 60px;
    font-weight: 400;
}

.intro-content {
    font-size: 16px;
    line-height: 2;
    color: #666;
    text-align: justify;
    margin-bottom: 50px;
}

.intro-content p {
    margin-bottom: 20px;
    text-indent: 2em;
}

/* Image Gallery */
.image-gallery {
    position: relative;
    margin-top: 40px;
    padding: 0 60px; /* 为箭头留出空间 */
}

.gallery-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    width: 100%;
}

.gallery-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px; /* 使用gap替代margin */
}

.gallery-item {
    flex: 0 0 calc(33.333% - 13.33px); /* 调整计算方式 */
    min-width: 0; /* 防止flex项目溢出 */
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: block; /* 确保图片正确显示 */
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    transition: all 0.3s;
    z-index: 3;
}

.gallery-nav:hover {
    background: rgba(255,255,255,1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.gallery-nav.prev {
    left: -25px;
}

.gallery-nav.next {
    right: -25px;
}

/* Certificate Section */
.certificate-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.cert-item {
    text-align: center;
    background: white;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.cert-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.cert-logo {
    height: 100px;
    object-fit: contain;
}

.cert-name {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Responsive Design - Laptop/Desktop (1024px - 1440px) */
@media (min-width: 1024px) and (max-width: 1440px) {
    .container {
        max-width: 1000px;
    }

    .banner-content h1 {
        font-size: 2.5rem;
        left: 60px;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .image-gallery {
        padding: 0 50px;
    }

    .gallery-item {
        flex: 0 0 calc(33.333% - 13.33px);
    }

    .gallery-item img {
        height: 220px;
    }
}

/* Tablet Design (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 0 30px;
    }

    .banner-section {
        height: 300px;
    }

    .banner-content {
        left: 40px;
    }

    .banner-content h1 {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }

    .company-intro {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .intro-content {
        font-size: 15px;
    }

    .image-gallery {
        padding: 0 40px;
    }

    .gallery-item {
        flex: 0 0 calc(50% - 10px);
    }

    .gallery-item img {
        height: 200px;
    }

    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .cert-item {
        padding: 25px 15px;
    }
}

/* Mobile Design (320px - 767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 20px;
    }

    .banner-section {
        height: 250px;
    }

    .banner-content {
        right: 20px;
        text-align: center;
    }

    .banner-content h1 {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .breadcrumb {
        padding: 10px 0;
        font-size: 12px;
    }

    .company-intro {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }

    .intro-content {
        font-size: 14px;
        line-height: 1.8;
    }

    .intro-content p {
        text-indent: 1em;
        margin-bottom: 15px;
    }

    /* Mobile Gallery */
    .image-gallery {
        padding: 0 20px;
        margin-top: 30px;
    }

    .gallery-container {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 10px; /* 为滚动条留空间 */
    }

    .gallery-container::-webkit-scrollbar {
        display: none;
    }

    .gallery-track {
        width: max-content;
        transition: none;
        gap: 15px;
    }

    .gallery-item {
        flex: 0 0 280px;
        min-width: 280px; /* 确保最小宽度 */
    }

    .gallery-item img {
        height: 180px;
        width: 280px; /* 明确指定宽度 */
    }

    .gallery-nav {
        display: none;
    }

    .certificate-section {
        padding: 50px 0;
    }

    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-top: 30px;
    }

    .cert-item {
        padding: 20px 15px;
    }

    .cert-logo {
        width: 100%;
        margin-bottom: 15px;
    }

    .cert-name {
        font-size: 12px;
    }
}

/* Extra Small Mobile (320px - 480px) */
@media (max-width: 480px) {
    .banner-content h1 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .intro-content {
        font-size: 13px;
    }

    .gallery-item {
        flex: 0 0 250px;
    }

    .gallery-item img {
        height: 160px;
    }

    .cert-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cert-item {
        padding: 20px;
    }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .banner-img,
    .gallery-item img,
    .cert-logo {
        image-rendering: -webkit-optimize-contrast;
    }
}
