@font-face {
  font-family: "MehranFigures";
  src: url("../fonts/fontello.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.home-services {
  background: var(--cream);
  color: var(--ink);
  padding: 30px 70px;
  direction: rtl;
  text-align: right;
  font-family: "Vazirmatn", "Plus Jakarta Sans", sans-serif;
}

.services-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 30px;
  row-gap: 80px;
  align-items: end;
  max-width: 1290px;
  margin: 0 auto;
}

.services-intro {
  grid-column: 1 / 3;
  max-width: 574px;
}

.services-eyebrow {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0.08em;
}

.services-title {
  margin: 0;
  color: var(--ink);
  font-size: 57px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1px;
}

.services-desc {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.62;
}

.services-carousel,
.services-track {
  display: contents;
}

.services-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  opacity: 0;
  transform: translateY(28px);
}

.services-art {
  display: block;
}

.home-services.is-visible .services-item {
  animation: servicesRise 0.8s ease forwards;
}

.home-services.is-visible .services-item:nth-child(1) { animation-delay: 0.1s; }
.home-services.is-visible .services-item:nth-child(2) { animation-delay: 0.2s; }
.home-services.is-visible .services-item:nth-child(3) { animation-delay: 0.3s; }
.home-services.is-visible .services-item:nth-child(4) { animation-delay: 0.4s; }
.home-services.is-visible .services-item:nth-child(5) { animation-delay: 0.5s; }
.home-services.is-visible .services-item:nth-child(6) { animation-delay: 0.6s; }

.services-icon {
  display: block;
  margin-bottom: 34px;
  color: var(--accent);
  font-size: 71px;
  line-height: 1;
}

.services-icon::before {
  font-family: "MehranFigures";
  font-style: normal;
  font-weight: normal;
  speak: never;
  display: inline-block;
  line-height: 1;
}

.services-icon--ten::before { content: "\ea20"; }
.services-icon--two::before { content: "\ea22"; }
.services-icon--three::before { content: "\ea21"; }
.services-icon--four::before { content: "\ea1b"; }
.services-icon--five::before { content: "\ea1a"; }
.services-icon--six::before { content: "\ea1f"; }

.services-item-title {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

@keyframes servicesRise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1200px) {
  .services-title {
    font-size: 47px;
  }
}

@media (max-width: 1024px) {
  .home-services {
    padding: 30px 20px;
  }

  .services-inner {
    display: block;
  }

  .services-intro {
    max-width: none;
    margin-bottom: 32px;
  }

  .services-title {
    font-size: 36px;
  }

  .services-carousel {
    display: block;
    overflow: hidden;
    container-type: inline-size;
    padding: 4px 0 8px;
  }

  .services-track {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: servicesReel 28s linear infinite;
  }

  .services-carousel:hover .services-track,
  .services-carousel:focus-within .services-track {
    animation-play-state: paused;
  }

  .services-item {
    flex: 0 0 30%;
    flex: 0 0 calc((100cqi - 24px) / 3);
    box-sizing: border-box;
    opacity: 1;
    transform: none;
    animation: none;
  }

  @media (prefers-reduced-motion: reduce) {
    .services-track {
      animation: none;
    }
  }
}

@keyframes servicesReel {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(50%);
  }
}

@media (max-width: 600px) {
  .services-title {
    font-size: 30px;
  }

  .services-icon {
    font-size: 56px;
    margin-bottom: 20px;
  }

  .services-item-title {
    font-size: 14px;
  }
}
