/* ===== СЕРВИСЫ ===== */
#services {
  background: var(--bg-soft);
}

.services-header {
  max-width: var(--max-w);
  margin: 0 auto clamp(48px, 6vw, 80px);
  text-align: center;
}

/* Десктоп: зона "кнопка каталога → Сервисы → серая плашка" (66/18) */
@media (min-width: 1024px) {
  .services-header {
    margin-bottom: 18px;
  }
}

.services-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
}

.services-heading {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* --- Сетка карточек --- */
.services-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-light);
  border: 1px solid var(--line-light);
}

.services-card {
  background: var(--bg-card);
  padding: clamp(32px, 4vw, 56px) clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: background 0.35s var(--ease-gold), transform 0.3s var(--ease-gold), box-shadow 0.35s var(--ease-gold);
  cursor: default;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.03); /* subtle lift */
}

/* Золотая линия сверху при ховере */
.services-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--maroon);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-gold);
}

.services-card:hover {
  background: var(--bg-soft);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.services-card:hover::before {
  transform: scaleX(1);
}

.services-card-num {
  font-family: var(--font-display);
  font-size: var(--text-label);
  letter-spacing: var(--ls-num);
  color: var(--text);
}

.services-card-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 300;
  font-style: italic; /* luxury italic — Cormorant Garamond */
  color: var(--text);
  line-height: 1.2;
}

.services-card-body {
  font-family: var(--font-display);
  font-size: var(--text-body);
  color: var(--text);
  line-height: 1.65;
}

/* --- CTA --- */
.services-cta {
  max-width: var(--max-w);
  margin: clamp(40px, 5vw, 64px) auto 0;
  text-align: center;
}

/* Десктоп: зона "плашка сервисов → кнопка ОБСУДИТЬ ЗАДАЧУ → "Как это работает""
   = 76px (2см), кнопка поднята на 10px (74/18 → 64/12) */
@media (min-width: 1024px) {
  .services-cta {
    margin-top: 64px;
  }

  #services {
    padding-bottom: 12px;
  }
}

.services-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-button);
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid var(--line-light-solid);
  padding: 18px 40px;
  min-height: 48px;
  transition: background 0.3s var(--ease-gold), color 0.3s, border-color 0.3s;
}

.services-cta-btn:hover {
  background: var(--maroon);
  color: var(--on-dark);
  border-color: var(--maroon);
}

/* --- Мобиль --- */
@media (max-width: 767px) {
  .services-header {
    margin-bottom: clamp(32px, 5vw, 48px); /* было до 80px — после убранных карточек воздуха меньше нужно */
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 0;
    background: none; /* убрать grid-as-border трюк */
    border: none;
  }

  .services-card {
    background: none;
    border: none;
    border-top: 1px solid var(--line-light);
    border-radius: 0;
    box-shadow: none;
    padding: 36px 0;
    gap: 10px;
    transform: none !important; /* убрать hover translateY — мусор на мобиле */
    cursor: default;
  }

  .services-card:last-child {
    border-bottom: 1px solid var(--line-light);
  }

  /* Убрать красную линию hover — на мобиле hover не работает */
  .services-card::before {
    display: none;
  }

  /* Номера скрыты — без карточки они теряют смысл */
  .services-card-num {
    display: none;
  }

  .services-card-title {
    font-size: clamp(22px, 5.5vw, 30px);
    font-style: italic;       /* как Diptyque набирает названия услуг */
    letter-spacing: -0.01em;  /* tight tracking на italic serif = дорого */
  }

  .services-card-body {
    font-size: clamp(15px, 4vw, 17px);
    color: var(--text-muted);
    line-height: 1.6;
  }

  .services-cta-btn {
    width: 100%;
    max-width: 100%;
    text-align: center;
    margin-top: 8px;
  }
}

/* --- 320px --- */
@media (max-width: 374px) {
  .services-card {
    padding: 28px 0;
  }
}

/* --- Планшет --- */
@media (min-width: 768px) and (max-width: 1023px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    background: none;
    border: none;
  }

  .services-card {
    border: none;
    border-bottom: 1px solid var(--line-light);
    box-shadow: none;
    padding: 36px 24px;
  }

  .services-card:nth-child(odd) {
    border-right: 1px solid var(--line-light);
  }
}
