/* Style 4 - Masonry */
.eag-style-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

.eag-masonry-item {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.09);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    display: flex;
    flex-direction: column;
}

.eag-masonry-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.15);
}

.eag-masonry-image {
    position: relative;
    height: 260px;
    overflow: hidden;
    flex-shrink: 0;
}

.eag-masonry-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.eag-masonry-item:hover .eag-masonry-image img {
    transform: scale(1.1);
}

.eag-masonry-overlay {
    position: absolute;
    inset: 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: opacity 0.35s ease;
}

.eag-masonry-item:hover .eag-masonry-overlay {
    opacity: 1;
}

.eag-masonry-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 26px;
    background: rgba(255, 255, 255, 0.97);
    color: #667eea;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.eag-masonry-btn:hover {
    transform: scale(1.07);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.eag-masonry-info {
    padding: 22px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.eag-masonry-info h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.eag-masonry-item:hover .eag-masonry-info h3 {
    color: #667eea;
}

.eag-masonry-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
    padding: 7px 14px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.eag-masonry-item:hover .eag-masonry-count {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
}

@media (max-width: 768px) {
    .eag-style-masonry {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .eag-masonry-image {
        height: 210px;
    }
}

@media (max-width: 480px) {
    .eag-style-masonry {
        grid-template-columns: 1fr;
    }

    .eag-masonry-image {
        height: 230px;
    }
}