
.gallery {
    display: flex;
    flex-wrap: wrap;
    width:100%;
    gap:10px;
}

    .gallery .tile {
        position: relative;
        overflow: hidden;
        height: 40vh;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        text-decoration: none;
        border: none;
        border-radius: 10px;
    }

        .gallery .tile::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: inherit;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            transition: transform 0.5s ease-in-out;
            transform: scale(1);
        }

        .gallery .tile .tile-text {
            position: relative;
            z-index: 2;
            padding: 5px;
            color: white;
            background: none;
            transition: background-color 0.5s ease-in-out;
            background-color: #e7512d;
        }

        .gallery .tile .tile-text h2 {
            background: none;
            color: #fff;
            margin: 0;
            text-align: center;
            width: 100%;
        }

        .gallery .tile:hover .tile-text {
            background-color: #0b4b5b;
        }

        .gallery .tile:hover::before {
            transform: scale(1.1); /* Zoom in effect */
        }

        .gallery .tile .tile-text span {
            color: white;
            text-shadow: 0 0 7px #333;
            text-align: center;
            width: 100%;
            display: block;
        }

/* Responsive Layout */
@media (min-width: 1024px) {
    /* Desktop */
    .gallery .tile {
        flex: 1 1 calc(50% - 10px);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    /* Tablet */
    .gallery .tile {
        flex: 1 1 calc(50% - 10px);
        height: 30vh;
    }
}

@media (max-width: 767px) {
    /* Mobile */
    .gallery .tile {
        flex: 1 1 100%;
        height: 16em;
    }
}
