body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
img {
    max-width: 100%
}
header {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1em 0;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 80%;
    margin: auto
}

.flex-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
    padding: 2em;
    max-width: 1200px; /* Optional: set a max width for better control */
    margin: 0 auto; /* Center the container */
}

.flex-item {
    flex: 1 1 calc(33.333% - 1em); /* Three items per row, accounting for gap */
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-item img {
    max-width: 100%;
    height: auto;
    display: block;
}
/* Center the items in the second row */
.flex-container > .flex-item:nth-child(4),
.flex-container > .flex-item:nth-child(5) {
    flex: 1 1 calc(50% - 1em); /* Two items centered in the row */
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1em 0;
}
footer a {
    color: white
}
/* Responsive layout for mobile */
@media (max-width: 768px) {
    .flex-item {
        flex: 1 1 calc(50% - 1em); /* Two items per row on mobile */
    }
    main {
        max-width: 100%;
    }
    .flex-container > .flex-item:nth-child(4),
    .flex-container > .flex-item:nth-child(5) {
        flex: 1 1 calc(50% - 1em); /* Two items per row on mobile */
    }
}
