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

body {
    font-family: "Public Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    font-size: 18px;
    width: 100vw;
    height: 100vh;

    /* temp fix for overflowing content */
    overflow-x: hidden;
}

:root {
    /* ------------- primary --------------  */
    --dark-blue: hsl(233, 26%, 24%);
    --lime-green: hsl(136, 65%, 51%);
    --bright-cyan: hsl(192, 70%, 51%);
    
    /* ---------- Neutral --------------- */
    --grayish-blue: hsl(233, 8%, 62%);
    --light-grayish-blue: hsl(220, 16%, 96%);
    --very-light-gray: hsl(0, 0%, 98%);
    --white: hsl(0, 0%, 100%);
}


/* <!-- Feel free to remove these styles or customise in your own stylesheet 👍 --> */

.attribution { font-size: 11px; text-align: center; }
.attribution a { color: hsl(228, 45%, 44%); }

section {
    width: 100%;
}





/* --------------- header ------------------ */

header {
    padding: 0 8%;
    position: relative;
    background-color: var(--white);
    z-index: 2;
}

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

header nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
    align-items: center;
}

header nav ul li a {
    text-decoration: none;
    padding: 35px 0;
    display: inline-block;
    border-bottom: 2px solid linear-gradient(green, red);
    color: var(--grayish-blue);
    position: relative;
}

header nav ul li a::after {
    display: none;
    content: '';
    height: 3px;
    width: 100%;
    background-image: linear-gradient(to right, var(--lime-green),  var(--bright-cyan));
    position: absolute;
    bottom: 0;
    left: 0;
}

header nav ul li a:hover {
    color: var(--dark-blue);
}

header nav ul li a:hover::after {
    display: inline-block;
}

.btn-primary {
    text-decoration: none;
    color: var(--white);
    padding: 15px 40px;
    background-image: linear-gradient(to right, var(--lime-green), var(--bright-cyan));
    border-radius: 30px;
    font-weight: 400;
    display: inline-block;
}

.btn-primary:hover {
    background-image: linear-gradient(to right, hsl(136, 86%, 66%), hsl(192, 89%, 66%));
}

.menu-open {
    display: none;
    cursor: pointer;
}

.menu-close {
    display: none;
    cursor: pointer;
}

/* ----------- main cta ----------- */

.main-cta {
    display: flex;
    gap: 60px;
    background-color: var(--very-light-gray);
    background-image: url(images/bg-intro-desktop.svg);
    background-position: 520px -100px;
    background-repeat: no-repeat;
    padding: 0 8% 0;
    position: relative;
    z-index: 1;
}

.main-cta-text {
    padding: 130px 0;
    max-width: calc(50% - 30px);
}

.main-cta-text h1 {
    font-size: 3.5em;
    color: var(--dark-blue);
    margin-bottom: 30px;
    font-weight: 400;
    line-height: 1.2em;
}

.main-cta-text p {
    margin-bottom: 40px;
    color: var(--grayish-blue);
    line-height: 1.5em;
    gap: 20%;
}

.main-cta-img {
    max-width: calc(50% - 30px);
    position: relative;
}

.main-cta-img img {
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-5%, -15%);
}

/* --------- about info section ------------- */

.about-info {
    padding: 140px 8%;
    background-color: var(--light-grayish-blue);
}

section h2 {
    font-size: 2.5em;
    font-weight: 400;
    margin-bottom: 30px;
    color: var(--dark-blue);
}

.about-info > p {
    margin-bottom: 80px;
    max-width: 60%;
    color: var(--grayish-blue);
    line-height: 1.5em;
}

.about-info ul {
    display: flex;
    gap: 40px;
    list-style: none;
}

.about-info ul li {
    flex-shrink: 0;
    flex-grow: 0;
    flex-basis: calc(25% - 30px);
}

.about-info ul li img {
    margin-bottom: 40px;
}

.about-info ul li h3 {
    font-size: 1.5em;
    font-weight: 400;
    margin-bottom: 20px;
}

.about-info ul li p {
    color: var(--grayish-blue);
    line-height: 1.5em;
}

@media (max-width: 1100px) {
    
    .about-info {
        padding: 140px 40px;
    }
    
    .about-info ul {
        row-gap: 80px;
        column-gap: 40px;
        flex-wrap: wrap;
    }
    
    .about-info ul li {
        flex-basis: calc(50% - 20px);
    }
}

@media (max-width: 750px) {
    section h2 {
        text-align: center;
    }

    .about-info ul {
        row-gap: 60px;
    }

    .about-info > p {
        max-width: 100%;
        text-align: center;
        display: inline-block;
        margin-bottom: 120px;
    }

    .about-info ul li {
        flex-basis: 100%;
        text-align: center;
    }
}



/* --------------- articles ------------------ */

.articles {
    padding: 140px 8%;
    background-color: var(--very-light-gray);
}

.articles h2 {
    margin-bottom: 60px;
}

.article-container {
    display: flex;
    gap: 20px;
    list-style: none;
}

.article-container li {
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: calc(25% - 15px);
    background-color: var(--white);
    border-radius: 5px;
    height: fit-content;
    cursor: pointer;
}

.article-container li:hover h3 {
    color: var(--lime-green);
}

.article-container li img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    margin-bottom: 20px;
}

.article-text {
    padding: 20px;
}

.article-text p {
    color: var(--grayish-blue);
    margin-bottom: 15px;
    line-height: 1.5em;
}

.article-text h3 {
    margin-bottom: 20px;
    font-weight: 400;
    line-height: 1.2em;
}

@media (max-width: 1100px) {
    .articles {
        padding: 140px 40px;
    }

    .article-container {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .article-container li {
        flex-basis: calc(50% - 20px);
    }

    .article-container li img {
        width: 100%;
        height: 300px;
        object-fit: cover;
        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
        margin-bottom: 20px;
    }
}

@media (max-width: 750px) {
    .article-container li {
        flex-basis: 100%;
    }
}


/* ------------- footer ------------- */

footer {
    padding: 50px 8%;
    background-color: var(--dark-blue);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer ul {
    list-style: none;
}

.footer-left {
    display: flex;
    gap: 100px;
    align-items: center;
}

.footer-left-one ul {
    margin-top: 60px;
    display: flex;
    gap: 20px;
}

.social-icons:hover path {
    fill: var(--lime-green);
}

.footer-left-two {
    display: flex;
    gap: 100px;
}

.footer-left-two ul li {
    margin-bottom: 20px;
}

.footer-left-two ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 300;
}

.footer-left-two ul li a:hover {
    color: var(--lime-green);
}

.footer-right {
    text-align: right;
}

.footer-right p {
    margin-top: 30px;
    color: var(--grayish-blue);
}

@media (max-width: 1100px) {
    header {
        padding: 0 40px;
    }

    .main-cta {
        display: flex;
        background-color: var(--very-light-gray);
        background-image: url(images/bg-intro-desktop.svg);
        background-position: 42vw -35vh;
        background-repeat: no-repeat;
        background-size: 80%;
        padding: 0 0 0 40px;
        position: relative;
        z-index: 1;
    }

    footer {
        padding: 50px 40px;
    }
}

@media (max-width: 950px) {
    .menu-open {
        display: inline-block;
    }

    header nav {
        padding: 20px 0;
    }

    .main-btn {
        display: none;
    }

    .mobile-nav-container {
        width: 100%;
        height: calc(100vh - 64px);
        position: fixed;
        background-image: linear-gradient(rgba(0, 0, 0, 0.534), transparent);
        top: 64px;
        bottom: 0;
        left: 0;
        padding: 40px;
        display: none;
    }
    
    header nav ul {
        display: none;
        align-items: center;
        display: block;
        width: 100%;
        text-align: center;
        background-color: var(--white);
        border-radius: 5px;
        padding: 40px 0;
        height: fit-content;
    }
    
    header nav ul li a {
        padding: 20px 0;
        display: block;
        color: var(--dark-blue);
        font-weight: 400;
    }
    
    header nav ul li a::after {
        height: 0;
        width: 0;
    }
    
    header nav ul li a:hover {
        color: var(--dark-blue);
        background-color: var(--bright-cyan);
    }

    .main-cta {
        flex-direction: column;
        background-image: url(images/bg-intro-mobile.svg);
        background-position: top;
        background-size: 100%;
        padding: 0 40px 130px;
        position: relative;
        z-index: 1;
        gap: 0;
    }
    
    .main-cta-text {
        order: 1;
        padding: 0;
        max-width: 100%;
        text-align: center;
    }
    
    .main-cta-img {
        order: 0;
        max-width: 100%;
        margin-top: -30%;
        margin-bottom: 120px;
    }
    
    .main-cta-img img {
        width: 100%;
        position: static;
        transform: translate(0);
    }
}

@media (max-width: 500px) {

    /* body {
        font-size: 15px;
    } */

    header {
        padding: 0 20px;
    }

    .mobile-nav-container {
        padding: 20px;
    }

    .main-cta {
        padding: 0 20px 130px;
    }

    .about-info {
        padding: 140px 20px;
    }

    .articles {
        padding: 140px 20px;
    }

    footer {
        padding: 50px 20px;
    }
}

@media (max-width: 950px) {
    footer {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-left {
        gap: 40px;
        flex-direction: column;
    }
    
    .footer-left-two {
        gap: 0;
        flex-direction: column;
        margin-bottom: 40px;
    }
    
    .footer-right {
        text-align: center;
    }
}