/*
 * ============================================================================
 * 🚀 CODE BLOCK START: baseStyles
 * ============================================================================
 * Purpose: 基础样式和学术配色变量
 * Design Decision: 深蓝为主色，避免紫色和粉色
 */

:root {
    --primary-dark: #0d3b5c;
    --primary: #1a5276;
    --primary-light: #2874a6;
    --accent-green: #1e8449;
    --accent-teal: #16a085;
    --text-dark: #2c3e50;
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg-white: #fff;
    --bg-light: #f8f9fa;
    --border: #ddd;
}

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

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-white);
    color: var(--text);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================================================
 * 🏁 CODE BLOCK END: baseStyles
 * ============================================================================ */

/*
 * ============================================================================
 * 🚀 CODE BLOCK START: headerNavigation
 * ============================================================================
 */

.header-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}

.menu {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 50px;
}

.logo {
    display: none;
}

/* 汉堡菜单按钮 - 桌面端隐藏 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    transition: all 0.3s;
}

.menu-nav {
    display: flex;
    list-style: none;
    gap: 0;
    flex: 1;
}

.menu-nav li > a {
    display: block;
    padding: 15px 18px;
    color: #000;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.menu-nav li > a:hover {
    color: #c00;
    border-bottom-color: #c00;
}

.menu-nav li.active > a {
    color: #c00;
    border-bottom-color: #c00;
}

.menu-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    z-index: 2;
}

.header-search-input {
    width: 180px;
    height: 36px;
    padding: 0 12px 0 38px;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    font-size: 13px;
    background: #f8f8f8;
    transition: all 0.3s;
    outline: none;
    box-sizing: border-box;
}

.header-search-input::placeholder {
    color: #aaa;
}

.header-search-input:focus {
    width: 260px;
    background: #fff;
    border-color: #c00;
    box-shadow: 0 2px 8px rgba(204, 0, 0, 0.15);
}

.header-search:focus-within .header-search-icon {
    color: #c00;
}

.header-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 350px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    max-height: 420px;
    overflow-y: auto;
    z-index: 9999;
}

.header-search-results.active {
    display: block;
}

.header-search-results::-webkit-scrollbar {
    width: 6px;
}

.header-search-results::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #fff5f5;
}

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.search-result-title mark {
    background: #ffe066;
    color: #333;
    padding: 0 2px;
    border-radius: 2px;
}

.search-result-context {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-context mark {
    background: #ffe066;
    color: #333;
    padding: 0 2px;
    border-radius: 2px;
}

.search-result-section {
    font-size: 11px;
    color: #999;
    margin-top: 6px;
}

.search-no-result {
    padding: 24px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* 搜索高亮效果 */
.search-highlight {
    animation: highlightFade 3s ease-out;
}

@keyframes highlightFade {
    0% { background-color: #ffe066; }
    100% { background-color: transparent; }
}

.login-btn {
    color: #fff;
    padding: 8px 16px;
    background: #c00;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.login-btn:hover {
    background: #a00;
}

/* ============================================================================
 * 🏁 CODE BLOCK END: headerNavigation
 * ============================================================================ */

.main-content {
    padding-top: 50px;
}

.main-content.hidden {
    display: none;
}

/*
 * ============================================================================
 * 🚀 CODE BLOCK START: footer - 简洁专业风格
 * ============================================================================
 */

.footer {
    background: #fff;
    border-top: 1px solid #e5e5e5;
}

.footer-main {
    padding: 50px 20px 40px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin-bottom: 20px;
}

.footer-col p {
    font-size: 13px;
    color: #333;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: #c00;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.2s;
}

.footer-social a:hover {
    background: #c00;
    color: #fff;
}

.footer-qr-box {
    display: flex;
    gap: 15px;
}

.footer-qr-item {
    text-align: center;
}

.footer-qr-item .qr-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 8px;
}

.footer-qr-item p {
    font-size: 12px;
    color: #666;
}

.footer-bottom {
    border-top: 1px solid #e5e5e5;
    padding: 20px;
}

.footer-bottom-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bottom-links a:hover {
    color: #c00;
}

/* ============================================================================
 * 🏁 CODE BLOCK END: footer
 * ============================================================================ */

/*
 * ============================================================================
 * 🚀 CODE BLOCK START: floatingButtons
 * ============================================================================
 */

.floating-btns {
    position: fixed;
    right: 20px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.float-btn {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
    flex-direction: column;
}

.float-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ============================================================================
 * 🏁 CODE BLOCK END: floatingButtons
 * ============================================================================ */

/* ============================================================================
 * 🚀 CODE BLOCK START: contactModal
 * ============================================================================
 * Purpose: 企业微信客服弹窗 - 桌面端扫码、手机端直链
 */

.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.contact-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.contact-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 36px 32px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.contact-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.contact-modal-close:hover {
    color: #333;
}

.contact-modal-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.contact-modal-content p {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
}

.contact-modal-qr {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    background: #f5f5f5;
    border: 1px solid #eee;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-modal-qr img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.contact-modal-link {
    display: inline-block;
    color: #c00;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 0;
}

.contact-modal-link:hover {
    text-decoration: underline;
}

/* 手机端直接跳转，隐藏二维码 */
@media screen and (max-width: 768px) {
    .contact-modal-qr {
        display: none;
    }

    .contact-modal-content p {
        display: none;
    }

    .contact-modal-content h3 {
        margin-bottom: 16px;
    }

    .contact-modal-link {
        display: inline-block;
        background: #c00;
        color: #fff;
        padding: 12px 24px;
        border-radius: 4px;
        font-size: 14px;
    }

    .contact-modal-link:hover {
        background: #a00;
        text-decoration: none;
    }
}

/* ============================================================================
 * 🏁 CODE BLOCK END: contactModal
 * ============================================================================ */

/* ============================================================================
 * 🚀 CODE BLOCK START: experimentPage
 * ============================================================================ */
/* Purpose: 实验服务详情页面样式 - Nature风格 */

.exp-page {
    display: none;
    padding: 50px 0 0 0;
    background: #fff;
}

.exp-page.active {
    display: block;
}

/* 返回按钮 */
.exp-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    color: #c00;
    padding: 12px 20px;
    border: none;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
}

.exp-back-btn:hover {
    background: rgba(0,0,0,0.03);
}

/* 导航条 */
.exp-page-nav {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 0 5%;
    position: sticky;
    top: 50px;
    z-index: 100;
    overflow: hidden;
}

.exp-page-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.exp-page-nav-inner::-webkit-scrollbar {
    display: none;
}

.exp-page-nav a {
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.exp-page-nav a:hover {
    color: #c00;
    background: rgba(0,0,0,0.03);
}

.exp-page-nav a.active {
    color: #c00;
    border-bottom-color: #c00;
}

/* 主体内容 */
.exp-page-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 5% 80px;
}

.exp-section {
    margin-bottom: 50px;
    scroll-margin-top: 120px;
}

.exp-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #c00;
}

.exp-subsection {
    margin-bottom: 25px;
}

.exp-subsection-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #444;
    margin: 0 0 12px 0;
    padding: 8px 12px;
    background: #f8f8f8;
    border-left: 3px solid #c00;
}

/* 表格样式 - 固定列宽 */
.exp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-bottom: 10px;
    table-layout: fixed;
}

.exp-table th,
.exp-table td {
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: middle;
}

.exp-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
    font-size: 0.8rem;
}

.exp-table th:nth-child(1) { width: 40%; }
.exp-table th:nth-child(2) { width: 15%; }
.exp-table th:nth-child(3) { width: 15%; }
.exp-table th:nth-child(4) { width: 30%; }

/* 两列表格 - 第一列与四列表格对齐 */
.exp-table.two-col th:nth-child(1) { width: 40%; }
.exp-table.two-col th:nth-child(2) { width: 60%; }

.exp-table td {
    color: #333;
}

.exp-table tbody tr:hover {
    background: #fafafa;
}

.exp-table .price {
    color: #222;
    font-weight: 600;
    white-space: nowrap;
}

.exp-table .unit {
    color: #555;
    font-size: 0.85rem;
}

.exp-table .note {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 联系卡片 */
.exp-contact-box {
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-top: 3px solid #c00;
    padding: 30px;
    margin-top: 40px;
    text-align: center;
}

.exp-contact-box h3 {
    color: #222;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.exp-contact-box p {
    color: #666;
    margin: 0 0 20px 0;
    font-size: 0.9rem;
}

.exp-contact-btn {
    display: inline-block;
    background: #c00;
    color: #fff;
    padding: 10px 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.exp-contact-btn:hover {
    background: #a00;
}

@media (max-width: 768px) {
    .exp-back-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .exp-page-nav {
        padding: 0 10px;
        top: 50px;
    }

    .exp-page-nav a {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .exp-page-body {
        padding: 20px 15px 60px;
    }

    .exp-section-title {
        font-size: 1.05rem;
    }

    .exp-table {
        font-size: 0.8rem;
        table-layout: auto;
    }

    .exp-table th,
    .exp-table td {
        padding: 8px;
    }

    .exp-table .note {
        display: none;
    }

    .exp-table th:nth-child(1) { width: auto; }
    .exp-table th:nth-child(2) { width: auto; }
    .exp-table th:nth-child(3) { width: auto; }
    .exp-table th:nth-child(4) { width: auto; }

    .exp-contact-box {
        padding: 25px 15px;
    }
}

/* ============================================================================
 * 🏁 CODE BLOCK END: experimentPage
 * ============================================================================ */

/* ============================================================================
 * 🚀 CODE BLOCK START: searchSection
 * ============================================================================
 */

.search-section {
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    display: flex;
    align-items: center;
    gap: 60px;
}

.search-left {
    flex: 1;
    text-align: center;
}

.search-left h2 {
    font-size: 34px;
    color: var(--primary);
    text-shadow: 2px 2px 1px #c1c1c1;
    margin-bottom: 8px;
}

.search-left p {
    font-size: 26px;
    color: var(--primary);
    text-shadow: 2px 2px 1px #c1c1c1;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 4px 2px 10px #c1c1c1;
    border-radius: 30px;
    overflow: hidden;
}

.search-box select {
    padding: 15px 20px;
    border: none;
    background: #f5f5f5;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-box button {
    padding: 15px 30px;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--primary-dark);
}

.search-right {
    width: 500px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.stat-item .number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-item .label {
    font-size: 14px;
    color: var(--text-light);
}

/* ============================================================================
 * 🏁 CODE BLOCK END: searchSection
 * ============================================================================ */

/* ============================================================================
 * 🚀 CODE BLOCK START: responsiveBase
 * ============================================================================
 * Purpose: 公共组件的移动端响应式适配
 */

/* --- Tablet: <=1024px --- */
@media screen and (max-width: 1024px) {
    .menu {
        padding: 0 16px;
    }

    .menu-nav li > a {
        padding: 15px 12px;
        font-size: 13px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

/* --- Mobile: <=768px --- */
@media screen and (max-width: 768px) {
    /* 汉堡菜单显示 */
    .menu-toggle {
        display: flex;
        margin-left: auto;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* 导航下拉 */
    .menu {
        flex-wrap: wrap;
        height: auto;
        min-height: 50px;
        padding: 0 16px;
    }

    .menu-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 10;
        padding: 0 0 10px;
        border-top: 1px solid #eee;
    }

    .menu-nav.open {
        display: flex;
    }

    .menu-nav li > a {
        padding: 12px 0;
        border-bottom: none;
    }

    /* 搜索框隐藏 */
    .header-search {
        display: none;
    }

    /* 登录按钮缩小 */
    .menu-right {
        margin-left: 0;
    }

    .login-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Footer 单列 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-main {
        padding: 30px 16px 24px;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    /* 浮动按钮缩小 */
    .floating-btns {
        right: 12px;
        bottom: 80px;
    }

    .float-btn {
        width: 40px;
        height: 40px;
        font-size: 10px;
        border-radius: 8px;
    }

    /* 实验/生信详情页 */
    .exp-page-nav {
        padding: 0 10px;
    }

    .exp-page-nav a {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .exp-back-btn {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .exp-page-body {
        padding: 20px 16px 60px;
    }

    .exp-table {
        font-size: 0.75rem;
        table-layout: auto;
    }

    .exp-table th,
    .exp-table td {
        padding: 6px 8px;
    }

    .exp-table .note {
        display: none;
    }

    .exp-table th:nth-child(1),
    .exp-table th:nth-child(2),
    .exp-table th:nth-child(3),
    .exp-table th:nth-child(4) {
        width: auto;
    }
}

/* --- Small phone: <=480px --- */
@media screen and (max-width: 480px) {
    .footer-social {
        justify-content: center;
    }

    .footer-qr-box {
        justify-content: center;
    }
}

/* ============================================================================
 * 🏁 CODE BLOCK END: responsiveBase
 * ============================================================================ */
