.gallery {
  /* Using CSS grid layout with 3 equal columns */
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.gallery-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

  .gallery-col-third {
    display: none;
  }
}

@media (max-width: 576px) {
  .gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-col-third {
    display: none;
  }

  .gallery-col-second {
    display: none;
  }
}

/* Gallery card styles */
.gallery-card {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.gallery-card-avatar {
  height: 160px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gallery-card-avatar-initial {
  font-size: 3rem;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.9);
}

.avatar-color-0 {
  background-color: #eda6a6;
}
.avatar-color-1 {
  background-color: #82c2f5;
}
.avatar-color-2 {
  background-color: #90d193;
}
.avatar-color-3 {
  background-color: #bda2e0;
}
.avatar-color-4 {
  background-color: #f7c881;
}
.avatar-color-5 {
  background-color: #77d4cb;
}

/* gallery image styles */
.card-img {
  width: 100%;
  height: auto; /* preserves aspect ratio */
  max-width: 100%;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

/* image comment section styles */
.comment-section {
  max-height: 11rem;
  overflow-y: auto;
  border-top: 1px solid black;
}
