body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    grid-gap: 20px;
    padding: 20px;
}

.item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.item:hover {
    transform: scale(1.05);
}

.item img,
.item video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    transition: filter 0.3s ease-in-out;
}

.item:hover img,
.item:hover video {
    filter: brightness(90%);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    pointer-events: none;
}

.item:hover .overlay {
    opacity: 1;
}

.overlay h2 {
    color: white;
    text-align: center;
    margin: 0;
    font-size: 1.5em;
}

@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .item {
        margin-bottom: 15px;
    }
}
/* Modal styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.modal-content {
    width: 80%;
    max-width: 600px;
    height: auto;
}

.close {
    color: white;
    font-size: 40px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 25px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #f1f1f1;
    text-decoration: none;
    cursor: pointer;
}
