/* Content Box — reusable content-card component used by PTEP, Knowledge, Apps, Search */

.content-card {
  display: flex;
  position: relative;
  flex-direction: column;
  min-width: 300px;
  max-width: 430px;
  flex: 1 1 calc(33.33% - 20px);
  border-radius: 10px;
  overflow: hidden;
  background: var(--p-white);
  box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.1);
}

.content-card__head {
  display: flex;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  /* Subtle placeholder so cards stay the same height even when no <img>
     renders (e.g. a record has no `image_for_slider`). Replaces the
     earlier D-001 collapse rule, which made image-less cards shorter and
     caused row-height jitter across the grid. */
  background: linear-gradient(
    135deg,
    var(--p-gray-100) 0%,
    var(--p-gray-100) 50%,
    var(--p-gray-100) 100%
  );
}

/* Faint PMG mark in the middle of the empty slot. Uses :has() to scope to
   the no-<img> case; rendered imgs cover this with object-fit: cover. */
.content-card__head:not(:has(img))::after {
  content: "PMG";
  color: var(--p-gray-300);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0.6;
}

.content-card__image {
  width: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.content-card:hover .content-card__image {
  transform: scale(1.05);
}

.content-card__body {
  display: flex;
  position: relative;
  flex-direction: column;
  padding: 20px 24px;
  gap: 8px;
}

.content-card__title {
  color: var(--p-ink);
  font-style: normal;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-card__text {
  color: var(--p-gray-800);
  font-style: normal;
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 1050px) {
  .content-card {
    min-width: 260px;
    flex: 1 1 calc(50% - 15px);
  }
}

@media (max-width: 450px) {
  .content-card {
    /* Cards stack one-per-row inside .listing__data (a flex-wrap
       container) on mobile. The previous `flex: 0 0 75vw` pinned each
       card to 75% of the viewport, leaving a ~25% empty strip on the
       right of every row — the comment in ContentBox.html (`Sizes:
       ... full-width mobile`) already documented the intended
       behaviour. `min-width: 0` lets cards shrink on very narrow
       viewports without overflowing. */
    min-width: 0;
    max-width: unset;
    flex: 1 1 100%;
  }

  .content-card__body {
    padding: 14px 16px;
    gap: 4px;
  }
}

/* ============================================================
   Project card additions (2026-05-28) — chips + meta row used
   by /Projects/ listing. Render only when info has the project
   shape (industry, project_type_label, end_date).
   ============================================================ */
.content-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.content-card__chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--text-muted);
  background: var(--p-gray-100);
  border-radius: 9999px;
  white-space: nowrap;
}

.content-card__chip--industry {
  color: var(--p-blue-600);
  background: var(--p-blue-100);
}

.content-card__chip--type {
  color: var(--text-inverse);
}

.content-card__chip--type-greenfield  { background: var(--p-positive); }
.content-card__chip--type-expansion   { background: var(--p-blue-400); }
.content-card__chip--type-upgradation { background: var(--p-orange-400); }

.content-card__meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.content-card__meta-item {
  white-space: nowrap;
}

