/* Ported from cp-catapult cpc-catapult-blocks/sass/components/card/style.scss
   Default listing card — image with post-type badge + title + excerpt + date. */

.cpc-card {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.cpc-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.cpc-card__upper {
  display: flex;
  flex-direction: column;
}

.cpc-card .image {
  position: relative;
}

.cpc-card .image img {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.cpc-card .image .category {
  position: absolute;
  bottom: 0;
  left: 20px;
  z-index: 2;
  color: #ffffff;
  background-color: #006a52;
  padding: 0.4rem 0.6rem;
  border-radius: 0.25rem 0.25rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cpc-card .content {
  padding: 1rem;
  color: #2e2d2b;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cpc-card .title {
  font-size: 1.125rem;
  line-height: 1.2;
  text-transform: none;
  margin: 0;
}

.cpc-card .title a {
  color: #2e2d2b;
  text-decoration: underline;
  text-decoration-thickness: 0.05rem;
  text-underline-offset: 0.16em;
}

.cpc-card .title a:hover {
  text-decoration-thickness: 2px;
}

.cpc-card .title a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.cpc-card .excerpt {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #2e2d2b;
}

.cpc-card .footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 0.75rem;
  margin: 1rem;
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #006a52;
  font-weight: 700;
}

.cpc-card .footer .date {
  color: #58575c;
  font-weight: 400;
}

/* ===========================
   Compact variant — used in further-reading sidebar.
   Inline image + title only, no excerpt or footer.
   =========================== */

.cpc-card--compact {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.cpc-card--compact:hover {
  transform: none;
  box-shadow: none;
}

.cpc-card--compact .cpc-card__upper {
  display: flex;
  gap: 1rem;
}

.cpc-card--compact .image {
  flex: 0 0 80px;
  max-width: 80px;
}

.cpc-card--compact .image img {
  aspect-ratio: 1 / 1;
  border-radius: 4px;
}

.cpc-card--compact .image .category { display: none; }

.cpc-card--compact .content {
  padding: 0;
  flex: 1;
  min-width: 0;
}

.cpc-card--compact .title {
  font-size: 1rem;
  line-height: 1.3;
}

.cpc-card--compact .excerpt,
.cpc-card--compact .footer {
  display: none;
}
