/* CSS for starter page */

html { 
    font-size: 14px;
}

body {
    font-family: Arial, sans-serif;
    background-color: blue;
    margin: 0;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#upload-section {
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
}

#upload-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#upload-form input,
#upload-form textarea,
#upload-form button {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
#posts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center the post divs horizontally */
    gap: 10px;
}

.post {
    flex: 1 1 auto;
    width: 100%;
    max-width: 300px;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

/*
#posts {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
}

.post {
    flex: 1 1 auto;
    width: 100%;
    max-width: 300px;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}
*/
.post img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.post p {
    font-size: 14px;
    color: #555;
}

label {
    font-size: 1.4em;
}

#container {
    position: relative;
    top: 12px;
    width: 100%;
    max-width: 1040px;
    margin: 0px auto;
    background: #fff;
    padding: 2em;
    border: 1px solid gray;
    border-radius: 3em;
}

a {
    color: maroon;
    text-decoration: none;
}

a:hover {
    color: gray;
}

h1 { font-size: 2.5em; } 
h2 { font-size: 2em; } 
h3 { font-size: 1.75em; } 
h4 { font-size: 1.5em; }

* {
    box-sizing: border-box;
}

.nav {
    position: absolute;
    top: 0px;
    left: 50%; 
    transform: translateX(-50%);
    width: 100%;
    max-width: 900px;
    display: flex;
    background: #37474F;
    flex-wrap: wrap;
    margin: 0px auto;
    padding: .4em 2em;
    color: #fff;
    justify-content: space-between;
    z-index: 10000;
}

.nav a {
    color: #fff;
}

.left-nav { text-align: left; } 
.right-nav { text-align: right; font-style: italic; }

.return-mes {
    font-size: 18px;
    color: brown;
    font-weight: normal;
    padding-left: 30px;
}

.flex-container {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    margin: 0px auto;
    padding: 2em;
    border: 1px solid gray;
    border-radius: 3em;
    background: #fff;
}

.flex-nav {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    margin: 0px auto;
    background: #fff;
    text-align: center;
    justify-content: center;
    align-items: center;
}

.div-left {
    flex: 1 1 25%;
}

.div-right {
    flex: 1 1 75%;
    padding: 10px;
}

a {
    color: maroon;
    text-decoration: none;
}

a:hover {
    color: gray;
}

.responsive {
    width: 100%;
    height: auto;
}

.button {
    padding: 5px 20px;
    background-color: #2E5370;
    color: white;
    border: 1px solid gray;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
}

.button:hover {
    background-color: #33b5e5;
}

.hiddens {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border: 1px solid gray;
    border-radius: 2em;
    padding: 1em;
}

.close {
    cursor: pointer;
}

.close:hover {
    font-weight: bold;
}

.footer {
    width: 100%;
    margin: 0px auto;
    padding: 2em;
    color: white;
}

.mailto {
    position: relative; 
    height: 28px; 
    width: auto; 
    top: 6px; 
    left: 20px;
    cursor: pointer;
}

.mailto:hover {
    left: 30px;
}

.post img {
    cursor: pointer;
    max-width: 100%;
}

#lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
}

.nav {
    display: flex;
    justify-content: space-between;
    background-color: black;
    padding: 10px;
    color: white;
    border: 1px solid black;
    border-bottom-left-radius: 2em;
    border-bottom-right-radius: 2em;
}

.left-nav, .right-nav {
    display: flex;
    align-items: center;
}

.right-nav a {
    color: white;
    text-decoration: none;
    margin-left: 5px;
}

.left-nav a, .dropdown button {
    color: white;
    text-decoration: none;
    margin-right: 15px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 10px;
    background-color: black;
    text-transform: uppercase;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: black;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: grey;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-link {
    text-decoration: none;
    white-space: pre-line;
}

.post-lightbox {
    position: fixed;
    top: 22px;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    display: none;
    z-index: 2;
}

.post-lightbox-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    position: relative;
    overflow-y: auto;
    max-height: 85vh;
}

.post-lightbox-content h2 {
    margin-top: 0;
}

.close-post-lightbox {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: red;
}

@media screen and (max-width: 600px) {
    .div-right, .div-left {
        flex: 100%;
    }

    h2 {
        font-size: 1.5em;
    }

    .button {
        width: 80%;
        margin: .5em;
    }
}
