/* ==========================================================================
   VERDE HAIR LOUNGE - gallery.css
   Gallery page only. Loads alongside core.css.
   ========================================================================== */

/* ==========================================================================
   PAGE HERO (base in core.css; object-position override only)
   ========================================================================== */

.page-hero__media img { object-position: center 32%; }
@media (min-width: 768px) {
  .page-hero__media img { object-position: center 22%; }
}
.page-hero .link-arrow {
  margin-top: var(--space-l);
  color: var(--color-gold);
}
.page-hero .link-arrow:hover { color: var(--color-cream); }

/* ==========================================================================
   MASONRY GRID
   ========================================================================== */

.gallery {
  background: var(--color-cream);
  padding-block: clamp(3.5rem, 9vh, 6rem);
}

/* Filter bar: centred wrap on mobile (all visible), left-aligned on desktop */
.gallery__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-s) var(--space-m);
  margin-bottom: clamp(2rem, 5vh, 3rem);
}
.gallery__filter {
  white-space: nowrap;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.3rem 0;
  position: relative;
  font-family: var(--font-body);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--color-muted);
  transition: color 0.25s var(--ease);
}
.gallery__filter::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--color-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.gallery__filter:hover { color: var(--color-verde); }
.gallery__filter.is-active { color: var(--color-verde); }
.gallery__filter.is-active::after,
.gallery__filter:hover::after { transform: scaleX(1); }
.gallery__filter:focus-visible {
  outline: 2px solid var(--color-gold-ink);
  outline-offset: 3px;
}

@media (min-width: 760px) {
  .gallery__filters {
    justify-content: flex-start;
    gap: var(--space-s) var(--space-m);
  }
}

.gallery__grid {
  columns: 2;
  column-gap: var(--space-s);
}
@media (min-width: 700px) {
  .gallery__grid { columns: 3; column-gap: var(--space-m); }
}
@media (min-width: 1100px) {
  .gallery__grid { columns: 4; }
}

.gallery__item {
  display: block;
  width: 100%;
  margin: 0 0 var(--space-s);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-m);
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}
@media (min-width: 700px) {
  .gallery__item { margin-bottom: var(--space-m); }
}
.gallery__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s var(--ease);
}
.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(13, 31, 22, 0);
  transition: background 0.4s var(--ease);
}
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item:hover::after { background: rgba(13, 31, 22, 0.12); }
.gallery__item:focus-visible {
  outline: 2px solid var(--color-gold-ink);
  outline-offset: 3px;
}
.gallery__tag {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  z-index: 2;
  background: rgba(13, 31, 22, 0.72);
  color: var(--color-cream);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  padding: 0.34rem 0.62rem;
  border-radius: var(--radius-s);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .gallery__item img { transition: none; }
  .gallery__item:hover img { transform: none; }
}

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(13, 31, 22, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__figure {
  margin: 0;
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox__img {
  max-width: 100%;
  max-height: 84vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-soft);
}
.lightbox__btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  color: var(--color-cream);
  cursor: pointer;
  padding: var(--space-s);
  opacity: 0.82;
  transition: opacity 0.25s var(--ease);
}
.lightbox__btn:hover { opacity: 1; }
.lightbox__btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}
.lightbox__close { top: clamp(0.5rem, 2vw, 1.5rem); right: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: clamp(0.25rem, 2vw, 1.5rem); }
.lightbox__next { right: clamp(0.25rem, 2vw, 1.5rem); }

@media (prefers-reduced-motion: reduce) {
  .lightbox { transition: none; }
}

/* ==========================================================================
   CTA BAND
   ========================================================================== */

.gallery-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--color-verde-deep);
  color: var(--color-cream);
  padding-block: clamp(4rem, 11vh, 8rem);
  text-align: center;
}
.gallery-cta__media,
.gallery-cta__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(13, 31, 22, 0.84) 0%,
    rgba(13, 31, 22, 0.78) 50%,
    rgba(13, 31, 22, 0.9) 100%
  );
}
.gallery-cta__inner {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  margin-inline: auto;
}
.gallery-cta__title {
  color: var(--color-cream);
  font-size: var(--step-3);
  line-height: 1.1;
  margin-top: var(--space-s);
}
.gallery-cta__text {
  margin-top: var(--space-m);
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--color-cream);
  opacity: 0.86;
}
.gallery-cta__actions {
  margin-top: var(--space-l);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  justify-content: center;
}
.gallery-cta__phone {
  display: inline-block;
  margin-top: var(--space-m);
  font-size: var(--step--1);
  color: var(--color-cream);
  opacity: 0.78;
  transition: opacity 0.25s var(--ease);
}
.gallery-cta__phone:hover { opacity: 1; }
