@import url('https://fonts.googleapis.com/css2?family=GFS+Didot&family=Viaoda+Libre&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Josefin+Slab&display=swap');
* {
    padding: 0;
    margin: 0;
    border: none;
    box-sizing: border-box;
}
/* To keep a consistent format/sturcture around the webpage, I used the * & the body to assign similar characteristics throughout */
body {
    font-family: 'Josefin Slab', serif !important; 
    color: black;
    text-align: center !important;  
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 500;
    height: 100%; 
}
/*Index Page/ Introductory page */
/* The Hero image/images are on the introduction page to set a mood before entering the website */
/* Using alterations from various aspects of the W3scools link attached & various other articles on the CSS animation keyframes,
 I formed the hero image sequence https://www.w3schools.com/css/css3_animations.asp */
 /* Using height vh & width vw @ 100 to fill the page */
 /* Transitioning every 6 seconds */
.hero-image {
    background-image: url("../images/peace-corn.JPG");
    background-color: rgb(255, 255, 255);
    height:100vh; 
    width: 100vw;
    background-position: center; 
    background-repeat: no-repeat; 
    background-size: cover;
    transition: 6s;

    animation-name: animate;
    animation-direction:normal;
    animation-duration: 36s;
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
    animation-play-state: running;
    animation-timing-function: ease-in-out;
}
@keyframes animate{
    0%{
        background-image:url("../images/peace-corn.JPG");
    }25%{
        background-image:url("../images/solitude-entering-the-storm1.jpg"); 
    }50%{
        background-image:url("../images/sunset-2better.JPG");
    }75%{
        background-image:url("../images/sunset-shade.JPG");
    }100%{
        background-image:url("../images/sunset-2better.JPG");
    }

}
/* I used the opacity of .5 for the logo image only on the index page as I did not want to interfere with the transtioning of the images  */
/* The logo image has been placed on the intro page wrapped in an <a> tag to allow a second option to access the home page */
#hero-logo img {
    opacity: .5;
    max-width: 40%;
    max-height: 15rem;
    left: 30%;
    position: relative;
}

a {
    text-decoration:none;
}
/* This logo image is on all pages except the 1st & the last(index.html & contact.html */

#logo img[src="assets/images/logo_small.Jpg"] {
    color: rgb(255, 255, 255);
    width: 75%;
    max-height: 15rem;
    position: relative;
    object-fit: contain;
    object-position: 50% 50%;
    cursor: pointer;
    margin: 1rem;
    justify-content: center;
    align-items: center;
}


/*style button on Entry Page */
/* I studied stack overflow after discussing why my button was not passing the html validator to find a solution, 
by adding a class button rather than an actual <button>, you resolve the wrapping of a button using a. Then target using a.button */
/* I used the font at 500 to make more visible & user friendly */
/*border radius of 50% was important for me to reduce the formality of a typical button, with a more welcoming rounded edge */
/* Added more padding as the circular shape is not welcoming for capital letters like the W at the beginning of Welcome */

a.button {
    background-color: #ffffff;
    color: rgb(3, 3, 3);
    padding: 1rem; /* Change to 1rem to make more responsive */
    text-align: center;
    text-decoration: solid;
    border: 1px solid black;
    position: sticky;  /* Add position sticky to keep button inside page */
    left: 31%;
    top: 100px;  /* Bring closer to the top   */
    border-radius: 50%;
}

button, a:hover {
    color: rgb(0, 0, 0);
    text-decoration: underline;
}

/* Pagination adapted from EasyWebCode tutorial on YouTube https://www.youtube.com/watch?v=mU--VbRr-hM  */

.pagination {
    position: relative;
}

ol {
    list-style-type: none;
    display: block;
    margin: 10px;
}

ol li {
    float: left;
    display: block;
}

ol li a {
    color: black;
    font-size: 18px;
    font-weight: bold;
    line-height: 50px;
    text-decoration: none;
    text-align: center;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: block;
    background-color: cyan;
}

ol li a:hover {
    background-color: rgb(255, 255, 255);
}

/* Footer */
/* The footer used on all pages except index.html */
/* I used 100vw to center it & the 4ems to assst with keeping it at the base of the page */
.social-networks {
    width: 100vw;
    height: 1em;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    bottom:0;
}
.social-networks i {
    font-size: 2em;
    margin: 1%;
    padding: 5%;
    color: black;
    align-items: center;
    justify-content: center;
}

  /* ---HOME PAGE --- */
/* Home page starts here with h-container for the home system grid */
/* I have removed the code for the Carousel but I left it's postioning for future reference */
.h-container {
    display: grid;
    height:100vh; 
    min-height:100%;
    position: relative;
    grid-template-columns: 1fr 1fr; 
    grid-template-rows: 0.2fr 0.8fr 0.8fr 4fr 0.1fr;
    grid-template-areas: 
        "nav nav"
        "main-header main-header"
        "page-header page-header"
        "container-fluid-1 container-fluid-1"
   /*   "carousel carousel" The Carousel will be completed here in time*/
        "footer footer";  
}
nav {
    grid-area: nav;
}

.main-header {
    grid-area: main-header;
    max-width: 100%;
    max-height: 100%;
}

#page-header > #logo {
    grid-area: page-header; 
    padding: 1.5rem 3.5rem ;
    max-width: 50%;
}

.container-fluid-1 {
    align-items: center;
    max-width: 100%;
    grid-area: container-fluid-1;
    margin: 1rem;
    display: inline-block;
}
.container-fluid-1 img {
    padding: 2rem;
    max-width: 100%;
    max-height: 100%;
}

.footer {
    grid-area: footer; 
    align-items: center;
    justify-content: center;
    margin-top: auto;
    height: 1em;
    bottom:0;
}

/* .p-container for the Portfolia page Grid */

/* .p-container {
    display: grid;
    height: 100vh;
    min-height:100%;
    width:100%;
    position: relative;
    grid-template-columns: 1fr 1fr; 
    grid-template-rows: 0.1fr 0.4fr 0.4fr 0.2fr
     8fr 0.2fr; 
    grid-template-areas: 
        "nav nav"
        "main-header main-header"
        "page-header page-header"
        "pagination pagination"
        "container-fluid container-fluid"
        "footer footer";
} */

nav {
    grid-area: nav;
}

.main-header {
    grid-area: main-header;
}

#page-header {
    grid-area: page-header; 
}
.pagination {
    grid-area: pagination;
    align-items: center;
    justify-content: center;
}
/* Container within the main container to keep the image structure */
/* .container-fluid {
    height: 100%;
    align-items: center;
    max-width: 100%;
    min-width: 300px; 
    grid-area: container-fluid;
    padding-bottom: 1rem !important;
} */

.image {
/*   display: inline-block;  */
    margin-bottom: 1rem;
    overflow: hidden;
    width: 100%;
    height: auto;

}

.item:hover,
.item-potrait:hover {
     filter: brightness(100%);
     transform: scale(1.08);
}
/* To give the effect of when you scroll of the image with finger or mouse it will expand slightly & enhance slightly 
in colour by using the filter 75% to 100% after hover. With a .5 second transition time. 1rem to leave space between images */
.item {
    filter: brightness(75%);
    transition: .5s ease-in-out;
    padding-bottom: 1rem;
    width: 100%;
    height: auto;
    overflow: hidden;
    object-fit: cover;
}
.item img {
    max-width: 261px;
    height: 195px;
    position: relative; /* Removed Display: Flexbox;. */
}

.item-potrait {
    filter: brightness(75%);
    transition: .5s ease-in-out;
    width: 261px;
    height: 322px;
    overflow: hidden;
    object-fit: cover;
    padding-bottom: 3rem;
}

.item-potrait img {
    width: 261px;
    height: 322px;
    position: relative;
    padding-bottom: 1rem;
}

footer {
    grid-area: footer; 
    align-items: center;
    justify-content: center;
    margin-top: auto;
    height: 1em;
    bottom:0;
}

/* Blog Page */
.blog-container {
    max-width: 100%;
    position: relative;
}

/* About page */
.about-container {
    max-width: 100%;
    position: relative;
}
/* Content pages with similar attributes linked here. About Page & Blog Page HERE */
.content-container {
    margin: 10px 40px 10px 40px;
}
/* The majority of images in the content pages for the blog & about pages are targeted using .content-image  */
.content-image {
    width: 100%;
    max-width: 400px;
    margin: 1rem auto 1rem;
    border-radius: 25px;
    display: inline-block;
}
.content-image img {    
    width: 100%;
    max-width: 400px;
    max-height: 300px;
    margin: 1rem auto 1rem;
    border-radius: 25px;
    border: 1px solid #383838;
    display: inline-block;
    overflow: hidden;
}
/* Seperate target of content-image-potrait set up to allow the potrait image to be seen in proportion, 
targeting image & image container */
.content-image-potrait {
    height: auto ;
    width: 100%;
    max-width: 300px;
    margin: 1rem auto 1rem;
    border-radius: 25px;
    display: block;
}
.content-image-potrait img {    
    width: 100%;
    max-width: 300px;
    max-height: 400px;
    margin: 2rem auto 1rem;
    border-radius: 25px;
    border: 1px solid #383838;
    display: block;
}
/* Circular image targets the main image of me on the About me page */
.content-image1 {
    width: 50%;
    max-width: 700px;
    border-radius: 50%;
    display:inline-block;
}
.content-image1 img {    
    width: 100%;
    max-width: 500px;
    border-radius: 50%;
    border: 1px solid #383838;
    display:inline-block;
    align-items: center;
    justify-content: center;
}

/* Contact Page */
.contact-container {
    max-width: 100%;
    max-height: 100%;
}
/* Padding added to the top to allow space for the background image as the header was touching the top of the page */
#page-header-c {
    padding-top: 1rem;

}
#background-image {
    background-image: url('../images/sunset-chat.jpg');
    background-size: cover;
}
/*Contact form */
form { max-width:420px; margin:50px auto; }

.feedback-input {
  color:rgb(0, 0, 0);
  font-family: 'Josefin Slab', serif;
  font-weight: 600;
  font-size: 18px;
  border-radius: 5px;
  line-height: 22px;
  background-color: rgb(255, 255, 255);
  border:2px solid #000000;
  transition: all 0.3s;
  padding: 13px;
  margin-bottom: 15px;
  width:100%;
  box-sizing: border-box;
  outline:0;
}

.feedback-input:focus { border:2px solid #ffffff; }

textarea {
  height: 150px;
  line-height: 150%;
  resize:vertical;
}

[type="submit"] {
  font-family: 'Josefin Slab', serif;
  width: 100%;
  background: rgb(180 180 180);
  border-radius:5px;
  border:0;
  cursor:pointer;
  color:rgb(255, 255, 255);
  font-size: 2rem;
  padding-top:10px;
  padding-bottom:10px;
  transition: all 0.3s;
  margin-top:-4px;
  font-weight:700;
}

[type="submit"]:hover { background: cyan; }


/* Hamburger Menu adapted from Erik Terwan 24th of November 2015-MIT License */
   #menuToggle{
   display: block;
   position: fixed;
   top: 50px;  /** NOTE: decrease The pixels if want less space */
   right: .8rem;/** NOTE: Change This line */
   
   z-index: 1;
   
   -webkit-user-select: none;
   user-select: none;
 }
 
 #menuToggle a {
   text-decoration: none;
   color: #fff;
   
   transition: color 0.3s ease;
 }
 
 #menuToggle a:hover {
   color: cyan;
 }
 
 #menuToggle input {
   display: block;
   width: 40px;
   height: 32px;
   position: absolute;
   top: -7px;
   left: -5px;
   
   cursor: pointer;
   
   opacity: 0; /* hide this */
   z-index: 2; /* and place it over the hamburger */
   
   -webkit-touch-callout: none;
 }
 
 /*  Hamburger using <span> */
 #menuToggle span {
   display: block;
   width: 33px;
   height: 4px;
   margin-bottom: 5px;
   position: relative;
   
   background: #cdcdcd;
   border-radius: 3px;
   
   z-index: 1;
   
   transform-origin: 4px 0px;
   
   transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
               background 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
               opacity 0.55s ease;
 }
 
 #menuToggle span:first-child
 {
   transform-origin: 0% 0%;
 }
 
 #menuToggle span:nth-last-child(2)
 {
   transform-origin: 0% 100%;
 }
 
 /* Transform all the spans into a crossmark. */
 #menuToggle input:checked ~ span {
   opacity: 1;
   transform: rotate(45deg) translate(-2px, -1px);
   background: #ffffff;
 }
 
 /* Hide the middle one span */
 #menuToggle input:checked ~ span:nth-last-child(3) {
   opacity: 0;
   transform: rotate(0deg) scale(0.2, 0.2);
 }
 
 /* The last one span to go the other direction */
 #menuToggle input:checked ~ span:nth-last-child(2) {
   transform: rotate(-45deg) translate(0, -1px);
 }
 
 /* {Position at the top right of the screen */
 #menu {
   position: absolute;
   width: 300px;
   margin: -100px 0 0;
   padding: 50px;
   padding-top: 125px;
   right: -50px;
   
   background: black;
   list-style-type: none;
   -webkit-font-smoothing: antialiased;
   /* to stop flickering of text in safari */
   
   transform-origin: 0% 0%;
   transform: translateX(100%);
   
   transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
 }
 
 #menu li {
   padding: 10px 0;
   font-size: 22px;
 }
 
 /* Slide it in from the right , not the left as it was on Erik Terwans code as his hamburger was on the left side*/
 #menuToggle input:checked ~ ul
 {
   transform: none;
 }
/* Media queries to make responsive  */
@media only screen and (max-width:550px){
    .h-container { 
        grid-template-columns: 1fr; 
        grid-template-rows: 0.2fr 0.4fr 0.2fr 4fr 0.8fr;
        grid-template-areas: 
            "nav"
            "main-header"
            "page-header"
            "container-fluid-1"
       /*   "carousel" */
            "footer"; 
    }
    .p-container {
        grid-template-columns: 1fr;
        grid-template-rows: 0.1fr 0.2fr 0.1fr 
        4fr 0.1fr;
        grid-template-areas: 
        "nav" 
        "main-header" 
        "page-header" 
        "container-fluid"
        "footer";
    } 
}

@media only screen and (max-width:750px){
    .p-container {
        grid-template-columns: 1fr;
        grid-template-rows: 0.1fr 0.4fr 0.2fr 0.1fr
        4fr 0.1fr;
        grid-template-areas: 
        "nav" 
        "main-header" 
        "page-header" 
        "pagination"
        "container-fluid"
        "footer";
    } 
    /* Home page css starts here */
    .home-image {
        max-width: 100%;
        max-height: 100%;
        position: relative;
    }
    .h-container { 
        grid-template-columns: 1fr; 
        grid-template-rows: 0.2fr 0.4fr 0.2fr 4fr 0.8fr;
        grid-template-areas: 
            "nav"
            "main-header"
            "page-header"
            "container-fluid-1"
     /*     "carousel" */
            "footer";  
    }
}
