/* =========================================================
   Homepage — "Latest results" (2026-11-15)
   Carosello: la scheda al centro è nitida, quelle ai lati rimpicciolite e sfocate (come nel quiz discipline).
   La posizione di ogni scheda arriva da js/home-results.js con le variabili --x, --s, --b, --o.
   ========================================================= */
.hr-section { overflow: hidden; background: linear-gradient(180deg, #f1e9fb, #e9dcf7); }
.hr-stage {
  position: relative;
  height: 476px;
  margin-top: .5rem;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.hr-stage.is-drag { cursor: grabbing; }
.hr-stage.is-drag .hr-card { transition: none; }
.hr-msg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: .35em; flex-wrap: wrap;
  padding: 1rem; text-align: center; color: #5d5568;
}
.hr-msg a { color: var(--pink); font-weight: 700; text-decoration: underline; }

.hr-card {
  --dc: var(--pink);
  position: absolute; left: 50%; top: 50%;
  width: min(86vw, 380px); height: 446px;
  display: flex; flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: var(--white);
  color: var(--dark);
  box-shadow: 0 10px 26px rgba(30, 10, 50, .16);
  transform: translate(-50%, -50%) translateX(var(--x, 0px)) scale(var(--s, 1));
  filter: blur(var(--b, 0px));
  opacity: var(--o, 1);
  transition: transform .55s cubic-bezier(.22, .8, .26, 1), filter .55s ease, opacity .45s ease, box-shadow .3s ease;
  will-change: transform, filter;
}
.hr-card.is-front { box-shadow: 0 20px 44px rgba(30, 10, 50, .26); cursor: auto; }
.hr-card:not(.is-front) { cursor: pointer; }
.hr-card.is-off { visibility: hidden; }

.hr-top {
  position: relative; flex: none;
  padding: 1rem 1.15rem 1.05rem;
  color: #fff;
  background:
    radial-gradient(220px 150px at 92% -10%, color-mix(in srgb, var(--dc) 70%, transparent), transparent 72%),
    linear-gradient(150deg, #1d0b2e, color-mix(in srgb, var(--dc) 42%, #1d0b2e));
}
.hr-meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.hr-disc {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 800; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
}
.hr-disc i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--dc); box-shadow: 0 0 0 3px rgba(255, 255, 255, .18); }
.hr-date { font-size: .74rem; font-weight: 600; color: rgba(255, 255, 255, .82); white-space: nowrap; }
.hr-name {
  margin: .7rem 0 0;
  font-family: var(--font-display); font-weight: 800; font-size: 1.16rem; line-height: 1.22; letter-spacing: -.01em;
  color: #fff;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.44em;
}
.hr-sub { margin: .3rem 0 0; font-size: .78rem; color: rgba(255, 255, 255, .78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.2em; }

.hr-body { flex: 1; min-height: 0; padding: .55rem 1.15rem 0; overflow: hidden; }
.hr-list { list-style: none; margin: 0; padding: 0; }
.hr-row {
  display: grid; grid-template-columns: 1.7rem 1fr auto; align-items: center; gap: .6rem;
  padding: .58rem 0;
  border-bottom: 1px solid #efe9f6;
}
.hr-row:last-child { border-bottom: 0; }
.hr-pos {
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .78rem; font-variant-numeric: tabular-nums;
  background: #efe9f6; color: #3d2a52;
}
.hr-pos[data-p="1"] { background: #f3c95a; color: #1d1226; }
.hr-pos[data-p="2"] { background: #d9dde3; color: #1d1226; }
.hr-pos[data-p="3"] { background: #e2b38a; color: #1d1226; }
.hr-who { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.hr-rider { font-weight: 700; font-size: .9rem; line-height: 1.25; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.hr-rider:hover { color: var(--pink); text-decoration: underline; }
.hr-rider .wcn-flag { margin-right: .35rem; }   /* spazio tra bandiera e nome (2026-11-20) */
.hr-rider .wcn-country:empty { display: none; }   /* nazione sconosciuta: niente rientro */
.hr-team { font-size: .74rem; color: #5d5568; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-gap { font-size: .76rem; font-weight: 600; color: #5d5568; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hr-label {
  font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--dc) 70%, #1d0b2e);
}
.hr-more { margin: .35rem 0 0; font-size: .74rem; color: #5d5568; }

.hr-foot { flex: none; padding: .7rem 1.15rem 1rem; }
.hr-go {
  display: inline-flex; align-items: center; gap: .35rem;
  min-height: 44px; padding: .55rem 1.05rem;
  border-radius: 999px;
  background: var(--pink-pale); color: var(--pink);
  font-weight: 700; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase;
  transition: background var(--transition), color var(--transition);
}
.hr-go:hover { background: var(--pink); color: #fff; }
.hr-section :focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- controlli ---------- */
.hr-ctrl { display: flex; align-items: center; justify-content: center; gap: .9rem; margin-top: .9rem; }
.hr-ctl {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #ddd0ec; background: var(--white); color: var(--pink);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.hr-ctl:hover { background: var(--pink); border-color: var(--pink); color: #fff; }
.hr-ctl svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hr-count { min-width: 3.6rem; text-align: center; font-weight: 700; font-size: .82rem; color: #3d2a52; font-variant-numeric: tabular-nums; }

@media (max-width: 768px) {
  .hr-stage { height: 466px; }
  .hr-card { height: 440px; }
}
@media (prefers-reduced-motion: reduce) {
  .hr-card { transition: none; }
}
