/* Converted from src/components/site/home/ImageCard.module.css (CSS Module): local classes are prefixed "home-image-card__". */
/* Ohio "banner card" (-with-overlay -img-scale) and the staggered 3-column rows of the home page. */

/* The ratio is a minimum: on narrow columns the card grows with its text (in-flow overlay). */
.home-image-card__card {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 374 / 604;
  overflow: hidden;
  color: #fff;
  background-color: var(--color-surface-dark);
  border-radius: var(--radius);
  isolation: isolate;
}

.home-image-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration) var(--ease);
}

.home-image-card__card:hover .home-image-card__image,
.home-image-card__card:focus-visible .home-image-card__image {
  transform: scale(1.06);
}

.home-image-card__overlay {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 21.6px;
  background-color: rgb(2 1 1 / var(--tint, 0.2));
}

.home-image-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--h3-size);
  font-weight: 400;
  line-height: var(--h3-leading);
  letter-spacing: -0.035em;
  color: #fff;
}

.home-image-card__description {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.6;
  color: #fff;
}

/* ----- Rows ----- */
/* Positioned: like the original Elementor sections, a row paints over the cards of the previous
   row that the scroll effect pushed into it (fully when the row is opaque). */
.home-image-card__row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: var(--container-boxed);
  margin-inline: auto;
}

.home-image-card__column {
  min-width: 0;
  /* Elementor spacer (vh) + 20px widget spacing above the card */
  padding: calc(var(--offset, 0vh) + 20px) 16px var(--after, 0px);
}

.home-image-card__opaque {
  background-color: var(--color-bg);
}

@media (prefers-reduced-motion: reduce) {
  .home-image-card__card:hover .home-image-card__image,
  .home-image-card__card:focus-visible .home-image-card__image {
    transform: none;
  }
}

@media (max-width: 767px) {
  .home-image-card__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-image-card__column {
    padding: calc(6vh + 20px) 16px var(--after-mobile, 0px);
  }

  .home-image-card__overlay {
    padding: 16px;
  }
}
