/* === Blog List Page Styles === */
/* Requires main.css to be loaded first for CSS variables and base components */

/* --- Blog Hero --- */
.blog-hero {
    padding-top: calc(var(--nav-height) + 72px);
    padding-bottom: 64px;
    background: radial-gradient(ellipse at 70% 0%, rgba(139, 92, 255, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 100%, rgba(51, 112, 255, 0.08) 0%, transparent 55%);
    text-align: center;
}

.blog-hero .badge {
    margin-bottom: 20px;
}

.blog-hero-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--text-title);
    line-height: 1.15;
    margin-bottom: 16px;
}

.blog-hero-title span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-hero-desc {
    font-size: 18px;
    color: var(--text-body);
    max-width: 560px;
    margin: 0 auto 28px;
    line-height: 1.7;
}

.blog-stats {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-body);
}

.blog-stats i {
    color: var(--brand-primary);
    font-size: 16px;
}

#article-count {
    color: var(--brand-primary);
    font-weight: 800;
}

/* --- Blog Content Section --- */
.blog-content {
    padding: 64px 0 100px;
    background: var(--bg-page);
}

/* --- Featured Card --- */
.featured-card {
    display: flex;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-md);
    margin-bottom: 64px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.featured-cover {
    flex: 0 0 45%;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.featured-cover .cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-icon-lg {
    font-size: 80px;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.15));
}

.featured-content {
    flex: 1;
    padding: 48px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.featured-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--brand-primary);
    background: rgba(51, 112, 255, 0.08);
    border-radius: var(--radius-pill);
    padding: 4px 14px;
    width: fit-content;
}

.featured-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.5px;
    color: var(--text-title);
    margin: 0;
}

.featured-summary {
    font-size: 15px;
    color: var(--text-body);
    line-height: 1.75;
    margin: 0;
}

.btn-featured {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    background: var(--gradient-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    width: fit-content;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-glow);
}

.btn-featured:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(139, 92, 255, 0.4);
    color: #fff;
}

/* --- Posts Grid --- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* --- Regular Post Card --- */
.post-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.card-cover {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.card-cover .cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-icon {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
}

.card-content {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text-title);
    margin: 0;
    transition: color 0.2s ease;
}

.post-card:hover .card-title {
    color: var(--brand-primary);
}

.card-summary {
    font-size: 14px;
    color: var(--text-body);
    line-height: 1.7;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Shared: Meta, Tags, Read More --- */
.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

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

.post-date i,
.post-reading-time i {
    font-size: 14px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.post-tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-primary);
    background: rgba(51, 112, 255, 0.08);
    border-radius: var(--radius-pill);
    padding: 3px 12px;
    transition: background 0.2s ease;
}

.post-card:hover .post-tag {
    background: rgba(51, 112, 255, 0.14);
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-primary);
    margin-top: auto;
    transition: gap 0.2s ease;
}

.read-more-link:hover {
    gap: 10px;
    color: var(--brand-secondary);
}

/* --- Mobile Navigation breakpoint fix (max-width: 900px) --- */
/* Override the 1024px breakpoint that collapses nav on large tablets/desktops */
@media (max-width: 1024px) and (min-width: 901px) {
    .nav-links { display: flex !important; }
    .mobile-menu-btn { display: none !important; }
}

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

    .featured-card {
        flex-direction: column;
    }

    .featured-cover {
        flex: none;
        height: 240px;
        min-height: unset;
        width: 100%;
    }

    .featured-content {
        padding: 36px 40px;
    }

    .blog-hero-title {
        font-size: 38px;
    }
}

/* --- Responsive: Mobile --- */
@media (max-width: 640px) {
    .blog-hero {
        padding-top: calc(var(--nav-height) + 48px);
        padding-bottom: 48px;
    }

    .blog-hero-title {
        font-size: 30px;
        letter-spacing: -0.5px;
    }

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

    .blog-content {
        padding: 48px 0 72px;
    }

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

    .featured-cover {
        height: 200px;
    }

    .featured-content {
        padding: 28px 24px;
        gap: 16px;
    }

    .featured-title {
        font-size: 21px;
    }

    .card-content {
        padding: 20px 22px 24px;
    }
}

/* --- Mobile nav breakpoint at 900px (fixes nav collapsing on desktop) --- */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
}

@media (min-width: 901px) {
    .mobile-nav { display: none !important; }
}
