﻿.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

    .gallery-item img {
        transition: transform 0.3s ease;
        display: block;
        width: 100%;
    }

    .gallery-item:hover img {
        transform: scale(1.05);
    }

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13,13,13,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #fff;
    text-align: center;
    padding: 16px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}


/* Gallery */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

    .gallery-item img {
        display: block;
        width: 100%;
        transition: transform 0.3s ease;
    }

    .gallery-item:hover img {
        transform: scale(1.05);
    }

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 13, 13, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #fff;
    text-align: center;
    padding: 16px;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus-within .gallery-overlay {
    opacity: 1;
}

/* Lightbox */
.gallery-lightbox .modal-content {
    background: #111;
    border: 0;
    border-radius: 10px;
    overflow: hidden;
}

.gallery-lightbox .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.gallery-lightbox .modal-body {
    position: relative;
    min-height: 250px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
}

.gallery-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.gallery-lightbox .btn-close {
    filter: invert(1) grayscale(100%);
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 54px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

    .gallery-lightbox-nav:hover {
        background: rgba(0, 0, 0, 0.9);
    }

.gallery-lightbox-prev {
    left: 12px;
}

.gallery-lightbox-next {
    right: 12px;
}

.gallery-lightbox-caption {
    color: #fff;
    text-align: center;
    padding: 12px 16px;
    font-size: 0.95rem;
}

@@media (max-width: 576px) {
    .gallery-overlay {
        padding: 8px;
    }

    .gallery-lightbox-image {
        max-height: 65vh;
    }

    .gallery-lightbox-nav {
        width: 38px;
        height: 46px;
        font-size: 26px;
    }
}

/* Allow overlay content to remain visible on touch devices */
@@media (hover: none) {
    .gallery-overlay {
        opacity: 1;
        background: linear-gradient( to top, rgba(0, 0, 0, 0.65), transparent );
        justify-content: flex-end;
    }
}
