/* ========================================
   Gallery Page Styles
   ======================================== */

/* Gallery Hero */
.gallery-hero {
    padding: calc(var(--spacing-3xl) + 80px) 0 var(--spacing-3xl);
    background: linear-gradient(135deg, #2563eb 0%, #ea580c 100%);
    color: var(--white);
    text-align: center;
}

.hero-content-center {
    max-width: 800px;
    margin: 0 auto;
}

.gallery-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--white);
    margin-bottom: var(--spacing-md);
}

.gallery-hero p {
    font-size: 1.25rem;
    opacity: 0.95;
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-2xl);
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-xl);
    border: 2px solid var(--gray-300);
    background: var(--white);
    border-radius: var(--radius-full);
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-base);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-btn.active {
    background: linear-gradient(135deg, #2563eb 0%, #ea580c 100%);
    border-color: #ea580c;
    color: var(--white);
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.3);
}

.filter-btn i {
    font-size: 1.125rem;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--white);
}

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

.gallery-item-media {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    background: var(--gray-100);
}

.gallery-item-media img,
.gallery-item-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover .gallery-item-media img,
.gallery-item:hover .gallery-item-media video {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    padding: var(--spacing-md);
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

.gallery-item-info h3 {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xs);
}

.gallery-item-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    margin: 0;
}

.gallery-item-type {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #2563eb;
    box-shadow: var(--shadow-lg);
}

.gallery-item-type.video {
    color: #ea580c;
}

/* Loading & Empty States */
.loading-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-3xl);
    color: var(--gray-500);
}

.loading-container i {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    color: #ea580c;
}

.empty-gallery {
    text-align: center;
    padding: var(--spacing-3xl);
    color: var(--gray-500);
}

.empty-gallery i {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    color: var(--gray-400);
}

.empty-gallery h3 {
    color: var(--gray-700);
    margin-bottom: var(--spacing-sm);
}

/* Gallery CTA */
.gallery-cta {
    background: linear-gradient(135deg, #2563eb 0%, #ea580c 100%);
    color: var(--white);
    text-align: center;
    padding: var(--spacing-3xl) 0;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: var(--spacing-md);
}

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    padding: var(--spacing-lg);
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    border: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lightbox-prev {
    left: var(--spacing-md);
}

.lightbox-next {
    right: var(--spacing-md);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    max-height: calc(90vh - 150px);
}

.lightbox-body img {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
}

.lightbox-body video {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
}

.lightbox-body iframe {
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
}

.lightbox-caption {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    color: var(--white);
    text-align: center;
}

.lightbox-caption h3 {
    color: var(--white);
    margin-bottom: var(--spacing-xs);
}

.lightbox-caption p {
    margin: 0;
    opacity: 0.9;
}

/* Video Embed Container */
.video-embed-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: var(--spacing-md);
    }

    .gallery-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        justify-content: center;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .lightbox-prev {
        left: var(--spacing-xs);
    }

    .lightbox-next {
        right: var(--spacing-xs);
    }

    .lightbox-caption {
        padding: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-hero {
        padding: calc(var(--spacing-2xl) + 80px) 0 var(--spacing-2xl);
    }

    .lightbox {
        padding: var(--spacing-sm);
    }

    .lightbox-close {
        top: 0;
        right: 0;
    }
}