/* =========================================================
   JAFFEST'26 GALLERY PAGE
   Uses the shared colours and fonts from style.css.
========================================================= */

.gallery-hero {
  min-height: 430px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  background: var(--green-dark);
  color: #fff;
}

.gallery-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 82% 24%, #f5b40036, transparent 23%),
    linear-gradient(115deg, #06451d 0%, #08752b 58%, #0a8b35 100%);
}

.gallery-hero-inner {
  width: min(1180px, calc(100% - 60px));
  margin: 0 auto;
  padding: 82px 0 76px;
  position: relative;
  z-index: 2;
}

.gallery-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: #ffe18a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.gallery-eyebrow span {
  width: 26px;
  height: 3px;
  background: var(--gold);
}

.gallery-hero h1 {
  max-width: 760px;
  margin: 0;
  font: 900 clamp(56px, 7.4vw, 92px)/.91 var(--font-head);
  letter-spacing: -4px;
}

.gallery-hero h1 em {
  color: var(--gold);
  font-style: normal;
}

.gallery-hero-description {
  max-width: 510px;
  margin: 23px 0 22px;
  color: #e5f0e5;
  font-size: 16px;
  line-height: 1.75;
}

.gallery-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 23px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.gallery-hero-meta i {
  margin-right: 7px;
  color: var(--gold);
}

.gallery-hero-shape {
  position: absolute;
  border: 1px solid #ffffff22;
  border-radius: 50%;
  pointer-events: none;
}

.gallery-hero-shape-one {
  width: 430px;
  height: 430px;
  right: 7%;
  top: -190px;
}

.gallery-hero-shape-two {
  width: 290px;
  height: 290px;
  right: 13%;
  bottom: -190px;
  border: 2px dashed #f5b40066;
}

.gallery-hero-stamp {
  position: absolute;
  right: max(7%, calc((100% - 1180px) / 2));
  bottom: 52px;
  width: 145px;
  height: 145px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  text-align: center;
  transform: rotate(9deg);
  box-shadow: 0 12px 35px #00250e55;
}

.gallery-hero-stamp strong {
  font: 900 23px var(--font-head);
}

.gallery-hero-stamp span {
  max-width: 100px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1px;
}

.gallery-section {
  padding: 88px max(30px, calc((100% - 1180px) / 2)) 105px;
  background: var(--paper);
}

.gallery-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 35px;
  margin-bottom: 34px;
}

.gallery-section-heading h2 {
  margin: 0;
  font: 900 clamp(42px, 5vw, 64px)/.98 var(--font-head);
  letter-spacing: -2px;
}

.gallery-section-heading h2 em {
  color: var(--green);
  font-style: normal;
}

.gallery-section-intro {
  max-width: 360px;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.gallery-filter {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid #e4e8df;
  border-radius: 30px;
  background: #fff;
  color: #454b45;
  font: 700 12px var(--font-body);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}

.gallery-filter:hover {
  transform: translateY(-2px);
  border-color: var(--green);
}

.gallery-filter.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.gallery-filter span {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  place-items: center;
  border-radius: 20px;
  background: #ffffff30;
  font-size: 10px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 230px;
  grid-auto-flow: dense;
  gap: 15px;
}

.gallery-card {
  position: relative;
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  background: #e7eadf;
  cursor: zoom-in;
  text-align: left;
}

.gallery-card:nth-child(7n + 1),
.gallery-card:nth-child(7n + 5) {
  grid-row: span 2;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s ease;
}

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

.gallery-card-overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 35px 15px 14px;
  background: linear-gradient(transparent, #07170dcc);
  color: #fff;
  opacity: 0;
  transition: opacity .25s;
}

.gallery-card-overlay span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.gallery-card-overlay i {
  font-size: 13px;
}

.gallery-card:hover .gallery-card-overlay,
.gallery-card:focus-visible .gallery-card-overlay {
  opacity: 1;
}

.gallery-card[hidden] {
  display: none;
}

.gallery-empty {
  padding: 35px 15px;
  color: var(--muted);
  text-align: center;
}

.gallery-cta {
  display: grid;
  grid-template-columns: 1fr .75fr;
  align-items: center;
  gap: 40px;
  min-height: 390px;
  padding: 70px max(30px, calc((100% - 1180px) / 2));
  overflow: hidden;
  background: #f8c12a;
}

.gallery-cta-copy h2 {
  margin: 0 0 18px;
  font: 900 clamp(48px, 6vw, 76px)/.92 var(--font-head);
  letter-spacing: -3px;
}

.gallery-cta-copy h2 em {
  color: var(--green);
  font-style: normal;
}

.gallery-cta-copy > p:not(.section-kicker) {
  margin: 0 0 25px;
  color: #55420c;
  font-size: 14px;
}

.gallery-cta-art {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 45% 45% 20px 20px;
  background: var(--green);
  color: #fff;
  transform: rotate(3deg);
}

.gallery-cta-star {
  position: absolute;
  color: #ffffff20;
  font-size: 260px;
  line-height: 1;
}

.gallery-cta-word {
  position: relative;
  z-index: 1;
  color: #fff;
  font: 900 54px/.82 var(--font-head);
  letter-spacing: -2px;
  text-align: center;
  text-shadow: 4px 4px 0 #075c20;
  transform: rotate(-7deg);
}

.gallery-cta-date {
  position: absolute;
  bottom: 22px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffe082;
}

/* Image viewer */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 55px 80px;
  background: #050907f2;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-figure {
  max-width: min(100%, 1100px);
  max-height: 100%;
  margin: 0;
  text-align: center;
}

.lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 130px);
  margin: auto;
  object-fit: contain;
  border-radius: 5px;
}

.lightbox-figure figcaption {
  margin-top: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #ffffff18;
  color: #fff;
  cursor: pointer;
}

.lightbox-close {
  top: 20px;
  right: 25px;
  width: 43px;
  height: 43px;
  font-size: 30px;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  width: 45px;
  height: 45px;
  font-size: 16px;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 22px;
}

.lightbox-next {
  right: 22px;
}

.lightbox-counter {
  position: absolute;
  bottom: 17px;
  left: 0;
  right: 0;
  margin: 0;
  color: #cbd4cc;
  font-size: 11px;
  text-align: center;
}

.gallery-lightbox button:hover {
  background: var(--gold);
  color: var(--ink);
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 210px;
  }

  .gallery-hero-stamp {
    right: 6%;
    bottom: 35px;
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 650px) {
  .gallery-hero {
    min-height: 430px;
  }

  .gallery-hero-inner {
    width: calc(100% - 44px);
    padding: 68px 0 85px;
  }

  .gallery-hero h1 {
    font-size: clamp(52px, 13vw, 72px);
    letter-spacing: -3px;
  }

  .gallery-hero-description {
    max-width: 390px;
    font-size: 14px;
  }

  .gallery-hero-stamp {
    right: 20px;
    bottom: 18px;
    width: 88px;
    height: 88px;
  }

  .gallery-hero-stamp strong {
    font-size: 16px;
  }

  .gallery-hero-stamp span {
    max-width: 70px;
    font-size: 5px;
  }

  .gallery-section {
    padding: 65px 20px 75px;
  }

  .gallery-section-heading {
    display: block;
  }

  .gallery-section-intro {
    margin-top: 17px;
  }

  .gallery-filters {
    gap: 8px;
    margin-bottom: 22px;
  }

  .gallery-filter {
    min-height: 38px;
    padding: 8px 13px;
    font-size: 11px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 175px;
    gap: 9px;
  }

  .gallery-card:nth-child(7n + 1),
  .gallery-card:nth-child(7n + 5) {
    grid-row: span 1;
  }

  .gallery-card:nth-child(5n + 1) {
    grid-row: span 2;
  }

  .gallery-card-overlay {
    padding: 25px 9px 9px;
    opacity: 1;
  }

  .gallery-card-overlay span {
    font-size: 9px;
  }

  .gallery-cta {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 65px 22px;
  }

  .gallery-cta-art {
    width: min(100%, 380px);
    min-height: 230px;
    margin: 0 auto;
  }

  .gallery-cta-word {
    font-size: 46px;
  }

  .gallery-lightbox {
    padding: 60px 18px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .lightbox-nav {
    width: 36px;
    height: 36px;
  }

  .lightbox-figure img {
    max-height: calc(100vh - 150px);
  }
}

@media (max-width: 380px) {
  .gallery-grid {
    grid-auto-rows: 150px;
  }

  .gallery-filter {
    padding: 8px 10px;
  }

  .gallery-hero-meta {
    gap: 12px;
    font-size: 10px;
  }
}
