/* ================================================================
   MEDENTICA QUATTROCONE — SMART CLINIC
   interactive.css — Phase 5: Interactive Product Experience
   Loaded after conversion.css. Design tokens from landing.css.
   ================================================================ */


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   § 1 · MODULE 1 — INTERACTIVE 3D IMPLANT VIEWER
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.section-implant-viewer {
    padding-block: var(--sp-section);
    background: var(--c-bg);
    position: relative;
    overflow: hidden;
}

.section-implant-viewer::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 50% 60% at 75% 50%, rgba(93,225,255,0.06), transparent 65%),
        radial-gradient(ellipse 40% 50% at 25% 50%, rgba(225,6,0,0.04), transparent 60%);
    pointer-events: none;
}

.viewer-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 3.5rem;
}

/* ── Info panel ── */
.viewer-info {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.component-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comp-tab {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: all var(--dur-fast);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.comp-tab::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--c-red);
    transform: scaleY(0);
    transition: transform var(--dur-fast);
}

.comp-tab:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }
.comp-tab.active { background: rgba(225,6,0,0.08); border-color: rgba(225,6,0,0.3); }
.comp-tab.active::before { transform: scaleY(1); }

.comp-tab-icon { font-size: 1.375rem; line-height: 1; flex-shrink: 0; }

.comp-tab-labels { display: flex; flex-direction: column; gap: 0.125rem; }
.comp-tab-en { font-size: var(--t-sm); font-weight: 600; color: var(--c-white); }
.comp-tab-fa { font-family: var(--f-fa); font-size: var(--t-xs); color: var(--c-muted); }

/* ── Component info cards ── */
.comp-info-cards { position: relative; min-height: 180px; }

.comp-info-card {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    padding: 1.5rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
}

.comp-info-card.active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    position: relative;
}

.comp-info-title {
    font-size: var(--t-base);
    font-weight: 700;
    color: var(--c-white);
    margin-bottom: 0.625rem;
}

.comp-info-text {
    font-size: var(--t-sm);
    color: var(--c-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.comp-info-text-fa {
    font-family: var(--f-fa);
    font-size: var(--t-xs);
    color: var(--c-faint);
    line-height: 1.7;
    direction: rtl;
}

.comp-info-specs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.comp-spec-tag {
    font-size: var(--t-xs);
    font-weight: 600;
    padding: 0.2rem 0.625rem;
    border-radius: var(--r-full);
    background: var(--c-cyan-dim);
    border: 1px solid rgba(93,225,255,0.2);
    color: var(--c-cyan);
    letter-spacing: 0.03em;
}

/* ── 3D Canvas wrapper ── */
.viewer-canvas-wrapper {
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: radial-gradient(ellipse at center, #0d1628 0%, #080c14 100%);
    border: 1px solid var(--c-border);
    aspect-ratio: 4 / 3;
    cursor: grab;
}

.viewer-canvas-wrapper:active { cursor: grabbing; }

#implant-canvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

.viewer-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: var(--t-xs);
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.viewer-hint::before { content: '⟳'; font-size: 1rem; }

.viewer-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: var(--t-sm);
    color: var(--c-muted);
    background: radial-gradient(ellipse at center, #0d1628, #080c14);
    transition: opacity 0.5s ease;
}

.viewer-loading.hidden { opacity: 0; pointer-events: none; }

.viewer-spinner {
    width: 32px; height: 32px;
    border: 2px solid rgba(93,225,255,0.15);
    border-top-color: var(--c-cyan);
    border-radius: 50%;
    animation: v-spin 0.8s linear infinite;
}

@keyframes v-spin { to { transform: rotate(360deg); } }

.viewer-part-label {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: var(--t-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-cyan);
    opacity: 0;
    transition: opacity 0.3s;
}

.viewer-canvas-wrapper:hover .viewer-part-label { opacity: 1; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   § 2 · MODULE 2 — BONE JOURNEY (SCROLL STORYTELLING)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.section-bone-journey {
    /* Height provides scroll room: sticky panel stays fixed */
    height: 400vh;
    position: relative;
    background: var(--c-bg-alt);
}

.bone-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

.bone-sticky::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(225,6,0,0.04), transparent);
    pointer-events: none;
}

.bone-eyebrow {
    font-size: var(--t-xs);
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--c-red);
    margin-bottom: 0.5rem;
    text-align: center;
}

.bone-main-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--c-white);
    text-align: center;
    letter-spacing: -0.03em;
    margin-bottom: 2.5rem;
}

.bone-stage-area {
    display: grid;
    grid-template-columns: 1fr 320px 1fr;
    gap: 2rem;
    align-items: center;
    width: 100%;
    max-width: 960px;
}

.bone-stage-text {
    text-align: right;
}

.bone-stage-number {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(225,6,0,0.3);
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.bone-stage-title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 800;
    color: var(--c-white);
    letter-spacing: -0.02em;
    margin-bottom: 0.375rem;
}

.bone-stage-title-fa {
    font-family: var(--f-fa);
    font-size: var(--t-sm);
    color: var(--c-red);
    direction: rtl;
    display: block;
    margin-bottom: 0.75rem;
}

.bone-stage-desc {
    font-size: var(--t-sm);
    color: var(--c-muted);
    line-height: 1.75;
}

.bone-stage-facts {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.bone-fact {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: var(--t-xs);
    color: var(--c-muted);
    line-height: 1.5;
}

.bone-fact-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--c-cyan);
    flex-shrink: 0;
    margin-top: 0.35em;
}

/* ── CSS dental cross-section illustration ── */
.bone-illustration {
    width: 320px;
    height: 320px;
    position: relative;
    filter: drop-shadow(0 20px 60px rgba(0,0,0,0.5));
}

.bcs {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(0.96) translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s var(--ease-spring);
    pointer-events: none;
}

.bcs.bcs-active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

/* Shared elements */
.bcs-wrap {
    position: absolute;
    bottom: 0; left: 10%; right: 10%;
    top: 20%;
}

.bcs-bone-block {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 48%;
    background: linear-gradient(to bottom, #c8a87a 0%, #b89060 40%, #a07840 100%);
    border-radius: 4px 4px 12px 12px;
}

.bcs-bone-block::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent 0, transparent 8px,
        rgba(255,255,255,0.04) 8px, rgba(255,255,255,0.04) 9px
    );
    border-radius: inherit;
}

.bcs-gum {
    position: absolute;
    left: 0; right: 0;
    bottom: 48%;
    height: 52px;
    background: linear-gradient(to bottom, #f0a0a8 0%, #d88090 100%);
    border-radius: 55% 55% 0 0 / 70% 70% 0 0;
}

/* Phase 0 — Before (natural tooth for reference) */
.bcs-tooth-crown {
    position: absolute;
    width: 64px;
    height: 52px;
    background: linear-gradient(160deg, #f8f5f0, #ede8e0);
    border-radius: 50% 50% 35% 35% / 45% 45% 30% 30%;
    box-shadow: inset 0 -4px 12px rgba(0,0,0,0.1), 0 4px 16px rgba(0,0,0,0.2);
    left: 50%; bottom: calc(48% + 28px);
    transform: translateX(-50%);
}

.bcs-tooth-root {
    position: absolute;
    width: 14px;
    height: 52px;
    background: linear-gradient(to bottom, #f0ece4, #d8d0c4);
    border-radius: 3px 3px 6px 6px;
    bottom: 48%;
    left: 50%;
    transform: translateX(-50%);
}

.bcs-tooth-root-l {
    position: absolute;
    width: 10px; height: 42px;
    background: linear-gradient(to bottom, #d8d0c4, #c4bab0);
    border-radius: 3px 3px 5px 5px;
    bottom: 48%;
    left: calc(50% - 14px);
    transform: rotate(-6deg);
    transform-origin: top center;
}

.bcs-tooth-root-r {
    position: absolute;
    width: 10px; height: 42px;
    background: linear-gradient(to bottom, #d8d0c4, #c4bab0);
    border-radius: 3px 3px 5px 5px;
    bottom: 48%;
    right: calc(50% - 14px);
    transform: rotate(6deg);
    transform-origin: top center;
}

/* Phase 1 — Extraction (empty socket + arrow) */
.bcs-socket {
    position: absolute;
    width: 32px; height: 56px;
    bottom: 48%;
    left: 50%; transform: translateX(-50%);
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.15));
    border: 2px dashed rgba(200,160,100,0.5);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.bcs-extract-arrow {
    position: absolute;
    width: 2px; height: 50px;
    background: linear-gradient(to top, transparent, #e10600);
    left: 50%; transform: translateX(-50%);
    bottom: calc(48% + 52px);
}

.bcs-extract-arrow::after {
    content: '';
    position: absolute;
    top: -6px; left: -6px;
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 10px solid #e10600;
}

/* Phase 2 — Implant placement */
.bcs-implant {
    position: absolute;
    width: 20px; height: 90px;
    left: 50%; transform: translateX(-50%);
    bottom: calc(48% - 10px);
}

.bcs-implant-body-shape {
    width: 100%; height: 100%;
    background: linear-gradient(to right, #8090a4, #c0d0e0, #8090a4);
    border-radius: 3px 3px 4px 4px;
    position: relative;
    overflow: hidden;
}

.bcs-implant-body-shape::before {
    content: '';
    position: absolute;
    inset: 12% 0 8%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0, transparent 5px,
        rgba(0,0,0,0.18) 5px, rgba(0,0,0,0.18) 7px
    );
}

.bcs-implant-tip {
    position: absolute;
    bottom: -8px; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #8090a4;
}

.bcs-placement-arrow {
    position: absolute;
    width: 2px; height: 30px;
    background: linear-gradient(to bottom, #5DE1FF, transparent);
    left: 50%; transform: translateX(-50%);
    bottom: calc(48% + 90px);
    animation: drop-in 1s ease-in-out infinite;
}

@keyframes drop-in {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(-6px); }
    50%       { opacity: 1;   transform: translateX(-50%) translateY(0); }
}

.bcs-placement-arrow::after {
    content: '';
    position: absolute;
    bottom: -6px; left: -6px;
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid #5DE1FF;
}

/* Phase 2 — Healing cap */
.bcs-healing-cap {
    position: absolute;
    width: 28px; height: 12px;
    background: linear-gradient(to bottom, #a0b4c8, #7890a8);
    border-radius: 4px 4px 2px 2px;
    left: 50%; transform: translateX(-50%);
    bottom: calc(48% + 78px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Osseointegration glow */
.bcs-osseo {
    position: absolute;
    width: 44px; height: 72px;
    left: 50%; transform: translateX(-50%);
    bottom: 48%;
    border: 2px dashed rgba(200,160,80,0.5);
    border-radius: 4px 4px 0 0;
    animation: osseo-pulse 2.4s ease-in-out infinite;
}

@keyframes osseo-pulse {
    0%, 100% { border-color: rgba(200,160,80,0.3); box-shadow: none; }
    50%       { border-color: rgba(200,160,80,0.7); box-shadow: 0 0 16px rgba(200,160,80,0.2); }
}

/* Phase 3 — Final (crown + abutment + body) */
.bcs-final-crown {
    position: absolute;
    width: 56px; height: 44px;
    background: linear-gradient(160deg, #f8f5f2, #ede8e2);
    border-radius: 50% 50% 35% 35% / 45% 45% 30% 30%;
    box-shadow: inset 0 -4px 8px rgba(0,0,0,0.08), 0 6px 20px rgba(0,0,0,0.25);
    left: 50%; bottom: calc(48% + 36px);
    transform: translateX(-50%);
}

.bcs-final-abutment {
    position: absolute;
    width: 14px; height: 30px;
    background: linear-gradient(to right, #a88050, #d4a868, #a88050);
    border-radius: 3px 3px 2px 2px;
    left: 50%; transform: translateX(-50%);
    bottom: calc(48% + 8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ── Progress dots ── */
.bone-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.bone-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--c-border);
    transition: background var(--dur-base), transform var(--dur-base);
    position: relative;
}

.bone-dot::after {
    content: attr(data-label);
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--c-faint);
    white-space: nowrap;
    transition: color var(--dur-base);
}

.bone-dot.active { background: var(--c-red); transform: scale(1.4); }
.bone-dot.active::after { color: var(--c-muted); }
.bone-dot.done { background: rgba(93,225,255,0.5); }

.bone-dot-line {
    flex: 1;
    height: 1px;
    background: var(--c-border);
    transition: background var(--dur-base);
}

.bone-dot-line.done { background: rgba(93,225,255,0.4); }

/* mobile fallback — stack phases */
.bone-mobile-fallback {
    display: none;
    flex-direction: column;
    gap: 2rem;
    padding: var(--sp-section) 0;
}

.bone-mobile-phase { padding: 1.5rem; }
.bone-mobile-phase h3 { font-size: var(--t-h3); font-weight: 800; color: var(--c-white); margin-bottom: 0.5rem; }
.bone-mobile-phase p  { font-size: var(--t-sm); color: var(--c-muted); line-height: 1.7; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   § 3 · MODULE 3 — BEFORE / AFTER SLIDER
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.section-before-after {
    padding-block: var(--sp-section);
    background: var(--c-bg);
}

.ba-container {
    margin-top: 3rem;
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--c-border);
    aspect-ratio: 16 / 7;
    user-select: none;
    touch-action: none;
    cursor: col-resize;
}

/* BEFORE panel (full width, clipped from right) */
.ba-before,
.ba-after {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.ba-before {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f1120 100%);
    clip-path: inset(0 calc(100% - var(--split, 50%)) 0 0);
}

.ba-after {
    background: linear-gradient(135deg, #0a1828 0%, #0d1825 100%);
}

/* Content inside panels */
.ba-panel-illustration {
    position: relative;
    width: 140px; height: 110px;
}

/* Before: missing tooth gap */
.ba-teeth-before {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 100%;
    align-items: center;
}

.ba-tooth-block {
    width: 28px;
    height: 70px;
    background: linear-gradient(to bottom, #f0ece4, #d8d0c4);
    border-radius: 6px 6px 3px 3px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.ba-tooth-gap {
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,0.4);
    border-radius: 4px;
    border: 2px dashed rgba(200,100,100,0.4);
    align-self: flex-end;
    position: relative;
}

.ba-tooth-gap::after {
    content: '×';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(200,100,100,0.5);
    font-size: 1rem;
}

/* After: full implant smile */
.ba-teeth-after {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    align-items: center;
}

.ba-tooth-block-after {
    width: 28px;
    height: 70px;
    background: linear-gradient(to bottom, #f8f5f2, #ede8e4);
    border-radius: 6px 6px 3px 3px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.ba-implant-tooth {
    width: 30px; height: 72px;
    background: linear-gradient(160deg, #f8f5f2, #ece8e4);
    border-radius: 8px 8px 4px 4px;
    box-shadow: 0 4px 16px rgba(93,225,255,0.2), 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid rgba(93,225,255,0.15);
    position: relative;
}

.ba-implant-tooth::after {
    content: '✦';
    position: absolute;
    top: 4px; left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    color: var(--c-cyan);
    opacity: 0.6;
}

.ba-panel-label {
    position: absolute;
    bottom: 1rem;
    font-size: var(--t-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.875rem;
    border-radius: var(--r-full);
}

.ba-before .ba-panel-label {
    left: 1.25rem;
    background: rgba(225,6,0,0.12);
    border: 1px solid rgba(225,6,0,0.25);
    color: #fc8181;
}

.ba-after .ba-panel-label {
    right: 1.25rem;
    background: rgba(93,225,255,0.1);
    border: 1px solid rgba(93,225,255,0.2);
    color: var(--c-cyan);
}

/* ── Slider handle ── */
.ba-handle {
    position: absolute;
    top: 0; bottom: 0;
    left: var(--split, 50%);
    transform: translateX(-50%);
    width: 3px;
    background: #fff;
    z-index: 10;
    pointer-events: none;
}

.ba-handle-grip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px; height: 44px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    pointer-events: none;
}

.ba-arrow {
    font-size: 0.875rem;
    color: #1a1a2e;
    font-weight: 900;
    line-height: 1;
}

/* ── Caption ── */
/* Multi-case: hide inactive containers, show active */
.ba-container        { display: none; }
.ba-container.active { display: block; }

/* Real image fills */
.ba-before img,
.ba-after img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
    user-select: none;
}

/* Case tabs */
.ba-tabs {
    display: flex;
    gap: 0.625rem;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 1.25rem;
}

.ba-tab {
    padding: 0.45rem 1.75rem;
    border-radius: var(--r-full);
    border: 1px solid var(--c-border);
    background: transparent;
    color: var(--c-muted);
    font-size: var(--t-sm);
    font-weight: 600;
    font-family: var(--f-fa);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ba-tab:hover,
.ba-tab.active {
    background: rgba(225,6,0,0.1);
    border-color: rgba(225,6,0,0.3);
    color: #fc8181;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   § 4 · MODULE 4 — TREATMENT JOURNEY (INTERACTIVE STEPS)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.section-treatment-journey {
    padding-block: var(--sp-section);
    background: var(--c-bg-alt);
}

.journey-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
    margin-top: 3.5rem;
}

/* ── Left: step list ── */
.journey-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

/* vertical connector line */
.journey-steps::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: linear-gradient(to bottom, var(--c-red), var(--c-cyan));
    opacity: 0.3;
}

.journey-step {
    display: flex;
    gap: 1.25rem;
    padding: 1rem 0;
    cursor: pointer;
    position: relative;
}

.step-node {
    flex-shrink: 0;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid var(--c-border);
    background: var(--c-bg-alt);
    display: grid;
    place-items: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--c-muted);
    transition: all var(--dur-base) var(--ease-spring);
    position: relative;
    z-index: 1;
}

.journey-step:hover .step-node,
.journey-step.active  .step-node {
    border-color: var(--c-red);
    background: var(--c-red-dim);
    color: var(--c-white);
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(225,6,0,0.1);
}

.step-meta {
    flex: 1;
    padding-top: 0.25rem;
}

.step-title-en {
    font-size: var(--t-sm);
    font-weight: 700;
    color: var(--c-white);
    transition: color var(--dur-fast);
}

.step-title-fa {
    font-family: var(--f-fa);
    font-size: var(--t-xs);
    color: var(--c-muted);
    direction: rtl;
}

.step-duration {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-faint);
}

/* ── Right: active step detail card ── */
.journey-detail {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
}

.journey-detail-card {
    padding: 2rem;
    display: none;
}

.journey-detail-card.active { display: flex; flex-direction: column; gap: 1.25rem; }

.journey-detail-icon {
    width: 56px; height: 56px;
    border-radius: var(--r-md);
    background: var(--c-red-dim);
    border: 1px solid rgba(225,6,0,0.2);
    display: grid;
    place-items: center;
    font-size: 1.5rem;
}

.journey-detail-num {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-red);
}

.journey-detail-title {
    font-size: var(--t-h3);
    font-weight: 800;
    color: var(--c-white);
    letter-spacing: -0.02em;
}

.journey-detail-title-fa {
    font-family: var(--f-fa);
    font-size: var(--t-sm);
    color: var(--c-muted);
    direction: rtl;
}

.journey-detail-body {
    font-size: var(--t-sm);
    color: var(--c-muted);
    line-height: 1.8;
}

.journey-detail-body-fa {
    font-family: var(--f-fa);
    font-size: var(--t-sm);
    color: var(--c-muted);
    line-height: 1.9;
    direction: rtl;
}

.journey-detail-bullets {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.journey-bullet {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: var(--t-xs);
    color: var(--c-muted);
}

.journey-bullet-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--c-cyan);
    flex-shrink: 0;
}

.journey-detail-dur-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.875rem;
    background: rgba(93,225,255,0.08);
    border: 1px solid rgba(93,225,255,0.2);
    border-radius: var(--r-full);
    font-size: var(--t-xs);
    font-weight: 700;
    color: var(--c-cyan);
    width: fit-content;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   § 5 · MODULE 5 — IMPLANT SYSTEM EXPLAINER
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.section-system-explainer {
    padding-block: var(--sp-section);
    background: var(--c-bg);
    overflow: hidden;
    position: relative;
}

.system-explainer-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    margin-top: 3.5rem;
}

/* ── Animated diagram ── */
.system-diagram {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.sys-component {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s var(--ease-spring);
}

.sys-component.revealed {
    opacity: 1;
    transform: none;
}

.sys-component:nth-child(1) { transition-delay: 0.1s; }
.sys-component:nth-child(3) { transition-delay: 0.25s; }
.sys-component:nth-child(5) { transition-delay: 0.4s; }
.sys-component:nth-child(7) { transition-delay: 0.55s; }

.sys-icon-block {
    flex-shrink: 0;
    width: 64px; height: 64px;
    border-radius: var(--r-md);
    display: grid;
    place-items: center;
    font-size: 1.75rem;
    position: relative;
    transition: transform 0.4s var(--ease-spring), box-shadow 0.4s;
}

.sys-icon-block:hover {
    transform: scale(1.1) translateY(-3px);
}

.sys-icon-crown  { background: linear-gradient(135deg, #2a2030, #3a2840); border: 1px solid rgba(248,245,240,0.15); box-shadow: 0 8px 24px rgba(248,245,240,0.08); }
.sys-icon-abut   { background: linear-gradient(135deg, #20281a, #2c3820); border: 1px solid rgba(180,140,80,0.2);  box-shadow: 0 8px 24px rgba(180,140,80,0.1); }
.sys-icon-body   { background: linear-gradient(135deg, #1a2030, #1e2840); border: 1px solid rgba(128,160,200,0.2); box-shadow: 0 8px 24px rgba(128,160,200,0.1); }
.sys-icon-lab    { background: linear-gradient(135deg, #201820, #2c2030); border: 1px solid rgba(225,6,0,0.2);     box-shadow: 0 8px 24px rgba(225,6,0,0.08); }

.sys-text { flex: 1; }
.sys-name { font-size: var(--t-base); font-weight: 700; color: var(--c-white); }
.sys-name-fa { font-family: var(--f-fa); font-size: var(--t-xs); color: var(--c-muted); direction: rtl; display: block; }
.sys-desc { font-size: var(--t-xs); color: var(--c-faint); margin-top: 0.25rem; line-height: 1.5; }

/* Connector line between components */
.sys-connector {
    width: 2px;
    height: 28px;
    background: linear-gradient(to bottom, var(--c-border), var(--c-border));
    margin-left: 31px; /* align with center of icon-block */
    opacity: 0;
    transition: opacity 0.4s ease, background 0.4s;
    flex-shrink: 0;
    align-self: flex-start;
}

.sys-connector.revealed {
    opacity: 1;
    background: linear-gradient(to bottom, rgba(225,6,0,0.4), rgba(93,225,255,0.4));
}

/* ── Copy side ── */
.system-copy {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.system-highlight-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sys-highlight {
    padding: 1.25rem;
    border-radius: var(--r-md);
    border: 1px solid var(--c-border);
    background: rgba(255,255,255,0.02);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: border-color var(--dur-fast), background var(--dur-fast);
}

.sys-highlight:hover {
    border-color: rgba(93,225,255,0.2);
    background: rgba(93,225,255,0.03);
}

.sys-highlight-icon { font-size: 1.25rem; flex-shrink: 0; }

.sys-highlight-text h4 { font-size: var(--t-sm); font-weight: 700; color: var(--c-white); margin-bottom: 0.25rem; }
.sys-highlight-text p  { font-size: var(--t-xs); color: var(--c-muted); line-height: 1.6; }


/* ── Services grid ── */
.se-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 3.5rem;
}

.se-service-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease-spring);
}

.se-service-card:hover {
    background: rgba(225,6,0,0.05);
    border-color: rgba(225,6,0,0.25);
    transform: translateY(-3px);
}

.se-svc-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    background: rgba(225,6,0,0.08);
    border: 1px solid rgba(225,6,0,0.15);
    border-radius: var(--r-sm);
    flex-shrink: 0;
}

.se-svc-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.se-svc-name {
    font-size: var(--t-base);
    font-weight: 700;
    color: var(--c-white);
    margin: 0;
}

.se-svc-desc {
    font-size: var(--t-xs);
    color: var(--c-muted);
    line-height: 1.65;
    margin: 0;
}

@media (max-width: 640px) {
    .se-services-grid { grid-template-columns: 1fr; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   § 6 · MODULE 7 — DOCTOR INTRODUCTION
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.section-doctor {
    padding-block: var(--sp-section);
    background: var(--c-bg-alt);
}

.doctor-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 5rem;
    align-items: center;
    margin-top: 3.5rem;
}

.doctor-photo-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.doctor-photo-frame {
    width: 280px; height: 280px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a2030 0%, #0d1828 100%);
    border: 2px solid var(--c-border);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* Placeholder avatar */
.doctor-photo-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 20%, rgba(93,225,255,0.06), transparent);
}

.doctor-avatar-placeholder {
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--c-faint);
    font-size: var(--t-xs);
}

.doctor-avatar-icon {
    font-size: 4rem;
    filter: grayscale(1) opacity(0.4);
}

.doctor-photo-badge {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--c-red);
    color: #fff;
    font-size: var(--t-xs);
    font-weight: 700;
    padding: 0.35rem 1.125rem;
    border-radius: var(--r-full);
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(225,6,0,0.35);
    letter-spacing: 0.04em;
}

.doctor-credentials {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    justify-content: center;
}

.cred-item {
    text-align: center;
}

.cred-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--c-white);
    letter-spacing: -0.03em;
    display: block;
}

.cred-label {
    font-family: var(--f-fa);
    font-size: var(--t-xs);
    color: var(--c-muted);
}

/* ── Doctor photo image ── */
.doctor-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    position: relative;
    z-index: 1;
}

/* ── Doctor slider ── */
.doctor-slider {
    position: relative;
    overflow: hidden;
    margin-top: 3.5rem;
}

.doctor-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.doctor-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.doctor-slider .doctor-layout {
    margin-top: 0;
}

/* ── Slider navigation ── */
.doctor-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.doctor-nav-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--c-border);
    background: transparent;
    color: var(--c-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast);
    flex-shrink: 0;
}

.doctor-nav-btn:hover {
    border-color: var(--c-red);
    color: var(--c-red);
    background: rgba(225,6,0,0.06);
}

.doctor-dots {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.doctor-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--c-border);
    cursor: pointer;
    padding: 0;
    transition: width var(--dur-base), background var(--dur-base), border-radius var(--dur-base);
}

.doctor-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--c-red);
}

/* ── Doctor copy ── */
.doctor-copy { display: flex; flex-direction: column; gap: 1.75rem; }

.doctor-name {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--c-white);
    letter-spacing: -0.03em;
}

.doctor-name span { color: var(--c-cyan); }

.doctor-title {
    font-size: var(--t-sm);
    color: var(--c-muted);
    margin-top: 0.25rem;
}

.doctor-message {
    font-family: var(--f-fa);
    font-size: var(--t-base);
    color: var(--c-muted);
    line-height: 1.85;
    direction: rtl;
    padding: 1.5rem;
    background: rgba(255,255,255,0.03);
    border-right: 3px solid var(--c-red);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    position: relative;
    max-width: 60ch;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

.doctor-message::before {
    content: '"';
    position: absolute;
    top: -0.5rem;
    right: 1rem;
    font-size: 3rem;
    color: rgba(225,6,0,0.2);
    font-family: Georgia, serif;
    line-height: 1;
}

.doctor-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.doctor-highlight {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: var(--t-sm);
    color: var(--c-muted);
}

.doctor-highlight-check {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: rgba(93,225,255,0.1);
    border: 1px solid rgba(93,225,255,0.25);
    display: grid;
    place-items: center;
    font-size: 0.625rem;
    color: var(--c-cyan);
    flex-shrink: 0;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   § 7 · MODULE 8 — SMART CLINIC TECHNOLOGY
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.section-clinic-tech {
    padding-block: var(--sp-section);
    background: var(--c-bg);
    position: relative;
    overflow: hidden;
}

.section-clinic-tech::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 70% 50% at 50% 100%, rgba(93,225,255,0.04), transparent);
    pointer-events: none;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3.5rem;
}

.tech-card {
    padding: 2rem 1.5rem;
    border-radius: var(--r-lg);
    border: 1px solid var(--c-border);
    background: rgba(255,255,255,0.025);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition:
        transform  0.45s var(--ease-spring),
        border-color 0.3s ease,
        background   0.3s ease,
        box-shadow   0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(93,225,255,0.04), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tech-card:hover {
    transform: translateY(-6px);
    border-color: rgba(93,225,255,0.25);
    background: rgba(93,225,255,0.04);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(93,225,255,0.1);
}

.tech-card:hover::before { opacity: 1; }

.tech-icon {
    width: 52px; height: 52px;
    border-radius: var(--r-md);
    background: var(--c-cyan-dim);
    border: 1px solid rgba(93,225,255,0.15);
    display: grid;
    place-items: center;
    font-size: 1.375rem;
    transition: transform 0.4s var(--ease-spring), box-shadow 0.3s;
    position: relative;
    z-index: 1;
}

.tech-card:hover .tech-icon {
    transform: scale(1.1) rotate(-3deg);
    box-shadow: 0 8px 24px rgba(93,225,255,0.15);
}

.tech-name {
    font-size: var(--t-sm);
    font-weight: 700;
    color: var(--c-white);
    position: relative; z-index: 1;
}

.tech-name-fa {
    font-family: var(--f-fa);
    font-size: var(--t-xs);
    color: var(--c-muted);
    direction: rtl;
    display: block;
    margin-top: 0.125rem;
}

.tech-desc {
    font-size: var(--t-xs);
    color: var(--c-faint);
    line-height: 1.6;
    position: relative; z-index: 1;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-cyan);
    opacity: 0.7;
    position: relative; z-index: 1;
}

.tech-badge::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--c-cyan);
    box-shadow: 0 0 6px var(--c-cyan);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   § 8 · REDUCED MOTION OVERRIDES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (prefers-reduced-motion: reduce) {
    .bcs, .sys-component, .sys-connector { transition: none !important; }
    .bcs-placement-arrow, .bcs-osseo { animation: none !important; }
    .bcs { opacity: 1 !important; transform: none !important; }
    .sys-component { opacity: 1 !important; transform: none !important; }
    .tech-card:hover { transform: none !important; }
    .comp-tab, .journey-step .step-node { transition: none !important; }
    .ba-handle, .ba-before { transition: none !important; }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   § 9 · RESPONSIVE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 1024px) {
    .viewer-layout        { grid-template-columns: 1fr; }
    .viewer-canvas-wrapper { aspect-ratio: 4/3; }

    .bone-stage-area      { grid-template-columns: 1fr; gap: 1.5rem; }
    .bone-stage-text      { text-align: center; }
    .bone-stage-facts     { text-align: center; }

    .journey-layout       { grid-template-columns: 1fr; gap: 2.5rem; }
    .journey-detail       { position: static; }

    .system-explainer-layout { grid-template-columns: 1fr; gap: 3rem; }

    .doctor-layout        { grid-template-columns: 1fr; gap: 3rem; }
    .doctor-photo-wrap    { flex-direction: row; align-items: flex-start; }

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

@media (max-width: 768px) {
    /* Bone journey: disable sticky, show as linear phases */
    .section-bone-journey {
        height: auto;
    }

    .bone-sticky {
        position: static;
        height: auto;
        padding: 2rem 1rem;
    }

    .bone-stage-area {
        display: none;
    }

    .bone-mobile-fallback { display: flex; }

    /* Before/after */
    .ba-container { aspect-ratio: 4/3; }

    /* Tech grid */
    .tech-grid { grid-template-columns: 1fr; }

    /* Doctor */
    .doctor-photo-wrap    { flex-direction: column; align-items: center; }
    .doctor-photo-frame   { width: 220px; height: 220px; }
    .doctor-credentials   { gap: 1rem; }

    /* Component tabs: horizontal */
    .component-tabs { flex-direction: row; }
    .comp-tab       { flex: 1; flex-direction: column; text-align: center; gap: 0.25rem; }
    .comp-tab::before { width: 100%; height: 3px; bottom: 0; top: auto; transform: scaleX(0); }
    .comp-tab.active::before { transform: scaleX(1); }
}

@media (max-width: 480px) {
    .component-tabs { flex-direction: column; }
    .ba-container   { aspect-ratio: 1/1; }
}
