.modern-posts-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.modern-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.modern-post-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #c7c0c0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.modern-post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.post-image-container {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.modern-post-card:hover .post-image {
    transform: scale(1.1);
}

.post-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 48px;
    opacity: 0.7;
}

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

.modern-post-card:hover .post-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.modern-post-card:hover .overlay-content {
    transform: translateY(0);
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: white;
    color: #667eea;
    transform: scale(1.05);
}

.post-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-content {
    padding: 25px;
}

.post-meta {
    margin-bottom: 10px;
}

.post-date {
    color: #888;
    font-size: 0.85em;
    font-weight: 500;
}

.post-title {
    margin: 0 0 15px 0;
    text-align: center;
    font-size: 1.3em;
    line-height: 1.4;
}

.post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #667eea;
}

.post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.author-info span {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.post-stats {
    display: flex;
    gap: 15px;
}

.comments-count {
    font-size: 0.85em;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.load-more-container {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.load-more-btn.loading .btn-text {
    opacity: 0;
}

.load-more-btn.loading .loading-spinner {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.no-posts-found {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* Анимации */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 768px) {
    .modern-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modern-posts-container {
        padding: 20px 15px;
    }
    
    .post-image-container {
        height: 200px;
    }
    
    .post-content {
        padding: 20px;
    }
}

/* Masonry layout */
.modern-posts-container[data-layout="masonry"] .modern-posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-auto-rows: masonry;
}

.modern-posts-container[data-layout="masonry"] .modern-post-card {
    height: auto;
}

/* Стили для фильтров категорий */
.category-filters {
    margin-bottom: 40px;
    text-align: center;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.post-filter-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #495057;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.post-filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.posts-count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.post-filter-btn.active .posts-count {
    background: rgba(255,255,255,0.3);
}

.filter-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    min-height: 30px;
}

.current-filter-text {
    color: #666;
    font-size: 0.9em;
    font-weight: 500;
}

.filter-loading {
    display: none;
}

.filter-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Состояние загрузки фильтров */
.filters-loading .filters-container {
    opacity: 0.6;
    pointer-events: none;
}

.filters-loading .filter-loading {
    display: block;
}

/* Анимация появления новых постов */
.modern-posts-grid .modern-post-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Адаптивность для фильтров */
@media (max-width: 768px) {
    .filters-container {
        gap: 8px;
    }
    
    .post-filter-btn {
        padding: 10px 16px;
        font-size: 0.9em;
    }
    
    .category-filters {
        margin-bottom: 30px;
    }
}