
header, footer {
    color: black;
    background-color: BlanchedAlmond;
    width: 50%;
    text-align: center;
    border: double 4pt BurlyWood;
    border-radius: 60px;
    padding: 1%;
    margin: 0 auto;
}

.container {
    position: relative;
    margin: 0 auto;
    text-align: center;
    max-width: 90%;
}

.image-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
}

.image-container img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

main section {
    background-color: AntiqueWhite;
    border: solid 4pt BurlyWood;
    border-radius: 30px;
    margin: 5px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 30px;
}

main section h2 {
    color: SaddleBrown;
    font-variant: small-caps;
    text-align: center;
    margin-bottom: 20px;
}

.menu, .menu ul {
    line-height: 1;
    margin: 0;
    padding: 0;
    list-style-type: none;
}

.menu {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: AntiqueWhite;
    border: solid 2pt BurlyWood;
    border-radius: 30px;
    overflow: hidden; 
    transition: all 0.3s ease;
}

.menu ul > li {
    display: block;
    position: relative;
    float: left;
}

.menu li > a {
    display: block;
    color: #000;
    padding: 16px;
    width: 130px;
    text-align: center;
    font-size: 15px;
    font-weight: 300;
    transition: all 0.5s ease;
}

.menu li:hover > a {
    background: AntiqueWhite;
    border: solid 2pt BurlyWood;
    border-radius: 30px;
}

.dropdown {
    display: none;
}

.menu li:hover > ul {
    top: 47px;
    left: 0;
    opacity: 1;
    z-index: 999;
    position: absolute;
    background: AntiqueWhite;
    transition: all 0.3s ease;
}

#JQuery {
    width: 40%;
    background-color: AntiqueWhite;
    border: solid 4pt BurlyWood;
    border-radius: 30px;
    padding: 20px;
    margin: 20px auto;
}

#text {
    position: relative;
    left: 10px;
    max-width: 100%;
    overflow: hidden;
}

.flex-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.flex-container section {
    flex: 1 1 auto;
    margin: 10px;
    background-color: AntiqueWhite;
    border: solid 4pt BurlyWood;
    border-radius: 30px;
    padding: 20px;
    min-width: 300px;
    box-sizing: border-box;
    z-index: 900;
}

#topicList {
    position: relative;
    z-index: 1;
}


@media (max-width: 600px) {
    header, footer {
        width: 90%;
        padding: 2%;
    }

    .image-container {
        flex-direction: column;
    }

    .menu ul > li {
        float: none; /* Stack items vertically */
        width: 100%; /* Full width */
    }

    .menu li > a {
        padding: 10px;
        width: 100%; /* Full width for touch-friendly links */
    }

    .menu li {
        width: 100%;
        text-align: center;
    }

    .flex-container {
        flex-direction: column;
    }

    .flex-container section {
        width: 100%;
        margin: 10px 0;
    }

    #JQuery {
        width: 80%;
        margin: 20px auto;
    }
}

@media (min-width: 601px) and (max-width: 1200px) {
    header, footer {
        width: 70%;
    }

    .flex-container {
        flex-direction: row;
    }

    .flex-container section {
        width: 45%;
    }

    #JQuery {
        width: 60%;
    }
}

@media (min-width: 1201px) {
    header, footer {
        width: 50%;
    }

    .flex-container {
        flex-direction: row;
    }

    .flex-container section {
        width: 30%;
    }

    #JQuery {
        width: 40%;
    }
}
