/* Gallery page. Shares colors, type, and footer with homepage.css.
   The approved homepage hero is not used here. */

html, body {
  margin: 0;
  background: #1c1814;
}

.gallery-page {
  min-height: 100%;
  background: #1c1814;
  color: #f6edd4;
}

/* ----- Top bar ----- */
.site-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 32px;
  flex-wrap: wrap;
  padding: 12px 50px;
  background: #110e0c;
  border-bottom: 1px solid rgba(232, 205, 130, 0.28);
}

.site-brand {
  display: block;
  line-height: 0;
}

.site-brand img {
  display: block;
  height: 46px;
  width: auto;
  max-width: min(380px, 70vw);
  object-fit: contain;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.site-nav a {
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #E8CD82;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: rgba(232, 205, 130, 0.8);
}

/* ----- Main ----- */
.gallery-main {
  padding: 32px 4vw 72px;
}

.gallery-inner {
  max-width: 1840px;
  margin: 0 auto;
}

.gallery-intro {
  max-width: 50em;
  margin-bottom: 0;
}
.gallery-page .section-title {
  font-size: 40px;
  margin: 0 0 12px;
}
.gallery-page .section-ornament {
  margin: 0 0 16px;
}

/* ----- Controls ----- */
.gallery-controls {
  margin: 22px 0 22px;
  padding: 16px 18px 12px;
  background: #161310;
  border: 1px solid rgba(232, 205, 130, 0.18);
}

.search-label {
  display: block;
  margin-bottom: 14px;
}

.search-caption,
.facet-label {
  display: block;
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #E8CD82;
  margin: 0 0 6px;
}

#q {
  width: 100%;
  box-sizing: border-box;
  font-family: "Libre Baskerville", "Playfair Display", serif;
  font-size: 16px;
  color: #f7f1e0;
  background: #110e0c;
  border: 1px solid rgba(232, 205, 130, 0.35);
  padding: 9px 12px;
  border-radius: 0;
  outline: none;
}

#q::placeholder {
  color: #9e927a;
}

#q:focus {
  border-color: #E8CD82;
  box-shadow: 0 0 0 2px rgba(232, 205, 130, 0.25);
}

.facet-block {
  margin-bottom: 12px;
}

.facet-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-bottom: 12px;
}
.facet-row-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.select-label {
  display: block;
  min-width: 0;
}

.select-label select {
  width: 100%;
  font-family: "Libre Baskerville", "Playfair Display", serif;
  font-size: 15px;
  color: #f7f1e0;
  background: #110e0c;
  border: 1px solid rgba(232, 205, 130, 0.35);
  padding: 8px 10px;
  outline: none;
}

.select-label select:focus {
  border-color: #E8CD82;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #e8dfc8;
  background: transparent;
  border: 1px solid rgba(232, 205, 130, 0.32);
  padding: 5px 9px 4px;
  cursor: pointer;
  line-height: 1.3;
}

.chip:hover {
  border-color: #E8CD82;
  color: #f7f1e0;
}

.chip[aria-pressed="true"] {
  background: #E8CD82;
  color: #1c1814;
  border-color: #E8CD82;
}

.chip .count {
  font-family: "Libre Baskerville", serif;
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 6px;
  opacity: 0.8;
}

.chip[aria-pressed="true"] .count {
  opacity: 0.75;
}

.chip:disabled {
  opacity: 0.38;
  cursor: default;
}

.control-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 20px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(232, 205, 130, 0.14);
}

.result-status {
  font-family: "Libre Baskerville", "Playfair Display", serif;
  font-size: 14px;
  line-height: 1.55;
  color: #d9ccb0;
  margin: 0;
}

.clear-btn,
.load-more {
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1c1814;
  background: #E8CD82;
  border: 0;
  padding: 10px 16px 9px;
  cursor: pointer;
}

.clear-btn:hover,
.load-more:hover {
  background: #F0D378;
}

/* ----- Grid ----- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.thumb-card {
  margin: 0;
  background: #161310;
  border: 1px solid rgba(232, 205, 130, 0.18);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  min-width: 0;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-align: left;
}

.thumb-card:hover,
.thumb-card:focus {
  border-color: rgba(232, 205, 130, 0.7);
  outline: none;
}

.thumb-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #110e0c;
  overflow: hidden;
}

.thumb-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-card figcaption {
  padding: 12px 14px 14px;
}

.thumb-card .card-kicker,
.thumb-card .card-title,
.thumb-card .card-place {
  display: block;
}

.placeholder-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 16px;
  background:
    linear-gradient(180deg, #1a1612 0%, #120f0c 100%);
  border-bottom: 1px solid rgba(232, 205, 130, 0.12);
}

.placeholder-rule {
  width: 42px;
  height: 5px;
  border-top: 1px solid rgba(232, 205, 130, 0.85);
  border-bottom: 1px solid rgba(232, 205, 130, 0.4);
}

.placeholder-label {
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #E8CD82;
  text-align: center;
  line-height: 1.4;
}

.placeholder-note {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 13px;
  color: #d9ccb0;
  text-align: center;
  margin: 0;
}

.empty-state {
  font-family: "Libre Baskerville", serif;
  font-size: 16px;
  color: #d9ccb0;
  margin: 28px 0 0;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* ----- Lightbox ----- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 8, 6, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 72px 40px;
  box-sizing: border-box;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  margin: 0;
  max-width: min(1200px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lightbox-image-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0806;
  border: 1px solid rgba(232, 205, 130, 0.28);
}

.lightbox-image-wrap img {
  display: block;
  max-width: 100%;
  max-height: min(72vh, 900px);
  object-fit: contain;
}

.lightbox-placeholder {
  width: min(720px, 80vw);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px;
  box-sizing: border-box;
}

.lightbox-caption {
  background: #161310;
  border: 1px solid rgba(232, 205, 130, 0.28);
  border-top: 0;
  padding: 16px 20px 18px;
}

.lightbox-kicker {
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #E8CD82;
  margin: 0 0 4px;
}

.lightbox-title {
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: 0.03em;
  color: #f7f1e0;
  margin: 0 0 10px;
  line-height: 1.2;
}

.lightbox-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 24px;
  margin: 0;
}

.lightbox-meta div {
  margin: 0;
}

.lightbox-meta dt {
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #E8CD82;
  margin: 0 0 2px;
}

.lightbox-meta dd {
  font-family: "Playfair Display", serif;
  font-size: 16px;
  color: #f6edd4;
  margin: 0;
}

.lightbox-placeholder-note {
  font-family: "Libre Baskerville", serif;
  font-size: 14px;
  color: #d9ccb0;
  margin: 12px 0 0;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #E8CD82;
  background: transparent;
  border: 1px solid rgba(232, 205, 130, 0.4);
  padding: 8px 12px;
  cursor: pointer;
}

.lightbox-close {
  top: 16px;
  right: 16px;
}

.lightbox-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: #E8CD82;
  color: #1c1814;
}

/* ----- Homepage work CTA (used on the copied homepage) ----- */
a.card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

a.card-link:hover .card,
a.card-link:focus .card {
  border-color: rgba(232, 205, 130, 0.7);
}

.work-cta {
  margin: 32px 0 0;
}

.work-cta a {
  display: inline-block;
  font-family: "Cinzel", serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1c1814;
  background: #E8CD82;
  text-decoration: none;
  padding: 12px 18px 11px;
}

.work-cta a:hover {
  background: #F0D378;
}

/* ----- Phone ----- */
@media (max-width: 1100px) {
  .facet-row-four {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .site-bar {
    padding: 10px 14px;
    gap: 8px;
  }
  .site-brand img {
    height: 36px;
  }
  .gallery-main {
    padding: 18px 14px 48px;
  }
  .gallery-page .section-title {
    font-size: 28px;
    margin: 0 0 8px;
  }
  .gallery-page .section-ornament {
    margin: 0 0 10px;
  }
  .gallery-intro {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 0;
  }
  .chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .chip {
    flex: 0 0 auto;
  }
  .gallery-controls {
    margin: 12px 0 14px;
    padding: 10px 10px 8px;
  }
  .search-label { margin-bottom: 8px; }
  .facet-block { margin-bottom: 8px; }
  .facet-row-four {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .thumb-card figcaption {
    padding: 10px 10px 12px;
  }
  .thumb-card .card-title {
    font-size: 13px;
  }
  .lightbox {
    padding: 56px 12px 16px;
    align-items: flex-start;
    overflow: auto;
  }
  .lightbox-image-wrap img {
    max-height: 52vh;
  }
  .lightbox-title {
    font-size: 20px;
  }
  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 16px;
    transform: none;
  }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
  .lightbox-figure {
    margin-bottom: 56px;
  }
}
