.hero-slider-container {
    position: relative;
    width: 100%;
    background: linear-gradient(-60deg, var(--bg-color) 30%, rgba(0, 0, 0, 0.2) 100%);
    box-shadow: var(--box-shadow);
}

/* Fallback for color-mix - Chrome 111+, Firefox 113+, Safari 16.4+ */
@supports (background: color-mix(in srgb, red 50%, blue 50%)) {
    .hero-slider-container {
        background: linear-gradient(-60deg, var(--bg-color) 30%, color-mix(in srgb, var(--bg-color) 80%, var(--color-black) 20%) 100%);
    }
}

.hero-slider {
    width: 100%;
    height: 100%;
    min-height: 80vh;
}

/* Fallback for dvh (dynamic viewport height) - Chrome 108+, Firefox 101+, Safari 15.4+ */
@supports (height: 1dvh) {
    .hero-slider {
        min-height: 80dvh;
    }
}

@media screen and (min-width: 768px) {
    .hero-slider {
        min-height: 50vh;
    }
    
    @supports (height: 1dvh) {
        .hero-slider {
            min-height: 50dvh;
        }
    }
}

.hero-slide {
    display: flex !important;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    width: 100%;
    min-height: 80vh;
    padding: calc(var(--size-11) + var(--size-4)) var(--size-4) var(--size-4);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Fallback for dvh */
@supports (height: 1dvh) {
    .hero-slide {
        min-height: 80dvh;
    }
}

@media screen and (min-width: 768px) {
    .hero-slide {
        min-height: 50vh;
        padding: var(--size-11) var(--size-6) var(--size-4);
        flex-direction: row;
        justify-content: flex-end;
    }
    
    @supports (height: 1dvh) {
        .hero-slide {
            min-height: 50dvh;
        }
    }
}

.hero-slide .icon {
    width: 100%;
    right: -5%;
    position: absolute;
    z-index: 0;
    opacity: 0.1;
    color: var(--bg-color);
    filter: contrast(0.5) brightness(0.75);
    -ms-transform: rotate(10deg) scale(1.2);
    -webkit-transform: rotate(10deg) scale(1.2);
    transform: rotate(10deg) scale(1.2);
}

@media screen and (max-width: 767px) {
    .hero-slide .icon {
        bottom: 10%;
        width: 65%;
    }
}

@media screen and (min-width: 768px) {
    .hero-slide .icon {
        top: 10%;
        width: 45%;
    }
}

/* Active slide should be fully visible */
.hero-slide.bx-clone {
    opacity: 0 !important;
}

.hero-slider .bx-viewport .hero-slide:first-child {
    opacity: 1;
}

/* Hero slide content */
.hero-slide-content {
    flex: 1;
    width: 100%;
    max-width: 100%;
    height: auto;
    z-index: 15;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--size-4);
    order: 1;
    text-align: center;
}

@media screen and (min-width: 768px) {
    .hero-slide-content {
        max-width: 50%;
        order: unset;
        gap: var(--size-3);
    }
}

/* Headline */
.hero-slide-content .hero-slide-headline {
    font-size: var(--size-6);
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
    color: var(--text-color);
    text-align: center;
}

@media screen and (min-width: 768px) {
    .hero-slide-content .hero-slide-headline {
        font-size: var(--size-8);
    }
}

/* Button container */
.hero-slide-content .hero-slide-button .hero-button {
    display: inline-block;
    padding: var(--size-4) var(--size-8);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: var(--transition-std);
    box-shadow: 0 var(--size-2) var(--size-4) rgba(0, 0, 0, 0.2);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@media screen and (min-width: 768px) {
    .hero-slide-content .hero-slide-button .hero-button {
        padding: var(--size-8) var(--size-10);
        font-size: var(--size-7);
    }
}

.hero-slide-content .hero-slide-button .hero-button::after {
    background-color: var(--button-bg-color);
}

.hero-slide-content .hero-slide-button .hero-button span {
    font-size: var(--size-4);
    border: var(--size-1) solid rgba(255, 255, 255, 0.2);
    color: var(--button-text-color);
}

/* Fallback for color-mix - Chrome 111+, Firefox 113+, Safari 16.4+ */
@supports (border-color: color-mix(in srgb, red 50%, blue 50%)) {
    .hero-slide-content .hero-slide-button .hero-button span {
        border: var(--size-1) solid color-mix(in srgb, var(--button-bg-color), var(--color-white) 20%);
    }
}

.hero-slide-content .hero-slide-button .hero-button span:hover {
    color: var(--button-text-color) !important;
}

.hero-slide-content .hero-slide-button .hero-button:hover {
    background-color: transparent !important;
    -ms-transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 var(--size-3) var(--size-6) rgba(0, 0, 0, 0.3);
}

/* Subtitle */
.hero-slide-content .hero-slide-subtitle {
    font-size: var(--size-4);
    font-weight: 400;
    margin: 0;
    opacity: 0.95;
    color: var(--text-color);
    text-align: center;
}

@media screen and (min-width: 768px) {
    .hero-slide-content .hero-slide-subtitle {
        font-size: var(--size-5);
    }
}

/* Subtext */
.hero-slide-content .hero-slide-subtext {
    font-size: var(--size-3);
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    opacity: 0.9;
    color: var(--text-color);
}

.hero-slide-content .hero-slide-subtext p {
    margin-bottom: var(--size-3);
}

.hero-slide-content .hero-slide-subtext p:last-child {
    margin-bottom: 0;
}

.hero-slide-content .hero-slide-content-image {
    max-width: 50%;
}

/* Hero slide image */
.hero-slide-image {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    order: 2;
}

@media screen and (min-width: 768px) {
    .hero-slide-image {
        order: unset;
    }
}

.hero-slide-image img {
    width: auto;
    height: auto;
    max-height: 50vh;
    -o-object-fit: contain;
    object-fit: contain;
    filter: drop-shadow(0 calc(-1 * var(--size-3)) var(--size-6) rgba(0, 0, 0, 0.2));
}

/* Fallback for color-mix in drop-shadow - Chrome 111+, Firefox 113+, Safari 16.4+ */
@supports (filter: drop-shadow(0 0 0 color-mix(in srgb, red 50%, blue 50%))) {
    .hero-slide-image img {
        filter: drop-shadow(0 calc(-1 * var(--size-3)) var(--size-6) color-mix(in srgb, var(--bg-color) 80%, var(--color-white) 20%));
    }
}

@media screen and (max-width: 767px) {
    .hero-slide-image img {
        max-height: 40vh;
    }
}

/* Hero Slider Controls */
.hero-slider-controls {
    position: absolute;
    bottom: var(--size-6);
    left: 50%;
    -ms-transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    z-index: 50;
}

@media screen and (min-width: 768px) {
    .hero-slider-controls {
        bottom: var(--size-4);
    }
}

.hero-slider-pager {
    position: relative;
}

.hero-slider-pager .bx-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--size-3);
}

/* Fallback for gap in IE 11 */
@supports not (gap: 1px) {
    .hero-slider-pager .bx-pager {
        margin: calc(var(--size-3) / -2);
    }
    .hero-slider-pager .bx-pager > * {
        margin: calc(var(--size-3) / 2);
    }
}

.hero-slider-pager .bx-pager-item a {
    display: block;
    width: var(--size-3);
    height: var(--size-3);
    border-radius: 50%;
    background-color: var(--bg-color);
    filter: contrast(0.5) brightness(2);
    transition: var(--transition-std);
    text-indent: -9999px;
    opacity: 0.3;
}

.hero-slider-pager .bx-pager-item a:hover,
.hero-slider-pager .bx-pager-item a.active {
    -ms-transform: scale(1.3);
    -webkit-transform: scale(1.3);
    transform: scale(1.3);
    opacity: 0.8;
}

/* bxSlider overrides for hero slider */
.hero-slider-container .bx-wrapper {
    box-shadow: none;
    border: none;
    background: none;
    margin-bottom: 0;
}

.hero-slider-container .bx-wrapper .bx-viewport {
    background: none;
    border: none;
    left: 0 !important;
}

.hero-slider-container .bx-wrapper .bx-controls-direction {
    display: none;
}

.hero-slider-container .bx-wrapper .bx-pager {
    display: none;
}

/* No slides fallback */
.no-hero-slides {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    min-height: 40vh;
    padding: var(--size-8);
}

.no-hero-slides .container {
    max-width: 600px;
}

.no-hero-slides h2 {
    color: var(--text-color);
    font-size: var(--size-7);
    margin-bottom: var(--size-4);
    text-shadow: 0 var(--size-1) var(--size-2) rgba(0, 0, 0, 0.3);
}

@media screen and (min-width: 768px) {
    .no-hero-slides h2 {
        font-size: var(--size-8);
    }
}

.no-hero-slides p {
    color: var(--text-color);
    font-size: var(--size-4);
    opacity: 0.9;
    text-shadow: 0 var(--size-1) var(--size-2) rgba(0, 0, 0, 0.2);
    margin-bottom: var(--size-4);
}

.no-hero-slides p:last-child {
    margin-bottom: 0;
}

.no-hero-slides .button {
    display: inline-block;
    padding: var(--size-3) var(--size-6);
    background-color: var(--text-color);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: var(--size-4);
    font-weight: 600;
    transition: all 0.3s ease;
}

.no-hero-slides .button:hover {
    background-color: var(--color-prescriptions);
    color: var(--text-color);
    -ms-transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
}