/*
Theme Name: Yihui Open
Theme URI: https://www.yihuijiankang.com/
Description: 医汇科技自有主题。基于 GPL 开源 Astra，接管全站页头、页脚与编辑器基础样式。
Author: 大连医汇科技有限公司
Version: 1.0.0
Template: astra
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yihui-open
*/

:root {
    --yh-blue: #1768b0;
    --yh-blue-deep: #0b4f88;
    --yh-blue-soft: #eaf3fb;
    --yh-ink: #172033;
    --yh-muted: #5d6878;
    --yh-line: #dfe5ec;
    --yh-surface: #f6f8fa;
    --yh-white: #fff;
    --yh-warm: #c98736;
    --yh-container: 1240px;
    --yh-header-height: 76px;
}

html {
    scroll-padding-top: var(--yh-header-height);
}

body {
    color: var(--yh-ink);
    background: var(--yh-white);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

body.yh-menu-open {
    overflow: hidden;
}

.yh-container {
    width: min(calc(100% - 48px), var(--yh-container));
    margin-inline: auto;
}

.yh-skip-link {
    position: fixed;
    z-index: 10000;
    top: 12px;
    left: 12px;
    transform: translateY(-180%);
    padding: 10px 14px;
    color: var(--yh-white);
    background: var(--yh-blue-deep);
}

.yh-skip-link:focus {
    transform: translateY(0);
}

.yh-site-header {
    position: relative;
    z-index: 999;
    min-height: var(--yh-header-height);
    border-bottom: 1px solid rgba(23, 32, 51, 0.08);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 28px rgba(23, 32, 51, 0.04);
    backdrop-filter: blur(16px);
}

.yh-site-header__inner {
    display: flex;
    min-height: var(--yh-header-height);
    align-items: center;
    justify-content: space-between;
    gap: 36px;
}

.yh-brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
}

.yh-brand img {
    display: block;
    width: 172px;
    height: auto;
}

.yh-primary-nav {
    margin-left: auto;
}

.yh-primary-nav ul {
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: clamp(18px, 2vw, 32px);
    list-style: none;
}

.yh-primary-nav li {
    margin: 0;
}

.yh-primary-nav a {
    position: relative;
    display: block;
    padding: 27px 0 25px;
    color: #263243;
    font-size: 15px;
    font-weight: 500;
    line-height: 24px;
    text-decoration: none;
}

.yh-primary-nav a::after {
    position: absolute;
    right: 0;
    bottom: 17px;
    left: 0;
    height: 2px;
    background: var(--yh-blue);
    content: "";
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 180ms ease;
}

.yh-primary-nav a:hover,
.yh-primary-nav a:focus-visible,
.yh-primary-nav .current-menu-item > a,
.yh-primary-nav .current_page_item > a {
    color: var(--yh-blue-deep);
}

.yh-primary-nav a:hover::after,
.yh-primary-nav a:focus-visible::after,
.yh-primary-nav .current-menu-item > a::after,
.yh-primary-nav .current_page_item > a::after {
    transform: scaleX(1);
    transform-origin: left;
}

.yh-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--yh-line);
    border-radius: 6px;
    color: var(--yh-ink);
    background: var(--yh-white);
    cursor: pointer;
}

.yh-menu-toggle__icon,
.yh-menu-toggle__icon::before,
.yh-menu-toggle__icon::after {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    content: "";
    transition: transform 180ms ease, opacity 180ms ease;
}

.yh-menu-toggle__icon {
    position: relative;
}

.yh-menu-toggle__icon::before {
    position: absolute;
    top: -6px;
}

.yh-menu-toggle__icon::after {
    position: absolute;
    top: 6px;
}

.yh-menu-toggle[aria-expanded="true"] .yh-menu-toggle__icon {
    background: transparent;
}

.yh-menu-toggle[aria-expanded="true"] .yh-menu-toggle__icon::before {
    top: 0;
    transform: rotate(45deg);
}

.yh-menu-toggle[aria-expanded="true"] .yh-menu-toggle__icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.yh-site-main {
    min-height: 50vh;
}

.yh-site-footer {
    color: rgba(255, 255, 255, 0.84);
    background: var(--yh-blue-deep);
}

.yh-site-footer__main {
    display: grid;
    padding-block: 52px 42px;
    grid-template-columns: minmax(280px, 1.4fr) minmax(420px, 1fr);
    gap: 72px;
}

.yh-site-footer__brand img {
    width: 178px;
    height: auto;
    margin-bottom: 22px;
    filter: brightness(0) invert(1);
}

.yh-site-footer__summary {
    max-width: 590px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.9;
}

.yh-site-footer__contact {
    display: flex;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    gap: 8px 22px;
    list-style: none;
}

.yh-site-footer__contact a,
.yh-site-footer__contact span {
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    text-decoration: none;
}

.yh-site-footer__contact a:hover,
.yh-site-footer__links a:hover {
    color: var(--yh-white);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.yh-site-footer__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 28px;
}

.yh-site-footer__links h2 {
    margin: 0 0 18px;
    color: var(--yh-white);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}

.yh-site-footer__links ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.yh-site-footer__links li + li {
    margin-top: 10px;
}

.yh-site-footer__links a {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    text-decoration: none;
}

.yh-site-footer__legal {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.yh-site-footer__legal-inner {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.yh-site-footer__legal p {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
}

.yh-site-footer__legal a {
    color: inherit;
    text-decoration: none;
}

.yh-entry-shell {
    width: min(calc(100% - 48px), 920px);
    margin: 72px auto 96px;
}

.yh-entry-header {
    margin-bottom: 38px;
}

.yh-entry-title {
    margin: 0;
    color: var(--yh-ink);
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.18;
}

.yh-entry-meta {
    margin-top: 16px;
    color: var(--yh-muted);
    font-size: 14px;
}

.yh-entry-content {
    color: #303b4b;
    font-size: 17px;
    line-height: 1.9;
}

.yh-entry-content > * + * {
    margin-top: 1.35em;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

@media (max-width: 1040px) {
    :root {
        --yh-header-height: 68px;
    }

    .yh-container {
        width: min(calc(100% - 40px), var(--yh-container));
    }

    .yh-brand img {
        width: 158px;
    }

    .yh-menu-toggle {
        display: inline-flex;
    }

    .yh-primary-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        max-height: calc(100vh - var(--yh-header-height));
        overflow: auto;
        border-top: 1px solid var(--yh-line);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 18px 38px rgba(23, 32, 51, 0.1);
        backdrop-filter: blur(18px);
    }

    .yh-primary-nav.is-open {
        display: block;
    }

    .yh-primary-nav ul {
        display: block;
        width: min(calc(100% - 40px), var(--yh-container));
        margin: 0 auto;
        padding-block: 10px 18px;
    }

    .yh-primary-nav a {
        padding: 13px 2px;
        border-bottom: 1px solid #edf0f3;
        font-size: 16px;
    }

    .yh-primary-nav a::after {
        display: none;
    }

    .yh-site-footer__main {
        grid-template-columns: 1fr;
        gap: 38px;
    }
}

@media (max-width: 640px) {
    .yh-container,
    .yh-primary-nav ul,
    .yh-entry-shell {
        width: calc(100% - 32px);
    }

    .yh-site-header,
    .yh-site-header__inner {
        min-height: 64px;
    }

    .yh-brand img {
        width: 146px;
    }

    .yh-site-footer__main {
        padding-block: 38px 32px;
    }

    .yh-site-footer__links {
        grid-template-columns: 1fr 1fr;
        gap: 24px 18px;
    }

    .yh-site-footer__legal-inner {
        min-height: 74px;
        align-items: flex-start;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
    }

    .yh-entry-shell {
        margin-block: 48px 72px;
    }

    .yh-entry-content {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
