/** {
    border: 1px solid red;
}*/

html, body {
    /* Prevent the webpage from scrolling horizontally, */
    max-width: 100%;
    overflow-x: hidden;
    /* Remove white border around edges of body. */
    margin: 0;
        /* Set the min-height to the size of the screen to force the body below the header to take up all remaining space. */
        /* Thus removing white border at the bottom of the screen after the body is finished. */
        /* Setting height instead of min-height prevents vertical scrolling, because the body is only as tall as the screen, even if some content is pushed outside of the screen. */
    min-height: 100vh;
    /* Allow all text to wrap when display is small enough. */
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

main {
    display: flex;
    flex-direction: column;
    flex: 1;
    /* Prevent the main body from overlapping with the header. */
    margin-top: 60px;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background-color: #414253;
    opacity: 0.95;
    /* Add the shadow to the header. */
	-webkit-box-shadow: 0 8px 9px -6px black;
	   -moz-box-shadow: 0 8px 9px -6px black;
	        box-shadow: 0 8px 9px -6px black;
}

#encode {
    font-family: 'courier-prime', monospace;
    text-shadow: 1px 1px 3px black;
    color: #EEE;
    /* 10px from the top and bottom, 20px from the sides; */
    margin: 10px 20px;
    /* So that things can sit next to the ENcode text in the header. */
    display: inline-block;
}

.encode-text {
    font-family: 'courier-prime', monospace;
    font-size: 1.2rem;
}

#about-button {
    color: #EEE;
    text-shadow: 1px 1px 3px black;
    float: right;
    margin: 7px 10px;
    background-color: #646678;
}

/* The button class applies the grow and shadow effect to buttons. */
.button {
    font-family: sans-serif;
    font-weight: bold;
    text-decoration: none;
    padding: 10px;
    /* Below is for the shadow effect and transition. */
    position: relative;
    display: inline-block;
    border-radius: 5px;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.4);
    border-radius: 5px;
    -webkit-transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.button::after {
    content: "";
    border-radius: 5px;
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: 0 8px 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    -webkit-transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.button:hover {
    -webkit-transform: scale(1.05, 1.05);
    transform: scale(1.05, 1.05);
}

.button:hover::after {
    opacity: 1;
}

p {
    width: 70%;
}

#mail {
    text-decoration: none;
    color: #EEE;
    font-size: min(1rem, 4.5vw);
    white-space: nowrap;
}

#ecarnival-container {
    background-color: #003366;
    font-family: sans-serif;
    color: #EEE;
    /* This container will take up equal space to the budget container. */
    flex: 1;
    /* Force the two child divs to display side-by-side. */
    display: flex;
}

@font-face {
    font-family: graduate;
    src: url(images/Graduate/Graduate-Regular.ttf);
}

.ecarnival-text {
    font-family: graduate;
}

#ecarnival-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    flex: 1;
}

#ecarnival-logo {
    max-width: 30%;
    min-width: 150px;
}

#ecarnival-text-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    flex: 1;
}

#ecarnival-button {
    color: rgb(19, 54, 98);
    background-color: #EEE;
    margin: 10px 0 30px 0;
}

#budget-container {
    /* Center the image within the div. */
    text-align: center;
    background-color: #259184;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* This container will take up equal space to the ecarnival container. */
    flex: 1;
}

#budget_feature_graphic {
    /* Prevent the image from getting too big on large displays. */
    max-width: 40%;
    min-width: 400px;
}

#budget-button {
    color: #259184;
    background-color: rgb(247, 225, 100);
    margin: 10px 0;
}

@media (max-width: 550px) {
    #ecarnival-container {
        background-color: #003366;
        font-family: sans-serif;
        color: #EEE;
        display: flex;
        flex-direction: column;
    }

    #ecarnival-logo-container {
        height: 100%;
        padding: 50px 20px 0 20px;
    }

    #ecarnival-logo {
        max-width: 25%;
        min-width: 100px;
    }

    #ecarnival-text-container {
        padding: 0 20px;
        align-items: center;
    }

    p {
        width: 90%;
    }

    #mail {
        display: block;
    }

    #budget_feature_graphic {
        /* Prevent the image from getting too big on large displays. */
        min-width: 300px;
    }
}
