/*Styles for module 4 pages started monday 10.16*/

* {
    margin: 0; padding: 0; border: 0; box-sizing: border-box;
}

body {
    background-color: hsl(28,87%, 75%);
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

h1 {
    text-align: center;
    font-weight: normal;
    text-transform: uppercase;
    border-left: 4px solid #456;
    border-right: 4px solid #456;
    border-bottom: 4px solid #456;
    margin: 8px 8px 40px 8px;
    padding: 8px;
    border-radius: 0px 0px 25px 25px;
  }

  #samples-parent {
    display: flex;/*makes it a flex parent*/
    flex-flow: row wrap;
    justify-content: space-between;
    padding: 24px;
  }

  #samples-parent figure {
    border: 8px solid hwb(239 14% 29%);
    aspect-ratio: 2/1.5; /*keeps the proportions regardless of the width*/
    flex-grow: 0;
    flex-basis: 30%;
    margin-bottom: 16px;
    border-radius: 8px;
    position: relative; /*do this so i can position absolute the child*/
  }

  /* descendent selector */
  figure h2 {
    position: absolute;
    top: 12px; left: -5%;
    width: 110%;
    color: yellow;
    background-color: hsla(220, 50%, 0%, .7); /*allows for alpha transparent colors. rgba does the same thing*/
    text-align: center;
    padding: 4px 0;
  }

  figure figcaption {
    position: absolute;
    top: 80%; left: 0;
    width: 100%; height: 20%;
    background-color:hsla(220, 50%, 0%, .7);
    color: whitesmoke;
    padding: 4px;
    padding-bottom: 4px;
  }

  #samples-parent figure:nth-child(1) {
    border-radius: 40% 40% 0% 0;
    border: 16px solid rebeccapurple
  }

  #samples-parent figure:nth-child(2) {
    overflow: hidden; /*hides the excess*/
  }

  #samples-parent figure:nth-child(3) img {
    object-fit: fill;
    width: 100%; height: 100%;
  }

  #samples-parent figure:nth-child(4) div {
    width: 40%;
    aspect-ratio: 1/1;
    border: 4px solid red;
    margin: 80px auto;
    background-image:repeating-radial-gradient(yellow,red, blue)
  }

  #samples-parent figure:nth-child(5) div {
    width: 40%;
    aspect-ratio: 1/1;
    border: 4px solid red;
    margin: 80px auto;
    background-image: conic-gradient(green 0%, green 20%, orange 20%, orange 40%, gray 40%, red 65%, blue 65%, blue 85%, hotpink 80%)
  }

  #samples-parent figure:nth-child(6) {
    padding: 60px 0px;
  }

  #samples-parent figure:nth-child(6) img {
    float: left;
    width: 80px;
    height: 80px
  }

  #samples-parent figure:nth-child(6) h3 {
    clear: left;
  }

  #samples-parent figure:nth-child(7) h3 {
    text-shadow: -3px 4px 6px orangered;
    text-align: center;
    margin: 50% auto;
    width: 80%;
    font-size: 2em;
  }

  #samples-parent figure:nth-child(8) h3 {
    text-align: center;
    margin: 50% auto;
    border: 2px solid red;
    font-size: 3em;
    width: 80%;
    transform: rotate(180deg) skewX(5deg);
  }

  #samples-parent figure:nth-child(9) {
    background-color: yellowgreen;
    transition: background-color 1s linear;
  }

  #samples-parent figure:nth-child(9):hover {
    background-color: orangered;
  }
 