/* ============================================================
   GALLERY PAGE — Supplemental styles
   ============================================================ */

/* ── Page Hero ── */
.page-hero {
  position: relative;
  height: 50vh;
  min-height: 360px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,27,42,0.85) 0%, rgba(13,27,42,0.55) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 32px 40px;
  width: 100%;
}

.page-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 16px;
}

.page-hero-subtitle {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.75);
  max-width: 520px;
  line-height: 1.7;
}

/* ── Gallery section ── */
.gallery-section {
  padding: 72px 0 100px;
  background: var(--cream-light);
}

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-btn {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1.5px solid #D4C8BA;
  background: var(--white);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--wood-light);
  color: var(--wood);
}

.filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.filter-btn:focus-visible {
  outline: 2px solid var(--wood-light);
  outline-offset: 3px;
}

.filter-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ── Gallery grid ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

/* ── Gallery cards ── */
.gallery-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.35s ease;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.gallery-card.is-hidden {
  display: none;
}

.gallery-card .project-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.gallery-card .project-image {
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
}

.gallery-card-meta {
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
}

.gallery-card-category {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wood-light);
  margin-bottom: 4px;
}

.gallery-card-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.gallery-card-material {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

/* ── Active nav link ── */
.nav-link--active {
  color: var(--wood-pale) !important;
}

.nav-link--active::after {
  transform: scaleX(1) !important;
}

/* ── Empty state ── */
.gallery-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.gallery-empty p {
  font-size: 1.0625rem;
  margin-bottom: 20px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { gap: 6px; }
  .filter-btn { font-size: 0.75rem; padding: 7px 14px; }
}

@media (max-width: 580px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .page-hero { height: 44vh; }
  .page-hero-content { padding: 72px 24px 32px; }
  .gallery-section { padding: 48px 0 72px; }
  .gallery-card-meta { flex-direction: column; gap: 4px; }
  .gallery-card-material { white-space: normal; }
}
