/* ===== Популярні послуги (Home) ===== */

/* Сетка блока */
.home-services {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

/* Карточка */
.home-services .service-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 160px;            /* вместо фикс. высоты — чуть гибче */
  padding: 20px 24px;
  text-decoration: none;
  color: #fff;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.20);
  position: relative;
  overflow: hidden;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  -webkit-tap-highlight-color: transparent;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* Fallback, если blur не поддерживается */
@supports not ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
  .home-services .service-card {
    background: rgba(255, 255, 255, 0.22);
  }
}

/* Hover + Active + Focus */
.home-services .service-card:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.50);
  transform: translateY(-2px);
}

.home-services .service-card:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.home-services .service-card:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.60);
  outline-offset: 2px;
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.50);
}

/* Текст заголовка */
.home-services .service-card__title {
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.25;
  font-size: clamp(16px, 1.6vw, 18px);
  max-width: 85%;                     
  display: -webkit-box;                
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Стрелка */
.home-services .service-card__arrow {
  font-size: 24px;
  opacity: 0.9;
  transform: translateX(0);
  transition: transform 0.2s ease;
}
.home-services .service-card:hover .service-card__arrow,
.home-services .service-card:focus-visible .service-card__arrow {
  transform: translateX(4px);
}

/* Адаптив сетки */
@media (max-width: 1200px) {
  .home-services { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
  .home-services { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .home-services { grid-template-columns: 1fr; }
}

/* Уважение настроек пользователя по анимациям */
@media (prefers-reduced-motion: reduce) {
  .home-services .service-card,
  .home-services .service-card__arrow {
    transition: none;
  }
}

/* ===== Вариант плиток в геро ===== */

.home-services--hero { margin-top: 16px; }

.home-services--hero .service-card {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}
.home-services--hero .service-card:hover,
.home-services--hero .service-card:focus-visible {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.50);
}

/* На очень узких — 1–2 колонки в геро, если нужно чуть плотнее */
@media (max-width: 1200px) {
  .home-services--hero { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .home-services--hero { grid-template-columns: 1fr; }
}

/* ===== Кнопка в геро (если используется) ===== */

.header-links .custom-button {
  background: linear-gradient(135deg, #174698, #255edb);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 1.33rem 2.1rem;
  font-size: 1.25rem;
  line-height: 1.5;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}
.header-links .custom-button:hover {
  background: #fff;
  color: #174698;
}



