body {
    margin-left: 8%;
    transition: margin-left 0.3s ease-out;
    background-color: #ffffff;
    color: #555555;
    font-family: "sofia-pro", sans-serif;
    font-weight: 300;
    font-style: normal;
}

body.nav-open {
    margin-left: 20%;
}

header {
    display: flex ;
    justify-content: center ;
    align-items: center ;
}

#menuButtonContainer {
    display: flex ;
    justify-content: center ;
    align-items: center ;
}

#menuButton {
    box-shadow: none; /* Remove box shadow */
    border: none; /* Remove border */
    background: #f0f0f0; /* Set a flat background color */
    text-shadow: none; /* Remove text shadow */
    margin-top: 5px;
    background-color: #22333b;
    color: #f2f4f3;
    width: 100px; /* Increase width */
    height: 50px; /* Increase height */
    font-size: 20px; /* Increase font size */
    padding: 10px; /* Increase padding */
    cursor: pointer;
}

#menuItems {
    color: #f2f4f3;
    transition: color 0.3s ease-out;
    line-height: 200%; /* double line spacing */
    text-align: center; /* right alignment */
    display: block; /* make the links block elements */
    text-decoration: none;
}

#menuItems a {
    text-decoration: none; /* remove underline */
}

nav {
    position: fixed ;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3% ;
    background-color: #22333b;
    padding: 1em;
    overflow: auto;
    z-index: 1;
    transition: width 0.3s ease-out;
}

nav.open {
    width: 15%;
}

nav a {
    opacity: 0;
    transition: opacity 0.3s ease-out, color 0.3s ease-out;
}

nav.open a {
    opacity: 1;
    color: #f2f4f3;
}

main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

article {
    margin: 20px; /* small margin on all sides */
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.15); /* shadow for a 3D effect */
    width: calc(95% - 40px); /* full width minus the left and right margins */
    padding: 20px; /* space between the border and the content */
    cursor: pointer;
}

article #articlecredit {
    font-size: 0.8em;
    color: #999999;
    text-align: right;
}

article #articlecredit a {
    font-size: 0.8em;
    color: #999999;
    text-align: right;
}

section {
    margin: 20px; /* small margin on all sides */
    width: calc(95% - 40px); /* full width minus the left and right margins */
    padding: 20px;
}

.image-container {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.image-container img {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%; /* make the image take up the full width of the article */
    height: auto; /* keep the original aspect ratio of the image */
    transform: translateY(-50%);
}

.card-image-container {
    position: relative;
    height: 250px;
    width: 100%;
    overflow: hidden;
}

.card-image {
    position: absolute;
    top: 50%;
    left: 0;
    width: 500px; /* make the image take up the full width of the article */
    height: auto; /* keep the original aspect ratio of the image */
    transform: translateY(-50%);
    transform: translateX(-50%);
}

#archive {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

#archive .card {
    position: relative;
    justify-content: center;
    align-items: center;
    flex: 0 0 20%; /* 33.33% for 3 items per row, 20px for margin */
    max-width: 20%; /* 33.33% for 3 items per row, 20px for margin */
    margin: 10px; /* Adjust as needed */
    overflow: hidden; /* Add this line */
    cursor: pointer;
}

#archive .card img {
    position: absolute;
    left: 50%;
    top: 0; /* Add this line */
    transform: translateX(-50%);
}

.card {
    padding: 20px;
    margin-bottom: 50px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.15); /* shadow for a 3D effect */
}

.credit {
    font-size: 0.8em;
    color: #999999;
    text-align: right;
}

@media screen and (max-width: 600px) {
    header {
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    body {
        margin-left: 15%;
    }
    nav {
        width: 5%;
    }
    nav.open {
        width: 100%;
    }
    .image-container {
        position: relative;
        height: 200px;
        overflow: hidden;
    }
    .image-container img {
        position: absolute;
        top: 50%;
        left: 0;
        /*width: 100%; /* make the image take up the full width of the article */
        /*height: auto; /* keep the original aspect ratio of the image */
        transform: translateY(-50%);
    }
    .card-image-container {
        position: relative;
        height: 200px;
        width: 100%;
        overflow: hidden;
    }
    .card .credit {
        display: block;
    }
    #archive {
        flex-direction: column;
        width: 100%;
    }
    #archive .card {
        position: relative;
        max-width: 75%; /* 33.33% for 3 items per row, 20px for margin */
        margin: 20px 0px;
        padding-top: 10px;
    }
    .card {
        display: flex;
        flex-direction: column;
    }
    section {
        padding: 0px;
    }
    article {
        width: 75%;
    }
    article img {
        position: absolute;
        left: 50%;
        top: 0; /* Add this line */
        transform: translateX(-50%);
    }
}

@media screen and (max-width: 450px) {
    header {
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    body {
        margin-left: 15%;
    }
    nav {
        width: 5%;
    }
    nav.open {
        width: 100%;
    }
    .image-container {
        position: relative;
        height: 200px;
        overflow: hidden;
    }
    
    .image-container img {
        position: absolute;
        top: 50%;
        left: 0;
        /*width: 100%; /* make the image take up the full width of the article */
        /*height: auto; /* keep the original aspect ratio of the image */
        transform: translateY(-50%);
    }
    .card-image-container {
        position: relative;
        height: 200px;
        width: 100%;
        overflow: hidden;
    }
    .card .credit {
        display: block;
    }
    #archive {
        flex-direction: column;
        width: 100%;
    }
    #archive .card {
        position: relative;
        max-width: 75%; /* 33.33% for 3 items per row, 20px for margin */
        margin: 20px 0px;
        padding-top: 10px;
    }
    .card {
        display: flex;
        flex-direction: column;
    }
    section {
        padding: 0px;
    }
    article {
        width: 75%;
    }
    article img {
        position: absolute;
        left: 50%;
        top: 0; /* Add this line */
        transform: translateX(-50%);
    }
}