/* Shared scroll-scrubbed sticky drag carousel */

.gc-scroll-carousel {
    --gc-header-offset: var(--iasc-header-height, 96px);
    --gc-sticky-height: max(420px, calc(100dvh - var(--gc-header-offset)));
    --gc-slide-count: 5;
    position: relative;
    width: 100%;
    height: calc((var(--gc-slide-count) + 1) * var(--gc-sticky-height));
}

.gc-scroll-carousel__sticky {
    position: sticky;
    top: var(--gc-header-offset);
    height: var(--gc-sticky-height);
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

.gc-drag-carousel {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    border-top: 1px solid #dde2e5;
    border-bottom: 1px solid #dde2e5;
    background: #ffffff;
}

.gc-drag-carousel__viewport {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    touch-action: pan-y;
    user-select: none;
}

@media (min-width: 768px) {
    .gc-drag-carousel__viewport {
        cursor: grab;
        min-height: 0;
    }

    .gc-drag-carousel__track {
        height: 100%;
    }

    .gc-benefit-slide {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        grid-template-areas: "media content" !important;
    }

    .gc-benefit-slide__media {
        min-height: 0;
        height: 100%;
    }

    .gc-benefit-slide__content {
        height: 100%;
    }
}

@media (max-width: 767px) {
    .gc-scroll-carousel {
        height: auto;
    }

    .gc-scroll-carousel__sticky {
        position: relative;
        top: auto;
        height: auto;
        min-height: 0;
    }

    .gc-drag-carousel {
        min-height: 0;
    }

    .gc-drag-carousel__viewport {
        cursor: grab;
        min-height: clamp(360px, 55vw, 520px);
    }

    .gc-benefit-slide,
    .initiative-practice-slide {
        height: auto;
        min-height: clamp(360px, 55vw, 520px);
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "media"
            "content" !important;
    }

    .gc-benefit-slide__media {
        min-height: clamp(220px, 45vw, 320px);
        height: auto;
    }

    .gc-benefit-slide__content {
        height: auto;
        padding: clamp(1.5rem, 4vw, 2rem);
    }

    .initiative-practice-slide {
        min-height: clamp(360px, 55vw, 520px);
        padding: clamp(1rem, 3vw, 1.5rem);
    }
}

.gc-drag-carousel__viewport.is-dragging {
    cursor: grabbing;
}

.gc-drag-carousel__track {
    display: flex;
    height: 100%;
    will-change: transform;
}

.gc-drag-carousel__track.is-dragging .gc-benefit-slide__media img,
.gc-drag-carousel__track.is-dragging .initiative-practice__media img {
    pointer-events: none;
}

.gc-benefit-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "media content";
    background: #ffffff;
}

.gc-benefit-slide__media {
    grid-area: media;
    position: relative;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background: #e8ecee;
}

.gc-benefit-slide__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
}

.gc-benefit-slide__content {
    grid-area: content;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: clamp(1.75rem, 4vw, 3.5rem);
    background: #ffffff;
    overflow: auto;
}

.gc-drag-carousel__controls {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem clamp(1rem, 3vw, 2rem) 1.25rem;
    background: #ffffff;
}

.gc-drag-carousel__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #dde2e5;
    border-radius: 50%;
    background: #ffffff;
    color: #101415;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.gc-drag-carousel__arrow:hover:not(:disabled),
.gc-drag-carousel__arrow:focus-visible {
    background: #101415;
    border-color: #101415;
    color: #ffffff;
    outline: none;
}

.gc-drag-carousel__arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.gc-drag-carousel__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.gc-drag-carousel__dot {
    display: block;
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #c5ccd0;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.gc-drag-carousel__dot.is-active {
    background: #8fb52a;
    transform: scale(1.35);
}

.gc-drag-carousel__dot:hover,
.gc-drag-carousel__dot:focus-visible {
    background: #8fb52a;
    outline: none;
}
