/* ==========================================================================
   Campaign Photo Gallery
   ========================================================================== */

.gallery-hub {
  background: #0a0f0d;
  color: #fff;
}

.gallery-hero {
  position: relative;
  padding: 3.5rem 0 4rem;
  background: linear-gradient(160deg, #000 0%, #002818 45%, #004026 100%);
  overflow: hidden;
}

@media (min-width: 768px) {
  .gallery-hero {
    padding: 4.5rem 0 5rem;
  }
}

.gallery-hero__mesh {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(255, 193, 7, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 107, 63, 0.15) 0%, transparent 40%);
  pointer-events: none;
}

.gallery-hero__glow {
  position: absolute;
  bottom: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(0, 107, 63, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.gallery-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.gallery-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}

.gallery-hero h1 {
  font-family: var(--font-heading, "Montserrat", sans-serif);
  font-weight: 800;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.gallery-hero__accent {
  background: linear-gradient(90deg, #ffc107, #ffdb4d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gallery-hero__lead {
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 2rem;
}

.gallery-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.gallery-hero__stat strong {
  display: block;
  font-family: var(--font-heading, "Montserrat", sans-serif);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.gallery-hero__stat span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
}

/* Featured mosaic */
.gallery-featured-wrap {
  padding: 2.5rem 0;
  background: #0a0f0d;
}

.gallery-featured-head {
  margin-bottom: 1.5rem;
}

.gallery-featured-head h2 {
  font-family: var(--font-heading, "Montserrat", sans-serif);
  font-weight: 700;
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
  color: #fff;
}

.gallery-featured-head p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

.gallery-featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .gallery-featured-grid {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: repeat(2, 200px);
    gap: 1rem;
  }

  .gallery-featured-item:first-child {
    grid-row: span 2;
  }
}

.gallery-featured-item {
  position: relative;
  border: none;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #111;
  min-height: 160px;
  aspect-ratio: 4/3;
}

@media (min-width: 768px) {
  .gallery-featured-item {
    aspect-ratio: auto;
    min-height: 0;
  }

  .gallery-featured-item:first-child {
    min-height: 100%;
  }
}

.gallery-featured-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-featured-item:hover img {
  transform: scale(1.05);
}

.gallery-featured-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  text-align: left;
  color: #fff;
}

.gallery-featured-item__tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ffc107;
  margin-bottom: 0.25rem;
}

.gallery-featured-item__title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Body / grid */
.gallery-body {
  padding: 2rem 0 4rem;
  background: linear-gradient(180deg, #0a0f0d 0%, #111916 100%);
}

.gallery-toolbar {
  margin-bottom: 2rem;
}

.gallery-search {
  position: relative;
  max-width: 420px;
  margin-bottom: 1.25rem;
}

.gallery-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
}

.gallery-search__input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.9rem;
}

.gallery-search__input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.gallery-search__input:focus {
  outline: none;
  border-color: rgba(255, 193, 7, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.12);
}

.gallery-category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gallery-cat-pill {
  padding: 0.45rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.gallery-cat-pill.is-active,
.gallery-cat-pill:hover {
  background: #ffc107;
  border-color: #ffc107;
  color: #0a1f17;
}

.gallery-masonry {
  columns: 2;
  column-gap: 0.75rem;
}

@media (min-width: 576px) {
  .gallery-masonry {
    columns: 3;
    column-gap: 1rem;
  }
}

@media (min-width: 992px) {
  .gallery-masonry {
    columns: 4;
  }
}

.gallery-loading {
  column-span: all;
  text-align: center;
  padding: 3rem 1rem;
  break-inside: avoid;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 0.75rem;
  border: none;
  padding: 0;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: #1a2420;
  display: block;
  text-align: left;
}

@media (min-width: 576px) {
  .gallery-item {
    margin-bottom: 1rem;
  }
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease, filter 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  pointer-events: none;
}

.gallery-item:hover .gallery-item__overlay {
  opacity: 1;
}

.gallery-item__tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ffc107;
  margin-bottom: 0.2rem;
}

.gallery-item__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.gallery-item__zoom {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 1rem;
}

.gallery-item:hover .gallery-item__zoom {
  opacity: 1;
}

.gallery-empty {
  column-span: all;
  text-align: center;
  padding: 4rem 1.5rem;
  color: rgba(255, 255, 255, 0.5);
  break-inside: avoid;
}

.gallery-empty i {
  font-size: 2.5rem;
  opacity: 0.4;
  margin-bottom: 1rem;
  display: block;
}

.gallery-btn-load-more {
  padding: 0.75rem 2rem;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.gallery-btn-load-more:hover {
  background: #ffc107;
  border-color: #ffc107;
  color: #0a1f17;
}

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox[hidden] {
  display: none !important;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
}

.gallery-lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(960px, 94vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.gallery-lightbox__close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.25rem;
  padding: 0.5rem;
  cursor: pointer;
  opacity: 0.8;
}

.gallery-lightbox__close:hover {
  opacity: 1;
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.gallery-lightbox__nav:hover {
  background: rgba(255, 193, 7, 0.9);
  color: #0a1f17;
  border-color: #ffc107;
}

.gallery-lightbox__nav--prev {
  left: -1rem;
}

.gallery-lightbox__nav--next {
  right: -1rem;
}

@media (max-width: 767px) {
  .gallery-lightbox__nav--prev {
    left: 0.5rem;
  }

  .gallery-lightbox__nav--next {
    right: 0.5rem;
  }

  .gallery-lightbox__close {
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.gallery-lightbox__figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
}

.gallery-lightbox__figure img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  background: #000;
}

.gallery-lightbox__figure figcaption {
  padding: 1.25rem 1.5rem;
  background: #111916;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gallery-lightbox__tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ffc107;
}

.gallery-lightbox__figure figcaption strong {
  font-size: 1.1rem;
  font-weight: 700;
}

.gallery-lightbox__figure figcaption span:last-child {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
}

body.gallery-lightbox-open {
  overflow: hidden;
}
