/* ===== GALLERY PAGE STYLES ===== */

/* ===== Page Hero ===== */
.page-hero {
  display: grid;
  align-content: start;
  padding: calc(var(--header-h) + var(--space-5)) var(--gutter) var(--space-4);
}

.page-hero h1 {
  max-width: 14ch;
}

.page-intro {
  max-width: 45rem;
  margin: var(--space-3) 0 0;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--muted);
}

/* ===== Showcase ===== */
.gallery-showcase {
  padding: var(--space-2) var(--gutter) var(--space-5);
}

/* Featured: one full-width frame, then a wide companion */
.gallery-featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.featured-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 21 / 9;
  cursor: pointer;
}

.featured-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-item:hover img {
  transform: scale(1.04);
}

/* Grid: varied rhythm — every 7th image gets a double frame */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: var(--space-2);
}

.gallery-item-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 1;
  cursor: pointer;
}

.gallery-item-wrapper:nth-child(7n + 1) {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item-wrapper:hover img {
  transform: scale(1.05);
}

/* ===== CTA Section ===== */
.gallery-cta {
  padding-top: var(--space-2);
}

.contact-panel {
  display: grid;
  justify-items: start;
  padding: clamp(2rem, 6vw, 5rem);
}

.contact-panel h2 {
  max-width: 14ch;
}

.contact-panel p {
  max-width: 42rem;
  margin: 1.2rem 0 1.8rem;
  color: var(--muted);
}

/* ===== Responsive Design ===== */
@media (max-width: 980px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }

  .featured-item {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 640px) {
  .page-hero {
    padding: calc(var(--header-h) + var(--space-4)) var(--gutter) var(--space-3);
  }

  .featured-item {
    aspect-ratio: 4 / 3;
  }

  .gallery-grid {
    gap: 0.6rem;
  }

  .gallery-item-wrapper:nth-child(7n + 1) {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 16 / 9;
  }
}
