.services {
  position: relative; /* FIX */
  z-index: 10;        /* FIX */
  padding: 56px 0 72px;
  background-image: linear-gradient(180deg, rgba(249, 250, 251, 0.35), rgba(249, 250, 251, 0.45)), url(../img/hero1.png);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: scroll, fixed;
}

@media (min-width: 900px) {
  .services {
    padding: 72px 0 88px;
  }
}

.services-header {
  max-width: 100%;
  margin: 0 0 32px;
  text-align: left;
}

.services-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted2, #6b7280);
  margin: 0 0 12px;
}

.services-title {
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text, #0f172a);
}

@media (min-width: 900px) {
  .services-title {
    font-size: 28px;
  }
}

.services-subtitle {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted, #4b5563);
}

.services-grid {
  margin-top: 32px;
  display: grid;
  gap: 14px;
}

@media (min-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Карточка услуги */
.service-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  overflow: visible;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  position: relative;
  z-index: 1;
}

.service-card:hover {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  border-color: rgba(14, 165, 233, 0.4);
  transform: translateY(-2px);
}

.service-card.active {
  z-index: 10;
}

.service-card:nth-child(1) {
  border-top: 3px solid #0ea5e9;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 55%);
}

.service-card:nth-child(2) {
  border-top: 3px solid #22c55e;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 55%);
}

.service-card:nth-child(3) {
  border-top: 3px solid #fb923c;
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 55%);
}

.service-card:nth-child(4) {
  border-top: 3px solid #8b5cf6;
  background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 55%);
}

.service-card:nth-child(5) {
  border-top: 3px solid #ef4444;
  background: linear-gradient(180deg, #fef2f2 0%, #ffffff 55%);
}

.service-card:nth-child(6) {
  border-top: 3px solid #0f766e;
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 55%);
}

.service-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 16px 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s ease;
}

.service-card-header:hover {
  background: rgba(148, 163, 184, 0.05);
}

.service-card-header:active {
  background: rgba(148, 163, 184, 0.1);
}

.service-card-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.service-step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.service-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text, #0f172a);
}

.service-card-chevron {
  flex-shrink: 0;
  color: #94a3b8;
  stroke-width: 2;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card.active .service-card-chevron {
  transform: rotate(180deg);
}

/* Тело карточки - обновлено для плавной анимации */
.service-card-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-top: none;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
  opacity: 0;
  transition:
    grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
}

.service-card.active .service-card-body {
  grid-template-rows: 1fr;
  opacity: 1;
}

.service-card-body-inner {
  overflow: hidden;
  padding: 0 18px;
  transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card.active .service-card-body-inner {
  padding: 0 18px 18px;
}

.service-card-description {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted, #4b5563);
}

@media (max-width: 900px) {
  .services {
    padding: 40px 0 56px;
  }

  .services-header {
    margin-bottom: 24px;
  }

  .services-title {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .services-subtitle {
    font-size: 14px;
  }

  .services-grid {
    gap: 12px;
    margin-top: 24px;
  }

  .service-card-header {
    padding: 14px 16px;
    gap: 10px;
  }

  .service-card-header-main {
    gap: 10px;
  }

  .service-step-number {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .service-card-title {
    font-size: 14px;
  }

  .service-card-chevron {
    width: 18px;
    height: 18px;
  }

  .service-card-body-inner {
    padding: 0 16px;
  }

  .service-card.active .service-card-body-inner {
    padding: 0 16px 16px;
  }

  .service-card-description {
    font-size: 12px;
    padding-top: 6px;
  }
}

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

  .service-card-header {
    padding: 12px 14px;
  }

  .service-step-number {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}
