/* ============================================================
   CARDS — cards.css
   Post card styles used across homepage, archive, search
   ============================================================ */

/* ── POST CARD (masonry) ── */
.post-card {
  background: var(--color-white);
  border: var(--border-card);
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition-base);
}

.post-card:hover {
  box-shadow: var(--shadow-card);
}

.post-card__img {
  width: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform var(--transition-slow);
}
.post-card:hover .post-card__img img { transform: scale(1.04); }

/* Image height variants */
.post-card__img--tall   { height: 220px; }
.post-card__img--mid    { height: 170px; }
.post-card__img--short  { height: 130px; }
.post-card__img--xshort { height: 100px; }

/* Tag position */
.post-card__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: var(--z-above);
}

/* Card body */
.post-card__body {
  padding: 0.9rem 1.1rem 1.1rem;
}

.post-card__eyebrow {
  font-size: var(--text-label);
  font-style: italic;
  color: var(--color-jungle);
  margin-bottom: 0.3rem;
  display: block;
}

.post-card__title {
  font-size: 15px;
  font-weight: var(--fw-bold);
  color: var(--color-carbon);
  letter-spacing: var(--tracking-h4);
  line-height: var(--leading-snug);
  margin-bottom: 0.4rem;
  display: block;
  text-decoration: none;
}

.post-card__title--lg {
  font-size: var(--text-h4);
}

.post-card__excerpt {
  font-size: var(--text-caption);
  font-weight: var(--fw-light);
  color: #5A5A5A;
  line-height: var(--leading-relaxed);
  margin-bottom: 0.6rem;
}

.post-card__meta {
  font-size: 11px;
  color: #AAAAAA;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

/* ── MOBILE LIST CARD ── */
/* Used on mobile instead of masonry grid */
.post-card--list {
  display: grid;
  grid-template-columns: 90px 1fr;
  min-height: 70px;
}

.post-card--list .post-card__img {
  height: 100%;
  min-height: 70px;
}

.post-card--list .post-card__img--tall,
.post-card--list .post-card__img--mid,
.post-card--list .post-card__img--short,
.post-card--list .post-card__img--xshort {
  height: 100%;
}

.post-card--list .post-card__body {
  padding: 0.6rem 0.75rem;
}

.post-card--list .post-card__title {
  font-size: 13px;
}
