/* ==========================================
   强制中和 style.css 的干扰
   ========================================== */
header.tf-h-root {
    display: block !important; /* 覆盖旧样式的 flex */
    padding: 0 !important;     /* 覆盖旧样式的 padding */
    border: none;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    height: 60px;
    width: 100%;
}

/* ==========================================
   核心全宽布局
   ========================================== */
.tf-h-container {
    height: 100%;
    width: 100%;           /* 确保撑满整个页面宽度 */
    padding: 0 20px;       /* 只留出极小的边缘呼吸空间 */
    display: flex;
    align-items: center;
    justify-content: space-between; /* 强制两端分布 */
    box-sizing: border-box;
}

.tf-h-checkbox {
    display: none;
}

/* --- 左侧容器 (Logo + PC菜单) --- */
.tf-h-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.tf-h-logo {
    font-weight: 800;
    color: #007aff;
    text-decoration: none;
    font-size: 1.2rem;
    white-space: nowrap;
}

/* --- PC端功能菜单 (紧跟Logo) --- */
.tf-h-nav {
    display: flex;
    gap: 10px;
    margin-left: 40px;
    will-change: max-height, opacity, transform;
    contain: layout style;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.tf-h-link {
    text-decoration: none;
    color: #64748b;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
    will-change: color, background-color;
    backface-visibility: hidden;
}

.tf-h-link {
    text-decoration: none;
    color: #64748b;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: 0.2s;
    white-space: nowrap;
}

.tf-h-link.active { color: #000; font-weight: 600; }
.tf-h-link:hover { background: #f1f5f9; }

/* --- 右侧容器 (汉堡 + 语言栏) --- */
.tf-h-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.tf-h-lang {
    padding: 5px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
    cursor: pointer;
}

/* --- 汉堡按钮 (默认隐藏) --- */
.tf-h-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.tf-h-bar {
    width: 24px;
    height: 2px;
    background: #334155;
    border-radius: 1px;
}

/* ==========================================
   响应式转换 (900px 断点)
   ========================================== */

@media (max-width: 900px) {
    .tf-h-hamburger {
        display: flex;
        will-change: transform;
        transform: translateZ(0);
    }

    .tf-h-nav {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        gap: 0;
        margin-left: 0;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 10px 15px -5px rgba(0,0,0,0.1);
        z-index: 10001;
        
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: max-height;
        contain: layout style;
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    .tf-h-link {
        padding: 18px 25px;
        border-bottom: 1px solid #f1f5f9;
        width: 100%;
        border-radius: 0;
        will-change: background-color, color;
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    .tf-h-checkbox:checked ~ .tf-h-left .tf-h-nav {
        max-height: 250px;
    }

    .tf-h-bar {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
        will-change: transform, opacity;
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    .tf-h-checkbox:checked ~ .tf-h-right .tf-h-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .tf-h-checkbox:checked ~ .tf-h-right .tf-h-bar:nth-child(2) { opacity: 0; }
    .tf-h-checkbox:checked ~ .tf-h-right .tf-h-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}




