/*=========================================
            GALLERY PAGE
==========================================*/

.gallery-page {
    background: #f8f9fa;
}

/*=========================================
            FILTER BUTTONS
==========================================*/

.gallery-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 50px 0 60px;
}

.gallery-filter a {
    padding: 10px 35px;
    border: 2px solid #e5e5e5;
    background: var(--light);
    color: var(--secondary);
    border-radius: 50px;
    font-size: 16px;
    transition: .35s;
}

.gallery-filter a:hover,
.gallery-filter a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--light);
}

.gallery-filter a:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .18);
}

/*=========================================
            GALLERY GRID
==========================================*/

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/*=========================================
            GALLERY ITEM
==========================================*/

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    background: var(--light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    transition:
        opacity .35s ease,
        transform .35s ease,
        box-shadow .35s ease;
    animation: fadeUp .6s ease;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .15);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: .5s;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/*=========================================
            OVERLAY
==========================================*/

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    background: linear-gradient(to top,
            rgba(0, 0, 0, .82),
            rgba(0, 0, 0, .35),
            transparent);
    opacity: 0;
    transition: .35s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    color: var(--light);
    font-size: 22px;
    margin-bottom: 8px;
    transform: translateY(20px);
    transition: .35s;
}

.gallery-overlay span {
    color: #ddd;
    font-size: 15px;
    transform: translateY(20px);
    transition: .45s;
}

.gallery-item:hover .gallery-overlay h3,
.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/*=========================================
            LIGHTBOX
==========================================*/

.lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, .92);
    opacity: 0;
    visibility: hidden;
    transition: .35s;
    z-index: 9999;
    padding: 0 15px;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

/*=========================================
        LIGHTBOX CONTENT
==========================================*/

.lightbox-content {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
    animation: zoomIn .35s ease;
}

/*=========================================
        LIGHTBOX INFO
==========================================*/

.lightbox-info {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    z-index: 5;
    pointer-events: none;
    color: var(--primary);
}

.lightbox-count {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 14px;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, .95);
    font-size: 14px;
    font-weight: 500;
}

.lightbox-title {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
    line-height: 1;
}

.lightbox-category {
    font-size: 18px;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .5);

}

/*=========================================
            CLOSE BUTTON
==========================================*/

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(12px);
    color: var(--light);
    font-size: 28px;
    cursor: pointer;
    transition: .35s;
    z-index: 20;
}

.close-lightbox:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

/*=========================================
            PREV / NEXT
==========================================*/

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(12px);
    color: var(--light);
    font-size: 18px;
    cursor: pointer;
    transition: .35s;
    z-index: 20;

}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
    left: 35px;
}

.lightbox-next {
    right: 35px;
}

/*=========================================
            IMAGE ANIMATION
==========================================*/

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(35px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(.82);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/*=========================================
        RESPONSIVE - 1200px
==========================================*/

@media (max-width:1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }

    .gallery-item img {
        height: 280px;
    }
}

/*=========================================
        RESPONSIVE - 992px
==========================================*/

@media (max-width:992px) {
    .gallery-filter {
        margin: 40px 0 50px;
        gap: 12px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .gallery-item img {
        height: 260px;
    }

    .gallery-overlay {
        padding: 20px;
    }

    .gallery-overlay h3 {
        font-size: 20px;
    }

    .lightbox-content {
        max-width: 94vw;
    }

    .lightbox img {
        max-height: 72vh;
    }

    .lightbox-title {
        font-size: 26px;
    }

    .lightbox-category {
        font-size: 16px;
    }

}

/*=========================================
        RESPONSIVE - 768px
==========================================*/

@media (max-width:768px) {
    .gallery-filter {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .gallery-filter a {
        padding: 10px 20px;
        font-size: 14px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .gallery-item {
        border-radius: 10px;
    }

    .gallery-item img {
        height: 260px;
    }

    .gallery-overlay {
        opacity: 1;
        padding: 18px;
    }

    .gallery-overlay h3 {
        transform: none;
        font-size: 20px;
    }

    .gallery-overlay span {
        transform: none;
        font-size: 14px;
    }

    .lightbox-content {
        max-width: 95vw;
    }

    .lightbox img {
        max-width: 100%;
        max-height: 65vh;
    }

    .lightbox-info {
        width: calc(100% - 20px);
        bottom: 18px;
    }

    .lightbox-title {
        font-size: 22px;
    }

    .lightbox-category {
        font-size: 15px;
    }

    .lightbox-count {
        font-size: 13px;
        padding: 5px 12px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    .close-lightbox {
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
}

/*=========================================
        RESPONSIVE - 576px
==========================================*/

@media (max-width:576px) {
    .gallery-filter {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 15px;
        margin: 0 -15px 20px;
        gap: 10px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .gallery-filter::-webkit-scrollbar {
        display: none;
    }

    .gallery-filter a {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 9px 18px;
        font-size: 14px;
    }

    .gallery-item img {
        height: 230px;
    }

    .gallery-overlay {
        padding: 15px;
    }

    .gallery-overlay h3 {
        font-size: 18px;
    }

    .gallery-overlay span {
        font-size: 13px;
    }

    .lightbox img {
        max-height: 60vh;
        border-radius: 8px;
    }

    .lightbox-info {
        bottom: 15px;
        width: calc(100% - 16px);
    }

    .lightbox-title {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .lightbox-category {
        font-size: 14px;
    }

    .lightbox-count {
        font-size: 12px;
        padding: 4px 10px;
        margin-bottom: 10px;
    }

}

/*=========================================
        RESPONSIVE - 400px
==========================================*/

@media (max-width:400px) {
    .gallery-filter a {
        padding: 8px 16px;
        font-size: 13px;
    }

    .gallery-item img {
        height: 210px;
    }

    .gallery-overlay h3 {
        font-size: 17px;
    }

    .gallery-overlay span {
        font-size: 12px;
    }

    .lightbox img {
        max-height: 55vh;
    }

    .lightbox-title {
        font-size: 18px;
    }

    .lightbox-category {
        font-size: 13px;
    }

    .lightbox-count {
        font-size: 11px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .close-lightbox {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
}

/*=========================================================
                    PAGINATION
=========================================================*/

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 60px;
}

.page-btn {
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 8px;
    background: var(--light);
    color: #444;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: .35s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .05);
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary);
    color: var(--light);
}

/*=========================================
        PAGINATION DISABLED
=========================================*/

.page-btn:disabled,
.page-btn.disabled {
    background: #f5f5f5;
    color: #b5b5b5;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    border: 1px solid #e9e9e9;
    opacity: .65;
}

.page-btn:disabled i,
.page-btn.disabled i {
    color: #b5b5b5;

}

.page-btn:disabled:hover,
.page-btn.disabled:hover {
    background: #f5f5f5;
    color: #b5b5b5;
    transform: none;
    box-shadow: none;
}

/*==========================================
        MOBILE (768px)
==========================================*/

@media(max-width:768px) {
    .pagination {
        flex-wrap: wrap;
    }
}

/*==========================================
        SMALL MOBILE (576px)
==========================================*/

@media(max-width:576px) {
    .page-btn {
        width: 42px;
        height: 42px;
        font-size: 14px;
    }
}

/*==========================================
        EXTRA SMALL DEVICES (400px)
==========================================*/

@media(max-width:400px) {
    .page-btn {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }
}