body {
    background-color: #f0f0f0; /* Light grey background */
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure body takes up full viewport height */
}

header {
    background-color: rgb(76, 187, 23);
    color: #fff;
    padding: 10px 20px; /* Reduce padding for a smaller header */
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo h1 {
    margin: 10;
    font-size: 24px; /* Adjust logo text size */
}

header nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

header nav a {
    color: black;
    background-color: aliceblue;
    text-decoration: none;
    padding: 10px 20px; /* Create space around the links */
    font-size: 18px; /* Increase text size */
    border: 2px solid transparent; /* Initial border for button effect */
    border-radius: 5px; /* Rounded corners */
    transition: background-color 0.3s, color 0.3s; /* Smooth transition */
}

header nav a:hover {
    background-color: red;
    color: aliceblue; /* Opposite color effect on hover */
    border-color: #f0f0f0; /* Border matches background */
    transform: scale(1.1);
}

.h1 {
    font-size: 22px;
    font-family: 'Times New Roman', Times, serif;
    text-align: center;
    color: rgb(34, 176, 15);
    margin: 20px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    padding: 0;
    max-width: 1000px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    width: 100%; /* Full width to adjust in grid */
    height: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Consistent shadow for all cards */
    background-color: transparent;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    transition: transform 0.3s ease;
    background-color: transparent;
    object-fit: cover;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
}

.overlay .text a {
    color: #fff; /* Ensure links have the same color */
    text-decoration: none; /* Remove underline from links */
    font-size: 1.5em; /* Increase font size for links */
}

.overlay .text a:hover {
    color: blue;
    transform: scale(1.5);
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 90%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    padding-top: 60px;
    color: aliceblue;
}

.modal-content {
    position: relative;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    margin: auto;
    color: aliceblue;
}

footer {
    background-color: rgb(76, 187, 23); /* Matching header color */
    color: #fff;
    padding: 10px;
    text-align: center;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1); /* Soft shadow */
    margin-top: auto;
}

.neon {
    text-shadow: 0 0 10px white, 0 0 20px white, 0 0 20px red;
}

.active {
    color: red;
}

/* Responsive Design */
@media (max-width: 768px) {
    header nav ul {
        flex-direction: row;
        align-items: center;
    }

    header nav ul li {
        margin-bottom: 25px;
    }

    header nav a {
        padding: 6px 12px;
        font-size: 14px;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    header nav ul li a {
        padding: 8px 10px; /* Reduce padding for smaller screens */
    }

    .gallery-item {
        margin: 5px;
    }

    .gallery {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 10px;
        padding: 0;
        max-width: 250px;
        margin: 0 auto;
    }

    .gallery-item {
        position: relative;
        overflow: hidden;
        cursor: pointer;
        width: 100%; /* Full width to adjust in grid */
        height: auto;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Consistent shadow for all cards */
        background-color: transparent;
        flex-wrap: wrap;
    }

    .gallery-item img {
        width: 100%;
        height: auto;
        display:flex;
        border-radius: 10px;
        transition: transform 0.3s ease;
        background-color: transparent;
        object-fit:cover;
        flex-wrap: wrap;
    }

    .h1 {
        font-size: 20px;
        margin: 15px;
    }

}

@media (max-width: 480px) {
    
    header nav a {
        padding: 6px 12px;
        font-size: 14px;
        margin-bottom: auto;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        margin: 5px;
    }

    .h1 {
        font-size: 18px;
        margin: 10px;
    }
}
