/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.logo {
    margin-right: 10px;
}

.logo img {
    width: 90px;
    height: 50px;
    object-fit: contain;
    margin-top: 5px;
}

.brand-description {
    font-size: 15px;
    font-weight: 500;
    color: #3366cc;
    margin-left: 15px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 备选淡蓝色方案 */
/* .brand-description {
    font-size: 16px;
    font-weight: 500;
    color: #3366cc;
    margin-left: 20px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: #E3F2FD;
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid #BBDEFB;
} */

/* 响应式设计 */
@media (max-width: 992px) {
    .brand-description {
        font-size: 12px;
        margin-left: 10px;
    }
}

@media (max-width: 768px) {
    .navbar-left {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .brand-description {
        margin-left: 0;
        margin-top: 5px;
        white-space: normal;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .brand-description {
        font-size: 11px;
    }
}

.navbar-text {
    font-size: 20px;
    font-weight: bold;
    color: #3366cc;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #3366cc;
    transition: all 0.3s ease;
    padding: 6px 10px;
    border-radius: 4px;
}

.nav-item:nth-child(1) {
    background-color: #e6f2ff;
}

.nav-item:nth-child(2) {
    background-color: #cce5ff;
}

.nav-item:nth-child(3) {
    background-color: #b3d1ff;
}

.nav-item:nth-child(4) {
    background-color: #99c2ff;
}

.nav-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-item.active {
    color: #3366cc;
    font-weight: bold;
}

/* 板块通用样式 */
.section {
    padding: 120px 0 80px;
    background-color: #fff;
    margin-top: 20px;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 32px;
    font-weight: bold;
    color: #3366cc;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #3366cc;
    margin: 15px auto;
}

.section-title-container {
    text-align: center;
    margin-bottom: 1.5em;
}

.section-subtitle {
    font-size: 16px;
    color: #3366cc;
    margin-top: 20px;
    margin-bottom: 1.5em;
    font-weight: 500;
    letter-spacing: 2px;
}

/* 公司介绍板块 */
.introduction-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}

.introduction-images {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.introduction-images img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.introduction-images img:hover {
    transform: scale(1.02);
}

.introduction-text {
    flex: 1;
    min-width: 300px;
}

.introduction-text h3 {
    font-size: clamp(1.0rem, 3.0vw, 2.5rem);
    line-height: 1.2;
    letter-spacing: 2px;
    color: #3366cc;
    margin-bottom: 20px;
    transition: all 0.4s ease;
    display: block;
    width: 100%;
    text-align: center;
    font-weight: bold;
}

.highlight-text {
    font-size: clamp(1.8rem, 4.5vw, 3.5rem);
    color: #D32F2F;
}

.intro-subtitle {
    font-size: 1.2rem;
    color: #3366cc;
    margin: 30px 0 15px;
    font-weight: 600;
    letter-spacing: 1px;
}

.introduction-text h3:hover {
    transform: translateY(-8px) scale(1.08);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .introduction-text h3 {
        font-size: clamp(1.8rem, 4vw, 3rem);
    }
}

@media (max-width: 480px) {
    .introduction-text h3 {
        font-size: clamp(1.5rem, 3vw, 2.5rem);
    }
}

.introduction-text p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* 动画效果 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 为不同元素设置不同的延迟 */
.introduction-images {
    transition-delay: 0.2s;
}

.introduction-text h3 {
    transition-delay: 0.4s;
}

.intro-subtitle {
    transition-delay: 0.6s;
}

.introduction-text p {
    transition-delay: 0.8s;
}

/* 产品介绍板块 */
.product-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background-color: #f9f9f9;
    border: 1px solid #e6f2ff;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    color: #3366cc;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.filter-btn:hover {
    background-color: #e6f2ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(51, 102, 204, 0.1);
}

.filter-btn.active {
    background-color: #3366cc;
    color: white;
    border-color: #3366cc;
    box-shadow: 0 2px 10px rgba(51, 102, 204, 0.2);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

/* 产品卡片过渡效果 */
.product-item {
    transition: all 0.5s ease;
    opacity: 1;
    transform: scale(1);
    min-height: 400px; /* 确保所有卡片高度一致 */
    display: flex;
    flex-direction: column;
}

.product-item.hidden {
    display: none; /* 使用display: none替代高度和边距调整 */
    pointer-events: none;
}

.product-item {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 1px solid #e6f2ff;
    min-height: 400px;
    max-width: 100%; /* 确保卡片不会超过容器宽度 */
    width: 100%; /* 确保卡片宽度一致 */
    display: flex;
    flex-direction: column;
}

/* 确保实验室器材卡片与其他卡片大小一致 */
.product-item[data-category="lab"] {
    min-height: 400px;
    max-width: 100%;
    width: 100%;
}

.product-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(51, 102, 204, 0.15);
    border-color: #3366cc;
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-bottom: 1px solid #e6f2ff;
}

.product-item:hover img {
    transform: scale(1.1);
}

.product-item h3 {
    font-size: 18px;
    color: #3366cc;
    margin: 15px 0 10px 20px;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.product-item:hover h3 {
    color: #254a99;
}

.product-item p {
    padding: 0 20px 20px;
    color: #666;
    transition: color 0.3s ease;
    flex-grow: 1;
    display: flex;
    align-items: flex-start;
}

.product-item:hover p {
    color: #333;
}

/* 为产品卡片添加轻微的脉冲效果 */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }
    50% {
        box-shadow: 0 6px 20px rgba(51, 102, 204, 0.1);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }
}

.product-item {
    animation: pulse 3s infinite;
}

.product-item:hover {
    animation: none;
}

/* 客户群板块 */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
}

.partner-item {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 1px solid #f0f0f0;
    opacity: 0;
    transform: translateY(20px);
}

.partner-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.partner-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 8px 20px rgba(51, 102, 204, 0.15);
    border-color: #3366cc;
}

.partner-item img {
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.partner-item:hover img {
    transform: scale(1.1);
}

/* 为客户墙添加交错动画延迟 */
.partner-item:nth-child(1) { transition-delay: 0.1s; }
.partner-item:nth-child(2) { transition-delay: 0.2s; }
.partner-item:nth-child(3) { transition-delay: 0.3s; }
.partner-item:nth-child(4) { transition-delay: 0.4s; }
.partner-item:nth-child(5) { transition-delay: 0.5s; }
.partner-item:nth-child(6) { transition-delay: 0.6s; }
.partner-item:nth-child(7) { transition-delay: 0.7s; }
.partner-item:nth-child(8) { transition-delay: 0.8s; }
.partner-item:nth-child(9) { transition-delay: 0.9s; }
.partner-item:nth-child(10) { transition-delay: 1.0s; }
.partner-item:nth-child(11) { transition-delay: 1.1s; }
.partner-item:nth-child(12) { transition-delay: 1.2s; }
.partner-item:nth-child(13) { transition-delay: 1.3s; }
.partner-item:nth-child(14) { transition-delay: 1.4s; }
.partner-item:nth-child(15) { transition-delay: 1.5s; }
.partner-item:nth-child(16) { transition-delay: 1.6s; }
.partner-item:nth-child(17) { transition-delay: 1.7s; }
.partner-item:nth-child(18) { transition-delay: 1.8s; }
.partner-item:nth-child(19) { transition-delay: 1.9s; }
.partner-item:nth-child(20) { transition-delay: 2.0s; }
.partner-item:nth-child(21) { transition-delay: 2.1s; }
.partner-item:nth-child(22) { transition-delay: 2.2s; }
.partner-item:nth-child(23) { transition-delay: 2.3s; }
.partner-item:nth-child(24) { transition-delay: 2.4s; }

/* 响应式设计 */
@media (max-width: 992px) {
    .partner-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 18px;
    }
    
    .partner-item {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .partner-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .partner-item {
        padding: 18px;
    }
    
    .partner-item img {
        max-height: 60px;
    }
}

@media (max-width: 480px) {
    .partner-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .partner-item {
        padding: 15px;
    }
    
    .partner-item img {
        max-height: 50px;
    }
}

/* 联系我们板块 */
.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-item {
    text-align: center;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 200px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 基地板块样式 */
.base-item {
    text-align: left;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e6f2ff;
}

.base-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #3366cc;
}

.base-item h3 {
    font-size: 18px;
    color: #3366cc;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e6f2ff;
}

.base-info {
    margin-bottom: 12px;
    line-height: 1.5;
    color: #666;
}

.base-info strong {
    color: #333;
}

.contact-item h3 {
    font-size: 18px;
    color: #3366cc;
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }

    .navbar-left {
        margin-bottom: 15px;
    }

    .nav-menu {
        width: 100%;
        justify-content: space-around;
    }

    .nav-item {
        margin-left: 0;
        padding: 6px 10px;
    }

    .section {
        padding: 100px 0 60px;
    }

    .introduction-content {
        flex-direction: column;
    }

    .contact-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .base-item {
        padding: 25px;
    }

    .contact-item {
        width: 80%;
    }
}

@media (max-width: 480px) {
    .navbar-text {
        font-size: 20px;
    }

    .logo {
        width: 40px;
        height: 40px;
    }

    .nav-item {
        font-size: 14px;
        padding: 4px 8px;
    }

    .section-title {
        font-size: 28px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .partner-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .base-item {
        padding: 20px;
    }

    .base-item h3 {
        font-size: 16px;
    }

    .base-info {
        font-size: 14px;
    }
}

/* 滚动效果 */
.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.nav-item.scrolled {
    color: #3366cc;
}

/* 底部导航栏样式 */
.footer {
    background-color: #f9f9f9;
    border-top: 1px solid #e6f2ff;
    padding: 30px 0;
    margin-top: 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
}

.container {
    color: #666;
    font-size: 14px;
    flex: 1;
}

.icp {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.icp:hover {
    color: #3366cc;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 20px 0;
    }

    .container, .icp {
        font-size: 12px;
    }
}