.page-gallery .gallery-showcase {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
}

.gallery-showcase > .gallery-intro {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.7;
}

.gallery-showcase__albums {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 238, 230, 0.96);
  backdrop-filter: blur(8px);
  scroll-margin-top: 12px;
}

.gallery-showcase__albums a,
.gallery-showcase__albums button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--gold-line);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.gallery-showcase__albums a:hover,
.gallery-showcase__albums a.is-active,
.gallery-showcase__albums button:hover,
.gallery-showcase__albums button.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #1c1612;
}

.gallery-showcase__albums span {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  background: rgba(196, 160, 106, 0.16);
  color: var(--gold-strong);
  font-size: 11px;
}

.gallery-showcase__albums a:hover span,
.gallery-showcase__albums a.is-active span,
.gallery-showcase__albums button:hover span,
.gallery-showcase__albums button.is-active span {
  background: rgba(28, 22, 18, 0.1);
  color: #1c1612;
}

.gallery-album {
  scroll-margin-top: 72px;
}

.gallery-album[hidden] {
  display: none !important;
}

.gallery-album + .gallery-album {
  margin-top: clamp(32px, 5vw, 64px);
  padding-top: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--line);
}

.gallery-album__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: clamp(18px, 2.6vw, 28px);
}

.gallery-album__intro h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1.05;
  color: #1a1410;
}

.gallery-album__intro p {
  margin: 0;
  max-width: 48rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.7;
}

.gallery-album__intro a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--gold-line);
  text-underline-offset: 0.18em;
}

.gallery-album__intro a:hover {
  color: var(--gold-strong);
}

/* Editorial modules — dense, 2–3 across, controlled pairings */
.gallery-editorial {
  display: grid;
  gap: 10px;
}

.gallery-block {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.gallery-block--portrait-stack {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: stretch;
}

.gallery-block__stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  min-height: 0;
}

.gallery-block--landscape-band {
  grid-template-columns: 1fr;
}

.gallery-block__row {
  display: grid;
  gap: 10px;
}

.gallery-block__row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-block__row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-block--trio {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-block--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-block--single {
  grid-template-columns: 1fr;
  max-width: 52%;
}

.gallery-item {
  margin: 0;
  min-width: 0;
  height: 100%;
}

.gallery-item__button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
  overflow: hidden;
  line-height: 0;
  position: relative;
}

.gallery-item picture {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery-item__button:hover img,
.gallery-item__button:focus-visible img {
  transform: scale(1.02);
}

.gallery-item__credit,
.photo-credit {
  position: absolute;
  right: 10px;
  bottom: 8px;
  left: auto;
  z-index: 4;
  max-width: min(70%, 22rem);
  padding: 0;
  font-size: 10px;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.9);
  text-align: right;
  text-shadow: 0 1px 2px rgba(12, 9, 7, 0.85);
  background: none;
  opacity: 1;
  transform: none;
  pointer-events: none;
}

.gallery-item__button:hover .gallery-item__credit,
.gallery-item__button:focus-visible .gallery-item__credit {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .gallery-item.has-credit .gallery-item__credit {
    opacity: 1;
    transform: none;
    padding-top: 0;
  }
}

/* Compact but not squashed — 2–3 across with healthier height */
.gallery-item--tile .gallery-item__button,
.gallery-block--trio .gallery-item__button,
.gallery-block--duo .gallery-item__button,
.gallery-block--single .gallery-item__button,
.gallery-block__row .gallery-item__button {
  height: 200px;
}

.gallery-item--portrait .gallery-item__button {
  height: 410px; /* 200 + 10 + 200 */
}

.gallery-item--landscape .gallery-item__button {
  height: 230px;
}

.gallery-block__stack .gallery-item__button {
  height: 200px;
}

/* Final CTA — editorial, mirrors Despre */
.gallery-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin-top: clamp(12px, 2vw, 20px);
  padding: clamp(28px, 4vw, 40px) 0 clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--line);
}

.gallery-cta__kicker {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--gold-strong);
}

.gallery-cta h2 {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #1a1410;
  max-width: 18ch;
}

.gallery-cta h2 span {
  display: block;
}

.gallery-cta > p {
  margin: 0;
  max-width: 38rem;
  font-size: 1.02rem;
  line-height: 1.8;
  font-weight: 300;
  color: var(--muted);
}

.gallery-cta .sim-hero-cta {
  margin-top: 26px;
  flex-wrap: wrap;
}

.gallery-lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(12, 9, 7, 0.96);
  color: #fff;
  position: fixed;
  inset: 0;
}

.gallery-lightbox::backdrop {
  background: rgba(12, 9, 7, 0.92);
}

.gallery-lightbox__stage {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 64px 72px 72px;
  box-sizing: border-box;
  position: relative;
}

.gallery-lightbox .photo-credit {
  right: 80px;
  bottom: 52px;
}

.gallery-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(94vw, 1400px);
  max-height: calc(100vh - 140px);
  object-fit: contain;
}

.gallery-lightbox__meta {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  pointer-events: none;
  z-index: 3;
}

.gallery-lightbox__link {
  appearance: none;
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  border: 1px solid rgba(196, 160, 106, 0.45);
  background: rgba(12, 9, 7, 0.72);
  padding: 10px 14px;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold, #c4a06a);
  text-decoration: none;
  cursor: pointer;
}

.gallery-lightbox__link:hover,
.gallery-lightbox__link:focus-visible {
  color: #fff;
}

.gallery-lightbox__meta p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
  position: absolute;
  z-index: 3;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
}

.gallery-lightbox__close {
  top: 16px;
  right: 16px;
  width: 46px;
  height: 46px;
  font-size: 28px;
  line-height: 1;
}

.gallery-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 34px;
  line-height: 1;
}

.gallery-lightbox__nav--prev {
  left: 16px;
}

.gallery-lightbox__nav--next {
  right: 16px;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 980px) {
  .gallery-album__intro {
    gap: 8px;
    margin-bottom: 16px;
  }

  .gallery-editorial,
  .gallery-block {
    gap: 8px;
  }

  .gallery-item--tile .gallery-item__button,
  .gallery-block--trio .gallery-item__button,
  .gallery-block--duo .gallery-item__button,
  .gallery-block--single .gallery-item__button,
  .gallery-block__row .gallery-item__button,
  .gallery-block__stack .gallery-item__button {
    height: 170px;
  }

  .gallery-item--portrait .gallery-item__button {
    height: 348px;
  }

  .gallery-item--landscape .gallery-item__button {
    height: 190px;
  }

  .gallery-block--single {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .gallery-album + .gallery-album {
    margin-top: 28px;
    padding-top: 24px;
  }

  .gallery-album__intro {
    gap: 6px;
    margin-bottom: 14px;
  }

  .gallery-album__intro h2 {
    font-size: clamp(1.7rem, 7vw, 2.1rem);
  }

  .gallery-album__intro p {
    font-size: 0.9375rem;
    line-height: 1.6;
  }

  .gallery-showcase__albums a,
  .gallery-showcase__albums button {
    width: auto;
  }

  .gallery-block--portrait-stack {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-block--portrait-stack .gallery-item--portrait {
    grid-column: 1 / -1;
  }

  .gallery-block--portrait-stack .gallery-block__stack {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
  }

  .gallery-block--trio,
  .gallery-block__row--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-block--trio .gallery-item:last-child:nth-child(3) {
    grid-column: 1 / -1;
  }

  .gallery-item--tile .gallery-item__button,
  .gallery-block--trio .gallery-item__button,
  .gallery-block--duo .gallery-item__button,
  .gallery-block--single .gallery-item__button,
  .gallery-block__row .gallery-item__button,
  .gallery-block__stack .gallery-item__button {
    height: 150px;
  }

  .gallery-item--portrait .gallery-item__button {
    height: 210px;
  }

  .gallery-item--landscape .gallery-item__button {
    height: 160px;
  }

  .gallery-cta h2 {
    max-width: none;
  }

  .gallery-cta .sim-hero-cta {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .gallery-cta .sim-hero-cta .sim-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .gallery-lightbox__stage {
    padding: 72px 18px 84px;
  }

  .gallery-lightbox__nav {
    width: 42px;
    height: 42px;
    font-size: 28px;
  }

  .gallery-lightbox__nav--prev {
    left: 8px;
  }

  .gallery-lightbox__nav--next {
    right: 8px;
  }
}
