/* Extreme Enhanced Gallery Section */
.gallery-section {
    padding: 80px 40px;
    background: linear-gradient(135deg, #ffffff, #e0f7fa);
    text-align: center;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.1);
    border-radius: 0px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    perspective: 1000px;
}

.gallery-section::before,
.gallery-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(3, 169, 244, 0.3), transparent);
    animation: rotate-and-float 10s infinite ease-in-out;
}

.gallery-section::before {
    top: -100px;
    left: -100px;
    width: 200px;
    height: 200px;
}

.gallery-section::after {
    bottom: -120px;
    right: -120px;
    width: 250px;
    height: 250px;
}

.gallery-section h2 {
    font-size: 3.5rem;
    color: #ff9100;
    margin-bottom: 60px;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    animation: fade-in 1.2s ease-in-out;
    text-shadow: 4px 4px 10px rgba(0, 0, 0, 0.15);
}

.gallery-section h2::after {
    content: '';
    display: block;
    width: 140px;
    height: 6px;
    background: linear-gradient(to right, #0288d1, #0277bd);
    margin: 20px auto 0;
    border-radius: 15px;
    animation: grow-line 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    transform: translateY(30px);
    animation: fade-in-up 1.8s ease forwards;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.7s ease, 
                filter 0.4s ease;
    cursor: pointer;
    transform-origin: center;
}

.gallery-grid img:hover {
    transform: scale(1.2) rotate(0deg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    filter: brightness(1.3) contrast(1.2);
    outline: 5px solid rgba(33, 150, 243, 0.4);
    transition: transform 0.5s ease, filter 0.4s ease;
}

@keyframes rotate-and-float {
    0%, 100% {
        transform: rotate(0deg) translate(0, 0);
    }
    50% {
        transform: rotate(180deg) translate(20px, 20px);
    }
}

@keyframes fade-in {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes grow-line {
    0% {
        width: 0;
    }
    100% {
        width: 140px;
    }
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(80px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .gallery-section {
        padding: 50px 20px;
    }

    .gallery-section h2 {
        font-size: 3rem;
    }

    .gallery-grid {
        gap: 30px;
    }

    .gallery-grid img:hover {
        transform: scale(1.1) rotate(0deg);
    }
}

@media (max-width: 480px) {
    .gallery-section h2 {
        font-size: 2.2rem;
    }

    .gallery-grid {
        gap: 20px;
    }
}
