/*==================================================================
  header.css — 头部（信息条 + 导航 + mega menu）统一样式
  与主页 index.html 的头部呈现完全一致（主页该部分样式来自 theme.css）。
  供尚未引入 theme.css 的页面单独引用，避免整页视觉被 theme.css 改写。

  加载顺序：style.min.css / responsive.min.css 之后
===================================================================*/

/* 品牌字体（mega menu 标题使用，与 theme.css 同一份自托管字体） */
@font-face {
    font-family: 'Josefin Sans';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../font/josefin-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
        U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
        U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 头部所需设计变量（数值与 theme.css 保持一致） */
:root {
    --ink: #0f1419;
    --ink-soft: #3c454f;
    --gold: #c2a773;
    --gold-dark: #a98c58;
    --font-head: 'Josefin Sans', 'Helvetica Neue', Arial, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

/* theme.css 用全局 * 指定正文字体，这里仅收敛到头部，保证字体一致又不影响页面其它区域 */
.home1.topbar,
.home1.topbar *,
.home1.menubar,
.home1.menubar * {
    font-family: var(--font-body);
}

.home1.menubar a {
    color: var(--ink);
}

.home1.menubar a:hover,
.home1.menubar a:focus {
    color: var(--gold-dark);
}

.home1.topbar p,
.home1.menubar p {
    color: var(--ink-soft);
    line-height: 1.75;
}

/*---------- 顶部信息条 ----------*/
.home1.topbar {
    background: var(--ink);
    padding: 9px 0;
}

.home1.topbar p,
.home1.topbar a {
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
    letter-spacing: .02em;
    padding: 0;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.topbar-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.topbar-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    flex: 0 0 auto;
}

.topbar-contact {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 0 0 auto;
}

.topbar-contact a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    transition: color .2s var(--ease);
}

.topbar-contact a i {
    color: var(--gold);
    font-size: 13px;
}

.topbar-contact a:hover,
.topbar-contact a:focus {
    color: #fff;
}

/*---------- 导航条 ----------*/
/* 回归常规流：topbar 高度随断点/换行变化，绝对定位的 top 值必然会错位遮挡 */
.home1.menubar {
    position: relative;
    top: 0;
    z-index: 900;
    padding: 14px 0;
}

.home1.menubar.sticky {
    padding: 6px 0;
}

.menubar .main-menu > ul > li > a {
    font-size: 16px;
    font-weight: 500;
    padding: 22px 14px;
    letter-spacing: .01em;
    white-space: nowrap;
}

.menubar .main-menu > ul > li > a:not(:only-child)::after {
    border-width: 5px;
    right: -2px;
    top: 56%;
}

.menubar .main-menu > ul > li > a::before {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .3s var(--ease);
}

.menubar .main-menu > ul > li:hover > a::before,
.menubar .main-menu > ul > li.active > a::before {
    transform: scaleX(1);
}

.menubar .main-menu > ul > li.active > a {
    color: var(--gold-dark);
}

/*---------- mega menu 文字层级 ----------*/
.menubar .main-menu ul li .mega-submenu h4 {
    font-family: var(--font-head);
    font-size: 16px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink);
}

.menubar .main-menu ul li .mega-submenu ul li a {
    font-size: 14px;
    line-height: 1.5;
    padding: 6px 0;
}

/*---------- 响应式（与 theme.css 同值） ----------*/
@media (max-width: 1199.98px) {
    .menubar .main-menu > ul > li > a {
        font-size: 15px;
        padding: 20px 10px;
    }
}

@media (max-width: 991.98px) {
    .topbar-contact {
        display: none;
    }

    .home1.topbar {
        padding: 8px 0;
    }

    .home1.topbar p {
        font-size: 12px;
        text-align: center;
        width: 100%;
        justify-content: center;
    }
}
