:root {
    --blog-hero-gradient: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.12));
}

.blog-page header {
    position: sticky;
    top: 0;
}

.blog-hero {
    padding: 140px 0 80px;
    background: var(--blog-hero-gradient);
}

.blog-hero .hero-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: center;
}

.blog-hero h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.blog-hero p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.blog-hero .blog-hero-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.blog-search {
    margin-top: 2.5rem;
}

.blog-search label {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.blog-search input {
    width: 100%;
    padding: 0.85rem 1.2rem;
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.blog-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.blog-featured {
    padding: 80px 0;
    background: white;
}

.blog-featured .section-title {
    text-align: left;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.blog-card.featured {
    padding: 2.5rem;
    transform: translateY(0);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.blog-card.featured:hover {
    transform: translateY(-8px);
}

.blog-listing {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
}

.blog-listing-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.filter-chip {
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: white;
    color: var(--text);
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-chip:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.filter-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
}

.filter-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.blog-result-count {
    color: var(--text-light);
    font-weight: 500;
}

.blog-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.blog-loading,
.blog-empty {
    text-align: center;
    color: var(--text-light);
    padding: 3rem 1rem;
    font-size: 1.1rem;
}

.hidden {
    display: none !important;
}

.blog-detail-hero {
    padding: 140px 0 80px;
    background: var(--blog-hero-gradient);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb span {
    color: var(--text-light);
}

.blog-detail-hero h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.blog-detail-meta {
    font-size: 1rem;
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.blog-detail-hero-image {
    margin-top: 2rem;
}

.blog-detail-hero-image.hidden {
    display: none;
}

.blog-hero-image {
    margin: 0;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.blog-hero-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.blog-hero-image figcaption {
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.9);
}

.blog-detail-content-section {
    background: white;
    padding: 80px 0;
}

.blog-article {
    max-width: 780px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
}

.blog-article h2,
.blog-article h3,
.blog-article h4 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-article p {
    margin-bottom: 1.5rem;
}

.blog-article ul,
.blog-article ol {
    margin: 1.5rem 0 1.5rem 1.5rem;
    padding-left: 1.5rem;
}

.blog-article li {
    margin-bottom: 0.75rem;
}

.blog-article blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.2rem;
    color: var(--text-light);
    font-style: italic;
    margin: 2rem 0;
}

.blog-article pre {
    background: #0f172a;
    color: #f8fafc;
    padding: 1.5rem;
    border-radius: 14px;
    overflow-x: auto;
    margin: 2rem 0;
}

.related-posts {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    padding: 80px 0;
}

.related-posts .section-title {
    text-align: left;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.blog-detail-loader {
    text-align: center;
    color: var(--text-light);
    padding: 3rem 0;
}

.blog-detail-error {
    text-align: center;
    color: var(--accent);
    font-weight: 600;
    padding: 3rem 0;
}

@media (max-width: 1024px) {
    .blog-hero h1,
    .blog-detail-hero h1 {
        font-size: 2.5rem;
    }

    .blog-hero .hero-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .blog-hero,
    .blog-detail-hero {
        padding: 120px 0 60px;
    }

    .blog-search {
        margin-top: 2rem;
    }

    .blog-listing-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-result-count {
        align-self: flex-start;
    }

    .blog-card.featured {
        padding: 2rem;
    }

    .blog-detail-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    .filter-chip {
        width: 100%;
        text-align: center;
    }

    .featured-grid,
    .blog-list-grid,
    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .blog-article {
        font-size: 1rem;
    }
}
