/* Gallery container */
    .gallery {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }

    /* Each gallery item */
    .gallery-item {
        position: relative;
        overflow: hidden;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        background: #fff;
    }

    /* Image styling */
    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }

    /* Caption styling */
    .caption {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 10px;
        background: rgba(0, 0, 0, 0.6);
        color: #fff;
        font-size: 16px;
        text-align: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    /* Hover effects */
    .gallery-item:hover img {
        transform: scale(1.05);
    }

    .gallery-item:hover .caption {
        opacity: 1;
    }