/* Styles for Module 4 Pages started Monday 10.16 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* total width of the box */
}

body {
    background-color: rgb(194, 129, 82);
    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 {
    display: flex;
    /* make it a flex parent */
    flex-flow: row wrap;
    justify-content: space-between;
    padding: 24px;
}

#samples-parent figure {
    border: 8px solid hwb(300 30% 50%);
    aspect-ratio: 2/1.5;
    /* keeps the proportions regardless of the width */
    flex-grow: 0;
    flex-basis: 30%;
    /* kinda like width */
    margin-bottom: 16px;
    border-radius: 32px 0px 32px 0px;
    position: relative;
    /* do this so I can position absolute the child */
}

/* descendent selector */
figure h2 {
    position: absolute;
    top: 12px;
    left: -5%;
    /* background-color: hsla(220,50%,0%,.7); */
    background-color: hsl(220 50% 0% / .7);
    color: yellow;
    width: 110%;
    text-align: center;
    padding: 4px 0;
    transition: top .7s ease-in-out;
}

figure figcaption {
    position: absolute;
    top: 80%;
    left: 0;
    width: 100%;
    height: 20%;
    text-align: left;
    background-color: hsl(220, 50%, 27%);
    color: white;
    border-radius: 0 0 24px 0;
    padding: 8px;
}

#samples-parent figure:nth-child(1) {
    border-radius: 40% 40% 40px 0;
    border: 16px solid rebeccapurple;
}

#samples-parent figure:nth-child(2) {
    overflow: hidden;
    /* hides the excess; scroll is nice */
}

#samples-parent figure:nth-child(3) {
    object-fit: fill;
    width: 300px;
    height: 300px;
}

#samples-parent figure:nth-child(4) div {
    width: 30%;
    aspect-ratio: 1/1;
    margin: 80px auto;
    background-image: conic-gradient(green 0%, green 20%, orange 20%, orange 40%, gray 40%,
            gray 70%, blue 70%, blue 90%, hotpink 90%, 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;
    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;
}

#samples-parent figure:nth-child(7) h3 {
    text-shadow: -3px 4px 6px orangered;
    margin: 80px auto;
    text-align: center;
    font-size: 2em;
}

#samples-parent figure:nth-child(8) h3 {
    margin: 80px auto;
    text-align: center;
    font-size: 3em;
    width: 80%;
    border: 2px solid red;
    transform: rotate(180deg) skewY(5deg);
}

#samples-parent figure:nth-child(9) {
    background-color: yellowgreen;
    transition: background-color .6s linear;
}

#samples-parent figure:nth-child(9):hover {
    background-color: orangered;
}

#samples-parent figure:nth-child(9):hover h2{
    top: 100px;
}

