/* ===== ZC ACHIEVEMENT RAIL ===== */
.zc-achievement {
  --zc-mx: 50%;
  --zc-my: 45%;
  position: relative;
  width: min(1180px, calc(100% - 28px));
  box-sizing: border-box;
  margin: 28px auto;
  padding: 0 !important;
  border: 1px solid rgba(255, 214, 56, 0.20);
  border-radius: 30px;
  background: linear-gradient(135deg, #022f35, #03575f 58%, #064951);
  box-shadow: 0 22px 55px rgba(3, 72, 79, 0.22);
  color: #fff;
  font-family: "Almarai", sans-serif;
  overflow: hidden;
  isolation: isolate;
}

.zc-achievement::before,
.zc-achievement::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.zc-achievement::before {
  width: 270px;
  height: 270px;
  top: -185px;
  left: -90px;
  border: 35px solid rgba(255, 214, 56, 0.055);
}

.zc-achievement::after {
  width: 230px;
  height: 230px;
  right: -135px;
  bottom: -170px;
  background: radial-gradient(circle, rgba(84, 226, 209, 0.16), transparent 68%);
}

.zc-achievement__ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at var(--zc-mx) var(--zc-my),
      rgba(115, 252, 216, 0.15),
      transparent 28%
    ),
    linear-gradient(
      115deg,
      transparent,
      rgba(255, 255, 255, 0.025),
      transparent
    );
  transition: background-position .25s ease;
}

.zc-achievement__inner {
  position: relative;
  z-index: 2;
  padding: 38px 30px 32px;
}

.zc-achievement__head {
  max-width: 780px;
  margin: 0 auto 30px;
  text-align: center;
}

.zc-achievement__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: #bcebe5;
  font-size: 12px;
  font-weight: 700;
}

.zc-achievement__eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #54e2d1;
  box-shadow: 0 0 0 6px rgba(84, 226, 209, 0.10);
}

.zc-is-visible .zc-achievement__eyebrow i {
  animation: zcEyebrowPulse 1.4s ease 3;
}

.zc-achievement__head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -.5px;
}

.zc-achievement__head p {
  margin: 8px auto 0;
  color: rgba(226, 246, 243, 0.74);
  font-size: clamp(13px, 1.7vw, 17px);
  line-height: 1.8;
}

.zc-achievement__rail {
  --zc-track-y: 47px;
  position: relative;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 11px;
  direction: rtl;
}

.zc-achievement__line {
  position: absolute;
  top: var(--zc-track-y);
  right: 12.5%;
  left: 12.5%;
  height: 2px;
  z-index: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.zc-achievement__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #54e2d1,
    #ffd638,
    #73bfff,
    #54e2d1
  );
  box-shadow: 0 0 13px rgba(255, 214, 56, 0.45);
  transform: scaleX(0);
  transform-origin: right center;
}

.zc-is-visible .zc-achievement__line::after {
  animation: zcDrawLine 1.05s cubic-bezier(.22, .9, .3, 1) .18s forwards;
}

.zc-achievement__spark {
  position: absolute;
  top: calc(var(--zc-track-y) - 4px);
  right: 12.5%;
  z-index: 4;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  opacity: 0;
  background: #ffd638;
  box-shadow:
    0 0 7px #ffd638,
    0 0 17px rgba(255, 214, 56, 0.85);
  pointer-events: none;
}

.zc-is-visible .zc-achievement__spark {
  animation: zcSparkTravel 1.05s ease .18s forwards;
}

.zc-achievement__item {
  --zc-rx: 0deg;
  --zc-ry: 0deg;
  --zc-lift: 0px;
  --zc-scale: 1;

  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 160px;
  box-sizing: border-box;
  padding: 19px 7px 17px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 18px;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.085),
      rgba(255, 255, 255, 0.025)
    );
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 12px 30px rgba(0, 25, 29, 0.12);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  opacity: 0;
  translate: 0 14px;
  outline: none;
  overflow: hidden;

  transform:
    perspective(680px)
    rotateX(var(--zc-rx))
    rotateY(var(--zc-ry))
    translateY(var(--zc-lift))
    scale(var(--zc-scale));

  transition:
    transform .22s ease,
    border-color .22s ease,
    background-color .22s ease,
    box-shadow .22s ease,
    filter .22s ease;
}

.zc-is-visible .zc-achievement__item {
  animation: zcItemReveal .58s cubic-bezier(.2, .85, .3, 1.15)
    var(--zc-delay) both;
}

.zc-achievement__item:hover,
.zc-achievement__item:focus-visible,
.zc-achievement__item:active {
  --zc-lift: -5px;
  --zc-scale: 1.018;

  border-color: rgba(255, 214, 56, 0.78);
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.13),
      rgba(255, 214, 56, 0.045)
    );
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    0 16px 34px rgba(0, 25, 29, 0.24),
    0 0 0 1px rgba(255, 214, 56, 0.08);
}

.zc-achievement__item::before {
  content: "";
  position: absolute;
  top: -70%;
  left: -60%;
  width: 52%;
  height: 230%;
  opacity: 0;
  transform: rotate(22deg);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.16),
    transparent
  );
  pointer-events: none;
}

.zc-achievement__item:hover::before,
.zc-achievement__item:focus-visible::before {
  animation: zcCardShine .7s ease;
}

.zc-achievement__item::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.2);
  border: 1px solid rgba(255, 214, 56, 0.75);
  pointer-events: none;
}

.zc-achievement__item.zc-is-tapped::after {
  animation: zcTapPulse .55s ease-out;
}

.zc-achievement__icon {
  position: relative;
  z-index: 3;
  width: 52px;
  height: 52px;
  margin-bottom: 13px;
  border-radius: 16px;
  color: var(--zc-accent);
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--zc-accent) 18%, transparent),
      rgba(255, 255, 255, 0.035)
    );
  border: 1px solid color-mix(in srgb, var(--zc-accent) 28%, transparent);
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.025),
    0 9px 22px rgba(0, 20, 23, 0.18);

  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;

  transition:
    transform .25s ease,
    color .25s ease,
    box-shadow .25s ease,
    background-color .25s ease;
}

.zc-achievement__item:hover .zc-achievement__icon,
.zc-achievement__item:focus-visible .zc-achievement__icon,
.zc-achievement__item:active .zc-achievement__icon {
  transform: translateY(-2px) scale(1.08);
  color: #ffd638;
  box-shadow:
    0 0 0 7px rgba(255, 214, 56, 0.07),
    0 0 22px rgba(255, 214, 56, 0.20);
}

.zc-achievement__number {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  direction: ltr;
  color: #fff;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

.zc-achievement__number.zc-number-done {
  animation: zcNumberLand .36s ease;
}

.zc-achievement__suffix {
  color: #ffd638;
  font-size: .58em;
  font-weight: 900;
}

.zc-achievement__label {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  color: rgba(231, 248, 246, 0.76);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

@keyframes zcDrawLine {
  to {
    transform: scaleX(1);
  }
}

@keyframes zcSparkTravel {
  0% {
    right: 12.5%;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    right: 87.5%;
    opacity: 0;
  }
}

@keyframes zcItemReveal {
  from {
    opacity: 0;
    translate: 0 14px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes zcCardShine {
  0% {
    left: -60%;
    opacity: 0;
  }

  35% {
    opacity: 1;
  }

  100% {
    left: 130%;
    opacity: 0;
  }
}

@keyframes zcTapPulse {
  0% {
    opacity: .8;
    transform: translate(-50%, -50%) scale(.2);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(7);
  }
}

@keyframes zcEyebrowPulse {
  50% {
    opacity: .5;
    transform: scale(.72);
  }
}

@keyframes zcNumberLand {
  50% {
    transform: scale(1.07);
    color: #fff5ba;
  }
}

@media (max-width: 992px) {
  .zc-achievement__inner {
    padding: 32px 17px 28px;
  }

  .zc-achievement__head {
    margin-bottom: 25px;
  }

  .zc-achievement__rail {
    --zc-track-y: 40px;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 7px;
  }

  .zc-achievement__item {
    min-height: 138px;
    padding: 15px 4px 14px;
    border-radius: 15px;
  }

  .zc-achievement__icon {
    width: 43px;
    height: 43px;
    margin-bottom: 11px;
    border-radius: 13px;
    font-size: 21px;
  }

  .zc-achievement__number {
    font-size: 21px;
  }

  .zc-achievement__label {
    font-size: 10.5px;
  }
}

@media (max-width: 560px) {
  .zc-achievement {
    width: calc(100% - 12px);
    margin: 15px auto;
    border-radius: 20px;
  }

  .zc-achievement__inner {
    padding: 25px 7px 22px;
  }

  .zc-achievement__head {
    margin-bottom: 18px;
    padding: 0 6px;
  }

  .zc-achievement__eyebrow {
    gap: 6px;
    margin-bottom: 5px;
    font-size: 9px;
  }

  .zc-achievement__eyebrow i {
    width: 5px;
    height: 5px;
    box-shadow: 0 0 0 4px rgba(84, 226, 209, 0.10);
  }

  .zc-achievement__head h2 {
    font-size: 21px;
  }

  .zc-achievement__head p {
    margin-top: 5px;
    font-size: 10.5px;
    line-height: 1.55;
  }

  .zc-achievement__rail {
    --zc-track-y: 29px;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3px;
  }

  .zc-achievement__item {
    min-height: 108px;
    padding: 10px 1px 9px;
    border-radius: 11px;
  }

  .zc-achievement__icon {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    border-radius: 9px;
    font-size: 16px;
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 0.022),
      0 6px 14px rgba(0, 20, 23, 0.16);
  }

  .zc-achievement__number {
    gap: 1px;
    font-size: 15.5px;
    letter-spacing: -.3px;
  }

  .zc-achievement__label {
    min-height: 25px;
    margin-top: 7px;
    padding: 0 1px;
    font-size: 8.6px;
    line-height: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zc-achievement__item {
    opacity: 1;
    translate: none;
    transform: none;
    animation: none !important;
    transition: none;
  }

  .zc-achievement__line::after {
    transform: scaleX(1);
    animation: none !important;
  }

  .zc-achievement__spark,
  .zc-achievement__eyebrow i {
    animation: none !important;
  }
}