/* ===== Rectangular Image Gallery ===== */

main.honeycomb-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    justify-content: center;
    padding: 4em;
    background-color: #000000;
}

/* Gallery Items */
main.honeycomb-gallery a {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

main.honeycomb-gallery a:hover {
    transform: scale(1.03);
}

/* Gallery Images */
main.honeycomb-gallery img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.65s ease-out, transform 0.65s ease-out;
}

main.honeycomb-gallery a:hover img {
    filter: grayscale(0%) saturate(1);
}

/* Lightbox Styling */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-content {
    width: 75vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 35px;
    cursor: pointer;
}

/* Lightbox Navigation Arrows */
.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    border-radius: 5px;
    z-index: 1001;
}

.prev:hover,
.next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.prev {
    left: 30px;
}

.next {
    right: 30px;
}

/* Responsive Padding for Mobile */
@media (max-width: 768px) {
    main.honeycomb-gallery {
        padding: 2em;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .lightbox-content {
        width: 90vw;
    }
}
