/* =========================================================
   小涵互联 · 站点页统一外壳（page.css）
   统一：页面标题区 / 面包屑 / 内容容器宽度 / 站点页脚
   仅在 page.php 渲染的站点页生效，与 theme.css token 同源
   ========================================================= */

/* 统一页头 */
.xh-page-head {
    position: relative;
    margin: 0 auto;
    padding: 30px 0 20px;
    width: 100%;
    max-width: 1240px;
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;
}

.xh-page-head-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.xh-crumb {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--xh-muted, #8fa2c2);
    margin-bottom: 10px;
    line-height: 1.4;
}

.xh-crumb a {
    color: var(--xh-muted, #8fa2c2) !important;
    text-decoration: none !important;
    transition: color .16s ease;
}

.xh-crumb a:hover { color: var(--xh-primary, #4f8cff) !important; }
.xh-crumb i { font-style: normal; opacity: .5; }
.xh-crumb span { color: var(--xh-text-2, #c7d6f2); }

.xh-page-title {
    margin: 0 !important;
    font-size: 26px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    letter-spacing: -.2px;
    color: var(--xh-text, #eaf1ff) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.xh-page-title::before {
    content: "";
    width: 4px;
    height: 22px;
    border-radius: 999px;
    background: var(--xh-primary-grad, linear-gradient(135deg, #4f8cff, #7a5cff));
    flex: 0 0 auto;
}

.xh-page-meta {
    margin: 9px 0 0 !important;
    font-size: 13px !important;
    line-height: 1.7 !important;
    color: var(--xh-muted, #8fa2c2) !important;
}

.xh-page-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.xh-page-tools .xh-btn {
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
}

/* 内容容器统一：常规站点页主体限宽居中，避免各页宽度各异 */
body.xh-has-nav:not(.xh-fullscreen) > .mdui-card,
body.xh-has-nav:not(.xh-fullscreen) > .card,
body.xh-has-nav:not(.xh-fullscreen) > .container,
body.xh-has-nav:not(.xh-fullscreen) > .box {
    max-width: 1240px;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

body.xh-has-nav:not(.xh-fullscreen) > .mdui-container,
body.xh-has-nav:not(.xh-fullscreen) > .container {
    max-width: 1240px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* 统一占位：页面内容与页脚之间留白 */
body.xh-has-nav:not(.xh-fullscreen) > .xh-page-head + * {
    margin-top: 0;
}

/* 统一页脚样式已抽离到 /assets/foot.css（旧静态页与独立页共用同一份定义） */

/* 旧站自带页脚：与统一页脚重复，隐藏 */
body.xh-has-nav > footer:not(.xh-foot) {
    display: none !important;
}

/* =========================================================
   旧站（mdui）页面兼容层
   旧页自带 appbar / 抽屉，与新统一导航重复，隐藏并让位
   ========================================================= */
body.xh-has-nav > header.mdui-appbar,
body.xh-has-nav > .mdui-appbar,
body.xh-has-nav > .mdui-appbar-fixed {
    display: none !important;
}

body.xh-has-nav > .mdui-drawer,
body.xh-has-nav > .mdui-drawer-left,
body.xh-has-nav > #drawer {
    display: none !important;
}

/* 旧页主体让位新的固定导航高度，避免首屏内容被遮挡 */
body.xh-has-nav:not(.xh-immersive):not(.xh-fullscreen) {
    padding-top: var(--xh-nav-h, 62px);
}

/* 旧页 appbar 内使用的 mdui 主色收敛到站点 token */
body.xh-has-nav .mdui-color-theme,
body.xh-has-nav .mdui-color-theme-500,
body.xh-has-nav .mdui-color-theme-600 {
    background-color: var(--xh-primary, #4f8cff) !important;
    color: #fff !important;
}

body.xh-has-nav .mdui-text-color-theme,
body.xh-has-nav .mdui-text-color-theme-500 {
    color: var(--xh-primary, #4f8cff) !important;
}

@media (max-width: 760px) {
    .xh-page-head {
        padding: 20px 16px 14px;
    }
    .xh-page-title { font-size: 21px !important; }
    .xh-page-title::before { height: 18px; }
}
