.gallery {
    position: relative;
    overflow: hidden;
    border-radius: var(--pico-border-radius);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    background: #000;
}

.gallery-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.gallery-slide {
    min-width: 100%;
    position: relative;
}

.gallery-slide img {
    width: 100%;
    display: block;
    cursor: zoom-in;
}

/* Lightbox styles */
.gallery-lightbox {
    padding: 0;
    border: none;
    background: transparent;
    max-width: 100vw;
    max-height: 100vh;
    outline: none;
}

.gallery-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.gallery-lightbox-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
}

.gallery-lightbox-content img {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.gallery-lightbox-caption {
    color: white;
    padding: 1rem;
    text-align: center;
    max-width: 800px;
}

.gallery-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: background 0.2s;
    z-index: 100;
}

.gallery-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.4);
}


.gallery-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
}

.gallery-nav button {
    background: rgba(0,0,0,0.3);
    border: none;
    color: white;
    padding: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.2s;
    margin: 1rem;
    outline: none;
    box-shadow: none;
}

.gallery-nav button:focus {
    outline: none;
    box-shadow: none;
}

.gallery-nav button:hover {
    background: rgba(0,0,0,0.6);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    text-align: center;
    backdrop-filter: blur(4px);
}
