/* ==========================================================================
   Gallery Page — card grid from gallery CPT
   ========================================================================== */

.site-main--gallery {
  --hp-gutter: 24px;
  --hp-section-y: clamp(3rem, 6vw, 5rem);
  --hp-container-x: 5%;
  --hp-max: 1440px;
  --hp-radius: 12px;
  --hp-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08), 0 4px 10px -5px rgba(0, 0, 0, 0.04);
  --hp-shadow-hover: 0 20px 40px -12px rgba(0, 0, 0, 0.12);

  overflow-x: hidden;
  padding-top: 0 !important;
  background: var(--color-surface);
  font-family: var(--font-body);
}

.site-main--gallery .hp-container {
  width: 100%;
  max-width: var(--hp-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--hp-container-x);
  padding-right: var(--hp-container-x);
  box-sizing: border-box;
}

/* Header */
.gl-hero {
  padding: calc(80px + clamp(2.5rem, 5vw, 4rem)) 0 clamp(2rem, 4vw, 3rem);
  background: linear-gradient(180deg, #fff 0%, var(--color-surface) 100%);
  text-align: center;
}

.gl-hero__eyebrow {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 12px;
}

.gl-hero__title {
  font-family: var(--font-headline);
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
  margin: 0 auto 16px;
  max-width: 900px;
}

.gl-hero__desc {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.7;
  color: var(--color-on-surface-variant);
  margin: 0 auto;
  max-width: 640px;
}

.gl-hero__line {
  width: 64px;
  height: 3px;
  background: var(--color-accent-gold);
  margin: 24px auto 0;
}

/* Grid */
.gl-section {
  padding: 0 0 var(--hp-section-y);
}

.gl-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

@media (min-width: 640px) {
  .gl-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gl-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Card */
.gl-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--hp-radius);
  border: 1px solid rgba(232, 222, 211, 0.85);
  box-shadow: var(--hp-shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.gl-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--hp-shadow-hover);
}

.gl-card__media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--color-surface-container);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: pointer;
}

.gl-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

.gl-card:hover .gl-card__media img {
  transform: scale(1.06);
}

.gl-card__zoom {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.gl-card:hover .gl-card__zoom {
  opacity: 1;
  transform: translateY(0);
}

.gl-card__media--empty {
  background: linear-gradient(135deg, #ececec, #ddd);
  cursor: default;
}

.gl-card__body {
  padding: 22px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.gl-card__title {
  font-family: var(--font-headline);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-primary);
  margin: 0;
}

.gl-card__desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-on-surface-variant);
  margin: 0;
}

.gl-empty {
  text-align: center;
  color: var(--color-on-surface-variant);
  font-size: 16px;
  padding: 48px 0;
}
