/* AI/ML Our Approach v2 — sticky shell with rail + main panel; scoped to .sd-approach-v2. */

.sd-approach-v2 {
    position: relative;
}

.sd-approach-v2 .container > .sd-cap-header {
    max-width: 52rem;
}

.sd-approach-v2 .sd-cap-header .sd-section-title {
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.sd-approach-v2 .sd-bullet-list li {
    color: rgba(226, 232, 240, 0.82);
}

/* ---------------- Outer shell ---------------- */

.sd-approach-v2-shell {
    background:
        radial-gradient(circle at 87% 8%, rgba(112, 46, 255, 0.18), transparent 44%),
        radial-gradient(circle at 8% 82%, rgba(59, 150, 255, 0.12), transparent 42%),
        linear-gradient(160deg, rgba(7, 10, 29, 0.98), rgba(6, 8, 22, 0.98));
    border: 1px solid rgba(102, 85, 255, 0.2);
    border-radius: 18px;
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(59, 150, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

/* ---------------- Rail (left column) ---------------- */

.sd-approach-v2-rail {
    background: linear-gradient(180deg, rgba(9, 13, 36, 0.96), rgba(7, 10, 26, 0.95));
    padding: 1.25rem 1rem;
}

.sd-approach-v2-rail-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding-top: 0.2rem;
}

.sd-approach-v2-rail-kicker {
    flex-shrink: 0;
    letter-spacing: 0.12em !important;
    font-size: 0.65rem !important;
    padding-bottom: 0.75rem;
    margin-bottom: 0.65rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sd-approach-v2-rail-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 150, 255, 0.4) transparent;
}

.sd-approach-v2-rail-scroll::-webkit-scrollbar {
    width: 5px;
}

.sd-approach-v2-rail-scroll::-webkit-scrollbar-thumb {
    background: rgba(59, 150, 255, 0.35);
    border-radius: 999px;
}

.sd-approach-v2-rail-track {
    display: none !important;
}

/* ---------------- Rail buttons ---------------- */

.sd-approach-v2-rail-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    text-align: left;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(104, 126, 255, 0.22);
    border-radius: 14px;
    background: linear-gradient(130deg, rgba(8, 12, 35, 0.68), rgba(6, 10, 28, 0.62));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sd-approach-v2-rail-btn:hover {
    background: rgba(255, 255, 255, 0.04);
}

.sd-approach-v2-rail-btn.active {
    background: linear-gradient(100deg, rgba(71, 54, 184, 0.36), rgba(38, 24, 101, 0.34));
    border-color: rgba(139, 108, 255, 0.78);
    box-shadow:
        0 10px 24px rgba(7, 7, 26, 0.5),
        0 0 0 1px rgba(143, 96, 255, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Connector line behind the icon column */
.sd-approach-v2-rail-btn::before {
    content: '';
    position: absolute;
    left: calc(0.65rem + 20px);
    top: -0.5rem;
    bottom: -0.5rem;
    width: 1px;
    background: linear-gradient(180deg, rgba(92, 135, 255, 0.05), rgba(104, 126, 255, 0.38), rgba(92, 135, 255, 0.05));
    z-index: 0;
}

.sd-approach-v2-rail-btn:first-child::before {
    top: calc(50% + 20px);
}

.sd-approach-v2-rail-btn:last-child::before {
    bottom: calc(50% + 20px);
}

/* Number + description elements are still emitted in the markup but hidden in v2. */
.sd-approach-v2-rail-num,
.sd-approach-v2-rail-desc {
    display: none !important;
}

.sd-approach-v2-rail-icon {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(145deg, rgba(11, 17, 52, 0.95), rgba(7, 12, 36, 0.92));
    border: 1px solid rgba(128, 150, 255, 0.24);
    color: rgba(139, 172, 255, 0.62);
    font-size: 1rem;
}

/* brand-override.css forces .bi-gear-wide-connected to magenta globally */
.sd-approach-v2-rail-icon .bi,
.sd-tl-dot .bi {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

.sd-approach-v2-rail-btn.active .sd-approach-v2-rail-icon {
    border-color: rgba(148, 97, 255, 0.78);
    color: #9f6bff;
    box-shadow: 0 0 0 4px rgba(128, 70, 255, 0.18);
}

.sd-approach-v2-rail-text {
    min-width: 0;
    flex: 1;
}

.sd-approach-v2-rail-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.96);
}

.sd-approach-v2-rail-arrow {
    margin-left: auto;
    align-self: center;
    color: rgba(167, 178, 255, 0.7);
    font-size: 0.96rem;
}

.sd-approach-v2-rail-btn.active .sd-approach-v2-rail-arrow {
    color: #cdb7ff;
}

/* ---------------- Main panel (right column) ---------------- */

.sd-approach-v2-main {
    background:
        radial-gradient(circle at 90% 10%, rgba(123, 79, 255, 0.14), transparent 42%),
        linear-gradient(145deg, rgba(10, 13, 34, 0.96), rgba(7, 10, 26, 0.98));
    padding: 1.5rem 1.25rem 2rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.sd-approach-v2-service-panel {
    border-radius: 18px;
    border: 1px solid rgba(143, 98, 255, 0.24);
    border-left: 2px solid rgba(136, 91, 255, 0.44);
    padding: 1.5rem 1.35rem 1.75rem;
    margin-bottom: 0;
    background:
        radial-gradient(circle at 93% 10%, rgba(126, 78, 255, 0.18), transparent 42%),
        linear-gradient(145deg, rgba(12, 16, 42, 0.94), rgba(8, 12, 31, 0.95));
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
    overflow: visible;
}

.sd-approach-v2-service-panel .sd-pane-lead {
    max-width: 44rem;
}

.sd-approach-v2-service-panel .sd-approach-v2-stephead {
    min-height: clamp(320px, 42vh, 430px);
}

/* Step (service) head — only the active one shows */
.sd-approach-v2-stephead {
    display: none;
}

.sd-approach-v2-stephead.active {
    display: block;
}

.sd-approach-v2-stephead .sd-pane-title {
    font-size: clamp(1.5rem, 1.5vw + 1rem, 1.95rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.65rem !important;
    letter-spacing: -0.01em;
}

.sd-approach-v2-stephead .sd-pane-lead {
    font-size: clamp(0.95rem, 0.25vw + 0.9rem, 1.02rem);
    line-height: 1.6;
    color: rgba(214, 222, 245, 0.82);
    margin-bottom: 0;
    max-width: 44rem;
}

/* ---------------- Outcome Snapshot (from v1 timeline) ---------------- */

.sd-approach-v2-outcome-snapshot {
    margin-top: 1.65rem;
    padding-top: 1.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.sd-approach-v2-outcome-snapshot .sd-outcomes-copy {
    margin-top: 0.45rem;
}

.sd-approach-v2-outcome-snapshot .sd-outcome-stats {
    margin-top: 0.85rem;
}

/* ---------------- Quick links inside each panel ---------------- */

.sd-approach-v2-quick-links {
    margin-top: 1.65rem;
}

.sd-approach-v2-quick-links-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.7rem;
    letter-spacing: 0.005em;
}

.sd-approach-v2-quick-links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.sd-approach-v2-quick-links-grid .sd-approach-v2-case-link {
    background: transparent;
    border: 0 !important;
    padding: 0.45rem 0;
    grid-template-columns: 20px 1fr 16px;
    gap: 0.65rem;
    border-radius: 0;
    transition: color 0.18s ease, transform 0.18s ease;
}

.sd-approach-v2-quick-links-grid .sd-approach-v2-case-link i {
    color: rgba(167, 178, 255, 0.85);
    font-size: 1rem;
}

.sd-approach-v2-quick-links-grid .sd-approach-v2-case-link i:last-child {
    color: rgba(167, 178, 255, 0.6);
    font-size: 0.9rem;
    transition: transform 0.18s ease, color 0.18s ease;
}

.sd-approach-v2-quick-links-grid .sd-approach-v2-case-link span {
    font-size: 0.92rem;
    line-height: 1.45;
    color: rgba(232, 238, 255, 0.92);
}

.sd-approach-v2-quick-links-grid .sd-approach-v2-case-link:hover {
    background: transparent;
    transform: translateX(2px);
}

.sd-approach-v2-quick-links-grid .sd-approach-v2-case-link:hover i:last-child {
    color: #cdb7ff;
    transform: translateX(3px);
}

.sd-approach-v2-quick-links-grid .sd-approach-v2-case-link:hover span {
    color: #ffffff;
}

/* Base case-link layout (kept minimal; the quick-links-grid variant overrides visuals). */
.sd-approach-v2-case-link {
    display: grid;
    grid-template-columns: 18px 1fr 16px;
    gap: 0.55rem;
    align-items: center;
    color: rgba(232, 238, 255, 0.88);
    text-decoration: none;
}

/* ---------------- CTA row at the bottom of each panel ---------------- */

.sd-approach-v2-cta-row {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem 1rem;
}

.sd-approach-v2-cta-text {
    color: rgba(218, 227, 255, 0.82);
    font-size: 0.95rem;
}

.sd-approach-v2-journey-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    background: linear-gradient(95deg, #3b96ff 0%, #8b5cf6 60%, #b061ff 100%);
    color: #ffffff !important;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 24px rgba(94, 51, 220, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.sd-approach-v2-journey-btn:hover,
.sd-approach-v2-journey-btn:focus-visible {
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(94, 51, 220, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    filter: brightness(1.05);
}

.sd-approach-v2-journey-btn i {
    font-size: 1rem;
    line-height: 1;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 575.98px) {
    .sd-approach-v2-cta-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .sd-approach-v2-journey-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 991.98px) {
    .sd-approach-v2-shell {
        overflow: visible;
    }

    .sd-approach-v2-rail {
        display: none;
    }

    .sd-approach-v2-main {
        border-left: 0;
        padding: 1rem;
    }

    .sd-approach-v2-service-panel {
        border: 0;
        border-left: 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }

    .sd-approach-v2-service-panel .sd-approach-v2-stephead {
        display: block !important;
        min-height: 0;
        margin-bottom: 1rem;
        padding: 1.25rem;
        border: 1px solid rgba(143, 98, 255, 0.24);
        border-left: 2px solid rgba(136, 91, 255, 0.44);
        border-radius: 16px;
        background:
            radial-gradient(circle at 93% 10%, rgba(126, 78, 255, 0.16), transparent 42%),
            linear-gradient(145deg, rgba(12, 16, 42, 0.94), rgba(8, 12, 31, 0.95));
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
    }

    .sd-approach-v2-service-panel .sd-approach-v2-stephead:last-child {
        margin-bottom: 0;
    }

    .sd-approach-v2-stephead .sd-pane-title {
        font-size: clamp(1.2rem, 5.5vw, 1.55rem);
    }

    .sd-approach-v2-stephead .sd-pane-lead {
        font-size: 0.94rem;
    }

    .sd-approach-v2-quick-links {
        margin-top: 1.25rem;
    }
}

@media (min-width: 768px) {
    .sd-approach-v2-quick-links-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

@media (min-width: 992px) {
    .sd-approach-v2 {
        --sd-v2-step-count: 10;
        --sd-v2-step-scroll: 45vh;
    }

    .sd-approach-v2 > .container {
        min-height: calc((var(--sd-v2-step-count) - 1) * var(--sd-v2-step-scroll) + 100vh);
    }

    .sd-approach-v2-shell {
        position: sticky;
        top: 96px;
        align-self: flex-start;
        overflow: visible;
    }

    .sd-approach-v2-shell .row.g-0.flex-lg-nowrap.align-items-lg-stretch {
        align-items: flex-start;
        min-height: 0;
    }

    .sd-approach-v2-shell .sd-approach-v2-rail {
        position: relative;
        align-self: stretch;
        max-height: none;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-height: 100%;
    }

    .sd-approach-v2-main {
        position: static;
        padding: 2rem 2.25rem 2.5rem;
    }

    .sd-approach-v2-service-panel {
        padding: 2rem 1.85rem 1.6rem;
    }
}
