.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
  width: 100%;
}

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Item ── */

.project-item {
  overflow: hidden;
  cursor: pointer;
}

/* ── Preview (thumbnail only) ── */

.project-item__thumbnail {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #e8e8e8;
}

.project-item__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.project-item:hover .project-item__thumbnail img,
.project-item.is-expanded .project-item__thumbnail img {
  transform: scale(1.04);
}

.project-item__no-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ddd 0%, #bbb 100%);
}

/* ── Body (title + content — receives the background colour) ── */

.project-item__body {
  background-color: transparent;
  transition: background-color 0.3s ease;
  padding-top: 10px;
}

.project-item:hover .project-item__body,
.project-item.is-expanded .project-item__body {
  background-color: #006d5d;
}

/* ── Title ── */

.project-item__title {
  font-family: var(--e-global-typography-primary-font-family), Sans-serif;
  font-weight: var(--e-global-typography-primary-font-weight);
  color: #000000;
  line-height: 1.2;
  margin: 0;
  padding: 10px;
  transition: color 0.3s ease;
}

.project-item:hover .project-item__title,
.project-item.is-expanded .project-item__title {
  color: #ffffff;
}

/* ── Expandable content ── */

.project-item__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-item__content-inner {
  padding: 0 10px 10px;
  font-family: var(--e-global-typography-text-font-family), sans-serif;
  font-size: 90%;
  line-height: 1.6;
  color: #ffffff;
  cursor: auto;
}

.project-item__content-inner > *:first-child {
  margin-top: 0;
}

/* ── Empty state ── */

.project-grid__empty {
  color: #666;
  font-style: italic;
}
