:root
{
    --footer-background-color: rgb(48,48,48);
    --header-background-color: rgb(0,0,0);
    --header-and-button-text-color: rgb(255,255,255); /* er også baggrund til section.most-popular-houses */
    --main-backgound-color: rgb(200,200,200);
    --general-text-color: rgb(169,169,169);
}

@font-face {
    font-family: NunitoSans-Light;
    src: url(../fonts/NunitoSans-Light.ttf);
}
@font-face {
    font-family: NunitoSans-Regular;
    src: url(../fonts/NunitoSans-Regular.ttf);
}
@font-face {
    font-family: Lato-Regular;
    src: url(../fonts/Lato-Regular.ttf);
}
@font-face {
    font-family: Lato-Bold;
    src: url(../fonts/Lato-Bold.ttf);
}

h1{
    font-family: 'NunitoSans-Light', sans-serif;
}

h2, h3, h4, h5, h6
{
    font-family: 'NunitoSans-Regular', sans-serif;
}

p, a
{
    font-family: 'Lato-Regular', sans-serif;
}

footer p, footer a
{
    font-family: 'Lato-Bold', sans-serif;
}

/* Text font end */
/* General styling */

body
{
    margin: 0;
    padding: 0;
    width: 100vw;
}

img
{
    width: 100%;
}

h3, h1
{
    text-transform: uppercase;
}

p
{
    color: var(--general-text-color);
}

/* Header styling */

header
{
    display: flex;
    flex-direction: column;
    background-color: var(--header-background-color);
    color: var(--header-and-button-text-color);
}

figure
{     
    margin: 0;
    overflow: hidden;
}

header nav 
{
    margin: 0px 20px;
}

header ul
{
    display: flex;
    padding: 0;
    list-style: none;
    justify-content: space-between;
}

header a
{
    text-decoration: none;
    color: var(--header-and-button-text-color);
}

header img
{
    height: 120px;
    object-fit: cover;
    object-position: 100% 30%; 
    display: block;   
}

header img:nth-of-type(2)
{
    object-position: 100% 90%;       
    z-index: 5;
    display: none;
}

/* Main styling (as in <main>) */
main section
{
    padding: 20px 20px;
}

main .most-popular-houses
{
    background-color: var(--main-backgound-color);
}

.most-popular-houses article
{
    display: flex;
    flex-direction: column;
}

.most-popular-houses div
{
    background-color: var(--header-and-button-text-color);
    margin: 10px 0px;    
}

.most-popular-houses h3, .most-popular-houses p
{
    margin-left: 10%;
}

main section:last-child
{
    padding: 0;
}

.frontpage-see-all
{
    display: grid;
    grid-template-rows: repeat(3 fr);
    grid-template-columns: repeat(3 fr);
}

.frontpage-see-all img
{
    grid-column-start: 1;
    grid-column-end: 6;
    grid-row-start: 1;
    grid-row-end: 4;
    height: 60vmin;
    object-fit: cover;
    object-position: 30% 100%;
}

.frontpage-see-all button
{
    grid-column: 2/5;
    grid-row: 2;
    background: none;
    padding: 0.5rem;
    font-size: 1rem;
    color: var(--header-and-button-text-color);
    border-radius: 1.5rem;
    border-color: var(--header-and-button-text-color);
    transition: padding 0.5s;
}

.frontpage-see-all button:hover
{
    padding: 0.7rem;
}

/* Footer styling*/
footer
{
    background-color: var(--footer-background-color);
    display: flex;
    flex-direction: column;
}

footer img
{
    width: 50px;
    padding: 3px;
}

footer ul
{
    list-style: none;
}

footer > div:first-child
{
    align-self: flex-end;
}

footer > div:last-child
{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

footer > div:last-child > *
{
    padding: 10px;
    margin: 0;
}

footer a
{    
    color: var(--general-text-color);    
}

footer p
{
    margin: 0;
}

@media only screen and (min-width: 768px)
{
    h1, header ul
    {
        margin-bottom: 5px;
    }

    header img 
    {
        height: 35vh;
    }

    header nav 
    {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        margin: 0 4vw;
    }

    header li 
    {
        padding: 0 1rem;
    }

    main section 
    {
        padding-left: 4vw;
        padding-right: 4vw;
    }

    main section:first-of-type
    {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    main section:first-of-type article
    {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }

    main section:first-of-type p
    {
        font-size: 0.9rem;
        margin: 0.5rem;
    }

    .most-popular-houses article
    {        
        flex-direction: row;  
        justify-content: space-between;
    }

    .most-popular-houses div
    {
        width: 30%;
    }
}