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

body {
    font-family: 'Oswald', Arial, Helvetica, sans-serif;
    color: var(--nav-color);
}

:root {
    --nav-color: #393939;
    --soft-text-color: #39393999;
    --alt-text-color: #2D2D2D;
    --fb-color: #1B7BFD;
    --twitter-color: #42C0F5;
    --ig-color: #C23785;
    --yt-color: #EF5043;
    --orange1-color: #EF5043;
    --orange2-color: #F65050;
    --orange3-color: #FE4A51;
    --purple-color: #A56CBD;
    --green-color: #2ECC71;
    --blue1-color: #0088FF;
    --brown-color: #997C00;
    --blue2-color: #49CFE8;
    --purple2-color: #4C60F5;
    --blue3-color: #0088FF;
    --white-accent: #FFFFFF4D;

    --alt-font-family1: 'Sofia Sans', Arial, sans-serif;
    --alt-font-family2: 'Sofia', Arial, sans-serif;
    --alt-font-family3: 'Montaga', Arial, sans-serif;

    --nav-font-size: 1.25rem;
    --nav2-font-size: 0.75rem;
    --normal-font-size: 0.9375rem;
    --soft-text-size: 0.8rem;
}

.container {
    height: 100vh;
    padding: 1rem 5rem;
}

.header, .nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
}

.left, .left > * {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-family: var(--alt-font-family1);
    font-size: var(--nav-font-size);
}

.weather {
    gap: 0.5rem;
}

.right {
    display: flex;
    gap: 1rem;
    text-align: center;
}

.right > i {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 1.5rem;
    height: 1.5rem; 
}

.right > i:first-of-type {
    background-color: var(--fb-color);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: white;
}

.right > i:nth-of-type(2) {
    background-color: var(--twitter-color);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: white;
}

.right > i:nth-of-type(3) {
    background-color: var(--ig-color);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: white;
}

.right > i:last-of-type {
    background-color: var(--yt-color);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: white;
}

.mobile-nav {
    font-size: 1.5rem;
    display: flex;
}

.sidebar {
    height: 100vh;
    padding: 1rem;
    display: none;
}

.sidebar > .categories {
    width: 100%;
    text-align: center;
    line-height: 2.2;
    padding-bottom: 7rem;
}

.sidebar > .categories > .active {
    background-color: var(--orange2-color);
    margin: 1rem;
    color: white;
}

.logos {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.logos > i {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 1.5rem;
    height: 1.5rem;
}

.logos > i:first-of-type {
    background-color: var(--fb-color);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: white;
}

.logos > i:nth-of-type(2) {
    background-color: var(--twitter-color);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: white;
}

.logos > i:nth-of-type(3) {
    background-color: var(--ig-color);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: white;
}

.logos > i:last-of-type {
    background-color: var(--yt-color);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: white;
}

.hide {
  display: none;
}

.visible {
  display: block;
}
/* END OF HEADER */

/* NAVBAR */
.nav-bar {
    background-color: var(--nav-color);
    color: white;
    position: relative;
}

.nav-bar::after {
    content: "";
    position: absolute;
    top: 0;
    right: 18%;
    width: 1px;
    height: 100%;
    background-color: var(--white-accent);
}

.nav-bar nav {
    display: flex;
    gap: 2rem;
    box-sizing: border-box;
}

.nav-bar nav > .home {
    background-color: var(--orange2-color);
    margin: -2rem;
    padding: 2rem;
    position: relative;
}

nav > .home::after {
    content: ""; /* this creates an empty pseudo element */
    position: absolute; /* to position the pseudo element */
    bottom: 1.5rem;
    left: 2.3rem;
    width: 30%;
    border-bottom: 1px solid white;
}

nav > h3:first-of-type {
    margin-left: 2rem;
}

nav > i {
    align-self: center;
    margin-left: -1rem;
}

.search {
    position: relative; /* to position the search icon */
    margin: -2rem; /* this cancels out the navbar padding */
    display: flex;
    justify-content: end;
    font-size: 0.6rem;
}

.search > input {
    background-color: var(--nav-color);
    width: 100%; /* to fill the container */
    padding: 2rem;
    border: none; /* to remove the customer border around the input element */
}

.search > i {
    position: absolute;
    left: 11rem;
    bottom: 2rem;
    color: var(--white-accent);
    font-size: 1rem;
}
/* END OF THE NAVBAR */

.main1 {
    display: grid;
    grid-template-columns: 1fr 1fr; /* to automatically adjust based on available space */
    grid-gap: 1rem; /* to create a gap between the container */
    height: 100vh;
    padding-top: 4rem;
    width: 100%;
}

.hero-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto; 
    grid-gap: 1rem;
}

.hero-item3 {
    grid-column: 1 / span 2;
}

/* this styles are for the hero images */
.hero {
    background-image: url("./resources/Image1.png");
    background-size: cover; /* this ensures that the image covers the entire container without being distorted */
    background-position: center; /* centers the image within the container */
    background-repeat: no-repeat; /* prevents the image from repeating */
    position: relative; /* to give me access to move items within the container */
}

.hero-group > .hero-item1 {
    background-image: url("./resources/Image2.png");
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
}

.hero-group > .hero-item2 {
    background-image: url("./resources/Image3.png");
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
}

.hero-group > .hero-item3 {
    background-image: url("./resources/Image4.png");
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
}

/* this styles target the texts on the image */
.hero > .top {
    background-color: var(--blue3-color);
    width: 12%;
    color: white;
    font-family: var(--alt-font-family1);
    font-size: var(--soft-text-size);
    position: absolute;
    text-align: center;
    padding: 1rem;
    line-height: 0;
    letter-spacing: 0.05rem;
    top: 2rem;
    left: 3rem;
}

.hero > .second {
    position: absolute;
    font-family: var(--alt-font-family1);
    color: white;
    font-size: var(--normal-font-size);
    bottom: 11rem;
    left: 3rem;
}

.hero > .main {
    color: white;
    position: absolute;
    font-size: 1.3rem;
    width: 75%;
    text-transform: capitalize; /* to capitalize the first letter of each word */
    bottom: 3rem;
    left: 3rem;
}

.hero-item1 {
    position: relative;
}

.hero-item1 > .top {
    background-color: var(--brown-color);
    width: 25%;
    color: white;
    font-family: var(--alt-font-family1);
    font-size: var(--soft-text-size);
    position: absolute;
    text-align: center;
    padding: 0.9rem;
    line-height: 0;
    letter-spacing: 0.02rem;
    left: 3rem;
    top: 2rem;
}

.hero-item1 > .second {
    position: absolute;
    color: white;
    font-family: var(--alt-font-family2);
    width: 40%;
    font-size: 0.8rem;
    bottom: 3.5rem;
    left: 3rem;
}

.hero-item1 > .main {
    color: white;
    position: absolute;
    font-size: var(--soft-text-size);
    font-weight: normal;
    width: 70%;
    text-transform: capitalize;
    bottom: 1rem;
    left: 3rem;
}

.hero-item2 {
    position: relative;
}

.hero-item2 > .top {
    background-color: var(--blue3-color);
    width: 25%;
    color: white;
    font-family: var(--alt-font-family1);
    font-size: var(--soft-text-size);
    position: absolute;
    text-align: center;
    padding: 0.9rem;
    line-height: 0;
    letter-spacing: 0.02rem;
    left: 3rem;
    top: 2rem;
}

.hero-item2 > .second {
    position: absolute;
    color: white;
    font-weight: normal;
    font-family: var(--alt-font-family2);
    width: 45%;
    font-size: 0.8rem;
    bottom: 3.5rem;
    left: 3rem;
}

.hero-item2 > .main {
    color: white;
    position: absolute;
    font-size: var(--soft-text-size);
    font-weight: normal;
    width: 60%;
    text-transform: capitalize;
    bottom: 1rem;
    left: 3rem;
}

.hero-item3 {
    position: relative;
}

.hero-item3 > .top {
    background-color: var(--blue2-color);
    width: 12%;
    color: white;
    font-family: var(--alt-font-family1);
    font-size: var(--soft-text-size);
    position: absolute;
    text-align: center;
    padding: 1rem;
    line-height: 0;
    letter-spacing: 0.05rem;
    top: 2rem;
    left: 3rem;
}

.hero-item3 > .second {
    position: absolute;
    font-family: var(--alt-font-family1);
    color: white;
    font-size: var(--normal-font-size);
    bottom: 8rem;
    left: 3rem;
}

.hero-item3 > .main {
    color: white;
    position: absolute;
    font-size: 1.1rem;
    width: 65%;
    text-transform: capitalize;
    bottom: 2rem;
    left: 3rem;
}
/* this is the end of the first grid section that houses the four hero images on the webpage */


.main2 > .header {
    display: flex;
    align-items: center;
    padding: 4rem 0 1rem 0;
}

.main2 > .header > .left-text {
    color: var(--orange2-color);
    font-size: 1.4rem;
    position: relative;
}

.left-text::after {
    content: ""; 
    position: absolute;
    bottom: -0.7rem;
    left: 0;
    width: 196%;
    border-bottom: 1px solid var(--orange2-color);
}

.header > .center-text {
    display: flex;
    gap: 2rem;
    position: relative;
    margin-left: 6rem;
}

.center-text::after {
    content: ""; 
    position: absolute;
    bottom: -1.25rem;
    width: 114.5%;
    left: -6rem;
    border-bottom: 1px solid var(--nav-color);
}

.center-text h5:first-child {
    background-color: var(--orange3-color);
    color: white;
    padding: 0.4rem 1rem;
    margin: -0.4rem;
}

.center-text h5:nth-child(2) {
    background-color: var(--purple-color);
    color: white;
    padding: 0.4rem 1rem;
    margin: -0.4rem;
}

.center-text h5:nth-child(3) {
    background-color: var(--green-color);
    color: white;
    padding: 0.4rem 1rem;
    margin: -0.4rem;
}

.center-text h5:nth-child(4) {
    background-color: var(--blue1-color);
    color: white;
    padding: 0.4rem 1rem;
    margin: -0.4rem;
}

.center-text h5:nth-child(5) {
    background-color: var(--brown-color);
    color: white;
    padding: 0.4rem 1rem;
    margin: -0.4rem;
}

.center-text h5:nth-child(6) {
    background-color: var(--blue2-color);
    color: white;
    padding: 0.4rem 1rem;
    margin: -0.4rem;
}

.center-text h5:nth-child(7) {
    background-color: var(--blue1-color);
    color: white;
    padding: 0.4rem 1rem;
    margin: -0.4rem;
}

.center-text h5:nth-child(8) {
    background-color: var(--purple2-color);
    color: white;
    padding: 0.4rem 1rem;
    margin: -0.4rem;
}

.header > .right-text {
    display: flex;
    gap: 3rem;
}

.right-text {
    position: relative;
    display: flex;
} 

.right-text > .h1 {
    color: var(--orange2-color);
}

.right-text > .h2 {
    display: flex;
    gap: 4rem;
    position: relative;
}

.right-text::after {
    content: ""; 
    position: absolute;
    bottom: -1.19rem;
    left: 0;
    width: 21%;
    border-bottom: 1px solid var(--orange2-color);
}

.right-text > .h2::after {
    content: ""; 
    position: absolute;
    bottom: -1.19rem;
    right: 0;
    width: 130%;
    border-bottom: 1px solid var(--nav-color);
}
/* end of second header styling */


.main2-group {
    display: grid;
    grid-template-columns: 1fr 1fr 20%;
    grid-gap: 3rem; 
    padding-top: 4rem;
}

.main2-group > .main2-left img {
    padding-bottom: 1.5rem;
    width: 100%;
}

.main2-left > .second {
    font-family: var(--alt-font-family1);
    font-size: 0.8rem;
    padding-bottom: 1rem;
}

.main2-left > .second > p > em {
    font-style: normal;
    color: var(--soft-text-color);
    font-family: var(--alt-font-family1);
}

.main2-left > h5 {
    font-size: 1.3rem;
}

.main2-left > p {
    color: var(--soft-text-color);
    font-size: var(--normal-font-size);
}

.main2-left > p::after {
    content: "....";
    color: var(--soft-text-color);
}

.main2-center > .main2-grid {
    display: grid;
    grid-template-columns: 20% 1fr;
    grid-gap: 1rem; 
    align-items: center;
    margin-bottom: 1rem;
}


.main2-grid > .image img {
    width: 100%;
}


.main2-grid > .second > p {
    color: var(--nav-color);
    font-size: var(--normal-font-size);
}

.main2-grid > .second > p > em {
    font-style: normal;
    color: var(--soft-text-color);
    font-family: var(--alt-font-family1);
}

.main2-grid > .second > h5 {
    font-size: 1.05rem;
    text-transform: capitalize;
    width: 80%;
}

.main2-right > .right-grid {
    display: grid;
    grid-template-columns: 30% 1fr;
    grid-gap: 1rem; 
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.right-grid > .second > p {
    color: var(--nav-color);
    font-size: 0.6rem;
}

.right-grid > .second > p > em {
    font-style: normal;
    color: var(--soft-text-color);
    font-family: var(--alt-font-family1);
}

.right-grid > .second > h5 {
    font-size: 0.95rem;
    text-transform: capitalize;
}

.footer {
    padding: 5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
}

.footer a {
    color: black;
}


/* MEDIA QUERY FOR MOBILE */
@media screen and (max-width: 600px) {
    .container{
        padding: 0;
    }

    .header,
    .main1 > .hero-group,
    .main2 {
        padding: 1rem;
    }

    .header > .left,
    .container > .nav-bar,
    .header > .right > i,
    .main2-group > .main2-left {
        display: none;
    }

    .main1 {
        padding-top: 0;
    }

    .hero > .top {
        width: 21%;
        left: 2rem;
    }

    .hero > .second {
        bottom: 6rem;
        left: 2rem;
        font-size: 0.8rem;
    }

    .hero > .main {
        font-size: 0.7rem;
        width: 86%;
        left: 2rem;
        bottom: 2rem;
    }

    .hero-item1 > .top,
    .hero-item2 > .top {
        width: 40%;
        left: 2rem;
        font-size: 0.5rem;
        letter-spacing: 0.1rem;
        top: 1rem;
        left: 2rem;
        padding: 0.6rem;
    }

    .hero-item1 > .second,
    .hero-item2 > .second {
        bottom: 3rem;
        left: 2rem;
        font-size: 0.4rem;
        width: 60%;
    }

    .hero-item1 > .main, 
    .hero-item2 > .main {
        font-size: 0.5rem;
        width: 70%;
        left: 2rem;
        bottom: 1rem;
    }

    .hero-item3 > .top {
        width: 20%;
        left: 2rem;
        font-size: 0.5rem;
        letter-spacing: 0.1rem;
        top: 1rem;
        left: 2rem;
        padding: 0.6rem;
    }

    .hero-item3 > .second {
        bottom: 4rem;
        left: 2rem;
        font-size: 0.6rem;
        width: 60%;
    }

    .hero-item3 > .main {
        font-size: 0.7rem;
        width: 70%;
        left: 2rem;
        bottom: 1rem;
    } 

    .main1, .main2-group {
        grid-template-columns: 1fr;
    }

    .main2 > .header > .left-text::after,
    .main2 > .header > .center-text::after {
        content: none;
    }

    .main2 .header {
        display: block;
    }

    .main2 .header > .center-text {
        margin: 0;
        overflow: hidden;
        gap: 1.2rem;
        width: 100%;
        white-space: nowrap; /* the text will not wrap to the next line and will remain in a single line */
        padding: 1rem 0;
    }

    .center-text h5 {
        padding: 1rem;
    }
    
    .header > .right-text {
        position: relative;
        top: 28rem;
        gap: 6rem;
    }

    .right-text > .h2 {
        gap: 6rem;
    }

    .right-text::after {
        width: 32%;
    }

    .main2-group {
        padding-top: 0;
    }

    .main2-grid > .second > p {
        font-size: 0.5rem;
    }

    .main2-grid > .second > h5 {
        font-size: 0.9rem;
    }

    .main2-group > .main2-right {
        margin-top: 3rem;
    }

    .main2-right > .right-grid {
        grid-template-columns: 20% 1fr;
    }

    .footer {
        padding: 2rem 0 4rem 0;
    }

}

@media screen and (min-width: 1200px) {
    .header > .right > .mobile-nav {
        display: none;
    }
}