/* Modern Gallery Styles */
.gallery-modern {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.section-header-modern {
    text-align: center;
    margin-bottom: 50px;
}

.section-header-modern h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 15px;
}

.section-header-modern p {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.gallery-categories {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover,
.category-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.gallery-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.gallery-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.gallery-card:hover .card-image img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.3));
    padding: 30px 20px 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.gallery-card:hover .image-overlay {
    opacity: 1;
    transform: translateY(0);
}

.overlay-content h4 {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.overlay-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin: 0;
}

/* Gallery Stats */
.gallery-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.gallery-stat {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.gallery-stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

/* Filter Animation */
.gallery-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.gallery-card.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Image Modal Enhancement */
.gallery-modal {
    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;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gallery-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content-gallery {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-modal.active .modal-content-gallery {
    transform: scale(1);
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.modal-info {
    padding: 20px;
    text-align: center;
}

.modal-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.modal-info p {
    color: #64748b;
    font-size: 1rem;
}

.modal-close-gallery {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.modal-close-gallery:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-modern {
        padding: 60px 0;
    }
    
    .section-header-modern h2 {
        font-size: 2rem;
    }
    
    .gallery-grid-modern {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-categories {
        gap: 10px;
    }
    
    .category-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .gallery-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-stat {
        padding: 20px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .card-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .gallery-grid-modern {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-card {
        margin: 0 10px;
    }
    
    .section-header-modern h2 {
        font-size: 1.8rem;
    }
    
    .gallery-categories {
        padding: 0 20px;
    }
}

/* Loading Animation */
@keyframes galleryFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-card {
    animation: galleryFadeIn 0.6s ease forwards;
}

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