/**
 * VOLTAGE BRIGHT - Gallery Page Styles
 * Extracted from gallery.html for centralized CSS management
 */

/* ========================================
   GALLERY HERO
   ======================================== */
.gallery-hero {
    padding: 120px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, rgba(0,255,255,0.05) 0%, transparent 100%);
}

.gallery-hero h1 {
    font-family: 'Tajawal', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

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

.gallery-hero .stat-item {
    text-align: center;
}

.gallery-hero .stat-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00FFFF, #FF00FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gallery-hero .stat-label {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

/* ========================================
   GALLERY FILTERS
   ======================================== */
.gallery-filters {
    position: sticky;
    top: 70px;
    z-index: 100;
    background: rgba(10,10,15,0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,255,255,0.1);
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(0,255,255,0.2);
    border-radius: 30px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
}

.category-btn:hover {
    background: rgba(0,255,255,0.1);
    border-color: #00FFFF;
}

.category-btn.active {
    background: linear-gradient(135deg, rgba(0,255,255,0.2), rgba(255,0,255,0.2));
    border-color: #00FFFF;
    box-shadow: 0 0 20px rgba(0,255,255,0.3);
}

/* ========================================
   GALLERY SECTION & GRID
   ======================================== */
.gallery-section {
    padding: 3rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.project-section {
    margin-bottom: 4rem;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,255,255,0.2);
}

.project-header h2 {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.project-header .image-count {
    background: linear-gradient(135deg, #00FFFF, #FF00FF);
    color: #0a0a0f;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-header .category-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(255,0,255,0.2);
    border: 1px solid rgba(255,0,255,0.4);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #FF00FF;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

/* ========================================
   IMAGE ITEMS
   ======================================== */
.image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(0,255,255,0.1);
    transition: all 0.3s ease;
}

.image-item:hover {
    transform: scale(1.02);
    border-color: #00FFFF;
    box-shadow: 0 10px 40px rgba(0,255,255,0.2);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.image-item:hover img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

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

.zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 50px;
    height: 50px;
    background: rgba(0,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.image-item:hover .zoom-icon {
    transform: translate(-50%, -50%) scale(1);
}

.zoom-icon svg {
    width: 24px;
    height: 24px;
    stroke: #0a0a0f;
}

/* ========================================
   LIGHTBOX
   ======================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

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

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,255,255,0.2);
    border: 1px solid #00FFFF;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(0,255,255,0.4);
}

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

.lightbox-info {
    text-align: center;
    margin-top: 1rem;
    color: rgba(255,255,255,0.7);
}

/* ========================================
   BACK LINK
   ======================================== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #00FFFF;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #FF00FF;
}

/* ========================================
   LOADING STATE
   ======================================== */
.image-item.loading {
    background: linear-gradient(90deg, rgba(0,255,255,0.1) 0%, rgba(255,0,255,0.1) 50%, rgba(0,255,255,0.1) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   CATEGORY VISIBILITY
   ======================================== */
.project-section[data-category] {
    display: block;
}

.project-section.hidden {
    display: none;
}

/* Gallery Loading Message */
.gallery-loading-message {
    color: rgba(255,255,255,0.5);
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
}

/* ========================================
   RESPONSIVE - GALLERY
   ======================================== */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

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

    .gallery-hero .stats-bar {
        gap: 1.5rem;
    }

    .gallery-hero .stat-number {
        font-size: 1.8rem;
    }
}
