body, html {
    color: #ffffff;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figcaption, .lightbox-caption, .gallery-item figcaption {
    color: #ffffff;
}

a {
    color: #ffffff;
}

a:hover {
    color: #cccccc;
}

.gallery-container {
    overflow: hidden;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

.gallery-scroll > .gallery-item {
    flex: 0 0 auto;
    width: 600px; /* Doubled the thumbnail size */
    margin: 10px;
    margin-right: 10px;
    scroll-behavior: smooth;
    display: flex;
    overflow-x: scroll;
    white-space: nowrap;
    display: inline-block;
    transition: transform 0.3s ease-in-out;
}

.gallery-scroll {
    display: flex;
    width: max-content; /* Make the container large enough to hold all images */
    animation: scroll-gallery 120s linear infinite; /* Continuous scrolling */
}


/* Keyframes for infinite scrolling (applies to both desktop and mobile) */
@keyframes scroll-gallery {
    0% {
        transform: translateX(0); /* Start at the beginning */
    }
    100% {
        transform: translateX(-50%); /* Scroll entire width, causing a continuous loop */
    }
}

.gallery-item img {
    width: 100%;
    height: auto;
    max-height: 400px; /* Set a maximum height for the images */
    object-fit: cover; /* Ensure the image fits within the container without distorting */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}


.gallery-item:hover {
    transform: scale(1.05) rotate(-2deg);
}

.prev, .next {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    font-size: 30px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999; /* Increased z-index */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 5px;
    z-index: 10000; /* Ensure it's above other lightbox elements */
}

.lightbox-nav {
    z-index: 10000; /* Ensure it's above other lightbox elements */
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
    box-sizing: border-box;
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    cursor: pointer;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-align: center;
    z-index: 1100;
}



@media (max-width: 768px) {
    .gallery-item {
        width: 90vw; /* Makes thumbnails fill most of the screen width on mobile */
    }
   /* Adjust the lightbox image to fill 90% of the screen vertically */
    #lightbox-img {
        max-width: 100%;
        height: 90vh; /* Fill 90% of the screen height */
        object-fit: cover; /* Ensures the image fills the space while maintaining aspect ratio */
    }

    .gallery-scroll {
        display: flex;
        width: max-content; /* Allow enough space for all items */
        animation: scroll-gallery 30s linear infinite; /* Adjust the scroll speed */
    }

    /* Keyframes for continuous infinite scroll */
    @keyframes scroll-gallery {
        0% {
            transform: translateX(0); /* Start at the beginning */
        }
        100% {
            transform: translateX(-100%); /* Move through half the total width */
        }
    }
}






body, html {
    color: #ffffff;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figcaption, .lightbox-caption, .gallery-item figcaption {
    color: #ffffff;
}

a {
    color: #ffffff;
}

a:hover {
    color: #cccccc;
}

.gallery-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Grid layout */
    gap: 20px; /* Space between images */
}

.gallery-item {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover {
    transform: scale(1.05);
}

.prev, .next {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    font-size: 30px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 5px;
}

.lightbox-nav {
    z-index: 10000;
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-align: center;
}

@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: 1fr; /* One column on mobile */
    }

    .gallery-item img {
        height: auto;
    }
}
.gallery-item {
    position: relative;
}
.tooltip-text {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    white-space: nowrap;
    font-size: 12px;
    z-index: 10;
    display: none; /* Hide initially */
    pointer-events: none; /* Prevent interfering with cursor */
}

.gallery-item .tooltip-text {
    visibility: hidden;
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    white-space: nowrap;
    font-size: 12px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.gallery-item:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}
