* {
    margin: 0;
    padding: 0;
}

:root {
    --main: #6f42c1;
    --back: #ffffff;
    --ko: #23085a;
    --shadow: black;


}

body {
    background-color: var(--back);
}


nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
    border: 2px solid var(--main);
    border-radius: 1000px;
    margin: 10px;
    padding: 0 5px;
}

nav ul {
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

nav li {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

nav li:hover>a {
    background-color: var(--main);
    color: var(--back);
    border-radius: 1000px;
}

nav img {
    width: 50px;
    height: 50px;
    margin-right: 4px;
    border: 1px solid var(--back);
    border-radius: 5px;
    margin-left: 50px;
}

.navtext {
    color: var(--main);
    font-size: 18px;
    font-weight: bolder;
}


nav a {
    height: 100%;
    padding: 10px 26px;
    text-decoration: none;
    display: flex;
    align-items: center;
    color: var(--main);
    font-size: 14px;
    font-weight: 500;

}

nav li:first-child {
    margin-right: auto;
}

nav ul li ul li {
    width: 100%;
    padding: 2px 0;
    justify-content: center;
    align-items: center;
    box-shadow: 0px 0px 2px var(--main);
    border: 1.5px solid var(--main);
    border-radius: 6px;
    border-top: 0px;

}

nav ul li ul li a {
    padding: 15px 36px;
}


nav ul li ul {
    position: absolute;
    z-index: 2;
    width: 15%;
    display: none;
    justify-content: center;
    align-items: center;
    top: 60.6px;
    right: 475px;
    background-color: var(--back);

}

nav a svg {
    fill: black;

}

nav li:hover>a svg {
    fill: white;
}

nav ul li:focus-visible>ul,
nav ul li:hover>ul {
    display: initial;
}

/* Multi-level dropdown for Courses -> English/Computer/Math */
nav ul li ul li {
    position: relative;
    /* needed for sub-dropdown */
}

/* Second level dropdown */
nav ul li ul li ul {
    position: absolute;
    width: 225px;
    top: 20px;
    left: -227px;
    display: none;
    background-color: var(--back);
    border-radius: 6px;
    box-shadow: 0 0 2px var(--main);
    z-index: 1000;
}

/* Show second-level dropdown on hover */
nav ul li ul li:hover>ul {
    display: block;
}

/* Adjust links padding for sub-dropdowns */
nav ul li ul li ul li a {
    padding: 10px 30px;
    font-size: 14px;
    color: var(--main);
}

/* Hover effect for sub-dropdown links (same as your theme) */
nav ul li ul li ul li:hover>a {
    background-color: var(--main);
    color: var(--back);
    border-radius: 6px;
}


.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    /* Change height from auto to 100% or 100vh */
    height: 100vh;
    width: 250px;
    z-index: 999;
    background-color: var(--back);
    backdrop-filter: blur(10px);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    /* Adjusted shadow for better look */
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    /* ADD THESE TWO LINES */
    overflow-y: auto;
    /* Allows scrolling if list is long */
    overflow-x: hidden;
}

.sidebar li {
    width: 100%;
}

.sidebar li a {
    padding: 15px 25px;
    /* Increase padding for touch targets on mobile */
    width: 100%;
    display: block;
    /* Makes the whole area clickable */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Optional: adds separation */
}


.box {
    margin: 10px;
    width: auto;
    height: 85vh;
    padding: 10px;
}

.box-2 {
    margin: 10px;
    width: auto;
    height: 90vh;
    padding: 10px;
}

.sepration {
    height: 2px;
    width: auto;
    margin: 0 4px;

    background-color: var(--main);
    border-radius: 1000px;
}

.seprations {
    height: 2px;
    width: auto;
    margin: 0 4px;

    background-color: var(--back);
    border-radius: 1000px;
}

.button button {
    background-color: var(--back);
    border: 2px solid var(--main);
    border-radius: 5px;
    width: 13em;
    height: 3em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.button button a {
    text-decoration: none;
    color: var(--main);
    font-size: 16px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;


}

.button button:hover>a {
    color: var(--back);
}

.button button:hover {
    background-color: var(--main);
    box-shadow: 0px 0 10px rgba(0, 0, 255, 0.749),
        0px 0 10px rgb(255, 98, 124);
}

.buttons button {
    background-color: var(--main);
    border: 2px solid var(--main);
    border-radius: 5px;
    width: 13em;
    height: 3em;
    cursor: pointer;
    transition: all 0.2s ease;
}


.buttons button:hover {

    box-shadow: 0px 0 10px rgba(0, 0, 255, 0.749),
        0px 0 10px rgb(255, 98, 124);
}

.buttons button a {
    text-decoration: none;
    color: var(--back);
    font-size: 16px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

footer {
    background-color: var(--main);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 0 130px;
}

.footer a {
    text-decoration: none;
    padding: 10px;
    color: var(--back);
    font-size: 12px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.footer h2 {
    padding: 10px;
    color: var(--back);
    font-size: 14px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.bottom {
    width: 100%;
    border-top: 1px solid var(--back);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
}


.bottom div h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 15px;
    margin: 5px;
    color: var(--back);
    font-size: 18px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

}

.bottom div h3 {
    color: var(--back);
    font-size: 13px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.bottom div h2 img {
    padding-right: 5px;
}

.boofatofpe {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.teopfope {
    width: 600px;
    height: 400px;
    background-color: var(--back);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px;
    border-top-left-radius: 50px;
    border-bottom-right-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    cursor: pointer;
}

.teopfope a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.teopfope:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.4);
}

.teopfope img {
    width: 200px;
    height: auto;
}

.teopfope h2 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--main);
    font-size: 2.5rem;
    margin: 20px;
    text-align: center;
}

.teopfope h3 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--shadow);
    font-size: 1.6rem;
    margin: 20px;
    margin-top: 5px;
    text-align: center;
}

.teopfope h4 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--back);
    background-color: var(--main);
    padding: 10px;
    border-radius: 10px;
    font-size: 1.6rem;
    margin: 20px;
    margin-top: 5px;
    text-align: center;
}

.teopfope p {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--shadow);
    font-size: 1.2rem;
    margin: 10px;
    text-align: center;
}



.footer-items {
    margin: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

@media screen and (min-width: 1300px) {
    .displayonmobile {
        display: none;
    }
}

@media screen and (max-width:1300px) {

    .hideonmobile {
        display: none;
    }


    .navtext {
        font-size: 16px;
    }

    .button button {
        width: 11em;
        height: 2.7em;
        border: 1px solid var(--main);
    }

    .buttons button {
        width: 11em;
        height: 2.7em;
    }

    .footer-items {
        grid-template-columns: 1fr 1fr;
    }

    .footer {
        margin: 0px 35px;
    }

    .teopfope {
        width: 310px;
        height: 240px;
        margin: 10px;
    }

    .teopfope img {
        width: 105px;
    }

    .teopfope h2 {
        font-size: 1.2rem;
        margin: 10px;
    }

    .teopfope p {
        font-size: 1rem;
    }

    .boofatofpe {

        grid-template-columns: 1fr;
    }

    .boofatofpe .second-one {
        width: 310px;
        height: 380px;
    }

    .boofatofpe .second-one h3 {
        font-size: 1rem;
        margin: 0px;
        margin-top: 3px;
    }

    .boofatofpe .second-one h4 {
        font-size: 1rem;
        margin: 5px;
    }

}