/* Незалежна підвіска: текст + схема з анімацією (inc/sections/ride.php, assets/js/ride.js) */

.ride {
  --k-risk: #C46248;
  /* сцена — темне «технічне» креслення */
  --ride-bg: #17171A;
  --ride-ink: rgba(255, 255, 255, .62);
  --ride-line: rgba(255, 255, 255, .12);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 64px;
  align-items: center;
  padding-top: 56px;
}

.ride__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--k-brown);
}

.ride .ride__title {
  margin: 0 0 20px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.08;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--k-text);
}

.ride__para {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--k-muted);
}

/* ---------- Порівняння швидкості з ринком ---------- */

.ride__compare {
  margin-top: 24px;
  padding: 18px 20px 16px;
  border: 1px solid var(--k-line);
  border-radius: 8px;
  background: var(--k-card);
}

.ride__compare-label {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--k-muted);
}

.ride__compare-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 5px 0;
}

.ride__compare-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--k-muted);
}

.ride__compare-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--k-line);
}

.ride__compare-bar i {
  display: block;
  width: var(--share);
  height: 100%;
  border-radius: inherit;
  background: rgba(34, 27, 18, .32);
}

.ride__compare-value {
  font-family: "Play", "Noto Sans", sans-serif;
  font-size: 15px;
  white-space: nowrap;
  text-align: right;
  color: var(--k-muted);
}

.ride__compare-row.is-own .ride__compare-name,
.ride__compare-row.is-own .ride__compare-value { color: var(--k-text); }
.ride__compare-row.is-own .ride__compare-bar i { background: var(--k-gold); }

.ride__compare-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--k-muted);
}

.ride__facts {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--k-line);
}

.ride__facts li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--k-line);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--k-text);
}

.ride__facts .icon { flex: none; margin-top: 2px; color: var(--k-gold); }

.ride__hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--k-text);
}

.ride__hint .icon { flex: none; color: var(--k-brown); }

/* ---------- Сцена ---------- */

.ride__stage {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  background-color: var(--ride-bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.ride__bar { padding: 16px 16px 0; }

.ride__modes {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--ride-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .04);
}

.ride__mode {
  padding: 10px 18px;
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ride-ink);
  background: transparent;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}

.ride__mode:hover { color: #fff; }
.ride__mode.is-active { color: var(--ride-bg); background: var(--k-gold); }
.ride.is-rigid .ride__mode.is-active { color: #fff; background: var(--k-risk); }

.ride__mode:focus-visible {
  outline: 2px solid var(--k-gold);
  outline-offset: 2px;
}

/* схема, у верхньому куті — поточна швидкість (рахує ride.js) */
.ride__scene { position: relative; }

.ride__svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3600 / 2370;
}

.ride__speed {
  position: absolute;
  top: 14px;
  right: 20px;
  display: grid;
  justify-items: end;
  gap: 2px;
  pointer-events: none;
}

.ride__speed span {
  font-family: "Play", "Noto Sans", sans-serif;
  font-size: 15px;
  color: var(--ride-ink);
}

.ride__speed b {
  font-size: 34px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

/* показники моделі під схемою */
.ride__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 32px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--ride-line);
}

.ride__readout {
  display: grid;
  gap: 2px;
}

.ride__readout small,
.ride__speed small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ride-ink);
}

.ride__readout b {
  min-width: 6ch;
  font-family: "Play", "Noto Sans", sans-serif;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  color: #fff;
  transition: color .15s;
}

.ride__readout b.is-alert { color: var(--k-risk); }

.ride__note {
  margin-left: auto;
  font-size: 13px;
  color: var(--ride-ink);
}

/* ---------- Малюнок (одиниці SVG — міліметри) ---------- */

.ride__far {
  fill: none;
  stroke: rgba(255, 255, 255, .16);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 1 34;
}

.ride__soil {
  fill: #202024;
  stroke: rgba(255, 255, 255, .7);
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
}

.ride__hatch {
  stroke: rgba(255, 255, 255, .07);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}

.ride__rocks {
  fill: #3A3A40;
  stroke: rgba(255, 255, 255, .55);
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
}

.ride__grass {
  fill: none;
  stroke: rgba(255, 255, 255, .22);
  stroke-width: 1.2px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.ride__tube {
  fill: none;
  stroke: #8E8A82;
  stroke-width: 34;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ride__tube--thin { stroke-width: 22; }
.ride__cam { fill: #8E8A82; }
.ride__deck { fill: #45454B; }

.ride__hull {
  fill: #2C2C31;
  stroke: rgba(255, 255, 255, .4);
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
}

.ride__seam,
.ride__port {
  fill: none;
  stroke: rgba(255, 255, 255, .2);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}

.ride__cargo rect {
  fill: #6F6A5A;
  stroke: rgba(255, 255, 255, .55);
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
  transition: stroke .15s;
}

.ride__cargo .ride__cap { fill: var(--k-gold); }
.ride__cargo--crate rect { fill: #5C5038; }
.ride__cargo--battery rect { fill: #5E5E63; }

.ride__detail {
  fill: none;
  stroke: rgba(0, 0, 0, .45);
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
}

/* вантаж відірвався від платформи */
.ride__cargo.is-airborne rect {
  stroke: var(--k-risk);
  stroke-width: 2.5px;
}

.ride__coil {
  fill: none;
  stroke: var(--k-gold);
  stroke-width: 2.5px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: opacity .2s;
}

.ride__strut {
  stroke: #5A5A61;
  stroke-width: 18;
  stroke-linecap: round;
  transition: stroke-width .2s;
}

.ride.is-rigid .ride__coil { opacity: 0; }
.ride.is-rigid .ride__strut { stroke-width: 60; }

.ride__tire {
  fill: #2A2A2F;
  stroke: rgba(255, 255, 255, .3);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}

.ride__tread {
  fill: none;
  stroke: #2A2A2F;
  stroke-width: 30;
  stroke-dasharray: 2.4 2.6;
}

.ride__sidewall { fill: #1E1E22; }

.ride__rim,
.ride__hub {
  stroke: #1E1E22;
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
}

.ride__rim { fill: #6F6B64; }
.ride__hub { fill: #B3ADA2; }
.ride__lug { fill: #2E2E33; }

@media (max-width: 960px) {
  .ride { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 760px) {
  .ride { padding-top: 40px; }
  .ride__para { font-size: 16px; }
  .ride__compare { padding: 16px; }
  /* на телефоні: назва і значення в рядок, смуга під ними */
  .ride__compare-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name value" "bar bar";
    gap: 6px 10px;
    padding: 6px 0;
  }
  .ride__compare-name { grid-area: name; }
  .ride__compare-value { grid-area: value; }
  .ride__compare-bar { grid-area: bar; }
  .ride__svg { aspect-ratio: 4 / 3; }
  .ride__bar { padding: 12px 12px 0; }
  /* перемикач на всю ширину */
  .ride__modes { display: flex; }
  .ride__mode { flex: 1; padding: 8px 12px; font-size: 13px; }
  .ride__speed { top: 10px; right: 14px; }
  .ride__speed b { font-size: 26px; }
  .ride__caption { gap: 10px 24px; padding: 12px 16px 16px; }
  .ride__readout b { font-size: 19px; }
  .ride__note { flex-basis: 100%; margin-left: 0; }
}
