.square-block {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 200px;
  height: 200px;
  background-color: rgba(100, 100, 100, 0.2);
  /* Lighter default background */
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  padding: 0.5em;
}

/*.square-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}*/

.square-block .block-title {
  position: relative;
  color: white;
  z-index: 1;
  font-size: 1.2em;
  /* Maintain readable font size */
  line-height: 1.4;
  /* Proper line spacing */
  text-align: center;
  /* Center align the text */
  white-space: normal;
  /* Ensure text wraps properly */
  overflow: hidden;
  /* Prevent overflow issues */
  text-overflow: ellipsis;
  /* Truncate overflowed text */
  display: -webkit-box;
  /* Enable line clamping */
  -webkit-line-clamp: 3;
  /* Limit text to 3 lines */
  -webkit-box-orient: vertical;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease;
}

.square-block:hover .overlay {
  opacity: 0.5;
}

