.galleries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    width: 80%;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    width: 100%;
    height: 250px;
    background-color: #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.gallery-item img,
.gallery-item .placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.placeholder {
    display: none;
}

.gallery-item img[onerror] + .placeholder {
    display: block;
}

.overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
}

.overlay p {
    margin: 0;
    font-size: 14px;
}

@media(max-width: 768px) {
    .galleries-grid {
        width: 90%;
    }
}