/* Sonagnon Dossa, ITWP-1050, Homework 4: 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);
}

/*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;
    }

/* hover rotate for main image */
.rotate-img:hover {
    animation: spin180 0.5s linear infinite;
}

@keyframes spin180 {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(180deg);
    }
}

/* scaling the house image on hover to make it bigger*/
.scale-img {
    transition: transform 0.5s ease-in-out;
    display: block;
    margin: 3rem auto;          /*add space above and below to avoid overlapping the text */
}

.scale-img:hover {
    transform: scale(2);
    display: block;
    margin: 3rem auto;
}

/* skew h2 on hover */
.skew-h2:hover {
    transform: skew(20deg, 5deg);
}
.skew-h2 {
    transition: transform 0.4s ease-in-out;
}

/*multiple transforms on paragraph hover */
.transform-h1 {
    transition: transform 0.6s ease-in-out;
}

.transform-h1:hover {
    transform: scale(1.1) rotate(-2deg) skewX(5deg);
}

/* transition with background color, delay and duration applied to the paragraphs*/
.transition-text {
    background-color: #feffdb;
    transition-property: background-color;
    transition-duration: 1s;
    transition-delay: 0.5s;
    
}

.transition-text:hover {
    background-color: #f0e98c;
}