/* Gallery pages: plain buttons (avoid theme-btn / btn-style-two fixed decorative frame) */

/* Breadcrumb-style gallery navigation (below hero, on white content) */
.gallery-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
  margin: 0 0 clamp(0.75rem, 1.5vw, 1.1rem);
  padding: 0.35rem 0 0.15rem;
  font-size: clamp(0.875rem, 0.8rem + 0.35vw, 0.98rem);
  line-height: 1.45;
  color: rgba(75, 67, 66, 0.82);
}

.gallery-breadcrumb a {
  color: #2a8a87;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.gallery-breadcrumb a:hover,
.gallery-breadcrumb a:focus-visible {
  color: #1f6b69;
  border-bottom-color: rgba(47, 107, 105, 0.45);
  outline: none;
}

.gallery-breadcrumb__sep {
  color: rgba(75, 67, 66, 0.45);
  font-weight: 400;
  user-select: none;
  margin: 0 0.1rem;
}

.gallery-breadcrumb__current {
  color: #4b4342;
  font-weight: 600;
}

.gallery-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 18px;
  min-height: 44px;
  max-width: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  word-break: break-word;
  border-radius: 10px;
  border: 2px solid #5fcac7;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gallery-btn:focus {
  outline: 2px solid #4b4342;
  outline-offset: 2px;
}

.gallery-btn--outline {
  color: #2a8a87;
  background-color: #fff;
  border-color: #5fcac7;
}

.gallery-btn--outline:hover {
  color: #fff;
  background-color: #5fcac7;
  border-color: #5fcac7;
}

.gallery-btn--solid {
  color: #fff;
  background-color: #5fcac7;
  border-color: #5fcac7;
}

.gallery-btn--solid:hover {
  color: #fff;
  background-color: #4aa9a6;
  border-color: #4aa9a6;
}

/* Center the CTA under each thumbnail card */
.gallery-page .our-creation-btn-wrap {
  display: flex;
  justify-content: center;
}

.gallery-page .our-creation-btn-wrap .gallery-btn {
  width: auto;
  min-width: 0;
}

/* Thumbnail cards: tighten gap image → button, consistent crop (all breakpoints) */
.gallery-page .our-creation-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.gallery-page .our-creation-card .image-box {
  flex: 0 0 auto;
  margin: 0;
}

/* Remove stray “line box” gap below images inside the card.
   Gallery source photos are mostly 355×535 (portrait); match that frame so thumbnails are not square-cropped. */
.gallery-page .our-creation-card .image-box .image {
  margin: 0;
  line-height: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #f7f4ef;
  aspect-ratio: 355 / 535;
}

.gallery-page .our-creation-card .image-box .image a {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-page .our-creation-card .image-box .image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Category gallery photo grid (GalleriesView-2 / GalleriesOCView-2) */
.gallery-detail-page .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(163px, 1fr));
  gap: 14px;
  justify-items: center;
}

.gallery-detail-page .gallery-tile {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 163px; /* match actual thumbnail width to avoid upscaling blur */
  border-radius: 12px;
  overflow: hidden;
  background: #f7f4ef;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
  min-width: 0;
}

.gallery-detail-page .gallery-tile__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 163 / 245; /* match actual thumbnail ratio */
  line-height: 0;
}

.gallery-detail-page .gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.gallery-detail-page .gallery-tile__meta {
  padding: 8px 10px 10px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(75, 67, 66, 0.78);
  background: #fff;
  border-top: 1px solid rgba(75, 67, 66, 0.08);
  text-align: center;
}

.gallery-detail-page .gallery-tile__id {
  font-size: 12px;
  font-weight: 600;
  color: rgba(75, 67, 66, 0.78);
}

.gallery-detail-page .gallery-tile__btn {
  width: 100%;
  padding: 8px 12px;
  min-height: 38px;
  border-radius: 10px;
  font-size: 13px;
  margin: 0 0 6px;
}

@media (max-width: 991px) {
  .gallery-detail-page .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 163px));
    justify-content: center;
  }
}

@media (max-width: 575px) {
  .gallery-detail-page .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 163px));
    justify-content: center;
    gap: 12px;
  }
}

@media (max-width: 360px) {
  .gallery-detail-page .gallery-grid {
    grid-template-columns: minmax(0, 163px);
    justify-content: center;
  }
}

.gallery-page .our-creation-card .our-creation-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  margin: 0;
  padding: clamp(0.65rem, 1.6vw, 1rem) clamp(0.35rem, 1.2vw, 0.75rem) 0;
}

.gallery-page .our-creation-card .our-creation-btn-wrap {
  margin: 0;
  padding: 0;
}

/* Gallery site search (GallerySearch.cfm) */
.gallery-search-page .gallery-search-intro {
  margin: 0 0 1.25rem;
  font-size: clamp(0.95rem, 0.9rem + 0.35vw, 1.05rem);
  line-height: 1.55;
  color: rgba(75, 67, 66, 0.92);
}

.gallery-search-page .gallery-search-count {
  color: rgba(75, 67, 66, 0.65);
  font-weight: 500;
}

.gallery-search-page .gallery-search-section-title {
  margin: 2rem 0 0.75rem;
  padding: 0 0 0.35rem;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.35rem);
  font-weight: 700;
  color: #4b4342;
  border-bottom: 2px solid rgba(95, 202, 199, 0.45);
}

.gallery-search-page .gallery-search-section-title:first-of-type {
  margin-top: 0.5rem;
}

.gallery-search-page .gallery-search-section-title--oc {
  margin-top: 2.5rem;
}

.gallery-search-page .gallery-search-subtitle {
  margin: 1.25rem 0 0.65rem;
  font-size: 1rem;
  font-weight: 600;
  color: #2a8a87;
}

.gallery-search-page .gallery-search-context {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: rgba(75, 67, 66, 0.72);
  text-align: center;
  line-height: 1.35;
}

.gallery-search-page .gallery-search-photo-caption {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #4b4342;
  text-align: center;
}

.gallery-search-page .gallery-search-photo-card .image-box .image img {
  object-fit: cover;
}
