/* ============================================================
   Blog List Page Styles  (zh-CN/assets/css/blog-list.css)
   Depends on: main.css (CSS variables & base resets)
   ============================================================ */

/* ---------- Page layout ---------- */
.blog-page {
    background: #f5f5f7;
    min-height: 100vh;
}

/* Site header: reuse main.css navbar; keep transparent over dark hero like homepage */
.blog-page #main-header:not(.scrolled) {
    background-color: transparent;
    color: var(--color-text-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.blog-page #main-header:not(.scrolled) .lang-switch {
    border-left-color: rgba(255, 255, 255, 0.3);
}

/* ---------- Hero banner ---------- */
.blog-hero {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 60%, #16213e 100%);
    color: #fff;
    padding: calc(120px + env(safe-area-inset-top, 0px)) 40px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 100%, rgba(0,122,255,0.18) 0%, transparent 70%);
    pointer-events: none;
}

.blog-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.blog-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #007aff;
    margin-bottom: 20px;
}

.blog-hero h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 18px;
}

.blog-hero-desc {
    font-size: 18px;
    font-weight: 300;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
    margin-bottom: 32px;
}

.blog-hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 30px;
    padding: 8px 22px;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.blog-hero-stats strong {
    color: #fff;
    font-weight: 700;
}

/* ---------- Main content area ---------- */
.blog-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

/* ---------- Section header (scoped — avoids main.css .section-header) ---------- */
.blog-section-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 28px;
    padding: 0;
    background: transparent;
    text-align: left;
}

.blog-section-label {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #007aff;
}

.blog-section-title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
    padding-left: 12px;
    border-left: 1px solid #e5e5ea;
}

/* ---------- Featured card ---------- */
.featured-section {
    margin-bottom: 60px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-height: 360px;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.featured-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.14);
    transform: translateY(-3px);
}

.featured-cover {
    position: relative;
    overflow: hidden;
    height: 100%;
    max-height: 360px;
    min-height: 0;
}

.featured-cover-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.featured-card:hover .featured-cover-bg {
    transform: scale(1.04);
}

.featured-cover-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: rgba(255,255,255,0.9);
    transition: transform 0.6s ease;
}

.featured-card:hover .featured-cover-fallback {
    transform: scale(1.04);
}

.featured-cover-fallback i {
    font-size: 56px;
    opacity: 0.85;
}

.featured-cover-fallback span {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
}

.featured-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: #007aff;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 3px;
    z-index: 2;
}

.featured-body {
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
}

.featured-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.tag-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: #f0f4ff;
    color: #007aff;
    border: 1px solid rgba(0,122,255,0.15);
    letter-spacing: 0.3px;
}

.featured-body h2 {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.4;
    color: #111;
    margin-bottom: 14px;
}

.featured-body .summary {
    font-size: 15px;
    color: #555;
    line-height: 1.75;
    margin-bottom: 24px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #999;
}

.article-meta i {
    font-size: 12px;
    margin-right: 4px;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #007aff;
    margin-top: 20px;
    transition: gap 0.2s;
}

.read-more-link:hover {
    gap: 10px;
}

/* ---------- Post grid (non-featured) ---------- */
.posts-section {
    margin-top: 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.post-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.post-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.post-cover {
    position: relative;
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}

.post-cover-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.post-card:hover .post-cover-bg {
    transform: scale(1.05);
}

.post-cover-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

.post-card:hover .post-cover-fallback {
    transform: scale(1.05);
}

.post-cover-fallback i {
    font-size: 40px;
    color: rgba(255,255,255,0.85);
}

.post-body {
    padding: 22px 22px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.post-body h3 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    color: #111;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-body .summary {
    font-size: 13px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #bbb;
    padding-top: 14px;
    border-top: 1px solid #f2f2f2;
    margin-top: auto;
}

.post-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-reading-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ---------- Empty state ---------- */
.blog-empty {
    text-align: center;
    padding: 80px 24px;
    color: #bbb;
}

.blog-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .blog-hero {
        padding: calc(100px + env(safe-area-inset-top, 0px)) 24px 50px;
    }

    .blog-hero h1 {
        font-size: 34px;
    }

    .blog-hero-desc {
        font-size: 16px;
    }

    .featured-card {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .featured-cover {
        height: 220px;
        max-height: 220px;
    }

    .featured-body {
        padding: 28px 28px 28px;
    }

    .featured-body h2 {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .blog-hero h1 {
        font-size: 28px;
    }

    .blog-main {
        padding: 40px 16px 60px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .featured-body {
        padding: 22px 20px;
    }
}
