/**
 * 主题3 站点 Logo 尺寸（导航 / 页脚）
 * 按容器 class 限高，扁平 hash 路径同样生效；与主题3 header 行高一致。
 */
:root {
    --theme3-nav-logo-max-h: 40px;
    --theme3-nav-logo-max-w: min(160px, 32vw);
    --theme3-footer-logo-max-h: 45px;
    --theme3-footer-logo-max-w: min(180px, 30vw);
}

@media (max-width: 991.98px) {
    :root {
        --theme3-nav-logo-max-h: 32px;
        --theme3-nav-logo-max-w: min(140px, 42vw);
        --theme3-footer-logo-max-h: 38px;
        --theme3-footer-logo-max-w: min(160px, 38vw);
    }
}

/* 桌面 header：main / sticky 双 logo */
.header-logo .main-logo img,
.header-logo .stiky-logo img,
.sticky-nav .header-logo .main-logo img,
.sticky-nav .header-logo .stiky-logo img,
#sticky-header .header-logo img {
    max-height: var(--theme3-nav-logo-max-h) !important;
    height: auto !important;
    min-height: 0 !important;
    width: auto !important;
    max-width: var(--theme3-nav-logo-max-w) !important;
    object-fit: contain !important;
    object-position: left center;
    vertical-align: middle;
}

.header-logo,
.header-logo a.main-logo,
.header-logo a.stiky-logo {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    max-height: calc(var(--theme3-nav-logo-max-h) + 8px);
}

/* 移动顶栏 */
.itsoft-mheader__logo img {
    max-height: var(--theme3-nav-logo-max-h) !important;
    height: auto !important;
    min-height: 0 !important;
    width: auto !important;
    max-width: var(--theme3-nav-logo-max-w) !important;
    object-fit: contain !important;
    object-position: left center;
    display: block;
}

.itsoft-mheader__logo {
    max-height: calc(var(--theme3-nav-logo-max-h) + 8px);
}

/* 页脚 */
.footer-logo img {
    max-height: var(--theme3-footer-logo-max-h) !important;
    height: auto !important;
    min-height: 0 !important;
    width: auto !important;
    max-width: var(--theme3-footer-logo-max-w) !important;
    object-fit: contain !important;
    object-position: left center;
}

/* 旧路径建站兼容 */
header img[src*="logo/img"],
header img[data-src*="logo/img"],
header img[src*="resource/logo"],
header img[data-src*="resource/logo"] {
    max-height: var(--theme3-nav-logo-max-h) !important;
    max-width: var(--theme3-nav-logo-max-w) !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Logo 透明底：懒加载不占位底色；白底 PNG 与导航/页脚底色融合 */
.header-logo img.lozad[data-src],
.footer-logo img.lozad[data-src],
.itsoft-mheader__logo img.lozad[data-src],
.header-logo,
.header-logo a.main-logo,
.header-logo a.stiky-logo,
.itsoft-mheader__logo {
    background: transparent !important;
}

.header-logo .main-logo img,
.header-logo .stiky-logo img,
.itsoft-mheader__logo img,
.footer-logo img {
    background-color: transparent !important;
    mix-blend-mode: multiply;
}

/* 白底 PNG 上 invert 会把整图洗成白带，改由 multiply 与 sticky 粉/深蓝导航融合 */
.sticky-nav a.stiky-logo img {
    filter: none !important;
}
