/* Converted from src/components/site/ui/PostCard.module.css (CSS Module): local classes are prefixed "ui-post-card__". */
/* Blog card of the archives (category, tag, search, related posts). */

.ui-post-card__card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
}

.ui-post-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: var(--color-fill);
}

.ui-post-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration) var(--ease);
}

/* -img-scale: scale3d(1.06) over .35s (archives; the related posts have no zoom) */
.ui-post-card__zoom:hover .ui-post-card__media img {
  transform: scale(1.06);
}

/* Empty `.overlay-details -fade-up` of the theme's cards: 2 × spacer tall, dark gradient at the
   bottom of the image, fades and rises 6% on card hover (.35s). */
.ui-post-card__shade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: calc(var(--spacer) * 2);
  background: linear-gradient(360deg, rgb(17 16 19 / 0.5) 0%, rgb(17 16 19 / 0) 100%);
  opacity: 0;
  transform: translateY(6%);
  transition:
    opacity var(--duration) var(--ease),
    transform var(--duration) var(--ease);
  pointer-events: none;
}

.ui-post-card__card:hover .ui-post-card__shade {
  opacity: 1;
  transform: none;
}

/* 20px × the chrome spacer (21.6px at 1440, 16px ≤1180px); 16px all round ≤768px. */
.ui-post-card__details {
  flex: 1;
  padding: 20px var(--spacer);
  background-color: var(--color-fill);
}

.ui-post-card__meta {
  margin: 0 0 4px;
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* Measured on the original: the h4 scale (19.92px up to ~1060px, 22.64px at 1440), line-height
   1.2 (1.3 ≤768px). */
.ui-post-card__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--h4-size);
  font-weight: var(--weight-semibold);
  line-height: var(--h4-leading);
  letter-spacing: -0.03em;
  color: var(--color-heading);
}

/* `-undash` title link: no underline, only the color eases in (and snaps back, like the theme
   whose transition is declared on :hover). */
.ui-post-card__titleLink:hover {
  color: var(--color-brand);
  transition: color var(--duration) var(--ease);
}

.ui-post-card__details .ui-post-card__pills {
  margin-top: 12px;
}

.ui-post-card__details .ui-post-card__more {
  margin-top: 16px;
}

@media (max-width: 768px) {
  .ui-post-card__details {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ui-post-card__zoom:hover .ui-post-card__media img,
  .ui-post-card__card:hover .ui-post-card__shade {
    transform: none;
  }
}

/* ----- Grid ----- */
.ui-post-card__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ui-post-card__cols2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1199px) {
  .ui-post-card__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* vc_col-lg-4 vc_col-md-6 vc_col-xs-12 of the original: one column up to 768px included. */
@media (max-width: 768px) {
  .ui-post-card__grid,
  .ui-post-card__cols2 {
    grid-template-columns: minmax(0, 1fr);
  }
}
