/* ============================================
   global.css - 全站通用样式
   包含：CSS变量、重置、头部、导航、搜索、页脚、全局容器
   电脑端最大宽度1100px，手机端全宽，无横向滚动
   ============================================ */

/* ---------- CSS 变量 ---------- */
:root {
    --felt-1: #0b3118;
    --felt-2: #0f3e22;
    --felt-3: #072216;
    --gold: #eacb57;
    --gold-2: #ffef9a;
    --deep-gold: #b08b14;
    --paper: #fff;
    --ink: #161616;
    --ring: #1a4d31;
    --shadow: 0 8px 26px rgba(0, 0, 0, .14);
    --radius: 14px;
    --blue: #2c6cc2;
}

/* ---------- 重置与基础 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
    background: #f6f8f4;
    color: var(--ink);
    width: 100%;
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

/* 全局容器 - 电脑端最大宽度1100px，手机端全宽 */
.wrap {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 手机端：移除左右内边距，但保留安全间距（避免内容贴边） */
@media (max-width: 767px) {
    .wrap {
        padding: 0 10px;
    }
}

/* 禁止横向滚动 - 全局保险 */
html,
body {
    overflow-x: hidden;
}

img,
video,
iframe,
figure,
picture {
    max-width: 100%;
    height: auto;
}

/* 确保所有容器不溢出 */
* {
    max-width: 100%;
}

/* ---------- 无障碍 ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 10px;
    background: #fff;
    color: #111;
    padding: 10px 12px;
    border-radius: 10px;
    border: 2px solid var(--gold);
    z-index: 9999;
}

.skip-link:focus {
    left: 10px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* ---------- 头部区域 (最新优化版) ---------- */
.bj-header {
    background: var(--felt-1);
    color: #fff;
    border-bottom: 3px solid var(--gold);
}

.bj-header .top {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}

/* 品牌区：改为横向排版 */
.bj-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    text-align: left;
}

.bj-brand img {
    flex-shrink: 0;
    border: 2px solid rgba(234, 203, 87, .3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
}

/* 文本容器 */
.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bj-brand .title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: .6px;
    color: #fffde8;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .45);
    line-height: 1.3;
}

.bj-brand .desc {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, .65);
    font-size: .95rem;
    line-height: 1.5;
    font-weight: 400;
    max-width: 800px;
}

/* 手机端头部优化 */
@media (max-width: 800px) {
    .bj-header .top {
        padding: 16px 0;
    }
    .bj-brand {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .bj-brand .title {
        font-size: 1.3rem;
    }
    .bj-brand .desc {
        display: none; /* 隐藏超长副标题 */
    }
}

/* ---------- 导航栏 ---------- */
.bj-nav {
    background: #0f0f0f;
}

.bj-nav .wrap {
    padding: 0;
}

.bj-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
}

.bj-menu li {
    list-style: none;
    position: relative;
}

.bj-menu a {
    display: inline-block;
    color: var(--gold);
    font-weight: 800;
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 9px;
    border: 1px solid rgba(234, 203, 87, .26);
    transition: all 0.2s ease;
}

.bj-menu a:hover {
    background: var(--gold);
    color: #111;
}

/* 回退菜单（如果没有注册菜单） */
.bj-pages {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.bj-pages a {
    display: inline-block;
    color: var(--gold);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(234, 203, 87, .26);
    text-decoration: none;
    transition: all 0.2s ease;
}

.bj-pages a:hover {
    background: var(--gold);
    color: #111;
}

/* 子菜单（如果有） */
.bj-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a1a;
    min-width: 180px;
    padding: 8px 0;
    border-radius: 9px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.bj-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
}

.bj-menu .sub-menu a {
    display: block;
    padding: 8px 16px;
    border: none;
    border-radius: 0;
}

/* 手机端菜单优化 */
@media (max-width: 767px) {
    .bj-menu {
        gap: 0;
    }
    
    .bj-menu a,
    .bj-pages a {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .bj-menu .sub-menu {
        position: static;
        background: rgba(0, 0, 0, 0.3);
        padding-left: 20px;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        width: 100%;
    }
    
    .bj-menu .sub-menu a {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* ---------- 搜索框（终极暴力居中版 + 背景融合修复） ---------- */
.bj-search {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    padding: 15px 0 24px;
    clear: both !important;
    background: #0f0f0f; /* 修复点：添加黑色背景，与导航栏融为一体 */
}

.bj-search form {
    display: flex !important;
    width: 90% !important;
    max-width: 520px !important;
    margin: 0 auto !important; 
    border: 2px solid var(--gold);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.bj-search form:focus-within {
    transform: translateY(-1px);
    border-color: var(--gold-2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.bj-search input {
    flex: 1 !important;
    border: 0 !important;
    outline: 0 !important;
    padding: 12px 16px !important;
    font-size: 15px;
    min-width: 0;
    color: var(--ink);
}

.bj-search button {
    border: 0 !important;
    background: var(--gold) !important;
    color: #111 !important;
    font-weight: 900;
    padding: 0 20px !important;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.bj-search button:hover {
    background: var(--gold-2) !important;
}

@media (max-width: 767px) {
    .bj-search {
        padding: 12px 0 20px !important;
    }
    .bj-search form {
        width: calc(100% - 32px) !important;
        max-width: none !important;
        margin: 0 auto !important;
    }
    .bj-search button span {
        display: none !important; 
    }
    .bj-search button {
        padding: 0 15px !important;
    }
    .bj-search input {
        padding: 10px 12px !important;
        font-size: 14px;
    }
}

/* ---------- 页脚区域 ---------- */
.bj-foot {
    margin-top: 24px;
    background: #12140f;
    color: #f2eac2;
    border-top: 3px solid var(--gold);
}

.bj-foot .wrap {
    padding: 24px 16px 10px;
}

.bj-foot .grid {
    display: grid;
    grid-template-columns: 2fr 1.4fr 1.3fr;
    gap: 18px;
}

.bj-foot h4 {
    margin: 0 0 10px;
    font-size: 1.06rem;
    font-weight: 900;
    color: #fff8d6;
    position: relative;
}

.bj-foot h4:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 66px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 2px;
}

.bj-foot a {
    color: #ffeb9a;
    text-decoration: underline;
    transition: color 0.2s;
}

.bj-foot a:hover {
    color: #fff;
}

.partners {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.partners img {
    width: 110px;
    height: 50px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: transform 0.2s;
}

.partners img:hover {
    transform: scale(1.05);
}

.certs {
    display: grid;
    gap: 8px;
    list-style: none;
    padding: 0;
}

.certs li {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.certs .badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #20361f, #101d10);
    border: 1px solid #294f2a;
    color: #ffd;
}

.about {
    color: #f6f0d2;
    line-height: 1.7;
    font-size: .98rem;
}

.bj-foot .bar {
    margin-top: 16px;
    padding: 10px 0 16px;
    text-align: center;
    font-size: .94rem;
    color: #e8ddb6;
    border-top: 1px dashed rgba(255, 255, 255, .12);
}

.bj-foot .bar a {
    color: #ffeb9a;
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .bj-foot .grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .bj-foot h4:after {
        width: 50px;
    }
}

@media (max-width: 767px) {
    .bj-foot .wrap {
        padding: 20px 12px 10px;
    }
    
    .bj-foot h4 {
        text-align: center;
    }
    
    .bj-foot h4:after {
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
    }
    
    .partners {
        justify-content: center;
    }
    
    .certs li {
        justify-content: center;
    }
    
    .about {
        text-align: center;
    }
}

/* ---------- 通用区块样式（首页可能用到，但全局可用） ---------- */
.sec-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(180deg, #173b22, #0f2e1b);
    color: #fffbe6;
    border: 1.5px solid rgba(234, 203, 87, .55);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .08);
    margin: 18px 0 10px;
}

.sec-bar .ico {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #254e33, #193624);
    border: 1px solid #2f6040;
    color: #ffef9a;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
    flex: 0 0 auto;
}

.sec-bar h2 {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 900;
    letter-spacing: .6px;
    color: #fffbe6;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}

.sec-sub,
.intro {
    margin: 8px 2px 12px;
    color: #222;
    background: transparent;
    font-weight: 700;
    line-height: 1.6;
}

.sec-sub a,
.intro a {
    color: var(--blue);
    text-decoration: underline;
}

/* ---------- 表格横向滚动（全局） ---------- */
.tzp-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1em 0;
}

.tzp-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 14px;
}

.tzp-table th,
.tzp-table td {
    word-break: break-word;
    white-space: normal;
    padding: 0.6em 0.7em;
    vertical-align: top;
    border: 1px solid #ddd;
}

@media (max-width: 640px) {
    .tzp-table th,
    .tzp-table td {
        padding: 0.5em 0.55em;
        font-size: 0.9em;
    }
}

/* 响应式媒体容器 */
.tzp-embed-responsive {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 56.25%;
    overflow: hidden;
}

.tzp-embed-responsive .tzp-embed-item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}