.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.media-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.media-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-grid-item:hover img {
    transform: scale(1.1);
}

#imageModal {
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    text-align: center;
    padding-top: 60px;
}

#imageModal img {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 90%;
}

#imageModal span {
    position: absolute;
    top: 15px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
}

@media screen and (max-width: 479px) {
    .media-grid-item {
        height: 300px;
    }
}

@media screen and (min-width: 480px) and (max-width: 767px) {
    .media-grid-item {
        height: 300px;
    }
}

@media screen and (min-width: 768px) and (max-width: 990px)  {
    .media-grid-item {
        height: 300px;
    }
}

@media (min-width: 991px) {
    .media-grid-item {
        height: 350px;
    }
}