:root {
  --gallery-gold: #c9a96e;
  --gallery-gold-light: #e8d5a8;
  --gallery-gold-dim: rgba(201, 169, 110, 0.18);
  --gallery-dark: #141009;
  --gallery-muted: #7a6b5a;
  --gallery-white: #fdf9f3;
}

body.gallery-page {
  background: var(--gallery-dark);
  color: var(--gallery-white);
}

.gallery-page .gallery-hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 6rem 3.5rem 4rem;
  overflow: hidden;
}

.gallery-page .gallery-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(170deg, rgba(20, 16, 9, 0.2) 0%, rgba(20, 16, 9, 0.72) 100%),
    url('/images/riad3.png') center/cover no-repeat;
}

.gallery-page .gallery-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--gallery-dark) 0%, transparent 55%);
}

.gallery-page .gallery-hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.gallery-page .gallery-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.68rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--gallery-gold);
}

.gallery-page .gallery-eyebrow::before {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--gallery-gold);
}

.gallery-page .gallery-hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 6vw, 5.4rem);
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.gallery-page .gallery-hero-title em {
  color: var(--gallery-gold);
  font-style: italic;
}

.gallery-page .gallery-hero-sub {
  max-width: 520px;
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--gallery-gold-light);
}

.gallery-page .gallery-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 3rem;
  text-align: center;
  border-top: 1px solid var(--gallery-gold-dim);
  border-bottom: 1px solid var(--gallery-gold-dim);
  background: rgba(201, 169, 110, 0.03);
}

.gallery-page .gallery-stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  color: var(--gallery-gold);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.gallery-page .gallery-stat-label {
  font-size: 0.64rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gallery-muted);
}

.gallery-page .gallery-section-head {
  text-align: center;
  padding: 4.5rem 1.5rem 2.8rem;
}

.gallery-page .gallery-section-label {
  font-size: 0.66rem;
  letter-spacing: 0.48em;
  text-transform: uppercase;
  color: var(--gallery-gold);
  margin-bottom: 0.85rem;
}

.gallery-page .gallery-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.7rem, 3.5vw, 2.8rem);
  font-weight: 400;
}

.gallery-page .gallery-section-title em {
  color: var(--gallery-gold);
  font-style: italic;
}

.gallery-page .gallery-rule {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.4rem;
}

.gallery-page .gallery-rule::before,
.gallery-page .gallery-rule::after {
  content: '';
  flex: 1;
  max-width: 70px;
  height: 1px;
}

.gallery-page .gallery-rule::before {
  background: linear-gradient(to right, transparent, var(--gallery-gold));
}

.gallery-page .gallery-rule::after {
  background: linear-gradient(to left, transparent, var(--gallery-gold));
}

.gallery-page .gallery-rhombus {
  width: 7px;
  height: 7px;
  background: var(--gallery-gold);
  transform: rotate(45deg);
}

.gallery-page .gallery-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0 1.5rem 3rem;
}

.gallery-page .gallery-filter-btn {
  font-family: 'Jost', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--gallery-gold-dim);
  color: var(--gallery-muted);
  padding: 0.55rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
}

.gallery-page .gallery-filter-btn:hover,
.gallery-page .gallery-filter-btn.is-active {
  background: var(--gallery-gold);
  border-color: var(--gallery-gold);
  color: var(--gallery-dark);
}

.gallery-page .gallery-grid {
  columns: 3;
  column-gap: 10px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 10px 80px;
}

.gallery-page .gallery-item {
  break-inside: avoid;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.gallery-page .gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.8s ease, filter 0.5s ease;
  filter: brightness(0.9) saturate(0.92);
}

.gallery-page .gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(1.02) saturate(1.05);
}

.gallery-page .gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(20, 16, 9, 0.92) 0%, rgba(20, 16, 9, 0.15) 55%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gallery-page .gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-page .gallery-category {
  font-size: 0.6rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gallery-gold);
  margin-bottom: 0.3rem;
}

.gallery-page .gallery-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--gallery-white);
}

.gallery-page .gallery-zoom {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(201, 169, 110, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gallery-gold-light);
  background: transparent;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  transform: translateY(-8px);
}

.gallery-page .gallery-item:hover .gallery-zoom {
  opacity: 1;
  transform: translateY(0);
}

.gallery-page .gallery-divider {
  height: 1px;
  margin: 0 3.5rem;
  background: linear-gradient(to right, transparent, var(--gallery-gold-dim), var(--gallery-gold), var(--gallery-gold-dim), transparent);
}

.gallery-page .gallery-quote {
  padding: 5rem 2rem;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(201, 169, 110, 0.05) 0%, transparent 70%);
}

.gallery-page .gallery-quote-text {
  max-width: 760px;
  margin: 0 auto 1.6rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  font-style: italic;
  line-height: 1.7;
  color: var(--gallery-gold-light);
}

.gallery-page .gallery-quote-author {
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gallery-muted);
}

.gallery-page .gallery-cta {
  padding: 4rem 2rem 6rem;
  text-align: center;
}

.gallery-page .gallery-cta-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 400;
  margin-bottom: 2rem;
}

.gallery-page .gallery-cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.gallery-page .gallery-btn-gold,
.gallery-page .gallery-btn-outline {
  display: inline-block;
  padding: 0.9rem 2.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s;
}

.gallery-page .gallery-btn-gold {
  background: var(--gallery-gold);
  color: var(--gallery-dark);
}

.gallery-page .gallery-btn-gold:hover {
  background: var(--gallery-gold-light);
}

.gallery-page .gallery-btn-outline {
  border: 1px solid var(--gallery-gold);
  color: var(--gallery-gold);
}

.gallery-page .gallery-btn-outline:hover {
  background: var(--gallery-gold);
  color: var(--gallery-dark);
}

.gallery-page .gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(14, 10, 6, 0.97);
  display: none;
  align-items: center;
  justify-content: center;
}

.gallery-page .gallery-lightbox.is-open {
  display: flex;
}

.gallery-page .gallery-lightbox img {
  max-width: 86vw;
  max-height: 86vh;
  object-fit: contain;
  box-shadow: 0 40px 130px rgba(0, 0, 0, 0.8);
}

.gallery-page .gallery-lightbox-caption {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--gallery-gold-light);
  text-align: center;
}

.gallery-page .gallery-lightbox-count {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  color: var(--gallery-muted);
  text-transform: uppercase;
}

.gallery-page .gallery-lightbox-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(201, 169, 110, 0.3);
  background: transparent;
  color: var(--gallery-gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.gallery-page .gallery-lightbox-btn:hover {
  background: var(--gallery-gold);
  color: var(--gallery-dark);
}

.gallery-page .gallery-lightbox-close {
  top: 1.8rem;
  right: 2.2rem;
}

.gallery-page .gallery-lightbox-prev {
  top: 50%;
  left: 1.8rem;
  transform: translateY(-50%);
}

.gallery-page .gallery-lightbox-next {
  top: 50%;
  right: 1.8rem;
  transform: translateY(-50%);
}

.gallery-page .nav-cta {
  width: fit-content;
  min-width: 0;
  padding: 0.62rem 0.85rem;
  text-decoration: none;
  margin-left: auto;
}

@media (max-width: 900px) {
  .gallery-page .gallery-hero {
    padding: 4rem 1.5rem 3rem;
  }

  .gallery-page .gallery-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-page .gallery-grid {
    columns: 2;
  }
}

@media (max-width: 520px) {
  .gallery-page .gallery-grid {
    columns: 1;
  }

  .gallery-page .gallery-stats {
    grid-template-columns: 1fr;
  }

  .gallery-page .gallery-divider {
    margin: 0 1.5rem;
  }
}
