/* V97 — Gallery centered copy, desktop-style mobile controls, clean result area,
   and theme-tinted thumbnails while original files remain untouched. */

/* Keep Gallery page text visually centered. */
.page-gallery .gallery-page-hero .container,
.page-gallery .gallery-filter-bar label,
.page-gallery .gallery-filter-bar select,
.page-gallery .gallery-filter-actions,
.page-gallery .gallery-selected-tour-summary,
.page-gallery .gallery-empty,
.page-gallery .gallery-photo-copy {
  text-align: center !important;
}

/* Desktop-style controls on every screen. Mobile gets a horizontal swipe area,
   not a stacked/re-designed version. */
.page-gallery .gallery-controls-scroll,
.page-gallery .gallery-summary-scroll {
  width: 100% !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-inline: contain !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(6,56,68,.45) rgba(6,56,68,.08) !important;
}
.page-gallery .gallery-controls-scroll::-webkit-scrollbar,
.page-gallery .gallery-summary-scroll::-webkit-scrollbar { height: 7px !important; }
.page-gallery .gallery-controls-scroll::-webkit-scrollbar-track,
.page-gallery .gallery-summary-scroll::-webkit-scrollbar-track {
  background: rgba(6,56,68,.08) !important;
  border-radius: 999px !important;
}
.page-gallery .gallery-controls-scroll::-webkit-scrollbar-thumb,
.page-gallery .gallery-summary-scroll::-webkit-scrollbar-thumb {
  background: rgba(6,56,68,.45) !important;
  border-radius: 999px !important;
}

.page-gallery .gallery-filter-bar {
  grid-template-columns: minmax(330px,1.7fr) minmax(150px,.7fr) minmax(175px,.8fr) auto !important;
  min-width: 930px !important;
  width: 100% !important;
  margin: 0 auto 12px !important;
}
.page-gallery .gallery-filter-bar .gallery-album-field {
  grid-column: auto !important;
}
.page-gallery .gallery-filter-actions {
  grid-column: auto !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
}
.page-gallery .gallery-filter-actions .btn {
  flex: 0 0 auto !important;
}

.page-gallery .gallery-summary-scroll {
  margin-top: 12px !important;
  margin-bottom: 20px !important;
}
.page-gallery .gallery-selected-tour-summary {
  min-width: 760px !important;
  width: 100% !important;
  margin: 0 !important;
  align-items: center !important;
  flex-direction: row !important;
}
.page-gallery .gallery-selected-tour-summary > div {
  flex: 1 1 auto !important;
  align-items: center !important;
}
.page-gallery .gallery-selected-tour-summary .btn {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

/* Result-count headings were removed in markup. Guard against stale cached markup. */
.page-gallery .gallery-results-head,
.page-past-tours .past-tour-results-head {
  display: none !important;
}

/* Cards: all copy centered on the image. */
.page-gallery .gallery-photo-copy {
  inset: 0 !important;
  min-height: 100% !important;
  padding: 28px 20px !important;
  align-items: center !important;
  justify-content: flex-end !important;
  background: linear-gradient(180deg,
    rgba(3,29,35,.03) 0%,
    rgba(3,29,35,.10) 34%,
    rgba(4,37,45,.74) 72%,
    rgba(4,37,45,.94) 100%) !important;
}
.page-gallery .gallery-photo-copy strong,
.page-gallery .gallery-photo-copy small,
.page-gallery .gallery-photo-view {
  width: 100% !important;
  max-width: 100% !important;
  text-align: center !important;
  justify-content: center !important;
}
.page-gallery .gallery-photo-copy strong {
  font-size: clamp(1.05rem,1.4vw,1.25rem) !important;
}
.page-gallery .gallery-photo-copy small {
  color: #eef6f4 !important;
}
.page-gallery .gallery-photo-album {
  display: none !important;
}

/* Theme presentation is visual only. The linked href remains the original file. */
.page-gallery .gallery-photo-media {
  background: #063844 !important;
}
.page-gallery .gallery-photo-media img {
  filter: saturate(.80) contrast(1.07) brightness(.94) !important;
}
.page-gallery .gallery-photo-media::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background:
    linear-gradient(135deg, rgba(6,56,68,.30), rgba(10,92,73,.16) 56%, rgba(246,189,85,.10)),
    linear-gradient(180deg, rgba(238,246,244,.04), rgba(6,56,68,.14)) !important;
  mix-blend-mode: multiply !important;
  transition: opacity .3s ease !important;
}
.page-gallery .gallery-photo-card:hover .gallery-photo-media img,
.page-gallery .gallery-photo-card:focus-within .gallery-photo-media img {
  filter: saturate(.94) contrast(1.04) brightness(.98) !important;
}
.page-gallery .gallery-photo-card:hover .gallery-photo-media::after,
.page-gallery .gallery-photo-card:focus-within .gallery-photo-media::after {
  opacity: .58 !important;
}

/* Keep the photo grid naturally centered when the final row is incomplete. */
.page-gallery .gallery-card-grid {
  justify-content: center !important;
}

@media (max-width: 800px) {
  .page-gallery .gallery-filter-bar {
    grid-template-columns: minmax(330px,1.7fr) minmax(150px,.7fr) minmax(175px,.8fr) auto !important;
    min-width: 930px !important;
    padding: 18px 20px !important;
  }
  .page-gallery .gallery-filter-actions {
    grid-column: auto !important;
  }
}

@media (max-width: 560px) {
  .page-gallery .gallery-album-section > .container {
    padding-inline: 14px !important;
  }
  .page-gallery .gallery-controls-scroll,
  .page-gallery .gallery-summary-scroll {
    margin-inline: 0 !important;
    padding-bottom: 7px !important;
  }
  .page-gallery .gallery-filter-bar {
    grid-template-columns: minmax(330px,1.7fr) minmax(150px,.7fr) minmax(175px,.8fr) auto !important;
    min-width: 930px !important;
    gap: 14px !important;
    margin-bottom: 0 !important;
    padding: 17px 18px !important;
  }
  .page-gallery .gallery-filter-bar .gallery-album-field,
  .page-gallery .gallery-filter-actions {
    grid-column: auto !important;
  }
  .page-gallery .gallery-filter-actions {
    flex-wrap: nowrap !important;
  }
  .page-gallery .gallery-filter-actions .btn {
    flex: 0 0 auto !important;
  }
  .page-gallery .gallery-selected-tour-summary {
    min-width: 760px !important;
    flex-direction: row !important;
    align-items: center !important;
  }
  .page-gallery .gallery-photo-open {
    min-height: 330px !important;
  }
}
