/* ===========================================
   移动端基础样式 mobile.css
   适配范围：屏幕宽度 ≤ 768px
   =========================================== */

* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: #333;
    background-color: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    -webkit-user-drag: none;
}

input, textarea, button, select {
    font-family: inherit;
    outline: none;
    -webkit-appearance: none;
    border-radius: 0;
}

/* ================= 通用容器 ================= */
.m-container {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    background-color: #ffffff;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.m-section {
    padding: 12px;
    background-color: #ffffff;
    margin-bottom: 10px;
}

.m-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.m-section-title .m-en {
    font-size: 12px;
    color: #999;
    font-weight: 400;
    margin-left: 6px;
}

.m-section-title .m-more {
    font-size: 13px;
    color: #999;
    font-weight: 400;
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 14px;
}

.m-section-title .m-more::after {
    content: " ›";
}

/* ================= 顶部栏 ================= */
.m-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    height: 48px;
}

.m-header .m-logo {
    height: 30px;
    max-width: 60%;
    object-fit: contain;
}

.m-header .m-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #222;
    text-align: center;
    margin: 0 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.m-header .m-menu-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.m-header .m-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #333;
    position: relative;
}

.m-header .m-menu-btn span::before,
.m-header .m-menu-btn span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background-color: #333;
}

.m-header .m-menu-btn span::before { top: -7px; }
.m-header .m-menu-btn span::after { top: 7px; }

/* ================= 抽屉菜单 ================= */
.m-drawer-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.m-drawer-mask.active {
    opacity: 1;
    visibility: visible;
}

.m-drawer {
    position: fixed;
    top: 0;
    right: -260px;
    width: 260px;
    height: 100%;
    background-color: #ffffff;
    z-index: 1001;
    transition: right 0.3s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.m-drawer.active {
    right: 0;
}

.m-drawer .m-drawer-header {
    padding: 16px 14px;
    background: linear-gradient(135deg, #0c8ce9 0%, #4cb6ff 100%);
    color: #fff;
}

.m-drawer .m-drawer-header .m-drawer-logo {
    height: 32px;
    margin-bottom: 6px;
}

.m-drawer .m-drawer-header .m-drawer-site {
    font-size: 12px;
    opacity: 0.9;
}

.m-drawer-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.m-drawer-list li a {
    display: block;
    padding: 14px 16px;
    font-size: 15px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.m-drawer-list li a:active {
    background-color: #f5f5f5;
}

.m-drawer-sublist {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    background-color: #fafafa;
}

.m-drawer-sublist li a {
    padding: 10px 16px 10px 28px;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

.m-drawer-list li a.m-toggle::after {
    content: "›";
    float: right;
    transition: transform 0.3s;
}

.m-drawer-list li.active a.m-toggle::after {
    transform: rotate(90deg);
}

/* ================= 轮播图 ================= */
.m-banner {
    width: 100%;
    position: relative;
    background-color: #eee;
    overflow: hidden;
}

.m-banner .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.m-banner .swiper-pagination {
    bottom: 8px !important;
}

.m-banner .swiper-pagination .swiper-pagination-bullet {
    background-color: #fff;
    opacity: 0.6;
    width: 6px;
    height: 6px;
}

.m-banner .swiper-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    width: 18px;
    border-radius: 3px;
}

/* ================= 9宫格功能菜单 ================= */
.m-grid-menu {
    display: block;
    background-color: transparent;
}

.m-grid-menu .m-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    color: #333;
    text-align: center;
}

.m-grid-menu .m-grid-item img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    margin-bottom: 4px;
}

.m-grid-menu .m-grid-item span {
    font-size: 12px;
    color: #555;
}

/* ================= 通知公告 ================= */
.m-news {
    background-color: #ffffff;
    margin-bottom: 10px;
}

.m-news-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fff;
}

.m-news-tabs::-webkit-scrollbar {
    display: none;
}

.m-news-tabs .m-news-tab {
    flex: 0 0 auto;
    padding: 10px 14px;
    font-size: 14px;
    color: #666;
    position: relative;
    white-space: nowrap;
}

.m-news-tabs .m-news-tab.active {
    color: #0c8ce9;
    font-weight: 600;
}

.m-news-tabs .m-news-tab.active::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 24px;
    height: 2px;
    background-color: #0c8ce9;
    border-radius: 1px;
}

.m-news-content {
    padding: 8px 0;
}

.m-news-content .m-news-swiper {
    width: 100%;
    height: 200px;
    background-color: #000;
}

.m-news-content .m-news-swiper .swiper-slide img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.m-news-content .m-news-swiper .m-news-slide-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 12px 8px;
    color: #fff;
    font-size: 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.m-news-content .m-news-list {
    padding: 6px 12px;
}

.m-news-content .m-news-list .m-news-list-item {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.m-news-content .m-news-list .m-news-list-item:active {
    background-color: #fafafa;
}

.m-news-content .m-news-list .m-news-list-item .m-news-list-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

.m-news-content .m-news-list .m-news-list-item .m-news-list-time {
    color: #999;
    font-size: 12px;
    flex-shrink: 0;
}

/* ================= 热门专家 ================= */
.m-zhuanjia {
    background-color: #fff;
    margin-bottom: 10px;
    padding-bottom: 12px;
}

.m-zhuanjia .m-zhuanjia-wrapper {
    overflow: hidden;
    position: relative;
    padding: 0 12px;
}

.m-zhuanjia .swiper-container {
    overflow: visible;
}

.m-zhuanjia .m-zhuanjia-card {
    width: 140px;
    height: 280px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-right: 10px;
    display: flex;
    flex-direction: column;
}

.m-zhuanjia .m-zhuanjia-card img {
    width: 140px;
    height: 180px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.m-zhuanjia .m-zhuanjia-card .m-zhuanjia-info {
    flex: 1;
    min-height: 100px;
    padding: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.m-zhuanjia .m-zhuanjia-card .m-zhuanjia-name {
    font-size: 14px;
    color: #222;
    font-weight: 600;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.m-zhuanjia .m-zhuanjia-card .m-zhuanjia-ks {
    font-size: 12px;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ================= 科室导航 ================= */
.m-keshi {
    background-color: #fff;
    margin-bottom: 10px;
}

.m-keshi .m-keshi-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 4px;
}

.m-keshi .m-keshi-item {
    display: flex;
    align-items: center;
    padding: 8px;
    background-color: #fafafa;
    border-radius: 6px;
}

.m-keshi .m-keshi-item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 8px;
    flex-shrink: 0;
}

.m-keshi .m-keshi-item .m-keshi-info {
    flex: 1;
    min-width: 0;
}

.m-keshi .m-keshi-item .m-keshi-name {
    font-size: 14px;
    color: #222;
    font-weight: 500;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.m-keshi .m-keshi-item .m-keshi-en {
    font-size: 11px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ================= 健康科普 ================= */
.m-jk-list {
    background-color: #fff;
    margin-bottom: 10px;
}

.m-jk-list .m-jk-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 4px;
}

.m-jk-list .m-jk-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background-color: #eee;
}

.m-jk-list .m-jk-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.m-jk-list .m-jk-item .m-jk-mask {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 8px 6px;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
}

.m-jk-list .m-jk-item .m-jk-title {
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================= 底部栏 ================= */
.m-footer {
    background-color: #282B29;
    color: #989A99;
    padding: 16px 12px;
    text-align: center;
    font-size: 12px;
    line-height: 1.8;
    margin-top: 12px;
}

.m-footer a {
    color: #989A99;
    margin: 0 4px;
}

.m-footer .m-footer-qr {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid #3a3d3b;
    margin-bottom: 12px;
}

.m-footer .m-footer-qr .m-footer-qr-item {
    text-align: center;
    color: #b0b2b1;
    font-size: 11px;
}

.m-footer .m-footer-qr img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 4px;
    background-color: #fff;
    padding: 4px;
    border-radius: 4px;
}

.m-footer .m-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
    border-top: 1px solid #3a3d3b;
    padding-top: 10px;
}

.m-footer .m-footer-nav a {
    padding: 4px 8px;
    color: #DFDFDF;
    font-size: 12px;
}

/* ================= 风险提示弹层 ================= */
.m-risk-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 320px;
    background-color: #fff;
    border-radius: 10px;
    padding: 16px;
    z-index: 9999;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    text-align: center;
    display: none;
}

.m-risk-warning.active {
    display: block;
}

.m-risk-warning .m-risk-title {
    font-size: 16px;
    font-weight: 600;
    color: #d9534f;
    margin-bottom: 10px;
}

.m-risk-warning .m-risk-content {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 14px;
    text-align: left;
}

.m-risk-warning .m-risk-btn {
    display: inline-block;
    padding: 6px 20px;
    background-color: #0c8ce9;
    color: #fff;
    border-radius: 16px;
    font-size: 13px;
    border: none;
}

.m-risk-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
    display: none;
}

.m-risk-mask.active {
    display: block;
}

/* ================= 通用工具 ================= */
.m-text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.m-text-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.m-mt-10 { margin-top: 10px; }
.m-mt-20 { margin-top: 20px; }
.m-mb-10 { margin-bottom: 10px; }
.m-mb-20 { margin-bottom: 20px; }
.m-pt-10 { padding-top: 10px; }
.m-pb-10 { padding-bottom: 10px; }

/* ================= 文章详情/列表页通用 ================= */
.m-article {
    background-color: #fff;
    padding: 14px;
    margin-bottom: 10px;
}

.m-article h1.m-article-title {
    font-size: 20px;
    color: #222;
    font-weight: 600;
    margin: 0 0 10px;
    line-height: 1.4;
}

.m-article .m-article-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.m-article .m-article-content {
    font-size: 14px;
    color: #333;
    line-height: 1.7;
}

.m-article .m-article-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 10px auto;
}

.m-article .m-article-content p {
    margin: 0 0 12px;
}

.m-article .m-article-content table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse;
    font-size: 13px;
    margin: 10px 0;
    overflow-x: auto;
    display: block;
}

.m-article .m-article-content table th,
.m-article .m-article-content table td {
    padding: 6px 8px;
    border: 1px solid #ddd;
}

.m-article-nav {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    background-color: #fff;
    margin-bottom: 10px;
}

.m-article-nav a {
    flex: 1;
    font-size: 13px;
    color: #666;
    padding: 8px 10px;
    background-color: #fafafa;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.m-article-nav a:active {
    background-color: #f0f0f0;
}

/* 列表卡片 */
.m-list-item {
    display: flex;
    padding: 12px;
    background-color: #fff;
    margin-bottom: 8px;
    border-radius: 4px;
}

.m-list-item:active {
    background-color: #fafafa;
}

.m-list-item img.m-list-img {
    width: 110px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
    flex-shrink: 0;
}

.m-list-item .m-list-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.m-list-item .m-list-title {
    font-size: 15px;
    color: #222;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.m-list-item .m-list-meta {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.m-list-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px 12px;
    gap: 6px;
    flex-wrap: wrap;
}

.m-list-pagination a,
.m-list-pagination span {
    display: inline-block;
    padding: 6px 10px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    min-width: 32px;
    text-align: center;
}

.m-list-pagination a:active {
    background-color: #f0f0f0;
}

.m-list-pagination .active,
.m-list-pagination span.active {
    background-color: #0c8ce9;
    color: #fff;
    border-color: #0c8ce9;
}

/* 面包屑 */
.m-breadcrumb {
    padding: 8px 12px;
    font-size: 12px;
    color: #999;
    background-color: #fff;
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.m-breadcrumb a {
    color: #999;
    margin: 0 2px;
}

.m-breadcrumb span {
    color: #333;
}

/* 二级栏目切换 */
.m-cate-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
}

.m-cate-tabs::-webkit-scrollbar {
    display: none;
}

.m-cate-tabs a {
    flex: 0 0 auto;
    padding: 12px 14px;
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    position: relative;
}

.m-cate-tabs a.active {
    color: #0c8ce9;
    font-weight: 600;
}

.m-cate-tabs a.active::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 24px;
    height: 2px;
    background-color: #0c8ce9;
    border-radius: 1px;
}

/* 顶图 */
.m-cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
