/* 首页高级简洁版：统一头部与百科视觉 */
:root {
    --primary: #236fc5;
    --primary-dark: #174f91;
    --primary-2: #4aa3e8;
    --ink: #182b3f;
    --text: #536579;
    --muted: #8b9bad;
    --line: #e5edf5;
    --bg-soft: #f5f8fc;
    --shadow: 0 8px 26px rgba(29, 75, 126, .08);
    --shadow-lg: 0 14px 36px rgba(29, 75, 126, .12)
}

body {
    color: var(--text);
    background: #fff
}

.site-header {
    height: 124px;
    background: #fff;
    border-bottom: 0;
    box-shadow: 0 2px 12px rgba(18, 52, 91, .07)
}

.nav-wrap {
    height: 70px;
    max-width: 1240px;
    gap: 28px
}

.brand {
    font-size: 23px;
    color: var(--ink);
    letter-spacing: 0
}

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: var(--primary);
    box-shadow: none
}

.brand-light {
    color: var(--primary)
}

.nav-actions {
    gap: 14px
}

.nav-actions .nav-search {
    display: flex;
    align-items: center;
    width: 290px;
    height: 36px;
    border: 1px solid #dfe8f1;
    border-radius: 18px;
    padding: 0 0 0 12px;
    color: #8fa1b4;
    overflow: hidden
}

/* 放大镜改用行内 SVG：原来的字符 ⌕ 字形本身不居中，怎么调都歪 */
.nav-actions .nav-search .nav-search-ico {
    display: flex;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-right: 7px
}

.nav-actions .nav-search .nav-search-ico svg {
    display: block;
    width: 100%;
    height: 100%
}

/* 搜索按钮：贴在输入框右端，align-self:stretch + 负 margin 让它盖住 1px 描边并对齐胶囊圆角 */
.nav-actions .nav-search button {
    flex: 0 0 auto;
    align-self: stretch;
    margin: -1px -1px -1px 0;
    padding: 0 18px;
    border: 0;
    border-radius: 0;
    background: #2f8af5;
    color: #fff;
    font-size: 14px;
    cursor: pointer
}

.nav-actions .nav-search button:hover {
    background: #1c74dd
}

.nav-actions .nav-search input {
    width: 100%;
    font-size: 12px;
    color: var(--ink)
}

.nav-actions .nav-search input::placeholder {
    color: #a7b4c2
}

.login {
    font-size: 13px
}

.join {
    font-size: 13px;
    padding: 7px 15px;
    border-radius: 5px;
    background: var(--primary);
    box-shadow: none
}

/* 主导航条：整条与页面内容同宽（1200 居中），不再通栏。
   theme-v3 给它设的是 left:0;right:0 通栏，这里用「左右 0 + 定宽 + margin:auto」把它收进内容宽度，
   链接左边距同时归零 —— 否则原来那句 padding-left: max(20px, (100%-1240px)/2) 会再多缩进一次。
   1080p 下：导航条 120..1320，与 logo（120）、面包屑、文章正文（140）同一条竖线。 */
.main-nav {
    top: 70px;
    height: 54px;
    width: 1200px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    background: #61a5f3;
    justify-content: flex-start
}

.main-nav a {
    height: 54px;
    padding: 0 23px;
    font-size: 14px;
    letter-spacing: .2px;
    opacity: .92
}

.main-nav a:hover,
.main-nav a.active {
    background: #174f91
}

.main-nav a.active:after {
    bottom: 0;
    width: 34px;
    height: 3px;
    border-radius: 0;
    background: #8dcef9
}

/* ≤900 时 fh-portal-home.css 把主导航设成 width:calc(100% + 32px); margin:0 -16px
   —— 比页面宽 32px、左端还会跑到视口外面。收回整页宽度。
   它把这个文件加载得晚，所以这里多写一层 .nav-wrap 提权。 */
@media (max-width: 900px) {
    .site-header .nav-wrap .main-nav {
        width: 100%;
        margin: 0;
        padding: 0
    }
}

.hero {
    background: #f1f7fd;
    color: var(--ink);
    border-bottom: 1px solid #e5eef7
}

.hero:before,
.hero:after {
    display: none
}

.hero-inner {
    min-height: 170px;
    max-width: 1240px
}

.hero-copy {
    padding: 26px 0;
    gap: 32px
}

.hero h1 {
    font-size: 27px;
    color: var(--ink);
    text-shadow: none;
    letter-spacing: 0
}

.hero h1 em {
    color: var(--primary)
}

.hero-search {
    width: 520px;
    height: 46px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(31, 80, 132, .1);
    padding-left: 15px
}

.hero-search button {
    height: 34px;
    border-radius: 4px;
    background: var(--primary);
    padding: 0 23px;
    font-size: 13px
}

.hot-search {
    color: #8295aa;
    font-size: 12px
}

.hot-search a {
    color: #60758c;
    background: none;
    padding: 0;
    margin-left: 10px;
    font-size: 12px
}

.quick-entry {
    max-width: 1240px;
    margin-top: -20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid #e8eff6
}

.quick-entry>a {
    padding: 18px 24px;
    border-right: 1px solid #edf2f6
}

.entry-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    box-shadow: none !important;
    background: #eaf3fc !important;
    color: var(--primary) !important
}

.quick-entry b {
    font-size: 14px
}

.quick-entry small {
    font-size: 11px
}

.section {
    padding: 42px 0 18px
}

.section-head {
    border-bottom: 1px solid #dfe8f1;
    padding-bottom: 12px;
    margin-bottom: 19px
}

.section-head>div {
    padding-left: 13px;
    gap: 3px
}

.section-head>div:before {
    width: 3px;
    top: 3px;
    bottom: 3px;
    background: var(--primary)
}

.kicker {
    font-size: 10px;
    letter-spacing: 2px;
    color: #92a4b7
}

.section h2 {
    font-size: 23px;
    color: var(--ink);
    letter-spacing: 0
}

.section-head .more {
    font-size: 12px;
    color: #8093a7
}

#disease {
    background: #f6f9fd;
    padding-top: 42px;
    padding-bottom: 46px
}

.section#disease .section-head {
    border-bottom-color: #dae6f1
}

.section#disease .section-head>div {
    background: transparent
}

.section#disease .section-head:before,
.section#disease .section-head:after {
    display: none
}

.encyclopedia-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px
}

.encyclopedia-column {
    border-radius: 9px;
    box-shadow: 0 5px 18px rgba(33, 88, 135, .07)
}

.encyclopedia-column:before {
    height: 3px;
    background: var(--primary)
}

.encyclopedia-column:nth-child(3n+2):before,
.encyclopedia-column:nth-child(3n):before {
    background: #64a6dc
}

.encyclopedia-heading {
    padding: 19px 20px 14px
}

.encyclopedia-heading .disease-symbol {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #edf5fd !important;
    color: var(--primary) !important
}

.encyclopedia-heading h3 {
    font-size: 17px;
    color: var(--ink)
}

.encyclopedia-heading p {
    font-size: 11px;
    color: #8999aa
}

.encyclopedia-column ul {
    padding: 0 20px 9px
}

.encyclopedia-column li {
    line-height: 32px
}

.encyclopedia-column li:before {
    background: #8ab7e4
}

.encyclopedia-column li a {
    font-size: 13px;
    color: #465b70
}

.encyclopedia-column li a span {
    color: var(--primary)
}

.encyclopedia-footer {
    margin: 0 20px;
    padding-top: 10px;
    padding-bottom: 14px
}

.encyclopedia-footer a {
    color: var(--primary)
}

.focus-section,
.cancer-articles,
.hospital-section {
    background: #fff
}

.focus-card,
.topic-article,
.doctor-card,
.hospital-card {
    box-shadow: var(--shadow);
    border: 0
}

.focus-card:hover,
.topic-article:hover,
.doctor-card:hover,
.hospital-card:hover {
    box-shadow: var(--shadow-lg)
}

footer {
    margin-top: 44px;
    background: #f2f6fa;
    color: #8093a7;
    border-top: 1px solid #e1e9f1
}

.footer-inner .brand {
    color: var(--ink)
}

.footer-inner .brand-light {
    color: var(--primary)
}

.footer-inner .brand-mark {
    background: var(--primary)
}

@media(max-width:700px) {
    .site-header {
        height: 102px
    }

    .nav-wrap {
        height: 56px;
        padding: 0 14px
    }

    .brand {
        font-size: 19px
    }

    .main-nav {
        top: 56px;
        height: 46px;
        padding-left: 5px;
        overflow-x: auto
    }

    .main-nav a {
        height: 46px;
        padding: 0 15px;
        font-size: 13px
    }

    /* 手机端内页头部也放一个搜索框：只保留输入框，不放「搜索」按钮。
       （原来这里是 display:none，首页有自己的手机端头部，不受这条影响）
       logo 让位、搜索框吃掉剩余宽度，才排得下。 */
    .site-header .brand {
        flex: 0 0 auto
    }

    .site-header .nav-actions {
        display: flex;
        flex: 1 1 0;
        min-width: 0;
        margin-left: 0;
        justify-content: flex-end
    }

    /* 关键：这里必须是 width:auto + flex:1 1 auto。
       写 width:100% 会让它在 .nav-wrap（flex-wrap:wrap）里算出过大的基础尺寸，
       直接换到第二行、还和 logo 叠在一起（实测踩过）。 */
    .site-header .nav-actions .nav-search {
        display: flex;
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        max-width: 100%;
        height: 34px;
        padding: 0 0 0 10px;
        border: 1px solid #dfe8f1;
        border-radius: 17px;
        background: #f5f8fb;
        overflow: hidden
    }

    .site-header .nav-actions .nav-search button {
        display: none
    }

    .site-header .nav-actions .nav-search .nav-search-ico {
        width: 14px;
        height: 14px;
        margin-right: 6px
    }

    .site-header .nav-actions .nav-search input {
        display: block;
        width: 100%;
        min-width: 0;
        font-size: 12px
    }

    .hero-inner {
        min-height: 0
    }

    .hero-copy {
        padding: 21px 0;
        gap: 0
    }

    .hero h1 {
        font-size: 23px;
        margin-bottom: 11px
    }

    .hero-search {
        width: 100%;
        height: 42px
    }

    .quick-entry {
        margin: 0 14px;
        border: 0;
        border-radius: 0
    }

    .section {
        padding: 30px 0 18px
    }

    .section h2 {
        font-size: 20px
    }

    .section-head {
        margin-bottom: 15px
    }

    .section-head>div {
        max-width: 72%
    }

    #disease {
        padding-top: 30px;
        padding-bottom: 34px
    }

    .encyclopedia-grid {
        grid-template-columns: 1fr;
        gap: 12px
    }

    .encyclopedia-column {
        border-radius: 8px
    }

    .encyclopedia-heading {
        padding: 16px 16px 12px
    }

    .encyclopedia-column ul {
        padding-left: 16px;
        padding-right: 16px
    }

    .encyclopedia-footer {
        margin-left: 16px;
        margin-right: 16px
    }
}