.section {
  margin-top: 50px;
  position: absolute;
  left: 7.5%;
  right: 7.5%;
}

.section-title {
  border-radius: 5px;
  padding: 5px 10px;
  cursor: pointer;
  margin-bottom: 10px;
}

.section-content {
  opacity: 0;
  transition: opacity 0.5s ease-in-out, height 0.5s ease-in-out;
  margin: 0;
  padding: 0;
  height: 0;
}

.section-entry-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.section-entry {
  flex: 0 0 250px;
  aspect-ratio: 1 / 1;
  padding: 0;
}

.project-thumbnail {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

/* Hover effect container */
.project-thumbnail::after {
  content: attr(data-title);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2.5rem;  /* Increased padding */
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 1.1rem;
  box-sizing: border-box;
  line-height: 1.4;  /* Added line height for better readability */
  max-width: 100%;  /* Ensure text stays within bounds */
  word-wrap: break-word;  /* Handle long words */
}

/* Show overlay on hover */
.project-thumbnail:hover::after {
  opacity: 1;
}

/* Scale image slightly on hover */
.project-thumbnail:hover img {
  transform: scale(1.05);
}

.project-thumbnail:hover {
  cursor: pointer;
}

.section-content::after {
  content: '';
  display: table;
  clear: both;
}

.section.active .section-content {
  opacity: 1;
  height: auto;
  display: block;
}

.section:not(.active) .section-content {
  display: none;
}

.section:not(.active) .section-title {
  display: block;
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
}
