/* Blog Hero Section */
.blog-hero {
    padding: 3.5rem 1.5rem;
    text-align: center;
}

.blog-hero h1 {
    font-size: 2.75rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.blog-hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.8;
    color: var(--muted-foreground);
}

/* Section Styles */
.section {
    padding: 4rem 1.5rem;
    max-width: 1920px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

/* Featured Articles Grid */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Article Card */
.article-card {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.article-card-inner {
    height: 100%;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card-inner {
    transform: translateY(-8px);
}

.article-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    height: 192px;
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image {
    transform: scale(1.05);
}

.article-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.375rem 0.625rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.article-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    transition: color 0.3s ease;
}

.article-card:hover .article-title {
    color: var(--accent);
}

.article-excerpt {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Search and Filter Section */
.search-filter-section {
    padding: 2rem 1.5rem;
}

.search-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    color: white;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-input::placeholder {
    color: var(--muted-foreground);
}

/* Filter Section */
.filter-section {
    margin-bottom: 2rem;
}

.filter-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    background: none;
    text-decoration: none;
    display: inline-block;
}

.filter-btn-active {
    background: var(--primary);
    color: white;
}

.filter-btn-inactive {
    background: transparent;
    color: var(--white);
    border-color: rgba(59, 130, 246, 0.2);
}

.filter-btn-inactive:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.8);
}

/* Tags */
.tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--primary);
    border-radius: 0.25rem;
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.tag:hover {
    background: rgba(59, 130, 246, 0.1);
}

.tag-active {
    background: rgba(59, 130, 246, 0.2);
}

/* Blog Layout with Sidebar */
.blog-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1920px;
    margin: 0 auto;
}

.blog-sidebar {
    position: sticky;
    top: 2rem;
    align-self: flex-start;
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 0.5rem;
    padding: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.blog-main-content {
    flex: 1;
}

/* Scrollbar for sidebar */
.blog-sidebar::-webkit-scrollbar {
    width: 6px;
}

.blog-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.blog-sidebar::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.blog-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.8);
}

/* All Articles Section */
.articles-section {
    padding: 4rem 1.5rem;
    max-width: 1920px;
    margin: 0 auto;
}

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

.article-card-full {
    background: var(--card);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.article-card-full:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.article-content {
    padding: 1.5rem;
}

.read-more {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.article-card:hover .read-more {
    gap: 0.5rem;
}

.chevron-icon {
    width: 1rem;
    height: 1rem;
}

.divider {
    width: 128px;
    height: 4px;
    background: var(--accent);
    margin: 2rem auto;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted-foreground);
}

.no-results h3 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.375rem;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination a:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent);
}

.pagination .current {
    background: var(--accent);
    border-color: var(--accent);
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }

    .blog-hero {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.875rem;
    }

    .section {
        padding: 0 1rem;
    }

    .articles-section {
        padding: 2rem 1rem;
    }

    .featured-grid,
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .featured-grid {
        gap: 3rem;
    }

    .blog-layout {
        flex-direction: column;
    }

    .blog-sidebar {
        position: static;
        max-height: none;
        margin-bottom: 2rem;
        margin-left: 2rem;
        padding: 1rem;
    }

    /* Make filters collapsed/compact on mobile */
    .filter-section {
        margin-bottom: 1rem;
    }

    .category-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    .tags-wrapper {
        gap: 0.375rem;
    }

    .tag {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }

    .search-input {
        padding: 0.625rem 1rem 0.625rem 2.5rem;
        font-size: 0.8rem;
    }

    .search-icon {
        left: 0.75rem;
    }

    .blog-sidebar-content {
        display: none;
    }

    .blog-sidebar-content.active {
        display: block;
        margin-top: 1rem;
    }

    /* Toggle button */
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.75rem 1rem;
        background: var(--accent);
        color: white;
        border: none;
        border-radius: 0.375rem;
        font-weight: 600;
        cursor: pointer;
        font-size: 0.875rem;
    }

    .sidebar-toggle svg {
        width: 20px;
        height: 20px;
        transition: transform 0.3s;
    }

    .sidebar-toggle.active svg {
        transform: rotate(180deg);
    }

    /* Move sidebar to top */
    .blog-layout {
        flex-direction: column-reverse;
    }
}

@media (min-width: 769px) {
    .blog-layout {
        flex-direction: row;
        gap: 2rem;
    }

    .blog-sidebar {
        width: 320px;
        flex-shrink: 0;
    }

    .sidebar-toggle {
        display: none;
        /* Hide toggle button on desktop */
    }
}

@media (min-width: 1024px) {
    .blog-hero h1 {
        font-size: 3rem;
    }

    .featured-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-sidebar {
        width: 360px;
    }
}

@media (min-width: 1400px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}