/* ============================================
   西北狼·狼眼世界 - 页眉页脚溢出修复
   版本: 1.0.0
   创建时间: 2026-04-22
   目标: 彻底解决页眉页脚超出容器范围问题
============================================ */

/* ===== 强制全局盒模型 ===== */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    box-sizing: border-box;
}

/* ===== 根元素强制设置 ===== */
html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* ===== 页眉强制溢出控制 ===== */
.site-header {
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
}

.header-top {
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* 容器安全宽度计算 */
.container {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    overflow: hidden !important;
}

/* 企业logo安全区域 */
.logo-area {
    box-sizing: border-box !important;
    overflow: hidden !important;
    max-width: 100% !important;
}

/* 内联样式安全覆盖 */
.logo-area a[style*="display: flex"] {
    box-sizing: border-box !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.logo-area a[style*="display: flex"] div[style*="width: 60px"] {
    box-sizing: border-box !important;
    width: 60px !important;
    max-width: 60px !important;
}

/* 时间天气区域安全宽度 */
.header-right {
    box-sizing: border-box !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.date-time-area {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

.weather-area-compact {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

/* ===== 导航菜单安全宽度 ===== */
.main-navigation {
    box-sizing: border-box !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

.nav-menu {
    box-sizing: border-box !important;
    overflow: hidden !important;
    max-width: 100% !important;
}

.nav-menu li {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

/* ===== 页脚强制溢出控制 ===== */
.site-footer {
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.footer-content {
    box-sizing: border-box !important;
    overflow: hidden !important;
    max-width: 100% !important;
}

.footer-section {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

.footer-bottom {
    box-sizing: border-box !important;
    overflow: hidden !important;
    max-width: 100% !important;
}

/* ===== 响应式安全调整 ===== */

/* 平板设备 */
@media (max-width: 991px) {
    .container {
        padding: 0 15px !important;
    }
    
    .header-top {
        flex-wrap: wrap;
    }
    
    .header-right {
        width: 100% !important;
        justify-content: space-between;
        flex-wrap: wrap;
    }
}

/* 移动设备 */
@media (max-width: 767px) {
    .container {
        padding: 0 10px !important;
    }
    
    .logo-area a[style*="display: flex"] div[style*="width: 60px"] {
        width: 40px !important;
        height: 40px !important;
        font-size: 24px !important;
        margin-right: 10px !important;
    }
    
    .site-title h1 {
        font-size: 20px !important;
    }
    
    .site-tagline {
        font-size: 12px !important;
    }
}

/* ===== 安全工具类 ===== */
.no-overflow {
    overflow: hidden !important;
}

.max-width-100 {
    max-width: 100% !important;
}

.box-border {
    box-sizing: border-box !important;
}

/* ===== 修复WordPress核心可能的问题 ===== */
.alignfull {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
}

.wp-block-cover.alignfull {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
/* ========== 狼眼世界 · 页眉美化 ========== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #1a1a2e;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 9999;
    padding: 12px 24px;
    box-sizing: border-box;
}
.site-header a,
.site-header .site-title,
.site-header .site-description {
    color: #f0c040;
    text-decoration: none;
}
.main-navigation ul {
    display: flex;
    justify-content: center;
    gap: 28px;
    list-style: none;
    margin: 10px 0 0 0;
    padding: 0;
}
.main-navigation a {
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s;
}
.main-navigation a:hover {
    color: #f0c040;
}
body {
    padding-top: 130px;
}
