/* Here is the navbar font-family import for Roboto and Space Grotesk */
/* Yash Bishnoi */

@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Space+Grotesk&display=swap');

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



/* navbar styles  */
nav {
    /* font family that we imported from google fonts */
    font-family: "Space Grotesk", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    padding: 1em;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 2px 5px #ff7200;


}

/* Navbar links styling */
nav a {
    text-decoration: none;
    text-transform: uppercase;
    color: black;
}

/* logo styling */
#logo {
    font-size: 1.2em;
    font-weight: 700;
    flex-shrink: 0;
    /*prevents logo from shrinking when the screen size is reduced */
}

/* Checkbox and .nav-label (Hamburger Menue) styling */
/* The checkbox (used for hamburger menu) is hidden by removing its default appearance using appearance: none */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
}


/* The .nav-label is also hidden initially with display: None */
.nav-label {
    display: none;
}


/* unordered list */
#navlist {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-grow: 1;
    padding: 0;
    margin: 0;
    gap: 1px;

}

/* List items */
#navlist li {
    margin: 0 1em;
}

/* Navbar Links */
#navlist a {
    text-decoration: none;
    color: black;
    text-transform: uppercase;
    padding: 0.5em;
}

/* Hover effects  */
#navlist a:hover {
    background-color: #ff7200;
    border-radius: 0.5em;
}


/* Active links styling */
/* Active class adds a white bottom border to highlight the currently active page in the navbar */
.active {
    border-bottom: 2px solid #ffffff;
}

/* Logo image styling */
#logo img {
    width: auto;
    height: 54.5px;
    transition: height 0.3s ease;
    /* for smooth resizing effect */
}

/* Media queries for Mobile view */
@media screen and (max-width: 950px) {

    nav {
        padding: 1em;
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
    }


    /* .nav-label hamburger menue */
    .nav-label {
        cursor: pointer;
        display: block;
    }

    /* Unordered list styling */
    #navlist {
        font-size: 1.2em;
        position: absolute;
        left: -100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background-color: #ffffff;
        gap: 2em;
        top: 87px;
        width: 100%;
        /* The links are centered and the menu takes full height of the screen */
        height: calc(100vh - 87px);
        transition: left 0.3s ease;

    }

    /* Checkbox interaction */
    input[type="checkbox"]:checked~#navlist {
        left: 0;
    }

    /* hover effect on the list */
    #navlist a:hover {
        background-color: #ff7200;
    }

}

@media screen and (min-width:951px) {
    input[type='checkbox'] {
        display: none;
    }

    .nav-label {
        display: none;
    }

    #navlist {
        display: flex;
        justify-content: center;

    }
}