body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #333;
    color: white;
    padding: 10px 0;
    text-align: center;
}

nav a {
    margin: 0 15px;
    color: white;
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline;
}

section {
    padding: 20px;
    background-color: white;
    margin: 20px;
    border-radius: 5px;
}

button {
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
}

button:hover {
    background-color: #555;
}

.image-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;  /* spacing between images */
}

.image-container img {
    width: 250px;
    height: 250px;
    object-fit: cover;  /* maintain aspect ratio while filling the dimension */
    border: 3px solid #f0f0f0;
    border-radius: 10px;
    transition: transform 0.3s;  /* smooth zoom effect */
    cursor: pointer;
}

.image-container img:hover {
    transform: scale(1.1);  /* zoom in effect on hover */
}

/* Modal styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
    animation-name: fadeIn;
    animation-duration: 0.5s;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 95%; /* Slightly less than the window width */
    max-height: 80vh; /* Slightly less than the window height */
    animation-name: fadeIn;
    animation-duration: 0.5s;
    cursor: pointer;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    animation-name: fadeIn;
    animation-duration: 0.5s;
}

.close:hover, .close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Animation for modal appearance */
@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes fadeOut {
    from {opacity: 1;}
    to {opacity: 0;}
}

.fadeOutAnimation {
    animation-name: fadeOut;
    animation-duration: 0.5s;
    animation-fill-mode: forwards;
}
