body {
    font-family: sans-serif, 'Times New Roman', Arial;
    background-color: #f9f9f9;
}

.no_mobile_show {
    display: none;
}

/* The skip to main part css is referred from homework 3 of mine */
.skip a {
    position: absolute;
    top: -65px;
    left: 0;
    padding: 6px;
    background: yellow;
    transition: top 1s ease-out;
}

.skip a:focus {
    top: 0px;
}

header {
    display: flex;
    align-items: center;
    background-color: #003366;
}

/* location for logo */
.logo {
    float: left;
}

h1 {
    max-width: 300px;
    margin: 0 auto;
    font-size: 1.5em;
    padding: 20px 10px;
    color: white;
    text-align: center;
}

/* I first tried to make a hamburger menu but it did not work out. So I only made a normal and workable version here. */
nav {
    background-color: #eeeeee;
    padding: 5px 0px;
}

.navigation {
    margin: 0 auto;
    margin-top: 10px;
    margin-left: auto;
    width: 220px;
    text-align: center;
    padding-left: 10px;
}

.navigation li {
    /* border: 4px dashed #003366; */
    margin-bottom: 5px;
}

.navigation a {
    text-decoration: none;
    color: black;
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    display: block;
}

.navigation a.active {
    background-color: #003366;
    color: white;
    font-weight: bold;
}

.navigation li:hover {
    /* just want to remove border here */
    border: 0px solid orange;
    text-decoration: underline;
}

.navigation a:hover {
    background-color: orange;
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

section {
    padding: 5px 20px 5px 20px;
    font-size: 22px;
    line-height: 1.2;
}

h2 {
    text-align: center;
    font-size: 32px;
    color: #003366;
    margin-bottom: 5px;
}

h3 {
    text-align: center;
    font-size: 1.4em;
    color: #003366;
    margin-top: 30px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    margin-top: 10px;
    /* justify-content: center; */
}

.item1 {
    border: 2px solid #dddddd;
    padding: 10px;
}

.item2 {
    grid-column: 2;
    justify-self: center;
    border: 5px solid #333333;
    padding: 5px;
}

.item3 {
    text-align: center;
    padding-top: 20px;
}

.item3 img {
    width: 66.66%;
    max-width: 100%;
}

.item_list {
    list-style-type: disc;
    padding-left: 20px;
    grid-column: 1;
}

.item_list a:hover {
    color: orange;
}

.item_list#popular-resources {
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.item_list#popular-resources li {
    border: 2px solid #003366;
    padding: 10px;
    border-radius: 8px;
    background-color: #f0f8ff;
    transition: transform 0.3s ease;
}

.item_list#popular-resources li:hover {
    transform: scale(1.05);
    background-color: #e6f2ff;
}

.item_list#popular-resources p:hover {
    transform: none;
}

.item_list#develop-application {
    list-style-type: upper-roman;

}

.item_list_vertical {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.item_list_vertical li {
    border: 2px solid #003366;
    padding: 10px;
    border-radius: 8px;
    background-color: #f0f8ff;
    transition: transform 0.3s ease;
}

.item_list_vertical li:hover {
    transform: scale(1.05);
    background-color: #e6f2ff;
}

.item_list_vertical a:hover {
    color: orange;
}

.item_list_decimal {
    list-style-type: decimal;
    padding-left: 20px;
    grid-column: 1;
}

main li {
    margin-bottom: 10px;
    margin-top: 10px;
}

li a {
    text-decoration: none;
    color: #003366;
    font-weight: bold;
}

.grid-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    list-style-type: disc;
    margin-left: 20px;
}

footer {
    background-color: #003366;
    color: white;
    text-align: center;
    padding: 10px 0;
    position: relative;
}

footer a {
    text-decoration: none;
    color: white;
    font-weight: bold;
}

footer.page404 {
    position: fixed;
    bottom: 0;
    width: 100%;
}

.error-page {
    text-align: center;
    padding: 50px 20px;
}

.error-message h2 {
    font-size: 30px;
    color: #003366;
    margin-bottom: 20px;
}

.error-message p {
    font-size: 20px;
    color: #555;
    margin-bottom: 20px;
}

.error-navigation ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.error-navigation a {
    text-decoration: none;
    color: #0066cc;
    font-size: 20px;
    font-weight: bold;
}

.error-navigation a:hover {
    text-decoration: underline;
}

@media screen and (min-width: 800px) {
    h1 {
        max-width: 400px;
        font-size: 1.6em;
    }

    section {
        padding: 10px 30px 10px 30px;
        font-size: 24px;
    }

    .navigation {
        width: 500px;
    }

    .navigation a.active {
        background-color: #eeeeee;
        color: #003366;
        text-decoration: underline;
    }

    .navigation a:hover {
        background-color: #eeeeee;
        color: orange;
    }

    .navigation li:hover {
        text-decoration: none;
    }

    .grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
        justify-content: center;

    }

    .item1 {
        grid-column: span 3;
        justify-self: center;
        width: 80%;
        max-width: 80%;
    }

    .item1.no_tablet_show {
        display: none;
    }

    .item1#no_mobile_show {
        grid-column: span 3;
        display: block;
    }

    .grid-values {
        padding-left: 50px;
        padding-right: 50px;
    }

    .item2 {
        grid-column: 2 / span 4;
    }


    .item_list {
        padding-top: 20px;
        grid-column: span 2;
    }

    .item_list a:hover {
        color: orange;
    }

    .item_list#popular-resources {
        grid-template-columns: repeat(3, 1fr);
        margin-top: -10px;
    }

    .item_list#resume-resources {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 0;
        list-style: none;
    }

    .item_list#resume-resources li {
        background-color: #f7f9fc;
        border: 1px solid #dce3e8;
        border-radius: 8px;
        padding: 15px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .item_list#resume-resources li:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    }

    .item_list#resume-resources a {
        text-decoration: none;
        color: #003366;
    }

    .error-message h2 {
        font-size: 60px;
    }

    .error-message p {
        font-size: 30px;
    }

    .error-navigation a {
        font-size: 30px;
    }
}