html {
    scroll-behavior: auto;
}

:target {
    scroll-margin-top: 0 !important;
}

section.carousel-container {
    position: relative;
    background: linear-gradient(135deg, #e6f0ff 0%, #f0f7ff 100%);
    scroll-margin-top: 0;
    scroll-margin-bottom: 0;
    overflow: hidden; /* prevents page from shifting */
    scrollbar-color: transparent transparent; /* thumb and track color */
    scrollbar-width: none;
}

ul.carousel {
    width: 100%;
    max-height: 60vh;
    /*padding: 20px;*/
    display: flex;
    gap: 4vw;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overflow-y: hidden;
    scroll-padding-top: 0;
}

ul.carousel > li > .carousel__content {
    padding: 20px;
    width: 100%;
    height: 100%;
}

ul.carousel > li > .carousel__content > .carousel__caption {
    z-index: 2;
    position: absolute;
    bottom: 20%;
    left: 20%;
    max-width: 30%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    font-weight: 600;
    font-style: italic;
}

ul.carousel > li > .carousel__content > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

ul.carousel > li {
    list-style-type: none;

    flex: 0 0 100%;
    scroll-snap-align: center;

    position: relative;
    width: 100%;
    scroll-margin-block: 0; /* prevents vertical adjustment */
}

.carousel__snapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    scroll-snap-align: center;
}

.carousel::before,
.carousel::after,
.carousel__prev,
.carousel__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    font-size: 0;
    outline: 0;
}

.carousel::before,
.carousel__prev {
    left: 1rem;
}

.carousel::after,
.carousel__next {
    right: 1rem;
}

.carousel::before,
.carousel::after {
    content: '';
    z-index: 1;
    background-color: #333;
    background-size: 1.5rem 1.5rem;
    background-repeat: no-repeat;
    background-position: center center;
    color: #fff;
    font-size: 2.5rem;
    line-height: 4rem;
    text-align: center;
    pointer-events: none;
}

.carousel::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='0,50 80,100 80,0' fill='%23fff'/%3E%3C/svg%3E");
}

.carousel::after {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='100,50 20,100 20,0' fill='%23fff'/%3E%3C/svg%3E");
}