.slideshowouter {
    margin: auto;
    display: flex;
    justify-content: center;
}

.slideshow {
    position: relative;
    width: 800px;
    /* ✅ give slideshow a width */
    aspect-ratio: 17 / 12;
    /* ✅ maintain aspect ratio */
    overflow: hidden;
    margin: 2rem auto;
    background: #fff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    /* ✅ so controls go below slides */
}

.slides {
    flex: 1;
    /* ✅ take available space */
    display: flex;
    height: 100%;
    transition: transform 1s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.slidesbottoms {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: smaller;
    font-weight: 300;
    color: color-mix(in srgb, var(--text-primary) 80%, transparent);
}

/* control bar */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 10px;
    background: #eee;
    font-family: monospace;
    width: 100%;
}

.controls button {
    padding: 4px 10px;
    border: 1px solid #aaa;
    background: #eee;
    cursor: pointer;
    border-radius: 4px;
    font-family: inherit;
}

.controls .counter,
.slideshowname {
    color: black;
}

.controls button:hover {
    background: #ddd;
}

.controls .counter {
    font-weight: bold;
    white-space: nowrap;
}

@media (max-width:768px) {
    .slideshow {

        aspect-ratio: 12 / 9;

    }
}