/* Gallery polish: reliable image-first cards for desktop and mobile. */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(0.8rem, 1.4vw, 1.25rem);
  column-count: initial;
  column-gap: initial;
  margin-top: clamp(1.1rem, 2vw, 1.6rem);
  align-items: start;
}

.gallery-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  break-inside: auto;
  overflow: hidden;
  border-radius: clamp(0.9rem, 1.6vw, 1.25rem);
  border: 1px solid rgba(201, 154, 46, 0.18);
  background: rgba(8, 12, 24, 0.9);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}

.gallery-card--feature {
  grid-column: span 2;
}

.gallery-card-button {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: rgba(8, 12, 24, 0.92);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.gallery-card--feature .gallery-card-button,
.gallery-card--landscape .gallery-card-button {
  aspect-ratio: 4 / 3;
}

.gallery-card--portrait .gallery-card-button {
  aspect-ratio: 4 / 5;
}

.gallery-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.45s ease;
}

.gallery-card-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.36rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 154, 46, 0.3);
  background: rgba(8, 12, 24, 0.76);
  color: var(--gold-soft);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
}

.gallery-card-caption {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  display: grid;
  gap: 0.18rem;
  padding: 1.1rem 0.95rem 0.9rem;
  background: linear-gradient(180deg, transparent, rgba(5, 8, 16, 0.9) 56%);
}

.gallery-card-title {
  display: block;
  color: #fff;
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.78);
}

.gallery-card-copy {
  display: block;
  color: rgba(245, 247, 252, 0.8);
  font-size: 0.82rem;
  line-height: 1.35;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.68);
}

@media (hover: hover) {
  .gallery-card:hover {
    border-color: rgba(201, 154, 46, 0.46);
    box-shadow: 0 24px 46px rgba(0, 0, 0, 0.34);
    transform: translateY(-4px);
  }

  .gallery-card:hover img {
    filter: saturate(1.08) contrast(1.04);
    transform: scale(1.045);
  }
}

@media (max-width: 760px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
  }

  .gallery-card--feature {
    grid-column: span 2;
  }

  .gallery-card-caption {
    padding: 0.9rem 0.8rem 0.78rem;
  }

  .gallery-card-title {
    font-size: 0.86rem;
  }

  .gallery-card-copy {
    display: none;
  }
}

@media (max-width: 420px) {
  .gallery-grid {
    gap: 0.62rem;
  }
}
