/* ============================================================
   blog.css — 博客详情页专属样式
   ============================================================ */

/* ---- section-1 文章头部 ---- */
.section-1 {
    min-height: 55vh;
    display: flex;
    align-items: center;
    padding: 5rem 0 3rem;
}

/* 面包屑 */
.breadcrumb {
    margin-bottom: 2rem;
}

.breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #999;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--moki-accent);
}

.breadcrumb .iconfont {
    font-size: 0.85rem;
}

/* 文章头部信息 */
.article-header {
    max-width: 900px;
}

.article-header .category-tag {
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    padding: 0.25rem 0.9rem;
}

.article-title {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    color: #fff;
    line-height: 1.45;
    margin-bottom: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #888;
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.meta-item .iconfont {
    font-size: 0.95rem;
}

/* ---- section-2 文章正文 ---- */
.section-2 {
    padding: 1rem 0 3rem;
}

.article-body {
    max-width: 900px;
    margin: 0 auto;
    color: #ccc;
    line-height: 1.9;
    font-size: 0.95rem;
}

/* 导语 */
.article-lead {
    font-size: 1.1rem;
    color: #ddd;
    line-height: 1.9;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    border-left: 3px solid var(--moki-blue);
    background: rgba(123, 187, 189, 0.06);
    border-radius: 0 0.5rem 0.5rem 0;
}

/* 标题层级 */
.article-body h2 {
    font-size: 1.4rem;
    color: #fff;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.article-body h3 {
    font-size: 1.15rem;
    color: #fff;
    margin: 1.8rem 0 0.8rem;
    font-weight: 500;
}

.article-body p {
    margin-bottom: 1.2rem;
}

/* 段落内行内强调 */
.article-body strong {
    color: var(--moki-accent);
    font-weight: 500;
}

/* 文章底部标签与分享 */
.article-footer {
    max-width: 900px;
    margin: 3rem auto 0;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag {
    display: inline-block;
    font-size: 0.8rem;
    color: #999;
    padding: 0.2rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
}

.tag:hover {
    color: var(--moki-accent);
    border-color: var(--moki-accent);
    background-color: rgba(115, 223, 221, 0.06);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.share-label {
    font-size: 0.85rem;
    color: #888;
}

.share-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #999;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

.share-icon:hover {
    border-color: var(--moki-accent);
    color: var(--moki-accent);
    background-color: rgba(115, 223, 221, 0.08);
}

/* 上一篇 / 下一篇 */
.article-nav {
    max-width: 900px;
    margin: 1rem auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.article-nav a {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.article-nav a:hover {
    border-color: var(--moki-blue);
    background-color: rgba(123, 187, 189, 0.05);
}

.nav-hint {
    font-size: 0.8rem;
    color: #777;
}

.nav-title {
    font-size: 0.95rem;
    color: #ddd;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-next {
    text-align: right;
}

/* ---- section-3 相关推荐 ---- */
.section-3 {
    padding: 2rem 0 4rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    max-width: 1200px;
    margin: 2.5rem auto 0;
}

.related-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.related-card:hover {
    border-color: var(--moki-blue);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(123, 187, 189, 0.12);
}

.related-card .card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.related-card .card-img .img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.12);
    transition: transform 0.4s ease;
}

.related-card:hover .card-img .img-placeholder {
    transform: scale(1.05);
}

.related-card .card-body {
    padding: 1.5rem;
}

.related-card .category-tag {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--moki-accent);
    border: 1px solid rgba(115, 223, 221, 0.3);
    border-radius: 1rem;
    padding: 0.15rem 0.7rem;
    margin-bottom: 0.75rem;
}

.related-card .card-title {
    font-size: 1rem;
    color: #fff;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card .card-excerpt {
    font-size: 0.85rem;
    color: #999;
    line-height: 1.7;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #777;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 1rem;
}

.related-card .card-meta .meta-read {
    color: var(--moki-accent);
    display: flex;
    align-items: center;
    gap: 0.2rem;
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.related-card:hover .card-meta .meta-read {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================================
   响应式断点
   ============================================================ */

/* 平板横屏 / 小桌面 */
@media screen and (max-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-body {
        max-width: 100%;
    }

    .article-nav {
        grid-template-columns: 1fr;
    }

    .nav-next {
        text-align: left;
    }
}

/* 平板竖屏 / 大屏手机 */
@media screen and (max-width: 768px) {
    .section-1 {
        min-height: 40vh;
        padding: 3rem 0 2rem;
    }

    .article-title {
        font-size: 1.3rem;
    }

    .article-meta {
        gap: 1rem;
        font-size: 0.85rem;
    }

    .article-body {
        font-size: 0.9rem;
    }

    .article-body h2 {
        font-size: 1.2rem;
    }

    .article-lead {
        font-size: 1rem;
        padding: 1.25rem;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .related-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .related-card .card-img {
        height: 160px;
    }
}

/* 手机横屏 / 中屏手机 */
@media screen and (max-width: 640px) {
    .section-1 {
        min-height: 35vh;
        padding: 2.5rem 0 1.5rem;
    }

    .article-title {
        font-size: 1.15rem;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .article-body h2 {
        font-size: 1.1rem;
        margin: 2rem 0 0.8rem;
    }

    .article-nav a {
        padding: 1rem 1.25rem;
    }

    .related-card .card-body {
        padding: 1.25rem;
    }
}

/* 小屏手机 */
@media screen and (max-width: 440px) {
    .section-1 {
        min-height: 30vh;
        padding: 2rem 0 1rem;
    }

    .article-title {
        font-size: 1.05rem;
    }

    .article-lead {
        font-size: 0.9rem;
        padding: 1rem;
    }

    .article-body {
        font-size: 0.85rem;
    }

    .share-label {
        display: none;
    }
}