/* Gallery Section with Advanced Effects */
.gallery {
    padding: 100px 0;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="gBubble1" cx="50%" cy="50%"><stop offset="0%" stop-color="%238e4ec6" stop-opacity="0.05"/><stop offset="100%" stop-color="%238e4ec6" stop-opacity="0"/></radialGradient><radialGradient id="gBubble2" cx="50%" cy="50%"><stop offset="0%" stop-color="%23a968d4" stop-opacity="0.03"/><stop offset="100%" stop-color="%23a968d4" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="150" r="100" fill="url(%23gBubble1)"/><circle cx="800" cy="300" r="150" fill="url(%23gBubble2)"/><circle cx="300" cy="700" r="80" fill="url(%23gBubble1)"/><circle cx="900" cy="800" r="120" fill="url(%23gBubble2)"/></svg>');
    z-index: 0;
    animation: floatBubbles 30s ease-in-out infinite;
}

.gallery .container {
    position: relative;
    z-index: 1;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 50px 0;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark-purple);
    border: 2px solid var(--accent-purple);
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.4s ease;
    z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 0;
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--white);
    border-color: transparent;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(142, 78, 198, 0.3);
}

/* Enhanced Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin: 60px 0;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: var(--white);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-vibrant);
    background-size: 400% 400%;
    animation: gradientRotate 12s linear infinite;
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 25px 60px rgba(142, 78, 198, 0.3);
}

.gallery-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
    filter: brightness(0.8);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(142, 78, 198, 0.9), 
        rgba(169, 104, 212, 0.8),
        rgba(193, 154, 224, 0.7));
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-content {
    text-align: center;
    color: var(--white);
    padding: 30px;
    transform: translateY(30px);
    transition: all 0.6s ease 0.1s;
}

.gallery-item:hover .gallery-content {
    transform: translateY(0);
}

.gallery-content h3 {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.gallery-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.95;
}

.view-btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: var(--white);
    transform: scale(1.05);
}

.gallery-cta {
    text-align: center;
    margin-top: 60px;
    padding: 40px;
    background: var(--gradient-light);
    background-size: 300% 300%;
    animation: gradientShift 15s ease infinite;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.gallery-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-glow);
    opacity: 0.3;
    animation: pulse 8s ease-in-out infinite;
}

.gallery-cta p {
    font-size: 1.3rem;
    color: var(--dark-purple);
    margin-bottom: 25px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.gallery-cta .cta-primary {
    position: relative;
    z-index: 1;
    padding: 18px 40px;
    font-size: 1.2rem;
}

/* Gallery Responsive */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-filters {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .gallery-image {
        height: 200px;
    }
    
    .gallery-content {
        padding: 20px;
    }
    
    .gallery-content h3 {
        font-size: 1.2rem;
    }
}