/*蓝白灰主题 - 医疗设备 */
:root {
    --primary-blue: #2196F3;
    --dark-blue: #1976D2;
    --light-blue: #E3F2FD;
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --medium-gray: #9E9E9E;
    --dark-gray: #424242;
    --text-color: #333333;
    --black: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    background: var(--primary-blue);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--black);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 通用部分样式 */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--black);
    font-size: 2rem;
    font-weight: bold;
}

/* 从右往左加载动画 */
.load-from-right {
    opacity: 0;
    transform: translateX(120px);
    transition: all 1s ease-out;
}

.load-from-right.loaded {
    opacity: 1;
    transform: translateX(0);
}

/* === 统一右对齐链接样式 === */
.right-align-link-container {
    margin-top: 20px;
    text-align: right; /* 靠右对齐 */
    padding-right: 10px;
}

.more-link-btn {
    display: inline-block; /* 不占整行 */
    margin-top: 15px;
    padding: 10px 20px;
    background: transparent;
    color: var(--primary-blue);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-blue);
    position: relative;
    font-size: 0.95rem;
    line-height: 1.4;
 white-space: nowrap; /* 防止换行 */
}

.more-link-btn:hover {
    color: var(--primary-blue);
    background: rgba(33, 150, 243, 0.1);
    transform: translateX(5px);
    border-color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.more-link-btn::after {
    content: '→';
    margin-left: 5px;
    transition: margin 0.3s ease;
}

.more-link-btn:hover::after {
    margin-left: 10px;
}

/* === 1. 顶部浅灰背景（轮播） === */
.carousel-section {
    background: var(--light-gray);
    padding: 40px 0;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    background: var(--medium-gray);
    min-height: 400px;
}

.carousel-wrapper {
    overflow: hidden;
    min-height: 400px;
}

.carousel-track {
    display: flex;
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-height: 400px;
}

.carousel-item {
    min-width: 100%;
    position: relative;
    min-height: 400px;
    background: var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    min-height: 400px;
}

/* 轮播文字内容容器 */
.carousel-content {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 80%;
    max-width: 700px;
    padding: 0 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 20px 30px;
    backdrop-filter: blur(5px);
}

/* 标题和简介 - 初始状态（从右往左） */
.carousel-title,
.carousel-description {
    opacity: 0;
    transform: translateX(60px);
    transition: all 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 标题样式 */
.carousel-title {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 12px;
    text-shadow:
        0 2px 8px rgba(0,0,0,0.8),
        0 0 2px rgba(0,0,0,0.8);
    letter-spacing: 0.5px;
}

/* 简介样式 */
.carousel-description {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    text-shadow:
        0 1px 4px rgba(0,0,0,0.8),
        0 0 1px rgba(0,0,0,0.8);
}

/* 激活状态 - 标题先加载，简介后加载 */
.carousel-item.active .carousel-title {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.2s;
}

.carousel-item.active .carousel-description {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.6s;
}

/* 左右箭头 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.3rem;
    color: white;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.98);
}

.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }

/* === 2. 白色背景（关于我们） === */
.about-section {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-image {
    opacity: 0;
    transform: translateX(80px);
    transition: all 0.8s ease-out;
}

.about-image.loaded {
    opacity: 1;
    transform: translateX(0);
}

.about-text {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s ease-out;
    transition-delay: 0.3s;
}

.about-text.loaded {
    opacity: 1;
    transform: translateX(0);
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.about-text h2 {
    color: var(--black);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.about-text p {
    margin-bottom: 15px;
    color: var(--text-color);
    text-align: justify;
}

/* === 3. 浅灰背景（统计） === */
.stats-section {
    background: var(--light-gray);
    padding: 60px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item {
    padding: 25px 15px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(80px);
}

.stat-item.loaded {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.8s ease-out;
}

.stat-item:nth-child(1).loaded { transition-delay: 0.1s; }
.stat-item:nth-child(2).loaded { transition-delay: 0.2s; }
.stat-item:nth-child(3).loaded { transition-delay: 0.3s; }
.stat-item:nth-child(4).loaded { transition-delay: 0.4s; }

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.15);
}

.stat-value {
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--primary-blue);
    line-height: 1;
    min-width: 60px;
    text-align: right;
}

.stat-unit {
    font-size: 1.5rem;
    color: var(--primary-blue);
    font-weight: bold;
    line-height: 1;
    align-self: flex-end;
    padding-bottom: 8px;
}

.stat-label {
    font-size: 1rem;
    color: var(--black);
    letter-spacing: 1px;
    font-weight: 500;
}

/* === 4. 白色背景（产品方案） === */
.products-section {
    background: var(--white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    opacity: 0;
    transform: translateX(80px);
}

.product-card.loaded {
    opacity: 1;
    transform: translateX(0);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    padding: 15px;
    color: var(--black);
    font-size: 1.2rem;
}

.product-card p {
    padding: 0 15px 15px;
    color: var(--medium-gray);
}

/* 产品方案中的了解更多 - 统一右对齐样式 */
.product-card .right-align-link-container {
    margin-top: 0;
    padding: 0 15px 15px;
    text-align: right;
    padding-right: 15px;
}

.product-card .more-link-btn {
    margin-top: 0;
    padding: 8px 15px; /* 稍小一点，适应卡片 */
    font-size: 0.9rem;
}

/* === 5. 浅灰背景（荣誉证书）- CSS动画90秒无缝 === */
.certificates-section {
    background: var(--light-gray);
    position: relative;
}

.certificates-marquee {
    overflow: hidden;
    border-radius: 10px;
    background: var(--white);
    padding: 20px 0;
    min-height: 320px;
    position: relative;
}

.marquee-content {
    display: flex;
    animation: scroll 90s linear infinite; /* 90秒完成一轮 */
    width: max-content;
    height: 280px;
}

.marquee-content:hover {
    animation-play-state: paused; /* 悬停暂停 */
}

.certificate-item {
    margin: 0 15px;
    flex-shrink: 0;
    width: 200px;
    height: 280px;
    background: var(--light-gray);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    position: relative;
}

.certificate-item:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 10;
}

.certificate-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 悬停显示alt内容 - 支持换行 */
.certificate-item::after {
    content: attr(data-alt);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 10px;
    font-size: 0.85rem;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 11;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.4;
    max-height: 60px;
    overflow-y: auto;
}

.certificate-item:hover::after {
    transform: translateY(0);
}

/* 滚动条样式 */
.certificate-item::after::-webkit-scrollbar {
    width: 3px;
}

.certificate-item::after::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.certificate-item::after::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
}

/* 滚动动画 - 90秒完成一轮 */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); /* 滚动到一半，显示第二组 */
    }
}

/* 高清大图区域 */
.certificate-zoom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.certificate-zoom.active {
    display: flex;
    opacity: 1;
}

.certificate-zoom img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.certificate-zoom.active img {
    transform: scale(1);
}

/* 关闭按钮 */
.close-zoom {
    position: absolute;
    top: 30px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.3);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-zoom:hover {
    transform: rotate(90deg);
    background: rgba(255,255,255,0.2);
    border-color: var(--primary-blue);
}

.close-zoom svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
    fill: white;
}

/* === 6. 白色背景（新闻动态） === */
.news-section {
    background: var(--white);
}

.news-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
    align-items: start;
}

.news-left-image {
    opacity: 0;
    transform: translateX(80px);
    transition: all 0.8s ease-out;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.news-left-image.loaded {
    opacity: 1;
    transform: translateX(0);
}

.news-left-image img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
}

.news-right-content {
    opacity: 0;
    transform: translateX(80px);
    transition: all 0.8s ease-out;
    transition-delay: 0.1s;
}

.news-right-content.loaded {
    opacity: 1;
    transform: translateX(0);
}

.news-row {
    background: var(--light-gray);
    padding: 8px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-left: 4px solid var(--primary-blue);
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.7s ease-out;
}

.news-row:last-child {
    margin-bottom: 0;
}

.news-right-content.loaded .news-row {
    opacity: 1;
    transform: translateY(0);
}

.news-right-content.loaded .news-row:nth-child(1) { transition-delay: 0.2s; }
.news-right-content.loaded .news-row:nth-child(2) { transition-delay: 0.4s; }
.news-right-content.loaded .news-row:nth-child(3) { transition-delay: 0.6s; }
.news-right-content.loaded .news-row:nth-child(4) { transition-delay: 0.8s; }
.news-right-content.loaded .news-row:nth-child(5) { transition-delay: 1.0s; }
.news-right-content.loaded .news-row:nth-child(6) { transition-delay: 1.2s; }

/* 新闻标题链接 */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.news-title-link {
    text-decoration: none;
    color: var(--black);
    flex: 1;
    transition: all 0.3s ease;
    display: block;
    padding: 3px 0;
    margin-right: 10px;
}

.news-title {
    font-size: 1.15rem;
    font-weight: bold;
    color: var(--black);
    margin: 0;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.news-title-link:hover .news-title {
    color: var(--primary-blue);
    transform: translateX(5px);
}

.news-title-link:hover {
    background: rgba(33, 150, 243, 0.05);
    border-radius: 4px;
}

.news-date {
    font-size: 0.85rem;
    color: var(--medium-gray);
    white-space: nowrap;
}

.news-summary {
    color: var(--text-color);
    line-height: 1.5;
    margin: 0;
    text-align: justify;
    font-size: 0.95rem;
}

/* === 7. 浅灰背景（联系我们） === */
.contact-section {
    background: var(--light-gray);
}

.contact-content {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 40px;
    align-items: start;
}

.contact-left-image {
    opacity: 0;
    transform: translateX(80px);
    transition: all 0.8s ease-out;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    width: 100%;
    height: 415px;
}

.contact-left-image.loaded {
    opacity: 1;
    transform: translateX(0);
}

.contact-left-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.contact-right-content {
    opacity: 0;
    transform: translateX(80px);
    transition: all 0.8s ease-out;
    transition-delay: 0.1s;
}

.contact-right-content.loaded {
    opacity: 1;
    transform: translateX(0);
}

.contact-info-box {
    background: var(--white);
    padding: 35px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-blue);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info-box h3 {
    color: var(--black);
    margin-bottom: 18px;
    font-size: 1.6rem;
    line-height: 1.3;
}

.contact-info-box p {
    margin-bottom: 14px;
    color: var(--text-color);
    line-height: 1.7;
    font-size: 1.05rem;
}

.contact-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.contact-details p {
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--black);
    line-height: 1.5;
}

/* === 8. 白色背景（底部） === */
footer {
    background: var(--white);
    color: var(--text-color);
    padding: 30px 0;
    margin-top: 0;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 0 20px;
    flex-wrap: wrap;
}

.footer-section h3 {
    color: var(--black);
    margin-bottom: 0;
    font-size: 1.1rem;
    font-weight: bold;
    margin-right: 10px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px;
}

.footer-section li {
    margin: 0;
}

.footer-section a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.footer-section a:hover {
    color: var(--primary-blue);
}

.footer-bottom {
    text-align: center;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    color: var(--text-color);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 15px;
}

/* === 响应式设计 === */
@media (max-width: 968px) {
    .nav-links {
        gap: 15px;
        font-size: 0.9rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .stat-number {
        font-size: 2.8rem;
    }

    .stat-unit {
        font-size: 1.3rem;
    }

    .about-content,
    .contact-content,
    .products-grid,
    .news-container {
        grid-template-columns: 1fr;
    }

    .news-left-image img {
        height: 400px;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-section ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .carousel-item img {
        height: 300px;
    }

    .carousel-container,
    .carousel-wrapper,
    .carousel-track,
    .carousel-item,
    .carousel-item img {
        min-height: 300px;
        height: 300px;
    }

    .carousel-content {
        bottom: 30px;
    }

    .carousel-title {
        font-size: 1.4rem;
    }

    .carousel-description {
        font-size: 0.95rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .contact-left-image {
        height: 415px;
    }

    .contact-info-box {
        padding: 25px;
    }

    .certificate-item {
        width: 180px;
        height: 250px;
    }

    .right-align-link-container {
        text-align: center; /* 移动端居中 */
        padding-right: 0;
    }

    .certificate-item::after {
        font-size: 0.75rem;
        padding: 6px 8px;
        max-height: 50px;
    }

    .more-link-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .nav-left .company-name {
        display: none;
    }

    .nav-links {
        gap: 10px;
        font-size: 0.8rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-unit {
        font-size: 1.2rem;
    }

    .news-left-image img {
        height: 300px;
    }

    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .news-date {
        margin-left: 0;
    }

    .news-title-link {
        margin-right: 0;
        margin-bottom: 3px;
    }

    .carousel-item img {
        height: 250px;
    }

    .carousel-container,
    .carousel-wrapper,
    .carousel-track,
    .carousel-item,
    .carousel-item img {
        min-height: 250px;
        height: 250px;
    }

    .carousel-content {
        bottom: 20px;
        width: 90%;
        padding: 12px 15px;
    }

    .carousel-title {
        font-size: 1.2rem;
    }

    .carousel-description {
        font-size: 0.85rem;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }

    .carousel-btn.prev { left: 10px; }
    .carousel-btn.next { right: 10px; }

    .contact-left-image {
        height: 300px;
    }

    .contact-info-box {
        padding: 20px;
    }

    .footer-content {
        padding: 0 10px;
        gap: 20px;
    }

    .footer-section ul {
        flex-direction: column;
        gap: 8px;
    }

    .footer-bottom {
        padding: 15px;
        font-size: 0.85rem;
    }

    .certificate-item {
        width: 160px;
        height: 220px;
        margin: 0 10px;
    }

    .certificates-marquee {
        min-height: 280px;
        padding: 15px 0;
    }

    .marquee-content {
        height: 250px;
        animation-duration: 70s; /* 手机端稍快 */
    }

    .certificate-item::after {
        font-size: 0.7rem;
        padding: 5px 6px;
        max-height: 45px;
    }

    .close-zoom {
        top: 15px;
        right: 20px;
        width: 40px;
        height: 40px;
    }

    .close-zoom svg {
        width: 20px;
        height: 20px;
    }

    .more-link-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}
