/* assets/css/blocks/services.css - финальный, исправленный */

.seoms-services { background:#fff; color:#111; font-family:"MontserratCustom", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; padding:48px 0; }
.seoms-services__wrap { max-width:1200px; margin:0 auto; padding:0 20px; box-sizing:border-box; }
.seoms-services__title { text-align:center; font-weight:800; font-size:34px; margin:10px 0 6px; }
.seoms-services__subtitle { text-align:center; color:#222; margin:0 0 28px; font-size:18px; }

/* grid */
.seoms-services__grid { display:grid; grid-template-columns: repeat(4, 1fr); gap: 28px; align-items:stretch; }

/* card */
.service-card {
  background:#fff;
  border-radius:8px;
  overflow:hidden;               /* теперь обрезаем всё строго по карточке */
  display:flex;
  flex-direction:column;
  box-shadow: 0 6px 22px rgba(0,0,0,0.06);
  transition: transform .12s ease, box-shadow .12s ease;
  cursor: pointer;
  min-height: 520px;             /* чтобы карточки одинаковой высоты */
  position: relative;
}
.service-card:focus { outline: 3px solid rgba(255,109,61,0.12); outline-offset: 4px; }
.service-card:hover { transform: translateY(-8px); box-shadow: 0 22px 48px rgba(0,0,0,0.12); }

/* media */
.service-card__media { flex:0 0 260px; height:260px; background:#f6f6f6; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.service-card__media img { width:100%; height:100%; object-fit:cover; display:block; }

/* body */
.service-card__body { padding:20px 18px 18px; display:flex; flex-direction:column; gap:12px; flex:1 1 auto; }
.service-card__title { margin:0; font-size:16px; font-weight:800; line-height:1.15; color:#111; }
.service-card__desc { color:#444; font-size:14px; line-height:1.6; min-height:72px; }
.service-card__price { margin-top:auto; font-weight:700; color:#111; }

/* actions aligned at bottom, buttons не вылезают */
.service-card__actions { display:flex; gap:12px; margin-top:18px; align-items:stretch; }

/* buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; white-space:nowrap; font-weight:800; text-decoration:none; cursor:pointer; border:0; color:#fff; }

/* black button занимает доступное пространство */
.btn--black { background:#000; padding:14px 22px; min-height:56px; flex:1 1 auto; border-radius:0; color:#fff; display:inline-flex; align-items:center; justify-content:center; }

/* orange fixed width, квадратнее */
.btn--orange { background:#ff6d3d; padding:14px 12px; min-height:56px; width:86px; flex:0 0 86px; border-radius:0; display:inline-flex; align-items:center; justify-content:center; }

/* кнопки внутри ссылки/кнопки должны быть поверх карточки, чтобы клики не уйшли на card click */
.service-card__more, .js-open-request { position: relative; z-index: 2; }

/* responsive grid */
@media (max-width:1200px) { .seoms-services__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width:920px)  { .seoms-services__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width:560px)  {
  .seoms-services__grid { grid-template-columns: 1fr; }
  .service-card__media { height:200px; flex:0 0 200px; }
  .service-card { min-height: auto; }
  .service-card__actions { flex-direction: column-reverse; gap:10px; }
  .btn--black, .btn--orange { width:100%; flex:1 1 auto; }
}

/* modal */
.seoms-modal { position:fixed; inset:0; display:none; align-items:center; justify-content:center; z-index:2000; }
.seoms-modal[aria-hidden="false"] { display:flex; }
.seoms-modal__backdrop { position:absolute; inset:0; background:rgba(0,0,0,0.5); }
.seoms-modal__panel { position:relative; background:#fff; padding:20px; border-radius:8px; box-shadow:0 18px 40px rgba(0,0,0,0.2); width:480px; max-width:94%; z-index:2; }
.seoms-modal__close { position:absolute; right:10px; top:8px; border:0; background:transparent; font-size:22px; cursor:pointer; }
.seoms-modal__service { margin:10px 0; }
.seoms-modal__form label { display:block; margin:8px 0; font-size:14px; color:#333; }
.seoms-modal__form input { width:100%; padding:8px; border:1px solid #ddd; border-radius:4px; box-sizing:border-box; }
.seoms-modal__submit { margin-top:8px; }

/* actions: вертикальная колонка (Подробнее сверху, Запросить под ней) */
.service-card__actions {
  display: flex;
  flex-direction: column;    /* <-- вертикально */
  gap: 12px;
  margin-top: 18px;
  align-items: stretch;      /* кнопки растягиваются по ширине контейнера */
  box-sizing: border-box;
  width: 100%;
}

/* общие кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  white-space: nowrap;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  color: #fff;
}

/* большая чёрная кнопка — теперь полноширинная */
.btn--black {
  background: #000;
  padding: 14px 22px;
  min-height: 56px;
  width: 100%;         /* <-- растягиваем */
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* оранжевая кнопка — под чёрной, тоже полноширинная */
.btn--orange {
  background: #ff6d3d;
  padding: 14px 12px;
  min-height: 56px;
  width: 100%;         /* <-- было фикс 86px, убрали */
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* мобильная версия: поведение остаётся прежним */
@media (max-width:560px) {
  .service-card__actions { flex-direction: column-reverse; } /* если хочешь, можно убрать column-reverse */
  .btn--black, .btn--orange { width: 100%; flex: 1 1 auto; }
}
