/* ============================================
   GALLERY HERO SECTION
   ============================================ */
.gallery-hero {
    padding: 180px 0 80px;
    background: var(--gradient-primary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-overlay);
    z-index: 1;
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
}

.gallery-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    color: var(--text-white);
    margin-bottom: 1rem;
    letter-spacing: -2px;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 0 30px rgba(255, 140, 66, 0.3);
}

.gallery-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   GALLERY SECTION
   ============================================ */
.gallery-section {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-white);
    min-height: 60vh;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 2rem;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 4 / 3;
    cursor: pointer;
    background: var(--bg-gray);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
    filter: brightness(0.95);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
    filter: brightness(1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.gallery-actions {
    display: flex;
    gap: 1rem;
    transform: translateY(20px);
    transition: var(--transition);
}

.gallery-item:hover .gallery-actions {
    transform: translateY(0);
}

.gallery-zoom {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.gallery-zoom:hover {
    background: var(--accent-color);
    color: var(--text-white);
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.gallery-zoom svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

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

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-2xl);
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-info {
    margin-top: 1rem;
    color: var(--text-white);
    text-align: center;
}

.lightbox-counter {
    font-size: 0.9rem;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10001;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.lightbox-close {
    top: 2rem;
    right: 2rem;
}

.lightbox-prev {
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   GALLERY LOADING STATE
   ============================================ */
.gallery-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    color: var(--text-gray);
    font-size: 1.1rem;
}

.gallery-loading::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 140, 66, 0.2);
    border-top-color: var(--accent-color);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
    margin-left: 1rem;
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-gray);
}

.gallery-empty p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.gallery-empty code {
    background: var(--bg-gray);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    color: var(--accent-color);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   RESPONSIVE GALLERY
   ============================================ */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .gallery-hero {
        padding: 120px 0 60px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev {
        left: 1rem;
    }
    
    .lightbox-next {
        right: 1rem;
    }
    
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-item {
        aspect-ratio: 16 / 9;
    }
}

/* ============================================
   GALLERY ANIMATIONS
   ============================================ */
.gallery-item {
    animation: galleryFadeIn 0.6s ease forwards;
    opacity: 0;
}

@keyframes galleryFadeIn {
    to {
        opacity: 1;
    }
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }

