
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--maroon);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
}

.gallery-section {
    width: 100%;
    padding: 90px 7%;
}

.gallery-heading {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 45px;
}

.sub-title {
    color: #d5ad70;
    font-size: 12px;
    letter-spacing: 5px;
    font-weight: 600;
}

.gallery-heading h1 {
    font-size: clamp(32px, 5vw, 58px);
    margin: 20px 0;
    font-weight: 700;
}

.gallery-heading h1 span {
    color: #d5ad70;
}

.gallery-heading p {
    color: #9da7b8;
    font-size: 14px;
    line-height: 1.8;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 45px;
}

.filter-buttons button {
    background: transparent;
    border: 1px solid #303b4d;
    color: #b9c0cc;
    padding: 12px 22px;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: .3s;
}

.filter-buttons button:hover,
.filter-buttons button.active {
    background: #d5ad70;
    border-color: #d5ad70;
    color: #080d18;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.gallery-item {
    position: relative;
    height: 320px;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    animation: fadeIn .5s ease;
}

.gallery-item.hide {
    display: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        transparent 20%,
        rgba(0,0,0,.85) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    opacity: 0;
    transition: .4s;
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

.image-overlay span {
    color: #d5ad70;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.image-overlay h3 {
    font-size: 20px;
    margin: 10px 0;
}

.view-btn {
    width: fit-content;
    background: none;
    border: none;
    color: #fff;
    font-size: 10px;
    letter-spacing: 2px;
    cursor: pointer;
}

/* LIGHTBOX */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.96);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.show {
    display: flex;
}

.lightbox img {
    max-width: 80%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 5px;
}

.lightbox button {
    position: absolute;
    background: transparent;
    border: none;
    color: white;
    font-size: 35px;
    cursor: pointer;
    padding: 10px;
}

.close {
    top: 20px;
    right: 35px;
}

.prev {
    left: 25px;
}

.next {
    right: 25px;
}

.image-counter {
    position: absolute;
    bottom: 25px;
    color: #d5ad70;
    font-size: 13px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* TABLET */

@media(max-width: 992px) {
    .gallery-section {
        padding: 70px 5%;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item {
        height: 280px;
    }
}

/* MOBILE */

@media(max-width: 576px) {
    .gallery-section {
        padding: 55px 18px;
    }

    .gallery-heading {
        margin-bottom: 30px;
    }

    .filter-buttons {
        gap: 8px;
        margin-bottom: 30px;
    }

    .filter-buttons button {
        padding: 10px 14px;
        font-size: 10px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery-item {
        height: 280px;
    }

    .image-overlay {
        opacity: 1;
    }

    .lightbox img {
        max-width: 90%;
        max-height: 70vh;
    }

    .prev {
        left: 0;
    }

    .next {
        right: 0;
    }
}
