/* Gallery Specific Styles */

/* Gallery Hero Section */
.gallery-hero {
    height: 60vh;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9)),
                url('https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=1200') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    margin-top: 70px;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.gallery-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.gallery-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

/* Gallery Categories */
.gallery-categories {
    padding: 3rem 0;
    background: #f8f9fa;
}

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* Main Gallery */
.main-gallery {
    padding: 4rem 0;
    background: white;
}

.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    height: 300px;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-info p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.category-tag {
    display: inline-block;
    background: #ff6b6b;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

/* Gallery Stats */
.gallery-stats {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 0.5rem;
    animation: countUp 2s ease-out;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Gallery CTA */
.gallery-cta {
    padding: 4rem 0;
    background: #f8f9fa;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    animation: zoomIn 0.3s ease;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-close:hover {
    background: rgba(255, 107, 107, 0.8);
    transform: scale(1.1);
}

.lightbox-caption {
    color: white;
    margin-top: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.lightbox-caption h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #ff6b6b;
}

.lightbox-caption p {
    opacity: 0.9;
    line-height: 1.6;
}

/* Navigation Controls */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background: rgba(255, 107, 107, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Filter Animation */
.gallery-item.hide {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.gallery-item.show {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Loading Animation */
.gallery-item.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-hero h1 {
        font-size: 2.5rem;
    }
    
    .gallery-hero p {
        font-size: 1rem;
    }
    
    .gallery-masonry {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-item {
        height: 250px;
    }
    
    .category-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .lightbox-close {
        top: -40px;
        font-size: 2rem;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        height: 50vh;
    }
    
    .gallery-hero h1 {
        font-size: 2rem;
    }
    
    .gallery-categories {
        padding: 2rem 0;
    }
    
    .main-gallery {
        padding: 2rem 0;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .gallery-overlay {
        padding: 1rem;
    }
    
    .gallery-info h3 {
        font-size: 1.1rem;
    }
    
    .gallery-info p {
        font-size: 0.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 1rem;
    }
}

/* Active navigation link */
.nav-link.active {
    color: #ff6b6b;
}

.nav-link.active::after {
    width: 100%;
}

/* Scroll to top button for gallery */
.scroll-to-top {
    position: fixed;
    bottom: 150px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

/* Image lazy loading effect */
.gallery-item img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item img.loaded {
    opacity: 1;
}

/* Category badge animation */
.category-tag {
    animation: slideInUp 0.5s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}