:root{
    --greenColor: #3A8A31;
    --greenHoverColor: #296323;
    --redColor: #8a3131;
    --redHoverColor: #632323;
    --errorColor: #ff2424;
}

@font-face {
    font-family: URWGothicSemiBold;
    src: url(fonts/urw_gothic_l_demi.ttf);
}

* {
    /* The font is already bold, this prevents */
    /* headings from becoming from becoming even thiccer. */
    font-weight: normal;
    box-sizing: border-box;
}

/*******************/
/* Root Containers */
html {
    width: 100%;
    overflow-x: hidden;
    overflow-y: scroll;

    min-height: 100%;
}

body {
    scrollbar-gutter: stable both-edges;

    margin: 0;
    padding: 0;

    min-height: 100vh;

    background-color: rgb(225, 224, 224);
    font-family: URWGothicSemiBold;
}

body > header {
    background-color: black;
}

body > nav {
    display: flex;
    flex-direction: row;
    justify-content: center;

    position: sticky;
    top: 0;
    width: 100%;
    border-bottom: 4px solid var(--greenColor);

    background-color: black;
    color: white;
}

main {
    width: 700px;
    max-width: 90%;
    margin: 0 auto 50px;
    padding-bottom: 2.5em;
}

body > footer {
    display: flex;
    justify-content: center;
    align-items: center;

    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 4px solid var(--greenColor);

    background-color: black;
    color: white;
    line-height: 140%;
    text-align: center;
}

body > footer > .sponsors {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    align-items: center;

    text-align: center;
    margin: 0;
    padding: 0;
    white-space: normal;
}

.sponsors img {
    height: 3em;
    max-width: 100%;
    max-height: 100%;
    margin: 0.75em 0.5em;
}

@media only screen and (max-width: 480px), only screen and (max-device-width: 480px) {
    main {
        width: 100vw;
        margin-bottom: 10em;
    }
    /* Header for mobile */
    body > nav > a {
        font-size: 14px;
    }
    /* Footer for mobile (included also a quick fix for footer growing to big on smaller devices) */
    body > footer {
        margin-top: 19.9em;
        flex-direction: column-reverse;
        text-align: center;
        position: relative;
        line-height: normal;
    }
    body > footer > p {
        font-size: 1rem;
        margin: 0.25em auto;
        flex-direction: column;

    }
    body > footer > .sponsors {
        flex-direction: row;
    }
    .sponsors img {
        height: 2em;
        margin: 1.5em 0.5em;
    }
}

/*****************/
/* Root Elements */

body > header img {
    display: block;
    height: 80px;
    padding: 16px;
    margin: auto;
}

body > nav a {
    display: block;
    padding: 8px;

    color: white;
    text-decoration: none;
}

body > nav a.selected {
    background-color: var(--greenColor);
}

body > nav a:hover {
    background-color: var(--greenHoverColor);
}

body > footer a {
    color: var(--greenColor);
    text-decoration: none;
}

body > footer a:hover {
    text-decoration: underline;
}

/**********************/
/* Article Containers */

article > header {
    margin: 1.24rem 0;
}

form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;

    margin: 1rem 0; /* TODO: check if needed */
}

.flex-row {
    display: flex;
    flex-direction: row;
    gap: 0.8rem;
}
/* quick fix */
.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.24rem;
    padding-bottom: 15vw;
}

.theme-suggestion {
    display: flex;
    flex-direction: row;
    gap: 0.8rem;
    align-items: center;

    margin: 0;
    padding: 8px;
}

.theme-suggestion:nth-child(odd) {
    background-color: rgb(194, 194, 194);
}

.schedule {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    margin: 0.5rem;
}

.scheduleDay {
    padding: 0.5rem;
    margin: 0.5rem;
    flex: 1 1 0;
}

.scheduleDay p {
    font-size: 0.95em;
}

@media only screen and (max-width: 480px), only screen and (max-device-width: 480px) {
    /* Info */
    .info p {
        font-size: 0.75em;
    }
    /* Schedule */
    .schedule {
        flex-direction: column;
    }
    .scheduleDay p {
        font-size: 0.75em;
    }
    /* Project Grid */
    /* quick fix */
    .project-grid {
        grid-template-columns: 1fr;
        min-width: 130px;
        overflow-wrap: break-word;
    }
    /* quick fix */
    .project-grid-item > p {
        font-size: 18px;
    }
}

/********************/
/* Article Elements */

article > header > * {
    margin: 0.2rem 0;
}

article > header h1,
article > header h3,
header h2 {
    text-align: center;
}

article > header h1 {
    font-size: 2em;
}

article .button,
article button {
    color: white;
    display: block;
    width: max-content;
    padding: 8px;
    border: 0;
    margin: 1rem 0;

    background-color: var(--greenColor);
    color: white;
    cursor: pointer;
    font-family: URWGothicSemiBold;
    font-size: 1em;
    text-decoration: none;
}

article .button.red,
article button.red {
    border-color: var(--redColor);
    background-color: var(--redColor);
}

article .button.outlined,
article button.outlined {
    border: 2px solid black;
    padding: 6px;

    background-color: transparent;
    color: black;
}

article .button:hover,
article button:hover {
    border-color: var(--greenHoverColor);
    background-color: var(--greenHoverColor);
    color: white;
}

article .button.red:hover,
article button.red:hover {
    border-color: var(--redHoverColor);
    background-color: var(--redHoverColor);
}

article hr {
    border: 2px solid gray;
}

form .field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

form .buttons {
    display: flex;
    flex-direction: row-reverse;
    gap: 0.8rem;
}

form .field-row {
    display: flex;
    flex-direction: row;
    column-gap: 0.8rem;
    row-gap: 0.2rem;
    flex-wrap: wrap;
}

form .field-row .field {
    width: 0;
    flex-grow: 1;
}

form .field-row span {
    width: 0;
    flex-basis: 100%; /* Puts span on its own row */
}

form label,
form span {
    line-height: 1;
}

form textarea {
    height: 6em; /* default height */
    resize: vertical;
}

form input,
form textarea {
    padding: 8px;
    border: 2px solid grey;
    resize: vertical;

    font-family: URWGothicSemiBold;
    font-size: 1em;
}

form button {
    margin: 0;
}

form hr {
    width: 100%;
}

.flex-row > * {
    margin: 0 !important; /* TODO: find a way not to need !important */
}

.project-grid-item {
    display: flex;
    flex-direction: column;
    gap: 8px;

    border: 4px solid grey;
    padding: 8px;

    text-align: center;
}

.project-grid-item a {
    flex-grow: 1;
}

.project-grid-item * {
    margin: 0;
    width: 100%;
}

.theme-suggestion .theme {
    flex-grow: 1;
}

@media only screen and (max-width: 480px), only screen and (max-device-width: 480px) {
    .project_by p,
    .project_description p {
        font-size: 2em;
    }
    /* View Profile */
    .profile p,
    .profile .flex-row a {
        font-size: 1.5em;
    }
    article .button, article button {
        font-size: 1.5em;
    }
    article > header > * {
        margin: 0.5em 0;
    }
    /* Forms on different views */
    form label,
    form span,
    form input,
    form textarea {
        font-size: 1em;
    }
}
/********/
/* Misc */

.error {
    color: var(--errorColor);
}


.addUser {
    margin-top: 200px;
       
}


.project_description{
    margin-top: 50px;
    border-style: double;
    padding: 20px;
    
}

.project_by{
    text-align: center;
}

.underline {
    text-decoration: underline;
}

#category {
    margin-top: 50px;
}

.link_visited {
    color: #0000EE;
}

.remove_vote,
.remove_vote:hover {
    background-color: var(--errorColor);
}