.slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: calc(100vh - 272px);
    min-height: 500px;
    max-height: 950px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 0 0 calc(var(--m) * 4) calc(var(--m) * 4);
}

.slider::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 489px;
    height: 100%;
    background-image: url('img/slider-overlay.svg');
    background-size: cover;
    pointer-events: none;
    z-index: 1;
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.slider-track.is-dragging {
    cursor: grabbing;
    transition: none;
}

.slide img {
    -webkit-user-drag: none;
}

.slide {
    position: relative;
    flex: 0 0 100%;
    height: 100%;
}

.slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide--has-text::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(0, 20, 45, 0.78) 0%, rgba(0, 20, 45, 0.6) 62%, rgba(0, 20, 45, 0) 100%);
    pointer-events: none;
}

.slide-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 60px;
}

.slide-content > * {
    max-width: 60%;
}

.slide-content h2 {
    margin: 0 0 var(--padding-sm);
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.05rem);
    font-weight: 900;
    line-height: 1.15;
}

.slide-content__text {
    margin: 0 0 var(--padding-base);
    color: #fff;
    font-family: 'Merriweather', serif;
    font-style: italic;
    font-size: 1.563rem;
    line-height: 1.4;
}

.slide-content .button {
    display: inline-block;
    padding: 8px 16px;
    border: 2px solid transparent;
    border-radius: calc(var(--m) * 4);
    background-color: var(--brand-dark);
    color: #fff;
    font-size: 1.25rem;
    text-decoration: none;
}

.slide-content .button:hover {
    background-color: var(--brand-darker);
}

.dots {
    position: absolute;
    left: 15px;
    bottom: 48px;
    z-index: 3;
    display: flex;
    flex-flow: row;
    gap: 6px;
}

.dots button {
    box-sizing: border-box;
    width: 25px;
    height: 24px;
    padding: 10px 0;
    border: none;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.55) content-box;
    box-shadow: 0 0 0 1px rgba(0, 20, 45, 0.35) inset;
    cursor: pointer;
}

.dots button.active {
    width: 44px;
    background: #fff content-box;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.pause-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
    background: rgba(0, 20, 45, 0.75);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
}

@media (min-width: 992px) {
    .slider {
        max-width: 91.666%;
    }
}

@media (min-width: 1400px) {
    .slider {
        max-width: 83.333%;
    }
}

@media (max-width: 768px) {
    .slider {
        height: 350px;
        min-height: 0;
    }

    .slider::after {
        display: none;
    }

    .slide--has-text::before {
        background: rgba(0, 20, 45, 0.65);
    }

    .slide-content {
        padding: 0 20px;
    }

    .slide-content > * {
        max-width: 100%;
    }

    .slide-content__text {
        font-size: 1.266rem;
    }
}
