/* ============================================================
   文章详情页 Hero 横幅美化
   全宽封面横幅 + 分类标签 + 标题 + 元数据 + 底部波浪过渡
   ============================================================ */

:root {
    --zm-ah-bg: #690fa5;
    --zm-ah-text: #fff;
}

/* ── 横幅容器（全屏宽，插入在 <main> 之前） ── */
.zm-article-hero {
    position: relative;
    width: 100%;
    min-height: 320px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--zm-ah-text);
    background: var(--zm-ah-bg);
    padding: 80px 30px 60px;
}

/* ── 背景图层 ── */
.zm-ah-bg-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.zm-ah-bg-wrap .zm-ah-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* 半透明遮罩 */
.zm-ah-bg-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

/* ── 内容层 ── */
.zm-ah-content {
    position: relative;
    z-index: 2;
    max-width: 860px;
    width: 100%;
}

/* ── 分类 + 标签行 ── */
.zm-ah-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.zm-ah-tags .zm-ah-hot {
    display: inline-block;
    padding: 2px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #ff6b6b;
    border-radius: 4px;
}
.zm-ah-tags .zm-ah-cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 12px;
    font-size: 12px;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 4px;
    text-decoration: none !important;
    transition: background 0.3s;
}
.zm-ah-tags .zm-ah-cat:hover {
    background: rgba(255,255,255,0.28);
    color: #fff !important;
}
.zm-ah-tags .zm-ah-tag {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

/* ── 标题 ── */
.zm-ah-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.5;
    color: #fff;
    margin: 0 0 24px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    word-break: break-word;
}
.zm-ah-title a {
    color: #fff !important;
    text-decoration: none !important;
}

/* ── 元数据行 ── */
.zm-ah-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 4px;
}
.zm-ah-meta:last-child {
    margin-bottom: 0;
}
.zm-ah-meta a {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none !important;
}
.zm-ah-meta a:hover {
    color: #fff !important;
}
.zm-ah-meta .fa,
.zm-ah-meta .iconfont {
    margin-right: 3px;
    opacity: 0.8;
}
/* 分隔符 */
.zm-ah-sep {
    display: inline-block;
    width: 4px;
    height: 4px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    margin: 0 10px;
    vertical-align: middle;
}

/* ── 底部波浪 SVG ── */
.zm-ah-waves {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: 42px;
    z-index: 3;
    pointer-events: none;
    line-height: 0;
}
.zm-ah-waves svg {
    width: 100%;
    height: 100%;
}
.zm-ah-waves .zm-ah-parallax > use {
    animation: zmAhWave 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
    fill: var(--body-bg-color, #f5f7fa);
}
.zm-ah-waves .zm-ah-parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; opacity: 0.5; }
.zm-ah-waves .zm-ah-parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; opacity: 0.6; }
.zm-ah-waves .zm-ah-parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; opacity: 0.7; }
.zm-ah-waves .zm-ah-parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; opacity: 1; }

@keyframes zmAhWave {
    0%   { transform: translate3d(-90px, 0, 0); }
    100% { transform: translate3d(85px, 0, 0); }
}

/* ── 入场动画 ── */
.zm-ah-fade-up {
    animation: zmAhFadeUp 0.6s ease-out both;
}
.zm-ah-fade-up:nth-child(2) { animation-delay: 0.12s; }
.zm-ah-fade-up:nth-child(3) { animation-delay: 0.24s; }
.zm-ah-fade-up:nth-child(4) { animation-delay: 0.36s; }
.zm-ah-fade-up:nth-child(5) { animation-delay: 0.48s; }

@keyframes zmAhFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── 隐藏原始 article-header 中已迁移的内容 ── */
.zm-ah-active .article-header .article-title {
    display: none !important;
}
.zm-ah-active .article-header .single-metabox .post-metas {
    display: none !important;
}
.zm-ah-active .article-header .line-form-line {
    display: none !important;
}
.zm-ah-active .article-header {
    margin-top: 5px;
}
/* 面包屑隐藏 */
.content-layout > .breadcrumb {
    display: none !important;
}

/* ============================================================
   暗色模式
   ============================================================ */
body.dark-theme .zm-article-hero {
    --zm-ah-bg: #1a0a30;
}
body.dark-theme .zm-ah-bg-wrap::after {
    background: rgba(0, 0, 0, 0.55);
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 991px) {
    .zm-article-hero {
        min-height: 260px;
        padding: 65px 20px 50px;
    }
    .zm-ah-title {
        font-size: 22px;
    }
    .zm-ah-meta {
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .zm-article-hero {
        min-height: 220px;
        padding: 55px 15px 45px;
    }
    .zm-ah-title {
        font-size: 18px;
        margin-bottom: 16px;
    }
    .zm-ah-tags {
        gap: 6px;
        margin-bottom: 14px;
    }
    .zm-ah-meta {
        font-size: 11px;
    }
    .zm-ah-sep {
        margin: 0 6px;
    }
    .zm-ah-waves {
        height: 28px;
    }
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    .zm-ah-fade-up,
    .zm-ah-waves .zm-ah-parallax > use {
        animation: none !important;
    }
}
