/* Homepage masthead carousel (replaces the hero background image) */

.home #masthead {
    background-image: none !important;
    background-color: #fff;
    overflow: hidden;
}

/* Keep the header bar above the carousel layer */
.home .site-header-outer {
    position: relative;
    z-index: 1;
}

.home-carousel {
    position: absolute;
    top: var(--home-carousel-offset, 0px);
    right: 0;
    bottom: 0;
    left: 0;
    max-width: 1930px;
    margin: 0 auto;
    z-index: 0;
    overflow: hidden;
    background: #232323;
}

/* Below 600px the nav is fixed over the masthead: grow the masthead by the nav's
   height (measured in carousel.js) so the carousel sits beneath it at full size. */
@media only screen and (max-width: 599.98px) {
    .home #masthead {
        height: calc(35vh + var(--home-carousel-offset, 0px));
    }
}

.home-carousel__slides,
.home-carousel__slide {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.home-carousel__slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 0s linear 1s;
}

.home-carousel__slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 1s ease-in-out, visibility 0s linear 0s;
}

.home-carousel__slide img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
}

/* Controls: pause/play + slide rectangles, bottom right */
.home-carousel__controls {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 6px;
    background: rgba(0, 0, 0, 0.35);
}

@media only screen and (min-width: 600px) {
    .home-carousel__controls {
        right: 24px;
        bottom: 24px;
    }
}

.home #masthead .home-carousel__toggle,
.home #masthead .home-carousel__dot {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
    min-width: 0;
    line-height: 0;
    font-size: 0;
    opacity: 1;
    transition: none;
}

.home #masthead .home-carousel__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.home-carousel__toggle svg {
    fill: currentColor;
}

.home-carousel__icon-play,
.home-carousel__toggle.is-paused .home-carousel__icon-pause {
    display: none;
}

.home-carousel__toggle.is-paused .home-carousel__icon-play {
    display: block;
}

.home-carousel__nav {
    position: relative;
    display: flex;
    gap: 0;
}

/* 24x24 hit area, small black rectangle visual */
.home-carousel__dot::before {
    content: "";
    display: block;
    width: 12px;
    height: 12px;
    margin: 6px auto;
    background: #000;
    outline: 1px solid rgba(255, 255, 255, 0.7);
}

.home-carousel__dot:hover::before {
    outline-color: #fff;
}

.home #masthead .home-carousel__toggle:focus,
.home #masthead .home-carousel__dot:focus {
    outline: none;
}

.home #masthead .home-carousel__toggle:focus-visible,
.home #masthead .home-carousel__dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 1px;
}

.home-carousel__indicator {
    position: absolute;
    left: 0;
    bottom: 1px;
    width: 12px;
    height: 2px;
    background: #fff;
    transform: translateX(6px);
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

@media (prefers-reduced-motion: reduce) {
    .home-carousel__slide,
    .home-carousel__slide.is-active,
    .home-carousel__indicator {
        transition: none;
    }
}
