/* Main Content Styles - 2 Columns Grid */

/* Posts Grid Container */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    animation: fadeIn 0.5s ease-out;
}

/* Post Card */
.post-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

/* Post Image */
.post-image {
    position: relative;
    display: block;
    overflow: hidden;
    height: 220px;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-image img {
    transform: scale(1.08);
}

.post-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(139, 92, 246, 0.9));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    z-index: 2;
}

/* Post Content */
.post-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Rating */
.post-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(234, 179, 8, 0.1);
    border-radius: 8px;
    width: fit-content;
}

.rating-stars {
    display: flex;
    gap: 0.1rem;
}

.star {
    color: #94a3b8;
    font-size: 1rem;
}

.star.filled {
    color: #fbbf24;
}

.rating-value {
    color: #fbbf24;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Post Title */
.post-title {
    font-size: 1.3rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: #fff;
    font-weight: 700;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #60a5fa;
}

/* Post Excerpt */
.post-excerpt {
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex-grow: 1;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Post Meta */
.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
}

.post-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.post-date svg {
    color: #60a5fa;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
}

.read-more:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    transform: translateX(5px);
}

.read-more svg {
    transition: transform 0.3s ease;
}

.read-more:hover svg {
    transform: translateX(3px);
}

/* Featured Post (First post larger) */
.posts-grid article:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.posts-grid article:first-child .post-image {
    height: 100%;
    min-height: 320px;
}

.posts-grid article:first-child .post-title {
    font-size: 1.8rem;
}

.posts-grid article:first-child .post-excerpt {
    font-size: 1.1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 4rem 0;
    grid-column: 1 / -1;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination a:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.pagination .current {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.pagination .prev,
.pagination .next {
    min-width: 100px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--gray);
    grid-column: 1 / -1;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    opacity: 0.7;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .posts-grid {
        gap: 1.5rem;
    }
    
    .posts-grid article:first-child .post-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 992px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-grid article:first-child {
        grid-template-columns: 1fr;
    }
    
    .posts-grid article:first-child .post-image {
        min-height: 280px;
    }
    
    .post-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .posts-grid {
        gap: 1.5rem;
    }
    
    .post-content {
        padding: 1.25rem;
    }
    
    .post-title {
        font-size: 1.2rem;
    }
    
    .posts-grid article:first-child .post-title {
        font-size: 1.4rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .read-more {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .posts-grid {
        gap: 1rem;
    }
    
    .post-card {
        border-radius: 12px;
    }
    
    .post-image {
        height: 180px;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .post-title {
        font-size: 1.1rem;
    }
    
    .post-excerpt {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }
    
    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        padding: 0 0.8rem;
        font-size: 0.9rem;
    }
    
    .pagination .prev,
    .pagination .next {
        min-width: 80px;
    }
}

/* Filter Section */
.filter-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.filter-header h2 {
    font-size: 1.5rem;
    margin: 0;
    color: #fff;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-toggle:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.filter-toggle.active {
    background: rgba(59, 130, 246, 0.25);
}

.filter-toggle svg {
    width: 16px;
    height: 16px;
}

.filter-content {
    display: block;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group h4 {
    font-size: 1rem;
    color: #cbd5e1;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.filter-categories,
.filter-years {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
    font-weight: 600;
}

.filter-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
    color: #94a3b8;
}

.clear-filters {
    background: transparent;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-filters:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: translateY(-1px);
}

/* Info Banner */
.info-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-banner svg {
    color: #60a5fa;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.info-banner h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.info-banner p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-banner strong {
    color: #60a5fa;
}

/* Empty State Enhancements */
.empty-state {
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
}

.empty-state .btn {
    margin-top: 1.5rem;
}

/* Responsive Filter */
@media (max-width: 768px) {
    .filter-section {
        padding: 1.25rem;
    }
    
    .filter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filter-toggle {
        align-self: flex-start;
    }
    
    .filter-categories,
    .filter-years {
        gap: 0.4rem;
    }
    
    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .filter-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .clear-filters {
        align-self: flex-start;
    }
    
    .info-banner {
        padding: 1.25rem;
        flex-direction: column;
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    .filter-section {
        padding: 1rem;
    }
    
    .filter-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }
    
    .info-banner {
        padding: 1rem;
    }
    
    .info-banner h4 {
        font-size: 1rem;
    }
    
    .info-banner p {
        font-size: 0.9rem;
    }
}