/*
Theme Name: 基因健康网
Theme URI: https://www.genehealth.cn/
Author: GeneHealth
Author URI: https://www.genehealth.cn/
Description: 基因健康网 - 专业的精准医疗资讯门户WordPress主题。涵盖肿瘤靶向用药、癌症早筛、无创产前、宏基因组检测、亲子鉴定等基因检测服务资讯。支持SEO优化、AI结构化数据、响应式设计。
Version: 1.4.8
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: genehealth
Tags: medical, health, responsive, custom-menu, custom-logo, featured-images, theme-options
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
*/

/* ========================================
   全局基础样式 (Global Base Styles)
   ======================================== */
body {
    font-family: "Microsoft YaHei", "Heiti SC", "PingFang SC", sans-serif;
    background-color: #f5f6f8;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   容器样式 (Container)
   ======================================== */
.container-custom {
    max-width: 1168px;
    margin: 0 auto;
    width: 100%;
}

/* ========================================
   全站Grid布局修复 (Global Grid Layout Fix)
   ======================================== */

/* 强制12列Grid布局 */
.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 1024px) {
    .lg\:grid-cols-12 {
        display: grid !important;
        grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    }
    
    .lg\:col-span-8 {
        grid-column: span 8 / span 8 !important;
    }
    
    .lg\:col-span-4 {
        grid-column: span 4 / span 4 !important;
    }
}

/* Gap间距 */
.gap-6 {
    gap: 1.5rem;
}

.gap-4 {
    gap: 1rem;
}

/* ========================================
   首页焦点图区域 (Homepage Hero Section)
   ======================================== */

/* Hero区块整体 */
.hero-section,
section.grid.md\:grid-cols-2 {
    min-height: 300px;
}

/* 焦点图容器 */
.hero-slider,
.hero-section .bg-gray-200,
section.grid.md\:grid-cols-2 > div:first-child {
    min-height: 280px;
}

@media (min-width: 768px) {
    .hero-slider,
    .hero-section .bg-gray-200,
    section.grid.md\:grid-cols-2 > div:first-child {
        min-height: 100%;
        height: auto;
    }
    
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* 焦点图图片填满 */
.hero-slider img,
.hero-section img,
section.grid.md\:grid-cols-2 > div:first-child img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
}

/* ========================================
   视频卡片区域 (Video Cards)
   ======================================== */

/* 4列视频网格 */
@media (min-width: 768px) {
    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

/* 视频缩略图高度 */
.h-28 {
    height: 7rem !important;
}

/* ========================================
   右侧边栏问诊区域 (Sidebar Consult)
   ======================================== */
.consult-box textarea,
textarea.h-20 {
    min-height: 80px;
    height: 80px;
}

/* ========================================
   内容区域Tab布局 (Content Tabs)
   ======================================== */
@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* 2列列表 */
.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ========================================
   热门科室导航栏 (Quick Links Bar)
   ======================================== */
.quick-links-bar {
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.quick-links-bar a {
    flex-shrink: 0;
}

/* ========================================
   Padding修复 (Padding Fix)
   ======================================== */
.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

/* ========================================
   响应式容器 (Responsive Container)
   ======================================== */
@media (max-width: 1024px) {
    .container-custom {
        padding-left: 16px;
        padding-right: 16px;
        max-width: 100%;
    }
}

@media (min-width: 1024px) {
    .container-custom {
        padding-left: 0;
        padding-right: 0;
    }
}

/* ========================================
   WordPress默认样式覆盖 (WP Override)
   ======================================== */
.entry-content,
.page-content,
.post-content {
    max-width: none;
}

/* 确保图片不会撑破容器 */
img {
    max-width: 100%;
    height: auto;
}

/* 清除WordPress可能添加的margin */
main,
aside {
    margin: 0;
}

/* ========================================
   Flex布局修复 (Flex Layout Fix)
   ======================================== */
.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

/* ========================================
   背景和边框颜色 (Background & Border)
   ======================================== */
.bg-white {
    background-color: #ffffff;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.bg-gray-200 {
    background-color: #e5e7eb;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-blue-600 {
    background-color: #0284c7;
}

.bg-blue-700 {
    background-color: #0369a1;
}

.bg-blue-800 {
    background-color: #1e40af;
}

.bg-indigo-600 {
    background-color: #4f46e5;
}

.bg-red-500 {
    background-color: #ef4444;
}

.bg-orange-500 {
    background-color: #f97316;
}

.bg-green-500 {
    background-color: #22c55e;
}

.border {
    border-width: 1px;
    border-style: solid;
    border-color: #e5e7eb;
}

.border-b {
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: #e5e7eb;
}

.border-t-4 {
    border-top-width: 4px;
}

.border-t-blue-600 {
    border-top-color: #0284c7;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* ========================================
   文本样式 (Text Styles)
   ======================================== */
.text-white {
    color: #ffffff;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-800 {
    color: #1f2937;
}

.text-blue-600 {
    color: #0284c7;
}

.text-red-600 {
    color: #dc2626;
}

.text-green-600 {
    color: #16a34a;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

/* ========================================
   尺寸和间距 (Size & Spacing)
   ======================================== */
.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.h-64 {
    height: 16rem;
}

.h-28 {
    height: 7rem;
}

.h-24 {
    height: 6rem;
}

.h-20 {
    height: 5rem;
}

.h-16 {
    height: 4rem;
}

.h-12 {
    height: 3rem;
}

.h-10 {
    height: 2.5rem;
}

.h-5 {
    height: 1.25rem;
}

.w-16 {
    width: 4rem;
}

.w-12 {
    width: 3rem;
}

.w-5 {
    width: 1.25rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.mr-1 {
    margin-right: 0.25rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.mx-2 {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-2 {
    padding: 0.5rem;
}

.pl-3 {
    padding-left: 0.75rem;
}

.pl-2 {
    padding-left: 0.5rem;
}

/* ========================================
   定位和显示 (Position & Display)
   ======================================== */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.bottom-0 {
    bottom: 0;
}

.left-0 {
    left: 0;
}

.right-0 {
    right: 0;
}

.bottom-1 {
    bottom: 0.25rem;
}

.right-1 {
    right: 0.25rem;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.hidden {
    display: none;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-x-auto {
    overflow-x: auto;
}

.object-cover {
    object-fit: cover;
}

.whitespace-nowrap {
    white-space: nowrap;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   阴影和透明度 (Shadow & Opacity)
   ======================================== */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.bg-opacity-50 {
    --tw-bg-opacity: 0.5;
}

.bg-black.bg-opacity-50 {
    background-color: rgba(0, 0, 0, 0.5);
}

/* ========================================
   Grid显示 (Grid Display)  
   ======================================== */
.grid {
    display: grid;
}

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

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

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

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    
    .md\:flex-row {
        flex-direction: row;
    }
    
    .md\:mb-0 {
        margin-bottom: 0;
    }
    
    .md\:w-1\/2 {
        width: 50%;
    }
    
    .md\:block {
        display: block;
    }
    
    .md\:h-full {
        height: 100%;
    }
    
    .md\:h-auto {
        height: auto;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-12 {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
    
    .lg\:col-span-8 {
        grid-column: span 8 / span 8;
    }
    
    .lg\:col-span-4 {
        grid-column: span 4 / span 4;
    }
}

/* ========================================
   悬停效果 (Hover Effects)
   ======================================== */
.hover\:text-blue-600:hover {
    color: #0284c7;
}

.hover\:bg-blue-700:hover {
    background-color: #0369a1;
}

.hover\:bg-gray-50:hover {
    background-color: #f9fafb;
}

.hover\:border-blue-500:hover {
    border-color: #3b82f6;
}

.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* ========================================
   组合悬停 (Group Hover)
   ======================================== */
.group:hover .group-hover\:text-blue-600 {
    color: #0284c7;
}

.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

.group:hover .group-hover\:text-white {
    color: #ffffff;
}

.group:hover .group-hover\:bg-blue-600 {
    background-color: #0284c7;
}

/* ========================================
   通用工具类 (Utility Classes)
   ======================================== */

/* 文本截断 - 单行 */
.text-dense a,
.truncate {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
}

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

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 悬停下划线 */
.hover-underline:hover {
    text-decoration: underline;
    color: #0284c7;
}

/* ========================================
   区块标题样式 (Section Headers)
   ======================================== */
.section-header {
    border-bottom: 2px solid #0284c7;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.section-title {
    background: #0284c7;
    color: white;
    padding: 5px 15px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px 4px 0 0;
}

/* ========================================
   导航样式 (Navigation)
   ======================================== */
.nav-item:hover {
    background-color: #0369a1;
}

/* 主导航菜单 */
.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    display: block;
    padding: 12px 24px;
    color: white;
    font-weight: 500;
    transition: background-color 0.2s;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current-menu-parent > a,
.main-nav .current_page_item > a {
    background-color: #1e40af;
}

/* 子菜单 */
.main-nav .sub-menu {
    display: none;
    position: absolute;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 1000;
}

.main-nav li:hover > .sub-menu {
    display: block;
}

.main-nav .sub-menu a {
    color: #333;
    padding: 10px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.main-nav .sub-menu a:hover {
    background-color: #f0f9ff;
    color: #0284c7;
}

/* ========================================
   Tab交互样式 (Tab Interaction)
   ======================================== */
.tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #0284c7;
}

.tab-btn.active {
    border-bottom: 2px solid #0284c7;
    color: #0284c7;
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========================================
   列表样式 (List Styles)
   ======================================== */

/* 圆点列表 */
.dot-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dot-list li {
    position: relative;
    padding-left: 12px;
    margin-bottom: 6px;
}

.dot-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 4px;
    background: #ccc;
    border-radius: 50%;
}

.dot-list li:hover::before {
    background: #0284c7;
}

/* 排行榜样式 */
.rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rank-list li {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: flex-start;
}

.rank-num {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 4px;
    flex-shrink: 0;
}

.rank-num.top1,
.rank-num.top2 {
    background: #ef4444;
    color: white;
}

.rank-num.top3 {
    background: #f97316;
    color: white;
}

.rank-num.normal {
    background: #e5e7eb;
    color: #6b7280;
}

/* ========================================
   播放按钮遮罩 (Video Overlay)
   ======================================== */
.play-overlay {
    background: rgba(0,0,0,0.4);
    transition: all 0.3s;
}

.group:hover .play-overlay {
    background: rgba(0,0,0,0.2);
}

/* ========================================
   文章内容样式 (Article Content)
   ======================================== */
.article-content h2 {
    font-size: 1.25rem;
    font-weight: bold;
    border-left: 4px solid #0284c7;
    padding-left: 10px;
    margin: 25px 0 15px 0;
    color: #1e293b;
}

.article-content h3 {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 20px 0 10px 0;
    color: #334155;
}

.article-content p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
    color: #374151;
    font-size: 16px;
    text-align: justify;
}

.article-content ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 1.2rem;
}

.article-content ul li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 15px auto;
    display: block;
}

.article-content a {
    color: #0284c7;
    text-decoration: underline;
}

.article-content a:hover {
    color: #0369a1;
}

/* 摘要框 */
.summary-box {
    background-color: #f8fafc;
    border-left: 4px solid #94a3b8;
    padding: 15px;
    margin-bottom: 25px;
    color: #475569;
    font-size: 14px;
}

/* ========================================
   频道页样式 (Channel Page)
   ======================================== */

/* 导航卡片 */
.nav-card {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.nav-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #0284c7;
}

/* 专题渐变 */
.hero-gradient {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

/* 装饰性背景 */
.bg-pattern {
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 20px 20px;
}

/* ========================================
   服务页流程步骤 (Service Steps)
   ======================================== */
.step-item {
    position: relative;
}

.step-item::after {
    content: "→";
    position: absolute;
    right: -20px;
    top: 30%;
    color: #cbd5e1;
    font-size: 24px;
    font-weight: bold;
}

.step-item:last-child::after {
    content: none;
}

@media (max-width: 768px) {
    .step-item::after {
        content: "↓";
        right: 50%;
        top: auto;
        bottom: -25px;
        transform: translateX(50%);
    }
}

/* ========================================
   卡片悬停效果 (Card Hover)
   ======================================== */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ========================================
   面包屑导航 (Breadcrumbs)
   ======================================== */
.breadcrumbs {
    font-size: 12px;
    color: #6b7280;
}

.breadcrumbs a {
    color: #6b7280;
}

.breadcrumbs a:hover {
    color: #0284c7;
}

.breadcrumbs .separator {
    margin: 0 4px;
}

.breadcrumbs .current {
    color: #1f2937;
}

/* ========================================
   标签样式 (Tags)
   ======================================== */
.tag-item {
    display: inline-block;
    padding: 4px 12px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.tag-item:hover {
    background: #0284c7;
    color: white;
}

/* ========================================
   分页样式 (Pagination)
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 14px;
    color: #374151;
    background: white;
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: #0284c7;
    color: #0284c7;
}

.pagination .current {
    background: #0284c7;
    border-color: #0284c7;
    color: white;
}

/* ========================================
   侧边栏小工具 (Sidebar Widgets)
   ======================================== */
.widget {
    background: white;
    padding: 16px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.widget-title {
    font-size: 16px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 4px solid #0284c7;
}

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

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: #4b5563;
    font-size: 14px;
}

.widget a:hover {
    color: #0284c7;
}

/* ========================================
   表单样式 (Forms)
   ======================================== */
.search-form {
    display: flex;
    border: 2px solid #0284c7;
    border-radius: 6px;
    overflow: hidden;
}

.search-form select {
    background: #f9fafb;
    padding: 8px 12px;
    border: none;
    border-right: 1px solid #e5e7eb;
    font-size: 14px;
    color: #4b5563;
    outline: none;
}

.search-form input[type="text"],
.search-form input[type="search"] {
    flex: 1;
    padding: 10px 16px;
    border: none;
    font-size: 14px;
    outline: none;
}

.search-form button {
    background: #0284c7;
    color: white;
    padding: 10px 24px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.search-form button:hover {
    background: #0369a1;
}

/* ========================================
   按钮样式 (Buttons)
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: #0284c7;
    color: white;
}

.btn-primary:hover {
    background: #0369a1;
}

.btn-outline {
    background: transparent;
    border: 1px solid #0284c7;
    color: #0284c7;
}

.btn-outline:hover {
    background: #eff6ff;
}

/* ========================================
   响应式设计 (Responsive)
   ======================================== */
@media (max-width: 1024px) {
    .container-custom {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav a {
        padding: 12px 16px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .main-nav .sub-menu {
        position: static;
        box-shadow: none;
        background: rgba(0,0,0,0.1);
    }
    
    .main-nav .sub-menu a {
        color: white;
        padding-left: 32px;
    }
}

/* ========================================
   WordPress特定样式覆盖 (WP Overrides)
   ======================================== */

/* 隐藏评论相关 */
.comments-area,
.comment-respond,
#comments,
.nocomments {
    display: none !important;
}

/* 文章缩略图 */
.post-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Gutenberg编辑器兼容 */
.wp-block-image img {
    max-width: 100%;
    height: auto;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 10px;
}

.alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 10px;
}

/* 清除浮动 */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ========================================
   后台设置页面样式 (Admin Styles)
   ======================================== */
.genehealth-admin-wrap {
    max-width: 800px;
}

.genehealth-admin-wrap .form-table th {
    width: 200px;
}

.genehealth-admin-wrap .description {
    color: #666;
    font-style: italic;
}

/* ========================================
   屏幕阅读器文本 (Screen Reader)
   ======================================== */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ========================================
   Line Clamp (多行文本截断)
   ======================================== */
.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;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   分页样式 (Pagination Styles)
   ======================================== */
.pagination,
.page-numbers,
nav.navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination li,
.page-numbers li {
    list-style: none;
}

.pagination a,
.pagination span,
.page-numbers a,
.page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.15s ease;
}

.pagination a:hover,
.page-numbers a:hover {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #3b82f6;
}

.pagination .current,
.page-numbers .current,
.pagination span.current,
.page-numbers span.current {
    background-color: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}

/* ========================================
   表单元素 (Form Elements)
   ======================================== */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #1f2937;
    background-color: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

/* ========================================
   按钮样式 (Button Styles)
   ======================================== */
button,
.btn,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.btn-primary,
button[type="submit"],
input[type="submit"] {
    background-color: #0284c7;
    color: #ffffff;
}

.btn-primary:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background-color: #0369a1;
}

/* ========================================
   卡片通用样式 (Card Common Styles)
   ======================================== */
.card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.15s ease;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ========================================
   Divide样式 (Divide Styles)
   ======================================== */
.divide-y > * + * {
    border-top-width: 1px;
    border-top-style: solid;
    border-top-color: #e5e7eb;
}

.divide-x > * + * {
    border-left-width: 1px;
    border-left-style: solid;
    border-left-color: #e5e7eb;
}

/* ========================================
   最小宽度/高度 (Min Width/Height)
   ======================================== */
.min-w-0 {
    min-width: 0;
}

.min-w-\[200px\] {
    min-width: 200px;
}

/* ========================================
   Flex相关补充 (Flex Additions)
   ======================================== */
.flex-1 {
    flex: 1 1 0%;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.flex-grow {
    flex-grow: 1;
}

/* ========================================
   Z-Index (层级)
   ======================================== */
.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-50 {
    z-index: 50;
}

/* ========================================
   Last子元素 (Last Child)
   ======================================== */
.last\:border-0:last-child {
    border-width: 0;
}

.last\:border-b-0:last-child {
    border-bottom-width: 0;
}

/* ========================================
   边框样式补充 (Border Additions)
   ======================================== */
.border-l-4 {
    border-left-width: 4px;
}

.border-blue-600 {
    border-color: #0284c7;
}

.border-green-500 {
    border-color: #22c55e;
}

.border-orange-500 {
    border-color: #f97316;
}

.border-red-500 {
    border-color: #ef4444;
}

.border-purple-500 {
    border-color: #a855f7;
}

.border-purple-600 {
    border-color: #9333ea;
}

.border-dashed {
    border-style: dashed;
}

/* ========================================
   文本行删除线 (Line Through)
   ======================================== */
.line-through {
    text-decoration: line-through;
}

/* ========================================
   渐变背景补充 (Gradient Backgrounds)
   ======================================== */
.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-blue-600 {
    --tw-gradient-from: #0284c7;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(2, 132, 199, 0));
}

.to-indigo-600 {
    --tw-gradient-to: #4f46e5;
}

.from-green-600 {
    --tw-gradient-from: #16a34a;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(22, 163, 74, 0));
}

.to-teal-600 {
    --tw-gradient-to: #0d9488;
}

.from-purple-600 {
    --tw-gradient-from: #9333ea;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(147, 51, 234, 0));
}

.to-pink-600 {
    --tw-gradient-to: #db2777;
}

.from-red-600 {
    --tw-gradient-from: #dc2626;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(220, 38, 38, 0));
}

.to-orange-500 {
    --tw-gradient-to: #f97316;
}

.from-gray-700 {
    --tw-gradient-from: #374151;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(55, 65, 81, 0));
}

.to-gray-900 {
    --tw-gradient-to: #111827;
}

/* ========================================
   额外颜色 (Additional Colors)
   ======================================== */
.text-purple-600 {
    color: #9333ea;
}

.text-pink-500 {
    color: #ec4899;
}

.text-teal-600 {
    color: #0d9488;
}

.text-indigo-600 {
    color: #4f46e5;
}

.text-yellow-500 {
    color: #eab308;
}

.text-yellow-800 {
    color: #854d0e;
}

.bg-purple-100 {
    background-color: #f3e8ff;
}

.bg-pink-100 {
    background-color: #fce7f3;
}

.bg-yellow-50 {
    background-color: #fefce8;
}

.bg-yellow-100 {
    background-color: #fef9c3;
}

.border-yellow-200 {
    border-color: #fef08a;
}

.text-yellow-700 {
    color: #a16207;
}

/* ========================================
   头像样式 (Avatar Styles)
   ======================================== */
.avatar img,
img.avatar {
    border-radius: 9999px;
}

/* ========================================
   面包屑导航紧贴样式 (Breadcrumb Flush Style)
   ======================================== */
.breadcrumb-nav,
nav[aria-label="面包屑导航"] {
    margin: 0 !important;
    padding: 0 !important;
}

.breadcrumb-nav ol,
nav[aria-label="面包屑导航"] ol {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    margin: 0 !important;
}

/* 面包屑与上方热门导航紧贴 */
.quick-links-wrapper + .breadcrumb-nav,
.quick-links-wrapper + nav[aria-label="面包屑导航"] {
    border-top: none;
}

/* 面包屑与下方内容紧贴 */
.breadcrumb-nav + *,
nav[aria-label="面包屑导航"] + * {
    margin-top: 0 !important;
}

/* ========================================
   全站模块间距增强 (Global Section Spacing)
   ======================================== */

/* 热门导航与下方内容的间距 - 列表页无间距，首页有间距 */
.quick-links-wrapper {
    margin-bottom: 0;
}
.quick-links-wrapper.mb-4 {
    margin-bottom: 1rem;
}

/* Hero Section顶部紧贴热门导航 */
.bg-white.border-b.border-gray-200 {
    margin-top: 0;
}

/* 主内容容器底部间距 */
.container-custom.mb-8 {
    margin-bottom: 3rem !important; /* 48px - 与footer保持距离 */
}

/* 主内容区模块间距 - 增大到32px */
main.space-y-6 > * + *,
.main-content.space-y-6 > * + *,
.lg\:col-span-8.space-y-6 > * + * {
    margin-top: 2rem !important; /* 32px */
}

/* 侧边栏模块间距 - 增大到24px */
aside.space-y-4 > * + *,
.sidebar.space-y-4 > * + *,
aside.space-y-6 > * + *,
.lg\:col-span-4.space-y-4 > * + *,
.lg\:col-span-4.space-y-6 > * + * {
    margin-top: 1.5rem !important; /* 24px */
}

/* Section区块通用底部间距 */
section,
.section-block {
    margin-bottom: 0.5rem; /* 额外的呼吸空间 */
}

/* 白色卡片模块间距 */
.bg-white.p-4.rounded.border,
.bg-white.p-4.rounded-lg.border,
.bg-white.p-5.rounded-xl,
.bg-white.rounded-xl.border {
    margin-bottom: 0.5rem;
}

/* 彩色渐变区块底部间距 */
.bg-gradient-to-r,
.bg-gradient-to-br {
    margin-bottom: 1.5rem;
}

/* 子分类导航卡片网格间距 */
.nav-card {
    padding: 1rem;
    min-height: 80px;
}

/* 右侧Quick Nav Grid间距增强 */
.grid.grid-cols-2.gap-3 {
    gap: 0.875rem !important; /* 14px */
}

/* 区块标题与内容的间距 */
.section-header {
    margin-bottom: 1rem; /* 16px */
}

/* 卡片网格间距增强 */
.grid.gap-4 {
    gap: 1.25rem !important; /* 20px */
}

.grid.gap-6 {
    gap: 1.75rem !important; /* 28px */
}

.grid.gap-8 {
    gap: 2rem !important; /* 32px */
}

/* 列表项间距增强 */
.space-y-4 > * + * {
    margin-top: 1.25rem; /* 20px */
}

.space-y-3 > * + * {
    margin-top: 1rem; /* 16px */
}

/* Tab内容区域间距 */
.tab-content {
    padding-top: 1rem;
}

/* 分类/标签列表行间距 */
.divide-y > * + * {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* 文章列表项间距 */
.article-list > * + *,
.post-list > * + *,
.qa-list > * + * {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
}

/* 首页焦点区与下方内容的间距 */
section.grid.md\:grid-cols-2 {
    margin-bottom: 0.5rem;
}

/* 页面标题与内容间距 */
.page-header,
.entry-header,
.archive-header {
    margin-bottom: 1.5rem;
}

/* 内容区域段落间距 */
.entry-content p,
.post-content p,
.page-content p {
    margin-bottom: 1.25rem;
}

/* 详情页各区块间距 */
.single-content > section + section,
.single-content > div + div,
.content-sections > * + * {
    margin-top: 2rem;
}

/* 侧边栏各widget间距 */
.widget + .widget,
aside > div + div,
aside .bg-white + .bg-white {
    margin-top: 1.5rem !important;
}

/* 表单区块内部间距 */
.form-group + .form-group {
    margin-top: 1rem;
}

/* 按钮组间距 */
.btn-group > * + * {
    margin-left: 0.75rem;
}

/* 底部统一间距 */
.mb-3 {
    margin-bottom: 1rem !important; /* 原来是0.75rem */
}

.mb-4 {
    margin-bottom: 1.25rem !important; /* 原来是1rem */
}

/* 响应式调整 - 移动端间距适当减小 */
@media (max-width: 768px) {
    main.space-y-6 > * + *,
    .main-content.space-y-6 > * + *,
    .lg\:col-span-8.space-y-6 > * + * {
        margin-top: 1.5rem !important; /* 24px */
    }
    
    aside.space-y-4 > * + *,
    .sidebar.space-y-4 > * + *,
    .lg\:col-span-4.space-y-4 > * + * {
        margin-top: 1.25rem !important; /* 20px */
    }
}

/* ========================================
   侧边栏列表标题单行截断
   ======================================== */
aside ul li a,
aside .space-y-2 a,
aside .space-y-3 a,
.lg\:col-span-4 ul li a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 保留多行截断的特殊情况 */
aside .line-clamp-2 {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
