/* Homepage carousel [dental_home_slider]. Brand tokens (--dhs-*) are injected from config.php. */

html:has(.dhs-home),
body:has(.dhs-home) {
    overflow-x: hidden;
}

.dhs-home {
    --dhs-width: 1140px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    font-family: var(--dhs-font);
    font-style: normal;
}

.dhs-home * {
    box-sizing: border-box;
    font-style: normal;
}

.dhs-wrap {
    width: 100%;
    max-width: var(--dhs-width);
    margin-inline: auto;
    padding-inline: 20px;
}

/* Slides */
.dhs-slider {
    position: relative;
    min-height: clamp(460px, 62vh, 620px);
    overflow: hidden;
    background: var(--dhs-dark);
    color: #fff;
}

.dhs-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s;
}

.dhs-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.dhs-home .dhs-slide__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 7s ease-out;
}

.dhs-slide.is-active .dhs-slide__img {
    transform: scale(1);
}

.dhs-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.15) 100%);
}

.dhs-slide__content {
    position: relative;
    z-index: 1;
    padding-block: 64px 96px;
}

.dhs-slide__eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    padding-left: 14px;
    border-left: 3px solid var(--dhs-accent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dhs-home .dhs-slide__title {
    max-width: 26ch;
    margin: 0 0 16px;
    color: #fff;
    font-family: var(--dhs-font);
    font-size: clamp(1.8rem, 1.1rem + 2.2vw, 2.7rem);
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
}

.dhs-slide__text {
    max-width: 560px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Buttons */
.dhs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.dhs-home a.dhs-btn {
    display: inline-block;
    padding: 14px 28px;
    border: 1px solid var(--dhs-accent);
    border-radius: 0;
    background: var(--dhs-accent);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.dhs-home a.dhs-btn:hover,
.dhs-home a.dhs-btn:focus-visible {
    border-color: #fff;
    background: transparent;
    color: #fff;
}

.dhs-home a.dhs-btn--ghost {
    border-color: #fff;
    background: transparent;
}

.dhs-home a.dhs-btn--ghost:hover,
.dhs-home a.dhs-btn--ghost:focus-visible {
    background: #fff;
    color: var(--dhs-dark);
}

/* Controls: every state is set here with more specificity than the theme's [type=button]:focus/:hover. */
.dhs-home .dhs-slider__arrow,
.dhs-home .dhs-slider__arrow:focus,
.dhs-home .dhs-slider__arrow:active {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 0;
    outline: none;
    background: rgba(0, 0, 0, 0.25);
    box-shadow: none;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.dhs-home .dhs-slider__arrow:hover {
    border-color: var(--dhs-accent);
    background: var(--dhs-accent);
    color: #fff;
}

.dhs-home .dhs-slider__arrow:focus-visible {
    border-color: var(--dhs-accent);
    background: var(--dhs-accent);
    color: #fff;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.dhs-home .dhs-slider__arrow--prev {
    left: 20px;
}

.dhs-home .dhs-slider__arrow--next {
    right: 20px;
}

.dhs-slider__dots {
    position: absolute;
    right: 0;
    bottom: 28px;
    left: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.dhs-home .dhs-slider__dot,
.dhs-home .dhs-slider__dot:focus,
.dhs-home .dhs-slider__dot:active {
    width: 28px;
    min-width: 0;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: none;
    background: rgba(255, 255, 255, 0.45);
    box-shadow: none;
    cursor: pointer;
    transition: background-color 0.2s, width 0.2s;
}

.dhs-home .dhs-slider__dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.dhs-home .dhs-slider__dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.dhs-home .dhs-slider__dot.is-active,
.dhs-home .dhs-slider__dot.is-active:hover,
.dhs-home .dhs-slider__dot.is-active:focus {
    width: 44px;
    background: var(--dhs-accent);
}

@media (prefers-reduced-motion: reduce) {
    .dhs-slide,
    .dhs-home .dhs-slide__img {
        transition: none;
    }
}

@media (max-width: 767px) {
    .dhs-home .dhs-slider__arrow,
    .dhs-home .dhs-slider__arrow:focus,
    .dhs-home .dhs-slider__arrow:active {
        display: none;
    }

    .dhs-slide::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.8) 100%);
    }

    .dhs-home a.dhs-btn {
        width: 100%;
        text-align: center;
    }
}
