/* ========================================
   Gallery Section Styles - Barsi Theme
   ======================================== */

:root {
    --bs-clr-pr-1: #f16319;
    --bs-clr-h-4: #060606;
    --bs-clr-white-1: #ffffff;
    --bs-clr-black-1: #000000;
    --bs-cube-1: all .25s cubic-bezier(.645,.045,.355,1);
    --bs-cube-2: cubic-bezier(.1,.75,.25,1);
    --bs-font-1: "Albert Sans", serif;
    --bs-font-2: "Space Grotesk", serif;
}

/* Gallery Section */
.gallery-section {
    padding: 120px 0;
    background: #ffffff;
}

/* Section Header */
.gallery-title {
    font-family: var(--bs-font-1);
    font-size: 70px;
    font-weight: 600;
    color: var(--bs-clr-black-1);
    margin-bottom: 15px;
    letter-spacing: -0.03em;
    line-height: 1;
}

.gallery-subtitle {
    font-family: var(--bs-font-1);
    font-size: 18px;
    color: var(--bs-clr-black-1);
    font-weight: 400;
    line-height: 1.555;
}

/* Filter Buttons */
.gallery-filter {
    margin-bottom: 60px;
}

.filter-btn {
    font-family: var(--bs-font-2);
    background: transparent;
    border: 1px solid var(--bs-clr-black-1);
    color: var(--bs-clr-black-1);
    padding: 12px 28px;
    margin: 5px;
    font-size: 16px;
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: 0;
    cursor: pointer;
    transition: 0.4s var(--bs-cube-2);
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--bs-clr-pr-1);
    transition: 0.4s var(--bs-cube-2);
    z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 0;
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--bs-clr-white-1);
    border-color: var(--bs-clr-pr-1);
    transform: translateY(-2px);
}

/* Gallery Grid */
.gallery-grid {
    position: relative;
}

.gallery-item {
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.gallery-item.hide {
    opacity: 0;
    transform: scale(0.8);
    position: absolute;
    pointer-events: none;
}

/* Gallery Card */
.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    cursor: pointer;
    height: 100%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: 0.5s var(--bs-cube-2);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 500ms;
    transform: perspective(0px) rotateX(0deg) rotateY(0deg) scaleX(1) scaleY(1);
    transform-origin: center center;
    min-height: 300px;
}

/* Hover Effects */
.gallery-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.gallery-card:hover img {
    transform: perspective(2000px) rotateX(0.03deg) rotateY(0deg) scaleX(1.05) scaleY(1.05);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.5s var(--bs-cube-2);
}

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

.gallery-content {
    text-align: center;
    color: var(--bs-clr-white-1);
    transform: translateY(20px);
    transition: 0.5s var(--bs-cube-2);
}

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

.gallery-content h4 {
    font-family: var(--bs-font-1);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--bs-clr-white-1);
    letter-spacing: -0.03em;
}

.gallery-content p {
    font-family: var(--bs-font-2);
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    text-transform: capitalize;
    letter-spacing: 0;
}

.gallery-zoom {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bs-clr-pr-1);
    border: none;
    color: var(--bs-clr-white-1);
    font-size: 18px;
    cursor: pointer;
    transition: 0.4s var(--bs-cube-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gallery-zoom:hover {
    background: var(--bs-clr-white-1);
    color: var(--bs-clr-pr-1);
    transform: scale(1.1) rotate(90deg);
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

/* Lightbox Controls */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    backdrop-filter: blur(10px);
}

.lightbox-close {
    top: 30px;
    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(--bs-clr-pr-1);
    border-color: var(--bs-clr-pr-1);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: var(--bs-clr-pr-1);
    border-color: var(--bs-clr-pr-1);
}

/* Responsive Design */
@media (max-width: 991px) {
    .gallery-title {
        font-size: 38px;
    }
    
    .gallery-section {
        padding: 80px 0;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .gallery-title {
        font-size: 32px;
    }
    
    .gallery-subtitle {
        font-size: 16px;
    }
    
    .gallery-section {
        padding: 60px 0;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 12px;
        margin: 3px;
    }
    
    .gallery-content h4 {
        font-size: 18px;
    }
    
    .gallery-content p {
        font-size: 12px;
    }
    
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .lightbox-prev {
        left: 15px;
    }
    
    .lightbox-next {
        right: 15px;
    }
}

@media (max-width: 575px) {
    .gallery-card img {
        min-height: 250px;
    }
}

/* Loading Animation */
.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
