/* ==========================================================================
   Gallery Page Specific Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Section base
   -------------------------------------------------------------------------- */
.gallery-section {
  padding: 80px 0;
  background-color: #F4F4F4;
}

/* 2nd and 4th sections */
.gallery-section:nth-of-type(even) {
  background-color: var(--color-white);
}

.gallery-section h2 {
  margin: 0 0 16px 0;
  color: var(--color-text-main);
}

.gallery-section .gallery-desc {
  margin: 0 0 56px 0;
  color: var(--color-text-muted);
  font: var(--font-body);
}

/* --------------------------------------------------------------------------
   Image Base & Hover (统一缩放效果)
   -------------------------------------------------------------------------- */
.gallery-workshop-grid img,
.gallery-work-grid img,
.gallery-products-grid img,
.gallery-team-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 图片填满格子不拉伸 */
  display: block;
  transition: transform 0.25s ease;
  cursor: zoom-in; /* 提示可点击放大 */
}

/* 悬停放大 1.08 */
.gallery-workshop-grid img:hover,
.gallery-work-grid img:hover,
.gallery-products-grid img:hover,
.gallery-team-grid img:hover {
  transform: scale(1.08);
}

/* --------------------------------------------------------------------------
   Section 1 — Our Workshop
   -------------------------------------------------------------------------- */
.gallery-workshop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  overflow: hidden; /* 防止放大时撑破 */
}

.gallery-workshop-grid .wide-3 {
  grid-column: 1 / -1;
  height: 292px;
}

.gallery-workshop-grid .col-1 {
  grid-column: span 1;
  height: 292px;
}

/* --------------------------------------------------------------------------
   Section 2 — Our Work
   -------------------------------------------------------------------------- */
.gallery-work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  overflow: hidden;
}

.gallery-work-grid .span-2 {
  grid-column: span 2;
  height: 292px;
}

.gallery-work-grid .col-1 {
  grid-column: span 1;
  height: 292px;
}

/* --------------------------------------------------------------------------
   Section 3 — Products
   -------------------------------------------------------------------------- */
.gallery-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 24px;
  row-gap: 32px;
  overflow: hidden;
}

.gallery-products-grid .square {
  aspect-ratio: 1 / 1;
  height: auto;
}

/* --------------------------------------------------------------------------
   Section 4 — Our Team
   -------------------------------------------------------------------------- */
.gallery-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  overflow: hidden;
}

.gallery-team-grid .col-1 {
  height: 292px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .gallery-workshop-grid .wide-3 {
    height: auto;
    aspect-ratio: 1231 / 292;
  }
  .gallery-workshop-grid .col-1,
  .gallery-work-grid .span-2,
  .gallery-work-grid .col-1,
  .gallery-team-grid .col-1 {
    height: auto;
    aspect-ratio: 389 / 292;
  }
  .gallery-work-grid .span-2 {
    aspect-ratio: 810 / 292;
  }
}

@media (max-width: 768px) {
  .gallery-section {
    padding: 48px 0;
  }

  .gallery-workshop-grid,
  .gallery-work-grid,
  .gallery-products-grid,
  .gallery-team-grid {
    grid-template-columns: 1fr;
  }

  .gallery-workshop-grid .wide-3,
  .gallery-work-grid .span-2 {
    grid-column: 1 / -1;
  }

  .gallery-workshop-grid .wide-3,
  .gallery-workshop-grid .col-1,
  .gallery-work-grid .span-2,
  .gallery-work-grid .col-1,
  .gallery-team-grid .col-1 {
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

/* ==========================================================================
   Gallery Lightbox (确保你原有的 JS 能正常配合)
   ========================================================================== */
/* 因为之前的 style.css 有全局 lightbox，这里为了保险，把特定样式留着就行，不用重复写 */