@import url("https://fonts.googleapis.com/css2?family=Phetsarath:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");

.collection-wrapper {
  width: 70%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; /* 3 equal columns */
  grid-template-rows: auto auto auto auto auto; /* 3 rows */
  gap: 20px;
  align-items: start;
  margin: 4rem auto;
  background-color: rgba(0, 0, 0, 0.45);
  padding: 2rem;
  color: #fff;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 4px 0px,
    rgba(0, 0, 0, 0.19) 0px 6px 20px 0px;
  font-size: 1.2rem;
}

.collection-wrapper img {
  width: 100%;
  height: auto; /* Set a consistent height */
  object-fit: cover; /* Crop images to fit nicely */
}

.collection-wrapper h2 {
  grid-column: 1 / -1; /* Span all 3 columns */
  grid-row: 1;
  margin-bottom: 0;
  text-align: center;
  font-size: 3rem;
}

.collection-wrapper a {
  grid-row: 5;
  grid-column: 1 / -1;
  justify-self: center; /* centers horizontally */
  align-self: center; /* optional, centers vertically */
}

.collection-text-left {
  grid-column: 1 / 3; /* Span first 2 columns */
  grid-row: 2 / 4; /* Span rows 2 and 3 */
  padding-right: 20px;
  height: 100%; /* Add some spacing from images */
}

.collection-text-left p {
  margin-bottom: 1rem;
}

.us-flag,
.lao-flag {
  height: 20px;
  width: 30px !important;
  margin: 0 6px;
  filter: brightness(50%);
  box-shadow: none;
  transition: 0.3s ease-in-out;
}

.us-flag:hover,
.lao-flag:hover {
  cursor: pointer;
  filter: brightness(75%);
}

.us-flag.active,
.lao-flag.active {
  filter: brightness(100%);
  box-shadow: 0 4px 8px #0003, 0 10px 24px #00000030;
}

.menu-link {
  display: flex;
  justify-content: center;
  margin: 1rem auto;
}

.english-font {
  font-family: Playfair Display, "Times New Roman", Times, serif;
}

.lao-font {
  font-family: Phetsarath, sans-serif;
  font-size: 1.39rem !important;
}

@media (max-width: 768px) {
  .collection-wrapper {
    width: 90%; /* Wider on mobile */
    grid-template-columns: 1fr; /* Single column on mobile */
    grid-template-rows: auto auto auto; /* h2, text, images */
    gap: 20px;
    padding: 1.5rem; /* Less padding on mobile */
    color: #fff;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 4px 0px,
      rgba(0, 0, 0, 0.19) 0px 6px 20px 0px;
    font-size: 1.2rem; /* Smaller font on mobile */
  }

  .collection-wrapper h2 {
    grid-column: 1; /* Single column on mobile */
    grid-row: 1;
    margin-bottom: 0;
    font-size: 2rem; /* Smaller on mobile */
  }

  .collection-text-left {
    grid-column: 1; /* Single column on mobile */
    grid-row: 2;
    padding-right: 0; /* No right padding on mobile */
  }

  .collection-wrapper a {
  grid-column: 1;    /* single column */
  grid-row: 9;      /* a high row number ensures it's last */
}
}
