/* ========== 1. 核心重置与背景恢复 ========== */
*, *:before, *:after { 
    box-sizing: border-box !important; 
}

body {
    margin: 0; padding: 0;
    background-color: #d1e4dd; /* 恢复标志性的中医绿背景 */
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ========== 2. 头部 Logo 修复 (彻底解决重叠) ========== */
.zd-header {
    background: #fff;
    padding: 20px 0;
    margin: 0 auto 20px auto;
    width: 1100px !important;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
}

/* 强制隐藏 PC 端的移动导航 (返回/主菜单) */
@media (min-width: 1081px) {
    .zd-nav { display: none !important; }
}

.zd-logo {
    text-align: center;
    margin-bottom: 15px;
    height: 120px;
}

.zd-logo-site {
    display: block;
    width: 210px;
    height: 120px;
    margin: 0 auto;
    background: transparent url(../image/logo-big-news.png) no-repeat center center;
    background-size: contain;
    font-size: 0; /* 彻底隐藏文字防止重叠 */
    color: transparent;
    text-indent: -9999px;
}

/* ========== 3. 搜索框精修 (对齐最新对比图 1) ========== */
.zd-search-box {
    max-width: 600px;
    margin: 10px auto 10px;
    padding: 0 15px;
}

.zd-search-text {
    display: flex; 
    height: 44px; /* 稍微增加高度更显大气 */
    border-radius: 22px; /* 高度的一半，形成完美的圆弧胶囊状 */
    overflow: hidden;
    background: #fff;
    border: 2px solid #fcc800; /* 醒目的黄色边框 */
    transition: all 0.3s ease;
}

.zd-search-text:hover {
    box-shadow: 0 2px 8px rgba(252, 200, 0, 0.3);
}

.zd-text-input {
    flex: 1; 
    border: none; 
    outline: none; 
    padding: 0 20px; 
    font-size: 15px;
    background: transparent;
}

.zd-s-btnw {
    width: 90px;
    background: #fcc800;
}

.zd-s-btn {
    width: 100%;
    height: 100%;
    background: #fcc800;
    border: none;
    font-weight: 700;
    cursor: pointer;
    color: #333;
    font-size: 16px;
    letter-spacing: 2px;
}

.zd-s-btn:hover {
    background: #fdb900;
}

/* ========== 4. 主体布局 (防崩盘网格布局) ========== */
.zd-main {
    display: grid !important; /* 放弃脆弱的 flex，改用无敌的 Grid 网格 */
    grid-template-columns: 755px 336px !important;
    grid-template-areas: "content sidebar" !important; /* 强制规划：左边内容，右边边栏 */
    justify-content: space-between !important;
    width: 1100px !important;
    margin: 0 auto 30px !important;
    align-items: start;
}

.zd-content { 
    grid-area: content; /* 将其锚定在左边区域 */
    min-width: 0; 
}
.zd-sidebar { 
    grid-area: sidebar; /* 将其锚定在右边区域 */
    min-width: 0; 
}

/* 标题栏对齐修正 */
.zd-path {
    display: flex !important;
    align-items: center;
    background: #f8fafb;
    padding: 12px 20px;
    border-bottom: 1px solid #edf2f7;
}
.zd-path i:after { content: ">"; margin: 0 10px; color: #cbd5e1; font-weight: bold; }
.zd-path h1 { font-size: 16px; margin: 0; color: #333; font-weight: 700; display: inline-block !important; }

/* ========== 5. 药方卡片：悬浮与颜色 ========== */
.zd-mcon { padding: 20px; }

.zd-mcon .item {
    display: flex; border: 1px solid #e7eaec;
    margin-bottom: 15px; border-radius: 8px; overflow: hidden;
    background: #fff; transition: all 0.3s ease;
}

.zd-mcon .item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #c5653e;
}

.zd-mcon .item-name {
    width: 100px; min-width: 100px; padding: 15px 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border-right: 1px solid #e7eaec;
}

.zd-mcon .item-content { flex: 1; padding: 15px; line-height: 1.8; color: #444; }

/* 恢复药方分类颜色 */
.item.prescription .item-name { background: #f0f7ff; color: #1565c0; }
.item.functional_indications .item-name { background: #fff7ed; color: #c2410c; }
.item.usage .item-name { background: #f0fdf4; color: #15803d; }

/* ========== 6. 侧边栏与页脚 ========== */
.zd-sdc { padding: 15px; }
.zd-sdc h3 { color: #c5653e; font-size: 18px; margin-bottom: 15px; font-weight: bold; }

.zd-btn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0; list-style: none; }
.zd-btn li a {
    display: block; padding: 10px; background: #f1f5f9;
    text-align: center; border-radius: 6px; font-size: 14px; color: #333;
}
.zd-btn li a:hover { background: #c5653e; color: #fff; }

.zd-footer {
    width: 1100px !important; margin: 40px auto 20px !important;
    text-align: center; border-top: 1px solid #e2e8f0; padding: 20px 0; color: #64748b;
}

/* ========== 7. 移动端兼容 ========== */
@media (max-width: 1080px) {
    .zd-header, .zd-main, .zd-footer { width: 100% !important; padding: 10px !important; }
    
    .zd-main { 
        display: flex !important; /* 移动端恢复上下排布 */
        flex-direction: column !important; 
    }
    .zd-content { order: 1 !important; } /* 确保文章在最上面 */
    .zd-sidebar { display: none !important; } /* 移动端隐藏右侧栏 */
    
    .zd-nav { display: block !important; }
    .zd-logo { display: none !important; }
    .zd-mcon .item { flex-direction: column; }
    .zd-mcon .item-name { width: 100%; border-right: none; border-bottom: 1px solid #f0f0f0; }
    
    
    /* ========== 8. 文章页单栏居中排版 ========== */
/* 覆盖原有的 grid 布局，强制单栏显示 */
.article-single-layout {
    display: block !important; 
    width: 1100px !important;
    margin: 0 auto 30px !important;
}

/* 居中内容区，并将宽度设为 900px（单栏阅读最舒适的宽度，太宽眼睛容易累） */
.article-single-layout .zd-content {
    width: 900px !important;
    margin: 0 auto !important; 
    float: none !important;
}

/* ========== 9. 文章正文内【药名/出处】标题美化 ========== */
/* 针对你箭头所指的 《某某方》：某某药 这种标题（通常CMS解析为 h2 或 h3） */
.article-body h2, 
.article-body h3 {
    font-size: 20px;
    color: #2c3e50; /* 深灰蓝色，显得专业沉稳 */
    background: #f4f8fb; /* 非常淡的蓝色背景，区别于正文 */
    padding: 12px 18px;
    margin: 35px 0 20px 0;
    border-left: 6px solid #c5653e; /* 中医特色暖橙色左边框 */
    border-radius: 0 6px 6px 0; /* 右侧圆角 */
    font-weight: bold;
    display: block;
    border-bottom: 1px solid #e1e8ed;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* 移动端兼容调整 */
@media (max-width: 1080px) {
    .article-single-layout .zd-content {
        width: 100% !important; /* 手机端撑满屏幕 */
    }
    .article-body h2, .article-body h3 {
        font-size: 18px;
        margin: 25px 0 15px 0;
    }
}
}

/* ========== 文章页：药方档案盒与药名卡片化 ========== */

/* 1. 制造大框框感：给文章主体加一个浅灰蓝色的底色，让里面的白色卡片凸显出来 */
.article-single-layout .zd-content {
    background: #f0f4f8 !important; 
    padding: 30px !important;
    border-radius: 10px !important;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.02) !important; /* 内阴影增加深度 */
}

/* 2. 药名黑大字变身“卡片头部”：抓取文章里的药名标题 */
.article-single-layout .zd-mcon h2, 
.article-single-layout .zd-mcon h3, 
.article-single-layout .zd-mcon p strong, 
.article-single-layout .zd-mcon b {
    display: block !important;
    background: #ffffff !important; /* 纯白背景 */
    color: #1a56a8 !important;    /* 经典的百科蓝 */
    font-size: 20px !important;
    padding: 16px 20px !important;
    margin: 40px 0 0 0 !important; /* 顶部拉开距离，代表一个新的大框框开始 */
    border: 1px solid #e2e8f0 !important;
    border-bottom: none !important; /* 去掉底边框，和下面的处方连在一起 */
    border-top: 4px solid #1a56a8 !important; /* 顶部加粗蓝条，像档案袋的封口 */
    border-radius: 8px 8px 0 0 !important; /* 只有上面是圆角 */
    font-weight: bold !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
}

/* 3. 让下方的处方、炮制内容变成“卡片身体”，和上面的标题拼成一个大框 */
.article-single-layout .zd-mcon .item {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-top: 1px dashed #e2e8f0 !important; /* 和上面药名连接处变成虚线 */
    margin-bottom: 0 !important; /* 去掉卡片之间的缝隙，紧紧贴在一起 */
    border-radius: 0 !important; /* 中间部分不要圆角 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
}

/* 给最后一个 item 加上底部圆角，完美收尾大框框 */
.article-single-layout .zd-mcon .item:last-child {
    border-radius: 0 0 8px 8px !important;
    margin-bottom: 40px !important;
}