* {
    box-sizing: border-box;
    color: #303030;
}

body {
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}

img {
    width: 10rem;
    display: block;
}

.navbar {
    display: flex;
    position: sticky;
    top: 0;
    width: 100%;
    justify-content: space-between;
    background-color: white;
    box-shadow: 0 5px gainsboro;
    z-index: 1; /*so hover won't pass through the nav bar*/
}

.navbar h4 {
    margin: 1rem;
}

.navlinks {
    display: flex;
    margin: 1rem;
    list-style-type: none;
    align-items: center;
    justify-content: end;
}

.navlinks li:first-of-type {
    border-right: 1px solid #303030;
}
.navlinks a {
    margin: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: #303030;
}

.welcome-section {
    padding-left: 1rem;
    padding-right: 1rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.component {
    display: flex;
    flex-direction: column;
    border: 1px solid #303030;
}

.component img {
    margin: 1rem auto;
    fill: #ffffff;
}

.component:hover {
    background-color: whitesmoke;
    color: black;
    filter: invert(100%) sepia(0%) saturate(7472%) hue-rotate(39deg) brightness(101%) contrast(100%);
    opacity: 0.7;
}

.component h3, .component p {
    margin-left: 1rem;
    margin-right: 1rem;
}

.component h3 {
    margin-top: -0.10rem;
}

.component p {
    margin-top: -0.25rem;
}

@media screen and (min-width: 100px) 
    and (max-width: 768px) {
    * {
        font-size: medium;
    }

    .grid-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .component > p {
        font-size: smaller;
    }
}
