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

/* Theme Support */
[data-theme="dark"] body {
    background: #0f0f23;
    color: #ffffff;
}

[data-theme="light"] body {
    background: #ffffff;
    color: #2c3e50;
}

[data-theme="dark"] .footer-section {
    background: #1a1a2e;
    color: #ffffff;
}

[data-theme="light"] .footer-section {
    background: #f8f9fa;
    color: #2c3e50;
}

/* Gallery Hero Section */
.gallery-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--space-blue), var(--cosmic-purple));
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    color: var(--star-white);
}

.stat-number {
    display: block;
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-color), var(--neon-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Filter Section */
.filter-section {
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.filter-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: var(--star-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

/* Gallery Grid */
.gallery-grid-section {
    background: var(--bg-primary);
    min-height: 100vh;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    transition: var(--transition);
}

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

.gallery-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 400px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: var(--transition-slow);
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.gallery-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.gallery-card:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: var(--star-white);
    padding: 2rem;
    transform: translateY(100%);
    transition: var(--transition);
}

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

.gallery-info h4 {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.gallery-info p {
    margin-bottom: 1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.gallery-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.gallery-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    opacity: 0.8;
}

.gallery-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
}

.action-btn:hover {
    background: var(--accent-color);
    color: var(--star-white);
    transform: scale(1.1);
}

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

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

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--accent-color);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--star-white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.lightbox-image-container {
    position: relative;
}

#lightboxImage {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.lightbox-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.lightbox-nav {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--star-white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    pointer-events: all;
}

.lightbox-nav:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.lightbox-info {
    padding: 2rem;
    color: var(--text-primary);
}

.lightbox-info h3 {
    font-family: var(--font-primary);
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.lightbox-info p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Load More Animation */
#loadMoreBtn {
    position: relative;
    overflow: hidden;
}

#loadMoreBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#loadMoreBtn:hover::before {
    left: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .filter-controls {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-card {
        height: 350px;
    }
    
    .gallery-overlay {
        padding: 1.5rem;
    }
    
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .lightbox-info {
        padding: 1.5rem;
    }
    
    .lightbox-navigation {
        padding: 0 10px;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .gallery-card {
        height: 300px;
    }
    
    .gallery-card img {
        height: 200px;
    }
    
    .gallery-overlay {
        padding: 1rem;
    }
    
    .gallery-info h4 {
        font-size: 1.1rem;
    }
    
    .gallery-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Animation Classes */
.gallery-item.animate-in {
    animation: slideInUp 0.6s ease-out;
}

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

/* Filter Animation */
.gallery-item.filter-out {
    animation: filterOut 0.3s ease-in forwards;
}

.gallery-item.filter-in {
    animation: filterIn 0.3s ease-out forwards;
}

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

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

/* Loading State */
.gallery-item.loading {
    opacity: 0.5;
    pointer-events: none;
}

.gallery-item.loading img {
    filter: blur(2px);
}

/* Image Lazy Loading */
.gallery-card img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card img[loading="lazy"].loaded {
    opacity: 1;
}
