/* Gallery Hero Section */
.gallery-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
    margin-top: 73px;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="hero-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23hero-pattern)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.gallery-hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.gallery-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.gallery-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.gallery-stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Gallery Section Styles */
.gallery-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gallery-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Gallery Carousel */
.gallery-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
}

.gallery-track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.gallery-slide {
    flex: 0 0 33.333%;
    padding: 0 0.5rem;
    box-sizing: border-box;
    opacity: 0.6;
    transform: scale(0.9);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-slide.center {
    opacity: 1;
    transform: scale(1.1);
    z-index: 2;
}

.gallery-slide.left {
    transform: scale(0.9) translateX(-10px);
}

.gallery-slide.right {
    transform: scale(0.9) translateX(10px);
}

.gallery-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.gallery-slide.center .gallery-image {
    box-shadow: var(--shadow-2xl);
    border: 3px solid var(--primary);
}

.gallery-slide:hover .gallery-image {
    transform: scale(1.02);
}

/* Navigation Buttons */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);    
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    transition: all var(--transition-base);
    z-index: 3;
    box-shadow: var(--shadow);
}

.gallery-nav:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.gallery-nav.prev {
    left: 1rem;
}

.gallery-nav.next {
    right: 1rem;
}

/* Indicators */
.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.gallery-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all var(--transition-base);
}

.gallery-indicator.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* Visit Gallery Button */
.visit-gallery-section {
    text-align: center;
    margin-top: 3rem;
}

.visit-gallery-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-glow);
}

.visit-gallery-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.visit-gallery-btn i {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-hero {
        padding: 4rem 0 3rem;
    }

    .gallery-hero-title {
        font-size: 2.5rem;
    }

    .gallery-hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .gallery-stats {
        gap: 2rem;
        flex-wrap: wrap;
    }

    .stat-number {
        font-size: 2rem;
    }

    .gallery-title {
        font-size: 2rem;
    }

    .gallery-slide {
        flex: 0 0 50%;
    }

    .gallery-slide.center {
        transform: scale(1.05);
    }

    .gallery-image {
        height: 250px;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .gallery-nav.prev {
        left: 0.5rem;
    }

    .gallery-nav.next {
        right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        padding: 3rem 0 2rem;
    }

    .gallery-hero-title {
        font-size: 2rem;
    }

    .gallery-hero-subtitle {
        font-size: 1rem;
    }

    .gallery-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    .gallery-section {
        padding: 2rem 0;
    }

    .gallery-container {
        padding: 0 1rem;
    }

    .gallery-slide {
        flex: 0 0 100%;
        padding: 0 0.25rem;
    }

    .gallery-slide.center {
        transform: scale(1);
    }

    .gallery-image {
        height: 200px;
    }

    .gallery-nav {
        display: none; /* Hide nav buttons on mobile, use touch/swipe */
    }

    .visit-gallery-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Loading State */
.gallery-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    flex-direction: column;
    color: var(--text-muted);
}

.gallery-loading i {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Images State */
.gallery-no-images {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    flex-direction: column;
    color: var(--text-muted);
    text-align: center;
}

.gallery-no-images i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.gallery-no-images h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* Gallery Modal Styles */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gallery-modal.active {
    opacity: 1;
    visibility: visible;
}

.gallery-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);    
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.gallery-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    margin: 5vh auto;
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.gallery-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 10;
    transition: all var(--transition-base);
}

.gallery-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.gallery-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 10;
    transition: all var(--transition-base);
}

.gallery-modal-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.gallery-modal-prev {
    left: 20px;
}

.gallery-modal-next {
    right: 20px;
}

.gallery-modal-image-container {
    position: relative;
    width: 100%;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

#galleryModalImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-lg);
}

.gallery-modal-thumbnails {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    opacity: 0.7;
    transition: opacity var(--transition-base);
}

.gallery-modal-thumbnails:hover {
    opacity: 1;
}

.gallery-modal-thumbnails > div {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-base);
}

.gallery-modal-thumbnails > div:hover {
    border-color: var(--primary);
    transform: scale(1.1);
}

.gallery-modal-thumbnails img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-modal-current-thumb {
    border-color: var(--primary);
    transform: scale(1.2);
}

.gallery-modal-caption {
    padding: 20px;
    text-align: center;
    background: white;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text);
}

/* Responsive Gallery Modal */
@media (max-width: 768px) {
    .gallery-modal-content {
        width: 95%;
        margin: 2.5vh auto;
        max-height: 95vh;
    }

    .gallery-modal-image-container {
        height: 60vh;
    }

    .gallery-modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .gallery-modal-prev {
        left: 10px;
    }

    .gallery-modal-next {
        right: 10px;
    }

    .gallery-modal-thumbnails {
        bottom: 10px;
        gap: 5px;
    }

    .gallery-modal-thumbnails > div {
        width: 40px;
        height: 40px;
    }

    .gallery-modal-current-thumb {
        transform: scale(1.1);
    }

    .gallery-modal-caption {
        padding: 15px;
        font-size: 1rem;
    }
}
