﻿.gallery-section {
    position: relative;
    padding: 120px 35px;
    background: #050505;
    overflow: hidden;
}

    .gallery-section::before {
        content: "";
        position: absolute;
        width: 500px;
        height: 500px;
        top: 20%;
        right: -200px;
        border-radius: 50%;
        background: rgba(255, 50, 10, 0.07);
        filter: blur(120px);
        pointer-events: none;
    }

.gallery-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: auto;
}


/* Heading */

.gallery-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 50px;
    margin-bottom: 45px;
}

.gallery-label {
    color: var(--orange);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.gallery-heading h2 {
    margin-top: 12px;
    font-family: "Outfit", sans-serif;
    font-size: clamp(40px, 5vw, 65px);
    line-height: 1;
    letter-spacing: -3px;
}

    .gallery-heading h2 span {
        display: block;
        background: var(--gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

.gallery-heading > p {
    max-width: 420px;
    color: #777;
    font-size: 13px;
    line-height: 1.8;
}


/* Filters */

.gallery-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.gallery-filter {
    padding: 9px 17px;
    border: 1px solid rgba(255,70,20,0.18);
    border-radius: 50px;
    background: rgba(255,255,255,0.02);
    color: #777;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s ease;
}

    .gallery-filter:hover,
    .gallery-filter.active {
        background: var(--gradient);
        border-color: transparent;
        color: white;
        box-shadow: 0 0 20px rgba(255,50,10,0.2);
    }


/* Grid */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 16px;
}


/* Items */

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.07);
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.5s ease, opacity 0.4s ease;
}

.gallery-large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-wide {
    grid-column: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(.2,.7,.2,1), filter 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: saturate(1.15) contrast(1.05);
}


/* Orange border glow */

.gallery-item::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 1px solid transparent;
    border-radius: inherit;
    transition: 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover::before {
    border-color: rgba(255,70,20,0.5);
    box-shadow: inset 0 0 30px rgba(255,50,10,0.08);
}


/* Overlay */

.gallery-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: end;
    justify-content: space-between;
    padding: 24px;
    background: linear-gradient( to top, rgba(0,0,0,0.85), transparent 60% );
    opacity: 0;
    transition: 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: var(--orange);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.gallery-overlay h3 {
    margin-top: 7px;
    color: white;
    font-family: "Outfit", sans-serif;
    font-size: 20px;
}


/* View button */

.gallery-view {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255,70,20,0.4);
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: white;
    cursor: pointer;
    transition: 0.35s ease;
}

    .gallery-view:hover {
        background: var(--gradient);
        transform: rotate(45deg);
    }


/* Hide filtered items */

.gallery-item.hidden {
    display: none;
}


/* =====================================================
   LIGHTBOX
===================================================== */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(15px);
    opacity: 0;
    visibility: hidden;
    transition: 0.4s ease;
}

    .gallery-lightbox.active {
        opacity: 1;
        visibility: visible;
    }

.lightbox-content {
    position: relative;
    max-width: 1100px;
    width: 100%;
    max-height: 90vh;
}

    .lightbox-content img {
        width: 100%;
        max-height: 75vh;
        display: block;
        object-fit: contain;
        border-radius: 14px;
        box-shadow: 0 0 80px rgba(255,40,10,0.15);
    }

.lightbox-info {
    margin-top: 18px;
}

    .lightbox-info span {
        color: var(--orange);
        font-size: 10px;
        letter-spacing: 1.5px;
    }

    .lightbox-info h3 {
        margin-top: 5px;
        color: white;
        font-family: "Outfit", sans-serif;
        font-size: 22px;
    }


/* Lightbox buttons */

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,70,20,0.3);
    border-radius: 50%;
    background: rgba(10,10,10,0.8);
    color: white;
    cursor: pointer;
    transition: 0.3s ease;
    z-index: 10;
}

.lightbox-close {
    top: 25px;
    right: 30px;
}

.lightbox-prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

    .lightbox-close:hover,
    .lightbox-prev:hover,
    .lightbox-next:hover {
        background: var(--gradient);
        border-color: transparent;
    }


/* Mobile */

@media (max-width: 900px) {

    .gallery-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 220px;
    }

    .gallery-large {
        grid-column: span 2;
        grid-row: span 1;
    }
}


@media (max-width: 600px) {

    .gallery-section {
        padding: 90px 20px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 260px;
    }

    .gallery-large,
    .gallery-wide {
        grid-column: span 1;
        grid-row: span 1;
    }

    .gallery-lightbox {
        padding: 20px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}
