/*Course: ITWP 1050
Author: Nicole Wozniak 
Assignment: Homework 5 - CSS Responsive Web Design */

/*web font*/
@font-face{
    font-family: 'Branda';
    src: 
        url(resources/BrandaRegular.woff) format('woff'),
        url(resources/BrandaRegular.woff2) format('woff2');
    font-weight: 200;
}

/*styling background for the entire page added so the gradient didnt have a harsh line for repeating*/
html{
    background-image: linear-gradient(120deg,#04bde4, cyan, #0253b9, midnightblue);
    background-attachment: fixed;
}

/*style for the Universal selector, making the text color*/
*{
    color: #708090;
}

/*style for the body selector*/
body {
    margin: 0; 
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    text-align: center;
    line-height: 30px;
}

/*container for the reactive layout to work properly for the entire pages content*/
.reactive{
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/*adding a background box to the H1/H3 in the header. Added for reactivity in sizing in the new layout*/
.titlebox{
    background-color: #6495ED;
    border: solid 1px black;
    padding: 1rem; 
    margin: 1% 20%;
    width: 50%;
    border-style: outset;
}

/*flex for the main part of the page for reactive layout - 
this consists of the story and two 'side bars' which are the validation and the images*/
.pageMain {
    display: flex;
    flex-direction: row;
    flex-grow: 1;
    align-self: center;
}

/*styling for H1 tag*/
h1 {
    padding-top: 1px;
    color:#0000cd;
    font-size: 60px;
    font-family: 'Branda', Helvetica, sans-serif;
    text-shadow: 4px 3px 0px #4b0082;
    white-space: nowrap;
    font-variant: small-caps;
    letter-spacing: 5px;
    text-align: center;
}

/*adding styling for the h3 tag*/
h3 {
    color: #4b0082;
    text-shadow: 2px 0px 2px #9400D3;
    letter-spacing: 1px;
    font-size: 16px;
    font-variant: small-caps;
}

/*style for footers Element selector - hw5 added padding for the reactive styling layout*/
footer{
    margin-top: 50px;
    margin-bottom: 50px;
    padding: 1rem;
}

#validation a:visited{
    color: #1E90FF;
}
#validation{
    color: #000000;
    border: outset 1px #483D8B;
    background-color:#24243e;
    width: 40%;
    margin: 10px 25%;
}
#validation p{
    color: #87ceeb;
}

/*style for the source link, before and after clicking*/
.sourceof{
    color: #000000;
}
.sourceof::after{
    content: '(external)';
    color: #2d59eb;
}

/*styling for the images and adding reactive properties and put the images together in a container*/
.images{
    padding: 1rem;
}
img{
    border-radius: 20px;
    max-width: 100%;
    height:auto;
}
.topimage{
    border: solid 1px #0000;
    width: 75%;
    
}
.bottomimage{
    border: solid 2px #87ceeb;
    width: 75%;
}

/*styling to the story itself - added for reactive layout to work and to line it up on the page a bit cleaner*/
.theStory{
    border-style: groove;
    margin: 1px 5%;
    text-align: left;
    padding: 1rem; /*10px*/
    background-image: linear-gradient(to right, #302b63, #24243e,  #0f0c29);
    flex-grow: 1;
    justify-content: center;
}

/*making select text italicized for the story*/
.breath{
    font-style: italic;
    text-align: center;
    animation: pulse 3s linear infinite;
}

@keyframes pulse{
    0%{ 
        transform: scale(1);
        opacity: .5;
    }
    50%{ 
        transform: scale(1.3);
        opacity: 1;
    }
    100%{ 
        transform: scale(1);
        opacity: .5;
    }
}

/*adding some styles to the bottom of the story regarding source and inspiration
adding a transition to this box when you hover over it
hw5 added flex for reactive layout*/
.crediting{
    display: flex;
    flex-direction: column;
    padding: 1rem;
    line-height: 20px;
    width: 10rem;
    margin: 1rem;
    border: 1px inset #87ceeb;
    outline: 1px inset #87ceeb;
    outline-offset: -2px;
    background-image: linear-gradient(120deg, #87ceeb 10%, #0253b9, #191970);
}

.crediting:hover, .crediting:focus {
    outline: 2px solid #1174ff;
    
}

.crediting p {
    color: #000000;
    font-style: italic;
    font-size: .75rem;
}

/*media breakpoint when viewport is 800 or less*/
@media screen and (max-width: 800px){

    h1{
        font-size: 20px;
        text-shadow: 1px 1px 0px #4b0082;
    }
    h3{
        font-size: 12px;
        text-shadow: 1px 0px 0px #9400D3;
    }
    body{
        font-size: 9px;
    }
    .pageMain{
        flex-direction: column;
    }
    .crediting{
        flex-direction: row;
        align-self: center;
        flex-wrap: wrap;
    }
}

/*
.reactive houses everything for the reactive layout
header is the .titlebox, sits at the top as item 1
.pageMain houses three items - .theStory, .crediting and the two images housed in .images. 
        Story in the middle with the credits to one side and images to the other.
        Item 2 -box with the story itself: .theStory, 
        Item 3 -reference link and credit to the writer: .creditting,
        Item 4 -two images: .images
footer is the #validation sits at the bottom after the three items in .pageMain. Item 5
*/
