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

:root {
    /* Layout */
    --mobile: 375px;
    --desktop: 1440px;

    /* Font */
    --title-font-size: 2.1rem;
    --p-font-size: .75rem;
    --p-padding: .5em 0;
    --p-line-height: 1.65em;

    --regular: 400;
    --bold: 700;
    --extra-bold: 800;

    /* Primary */
    --soft-orange: hsl(35, 77%, 62%);
    --soft-red: hsl(5, 85%, 63%);

    /* Neutral */
    --off-white: hsl(36, 100%, 99%);
    --light-grey: hsl(233, 8%, 79%);
    --dark-grey: hsl(236, 13%, 42%);
    --dark-blue: hsl(240, 100%, 5%);

    /* Sizes */
    --xs: 0.5rem;
    --s: 1rem;
    --m: 1.5rem;
    --l: 2rem;
    --xl: 2.5rem;
    --xxl: 3rem;
    --xxxl: 4rem;

}
html, body {
    height: 100%;
}

body {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    background-color: var(--off-white);
}

.page-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    min-height: 100vh
}

.container {
    padding: var(--s);

}

.header {
    grid-area: header;
    padding: 0;
}

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

.menu__icon {
    width: 45px;
}

.nav__toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--xs);
    z-index: 1;
}

.nav {
    position: absolute;
    display: none;
    flex-direction: column;
    top: 0;
    right: var(--s);
    background-color: var(--off-white);
    box-shadow: -270px 100px 100px 100px rgba(0, 0, 0, 0.5);
    height: 200%;
    width: 62%;
    padding: var(--l) 0;
}

.nav__list {
    list-style-type: none;
    margin-top: 45%;
}

.nav__link {
    color: var(--dark-blue);
    text-decoration: none;
    padding: 0.75rem 0;
    display: block;
}

.nav__link:hover,
.nav__link:focus {
    color: var(--soft-red);
    transition: color -.3s ease;
}

.nav.open {
    display: block;
}

.nav--active {
    display: flex;
}

.hero {
    grid-area: hero;
}

.hero__image {
    width: 100%;
}

.title {
    color: var(--dark-blue);
    font-size: var(--title-font-size);
    font-weight: var(--extra-bold);
    line-height: var(--xl);
    padding: .5em 0 .2em;
}

p {
    color: var(--dark-grey);
    line-height: var(--p-line-height);
    font-size: var(--p-font-size);
    font-weight: var(--regular);
    padding: var(--p-padding);
}

.hero__p {
    margin-bottom: var(--m);
}

.hero__button {
    background-color: var(--soft-red);
    color: var(--dark-blue);
    font-size: .7rem;
    font-weight: var(--bold);
    letter-spacing: .4ch;
    text-decoration: none;
    text-transform: uppercase;
    padding: 1em 2.5em;
}

.hero__button:hover,
.hero__button:focus {
    background-color: var(--dark-blue);
    color: var(--off-white);
    transition: color -.3s ease;
}

.new-news--section {
    background-color: var(--dark-blue);
    color: var(--off-white);
    margin: var(--s);
    margin-top: var(--xxxl);
    grid-area: sidebar;
}

.new-news__title {
    color: var(--soft-orange);
    font-weight: var(--bold);
    margin-bottom: var(--l);
}

.new-news__sub-title__link {
    color: var(--off-white);
    text-decoration: none;
}

.new-news__sub-title__link:hover,
.new-news__sub-title__link:focus {
    color: var(--soft-orange);
    transition: color -.3s ease;
}

.new-news__p {
    color: var(--light-grey)
}

.hr {
    border-top: var(--dark-grey) 1px solid;
    margin: var(--l) 0;
}

.top-news--section {
    grid-area: cards;
}

.top-news__cards--container {
    margin: var(--xxl) 0;
}

.top-news--card + .top-news--card {
    margin-top: var(--m);
}

.top-news--card {
    display: flex;
    align-items: flex-start;
    gap: var(--s);
}

.top-news__img--div {
    width: 30%;
}

.top-news__img {
    max-width: 100%;
}

.top-news__info--div {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-content: flex-end;
    width: 65%;
}

.top-news__info__link {
    text-decoration: none;
}

.top-news__sub-title {
    color: var(--dark-blue);
}

.top-news--card:hover .top-news__sub-title,
.top-news--card:focus .top-news__sub-title {
    color: var(--soft-red);
    transition: color -.3s ease;
}

.top-news__num {
    color: var(--soft-red);
}

.top-news__sub-title {
    color: var(--dark-blue);
    font-size: var(--s);
    font-weight: var(--extra-bold);
}

@media (min-width: 768px) {
        
    .title {
        font-size: var(--xl);
        line-height: var(--xxl);
        padding: 0;
    }
}

@media (min-width: 768px) {
    .page-wrapper {
        display: grid;
        align-content: center;
        grid-template-columns: repeat(3, 1fr);
        grid-template-areas:
        "header header header"
        "hero   hero  sidebar"
        "hero   hero  sidebar"
        "cards  cards   cards"
    }

    .header {
        padding: var(--l) 0 var(--s) var(--s);
    }

    .nav__link {
        color: var(--dark-grey)
    }
    
    .nav,
    .header--container,
    .nav--container {
        display: flex;
        justify-content: flex-end;
        padding: 0;
    }
    
    .nav {
        position: relative;
        box-shadow: none;
    }
    
    .nav__toggle {
        display: none;
    }
    
    .nav__list {
        display: flex;
        margin: 0;
        gap: var(--xl);
    }

    .hero__text--div {
        display: flex;
        margin-top: 5%;
    }

    .title--div {
        width: 52%;
    }

    .p-btn--div {
        width: 48%;
    }

    .new-news--section {
        margin-top: var(--s);
    }

    .new-news--container {
        margin: var(--xs);
    }

    .top-news__cards--container {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        width: 100%;
        margin-top: 0;
    }
    
    .top-news__info--div {
        display: flex;
        align-content: flex-start;
        padding-left: 0;
        width: 30%;
    }
    
    .top-news__num {
        font-size: var(--m);
    }

    .top-news__sub-title{
        font-size: var(--s);
    }

    .top-news__p {
        font-size: var(--s);
    }
    
}

@media (min-width: 1080px) {
    
    .title {
        font-size: 3.7rem;
        line-height: var(--xxxl);
    }

    .hero__p {
        font-size: var(--s);
    }

    .hero__button {
        font-size: var(--s);
    }

    .new-news--container {
        padding: var(--m);
    }

    .new-news__title {
        font-size: var(--xl);
    }

    .new-news__p {
        font-size: var(--s);
    }
    
    .top-news__cards--container {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
        margin: 0;
        padding: 0;
    }
    
    .top-news--card + .top-news--card {
        margin-top: var(--s);
    }
    
    .top-news--card {
        flex: 1;
        margin: var(--s);
    }

    .top-news__info--div {
        padding-left: 0;
        width: 100%;
    }

    .top-news__sub-title {
        padding: 0;
    }
}

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