/* Gallery Page Styles */
/* Mobile-First, Performance Optimized */

/* Gallery Hero Section */
.gallery-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hero);
    backdrop-filter: blur(1px);
}

.hero-content {
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: var(--space-8) var(--space-4);
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: var(--space-6);
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: var(--text-lg);
    line-height: 1.7;
    margin-bottom: var(--space-8);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-8);
    margin-top: var(--space-12);
}

.stat-item {
    text-align: center;
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-gold);
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    font-size: var(--text-4xl);
    font-weight: 800;
    color: var(--primary-gold);
    margin-bottom: var(--space-2);
    font-family: var(--font-heading);
}

.stat-label {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Gallery Filter Section */
.gallery-filter-section {
    padding: var(--space-16) 0 var(--space-8);
    background: var(--gray-50);
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.filter-btn {
    padding: var(--space-3) var(--space-6);
    border: 2px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-700);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-btn:hover {
    border-color: var(--primary-gold);
    background: rgba(255, 215, 0, 0.1);
    color: var(--gray-900);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border-color: var(--primary-gold);
    color: var(--black);
    box-shadow: var(--shadow-gold);
}

@media (max-width: 640px) {
    .filter-controls {
        gap: var(--space-2);
    }
    
    .filter-btn {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-xs);
    }
}

/* Gallery Grid Section */
.gallery-grid-section {
    padding: var(--space-8) 0 var(--space-24);
    background: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-16);
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

@media (max-width: 400px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
}

.gallery-item {
    opacity: 1;
    transform: translateY(0);
    transition: var(--transition);
}

.gallery-item.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.gallery-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: 2px solid transparent;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-gold);
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition-slow);
}

.gallery-card:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(2px);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: var(--white);
    padding: var(--space-6);
}

.overlay-content h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--white);
}

.overlay-content p {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-4);
}

.view-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: var(--gradient-primary);
    color: var(--black);
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.gallery-info {
    padding: var(--space-6);
}

.gallery-category {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: rgba(255, 215, 0, 0.1);
    color: var(--deep-gold);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.gallery-info h4 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0;
}

/* Load More Section */
.load-more-section {
    text-align: center;
    padding-top: var(--space-8);
}

.load-more-btn {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

/* Gallery CTA Section */
.gallery-cta-section {
    padding: var(--space-24) 0;
    background: var(--gradient-dark);
    color: var(--white);
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-text h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-6);
    color: var(--white);
}

.cta-text p {
    font-size: var(--text-lg);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
}

.cta-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.lightbox.active {
    display: flex;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    background: var(--white);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 400px;
    box-shadow: var(--shadow-2xl);
}

@media (max-width: 968px) {
    .lightbox-content {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
}

@media (max-width: 640px) {
    .lightbox-content {
        margin: var(--space-4);
        max-height: calc(100vh - 2rem);
    }
}

.lightbox-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: var(--radius-full);
    color: var(--white);
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.lightbox-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: var(--gray-100);
}

@media (max-width: 968px) {
    .lightbox-image-container {
        height: 300px;
    }
}

.lightbox-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.lightbox-info {
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--white);
}

@media (max-width: 968px) {
    .lightbox-info {
        padding: var(--space-6);
    }
}

.lightbox-info h3 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-4);
}

.lightbox-info p {
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--gray-600);
    margin-bottom: var(--space-6);
}

/* Animation Classes for Filter */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

.gallery-item.filtering {
    animation: fadeOut 0.3s ease-out forwards;
}

.gallery-item.showing {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Loading Animation */
.gallery-loading {
    text-align: center;
    padding: var(--space-16);
}

.loading-spinner-gallery {
    width: 50px;
    height: 50px;
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-4);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .gallery-card,
    .gallery-image img,
    .gallery-overlay,
    .lightbox-close {
        transition: none;
    }
    
    .gallery-item.filtering,
    .gallery-item.showing {
        animation: none;
    }
    
    .loading-spinner-gallery {
        animation: none;
    }
}

/* Focus States */
.filter-btn:focus,
.view-btn:focus,
.lightbox-close:focus {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .gallery-hero,
    .gallery-filter-section,
    .lightbox,
    .gallery-cta-section {
        display: none;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-overlay {
        display: none;
    }
}