.photo-gallery {

}

.theme-box img.cover-img {
  max-width: 100%;      /* 設定圖片最大寬度為容器寬度 */
  /* height: auto;         根據寬度自動調整高度 */
  object-fit: cover;    /* 保持圖片比例，並裁剪超出範圍部分 */
  /* width: auto;
  height: 384px; */
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;

  @media (max-width: 1280px) {
      grid-template-columns: repeat(2, 1fr);
      gap: 24px;
  }
  @media (max-width: 640px) {
      grid-template-columns: repeat(1, 1fr);
      gap: 18px;
  }
}

.theme-box {
  display: flex;
  flex-direction: column;
  gap:8px;
  color: #6d6d6d;
  font-weight: 300;

}

.theme-title {
  display: flex;
  justify-content: center;
  text-align: right;
  text-decoration: none !important;
color: inherit;
  font-family: 'Zen Old Mincho', serif;
  font-weight: 400;
  font-size: 16px;
}

.cover-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3; /* 可以自己改比例 */
  overflow: hidden;
  background-color: #eee; /* 背景色（底色） */
}

.cover-wrapper.loading::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    #eee 20%,
    #f5f5f5 50%,
    #eee 80%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  z-index: 1;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.cover-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 2;
  position: relative;
}

.fade-in-img {
  opacity: 0;
  transition: opacity 0.6s ease-in-out; /* 控制浮現的速度和曲線 */
}

.fade-in-img.loaded {
  opacity: 1;
}


/* -----------------switch */
.switch-container {
  margin-bottom: 1rem;
}
.switch-container button {
  padding: 0.5rem 1rem;
  margin-right: 0.5rem;
  cursor: pointer;
}
.switch-container button.active {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
}

.switch-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 1rem 0;
  gap: 0.5rem;
}

.switch-bar .icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.switch-buttons {
  display: flex;
  gap: 0.5rem;
}

.switch-btn {
  background: transparent;
  color: #9e9e9e;
  border: none;
  padding: 4px 12px;
  font-size: 14px;
  font-family: 'outfit';
  cursor: pointer;
  transition: all 0.2s ease;
}

.switch-btn:hover {
  color: #000;
}

.switch-btn.active {
  border-radius: 16px;
  background: #000;
  color: #fff;
}
