:root{
    --soft-orange: hsl(35, 77%, 62%);
    --soft-red: hsl(5, 85%, 63%);
    --off-white: hsl(36, 100%, 99%);
    --grayish-blue: hsl(233, 8%, 79%);
    --dark-grayish-blue: hsl(236, 13%, 42%);
    --very-dark-blue: hsl(240, 100%, 5%);
}

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

img{
    max-width: 100%;
}

body{
    font-size: clamp(0.9rem, 1.2vw, 0.9375rem); 
    /* font-size: 0.9375rem; */
    font-family: "Inter", sans-serif;
    display: flex;
    justify-content: center;
    flex-direction: row;
    background-color: white;
    font-weight: 500;
    color: var(--dark-grayish-blue);
    margin: 1.5rem 1rem 4rem; 
}

.container{
    max-width: 21rem; 
}

/* header section */
header{
    position: relative;
}

.nav-container{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo-img{
    width: 2.8rem;
}

/* navigation */
nav{
    position: fixed;
    right: 0;
    top: 0;
    background-color: var(--off-white);
    height: 100vh;
    width: 15.625rem;
    z-index: 10;
    overflow: hidden;
    padding: 1rem;
    transform: translateX(100%);
    transition: transform 0.5s ease;
}

nav.toggle{
    transform: translateX(0);
}

.nav-menu{
    margin: 8rem 0;
}

.nav-menu .nav-list{
    list-style-type: none;
    margin: 2rem 0;
}

.nav-menu .nav-link{
    text-decoration: none;
    color: var(--very-dark-blue);
    font-weight: 500;
    font-size: 1.3rem;
    transition: all 0.2s ease;
}

.nav-link:hover{
    color: var(--soft-red);
}

/* Overlay filter */
.overlay{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background-color: rgba(0, 0, 0, 0.3);
    display: none;
}

/* Open and close button */
.open-btn{
    z-index: 1;
}

.close-btn{
    position: absolute;
    right: 1rem;
}

/* Banner Section */
.banner{
    background-image: url(./images/image-web-3-mobile.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: 18.7rem;
    margin: 1.5rem 0;
}

.text h1{
    font-weight: 800;
    font-size: 3rem;
    line-height: 1;
    max-width: 17rem;
    color: var(--very-dark-blue);
}

.text-btn p{
    margin: 1rem 0 1.5rem;
    line-height: 1.8;
}

/* Button */
.text-btn button{
    background-color: var(--soft-red);
    border: none;
    outline: none;
    padding: 0.9rem 2rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--very-dark-blue);
    letter-spacing: 0.1875rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease-in;
}

.text-btn button:hover{
    background-color: var(--very-dark-blue);
    color: var(--off-white);
}

/* Aside */
aside{
    background-color: var(--very-dark-blue);
    padding: 1.2rem;
    margin: 4rem 0;
}

#news-update-title{
    font-size: 1.8rem;
    color: var(--soft-orange);
}

.aside-txt{
    padding: 1.5rem 0;
}

.aside-txt:last-child{
    padding: 1.5rem 0 0;
}

.aside-txt h3{
    color: var(--off-white);
    font-weight: 700;
    line-height: 1.8;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.aside-txt h3:hover{
    color: var(--soft-orange);
}

.aside-txt p{
    line-height: 1.8;
}

hr{
    background-color: var(--dark-grayish-blue);
    border-color: var(--dark-grayish-blue);
}

/* Latest Section */
.latest-update{
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 2rem;
}

.latest-img{
    width: 6.2rem;
    height: 8rem;
}

.row{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.column h4{
    color: var(--soft-red);
    font-weight: 700;
    font-size: 1.9rem;
    cursor: pointer;
    transition: all 0.3s linear;
}

.column h4:hover{
    color: var(--soft-orange);
}

.column h5{
    color: var(--very-dark-blue);
    font-weight: 800;
    font-size: 1rem;
    line-height: 2;
    white-space: none;
}

.column p{
    line-height: 1.7;
}

@media(min-width: 48rem) and (max-width: 68.125rem){
    body{
        margin: 3rem 0 2rem;
    }

    .large-screen-size{
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.8rem;
        margin: 2rem 0 4rem;
    }

    .container{
        max-width: 88%;
    }

    .banner{
        height: 13rem;
        margin: 0;
        margin-block-end: 1rem;
    }

    /* Aside section */
    aside{
        margin: 0;
    }

    /* Texts */
    .text h1 {
        font-weight: 800;
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .text-btn p {
        margin: 1rem 0;
        line-height: 1.5;
    }

    .latest-update{
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
} 

@media(min-width: 68.1875rem){
    body{
        margin: 4rem 0;
    }
    header{
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .banner{
        background-image: url(./images/image-web-3-desktop.jpg);
        margin: 0;
    }

    .container{
        max-width: 67.5rem;
    }

    .large-screen-size{
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 1.8rem;
        margin: 2rem 0 4.5rem;
    }

    /* Logo Image */
    .logo-img{
        width: 100%;
    }

    /* Navigation */
    nav{
        position: relative;
        top: 0; 
        padding: 0;
        height: auto;
        right: auto;
        transform: translateX(0);
        background-color: transparent;
        width: 100%;
    }

    .nav-menu{
        display: flex;
        justify-content: flex-end;
        gap: 3rem;
        margin: 0;
        padding: 0;
    }

    .nav-list{
        display: flex;
    }

    .nav-list .nav-link{
        font-size: 0.9375rem;
    }

    /* Open and close btn */
    .open-btn{
        display: none;
    }

    .close-btn{
        display: none;
    }

    /* Aside section */
    aside{
        margin: 0;
    }

    #news-update-title{
        font-weight: 700;
        font-size: 2.5rem;
    }

    .aside-txt h3{
        font-size: 1.2rem;
    }

     /* Banner Section */
    .text h1{
        font-size: 3.3rem;
        letter-spacing: 0.0625rem;
    }

    .text-btn p {
        margin: 0;
    }

    .text{
        display: flex;
        gap: 5rem;
        margin-block-start: 2rem;
    }

    .txt{
        flex: 1;
    }

    .text-btn{
        display: flex;
        flex-direction: column;
        align-items: start;
        gap: 2rem;
        /* margin: 0 2rem; */
    }

    .latest-update{
        flex-direction: row;
    }  
}