/* Compact news cards — homepage + about-us */

.mp-post-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  margin: 0;
}

.mp-post-cards--home {
  margin-bottom: 28px;
}

/* About: full canvas width (legacy layout) */
.mp-post-cards--about {
  box-sizing: border-box;
  width: min(100vw, var(--mp-canvas, 1300px));
  max-width: min(100vw, var(--mp-canvas, 1300px));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 16px;
  margin: 18px 0 8px;
}

.mp-post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(20, 48, 40, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(20, 48, 40, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mp-post-card:hover {
  border-color: rgba(0, 191, 128, 0.55);
  box-shadow: 0 10px 28px rgba(20, 48, 40, 0.1);
  transform: translateY(-2px);
}

.mp-post-card__media {
  aspect-ratio: 16 / 10;
  background: #f4f7f6;
  overflow: hidden;
  flex-shrink: 0;
}

.mp-post-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mp-post-card__thumb-empty {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 120px;
  background: linear-gradient(135deg, #eef3f1 0%, #f8faf9 100%);
}

.mp-post-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 12px 14px 14px;
  min-height: 92px;
}

.mp-post-card__date {
  display: block;
  margin-bottom: 6px;
  font-family: "Exo 2", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  color: #8a94a0;
}

.mp-post-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-family: "Exo 2", Roboto, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  color: #2a3732;
}

.mp-post-card:hover .mp-post-card__title {
  color: #00bf80;
}

.mp-post-card--all .mp-post-card__media {
  aspect-ratio: 1 / 1;
}

.mp-post-card--all .mp-post-card__body {
  justify-content: center;
  text-align: center;
  min-height: 64px;
}

.mp-post-card--all .mp-post-card__title {
  -webkit-line-clamp: 2;
  font-weight: 500;
}

.mp-post-card__thumb-empty--all {
  background: linear-gradient(145deg, #c0e6d2 0%, #e8f5ef 100%);
}

@media (max-width: 1100px) {
  .mp-post-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .mp-post-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .mp-post-card__title {
    font-size: 15px;
    -webkit-line-clamp: 2;
  }

  .mp-post-card__body {
    min-height: 76px;
    padding: 10px 12px 12px;
  }
}

@media (max-width: 480px) {
  .mp-post-cards {
    grid-template-columns: 1fr;
  }

  .mp-post-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mp-post-card {
    transition: none;
  }

  .mp-post-card:hover {
    transform: none;
  }
}
