/* Healthcare Estimator — module styles */

.section--hcEstimator {
    padding: 40px 0;
}

.hcEstimator {
    padding: 32px;
    border: 1px solid rgba(238, 240, 244, 1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 1px 3px rgba(0, 66, 130, 0.03), 0 4px 32px -6px rgba(0, 66, 130, 0.06);
}

.hcEstimator__header {
    margin-bottom: 28px;
}

.hcEstimator__title {
    margin: 0 0 8px;
    font-family: Space_Grotesk, sans-serif;
    font-weight: 700;
    font-size: clamp(22px, 2.2vw, 28px);
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: rgba(11, 31, 51, 1);
}

.hcEstimator__desc {
    margin: 0;
    font-family: Lexend, sans-serif;
    font-weight: 300;
    font-size: 15px;
    line-height: 170%;
    color: rgba(100, 103, 115, 1);
    max-width: 640px;
}

.hcEstimator__body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hcEstimator__group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 24px;
}

/* Gradient dividers between sections */
.hcEstimator__group + .hcEstimator__group,
.hcEstimator__group + .hcEstimator__result {
    padding-top: 24px;
    border-top: 1px solid transparent;
    border-image: linear-gradient(90deg, rgba(75, 125, 225, 0.15) 0%, rgba(238, 240, 244, 0.6) 50%, transparent 100%) 1;
}

.hcEstimator__label {
    margin: 0;
    font-family: Space_Grotesk, sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    color: rgba(37, 39, 45, 1);
}

/* ===== SOLUTION CARDS (grid) ===== */

.hcEstimator__cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.hcEstimator__card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(238, 240, 244, 1);
    border-radius: 14px;
    cursor: pointer;
    transition:
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.25s ease,
        background 0.25s ease;
}

.hcEstimator__card:hover {
    transform: translateY(-2px);
    border-color: rgba(75, 125, 225, 0.25);
    box-shadow: 0 6px 24px -4px rgba(0, 66, 130, 0.08);
    background: rgba(75, 125, 225, 0.02);
}

.hcEstimator__card--active {
    border-color: rgba(75, 125, 225, 0.5);
    background: rgba(75, 125, 225, 0.04);
    box-shadow: 0 4px 20px -4px rgba(75, 125, 225, 0.18);
}

.hcEstimator__card--active:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px -4px rgba(75, 125, 225, 0.22);
}

/* Check-dot */
.hcEstimator__card::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(75, 125, 225, 1);
    box-shadow: 0 0 0 3px rgba(75, 125, 225, 0.15);
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.hcEstimator__card--active::after {
    opacity: 1;
    transform: scale(1);
}

.hcEstimator__cardIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(238, 240, 244, 0.7);
    color: rgba(100, 103, 115, 0.8);
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.hcEstimator__card--active .hcEstimator__cardIcon {
    background: rgba(75, 125, 225, 0.1);
    color: rgba(75, 125, 225, 1);
    box-shadow: 0 0 0 4px rgba(75, 125, 225, 0.06);
}

.hcEstimator__card:hover .hcEstimator__cardIcon {
    color: rgba(75, 125, 225, 0.85);
    background: rgba(75, 125, 225, 0.08);
    box-shadow: 0 0 0 4px rgba(75, 125, 225, 0.04);
}

.hcEstimator__cardIcon svg {
    width: 22px;
    height: 22px;
}

.hcEstimator__cardLabel {
    font-family: Lexend, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.3;
    color: rgba(100, 103, 115, 1);
    transition: color 0.2s ease;
}

.hcEstimator__card--active .hcEstimator__cardLabel {
    color: rgba(11, 31, 51, 1);
}

.hcEstimator__card:hover .hcEstimator__cardLabel {
    color: rgba(37, 39, 45, 1);
}

/* ===== SEGMENTED CONTROLS ===== */

.hcEstimator__segments {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: rgba(238, 240, 244, 0.85);
    border: 1px solid rgba(228, 230, 236, 1);
    border-radius: 14px;
    padding: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 20, 60, 0.04);
    overflow: hidden;
}

.hcEstimator__segSlider {
    position: absolute;
    top: 4px;
    left: calc(4px + var(--seg-idx, 0) * (100% - 8px) / 3);
    width: calc((100% - 8px) / 3);
    height: calc(100% - 8px);
    border-radius: 11px;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 1px 3px rgba(0, 66, 130, 0.08), 0 4px 16px -2px rgba(0, 66, 130, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.03);
    transition: left 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
    pointer-events: none;
}

.hcEstimator__seg {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 11px;
    cursor: pointer;
    font-family: Lexend, sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.3;
    color: rgba(100, 103, 115, 1);
    transition: color 0.25s ease;
}

.hcEstimator__seg:hover {
    color: rgba(37, 39, 45, 1);
}

.hcEstimator__seg--active {
    color: rgba(11, 31, 51, 1);
}

.hcEstimator__segBadge {
    display: inline-flex;
    padding: 3px 8px;
    font-family: Space_Grotesk, sans-serif;
    font-weight: 600;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.02em;
    color: rgba(100, 103, 115, 1);
    background: rgba(238, 240, 244, 0.8);
    border-radius: 5px;
    flex-shrink: 0;
    transition: color 0.25s ease, background 0.25s ease;
}

.hcEstimator__seg--active .hcEstimator__segBadge {
    color: rgba(75, 125, 225, 1);
    background: rgba(75, 125, 225, 0.1);
    background-image: linear-gradient(105deg, transparent 30%, rgba(75, 125, 225, 0.12) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: hcEstimatorShimmer 3.5s ease-in-out infinite;
}

@keyframes hcEstimatorShimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

.hcEstimator__segText {
    white-space: nowrap;
}

/* ===== RESULT BLOCK ===== */

.hcEstimator__result {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(240, 245, 255, 0.7) 0%, rgba(247, 249, 255, 0.4) 100%);
    border: 1px solid rgba(75, 125, 225, 0.1);
    border-radius: 16px;
    border-image: none;
}

.hcEstimator__resultRow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.hcEstimator__resultBlock {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hcEstimator__resultLabel {
    font-family: Space_Grotesk, sans-serif;
    font-weight: 500;
    font-size: 13px;
    line-height: 1;
    color: rgba(100, 103, 115, 1);
}

.hcEstimator__resultValue {
    font-family: Space_Grotesk, sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: rgba(11, 31, 51, 1);
}

.hcEstimator__resultValue--timeline {
    font-size: clamp(20px, 2.5vw, 28px);
    color: rgba(75, 125, 225, 1);
}

/* --- Stacked bar container --- */

.hcEstimator__barWrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(238, 240, 244, 0.8);
    border-radius: 12px;
}

.hcEstimator__barLabel {
    font-family: Space_Grotesk, sans-serif;
    font-weight: 500;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(100, 103, 115, 0.6);
}

/* --- Stacked bar --- */

.hcEstimator__stackedBar {
    display: flex;
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
    gap: 3px;
}

.hcEstimator__stackedSeg {
    flex: 0 0 var(--seg-pct, 25%);
    min-width: 6px;
    border-radius: 5px;
    transition: flex-basis 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.hcEstimator__stackedSeg--arch {
    background: rgba(75, 125, 225, 0.25);
}

.hcEstimator__stackedSeg--dev {
    background: rgba(75, 125, 225, 0.5);
}

.hcEstimator__stackedSeg--qa {
    background: rgba(75, 125, 225, 0.7);
}

.hcEstimator__stackedSeg--deploy {
    background: rgba(75, 125, 225, 0.9);
}

/* --- Legend row under bar --- */

.hcEstimator__barLegend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hcEstimator__legendItem {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: Lexend, sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: rgba(100, 103, 115, 0.8);
}

.hcEstimator__legendDot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.hcEstimator__legendDot--arch { background: rgba(75, 125, 225, 0.25); }
.hcEstimator__legendDot--dev { background: rgba(75, 125, 225, 0.5); }
.hcEstimator__legendDot--qa { background: rgba(75, 125, 225, 0.7); }
.hcEstimator__legendDot--deploy { background: rgba(75, 125, 225, 0.9); }

.hcEstimator__legendPct {
    font-family: Space_Grotesk, sans-serif;
    font-weight: 600;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: rgba(100, 103, 115, 0.7);
}

/* --- CTA button --- */

.hcEstimator__cta {
    display: flex;
}

.hcEstimator__ctaBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: rgba(75, 125, 225, 1);
    color: rgba(255, 255, 255, 1);
    border: none;
    border-radius: 12px;
    font-family: Lexend, sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.hcEstimator__ctaBtn:hover {
    background: rgba(55, 105, 205, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px -2px rgba(75, 125, 225, 0.4);
}

.hcEstimator__ctaBtn:active {
    transform: translateY(0);
}

.hcEstimator__resultNote {
    font-family: Lexend, sans-serif;
    font-weight: 300;
    font-size: 12px;
    line-height: 160%;
    color: rgba(100, 103, 115, 0.7);
    font-style: italic;
}

/* ===== ENTRANCE ANIMATION ===== */

.hcEstimator--hidden {
    opacity: 0;
    transform: translateY(24px);
}

.hcEstimator--visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {
    .hcEstimator__cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .hcEstimator {
        padding: 24px 20px;
    }

    .hcEstimator__cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .hcEstimator__segments {
        grid-template-columns: 1fr;
    }

    .hcEstimator__segText {
        white-space: normal;
    }

    .hcEstimator__resultRow {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hcEstimator__barLegend {
        gap: 10px;
    }
}

@media (max-width: 400px) {
    .hcEstimator__cards {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .hcEstimator__card {
        padding: 14px 14px;
    }

    .hcEstimator__cardLabel {
        font-size: 13px;
    }

    .hcEstimator__seg {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
    .hcEstimator--hidden,
    .hcEstimator--visible {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .hcEstimator__card,
    .hcEstimator__segSlider,
    .hcEstimator__stackedSeg,
    .hcEstimator__ctaBtn,
    .hcEstimator__seg--active .hcEstimator__segBadge {
        animation: none !important;
        transition: none !important;
    }

    .hcEstimator__card::after {
        transition: none !important;
    }
}
