@import url("./local-fonts.css?v=20260728-font-subset");

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    color: #243a36;
    font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    background: #f6faf8;
}

body.is-top-nav-loading {
    cursor: progress;
}

body.is-top-nav-loading::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    height: .25rem;
    background: rgba(255, 243, 214, .24);
    pointer-events: none;
}

body.is-top-nav-loading::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10001;
    width: 0;
    height: .25rem;
    background: linear-gradient(90deg, #8a352f 0%, #e59e6b 62%, #fff3d6 100%);
    box-shadow: 0 .125rem .5rem rgba(138, 53, 47, .24);
    pointer-events: none;
    animation: topNavLoadingBar 1.6s cubic-bezier(.22, .8, .3, 1) forwards, topNavLoadingPulse .9s ease-in-out 1.6s infinite;
}

.yygk-header__link.is-loading,
.home-header__link.is-loading {
    cursor: progress;
    pointer-events: none;
}

.home-header__link {
    position: relative;
}

.yygk-header__link.is-loading .yygk-header__link-text,
.home-header__link.is-loading .home-header__link-cn,
.home-header__link.is-loading .home-header__link-en {
    color: #fffdf4;
}

@keyframes topNavLoadingBar {
    0% {
        width: 0;
    }

    35% {
        width: 42%;
    }

    72% {
        width: 72%;
    }

    100% {
        width: 88%;
    }
}

@keyframes topNavLoadingPulse {
    0%,
    100% {
        opacity: .84;
    }

    50% {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.is-top-nav-loading::before,
    body.is-top-nav-loading::after {
        animation: none;
    }

    body.is-top-nav-loading::after {
        width: 88%;
        opacity: 1;
    }
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid rgba(12, 92, 78, .1);
    backdrop-filter: blur(12px);
}

.site-header__inner {
    width: min(1200px, calc(100% - 48px));
    min-height: 82px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.site-logo {
    display: flex;
    align-items: center;
    min-width: 220px;
}

.site-logo img {
    max-height: 56px;
    object-fit: contain;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 1;
    overflow-x: auto;
}

.site-nav__link {
    position: relative;
    padding: 28px 14px;
    color: #274843;
    font-size: 16px;
    line-height: 1;
    white-space: nowrap;
    transition: color .2s ease;
}

.site-nav__link::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 20px;
    height: 3px;
    border-radius: 999px;
    background: #0c7a62;
    opacity: 0;
    transform: scaleX(.4);
    transition: opacity .2s ease, transform .2s ease;
}

.site-nav__link:hover,
.site-nav__link.active {
    color: #0b765f;
}

.site-nav__link:hover::after,
.site-nav__link.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.site-main {
    min-height: 60vh;
}

.site-footer {
    --footer-red: #79312c;
    --footer-cream: #eae7dc;
    --footer-text: #cfc1bd;
    --footer-dark: #372f2d;
    --footer-muted: #685e5d;
    color: var(--footer-text);
    background: var(--footer-red);
}

.site-footer__inner {
    width: var(--yygk-container, min(88rem, calc(100% - clamp(1.5rem, 5vw, 4rem))));
    margin: 0 auto;
    padding: 0;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: clamp(2rem, 6vw, 8rem);
}

.site-footer > .site-footer__inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

.site-footer h3 {
    margin: 0 0 clamp(1.25rem, 2.2vw, 1.6rem);
    color: var(--footer-cream);
    font-family: "Source Han Serif CN", "Songti SC", SimSun, serif;
    font-size: clamp(1.25rem, 1.8vw, 1.5rem);
    font-weight: 500;
    line-height: 1.6;
}

.site-footer p {
    margin: 0;
    color: var(--footer-text);
    font-size: 1rem;
    letter-spacing: .04em;
    line-height: 1.5;
}

.site-footer__brand {
    flex: 0 0 clamp(16rem, 20vw, 18rem);
    min-height: clamp(22rem, 27vw, 26.75rem);
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--footer-dark);
    background: var(--footer-cream);
}

.site-footer__brand-copy {
    width: 100%;
    padding: clamp(.75rem, 1.5vw, .9rem) clamp(.75rem, 1.8vw, 1.1rem) 0;
}

.site-footer__name {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--footer-dark);
    font-family: SourceHanSerifCN-Medium, "Source Han Serif CN", "Songti SC", SimSun, serif;
    font-size: clamp(1rem, 1.25vw, 1.125rem);
    font-weight: 500;
    line-height: 1.333;
    text-align: center;
}

.site-footer__slogan {
    width: min(100%, 15rem);
    margin: clamp(1.25rem, 2vw, 1.5625rem) auto 0;
    color: var(--footer-muted);
    font-size: .875rem;
    letter-spacing: .0375em;
    line-height: 1.714;
}

html.fanyi-lang-en .site-footer__brand-copy {
    padding: clamp(.85rem, 1.35vw, 1.05rem) clamp(.85rem, 1.6vw, 1.1rem) 0;
}

html.fanyi-lang-en .site-footer__brand {
    align-self: stretch;
    min-height: 0;
}

html.fanyi-lang-en .site-footer__name {
    font-size: clamp(.78rem, .95vw, .9rem);
    line-height: 1.24;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

html.fanyi-lang-en .site-footer__name span + span {
    margin-top: .28rem;
}

html.fanyi-lang-en .site-footer__slogan {
    width: min(100%, 14.5rem);
    margin-top: clamp(.9rem, 1.4vw, 1.15rem);
    font-size: clamp(.72rem, .86vw, .8rem);
    line-height: 1.42;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.site-footer__mark {
    width: clamp(5.5rem, 8vw, 7rem);
    margin-top: 0;
    margin-bottom: 0;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: contain;
    object-position: center center;
}

.site-footer__social {
    margin-top: auto;
    padding: clamp(1.75rem, 3vw, 2.25rem) 0 clamp(1.6rem, 2.6vw, 2rem);
    display: flex;
    justify-content: center;
    gap: clamp(1.5rem, 2.4vw, 2.125rem);
}

.site-footer__social a {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--footer-red);
    border-radius: 50%;
    transition: background .2s ease, transform .2s ease;
}

.site-footer__social a:hover {
    background: rgba(121, 49, 44, .08);
    transform: translateY(-.125rem);
}

.site-footer__social img {
    max-width: 64%;
    max-height: 64%;
    object-fit: contain;
}

.site-footer__links a {
    display: block;
    color: var(--footer-text);
    font-size: 1rem;
    letter-spacing: .04em;
    line-height: 1.5;
    transition: color .2s ease;
}

.site-footer__links a + a {
    margin-top: 1.125rem;
}

.site-footer__links a:hover {
    color: var(--footer-cream);
}

.site-footer__contact p + p {
    margin-top: 1.125rem;
}

.site-footer__service strong {
    display: block;
    color: var(--footer-cream);
    font-family: "Source Han Serif CN", "Songti SC", SimSun, serif;
    font-size: clamp(1.35rem, 2vw, 1.625rem);
    font-weight: 500;
    line-height: 1.65;
    white-space: nowrap;
}

.site-footer__links,
.site-footer__contact,
.site-footer__service {
    flex: 1 1 0;
    min-width: 0;
    padding-top: clamp(1.75rem, 3vw, 2.25rem);
}

.site-footer__service-group {
    padding-bottom: 1.125rem;
}

.site-footer__service-group + .site-footer__service-group {
    padding-top: 1.25rem;
    border-top: 1px solid rgba(234, 231, 220, .48);
}

.site-footer__service-group span {
    display: block;
    margin-bottom: .25rem;
    color: var(--footer-text);
    font-size: 1rem;
    letter-spacing: .04em;
    line-height: 1.5;
}

.site-footer__service a {
    display: inline-block;
    color: var(--footer-text);
    font-size: 1rem;
    letter-spacing: .04em;
    line-height: 1.5;
    transition: color .2s ease;
}

.site-footer__service a:hover {
    color: var(--footer-cream);
}

@media (max-width: 60rem) {
    .site-header__inner {
        width: min(100% - 1.75rem, 75rem);
        min-height: 4.5rem;
        gap: 1rem;
    }

    .site-logo {
        min-width: 9.375rem;
    }

    .site-nav__link {
        padding: 1.625rem .625rem;
        font-size: .875rem;
    }

    .site-footer__inner {
        flex-wrap: nowrap;
        gap: clamp(1.75rem, 4vw, 3.5rem);
    }
}

@media (max-width: 40rem) {
    .site-header__inner {
        align-items: flex-start;
        flex-direction: column;
        padding: .875rem 0 .625rem;
    }

    .site-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .site-nav__link {
        padding: .75rem .5rem 1.125rem;
    }

    .site-nav__link::after {
        bottom: .625rem;
        left: .5rem;
        right: .5rem;
    }

    .site-footer__inner {
        width: var(--yygk-container, min(100% - 1.75rem, 75rem));
        gap: 2rem;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .site-footer__brand {
        width: 100%;
        min-height: auto;
    }

    .site-footer__service {
        width: 100%;
    }

    .site-footer__links,
    .site-footer__contact,
    .site-footer__service {
        padding-top: 0;
    }

}

/* ==============================================================
   英文模式自适应 - 顶部 header / 横幅 banner（所有栏目共享）
   遵守 fanyi-en-page-fixes skill：只调整字号/换行/min-height，
   不改 writing-mode/position/transform/display/color。
   不使用 line-clamp / text-overflow:ellipsis / overflow:hidden 截字。
   ============================================================= */

/* 顶部 8 个竖排导航：字号缩小 + 允许换行（保持 writing-mode 不变） */
html.fanyi-lang-en .yygk-header__link-text {
    font-size: clamp(.7rem, .9vw, .82rem);
    line-height: 1.4;
    letter-spacing: .05rem;
    white-space: normal;
    min-height: 0;
    padding: 0 .5rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 顶部右上角语言切换按钮 */
html.fanyi-lang-en .yygk-header__lang {
    font-size: clamp(.75rem, .9vw, .88rem);
    line-height: 1.2;
    white-space: nowrap;
}

/* 顶部品牌区（logo + 品牌名）：
   防止在 EN 模式下因 nav 缩小而被压缩变小。
   保留 logo 82x80 + 11gap + brand-text 212x63 = 305px 原始尺寸。 */
html.fanyi-lang-en .yygk-header__brand {
    flex: 0 0 auto;
    min-width: clamp(19.125rem, 19vw, 19.5rem); /* ≥306px */
    width: auto;
}

/* 横幅标题 text_54（所有栏目共用 banner.html）：50px → 缩小，line-height 放开让换行 */
html.fanyi-lang-en .yygk-shell > .group_24 .text_54 {
    font-size: clamp(1.5rem, 2.6vw, 2.5rem);
    line-height: 1.25;
    white-space: normal;
    min-height: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 横幅副标题 text_55：移除 -webkit-line-clamp:4 + overflow:hidden，
   改为自适应（缩字号 + 允许增长），文字完整可见 */
html.fanyi-lang-en .yygk-shell > .group_24 .text_55 {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: clamp(.9rem, 1.05vw, 1.05rem);
    line-height: 1.5;
    min-height: 0;
    word-break: break-word;
    overflow-wrap: break-word;
    letter-spacing: 0;
}
