.carousel {
    position: relative;
    width: 100%;
}
.sr-only {
    display: none;
}

/* horizontal scroll container */
.carousel ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    margin: 0;
    padding: 0 0 1rem;
    cursor: grab;
    user-select: none;
}
.carousel ul.grabbing {
    cursor: grabbing;
    scroll-behavior: auto;
}
.carousel ul::-webkit-scrollbar {
    display: none;
}

/* fixed-width card */
.carousel ul li {
    position: relative;
    flex: 0 0 auto;
    width: 25rem;
    list-style: none;
    scroll-snap-align: start;
    overflow: hidden;
}
/* The last card snaps to the end edge so the true end is a stable rest position
   (otherwise proximity snaps back to a start-aligned card and "next" can't wrap). */
.carousel ul li:last-child {
    scroll-snap-align: end;
}
.carousel ul li > img {
    display: block;
    width: 100%;
    aspect-ratio: .75;
    object-fit: cover;
}
.carousel ul li > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-block: 1rem;
    color: inherit;
}

/* dot navigation */
.carousel ol {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    display: none;
}
.carousel ol li {
    list-style: none;
    padding: 0 5px;
}
.carousel ol li a {
    display: block;
    height: 10px;
    width: 10px;
    border: 2px solid currentColor;
    background: transparent;
    border-radius: 100%;
    opacity: 0.5;
}
.carousel ol li.selected a {
    background: currentColor;
    opacity: 1;
}

/* prev / next arrows */
.carousel .prev,
.carousel .next {
    user-select: none;
    cursor: pointer;
    font-size: 28px;
    color: white;
    position: absolute;
    left: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9;
    line-height: 0;
    font-family: sans-serif;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 100%;
    border: 0;
    display: none!important;
}
.carousel .next {
    left: auto;
    right: 0;
}
