/* Gallery Styles */
.gallery-grid-modern {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gallery-viewport {
    overflow: hidden;
    position: relative;
}

.gallery-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.gallery-item-modern {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    background-color: #ff8f2b;
}

    .gallery-item-modern img {
        display: block;
        width: 100%;
        height: auto;
        transition: all 0.3s;
        backface-visibility: hidden;
    }

.gallery-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    background-color: #fff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    text-decoration: none;
}

    .gallery-overlay i {
        font-size: 24px;
        color: #ff8f2b;
    }

.gallery-item-modern:hover img {
    opacity: 0.5;
}

.gallery-item-modern:hover .gallery-overlay {
    opacity: 1;
}

.gallery-nav {
    position: absolute;
    bottom: 1px;
    width: 36px;
    height: 36px;
    background-color: #ff8f2b;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
    z-index: 10;
}

    .gallery-nav:hover {
        opacity: 1;
    }

.gallery-nav-prev {
    right: 36px;
}

.gallery-nav-next {
    right: 0;
}

/* Responsive item sizes */
@media (max-width: 767px) {
    .gallery-item-modern {
        width: 50%; /* 2 items mobile */
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .gallery-item-modern {
        width: 25%; /* 4 items tablet */
    }
}

@media (min-width: 1200px) {
    .gallery-item-modern {
        width: 16.666%; /* 6 items desktop */
    }
}





/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

    .lightbox-content img {
        max-width: 100%;
        max-height: 90vh;
        display: block;
    }

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
    font-size: 24px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: background 0.3s;
}

    .lightbox-close:hover,
    .lightbox-prev:hover,
    .lightbox-next:hover {
        background: #fff;
    }

.lightbox-close {
    top: -50px;
    right: 0;
}

.lightbox-prev {
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-title {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    color: #fff;
    text-align: center;
    padding: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
    }
}
