/* =============================================
   Beat Performance Master - Gallery Styles
   ============================================= */

/* --- Gallery Section --- */
.gallery {
    background: var(--dark-2);
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    color: var(--gray-light);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--white);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--white-pure);
}

/* Gallery Grid - Masonry-like */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 16px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item.hidden {
    display: none;
}

.gallery-item.fade-out {
    opacity: 0;
    transform: scale(0.8);
}

.gallery-item.fade-in {
    opacity: 1;
    transform: scale(1);
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: var(--dark-3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.gallery-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(230, 57, 70, 0.06) 0%,
        rgba(244, 162, 97, 0.04) 50%,
        rgba(230, 57, 70, 0.08) 100%
    );
    z-index: 1;
}

.gallery-placeholder > i,
.gallery-placeholder > img {
    font-size: 2.5rem;
    color: rgba(230, 57, 70, 0.3);
    z-index: 2;
    transition: var(--transition);
}

.gallery-placeholder > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.gallery-item.large .gallery-placeholder > i {
    font-size: 4rem;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px 20px;
    background: linear-gradient(transparent, rgba(10, 10, 15, 0.95));
    z-index: 3;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-item:hover .gallery-placeholder {
    border-color: rgba(230, 57, 70, 0.3);
}

.gallery-item:hover .gallery-placeholder > i {
    transform: scale(1.2);
    color: rgba(230, 57, 70, 0.5);
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.gallery-overlay h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white-pure);
    margin-bottom: 3px;
}

.gallery-overlay p {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 8px;
}

.gallery-tag {
    display: inline-block;
    padding: 3px 12px;
    background: rgba(230, 57, 70, 0.2);
    border: 1px solid rgba(230, 57, 70, 0.3);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.lightbox-content {
    max-width: 800px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-image {
    width: 100%;
    aspect-ratio: 16/10;
    background: var(--dark-3);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.lightbox-image::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(230,57,70,0.08), rgba(244,162,97,0.05));
}

.lightbox-image i {
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.5;
    position: relative;
    z-index: 1;
}

.lightbox-info h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--white-pure);
    margin-bottom: 5px;
}

.lightbox-info p {
    color: var(--gray);
    font-size: 0.95rem;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.lightbox-prev { left: 25px; }
.lightbox-next { right: 25px; }

/* --- Responsive Gallery --- */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 200px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }
    .gallery-item.large {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }
    .gallery-item.large {
        grid-column: span 1;
        grid-row: span 1;
    }
    .gallery-filters {
        gap: 6px;
    }
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.78rem;
    }
}
