/* Sonagnon Dossa, ITWP-1050, Homework 5: this styles sheet incorporate various selectors, transform, transitions, animations */

/* web font declaration*/
@font-face{
    font-family: 'Underdog-Regular';
    src: url('Underdog-Regular.ttf') format('truetype')
}

/* heading styles: applies center alignment, background image, custom font, shadow and more */
h1{
    text-align: center;
    font-size: 2.5em;
    color:#000000;
    background-image: url("h1-bckg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-clip: border-box;
    padding: 40px;
    font-family: 'Underdog-Regular' , Arial, sans-serif;
    text-shadow: 2px 2px 4px rgb(119, 128, 0);
    letter-spacing: 2px;
    font-variant: small-caps;
    white-space: nowrap;
}

/* heading 2 styles: applies custom font and other text styling */
h2{
    text-align: center;
    color: #000000;
    font-family: 'Underdog-Regular' , Arial, sans-serif;
}


/* This element controls the styling of the page body and linear background gradient */
body{
    text-align: center;
    margin: 25px; 
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1em;
    background: linear-gradient( to bottom, #ffffff, #fff7db );
    background-repeat: no-repeat;
    color: #000000;
}

/* Set line-height for paragraphs in the body */
p {
    line-height: 1.8;
}

/* This element sets the default text color for all elements on the page*/
*{
    color: #000000;
}

/*This element controls the styling of the footer section of the page*/
footer{
    margin-top: 50px;
    margin-bottom: 50px;
}

/*image styles*/
img{ /*this rules apply a border, rounded corner and center the image*/
    border: solid 1px black;
    border-radius: 10px;
    margin: auto;
    display: block;
    padding: 10px;
    box-shadow: 2px 2px 8px rgb(119, 128, 0);
    max-width: 100%; /* makes images responsive scale to fit the container */
    height: auto; 
}

/*external link styles*/
.external-link::after{  /*this pseudo-element adds "external" after the external link and style it*/
    content: "  (external) ";
    color: rgb(0, 19, 128);

}

/*validation section*/
#validation{    /*this ID selector centers the validation texts*/
    text-align: center;
    }

/* use of media query to change the font size of h1 and body on viewport 800px or less */
@media (max-width: 800px) {
    h1 {
        font-size: 1.8em;
    }

    body {
        font-size: 0.9em;
    }
}

/* change background color when the viewport is 600px or less */
@media (max-width: 600px) {
    body {
        background: #f0f8ff; 
    }
}

/* responsive flexbox section (5 items) */
.responsive-section {
    margin: 40px auto;
    padding: 20px;
    background-color:#f5e9d2;
    border: 1px solid #ccc;
    max-width: 1000px;
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 15px;
}

.item {
    flex: 1 1 150px;
    background-color: #d3e5c9;
    text-align: center;
    font-weight: bold;
    border-radius: 10px;
}

/* media query for small screens*/
@media screen and (max-width: 700px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
}

