/* Styles for Module 4 Pages started Monday 10.16 */

* {
    margin: 0; padding: 0; border: 0; box-sizing: border-box;
}

body {
    background-color: grey;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

h1 {
    text-align: center;
    font-weight: normal;
    text-transform: lowercase;
    border-left: 4px solid black;
    border-bottom: 4px solid black;
    margin: 8px 8px 40px 8px;
    padding: 8px;
    transform: rotate(-3deg);
    border-radius: 0px 0px 0px 16px;
}

#samples-parent {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    padding: 20px;
}

#samples-parent figure {
    border: 8px solid turquoise;
    aspect-ratio: 2/1.5; /* providing a square shape regardless of the width */
    flex-grow: 0;
    flex-basis: 30%; /* kinda like width */
    margin-bottom: 16px;
    border-radius: 16px 0px 16px 0px;
    position: relative;
}

/* descendent selector */
figure h2 {
    position: absolute;
    top: 12px; left: -5%;
    background-color: hsla(220 50% 0% / .7);
    color: blueviolet;
    width: 110%; /* little larger than parent width */
    text-align: center;
    padding: 4px 0;
}

figure figcaption {
    position: absolute;
    top: 80%; left: 0;
    width: 100%; height: 20%;
    background-color: hsla(214, 98%, 51%, 0.651);
    color: blueviolet
    border-radius 0 0 24px 0;
    text-align: left;
    padding: 8px;
    border-radius: 0px 0px 8px 0px;
}

#samples-parent figure:nth-child(1) {
    border-radius: 40% 40% 32px 0;
    border: 16px solid turquoise;
}

#samples-parent figure:nth-child(2) {
    overflow: hidden;
}

#samples-parent figure:nth-child(3) {
}

#samples-parent figure:nth-child(3) img {
    width: 100px; height: 100px;
    object-fit: contain;
}

#samples-parent figure:nth-child(4) div {
    width: 30%;
    aspect-ratio: 1/1;
    border: 4px solid red;
    margin: 80px auto;
    background-image: repeating-radial-gradient(blue 0px, blue );
}  


#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(blue 0px, blue 10px 10px);
}

#samples-parent figure:nth-child(6) {
    width: 100px; height: 100px;
    object-fit:scale-down;
}