html {
    font-family: "Bai Jamjuree";
    font-size: 18px;
}

body {
    background: url("./images/bg-header-desktop.png") top right no-repeat;
    background-size: contain;
}

header, section {
    max-width: 38.5rem;
    margin: 0 auto;
    text-align: center;
}

.btns {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem
}

.btns button {
    padding: 0.75rem 2rem;
    border-radius: 2rem;
    color: #fff;
}

.btns button:first-child {
    background-color: hsl(171, 66%, 44%);
    box-shadow: 0 3px 0 1px #1FA48F;
}

.btns button:last-child {
    background-color: hsl(233, 100%, 69%);
    box-shadow: 0 3px 0 1px #5161DA;
}

.logo {
    margin: 7.1rem 0 3.75rem;
}

h1, h2, h3, h4 {
    color: hsl(210, 10%, 33%);
    font-weight: 600;
}

h1 {
    font-size: 2.4rem;
}

h2 {
    font-size: 1.9rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

main {
    margin: 8.5rem 0 7.75rem;
}

header > p, main > section:nth-child(8) > p {
    margin: 1.5rem 0 2.75rem;
}

p {
    line-height: 1.6;
}

p {
    color: hsl(201, 11%, 66%);
    font-size: 1.12rem;
}

main > section:nth-child(2) {
    max-width: 100vw;
    margin: 4.5rem 0 8.5rem;
    display: flex;
    flex-direction: row;
    text-align: left;
    gap: 6.1rem;
}

section > p {
    font-size: 1rem;
}

main > section:nth-child(2) article {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 25%;
}

main > section:nth-child(2) article p {
    font-size: 0.9rem;
}

main > section:nth-child(4) {
    max-width: none;
    margin: 6.5rem 0 3.5rem;
}

main > section:nth-child(6), main > section:nth-child(7) {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    max-width: 61.5rem;
    margin: 3.5rem auto;
    gap: 1rem;
}

main > section:nth-child(6) > article {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;    
}

article > p {
    font-size: 0.9rem;
}

section:nth-child(6) > article > img {
    height: 2.2rem;
    margin-bottom: 2.5rem;
}

main > section:nth-child(7) {
    margin: 9rem auto;
}

main > section:nth-child(7) > img {
    object-fit: contain;
}

/* Footer */
footer {
    background-color: #F5F6F8;
    padding: 2.5rem 0;
}

footer > section, footer ul, footer .left, footer .right {
    display: flex;
    flex-direction: row;
}

footer .logo {
    margin: 0;
}

footer .logo img {
    width: 3.1rem;
}

footer i {
    color: hsl(210, 10%, 33%);
}

footer > section {
    max-width: 61.5rem;
    margin: 0 auto;
    justify-content: space-between;
}

footer .right {
    gap: 1rem;
    align-items: center;
}

footer ul li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
    color: hsl(210, 10%, 33%);
}

footer ul {
    justify-content: space-around;
    width: 144%;
    margin-left: 7rem;
}

/* Active */

button:hover {
    opacity: 0.7;
}

footer a:hover, footer i:hover {
    color: hsl(171, 66%, 44%);
}

/* Mobile */ 

@media (max-width: 768px) {
    header, main {
        padding: 0 5%;
    }

    main > section:nth-child(2) article {
        width: 100%;
        text-align: center;
        margin: 1rem auto;
    }

    main > section:nth-child(4) img {
        width: 100%;
    }

    .btns, main > section:nth-child(2), main > section:nth-child(6), main > section:nth-child(7) {
        flex-direction: column;
    }

    footer section, footer .left, footer ul {
        flex-direction: column;
        align-items: center;
    }

    footer ul {
        gap: 1rem;
    }

    footer .right, footer section {
        gap: 2rem;
    }

    footer nav {
        display: flex;
    }

    footer ul {
        margin: 0;
    }

    footer ul li {
        align-items: center;
    }

    footer .right {
        align-items: center;
        justify-content: space-between;
        width: 50%;
    }

    main > section:nth-child(7) > img {
        object-fit: none;
    }

    main > section:nth-child(7) {
        gap: 0;
    }
}


