.tattva-projects-widget {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tattva-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

/* Явно задаём 5 колонок, если места достаточно */
@media (min-width: 1000px) {
  .tattva-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.tattva-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  padding: 12px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tattva-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 16px rgba(0,0,0,0.1);
}

.tattva-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

.tattva-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #222;
  /* Не задавайте min-height — Flexbox сам распределит */
}

.tattva-description {
  font-size: 12px;
  color: #555;
  line-height: 1.4;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.25s, max-height 0.25s;
}

.tattva-card:hover .tattva-description {
  opacity: 1;
  max-height: 300px;
  margin-bottom: 10px;
}

.tattva-actions {
  margin-top: auto; /* ← КЛЮЧЕВОЕ: прижимает к низу */
  text-align: center;
}

.tattva-actions a {
  display: inline-block;
  padding: 6px 12px;
  background: #2b2b2b;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}

.tattva-actions a:hover {
  background: #444;
}

.tattva-show-more {
  display: block;
  margin: 20px auto 20px;
  padding: 8px 20px;
  background: #2b2b2b;
  color: white;
  border: none;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.tattva-show-more:hover {
  background: #444;
}

/* Адаптив: на узких экранах — 2 или 3 колонки */
@media (max-width: 768px) {
  .tattva-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  .tattva-card {
    padding: 12px;
  }
  .tattva-card img {
    height: 80px;
  }
}
