/* Контейнер */
.responsive-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  max-width: 1200px;
  margin: auto;
  padding: 80px 40px;
}

/* Карточка */
.service-card {
  position: relative;
  background: transparent;
  padding: 24px 30px;
  border-radius: 20px;
  flex: 1 1 calc(33.333% - 40px);
  min-width: 250px;
  aspect-ratio: 1 / 1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
  transform: translateY(30px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.service-card:nth-child(1) { animation-delay: 0.2s; }
.service-card:nth-child(2) { animation-delay: 0.4s; }
.service-card:nth-child(3) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

.service-card h3 {
  font-size: 26px;
  margin-bottom: 16px;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
}

.service-card p {
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
  position: relative;
  z-index: 2;
  flex-grow: 1;
}

.card-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 200px;
  font-weight: bold;
  color: rgba(0, 0, 0, 0.06);
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.service-icon {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: 16px;
}

.service-icon svg {
  width: 48px;
  height: 48px;
  opacity: 0.8;
}

/* Градиенты */
.gradient-purple,
.gradient-red,
.animated-gradient {
  position: absolute;
  inset: 0;
  background-size: 400% 400%;
  animation: moveGradient 20s ease-in-out infinite;
  z-index: 0;
  opacity: 1;
}

.gradient-purple {
  background: radial-gradient(circle at var(--x) var(--y), #ffffff, #d9d9d9);
}

.gradient-red {
  background: radial-gradient(circle at var(--x) var(--y), #ffffff, #d9d9d9);
}

.animated-gradient {
  background: radial-gradient(circle at var(--x) var(--y), #a84c4c, #e5a5a0, #a84c4c);
}

@keyframes moveGradient {
  0% { background-position: 0% 0%; }
  25% { background-position: 100% 0%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
  100% { background-position: 0% 0%; }
}

/* Цвет по контейнеру */
.block-black .service-card,
.block-black .service-card h3,
.block-black .service-card p,
.block-black .service-icon svg {
  color: #000 !important;
  fill: #000 !important;
}

.block-white .service-card,
.block-white .service-card h3,
.block-white .service-card p,
.block-white .service-icon svg {
  color: #fff !important;
  fill: #fff !important;
}

/* Адаптация */
@media (max-width: 768px) {
  .responsive-wrapper {
    flex-direction: column;
    gap: 24px;
    padding: 60px 20px;
  }

  .service-card {
    aspect-ratio: auto;
    padding: 20px;
  }

  .service-card h3 {
    font-size: 22px;
  }

  .service-card p {
    font-size: 16px;
    line-height: 1.8;
  }

  .service-icon svg {
    width: 40px;
    height: 40px;
  }

  .animated-gradient,
  .gradient-purple,
  .gradient-red {
    transform: scale(1.2);
  }
}
