/* Results (student scores) section — qalam-high.html.
   PREVIEW: center-focus "coverflow" carousel — active card full size, side
   cards scaled down + dimmed. Photo fills the whole card, the score overlay
   sits on top of it with a bottom gradient scrim instead of a separate
   body block below the photo.
   Depends on shared page tokens (--warm-gray, --crimson-*, --line, --text-muted,
   --text-light, --dark-950, --radius-2xl, --ease-out, --display). */

.results {
  padding: 120px 0;
  background: var(--warm-gray);
  position: relative;
}
.results-head {
  text-align: left;
  margin-bottom: 52px;
}
.results-head h2 {
  margin-bottom: 12px;
}
.results-head h2 em {
  font-style: normal;
  color: var(--crimson-600);
  font-weight: 800;
}
.results-head p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
}

.results-carousel {
  position: relative;
}
.results-row {
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 18px;
  padding: 12px calc(50% - 210px);
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.results-row::-webkit-scrollbar {
  display: none;
}
/* Suppressed while the infinite-loop clone swap silently resets scrollLeft —
   without this the scale/opacity transition below plays on the card that
   just became active, reading as a visible jump. */
.results-row.is-jumping .rcard {
  transition: none !important;
}
.rcard {
  flex-shrink: 0;
  width: 380px;
  max-width: 82vw;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  scroll-snap-align: center;
  transform: scale(0.86);
  opacity: 0.5;
  transition:
    transform 0.4s var(--ease-out),
    opacity 0.4s var(--ease-out);
}
.rcard.is-active {
  transform: scale(1);
  opacity: 1;
}
.rcard-img {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--crimson-50);
  overflow: hidden;
  border-radius: inherit;
}
.rcard-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.rcard-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 6, 8, 0.92) 0%,
    rgba(10, 6, 8, 0.55) 32%,
    rgba(10, 6, 8, 0.05) 60%,
    transparent 100%
  );
}
.rcard-type {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--crimson-700);
  color: #fff;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  box-shadow: 0 4px 12px rgba(92, 15, 26, 0.4);
}
.rcard-overlay {
  position: absolute;
  inset: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.rcard-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 14px 12px;
  margin-bottom: 14px;
}
.rcard-meta .m-col {
  text-align: center;
  flex: 1;
}
.rcard-meta .m-lbl {
  font-size: 9.5px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.rcard-meta .m-lbl.to {
  color: var(--gold-400);
}
.rcard-meta .m-val {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}
.rcard-meta .m-val.to {
  font-size: 2.2rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.03em;
}
.rcard-meta .m-mid {
  flex-shrink: 0;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.rcard-meta .m-arrow {
  color: #fff;
  animation: results-arrow 2s infinite;
}
@keyframes results-arrow {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(4px);
  }
}
.rcard-meta .m-time {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.14);
  padding: 3px 8px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  white-space: nowrap;
}
.rcard-name {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.015em;
}

.results-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 0 12.6px rgba(0, 0, 0, 0.08),
    inset 2px 2px 1px -2px #e7e7e7,
    inset -2px -2px 1px -2px #e7e7e7,
    inset 3px 3px 0 -3px rgba(231, 231, 231, 0.5);
    color: var(--crimson-700);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    color 0.2s;
  z-index: 2;
}
.results-arrow-prev {
  left: 4px;
}
.results-arrow-next {
  right: 4px;
}
.results-arrow:hover {
  background: rgba(255, 255, 255, 0.4);
}

.results-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
}
.results-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  transition:
    width 0.25s,
    background 0.25s;
}
.results-dot.is-active {
  width: 26px;
  background: var(--crimson-600);
}

@media (max-width: 900px) {
  .results {
    padding: 96px 0;
  }
  .results-row {
    padding: 12px calc(50% - 190px);
  }
}
@media (max-width: 640px) {
  .results {
    padding: 64px 0;
  }
  .results-head {
    margin-bottom: 40px;
  }
  .results-arrow {
    width: 38px;
    height: 38px;
  }
  .results-row {
    padding: 12px 16px;
  }
  .rcard {
    transform: none;
    opacity: 1;
    width: 280px;
  }
  .rcard-meta .m-val {
    font-size: 1.3rem;
  }
  .rcard-meta .m-val.to {
    font-size: 1.9rem;
  }
  .rcard-meta .m-time {
    font-size: 9px;
    padding: 3px 7px;
  }
}
