/* ============================================================
   五恒建科 · 品牌视觉层
   对标方向：整屏大图 + 大幅留白 + 克制配色 + 精细排版
   配色语义：深松绿（被动房/低碳） + 原木色（装配式/木结构） + 暖白底
   加载方式：mu-plugin，优先级高于主题样式；删掉文件即可完整回滚
   ============================================================ */

:root {
    --wh-ink:      #1B1F1D;   /* 主文字 */
    --wh-body:     #4B544F;   /* 正文 */
    --wh-pine:     #1E4F3D;   /* 深松绿 - 主色 */
    --wh-pine-2:   #2C6B52;   /* 松绿 hover */
    --wh-timber:   #C08A4E;   /* 原木 - 点缀 */
    --wh-surface:  #F7F5F1;   /* 暖白面 */
    --wh-line:     #E6E2DA;   /* 分隔线 */
    --wh-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI",
               "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue",
               Helvetica, Arial, sans-serif;
}

/* ---------- 1. 全局排版 ---------- */
body {
    font-family: var(--wh-sans) !important;
    color: var(--wh-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
#main, .entry-content, .entry-summary {
    font-size: 16px;
    line-height: 1.85;
}
h1, h2, h3, h4, h5,
.entry-title, .page-title,
.lp-blocks-title, .lp-boxes-title, .lp-section-title {
    font-family: var(--wh-sans) !important;
    font-weight: 600;
    letter-spacing: .03em;
    line-height: 1.35;
    color: var(--wh-ink);
}
a { color: var(--wh-pine); }
a:hover { color: var(--wh-pine-2); }

/* ---------- 2. 页头：覆盖式大图 → 加深色渐变压底，金色改白 ---------- */
body.bravada-over-menu #masthead {
    background: linear-gradient(180deg,
        rgba(12, 24, 19, .58) 0%,
        rgba(12, 24, 19, .28) 58%,
        rgba(12, 24, 19, 0)  100%);
}
body.bravada-over-menu #site-title a,
body.bravada-over-menu #site-title a::before {
    color: #FFFFFF !important;
    background: var(--wh-timber) !important;
}
#site-title {
    font-weight: 700 !important;
    letter-spacing: .16em;
    font-size: 1.35em !important;
}
body.bravada-over-menu #site-description {
    color: rgba(255, 255, 255, .82) !important;
    letter-spacing: .12em;
}

/* ---------- 3. 顶部导航 ---------- */
#access ul#top-nav > li > a {
    font-size: 15px;
    letter-spacing: .06em;
    font-weight: 500;
}
body.bravada-over-menu #access ul#top-nav > li > a {
    color: rgba(255, 255, 255, .92);
}
body.bravada-over-menu #access ul#top-nav > li > a:hover,
body.bravada-over-menu #access ul#top-nav > li.current-menu-item > a,
body.bravada-over-menu #access ul#top-nav > li.current_page_item > a {
    color: #FFFFFF;
}
/* 悬停下划线 */
#access ul#top-nav > li > a span { position: relative; }
#access ul#top-nav > li > a span::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -5px;
    height: 2px;
    background: var(--wh-timber);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .25s ease;
}
#access ul#top-nav > li > a:hover span::after { transform: scaleX(1); }

/* ---------- 4. 语言切换按钮（核心） ---------- */
#access ul#top-nav > li.menu-item-gtranslate { position: relative; margin-left: .6em; }

#access li.menu-item-gtranslate > a.gt-current-wrapper {
    display: inline-flex !important;
    align-items: center;
    gap: .45em;
    padding: .42em .9em;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .5);
    background: rgba(255, 255, 255, .14);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff !important;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease;
}
#access li.menu-item-gtranslate > a.gt-current-wrapper:hover {
    background: rgba(255, 255, 255, .3);
    border-color: rgba(255, 255, 255, .8);
}
/* 小三角 */
#access li.menu-item-gtranslate > a.gt-current-wrapper::after {
    content: "";
    width: 0; height: 0;
    margin-left: .1em;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: .9;
}
#access li.menu-item-gtranslate img {
    width: 20px; height: 20px;
    border-radius: 2px;
    vertical-align: middle;
}

/* 下拉面板 */
#access li.menu-item-gtranslate > ul.sub-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + .6em);
    min-width: 176px;
    margin: 0;
    padding: .4rem;
    list-style: none;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 14px 38px rgba(14, 32, 24, .20);
    z-index: 9999;
}
#access li.menu-item-gtranslate:hover > ul.sub-menu,
#access li.menu-item-gtranslate:focus-within > ul.sub-menu { display: block; }

#access li.menu-item-gtranslate > ul.sub-menu > li { margin: 0; }
#access li.menu-item-gtranslate > ul.sub-menu a {
    display: flex;
    align-items: center;
    gap: .6em;
    padding: .55em .7em;
    border-radius: 8px;
    color: var(--wh-ink) !important;
    font-size: 14px;
    white-space: nowrap;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
#access li.menu-item-gtranslate > ul.sub-menu a:hover {
    background: var(--wh-surface);
    color: var(--wh-pine) !important;
}
#access li.menu-item-gtranslate > ul.sub-menu a.gt-current-lang {
    color: var(--wh-pine) !important;
    font-weight: 600;
}
/* 去掉主题可能自带的子菜单箭头残留 */
#access li.menu-item-gtranslate > ul.sub-menu::before { display: none; }

/* ---------- 5. 首屏大图文字与按钮 ---------- */
.staticslider-caption-title {
    font-weight: 600 !important;
    letter-spacing: .06em;
    line-height: 1.28;
}
.staticslider-caption-text { letter-spacing: .04em; }
.staticslider-button {
    display: inline-block;
    padding: .75em 1.8em;
    border-radius: 999px;
    background: var(--wh-pine);
    color: #fff !important;
    font-weight: 500;
    letter-spacing: .05em;
    text-decoration: none !important;
    border: 0 !important;
    box-shadow: 0 10px 26px rgba(30, 79, 61, .30);
    transition: background .2s ease, transform .2s ease;
}
.staticslider-button:hover {
    background: var(--wh-pine-2);
    color: #fff !important;
    transform: translateY(-1px);
}

/* ---------- 6. 落地页卡片：圆角 + 轻投影 ---------- */
.lp-boxes .lp-box, .lp-blocks .lp-block,
.lp-boxes-1 .lp-box, .lp-blocks .lp-block-inside {
    border-radius: 14px;
    overflow: hidden;
}
.lp-boxes img, .lp-blocks img { border-radius: 10px; }
.lp-boxes .lp-box-title, .lp-blocks .lp-block-title {
    font-weight: 600;
    letter-spacing: .03em;
}

/* ---------- 7. 页脚 ---------- */
#footer, #colophon {
    background: var(--wh-pine) !important;
    color: rgba(255, 255, 255, .78);
}
#footer a, #colophon a { color: rgba(255, 255, 255, .85); }
#footer a:hover, #colophon a:hover { color: #fff; }
#footer .widget-title, #colophon .widget-title {
    color: #fff;
    letter-spacing: .1em;
    font-weight: 600;
}

/* ---------- 8. 通用按钮 ---------- */
.entry-content .wp-block-button__link,
.button, input[type="submit"], button[type="submit"] {
    background: var(--wh-pine);
    border-radius: 999px;
    color: #fff;
    padding: .7em 1.7em;
    border: 0;
    letter-spacing: .05em;
    transition: background .2s ease;
}
.entry-content .wp-block-button__link:hover,
.button:hover, input[type="submit"]:hover, button[type="submit"]:hover {
    background: var(--wh-pine-2);
    color: #fff;
}

/* ---------- 9. 移动端：导航隐藏时改用浮动语言球 ---------- */
/* 桌面端隐藏浮动球（导航栏里已有按钮） */
@media (min-width: 901px) {
    .gtranslate_wrapper { display: none !important; }
}
/* 移动端显示浮动球，并放到右下角 */
@media (max-width: 900px) {
    .gtranslate_wrapper {
        display: block !important;
        bottom: 18px !important;
        right: 18px !important;
        top: auto !important;
        left: auto !important;
        z-index: 9998;
    }
    .staticslider-caption-title { font-size: 1.9em !important; }
}

/* ---------- 10. 细节 ---------- */
img { max-width: 100%; height: auto; }
::selection { background: rgba(30, 79, 61, .18); }
#toTop { background: var(--wh-pine); border-radius: 8px; }
