/* Masonry Grid Styles */
.masonry-grid {
    column-count: 1;
    column-gap: 1rem;
    break-inside: avoid;
}

@media (min-width: 576px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (min-width: 768px) {
    .masonry-grid {
        column-count: 3;
    }
}

@media (min-width: 992px) {
    .masonry-grid {
        column-count: 4;
    }
}

@media (min-width: 1200px) {
    .masonry-grid {
        column-count: 5;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    display: inline-block;
    width: 100%;
}

.masonry-item .mud-card {
    height: auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.masonry-item .mud-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Story card specific styles */
.story-card-masonry {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}

.story-card-masonry .mud-card-content {
    padding: 1rem;
}

.story-card-masonry .story-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
}

.story-card-masonry .story-headline {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card-masonry .story-summary {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.story-card-masonry .story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
}

.story-card-masonry .story-tags {
    margin-top: 0.5rem;
}

.story-card-masonry .story-tags .mud-chip {
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Category section styles */
.category-section {
    margin-bottom: 3rem;
}

.category-section .category-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.category-section .category-title {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.category-section .category-icon {
    margin-right: 0.5rem;
    font-size: 1.75rem;
}

.category-section .category-count {
    margin-left: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}
