/* Category Filter Styles */
.category-filters {
    margin-bottom: 2rem;
    border-radius: 8px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.filter-btn.active {
    background: var(--primary);
        border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.filter-btn .count {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: normal;
}

.filter-btn.active .count {
    opacity: 1;
}

.filter-loading {
    text-align: center;
    padding: 1rem;
    color: #6c757d;
    font-style: italic;
}

/* Posts Container with Fade Animation */
#postsContainer {
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

/* Animation classes for smooth transitions */
#postsContainer.filtering {
    opacity: 0.3;
    transform: translateY(10px);
}

#postsContainer.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Archive Posts Grid */
.archive-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.archive-post-link {
    text-decoration: none;
    color: inherit;
}

.archive-post-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.archive-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.archive-post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.archive-post-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.archive-post-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
    color: #2c3e50;
}

.archive-post-excerpt {
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.archive-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: auto;
}

.archive-post-date,
.archive-post-author {
    display: inline-block;
}

/* Pagination Styles */
.archive-pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.archive-pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    margin: 0 0.25rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #007bff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.archive-pagination .page-numbers:hover,
.archive-pagination .page-numbers.current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.archive-pagination .page-numbers.prev,
.archive-pagination .page-numbers.next {
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-buttons {
        justify-content: center;
    }
    
    .filter-btn {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }
    
    .archive-posts {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .archive-post-content {
        padding: 1rem;
    }
    
    .archive-post-title {
        font-size: 1.1rem;
    }
    
    .archive-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .category-filters {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .filter-btn {
        font-size: 1rem;
        padding: 0.3rem 0.6rem;
    }
    
    .archive-post-thumbnail {
        height: 150px;
    }
}

body.dark-mode .archive-post-content {
  background-color: var(--medium);

  color: #e0e0e0;
}

body.dark-mode .archive-post-card {

box-shadow: 0 2px 10px rgba(183, 183, 183, 0.1);
}



body.dark-mode .filter-btn {
    background: var(--medium);
  color: var(--bodyTextColorWhite);
}

body.dark-mode .filter-btn.active {
    background: var(--primary);
box-shadow: 0 2px 4px rgb(255 106 62);
}