/* ==========================================================
   Gallery page
   Loads after style.css and reuses its colour and type tokens
   ========================================================== */

/* ---------- Hero ---------- */
.gallery-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(62vh, 540px);
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  padding-block: clamp(48px, 7vw, 80px) 0;
  border-bottom: 2px solid var(--gold);
}

.gallery-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Which part of the photo survives the crop. Lower the number to
     keep more of the top, raise it for more of the bottom. */
  object-position: 50% 50%;
  background: #2A2926;
}

.gallery-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 19, 17, .88) 0%, rgba(20, 19, 17, .35) 60%, rgba(20, 19, 17, .2) 100%);
}

.gallery-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding-bottom: clamp(40px, 6vw, 72px);
}

@media (min-width: 1200px) {

  /* Shape the hero instead of filling screen height, so a landscape
     photo is barely cropped on a large monitor. */
  .gallery-hero {
    min-height: 0;
    aspect-ratio: 21 / 9;
    max-height: 640px;
  }
}

.gallery-hero h1 {
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 700;
  margin: 0 0 10px;
}

.gallery-hero .lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 26px);
  color: #EBDDBF;
  margin: 0;
}

.crumb {
  font-size: 14px;
  color: #CFC6B4;
  margin-bottom: 14px;
}

.crumb a {
  color: var(--gold);
  text-decoration: none;
}

.crumb a:hover {
  color: #fff;
}

/* ---------- Photo grid ---------- */
.gallery-section {
  padding-block: var(--space);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
  transition: transform .3s ease, box-shadow .3s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .1);
}

.gallery-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #E9E3D8;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

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

.gallery-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(31, 30, 28, .85);
  color: var(--gold);
  font: 600 11px var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.gallery-caption {
  padding: 18px 20px 20px;
}

.gallery-caption h3 {
  font-size: 23px;
  margin: 0 0 6px;
}

.gallery-caption p {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  /* keep the last card clear of the floating WhatsApp / Call buttons */
  .gallery-section {
    padding-bottom: calc(var(--space) + 72px);
  }
}