﻿.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

.gallery-item {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 15px;
    flex: 1 1 calc(25% - 40px);
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .gallery-item:hover {
        transform: translateY(-10px);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    }

    .gallery-item h5 {
        font-size: 16px;
        font-weight: 600;
        color: #333;
        margin-bottom: 10px;
        line-height: 1.5;
    }

    .gallery-item img {
        width: 100%;
        height: auto;
        border-radius: 8px;
        margin-bottom: 10px;
        cursor: pointer;
        transition: opacity 0.3s ease;
    }

        .gallery-item img:hover {
            opacity: 0.8;
        }

.caption {
    display: inline-block;
    font-size: 14px;
    color: #007bff;
    text-decoration: underline;
    margin-top: 5px;
    cursor: pointer;
}

    .caption:hover {
        color: #0056b3;
    }

@media (max-width: 1024px) {
    .gallery-item {
        flex: 1 1 calc(33% - 40px);
    }
}

@media (max-width: 768px) {
    .gallery-item {
        flex: 1 1 calc(50% - 40px);
    }
}

@media (max-width: 480px) {
    .gallery-item {
        flex: 1 1 100%;
    }
}
