/* styles for module 4 pages started monday 10/16*/

* { 
    margin: 0; padding: 0; border: 0; box-sizing: border-box;
}
/*ruleset*/
body {
    background-color: hsl(28, 87%, 75%); /*declaration*/
    font-family:Verdana, Geneva, Tahoma, sans-serif;
}

h1 {
    text-align: center;
    font-weight: normal;
    text-transform: lowercase;
    border-left: 4px solid #456;
    border-bottom: 4px solid #456;
    margin: 8px 8px 40px 8px;
    padding: 8px;
    transform: rotate(-3deg);
    border-radius: 0 0 0 32px;

}

#samples-parent {
  text-align: center;
  display: flex; /*makes ist a flex parent, side by side*/
  flex-flow: row wrap;
  justify-content: space-between;
  padding: 8px; /*space beween full parent area and the outer "border"*/
}

#samples-parent figure{
  border: 8px solid hwb(300 30% 45%);
  aspect-ratio: 2/1.5; /* keeps the proportions regardless of width of the page */
  flex-basis: 30%; /*puts however many per row, kinda like width*/
  flex-grow: 0;
  margin-bottom: 16px; /*bottom gap */
  border-radius: 32px 0 32px 0;
  position: relative; 
}

/* descendant selector or child selector with > */
figure h2 {
    position: absolute;
    top: 0; left: -5%;
    background-color: hsl(220 50% 0% / .7);
    /* background-color: hsla(220, 50%, 0%, .7); hue, saturation, light, alpha tranparency */
    color: limegreen;
    width: 110%; /* a little bigger than the parents width */
    text-align: center;
    padding: 4px 0;
    transition: top .7s ease-in-out;

}

figure figcaption {
    position: absolute;
    top: 80%; left: 0;
    width: 100%; height: 20%;
    background-color: hsla(207, 94%, 19%, 0.7);
    color: orangered;
    border-radius: 0 0 24px 0;
    text-align: left;
    padding: 8px;
}



#samples-parent figure:nth-child(1) {
    overflow: hidden; /* or scroll to make a scroll bar */
}

#samples-parent figure:nth-child(2) {
    background-color: yellowgreen;
    transition: background-color all .6s linear;
}
#samples-parent figure:nth-child(2):hover {
    background-color:orangered;
}
#samples-parent figure:nth-child(2):hover h2 {
    top: 100px;
}


#samples-parent figure:nth-child(3) img{
    width: 300px; height: 400px;
    object-fit: scale-down; 
}


#samples-parent figure:nth-child(4) div {
    width: 30%;
    aspect-ratio: 1/1;
    border: 4px solid red;
    margin: 80px auto;
    background-image: conic-gradient(green 0%, green 10%, 
    orange 10%, orange 40%, gray 40%, gray 65%, blue 65%, blue 85%,
    hotpink 85%, hotpink 100% );
    border-radius: 50%; /* creates a disc out of a square */
}


#samples-parent figure:nth-child(5) div {
    width: 30%;
    aspect-ratio: 1/1;
    border: 4px solid red;
    margin: 80px auto;
    background-image: repeating-radial-gradient(red 0px, red 10px,
     blue 10px, blue 20px);
}

#samples-parent figure:nth-child(6) {
    padding-top: 80px;
}
#samples-parent figure:nth-child(6) img {
    float: left;
}
#samples-parent figure:nth-child(6) h3 {
    clear: left; /* cleared floating object */
}

#samples-parent figure:nth-child(7) {
    border-radius: 40% 40% 40px 0;
    border: 16px solid orchid;
}

#samples-parent figure:nth-child(8) h3 {
   text-shadow: -3px 4px 10px orangered;
   margin: 80px auto;
   text-align: center;
   font-size: 4em;
}

#samples-parent figure:nth-child(9) h3 {
   margin: 80px auto;
   text-align: center;
   font-size: 4em;
   width: 80%;
   border: 2px solid red;
   transform: rotate(180deg) skewX(10deg);
}
