/* 博客频道（PC / H5）样式，对应「推吧客文章.pen」画布设计 */
:root {
    --blog-blue: #007EFF;
    --blog-text: #1A1A1A;
    --blog-text-2: #5F5F5F;
    --blog-text-3: #9B9B9B;
    --blog-body: #3A3A3A;
    --blog-line: #ECECEC;
    --blog-soft: #F5F5F3;
    --blog-thumb: #F0F0EE;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: #FFFFFF;
    color: var(--blog-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

/* ---------------- 导航 ---------------- */
.blog-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--blog-line);
    background: #FFFFFF;
    /* 导航固定在页面顶部（PC 与 H5 通用），滚动时始终悬浮 */
    position: sticky;
    top: 0;
    z-index: 100;
}

.blog-pc-nav {
    height: 68px;
    padding: 0 40px;
}

.blog-h5-nav {
    height: 56px;
    padding: 0 16px;
}

.blog-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.blog-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--blog-thumb);
    flex-shrink: 0;
}

.blog-logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.blog-logo-text .brand {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--blog-text);
    white-space: nowrap;
}

.blog-logo-text .slogan {
    font-size: 11px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--blog-text-3);
    white-space: nowrap;
}

.blog-app-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blog-blue);
    color: #FFFFFF;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
}

.blog-pc-nav .blog-app-btn {
    padding: 9px 18px;
    font-size: 14px;
}

.blog-h5-nav .blog-app-btn {
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 500;
}

/* ---------------- PC 列表 ---------------- */
.blog-pc-wrap {
    display: flex;
    justify-content: center;
}

.blog-pc-main {
    width: 1120px;
    max-width: calc(100% - 80px);
    padding: 56px 0 96px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.blog-featured {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 8px;
}

.blog-eyebrow {
    font-size: 13px;
    font-weight: 600;
    color: var(--blog-blue);
}

.blog-featured-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 47px;
    color: var(--blog-text);
}

.blog-featured-excerpt {
    font-size: 16px;
    font-weight: 400;
    line-height: 27px;
    color: var(--blog-text-2);
}

.blog-featured-meta {
    font-size: 13px;
    font-weight: 400;
    color: var(--blog-text-3);
}

.blog-divider {
    width: 100%;
    height: 1px;
    background: var(--blog-line);
}

.blog-section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--blog-text);
}

.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.blog-grid-row {
    display: flex;
    gap: 24px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 0;
    max-width: calc((100% - 48px) / 3);
    min-width: 0;
}

.blog-card-thumb {
    width: 100%;
    height: 168px;
    border-radius: 12px;
    background: var(--blog-thumb);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-cat {
    font-size: 12px;
    font-weight: 600;
    color: var(--blog-blue);
}

.blog-card-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    color: var(--blog-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 56px;
}

.blog-card-meta {
    font-size: 13px;
    font-weight: 400;
    color: var(--blog-text-3);
}

/* ---------------- H5 列表 ---------------- */
.blog-h5-main {
    padding: 20px 16px 64px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.blog-h5-featured {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: var(--blog-soft);
    border-radius: 10px;
}

.blog-h5-featured .blog-featured-title {
    font-size: 24px;
    line-height: 31px;
}

.blog-h5-featured .blog-featured-excerpt {
    font-size: 14px;
    line-height: 22px;
}

.blog-h5-featured .blog-featured-meta {
    font-size: 12px;
}

.blog-h5-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--blog-text);
}

.blog-h5-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.blog-h5-item {
    display: flex;
    flex-direction: column;
}

.blog-h5-thumb {
    width: 100%;
    height: 180px;
    border-radius: 10px 10px 0 0;
    background: var(--blog-thumb);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-h5-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-h5-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px 14px;
    background: var(--blog-soft);
    border-radius: 0 0 10px 10px;
}

.blog-h5-cat {
    font-size: 12px;
    font-weight: 600;
    color: var(--blog-blue);
}

.blog-h5-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 24px;
    color: var(--blog-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-h5-time {
    font-size: 12px;
    font-weight: 400;
    color: var(--blog-text-3);
}

/* ---------------- PC 标签文章列表 ---------------- */
.blog-pc-tag-main {
    width: 1080px;
}

.blog-tag-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: var(--blog-soft);
    border-radius: 10px;
}

.blog-tag-title {
    display: flex;
    align-items: center;
    font-size: 40px;
    font-weight: 700;
}

.blog-tag-title .hash {
    color: var(--blog-blue);
}

.blog-tag-summary {
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    color: var(--blog-text-2);
}

.blog-tag-list {
    display: flex;
    flex-direction: column;
}

.blog-tag-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0;
    border-bottom: 1px solid var(--blog-line);
}

.blog-tag-row-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.blog-tag-row-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    color: var(--blog-text);
}

.blog-tag-row-excerpt {
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    color: var(--blog-text-2);
}

.blog-tag-row-time {
    font-size: 13px;
    font-weight: 400;
    color: var(--blog-text-3);
}

.blog-tag-thumb {
    width: 180px;
    height: 120px;
    border-radius: 8px;
    background: var(--blog-thumb);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-tag-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------------- H5 标签文章列表 ---------------- */
.blog-h5-tag-main {
    padding: 20px 16px 64px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.blog-h5-tag-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--blog-soft);
    border-radius: 10px;
}

.blog-h5-tag-header .blog-tag-title {
    font-size: 28px;
}

.blog-h5-tag-header .blog-tag-summary {
    font-size: 14px;
    line-height: 22px;
}

.blog-h5-tag-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 0;
    border-bottom: 1px solid var(--blog-line);
}

.blog-h5-tag-row .blog-tag-row-title {
    font-size: 17px;
    line-height: 24px;
}

.blog-h5-tag-row .blog-tag-row-excerpt {
    font-size: 14px;
    line-height: 22px;
}

.blog-h5-tag-row .blog-tag-thumb {
    width: 100%;
    height: 180px;
    border-radius: 8px;
}

.blog-h5-tag-row .blog-tag-row-time {
    font-size: 12px;
}

/* ---------------- PC 文章详情 ---------------- */
.blog-pc-article {
    width: 720px;
    max-width: calc(100% - 80px);
    padding: 48px 0 96px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.blog-article-title {
    font-size: 40px;
    font-weight: 700;
    line-height: 54px;
    color: var(--blog-text);
}

.blog-article-meta {
    font-size: 14px;
    font-weight: 400;
    color: var(--blog-text-3);
}

.blog-article-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-size: 16px;
    font-weight: 400;
    line-height: 29px;
    color: var(--blog-body);
}

.blog-article-body p,
.blog-article-body ul,
.blog-article-body ol,
.blog-article-body blockquote,
.blog-article-body pre,
.blog-article-body table {
    margin: 0;
}

.blog-article-body h1,
.blog-article-body h2,
.blog-article-body h3,
.blog-article-body h4,
.blog-article-body h5,
.blog-article-body h6 {
    margin: 0;
    color: var(--blog-text);
    font-weight: 700;
}

.blog-article-body h1 {
    font-size: 30px;
    line-height: 41px;
}

.blog-article-body h2 {
    font-size: 24px;
    line-height: 34px;
}

.blog-article-body h3 {
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
}

.blog-article-body h4 {
    font-size: 18px;
    line-height: 26px;
    font-weight: 600;
}

.blog-article-body h5,
.blog-article-body h6 {
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
}

.blog-article-body ul,
.blog-article-body ol {
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-article-body blockquote {
    padding: 4px 0 4px 24px;
    border-left: 4px solid var(--blog-blue);
    font-size: 18px;
    line-height: 31px;
    color: var(--blog-text-2);
}

/* 正文图片默认居中（同步自 SKB 的内容不带对齐信息，SKB 侧默认即居中） */
.blog-article-body img {
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    cursor: zoom-in;
}

.blog-article-body a {
    color: var(--blog-blue);
}

.blog-article-body pre {
    padding: 16px;
    background: #0D1117;
    color: #D4E3FF;
    border-radius: 8px;
    overflow: auto;
    font-size: 14px;
    line-height: 1.6;
}

.blog-article-body code {
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.92em;
}

.blog-article-body :not(pre) > code {
    padding: 2px 6px;
    background: var(--blog-thumb);
    border-radius: 4px;
}

.blog-article-body hr {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--blog-line);
    margin: 0;
}

.blog-article-body table {
    width: 100%;
    border-collapse: collapse;
}

.blog-article-body th,
.blog-article-body td {
    padding: 8px 12px;
    border: 1px solid var(--blog-line);
    font-size: 14px;
    line-height: 22px;
    text-align: left;
}

.blog-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.blog-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--blog-thumb);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    color: var(--blog-text-2);
}

.blog-related-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--blog-text);
}

.blog-related-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
    border-bottom: 1px solid var(--blog-line);
}

.blog-related-row .title {
    font-size: 15px;
    font-weight: 400;
    color: var(--blog-text);
    min-width: 0;
}

.blog-related-row .time {
    font-size: 13px;
    font-weight: 400;
    color: var(--blog-text-3);
    white-space: nowrap;
}

/* ---------------- H5 文章详情 ---------------- */
.blog-h5-article {
    padding: 24px 16px 64px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.blog-h5-article .blog-article-title {
    font-size: 27px;
    line-height: 35px;
}

.blog-h5-article .blog-article-meta {
    font-size: 12px;
}

.blog-h5-article .blog-article-body {
    gap: 16px;
    font-size: 15px;
    line-height: 26px;
}

.blog-h5-article .blog-article-body h1 {
    font-size: 22px;
    line-height: 30px;
}

.blog-h5-article .blog-article-body h2 {
    font-size: 19px;
    line-height: 26px;
}

.blog-h5-article .blog-article-body h3 {
    font-size: 16px;
    line-height: 22px;
}

.blog-h5-article .blog-article-body h4 {
    font-size: 15px;
    line-height: 22px;
}

.blog-h5-article .blog-article-body blockquote {
    padding: 4px 0 4px 18px;
    font-size: 16px;
    line-height: 27px;
}

.blog-h5-article .blog-article-body img {
    border-radius: 10px;
}

.blog-h5-article .blog-article-body ul,
.blog-h5-article .blog-article-body ol {
    gap: 10px;
}

.blog-h5-article .blog-chip {
    font-size: 12px;
}

.blog-h5-article .blog-related-title {
    font-size: 17px;
}

.blog-h5-article .blog-related-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 0;
}

.blog-h5-article .blog-related-row .title {
    font-size: 15px;
    line-height: 21px;
}

.blog-h5-article .blog-related-row .time {
    font-size: 12px;
}

/* ---------------- 通用空状态 ---------------- */
.blog-empty {
    padding: 80px 0;
    text-align: center;
    font-size: 15px;
    color: var(--blog-text-3);
}

.blog-thumb-ico {
    color: #BDBDBD;
}

/* ---------------- 文章卡片：样式1 图文卡片 / 样式2 链接卡片（详情页展示） ----------------
   数据契约：名称、logo、描述、跳转地址写在 data-* 上；本段只是推吧客默认样式，其他站点可自行替换 */
.blog-article-body .promo-card {
    display: block;
    margin: 24px 0;
    padding: 20px;
    background: var(--blog-soft);
    border: 1px solid var(--blog-line);
    border-radius: 12px;
    transition: background 0.2s ease;
}

/* 卡片内层链接：承载跳转，整块可点击（logo 与文字块垂直居中） */
.blog-article-body .promo-card__link {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.blog-article-body .promo-card:hover {
    background: #F0F0EE;
}

.blog-article-body .promo-card__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--blog-thumb);
    border-radius: 8px;
}

.blog-article-body .promo-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-article-body .promo-card__logo--empty {
    font-size: 10px;
    font-weight: 600;
    color: var(--blog-text-3);
}

.blog-article-body .promo-card__main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.blog-article-body .promo-card__name {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--blog-text);
}

.blog-article-body .promo-card__desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--blog-text-2);
    white-space: pre-wrap;
}

.blog-article-body .promo-link {
    display: block;
    margin: 24px 0;
    padding: 18px 20px;
    background: var(--blog-soft);
    border-radius: 12px;
    transition: background 0.2s ease;
}

/* 链接卡片内层链接：整行可点击 */
.blog-article-body .promo-link__link {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.blog-article-body .promo-link:hover {
    background: #F0F0EE;
}

.blog-article-body .promo-link__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--blog-blue);
}

.blog-article-body .promo-link__name {
    font-size: 16px;
    line-height: 1.5;
    color: var(--blog-text);
}

.blog-article-body .promo-link__arrow {
    margin-left: auto;
    font-size: 18px;
    line-height: 1;
    color: var(--blog-text-3);
}

/* H5：缩小卡片尺寸，适配窄屏 */
.blog-h5-article .promo-card {
    padding: 16px;
}

.blog-h5-article .promo-card__link {
    gap: 12px;
}

.blog-h5-article .promo-card__logo {
    width: 50px;
    height: 50px;
}

.blog-h5-article .promo-card__logo--empty {
    font-size: 9px;
}

.blog-h5-article .promo-card__main {
    gap: 3px;
}

.blog-h5-article .promo-card__name {
    font-size: 16px;
}

.blog-h5-article .promo-card__desc {
    font-size: 13px;
    line-height: 1.5;
}

.blog-h5-article .promo-link {
    padding: 14px 16px;
}

/* ---------------- 文章图片放大预览（PC/H5 通用） ---------------- */
/* 遮罩层 z-index 高于博客导航（100），打开时禁止页面滚动 */
.blog-img-viewer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.blog-img-viewer.is-open {
    display: flex;
}

.blog-img-viewer__mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .88);
}

.blog-img-viewer__img {
    position: relative;
    width: auto;
    height: auto;
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}

.blog-img-viewer__close {
    position: absolute;
    top: 16px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.blog-img-viewer__close:hover {
    background: rgba(255, 255, 255, .28);
}

body.blog-img-viewer-open {
    overflow: hidden;
}

@media (max-width: 750px) {
    .blog-img-viewer__img {
        max-width: 96vw;
        max-height: 88vh;
    }

    .blog-img-viewer__close {
        top: 10px;
        right: 10px;
    }
}
