* {
    box-sizing: border-box;
    border: 1px solid black;
}
body {
    width: 98%;
    margin: auto;
}
section, article, aside, footer, header {
    padding: 0.5rem;
}
img, video, embed {
    max-width: 98%;
}

header{
    text-align: center;
    flex:33%;
    border-right: solid black 3px;
    border-bottom: solid black 3px;
    background-color: gold;
}
.nav{
    
    display:flex;
    text-align:center;
    flex-direction:column;
    list-style-type:none;
    background-color: black;
}

.nav, header{
    
    order:-1;
    flex-direction:row;
    
}

.nav {
    
    display:inline; 
    flex:auto;
    text-align:center;
    background: #ccc;
    color: black;
    margin: 0 5px;
    padding: 5px 0;
    text-decoration:none;
    border: 1px solid black;
    
}

.nav:hover{
    outline: 1px solid blue;
    color: blue;
    text-decoration: underline;
    flex-grow:2;
    
}
.parent{
    
    display:flex;
    flex-wrap: wrap;
    border-bottom:0.5rem;
    border-left: solid black 3px;
    border-right: solid black 3px;
    text-align:center;
    
}

.a1{
    
    flex:33%;
    border-right: solid black 3px;
    border-bottom: solid black 3px;
    background-color: gold;
    
}

.a2{
    
    flex:33%;
    border-right: solid black 3px;
    border-bottom: solid black 3px;
    background-color: gold;
    
}

.aside{
    flex:33%;
    border-right: solid black 3px;
    border-bottom: solid black 3px;
    background-color: gold;
}
.section{
    flex:33%;
    border-right: solid black 3px;
    border-bottom: solid black 3px;
    background-color: gold;
}
.footer{
    flex:33%;
    border-right: solid black 3px;
    border-bottom: solid black 3px;
    background-color: gold;
}

/* default navigation values */
nav {
    display: flex;
    flex-direction: column;
}
nav a {
    flex: 100%;
    margin: 0 5px;
    padding: .5rem;
}

/* medium screen */
@media screen and (min-width: 768px) {
    body {
        display: flex;
        flex-direction: column;
        max-width: 75rem;
    }
    main {
        display: flex;
        flex-wrap: wrap;
    }
    nav, header {
        order: -1;
    }
    nav {
        flex-direction: row;
    }
    nav a {
        flex: auto;
    }
    article {
        flex: 50%;
    }
    aside, section {
        flex: 100%;
    }
    section p {
        column-count: 2;
        column-gap: 20px;
        column-rule: 1px solid rgb(255, 105, 0);
    }
}

/* large screen */
@media screen and (min-width: 1200px) {
    article {
        flex: 35%;
    }
    aside {
        flex: 30%;
    }
}

/* Form Related Rules */

fieldset {
    border: #003333 solid 1px;
    margin: 20px 0;
    max-width:98%;
}
legend {
    font-size: 1.3em;
    color: #000000;
    font-family: "Book Antiqua", Palantino, Garamond, serif;
    margin-bottom: 10px;
}
textarea {
    color: rgb(10, 117, 254);
    width:50%;
    height:100px;
    max-width: 98%;
    box-sizing: border-box;
    border: 2px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    background-color: #f9ffc8;
    background-image: url('searchicon.png');
    background-position: 10px 10px; 
    background-repeat: no-repeat;
    -webkit-transition: width 0.4s ease-in-out;
    transition: width 0.4s ease-in-out;
}
label{
  width:12%;
  display:inline-block;
}
.longlabel{
  width:25%;
}
.shortlabel{
  width:5%;
}
.label{
  width:12%;
}
input[type=text],input[type=email],input[type=tel], input[type=url], input[type=password]{
    margin-left:10px;
    width: 50%;
    box-sizing: border-box;
    border: 2px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    background-color: antiquewhite;
    background-image: url('searchicon.png');
    background-position: 10px 10px; 
    background-repeat: no-repeat;
    -webkit-transition: width 0.4s ease-in-out;
    transition: width 0.4s ease-in-out;
}

input[type=text]:focus,input[type=email]:focus,input[type=tel]:focus,input[type=url]:focus, textarea:focus  {
    width: 80%;
}
input:focus, textarea:focus {
    background-color:#4ea8f7;
    color: rgb(228, 255, 51);
}

/* mobile first display rules*/
nav {
  background-color: rgb(31, 84, 213);
}
nav ul {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style-type: none;
}
nav ul li {
  position: relative;
}
nav ul li a {
  display: block;
  color: rgb(255, 255, 255);
  background-color: rgb(255, 252, 42);
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px;
  text-align: center;
}
nav a:hover, nav a:active, nav a:focus {
  background-color: rgb(0, 28, 183);
  color: rgb(210, 233, 255);
}
nav a.thispage {
  background-color: rgba(210, 211, 58, 0.9);
  font-weight: 800;
}
.dropdown > li > ul {
  display: none;
  position: absolute;
  margin-top: 0;
  padding: 0;
  z-index: 2;
  width: 40%;
}
.dropdown li ul li {
  border-right: solid 1px #000;
}
.dropdown > li:hover > ul {
  display: block;
}
@media screen and (min-width: 768px) {
  nav ul {
    flex-direction: row;
  }
  nav ul li {
    flex: auto;
  }
  .dropdown > li > ul {
    width: 100%;
  }
}

/* dropdown menu, initially hidden */
ul > li > ul {
  display: none;
  position: absolute;
  left: 0;
  z-index:1;
  width:50%;
}
/* reveal dropdown menu when parent list item is hovered */
ul > li:hover > ul {
  display:block;
  width:30%;
}
ul >li>ul>li>a {
background-color: rgba(0,0,0,.8);
color: rgba(219,228,238,1);
}
h1 {
  animation-duration: 3s;
  animation-name: stageRight;
  animation-timing-function: ease-in;
  animation-delay: 0.5s;
  animation-iteration-count: 1;
  animation-direction: normal; /* reverse|alternate|alternate-reverse */
}

@keyframes stageRight {
  /* 0% or from */
  0% {
    margin-left: 200%;
    width: 200%;
    transform: skewX(-20deg) scale(2, 1) translate(0,0);
  }
  
  /*
  
  70% {
    margin-left: 100%;
    width: 150%;
    transform: skewX(-20deg) scale(2, 1) translate(0,100px);
  }
  
  90% {
    margin-left: 0%;
    width:100%;
    transform: skewX(0deg) scale(1, 1) translate(0,0);
  } 
  
  95% {
    margin-left: 0%;
    width:100%;
    transform: skewX(0deg) scale(1, 1) translate(0,30px);
  }

  */ 
  
  /* 100% or to */
  100% {
    margin-left: 0%;
    width:100%;
    transform: skewX(0deg) scale(1, 1) translate(0,0);
  }
}
