/* ================
   DoMiProt 全局样式
   文件: domiprot.css
   适用页面: Home, Browse, Our Team, Protein Entry Source, FAQ 等
   ================ */

/* ——— 基础重置与全局设置 ——— */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #fafafa;
    color: #2c3e50;
    line-height: 1.6;
}

/* ——— 顶部固定导航栏 ——— */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #003366;
    color: white;
    padding: 0.9rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.top-bar-left,
.top-bar-right {
    flex: 0 0 auto;
    z-index: 1001;
}

/* 搜索框居中（不受左右内容影响） */
.top-bar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.top-bar-center * {
    pointer-events: auto;
}

.logo {
    font-size: 1.45rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #e0e7ff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffcc00;
    font-weight: 600;
}

/* ——— 顶部搜索框（始终显示） ——— */
.top-search-container {
    display: flex;
    width: 320px;
    opacity: 0;
    animation: fadeInSearch 0.4s forwards;
}

@keyframes fadeInSearch {
    to {
        opacity: 1;
    }
}

.top-search-input {
    flex: 1;
    padding: 0.55rem 0.9rem;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 0.9rem;
    outline: none;
    background: white;
    color: #2c3e50;
}

.top-search-button {
    background: #ff5722;
    color: white;
    border: none;
    padding: 0.55rem 1rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.top-search-button:hover {
    background: #e64a19;
}


/* ——— 通用标题与文本样式 ——— */
.page-title {
    font-size: 2.2rem;
    color: #003366;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.page-subtitle,
.intro-text {
    color: #4a5568;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.8rem;
    text-align: center;
}

.section-title {
    font-size: 1.5rem;
    color: #003366;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* ——— 内容区块（用于 PROTEIN SOURCE / FAQ 等） ——— */
.content-block,
.faq-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.content-block p,
.faq-answer {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.7;
}

.content-block ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.faq-question {
    font-size: 1.25rem;
    color: #003366;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ——— 分页控件 ——— */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.8rem;
    gap: 0.5rem;
}

.pagination button {
    padding: 0.45rem 0.85rem;
    border: 1px solid #cbd5e0;
    background: white;
    color: #2d3748;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    background: #f0f5ff;
    color: #003366;
}

.pagination button.active {
    background: #003366;
    color: white;
    border-color: #003366;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ——— 团队页面专用（可选保留在此以统一管理） ——— */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s, box-shadow 0.25s;
    text-align: center;
    padding: 1.5rem 1.2rem;
}

.team-member:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.member-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #e0e7ff;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #003366;
    font-weight: bold;
}

.member-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #003366;
    margin-bottom: 0.3rem;
}

.member-role {
    font-size: 0.95rem;
    color: #ff5722;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.member-bio {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

/* ——— 页脚 ——— */
.footer {
    background: #003366;
    color: #cbd5f0;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

a {
    color: #cbd5f0;
    text-decoration: none;
    transition: color 0.2s;
}

/* ——— 响应式断点 ——— */
@media (max-width: 900px) {
    .top-search-container {
        width: 260px;
    }

    .container {
        max-width: 960px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 0.8rem 1.2rem;
    }

    .top-search-container {
        width: 220px;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .intro-text,
    .page-subtitle {
        font-size: 1rem;
    }

    .browse-table th,
    .browse-table td {
        padding: 0.8rem 0.6rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 560px) {
    .top-bar-right {
        display: none;
    }

    .top-search-container {
        width: 180px;
    }

    .container {
        padding-top: 110px;
    }

    .browse-table,
    .browse-table th,
    .browse-table td {
        font-size: 0.85rem;
    }

    .browse-table th,
    .browse-table td {
        padding: 0.7rem 0.4rem;
    }
}