/* Styles for gallery-grid.html (the photo grid embedded in the home page) */

body {
  margin: 0;
  font-family: 'Noto Serif TC', 'Inter', sans-serif;
  background: #f9fafb;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px;
}
@media (max-width: 767px) {
  .text-cell h3 {
    font-size: 0.65rem;
    margin: 0 0 4px 0;
  }
  .text-cell .tags {
    font-size: 0.55rem;
  }
  .item .overlay h3 {
    font-size: 0.65rem !important;
    margin: 0 0 2px 0 !important;
    padding-bottom: 1px !important;
  }
  .item .overlay .tags {
    font-size: 0.55rem !important;
    margin: 2px 0 !important;
    gap: 2px !important;
  }
  .item .overlay button {
    font-size: 0.55rem !important;
    padding: 2px 5px !important;
  }
}
@media (min-width: 768px) {
  .gallery {
    gap: 8px;
    padding: 16px;
  }
}
.item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
}
.item img {
  width: 100%;
  display: block;
  transition: transform 0.7s ease;
}
.item:hover img {
  transform: scale(1.05);
}

/* Sliding overlay from left to right */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: width 0.5s ease;
}
.item:hover .overlay {
  width: 100%;
}

.overlay-content {
  text-align: center;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease 0.2s;
}
.item:hover .overlay-content {
  opacity: 1;
}

.overlay h3 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 4px;
}

.overlay .tags {
  margin: 8px 0;
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.overlay button {
  background: transparent;
  border: 1px solid white;
  padding: 6px 12px;
  color: white;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.overlay button:hover {
  background: white;
  color: black;
}
