@charset "utf-8";
/* 
    Assignment 7 - Your Personal Website
    Author: Timothy Jordan Whitehead
    File: personal.css
    General Stylesheet
*/
/* ======= main styles ======= */
body {
    font-family: Verdana, Geneva, sans-serif;
    color: #dce0d9;
    background-color: #31081f;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

header {
    text-align: center;
    padding: 20px;
}

h2 {
    font-size: 1.3em;
}

main {
    padding: 20px;
    margin-top: 70px;
}

body > footer {
    background-color: #6b0f1a;
    color: #dce0d980;
    font-weight: bold;
    font-size: 0.9em;
    line-height: 3em;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    clear: both;
}

ul{
    list-style-type: square;
}

header img{
    width: 100%;
    clear: both;
    float: none; 
}

h1, h2{
    text-shadow: 0.1px 1.5px 1px #808f85;
}

nav ul{
    list-style: none;
    margin: 0;
    padding: 0;
}

nav li{
    display: block;
    width: 20%;
    float: left;
}

nav a{
    display: block;
    background-color: #6b0f1a;
    line-height: 2.8em;
    text-decoration: none;
    text-align: center;
    color:#dce0d9;
}

div.storyBlock p {
    white-space: pre-line;
    line-height: 1.1;
    margin-left: 2.5%;
    margin-bottom: 5px;
}

/* ======= Styles added in assignment 6 ======= */
input:focus, select:focus, textarea:focus {
    background-color: rgba(191, 222, 253, 0.844);
}

input#name:focus:valid, 
input#address1:focus:valid, 
input#city:focus:valid, 
input#state:focus:valid, 
input#zip:focus:valid, 
input#phone:focus:valid, 
input#email:focus:valid, 
input#bdate:focus:valid {
    background-color: rgb(220, 255, 220);
}

input#name:focus:invalid, 
input#address1:focus:invalid, 
input#city:focus:invalid, 
input#state:focus:invalid, 
input#zip:focus:invalid, 
input#phone:focus:invalid, 
input#email:focus:invalid, 
input#bdate:focus:invalid {
    background-color: rgb(255, 232, 233);
}



/* ======= flexbox styles for gallery and imgGallery class on vacation.html ======= */
div.gallery {
    display: flex;
    flex-flow: wrap;
}

div.imgGallery {
    flex: 23%;
    max-width: 25%;
    padding: 4px 4px;
}

div.imgGallery img {
    width: 100%;
}

/* ======= Table Styles ======= */
table {
    border: 10px groove rgb(34, 77, 119);
    border-collapse: collapse;
    width: 100%;
    padding: 20px;
}

th, td {
    border: 1.5px solid rgb(34, 77, 119);
    padding: 7px;
    text-align: left;
}

thead td {
    color: rgb(34, 77, 119);
    background-color: rgba(200, 135, 68, 0.25);
    font-weight: bold;
    font-size: 1.075em;
    text-align: center;
}

tbody {
    background-color: #31081f;
    color: rgb(34, 77, 119);
}

tbody tr:nth-of-type(even) {
    background-color: rgba(34, 77, 119, 0.75);
    color: #31081f;
}

tfoot td {
    color: rgb(34, 77, 119);
    background-color: rgba(200, 135, 68, 0.25);
    font-weight: lighter;
    font-style: italic;
    font-size: 0.75em;
    text-align: right;
}

/* ======= Media query for flexbox 50% width ======= */
@media only screen and (max-width: 1100px) {
    div.imgGallery {
        flex: 48%;
        max-width: 50%;
        padding: 4px 4px;
    }
}

/* ======= Tablet/mobile media query: 0 to 768px ======= */
@media only screen and (max-width: 768px) {
    body {
        width: 100%;
        margin: 0;
    }
    nav li {
        float: none;
        font-size: x-large;
        width: 100%;
    }
    nav a {
        border-bottom: 1px solid black;
        text-align: left;
        text-indent: 2%; 
    }
    nav a:hover{
        background-color: #31081f;
        color:#dce0d9;
        font-size: 1.2em;
        transition:
            background-color 0.5s ease-in 0.2s,
            color 0.5s ease-in 0.2s,
            font-size 1s ease;
    }

    /* ===== start navicon ===== */
    a#navicon {
        display: block;
    }
    nav.horizontal ul {
        display: none;
    }
    a#navicon:hover+ul, nav.horizontal ul:hover {
        display: block;
    }
    nav a img{
        padding: 5px;
        padding-left: 2%;
        display: block;
        float: none;
    }
    /* end navicon */

    main > img {
        width: 90%;
        padding: 25px;
        float: none;
    }
    
    /* ===== Flexbox display for mobile ===== */
    div.imgGallery {
        flex: 100%;
        max-width: 100%;
        padding: 4px 0px;
    }

    /* ===== Table Styles for Mobile ===== */
    table, tbody, tr, td, th {
        display: block;
    }
    
    thead, tfoot {
        display: none;
    }

    tbody td {
        position: relative;
        padding-left: 40%;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        top: 0px;
        left: 0px;
        padding: 5px;
        width: 40%;
        font-weight: bold; 
    }

    form {
        width: 100%;
        font-size: large;
    }
    fieldset {
        width: 100%;
        padding: 5px;
        margin: 0;
    }
    input, select {
        position: inherit;
        display: block;
        height: 50px;
        padding: 5px;
        width: 90%;
    }
    label {
        position: inherit;
        display: block;
        height: 50px;
        width: 90%;
    }
    input[type='submit'], input[type='reset'] {
        float: none;
        width: 90%;
        margin: 10px;
        font-size: 1.2em;
    }
    textarea {
        padding: 10px;
        margin: 10px;
        width: 85%;
    }
    
}

/* ============== desktop media query ============== */
@media only screen and (min-width: 769px) {
    html {
        background-color: rgb(23,34,51);
        background-image: url(deepbg.png);
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center center;
        background-attachment: fixed;
    }
    main > img {
        width: 25%;
        padding: 25px;
    }
    img {
        float: right;
        clear: both;
    }

    /* I added this because I couldn't make my image look right due to the size of it. */
    img#aboutmeImg{
        position: sticky;
        top: 30%;
        float: right;
        width: 12%;
    }
    
    p#aboutmeMainFirstP {
        padding-top: 25px;
    }
    
    nav a:hover{
        background-color: #31081f;
        color:#dce0d9;
        font-size: 1.2em;
        transition:
            background-color 0.5s ease-in 0.2s,
            color 0.5s ease-in 0.2s,
            font-size 1s ease;
    }

    form {
        width: 90%;
    }

    fieldset {
        width: 90%;
        padding: 5px;
        margin-right: 10px;
        margin-bottom: 10px;
    }

    input, select {
        display: block;
        position: relative;
        left: 30%;
        padding: 5px;
        height: auto;
        width: 60%;
    }

    label {
        display: block;
        position: absolute;
        padding: 5px;
        width: 30%;
    }

    input[type='radio'] {
        display: inline;
        position: inherit;
        left: 0;
        width: auto;
    }

    label.radio{
        display: inline;
        position: inherit;
    }

    input[type='submit'], input[type='reset'] {
        display: block;
        float: left;
        left: 0;
        text-align: center;
        width: 40%;
        padding: 10px;
        margin-left: 5%;
        margin-right: 5%;
        margin-bottom: 10px;
    }

    textarea {
        padding: 10px;
        margin: 10px;
    }

    /* I also added this */
    label[for='referrer'] {
        position: relative;
    }

    /* ===== do not show navicon unless on mobile ===== */
    a#navicon {
        display:none;
    }
}