@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

*{
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

body{
    background-color: hsl(233, 47%, 7%);
    font-family: 'Inter', sans-serif;
}

.container{
    margin: 6% 12%;
    display: flex;
    border-radius: 10px;
    background-color: hsl(244, 38%, 16%);
    flex-direction: row;
}

.item{
    width: 50%;
}

.text{
    padding: 5%;
}

.container img{
    width: 100%;
    height: 100%;
    
    object-fit: cover;
    border-bottom-right-radius: 10px;
    border-top-right-radius: 10px;
    z-index: 0;
}

.headerImage{
    background: url('/projects/stats-preview-card/images/image-header-desktop.jpg');
    background-repeat: no-repeat;
    z-index: 2;
    border-bottom-right-radius: 10px;
    border-top-right-radius: 10px;
    background-position: center;
    background-size: cover;
    height: auto;
}

h1{
    color: white;
}

.main-p{
    margin-top: 5%;
    color: hsla(0, 0%, 100%, 0.75);
}

.stats{
    color: hsla(0, 0%, 100%, 0.6);
    display: flex;
    margin-top: 6%;
    justify-content: space-between;
}

.purple-Colour{
    color: hsl(277, 64%, 61%);
}

.attribution{
    color: hsla(0, 0%, 100%, 0.6);
    padding: 20px;
}

a{
    font: bold;
}

@media (max-width:420px ) {
    body{
        text-align: center;
    }

    .container{
        flex-direction: column-reverse;
        margin: 6% 6%;
        border-radius: 10px;
    background-color: hsl(244, 38%, 16%);
    }
    .container img{
        width: 100%;
        height: 100%;
        
        border-top-right-radius: 10px;
        border-top-left-radius: 10px;
        border-bottom-right-radius: 0px;
        
    }
    .item{
        width: 100%;
    }
    .headerImage{
        background: url('/projects/stats-preview-card/images/image-header-mobile.jpg');
        border-bottom-right-radius: 0px;
        border-top-right-radius: 10px;
        border-top-left-radius: 10px;
        background-position: center;
        background-size: cover;
        height: auto;
        min-height: 250px;
    }
    
    .stats{ 
        flex-direction: column;
    }
    .stat-items{
        margin: 2% 0px;
        padding: 2%;
    }
}