/* ============================================================
 * GALLERY PAGE — unique styles
 * ============================================================ */

/* Page base */
body {
    background-color: #141414;
    overflow-x: hidden;
}

/* ── Top bar ── */
.gallery-topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3.2rem;
    height: 6.4rem;
    background-color: rgba(14, 14, 14, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
}

.gallery-topbar__back {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    font-family: "Inter", sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color .25s ease;
}

.gallery-topbar__back:hover {
    color: #BF55EC;
}

.gallery-topbar__title {
    font-family: "Inter", sans-serif;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* ── Page header ── */
.gallery-header {
    padding-top: 14rem;
    padding-bottom: 5.6rem;
    text-align: center;
}

.gallery-header__label {
    font-family: "Inter", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: .42em;
    text-transform: uppercase;
    color: #8E44AD;
    display: block;
    margin-bottom: 1.6rem;
}

.gallery-header h1 {
    font-family: "IBM Plex Serif", serif;
    font-size: clamp(3.2rem, 6vw, 6rem);
    font-weight: 300;
    color: white;
    margin: 0 0 1.8rem;
    line-height: 1.1;
    letter-spacing: -.01em;
}

.gallery-header__sub {
    font-family: "Inter", sans-serif;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.38);
    letter-spacing: .04em;
}

/* ── Filter tabs ── */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 2rem 5.6rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.45);
    font-family: "Inter", sans-serif;
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-align: center;
    text-indent: .14em;
    line-height: 1;
    padding: .85rem 2rem .75rem;
    border-radius: 100px;
    cursor: pointer;
    transition: all .25s ease;
}

.filter-btn:hover {
    border-color: rgba(142, 68, 173, 0.5);
    color: #BF55EC;
}

.filter-btn.active {
    background: #8E44AD;
    border-color: #8E44AD;
    color: white;
}

/* ── Masonry-style grid ── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.6rem;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2.4rem 12rem;
}

@media only screen and (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (max-width: 560px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Gallery card ── */
.gallery-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #1a1a1a;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .5s ease, transform .5s ease, box-shadow .4s ease;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(142, 68, 173, 0.28);
}

/* Featured item spans 2 columns, pinned explicitly (rather than
   "span 2" auto-placement) so it always anchors row 1 col 1 with no
   gap next to it. The card after it is pinned into the remaining
   slot on the same row; everything else flows normally. */
.gallery-card.featured {
    grid-column: 1 / 3;
    grid-row: 1;
}

.gallery-card.featured + .gallery-card {
    grid-column: 3;
    grid-row: 1;
}

@media only screen and (max-width: 900px) {
    .gallery-card.featured,
    .gallery-card.featured + .gallery-card {
        grid-column: auto;
        grid-row: auto;
    }
}

.gallery-card__media {
    width: 100%;
    height: 100%;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.88);
    transition: filter .4s ease, transform .5s ease;
}

/* Featured card is twice as wide but keeps the same row height as the
   square cards next to it — 3-column grid, so width = 2 cols + gap. */
.gallery-card.featured .gallery-card__media {
    aspect-ratio: 2.04 / 1;
}

@media only screen and (max-width: 900px) {
    /* No longer spanning 2 columns at this width, so it should match
       the square cards around it instead of staying wide. */
    .gallery-card.featured .gallery-card__media {
        aspect-ratio: 1 / 1;
    }
}

.gallery-card:hover .gallery-card__media {
    filter: brightness(1);
    transform: scale(1.04);
}

/* Overlay */
.gallery-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 0, 20, 0.82) 0%,
        rgba(10, 0, 20, 0.2) 55%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity .35s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    box-sizing: border-box;
}

.gallery-card:hover .gallery-card__overlay {
    opacity: 1;
}

.gallery-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .15rem;
    transform: translateY(6px);
    transition: transform .35s ease;
}

.gallery-card:hover .gallery-card__tags {
    transform: translateY(0);
}

.gallery-card__tag {
    font-family: "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #BF55EC;
}

.gallery-card__tag + .gallery-card__tag::before {
    content: "|";
    margin-right: .5rem;
    color: rgba(191, 85, 236, 0.7);
    font-weight: 300;
    letter-spacing: 0;
}

.gallery-card__name {
    font-family: "IBM Plex Serif", serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: white;
    margin: 0 0 .5rem;
    transform: translateY(8px);
    transition: transform .38s ease .03s;
}

.gallery-card:hover .gallery-card__name {
    transform: translateY(0);
}

.gallery-card__rig {
    font-family: "Inter", sans-serif;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    transform: translateY(8px);
    transition: transform .4s ease .06s;
}

.gallery-card:hover .gallery-card__rig {
    transform: translateY(0);
}

/* Ghost Play-Icon — large, no circle */
.gallery-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.85);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.18);
    font-size: 5.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease, transform .35s ease, color .35s ease;
    filter: drop-shadow(0 2px 16px rgba(0,0,0,0.4));
}

.gallery-card:hover .gallery-card__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    color: rgba(255, 255, 255, 0.55);
}

/* Hidden state for filter */
.gallery-card.hidden {
    display: none;
}

/* Scroll reveal */
.gallery-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-card.visible:hover {
    transform: translateY(-4px);
}

/* ── Lightbox ── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(8, 0, 16, 0.93);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

.lightbox.open {
    display: flex;
}

.lightbox__inner {
    position: relative;
    background: #1a1a1a;
    border-radius: 14px;
    overflow: hidden;
    border-top: 3px solid #8E44AD;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
    max-width: 880px;
    width: 100%;
    animation: lb-in .3s cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes lb-in {
    from { opacity: 0; transform: scale(.94) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.lightbox__video {
    width: 100%;
    display: block;
    max-height: 500px;
    object-fit: cover;
    border-radius: 11px 11px 0 0;
}

.lightbox__desc {
    padding: 2.4rem 3.2rem 2.8rem;
}

.lightbox__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.lightbox__title {
    font-family: "IBM Plex Serif", serif;
    font-size: 2rem;
    font-weight: 400;
    color: white;
    margin: 0;
}

.lightbox__rig-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: "Inter", sans-serif;
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #BF55EC;
    background: transparent;
    border: 1px solid rgba(142, 68, 173, 0.4);
    border-radius: 20px;
    padding: .5rem 1.4rem;
    text-decoration: none;
    transition: all .25s ease;
}

.lightbox__rig-link::before {
    content: "↗";
    font-size: 1rem;
}

.lightbox__rig-link:hover {
    background: #8E44AD;
    border-color: #8E44AD;
    color: white;
}

.lightbox__text {
    color: rgba(255, 255, 255, 0.56);
    font-family: "Inter", sans-serif;
    font-size: 1.5rem;
    line-height: 1.85;
    margin: 0;
}

.lightbox__close {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    margin: 1.8rem auto 1.2rem;
    width: auto;
    height: 36px;
    border-radius: 100px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all .25s ease;
    padding: 0 1.6rem;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    font-family: "Inter", sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
    position: static;
    transform: none;
}

.lightbox__close i {
    font-size: .85rem;
    transition: transform .25s ease;
}

.lightbox__close:hover {
    background: #8E44AD;
    border-color: #8E44AD;
    color: white;
}

.lightbox__close:hover i {
    transform: translateY(2px);
}

/* ── Count label ── */
.gallery-count {
    text-align: center;
    font-family: "Inter", sans-serif;
    font-size: 1.2rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.22);
    padding-bottom: 3.2rem;
}

/* ── Modal h5 — standalone, left-aligned ── */
.modal-popup__desc h5 {
    color: white;
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
    text-align: left;
}
.gallery-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-family: "Inter", sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 100px;
    padding: 1.2rem 3rem;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}

.gallery-cta-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.15), rgba(191, 85, 236, 0.08));
    opacity: 0;
    transition: opacity .3s ease;
}

.gallery-cta-btn:hover {
    border-color: rgba(142, 68, 173, 0.6);
    color: #BF55EC;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(142, 68, 173, 0.2);
}

.gallery-cta-btn:hover::before {
    opacity: 1;
}

.gallery-cta-btn i {
    transition: transform .3s ease;
}

.gallery-cta-btn:hover i {
    transform: translateX(4px);
}