/* Category cards (sections/nahleh-categories). From 750px: every card in one row, equal height. Phone: the
   cards stacked, one full-width box under the other. A card is only as tall as its text, plus its image when
   it has one — no empty block where a picture would be. */
.nahleh-categories {
  display: grid;
  grid-template-columns: repeat(var(--nahleh-categories-count, 3), minmax(0, 1fr));
  gap: 1.6rem;
}

.nahleh-category {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  border-radius: var(--nh-radius-xl);
  padding: 2.4rem 2.8rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.nahleh-category__body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  text-align: start;
}

.nahleh-category__heading {
  font-size: 2rem;
  font-weight: 900;
  margin: 0 0 0.8rem;
  color: var(--nh-charcoal);
}

.nahleh-category__subtext {
  margin: 0 0 1.4rem;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--nh-body);
  line-height: 1.6;
}

.nahleh-category__link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: rgb(var(--color-button));
  white-space: nowrap;
}

.nahleh-category__link svg {
  width: 1.6rem;
  height: 1.6rem;
  flex-shrink: 0;
}

/* The icon: a square box on the card's own colour, sized by the section's "Icon size"
   (--nahleh-category-icon-size). No hexagon or tile — a crop cut icons (the sparkles at their corners). */
.nahleh-category__icon {
  flex: none;
  width: var(--nahleh-category-icon-size, 8.4rem);
  height: var(--nahleh-category-icon-size, 8.4rem);
}

.nahleh-category__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* "Icon fit: Fill the box" — a photo fills the square, with soft corners instead of a hard crop. */
.nahleh-categories--icon-cover .nahleh-category__icon {
  border-radius: var(--nh-radius-lg);
  overflow: hidden;
}

.nahleh-categories--icon-cover .nahleh-category__icon img {
  object-fit: cover;
}

/* A phone: the cards stack, one full-width box under the other (no sideways scrolling). */
@media screen and (max-width: 749px) {
  .nahleh-categories {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }

  .nahleh-category {
    padding: 1.8rem 2rem;
  }

  .nahleh-category__heading {
    font-size: 1.7rem;
    margin-block-end: 0.4rem;
  }

  .nahleh-category__subtext {
    margin-block-end: 0.8rem;
    font-size: 1.25rem;
    line-height: 1.5;
  }

  .nahleh-category__icon {
    width: calc(var(--nahleh-category-icon-size, 8.4rem) * 0.85);
    height: calc(var(--nahleh-category-icon-size, 8.4rem) * 0.85);
  }

  /* Optical nudge, asked for on the stacked cards: the shield sits a little to the left of the other two. */
  .nahleh-category__icon > img[src$="/pet-care.svg"] {
    translate: -0.4rem 0;
  }
}
