/**
 * Bizhome 文章详情页独立框架样式
 * 深度集成子比主题 CSS 变量，优先使用插件主题色
 * 所有样式使用 .bizhome- 前缀隔离，不影响主题原有样式
 */

/* 框架内部变量（优先插件主题色，其次子比变量，最后回退值） */
.bizhome-single-header {
    /* 插件主题色（由PHP动态输出） */
    --bh-theme-color: var(--bh-plugin-color, var(--theme-color, #7C7CBC));
    --bh-radius: var(--bh-plugin-radius, var(--main-radius, 12px));
    
    /* 继承子比主题变量 */
    --bh-focus-color: var(--focus-color, var(--bh-plugin-color, #7C7CBC));
    --bh-key-color: var(--key-color, #1e293b);
    --bh-main-color: var(--main-color, #334155);
    --bh-muted-color: var(--muted-color, #64748b);
    --bh-muted-2-color: var(--muted-2-color, #94a3b8);
    --bh-border-color: var(--main-border-color, rgba(0,0,0,0.08));
    --bh-shadow: var(--main-shadow, 0 1px 3px rgba(0,0,0,0.1));
    --bh-body-bg: var(--body-bg-color, #f7f8fa);
    
    /* 框架专用变量 */
    --bh-head-height: 4rem;
    --bh-edge-size: 2rem;
    --bh-wave-text-line: 30vmax;
    --bh-blur-bg: rgba(255, 255, 255, 0.6);
    --bh-blur-border: rgba(0, 0, 0, 0.06);
}

/* 暗色模式适配 */
[data-theme="dark"] .bizhome-single-header,
.dark-theme .bizhome-single-header,
body.dark .bizhome-single-header {
    --bh-blur-bg: rgba(0, 0, 0, 0.4);
    --bh-blur-border: rgba(255, 255, 255, 0.08);
}

/* 主容器样式 */
.bizhome-single-header.page-header.slogan-item {
    position: relative;
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 80vh;
    margin-top: -150px;
    padding: var(--bh-head-height) var(--bh-edge-size) 8rem;
    gap: 1em;
    overflow: hidden;
    background: var(--bh-blur-bg);
    box-sizing: border-box;
    border: none;
    outline: none;
}

/* 底部渐隐遮罩 */
.bizhome-single-header .bizhome-header-mask {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent 0%, var(--bh-body-bg) 100%);
    pointer-events: none;
    z-index: 3;
}

/* 下方main容器向上偏移 */
.bizhome-single-header + main.container {
    margin-top: -250px;
    position: relative;
    z-index: 4;
}

/* 背景文字层 */
.bizhome-single-header .bizhome-wave-pack {
    --mask: linear-gradient(#000 70%, #0000);
    position: absolute;
    display: flex;
    flex-flow: column;
    justify-content: flex-end;
    contain: layout;
    color: var(--bh-theme-color);
    top: var(--bh-head-height);
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.5em 0 0;
    width: 100%;
    height: 100%;
    line-height: var(--bh-wave-text-line);
    font-size: clamp(4em, 15vmax, 15vw);
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    -webkit-mask: var(--mask);
    mask: var(--mask);
    z-index: 0;
}

.bizhome-single-header .bizhome-wave-pack-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-flow: column;
    align-items: center;
    z-index: -2;
    opacity: 0.05;
    max-width: 100%;
    overflow: hidden;
    font-style: normal;
}

.bizhome-single-header .bizhome-wave-pack-form {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    z-index: 1;
}

/* 内容区域 */
.bizhome-single-header .bizhome-header-content {
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex: 1;
    color: var(--bh-theme-color);
    min-height: var(--bh-wave-text-line);
    width: 100%;
    gap: 1em;
    z-index: 2;
}

/* 文章信息区域 */
.bizhome-single-header .bizhome-post-info {
    display: flex;
    flex-flow: column;
    align-items: center;
    gap: 1.25em;
    width: 100%;
    max-width: 1000px;
    margin-bottom: 50px;
}

/* 分类和标签行 */
.bizhome-single-header .bizhome-post-taxonomy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6em;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
}

.bizhome-single-header .bizhome-taxonomy-cats a {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.4em 1em;
    color: var(--bh-theme-color);
    background: var(--bh-blur-bg);
    border: 1px solid var(--bh-blur-border);
    border-radius: var(--main-radius, 8px);
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px) saturate(1.5);
    -webkit-backdrop-filter: blur(10px) saturate(1.5);
}

.bizhome-single-header .bizhome-taxonomy-cats a:hover {
    border-color: var(--bh-theme-color);
}

.bizhome-single-header .bizhome-taxonomy-divider {
    color: var(--bh-muted-2-color);
    font-weight: 300;
}

.bizhome-single-header .bizhome-taxonomy-tags a {
    display: inline-flex;
    align-items: center;
    padding: 0.4em 0.9em;
    color: var(--bh-muted-color);
    background: var(--bh-blur-bg);
    border: 1px solid var(--bh-blur-border);
    border-radius: var(--main-radius, 8px);
    font-size: 0.9em;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px) saturate(1.5);
    -webkit-backdrop-filter: blur(10px) saturate(1.5);
}

.bizhome-single-header .bizhome-taxonomy-tags a:hover {
    color: var(--bh-theme-color);
    border-color: var(--bh-theme-color);
}

/* 文章标题 */
.bizhome-single-header .bizhome-post-title {
    font-size: 3.5em;
    font-weight: 100;
    line-height: 1.4;
    margin: 0;
    padding: 0;
    text-wrap: balance;
    word-break: break-word;
    color: var(--bh-theme-color);
}

/* 文章元信息卡片 */
.bizhome-single-header .bizhome-post-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75em;
    margin-top: 1em;
    padding: 1.25em 1.5em;
    background: var(--bh-blur-bg);
    border: 1px solid var(--bh-blur-border);
    border-radius: var(--bh-radius);
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
    box-shadow: var(--bh-shadow);
}

.bizhome-single-header .bizhome-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5em 0;
}

.bizhome-single-header .bizhome-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0 1em;
    font-size: 14px;
    color: var(--bh-main-color);
    border-right: 1px solid var(--bh-border-color);
}

.bizhome-single-header .bizhome-meta-item:last-child {
    border-right: none;
}

.bizhome-single-header .bizhome-meta-item i {
    font-size: 15px;
    color: var(--bh-theme-color);
}

.bizhome-single-header .bizhome-meta-label {
    color: var(--bh-muted-color);
    font-size: 13px;
}

.bizhome-single-header .bizhome-meta-value {
    font-weight: 500;
    color: var(--bh-key-color);
    font-size: 14px;
}

.bizhome-single-header .bizhome-meta-item a.bizhome-meta-value {
    color: var(--bh-theme-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.bizhome-single-header .bizhome-meta-item a.bizhome-meta-value:hover {
    color: var(--bh-focus-color);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .bizhome-single-header {
        --bh-edge-size: 1rem;
        --bh-wave-text-line: 20vmax;
    }
    
    .bizhome-single-header.page-header.slogan-item {
        min-height: 80vh;
        margin-top: -80px;
        padding-bottom: 6rem;
    }
    
    .bizhome-single-header .bizhome-header-mask {
        height: 150px;
    }
    
    .bizhome-single-header .bizhome-post-taxonomy {
        font-size: 0.75em;
        gap: 0.4em;
    }
    
    .bizhome-single-header .bizhome-taxonomy-cats a,
    .bizhome-single-header .bizhome-taxonomy-tags a {
        padding: 0.35em 0.75em;
    }
    
    .bizhome-single-header .bizhome-post-title {
        font-size: 1.8em;
    }
    
    .bizhome-single-header .bizhome-post-meta {
        padding: 0.875em;
        gap: 0.5em;
        margin-top: 0.75em;
    }
    
    .bizhome-single-header .bizhome-meta-row {
        gap: 0.5em 0;
        flex-wrap: wrap;
    }
    
    .bizhome-single-header .bizhome-meta-item {
        padding: 0.25em 0.5em;
        font-size: 12px;
        border-right: none;
    }
    
    .bizhome-single-header .bizhome-meta-item i {
        font-size: 12px;
    }
    
    .bizhome-single-header .bizhome-meta-label {
        display: none;
    }
    
    .bizhome-single-header .bizhome-meta-value {
        font-size: 12px;
    }
}

/* 基础样式重置 */
.bizhome-single-header * {
    box-sizing: border-box;
}

.bizhome-single-header a {
    text-decoration: none;
}
