/* General Styles */
body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

h1 {
    margin-top: 20px;
    font-size: 24px;
    color: #333;
}

/* Gallery Grid Layout */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 20px;
}

/* Gallery Item */
.gallery-item {
    width: 300px;  /* Adjust width */
    height: 250px; /* Adjust height */
    background: white;
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Ensure images fit properly */
.gallery-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Ensures full image visibility */
    border-radius: 5px;
}

/* Fix Video Display */
.gallery-item video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Ensures video fits properly without cropping */
    border-radius: 5px;
}

/* Fullscreen Video Fix */
video:fullscreen, 
video:-webkit-full-screen, 
video:-moz-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain !important; /* Ensures full video is visible on fullscreen */
}

/* Back to Gallery Link */
a {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
    color: #007BFF;
    font-size: 18px;
}

a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-item {
        width: 250px;
        height: 180px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .gallery-item {
        width: 45%;
        height: auto;
    }
    .gallery-item img, 
    .gallery-item video {
        height: auto;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 20px;
    }
    .gallery-grid {
        flex-direction: column;
        align-items: center;
    }
    .gallery-item {
        width: 90%;
        height: auto;
    }
}
