/* =========================================================
   Interaktivni elementi na podstranicama usluga.
   Mjerilo: reference/presjek-zuba-demo.html (isti klizač, gumbi faza i kartica).
   ========================================================= */
.interactive { margin-top: 10vh; }
.ix {
  --ice: #EEF3F8; --ink: #14161A; --muted: #5A616E; --line: #DDE3EB;
  --bordo: #7A1F2B; --bordo-soft: #F4E8EA;
}
.ix-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-areas: "art head" "art ctrl";
  column-gap: clamp(24px, 5vw, 72px);
  row-gap: 0;
  align-items: center;
}
.ix-head { grid-area: head; align-self: end; }
.ix-ctrl { grid-area: ctrl; align-self: start; }
.ix-art { grid-area: art; background: linear-gradient(180deg, #fff 0%, var(--ice) 100%); border-radius: 20px; padding: 12px 8px 4px; min-width: 0; }
.ix svg { display: block; width: 100%; height: auto; max-width: 100%; }
.ix-eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 0 0 10px; }
.ix-title { font: 400 clamp(40px, 5.4vw, 64px)/1 var(--serif); margin: 0 0 18px; letter-spacing: -.01em; text-wrap: balance; }
.ix-title i { color: var(--bordo); }
.ix-lead { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0 0 24px; max-width: 44ch; }

/* klizač */
.ix .slider { margin: 0 0 26px; }
.ix .slider-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.ix input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer; }
.ix input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--bordo) var(--p, 0%), var(--line) var(--p, 0%)); }
.ix input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line); }
.ix input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--bordo); }
.ix input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--bordo); margin-top: -10px; box-shadow: 0 2px 10px rgba(122, 31, 43, .25); transition: transform .15s; }
.ix input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--bordo); box-shadow: 0 2px 10px rgba(122, 31, 43, .25); }
.ix input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
.ix input[type=range]:focus-visible { outline: 2px solid var(--bordo); outline-offset: 4px; border-radius: 6px; }

/* gumbi faza (ispod klizača) i prekidači – isti stil */
.ix .ticks { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); margin-top: 8px; }
.ix .ticks button, .ix .seg button { all: unset; cursor: pointer; font-size: 12.5px; color: var(--muted); text-align: center; padding: 6px 0; border-radius: 6px; transition: color .2s; }
.ix .ticks button:first-child { text-align: left; }
.ix .ticks button:last-child { text-align: right; }
.ix .ticks button[aria-current="true"], .ix .seg button[aria-pressed="true"] { color: var(--bordo); font-weight: 600; }
.ix .ticks button:focus-visible, .ix .seg button:focus-visible { outline: 2px solid var(--bordo); outline-offset: 2px; }
.ix .seg { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0 0 22px; }
.ix .seg button { padding: 6px 0; font-size: 13px; position: relative; }
.ix .seg button[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--bordo); }

/* kartica opisa */
.ix .card { border-top: 1px solid var(--line); padding-top: 22px; min-height: 230px; }
.ix .card h3 { font: 400 32px/1.1 var(--serif); margin: 0 0 10px; }
.ix .card p { margin: 0 0 16px; line-height: 1.6; color: var(--muted); font-size: 15.5px; max-width: 48ch; }
.ix .treat { display: flex; gap: 12px; align-items: baseline; background: var(--bordo-soft); border-radius: 12px; padding: 12px 16px; }
.ix .treat span { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--bordo); font-weight: 600; white-space: nowrap; }
.ix .treat strong { font-weight: 600; font-size: 15px; }
.ix .fine { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.ix .fade { animation: ix-fade .35s ease; }
@keyframes ix-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* SVG */
.ix .lbl { font: 500 12.5px var(--sans); fill: #8A909B; }
.ix .lead-line { stroke: #C9CFD8; stroke-width: 1; }
.ix .dot { fill: var(--bordo); }
.ix .pulse { transform-box: fill-box; transform-origin: center; animation: ix-pulse 1.4s ease-in-out infinite; }
@keyframes ix-pulse { 0%, 100% { opacity: 0; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .ix .pulse, .ix .fade { animation: none; } }

/* usporedni klizač preko crteža (krunice) */
.ix-compare { position: relative; }
.ix-split { position: absolute; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.ix-compare:has(.ix-split:focus-visible) { outline: 2px solid var(--bordo); outline-offset: 4px; }
.ix-beam, .ix-glow { animation: ix-glow 2.8s ease-in-out infinite alternate; }
@keyframes ix-glow { from { opacity: .65; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ix-beam, .ix-glow { animation: none; } }
.ix-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.ix-pair .card { min-height: 0; transition: opacity .4s; }
.ix-pair .card h3 { font-size: 26px; }
.ix-pair .card p { font-size: 14.5px; }
.ix-pair .card.is-dim { opacity: .4; }
.ix-pair .treat { flex-direction: column; gap: 4px; }
@media (max-width: 560px) { .ix-pair { grid-template-columns: 1fr; } }

/* točke na licu (estetika lica) */
.ix-hot { cursor: pointer; outline: none; }
.ix-hot .ix-ring { transform-box: fill-box; transform-origin: center; opacity: .18; animation: ix-ring 2.4s ease-in-out infinite; }
.ix-hot .ix-core { transform-box: fill-box; transform-origin: center; transition: transform .3s; }
.ix-hot:hover .ix-core, .ix-hot.is-on .ix-core { transform: scale(1.35); }
.ix-hot.is-on .ix-ring { opacity: .28; }
.ix-hot:focus-visible .ix-core { stroke: #14161A; stroke-width: 1.5; }
@keyframes ix-ring { 0%, 100% { transform: scale(.6); opacity: .25; } 50% { transform: scale(1.25); opacity: .06; } }
@media (prefers-reduced-motion: reduce) { .ix-hot .ix-ring { animation: none; } }

/* timer za pranje zubi */
.ix-timer-row { display: flex; align-items: center; gap: 22px; margin: 0 0 22px; }
.ix .ix-mouth { width: 132px; flex: none; }
.ix-mouth circle { fill: #DDE3EB; transition: fill .4s; }
.ix-mouth g.is-on circle { fill: var(--bordo); }
.ix-timer-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ix-timer-btns .btn { border: 0; cursor: pointer; font-size: 14px; padding: .7em 1.15em; }
.ix-timer-btns .btn:disabled { opacity: .45; cursor: default; transform: none; }
.ix-blink { transform-box: fill-box; transform-origin: center; animation: ix-blink 4.2s infinite; }
@keyframes ix-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.is-running #tBuddy { transform-box: fill-box; transform-origin: 50% 90%; animation: ix-wiggle .9s ease-in-out infinite alternate; }
@keyframes ix-wiggle { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.ix-spark path { transform-box: fill-box; transform-origin: center; }
.ix-spark.is-on { opacity: 1; }
.ix-spark.is-on path { animation: ix-spark 1.4s ease-out infinite; }
@keyframes ix-spark { 0% { transform: scale(0); opacity: 0; } 40% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ix-blink, .is-running #tBuddy, .ix-spark.is-on path { animation: none; } }
@media (max-width: 420px) { .ix-timer-row { flex-direction: column; align-items: flex-start; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* koraci vođeni skrolanjem (implantati): crtež sticky | naslov + koraci */
.ix-scrolly {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-areas: "art head" "art steps";
  column-gap: clamp(24px, 5vw, 72px);
}
.ix-scrolly .ix-head { padding-top: 6vh; }
.ix-scrolly .ix-art { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; }
.ix-steps { grid-area: steps; position: relative; padding: 2vh 0 10vh 30px; }
.ix-track { position: absolute; left: 0; top: 2vh; bottom: 10vh; width: 2px; border-radius: 2px; background: var(--line); }
.ix-fill { position: absolute; inset: 0; border-radius: 2px; background: var(--bordo); transform: scaleY(0); transform-origin: top; }
.ix-step { min-height: 52vh; opacity: .38; transition: opacity .5s ease; }
.ix-step.is-active { opacity: 1; }
.ix-step .n { display: block; margin-bottom: 8px; font: 400 15px/1 var(--serif); color: var(--bordo); }
.ix-step h3 { font: 400 32px/1.1 var(--serif); margin: 0 0 10px; }
.ix-step p { margin: 0; line-height: 1.6; color: var(--muted); font-size: 15.5px; max-width: 48ch; }
@media (prefers-reduced-motion: reduce) { .ix-step { transition: none; } }

@media (max-width: 820px) {
  .ix-scrolly { grid-template-columns: 1fr; grid-template-areas: "head" "art" "steps"; }
  .ix-scrolly .ix-head { padding-top: 0; }
  .ix-scrolly .ix-art { top: var(--nav-h); z-index: 3; height: 45vh; display: flex; align-items: center; justify-content: center; }
  .ix-scrolly .ix-art svg { height: 100%; width: auto; }
  .ix-steps { padding-top: 4vh; }
  .ix-step { min-height: 30vh; }
  .ix-steps { padding-bottom: 30vh; }
}

@media (max-width: 820px) {
  .ix-grid { grid-template-columns: 1fr; grid-template-areas: "head" "art" "ctrl"; row-gap: 20px; }
  .ix .card { min-height: 0; }
  .ix .lbl { font-size: 14px; }
}
