/* =========================================================
   全站头部 Header
========================================================= */
.tf-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(4, 12, 8, .90);
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    backdrop-filter: blur(18px);
}

.tf-header__inner {
    width: min(var(--tf-container), calc(100% - 32px));
    min-height: 58px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.tf-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    text-decoration: none;
}

.tf-logo__image,
.tf-logo__mark {
    width: 38px;
    height: 38px;
    max-width: 38px;
    max-height: 38px;
    border-radius: 12px;
    flex: 0 0 38px;
    overflow: hidden;
}

.tf-logo__image {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .08);
}

.tf-logo__image img,
.tf-logo img,
.tf-header img,
.site-branding img,
.custom-logo {
    width: 38px;
    height: 38px;
    max-width: 38px;
    max-height: 38px;
    object-fit: contain;
    display: block;
}

.tf-logo__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #07130e;
    background: linear-gradient(135deg, var(--tf-gold), var(--tf-green));
    font-size: 16px;
    font-weight: 920;
}

.tf-logo__text {
    display: grid;
    gap: 2px;
    line-height: 1.1;
}

.tf-logo__text strong {
    color: #fff;
    font-size: 16px;
    font-weight: 920;
    letter-spacing: -.035em;
}

.tf-logo__text small {
    color: #a9baaf;
    font-size: 11.5px;
    font-weight: 750;
}

.tf-nav {
    flex: 1;
}

.tf-nav__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 11px;
    align-items: center;
    justify-content: center;
}

.tf-nav__menu a {
    color: #e2eee6;
    font-size: 13px;
    font-weight: 750;
    transition: color .2s ease;
}

.tf-nav__menu a:hover,
.tf-nav__menu .current-menu-item > a,
.tf-nav__menu .current_page_item > a {
    color: var(--tf-gold);
}

.tf-nav__menu--empty a {
    color: var(--tf-gold) !important;
}

.tf-header-search {
    width: 205px;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    padding: 4px;
}

.tf-header-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    padding: 7px 9px;
    font-size: 12.5px;
}

.tf-header-search input::placeholder {
    color: #8da199;
}

.tf-header-search button {
    border: 0;
    border-radius: 999px;
    padding: 7px 11px;
    color: #07130e;
    background: var(--tf-gold);
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.tf-nav-toggle {
    display: none;
    margin-left: auto;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    cursor: pointer;
}

.tf-nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #fff;
}


/* Header responsive */
@media (max-width: 980px) {
    .tf-header__inner {
        flex-wrap: wrap;
        min-height: 58px;
        padding: 8px 0;
    }

    .tf-nav-toggle {
        display: block;
    }

    .tf-nav,
    .tf-header-search {
        display: none;
        width: 100%;
    }

    body.tf-mobile-nav-open .tf-nav,
    body.tf-mobile-nav-open .tf-header-search {
        display: block;
    }

    .tf-nav__menu {
        display: grid;
        justify-content: stretch;
        gap: 0;
        padding: 10px 0;
    }

    .tf-nav__menu a {
        display: block;
        padding: 12px 0;
    }
}

@media (max-width: 768px) {
    .tf-logo__image,
    .tf-logo__mark {
        width: 34px;
        height: 34px;
        max-width: 34px;
        max-height: 34px;
        flex-basis: 34px;
        border-radius: 13px;
    }

    .tf-logo__image img,
    .tf-logo img,
    .tf-header img,
    .site-branding img,
    .custom-logo {
        width: 34px;
        height: 34px;
        max-width: 34px;
        max-height: 34px;
    }

    .tf-logo__text strong { font-size: 15px; }
    .tf-logo__text small { font-size: 11px; }
}

@media (max-width: 480px) {
    .tf-header__inner {
        width: min(100%, calc(100% - 18px));
        gap: 8px;
        min-height: 52px;
        padding: 6px 0;
    }

    .tf-nav-toggle {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .tf-logo {
        gap: 8px;
        min-width: 0;
    }

    .tf-logo__text { min-width: 0; }
    .tf-logo__text small { display: none; }
}
