﻿/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a202c;
}

/* Gallery Specific Styles */
.gallery-container {
    padding: 15px; /* Reduced padding for tighter layout */
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(180deg, #e0f2f7, #f9fafb);
    animation: fadeIn 0.8s ease 0.2s backwards; /* Delayed fade-in */
}

    .gallery-container h2 {
        font-size: 2.8rem;
        font-weight: 700;
        color: #065f46;
        text-align: center;
        margin-bottom: 25px;
        position: relative;
        text-transform: uppercase;
    }

        .gallery-container h2::after {
            content: '';
            width: 70px;
            height: 5px;
            background: linear-gradient(90deg, #dc4f2c, #f97316);
            position: absolute;
            bottom: -12px;
            left: 50%;
            transform: translateX(-50%);
            transition: width 0.4s ease;
        }

        .gallery-container h2:hover::after {
            width: 90px;
        }

.gallery-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Reduced gap for better spacing */
}

.gallery-col {
    flex: 0 0 32%; /* Fixed 3 columns, each 32% to account for gap */
    max-width: 32%;
}

.gallery-card {
    border: 3px solid #065f46;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    animation: slideUp 0.6s ease backwards;
    animation-delay: calc(0.15s * var(--i, 0));
}

    .gallery-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 25px rgba(6, 95, 70, 0.25);
        background: linear-gradient(135deg, #fef5f1, #fff);
    }

.gallery-img {
    width: 100%;
    height: 250px; /* Slightly increased for better view */
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-img {
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 991px) {
    .gallery-col {
        flex: 0 0 49%; /* 2 columns on tablet */
        max-width: 49%;
    }

    .gallery-container h2 {
        font-size: 2.4rem;
    }

    .gallery-img {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .gallery-container {
        padding: 10px;
    }

    .gallery-col {
        flex: 0 0 100%; /* 1 column on mobile */
        max-width: 100%;
    }

    .gallery-container h2 {
        font-size: 2rem;
    }

        .gallery-container h2::after {
            width: 50px;
        }

    .gallery-img {
        height: 180px;
    }
    /* Touch-friendly hover replacement */
    .gallery-card:active {
        transform: translateY(-8px);
        box-shadow: 0 12px 25px rgba(6, 95, 70, 0.25);
    }

        .gallery-card:active .gallery-img {
            transform: scale(1.1);
        }
}
