/*
Theme Name: 基因周刊
Theme URI: https://github.com/wanhedna
Author: 万核基因科技
Author URI: https://wanhedna.com
Description: 基因周刊WordPress主题 - 专业基因检测与遗传健康资讯平台，专注肿瘤基因检测、遗传咨询、精准医疗领域
Version: 1.0.12
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: genenews
Tags: medical, health, genetics, news, responsive, custom-logo, custom-menu, featured-images

全民基因健康网 WordPress Theme
Copyright 2021-2025 万核基因科技（东莞）有限公司
*/

/* ============================================
   基础重置与自定义样式
   ============================================ */

/* 确保平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 文字选中样式 - 匹配原模板 */
::selection {
    background-color: #e0e7ff; /* indigo-100 */
    color: #312e81; /* indigo-900 */
}

/* 自定义滚动条隐藏 */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 文本截断 */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 动画脉冲效果 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* WordPress 特定覆盖 */
.wp-block-image img {
    max-width: 100%;
    height: auto;
}

/* 管理员工具栏适配 */
body.admin-bar nav.sticky {
    top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar nav.sticky {
        top: 46px;
    }
}

/* 手机端底部工具栏占位 */
@media (max-width: 768px) {
    body:not(.home) {
        padding-bottom: 60px;
    }
}

/* WordPress 分页样式 */
.navigation.pagination {
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: all 0.15s;
    text-decoration: none;
}

.nav-links .page-numbers:hover {
    color: #4f46e5;
    border-color: #c7d2fe;
    background-color: #eef2ff;
}

.nav-links .page-numbers.current {
    color: #ffffff;
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.nav-links .page-numbers.dots {
    background: transparent;
    border: none;
}

.nav-links .prev,
.nav-links .next {
    font-weight: 600;
}

/* Prose 样式优化 */
.prose {
    max-width: none;
}

.prose p {
    margin-bottom: 1.5rem;
}

.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #334155;
}

.prose ul,
.prose ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.prose li {
    margin: 0.5rem 0;
}

.prose blockquote {
    border-left: 4px solid #4f46e5;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #64748b;
    font-style: italic;
}

.prose img {
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.prose a {
    color: #4f46e5;
    text-decoration: underline;
}

.prose a:hover {
    color: #4338ca;
}

.prose code {
    background-color: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.prose pre {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.prose pre code {
    background: transparent;
    padding: 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.prose th,
.prose td {
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
    text-align: left;
}

.prose th {
    background-color: #f8fafc;
    font-weight: 600;
}

/* ============================================
   Grid 布局修复
   ============================================ */

/* 确保grid布局正常 */
.grid {
    display: grid;
}

.grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.gap-8 {
    gap: 2rem;
}

.col-span-12 {
    grid-column: span 12 / span 12;
}

@media (min-width: 1024px) {
    .lg\:col-span-8 {
        grid-column: span 8 / span 8;
    }
    
    .lg\:col-span-4 {
        grid-column: span 4 / span 4;
    }
    
    .lg\:col-span-7 {
        grid-column: span 7 / span 7;
    }
    
    .lg\:col-span-3 {
        grid-column: span 3 / span 3;
    }
    
    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }
    
    .lg\:block {
        display: block !important;
    }
}

/* 侧边栏内容确保正常显示 */
aside > div {
    width: 100%;
    overflow: hidden;
}

/* 知识库内链样式 */
.wiki-internal-link {
    color: #4f46e5;
    text-decoration: none;
    border-bottom: 1px dashed #a5b4fc;
}

.wiki-internal-link:hover {
    color: #4338ca;
    border-bottom-color: #4338ca;
}
