.gallery-wrapper {
    position: relative;
    overflow: hidden;
    --gallery-image-height: 300px;
}

.image-gallery {
    width: 100%;
    overflow: hidden;
}

.image-track {
    display: flex;
    gap: 20px;
}

.gallery-image {
    height: var(--gallery-image-height);
    flex: 0 0 auto;
}

.gallery-image img {
    height: 100%;
    width: auto;
    display: block;
    object-fit: cover;
    cursor: pointer;
}

.gallery-image img:focus-visible {
    outline: 3px solid rgb(255, 190, 24);
    outline-offset: 2px;
}

.gallery-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.gallery-button:hover,
.gallery-button:focus-visible {
    opacity: 1;
    background: rgba(0,0,0,1);
}

.gallery-button:focus-visible {
    outline: 3px solid rgb(255, 190, 24);
    outline-offset: 2px;
}

.gallery-left {
    left: 10px;
}

.gallery-right {
    right: 10px;
}

@media (max-width: 768px) {
    .gallery-wrapper {
        --gallery-image-height: 180px;
    }
}

.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.image-modal.active {
    display: flex;
}

.modal-frame {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    padding: 20px;
    text-align: center;
}

.modal-frame img {
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    display: block;
    margin: auto;
}

.modal-frame p {
    margin: 15px 0 0;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    border: 0;
    background: none;
    font-size: 32px;
    cursor: pointer;
    opacity: 0.5;
    color: white;
}

.modal-close:hover {
    opacity: 1;
}