/* KIWM activity gallery: responsive editorial photo archive matching the Sunlit Sanctuary visual system. */
.gallery-hero {
  align-items: end;
  background: var(--forest);
  color: #fff;
  display: flex;
  min-height: 570px;
  overflow: hidden;
  padding: 8.5rem 0 5rem;
  position: relative;
}

.gallery-hero > img,
.gallery-hero-wash {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.gallery-hero > img {
  object-fit: cover;
}

.gallery-hero-wash {
  background: linear-gradient(
    90deg,
    rgba(13, 45, 38, 0.93) 0%,
    rgba(13, 45, 38, 0.72) 44%,
    rgba(13, 45, 38, 0.24) 100%
  );
}

.gallery-hero .container {
  max-width: 780px;
  position: relative;
  z-index: 1;
}

.gallery-hero .eyebrow,
.gallery-hero p {
  color: rgba(255, 255, 255, 0.86);
}

.gallery-hero h1 {
  color: #fff;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(4.2rem, 9vw, 8rem);
  line-height: 0.83;
  margin: 1rem 0 1.5rem;
  text-transform: uppercase;
}

.gallery-hero h1 em {
  color: var(--sun);
  font-family: "Playfair Display", serif;
  font-size: 0.74em;
  font-weight: 500;
  text-transform: none;
}

.gallery-hero p:not(.eyebrow) {
  font-size: 1.08rem;
  line-height: 1.65;
  margin-bottom: 1.8rem;
  max-width: 590px;
}

.gallery-intro {
  background: #fbf8f0;
  padding: 6rem 0;
}

.gallery-intro .container,
.gallery-visit-strip .container {
  align-items: end;
  display: flex;
  gap: 3rem;
  justify-content: space-between;
}

.gallery-intro h2,
.gallery-section-heading h2,
.gallery-visit-strip h2 {
  color: var(--forest);
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(3.2rem, 6vw, 5.5rem);
  line-height: 0.9;
  margin: 0;
  text-transform: uppercase;
}

.gallery-intro h2 em,
.gallery-section-heading h2 em,
.gallery-visit-strip h2 em {
  color: var(--clay);
  font-family: "Playfair Display", serif;
  font-size: 0.72em;
  font-weight: 500;
  text-transform: none;
}

.gallery-intro .container > p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
  margin: 0;
  max-width: 510px;
}

.activity-gallery-section {
  background: #fffdf8;
  padding: 6.5rem 0 7rem;
}

.gallery-section-heading {
  align-items: end;
  border-bottom: 1px solid rgba(21, 53, 44, 0.16);
  display: flex;
  justify-content: space-between;
  margin-bottom: 2.2rem;
  padding-bottom: 1.8rem;
}

.gallery-section-heading span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.activity-gallery-grid {
  display: grid;
  gap: 1rem;
  grid-auto-flow: dense;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.activity-gallery-card {
  background: var(--forest);
  min-height: 240px;
  overflow: hidden;
  position: relative;
}

.activity-gallery-card:nth-child(7n + 1),
.activity-gallery-card:nth-child(11n + 4) {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 496px;
}

.activity-gallery-card img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
  width: 100%;
}

.activity-gallery-overlay {
  align-items: flex-end;
  background: linear-gradient(180deg, transparent 38%, rgba(11, 38, 32, 0.82));
  color: #fff;
  display: flex;
  inset: 0;
  justify-content: space-between;
  opacity: 0;
  padding: 1.1rem;
  position: absolute;
  transition: opacity 0.25s ease;
}

.activity-gallery-card:hover img,
.activity-gallery-card:focus-within img {
  transform: scale(1.05);
}

.activity-gallery-card:hover .activity-gallery-overlay,
.activity-gallery-card:focus-within .activity-gallery-overlay {
  opacity: 1;
}

.activity-gallery-overlay > span {
  font-family: "Playfair Display", serif;
  font-size: 0.92rem;
  max-width: 60%;
}

.gallery-view-trigger {
  align-items: center;
  background: var(--sun);
  border: 0;
  color: var(--forest);
  display: inline-flex;
  font-weight: 800;
  gap: 0.35rem;
  padding: 0.55rem 0.7rem;
}

.gallery-view-trigger span {
  font-size: 1.1rem;
}

.gallery-view-trigger small {
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.gallery-visit-strip {
  background: var(--forest);
  padding: 5rem 0;
}

.gallery-visit-strip .eyebrow {
  color: var(--sun);
}

.gallery-visit-strip h2 {
  color: #fff;
}

.activity-gallery-modal .modal-content {
  background: #0d2d26;
  border: 0;
  border-radius: 0;
}

.activity-gallery-modal .modal-header {
  border: 0;
  color: #fff;
  padding: 1rem 1.25rem;
}

.activity-gallery-modal .modal-body {
  padding: 0;
}

.activity-gallery-modal .modal-body img {
  display: block;
  max-height: 80vh;
  object-fit: contain;
  width: 100%;
}

@media (max-width: 991px) {
  .activity-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .gallery-hero {
    min-height: 520px;
    padding: 7.5rem 0 4rem;
  }

  .gallery-hero-wash {
    background: linear-gradient(
      90deg,
      rgba(13, 45, 38, 0.92),
      rgba(13, 45, 38, 0.48)
    );
  }

  .gallery-intro,
  .activity-gallery-section {
    padding: 4.5rem 0;
  }

  .gallery-intro .container,
  .gallery-visit-strip .container {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.4rem;
  }

  .gallery-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.9rem;
  }

  .activity-gallery-grid {
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .activity-gallery-card {
    min-height: 170px;
  }

  .activity-gallery-card:nth-child(7n + 1),
  .activity-gallery-card:nth-child(11n + 4) {
    min-height: 347px;
  }

  .activity-gallery-overlay {
    opacity: 1;
    padding: 0.65rem;
  }

  .activity-gallery-overlay > span {
    display: none;
  }

  .gallery-view-trigger small {
    display: none;
  }
}
