/* ================= Masonry Grid ================= */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-gap: 20px;
    margin: 0;
    padding: 0;
}

/* Individual card styling */
.masonry-item.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.masonry-item.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

/* Featured image */
.featured-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Card content */
.masonry-item.card h3 {
    margin: 12px 15px 6px;
    font-size: 1.25rem;
}

.masonry-item.card h3 a {
    text-decoration: none;
    color: #111;
}

.masonry-item.card h3 a:hover {
    color: #2563eb;
}

/* Meta info */
.masonry-item.card .meta {
    margin: 0 15px 10px;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Excerpt */
.masonry-item.card .excerpt {
    margin: 0 15px 15px;
    font-size: 0.95rem;
    color: #374151;
    flex-grow: 1;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .masonry-grid {
        grid-template-columns: 1fr;
    }
}