/* ═══════════════════════════════ INSURANCE PAGE TOKENS ══════════════════════════ */
:root {
    --ins-red: #fe4521;
    --ins-orange: #ff6b0e;
    --ins-pink: #d42f84;
    --ins-purple: #a348ca;
    --ins-teal: #15a064;
    --ins-red-soft: #fee8e7;
    --ins-orange-soft: #ffece0;
    --ins-pink-soft: #fce4f1;
    --ins-purple-soft: #f1e6fc;
    --ins-teal-soft: #e1f8f0;
}

/* ═══════════════════════════════ INSURANCE HERO ═════════════════════════════════ */
#insurance-hero {
    /* min-height: 100svh; */
    padding: calc(var(--space-2xl) + 68px) 0 var(--space-xl);
    background: var(--white);
}

.insurance-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-xl);
}

.insurance-hero-visual {
    width: 100%;
    height: auto;
}

.insurance-hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-lg);
}

.insurance-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4.6vw, 3.75rem);
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.02em;
    color: var(--neutral-900);
    text-align: end;
}

.insurance-hero-accent {
    color: var(--brand-red);
}

@media (max-width: 900px) {
    .insurance-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .insurance-hero-content {
        align-items: center;
    }

    .insurance-hero-title {
        text-align: center;
    }

    .insurance-hero-visual {
        max-width: 420px;
        margin: 0 auto;
    }
}

/* ═══════════════════════════════ INSURANCE BANNER ═══════════════════════════════ */
#insurance-banner {
    padding: var(--space-lg) 0 var(--space-lg);
}

.insurance-banner-card {
    background:
        radial-gradient(circle at 85% 15%, rgba(232, 52, 26, 0.32) 0%, transparent 55%),
        linear-gradient(135deg, var(--neutral-900) 0%, #0a0a0a 60%, #1a0e0c 100%);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
}

.insurance-banner-heading {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.2vw, 2.25rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--white);
    max-width: 920px;
    margin: 0 auto var(--space-lg);
}

.insurance-banner-sub {
    font-size: 0.9375rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.8;
    max-width: 920px;
    margin: 0 auto var(--space-lg);
}

.insurance-banner-sub:last-of-type {
    margin-bottom: 0;
}

/* Value pills row */
.value-pills {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-2xl);
}

.value-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xs);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    transition: var(--transition);
}

.value-pill:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-3px);
}

.value-pill-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.value-pill-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.value-pill-label {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--white);
}

@media (max-width: 900px) {
    .value-pills {
        grid-template-columns: repeat(3, 1fr);
        row-gap: var(--space-sm);
    }
}

@media (max-width: 540px) {
    .value-pills {
        grid-template-columns: repeat(2, 1fr);
    }

    .insurance-banner-card {
        padding: var(--space-xl) var(--space-md);
        border-radius: var(--radius-xl);
    }
}

/* ═══════════════════════════════ USE-CASE GRID (shared card style) ══════════════ */
#insurance-usecases {
    padding: var(--space-3xl) 0;
}

.usecase-header {
    margin-bottom: var(--space-2xl);
}

.usecase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.usecase-card {
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: var(--transition);
}

.usecase-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.usecase-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.usecase-icon img {
    width: 22px;
    height: 22px;
}

.usecase-icon-red {
    background: var(--ins-red);
}

.usecase-icon-orange {
    background: var(--ins-orange);
}

.usecase-icon-pink {
    background: var(--ins-pink);
}

.usecase-icon-purple {
    background: var(--ins-purple);
}

.usecase-icon-teal {
    background: var(--ins-teal);
}

.usecase-name {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.usecase-desc {
    font-size: 0.875rem;
    color: var(--neutral-600);
    line-height: 1.65;
}

@media (max-width: 900px) {
    .usecase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .usecase-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════ SOLUTION CAROUSEL ═══════════════════════════════ */

#insurance-solution {
    padding: var(--space-lg) 0 var(--space-3xl);
    overflow: hidden;
}

.solution-header {
    margin-bottom: var(--space-lg);
}

/* Outer wrapper — no overflow hidden here so the scale(1.1) card isn't clipped */
.solution-carousel {
    position: relative;
}

/* This div clips the overflowing cloned slides but allows the scaled card to breathe */
.solution-viewport {
    overflow: hidden;
    width: 100%;
    /* Fade masks so cards dissolve at the edges like Netflix */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 10%,
        #000 90%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 10%,
        #000 90%,
        transparent 100%
    );
}

/* The sliding row — position driven by --carousel-x set from JS */
.solution-track {
    display: flex;
    align-items: stretch;
    gap: 24px;
    list-style: none;
    /* Vertical padding gives scale(1.1) room so it isn't clipped by viewport overflow */
    padding: 28px 0 36px;
    margin: 0;
    /* Single CSS custom property drives all movement — one GPU-composited layer */
    transform: translate3d(var(--carousel-x, 0px), 0, 0);
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
    user-select: none;
    -webkit-user-select: none;
}

/* Suppress transition during instant clone-snap */
.solution-track.no-transition {
    transition: none;
}

/* ── Card state: default (far from active) ─────────────────── */
.solution-track .usecase-card {
    flex-shrink: 0;
    /* flex-basis is set in JS via inline style for responsive sizing */
    transform: scale(0.82);
    opacity: 0.35;
    filter: blur(0.4px);
    transition:
        transform  0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
        opacity    0.45s ease,
        box-shadow 0.45s ease,
        filter     0.45s ease;
    transform-origin: center center;
    cursor: grab;
}

.solution-track .usecase-card:active {
    cursor: grabbing;
}

/* ── Card state: one step away from active ─────────────────── */
.solution-track .usecase-card.neighbour {
    transform: scale(0.94);
    opacity: 0.75;
    filter: none;
}

/* ── Card state: active / centre ───────────────────────────── */
.solution-track .usecase-card.active {
    transform: scale(1.08);
    opacity: 1;
    filter: none;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    z-index: 10;
    cursor: grab;
}

/* ── Controls ────────────────────────────────────────────────── */
.solution-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.solution-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid var(--neutral-200);
    background: var(--brand-red);
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-400);
    cursor: pointer;
    /* transition:
        border-color 0.2s ease,
        color        0.2s ease,
        background   0.2s ease,
        transform    0.15s ease; */
    flex-shrink: 0;
}

.solution-arrow svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

/* .solution-arrow:hover {
    border-color: var(--brand-red);
    color: var(--brand-red);
} */

/* .solution-arrow:active {
    transform: scale(0.9);
}

.solution-arrow-active {
    background: var(--neutral-900);
    border-color: var(--neutral-900);
    color: var(--white);
} */

/* .solution-arrow-active:hover {
    background: var(--brand-red-dark);
    border-color: var(--brand-red-dark);
    color: var(--white);
} */

/* Infinite loop — never truly disabled */
.solution-arrow[disabled] {
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
}

/* ── Dots ────────────────────────────────────────────────────── */
.solution-dots {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.solution-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neutral-200);
    border: 0;
    padding: 0;
    cursor: pointer;
    transition:
        width         0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
        border-radius 0.3s ease,
        background    0.3s ease;
}

.solution-dot:hover {
    background: var(--brand-red);
}

.solution-dot-active {
    width: 22px;
    border-radius: 999px;
    background: var(--brand-red);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .solution-viewport {
        -webkit-mask-image: linear-gradient(
            to right,
            transparent 0%,
            #000 6%,
            #000 94%,
            transparent 100%
        );
        mask-image: linear-gradient(
            to right,
            transparent 0%,
            #000 6%,
            #000 94%,
            transparent 100%
        );
    }
}

@media (max-width: 640px) {
    .solution-viewport {
        -webkit-mask-image: linear-gradient(
            to right,
            transparent 0%,
            #000 3%,
            #000 97%,
            transparent 100%
        );
        mask-image: linear-gradient(
            to right,
            transparent 0%,
            #000 3%,
            #000 97%,
            transparent 100%
        );
    }
}