/* ============================================================
   MODULE: Services Grid
   A responsive 2- or 3-column card grid for spa services.

   Classes output by services_grid.php:
     .hds-services-grid__grid      — the CSS grid container
     .hds-services-grid__grid--2   — 2-column variant
     .hds-services-grid__grid--3   — 3-column variant
     .svc-card                     — individual card (article)
     .svc-img                      — image wrapper
     .svc-img__img                 — the img element
     .svc-img--empty               — placeholder when no image
     .svc-body                     — card body (text area)
     .svc-body__title              — card heading
     .svc-body__desc               — card body copy
   ============================================================ */

/* ── Grid layout ───────────────────────────────────────────── */

.hds-services-grid__grid {
  display: grid;
  gap: var(--space-md);
  margin-top: 48px;
}

.hds-services-grid__grid--2 { grid-template-columns: repeat(2, 1fr); }
.hds-services-grid__grid--3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) {
  .hds-services-grid__grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .hds-services-grid__grid--2,
  .hds-services-grid__grid--3 { grid-template-columns: 1fr; }
}

/* ── Card ──────────────────────────────────────────────────── */

.svc-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition) var(--ease),
              transform var(--transition) var(--ease);
}

.svc-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}

/* ── Card image ────────────────────────────────────────────── */

.svc-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--sand);
  flex-shrink: 0;
}

.svc-img__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow) var(--ease);
}

.svc-card:hover .svc-img__img {
  transform: scale(1.04);
}

/* Empty placeholder shown when no image is assigned yet */
.svc-img--empty {
  background: linear-gradient(
    135deg,
    var(--plum-light) 0%,
    var(--sage-light) 100%
  );
}

/* ── Card body ─────────────────────────────────────────────── */

.svc-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-md);
  gap: var(--space-xs);
}

.svc-body__title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-regular);
  line-height: var(--lh-heading);
  color: var(--charcoal);
  margin: 0;
}

.svc-body__title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast) ease;
}

.svc-body__title a:hover {
  color: var(--plum);
}

.svc-body__desc {
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body);
  color: var(--mid);
  margin: 0;
  flex: 1;
}

/* The .link-arr "Read more →" element is already styled in global.css;
   push it to the bottom of the card body */
.svc-body .link-arr {
  margin-top: auto;
  padding-top: var(--space-xs);
}

/* ── Responsive tweaks ─────────────────────────────────────── */

@media (max-width: 600px) {
  .svc-body {
    padding: var(--space-sm);
  }

  .svc-body__title {
    font-size: var(--fs-h4);
  }
}
