/*==========================================
  GALLERY PAGE
==========================================*/


/*==========================================
  GALLERY HERO
==========================================*/

.gallery-hero {
    position: relative;
    padding: calc(var(--header-height) + 7rem) 0 7rem;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 85% 25%,
            rgba(7, 82, 173, 0.22),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            var(--ink) 0%,
            #041b37 58%,
            #020d1d 100%
        );
}

.gallery-hero::before,
.gallery-hero::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.gallery-hero::before {
    width: 42rem;
    height: 42rem;
    top: -20rem;
    right: -12rem;
    border: 1px solid rgba(98, 166, 255, 0.12);
    border-radius: 50%;
}

.gallery-hero::after {
    width: 28rem;
    height: 28rem;
    top: -8rem;
    right: 4rem;
    border: 1px solid rgba(98, 166, 255, 0.08);
    border-radius: 50%;
}

.gallery-hero .container {
    position: relative;
    z-index: 1;
}

.gallery-hero h1 {
    max-width: 850px;
    margin-top: 1.5rem;
    color: var(--white);
    font-size: clamp(3rem, 6vw, 6.5rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.gallery-hero h1 span {
    color: var(--accent-light);
}

.gallery-hero__text {
    max-width: 620px;
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    line-height: 1.8;
}


/*==========================================
  GALLERY SECTION
==========================================*/

.gallery-section {
    padding: 7rem 0;
    background: var(--paper);
}


/*==========================================
  FILTERS
==========================================*/

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.gallery-filter {
    padding: 0.85rem 1.3rem;
    border: 1px solid rgba(3, 21, 44, 0.12);
    border-radius: 999px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

.gallery-filter:hover {
    border-color: var(--brand-blue);
    transform: translateY(-2px);
}

.gallery-filter.active {
    border-color: var(--brand-blue);
    background: var(--brand-blue);
    color: var(--white);
}


/*==========================================
  GALLERY GRID
==========================================*/

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    background: var(--ink);
}

.gallery-card__image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: var(--ink-soft);
    cursor: pointer;
}

.gallery-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform 0.6s cubic-bezier(.2, .8, .2, 1),
        opacity 0.3s ease;
}

.gallery-card:hover .gallery-card__image img {
    transform: scale(1.06);
}

.gallery-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    background:
        linear-gradient(
            to top,
            rgba(3, 21, 44, 0.8),
            rgba(3, 21, 44, 0.08) 55%,
            transparent
        );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-card__overlay {
    opacity: 1;
}

.gallery-card__overlay span {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 700;
}


/*==========================================
  FILTER STATES
==========================================*/

.gallery-card.is-hidden {
    display: none;
}


/*==========================================
  LIGHTBOX
==========================================*/

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(1, 11, 25, 0.96);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.gallery-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.gallery-lightbox__image {
    display: block;
    max-width: min(90vw, 1200px);
    max-height: 78vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.gallery-lightbox__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.gallery-lightbox__close:hover {
    background: var(--brand-blue);
    transform: rotate(90deg);
}

.gallery-lightbox__title {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    transform: translateX(-50%);
}


/*==========================================
  RESPONSIVE
==========================================*/

@media (max-width: 900px) {

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 600px) {

    .gallery-hero {
        padding: calc(var(--header-height) + 5rem) 0 5rem;
    }

    .gallery-section {
        padding: 4.5rem 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-filters {
        gap: 0.5rem;
    }

    .gallery-filter {
        padding: 0.7rem 1rem;
        font-size: 0.82rem;
    }

    .gallery-lightbox {
        padding: 1rem;
    }

    .gallery-lightbox__image {
        max-width: 94vw;
        max-height: 75vh;
    }

}
body.lightbox-open { overflow: hidden; }
.gallery-filter:focus-visible, .gallery-card__image:focus-visible, .gallery-lightbox__close:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .gallery-card__image img, .gallery-card__overlay, .gallery-lightbox, .gallery-filter, .gallery-lightbox__close { transition: none; }
}
.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 50%;
  background: rgba(3, 21, 44, .76);
  color: var(--white);
  cursor: pointer;
  font-size: 1.65rem;
  line-height: 1;
  place-items: center;
  transform: translateY(-50%);
  transition: background .25s var(--ease), border-color .25s var(--ease), opacity .25s var(--ease), transform .25s var(--ease);
}

.gallery-lightbox__nav--previous { left: 1.25rem; }
.gallery-lightbox__nav--next { right: 1.25rem; }

.gallery-lightbox__nav:hover,
.gallery-lightbox__nav:focus-visible {
  border-color: var(--accent-light);
  background: var(--brand-blue);
  outline: 0;
  transform: translateY(-50%) scale(1.06);
}

.gallery-lightbox__nav:disabled {
  cursor: not-allowed;
  opacity: .35;
}

.gallery-lightbox__nav:disabled:hover {
  border-color: rgba(255, 255, 255, .38);
  background: rgba(3, 21, 44, .76);
  transform: translateY(-50%);
}

@media (max-width: 600px) {
  .gallery-lightbox__nav {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.35rem;
  }

  .gallery-lightbox__nav--previous { left: .75rem; }
  .gallery-lightbox__nav--next { right: .75rem; }
}