.ehig-grid {
  --ehig-columns: 2;
  --ehig-card-height: 310px;
  --ehig-zoom: 1.07;
  --ehig-zoom-duration: 600ms;
  display: grid;
  grid-template-columns: repeat(var(--ehig-columns), minmax(0, 1fr));
  grid-auto-rows: var(--ehig-card-height);
}

.ehig-card {
  position: relative;
  min-width: 0;
  min-height: var(--ehig-card-height);
  overflow: hidden;
  isolation: isolate;
  background: #111;
}

.ehig-featured-first .ehig-card:first-child {
  grid-row: span 2;
}

.ehig-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transition: background-color .35s ease;
}

.ehig-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--ehig-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  transition: transform var(--ehig-zoom-duration) ease;
}

.ehig-card:hover::after,
.ehig-card:focus-within::after {
  transform: scale(var(--ehig-zoom));
}

.ehig-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.ehig-title {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  transform: translateY(22px);
  transition: transform .35s ease;
}

.ehig-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  min-width: 158px;
  padding: 10px 20px;
  border: 1px solid;
  border-radius: 0;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity .35s ease, visibility .35s ease, transform .35s ease, color .25s ease, background-color .25s ease;
}

.ehig-card:hover .ehig-title,
.ehig-card:focus-within .ehig-title,
.ehig-card:hover .ehig-button,
.ehig-card:focus-within .ehig-button {
  transform: translateY(0);
}

.ehig-card:hover .ehig-button,
.ehig-card:focus-within .ehig-button {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 767px) {
  .ehig-featured-first .ehig-card:first-child {
    grid-row: span 1;
  }
}

@media (hover: none) {
  .ehig-title,
  .ehig-button {
    transform: none;
  }

  .ehig-button {
    opacity: 1;
    visibility: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ehig-card::before,
  .ehig-card::after,
  .ehig-title,
  .ehig-button {
    transition: none;
  }
}
