* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    text-decoration: none;
    list-style: none;
    box-sizing: border-box;
}

:root {
    --color-primary: #6c63ff;
    --color-success: #00bf8c;
    --color-warning: #f7c94b;
    --color-danger: #f75842;
    --color-danger-variant: rgba(247, 88, 66, 0.4);
    --color-white: #fff;
    --color-light: rgba(255, 255, 255, 0.7);
    --color-black: #000;
    --color-bg: #1f2641;
    --color-bg1: #2e3267;
    --color-bg2: #424890;

    --container-width-lg: 80%;
    --container-width-md: 90%;
    --container-width-sm: 94%;

    --transition: all 400ms ease;
}

html, body {
    overflow-x: hidden;
    height: 100%;
}

body {
    font-family: "montserrat", sans-serif;
    line-height: 1.7;
    color: black;
    background: white;
}

.container {
    width: var(--container-width-lg);
    margin: 0 auto;
}

section {
    padding: 6rem 0;
}

section h2 {
    text-align: center;
    margin-bottom: 4rem;
}

h1, h2, h3, h4, h5 {
    line-height: 1.6;
}

h1 {
    font-size: 2.2rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.8rem;
}

h4 {
    font-size: 1.4rem;
}

a {
    color: var(--color-white);
}

img {
    display: block;
}

.logo {
    margin-left: -9.4rem;
}

.logo a img  {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
}
.btn {
    display: inline-block;
    background: var(--color-white);
    color: var(--color-black);
    padding: 1rem 2rem;
    border: 1px solid transparent;
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-primary {
    background: var(--color-danger);
    color: var(--color-white);
}

/*-------------navbar---------*/
nav {
    background: transparent;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 11;
    transition: var(--transition);
    background: var(--color-bg);
}

.nav-hidden {
    transform: translateY(-100%);
}
/* CHANGE NAVBAR STYLES ON SCROLL USING JAVASCRIPT*/
.window-scroll {
    background: var(--color-primary);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.3);
}

.nav__container {
    position: relative;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav button {
    display: none;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 3rem;
    top: 5rem;
    height: fit-content;
    width: 18rem;
}

.nav__menu a {
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav__menu a:hover,
.nav__menu a.active {
    color: var(--color-bg2);
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    flex-direction: column;
    background: var(--color-bg1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 350px;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content li {
    padding: 10px;
    white-space: nowrap;
}

.dropdown-content a {
    padding: 10px 15px;
    display: block;
    color: var(--color-white);
    text-decoration: none;
}

.dropdown-content a:hover {
    background: var(--color-bg2);
}

.dropdown:hover .dropdown-content {
    display: block;
}


/*===========================SUVNAVBAR======================*/

.subnav__wrapper {
    width: 100vw;
    overflow-x: auto;
    overflow-y: hidden;
    background: #1b223c;
    padding-top: 4rem;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.subnav__wrapper::-webkit-scrollbar {
    display: none;
}

.subnav__container {
    display: inline-block;
    padding: 1rem 1rem;
    min-width: max-content;
}

.subnav__menu {
    display: inline-flex;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: max-content;
}

.subnav__menu li a {
    display: inline-block;
    color: #fff;
    padding: 0.5rem 1rem;
    text-decoration: none;
    white-space: nowrap;
    font-size: 1rem;
}

.subnav__menu li a:hover {
    cursor: pointer;
    transform: scale(1.05);
    color: var(--color-bg1);
}

/*===================HIDE SCROLL BAR======================*/
.subnav__container::-webkit-scrollbar {
    display: none;
}

.subnav__container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.head {
    color: red;
    text-align: center;
}

.mcq-section {
    background: white;
    color: var(--color-white);
    padding: 4rem 0;
}

.mcq-container {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
    align-items: start;
}

.mcq-sidebar {
    background: radial-gradient(white, rgb(20, 68, 107));;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.mcq-sidebar h3 {
    margin-bottom: 1.5rem;
    color: var(--color-white);
}

.exam-list li {
    margin-bottom: 1rem;
}

.exam-list a {
    display: block;
    padding: 0.75rem 1rem;
    background: radial-gradient(white, rgb(27, 107, 90));;
    color: black;
    border-radius: 5px;
    transition: var(--transition);
    text-align: center;
}

.exam-list a:hover,
.exam-list a.active {
    background: var(--color-primary);
    color: var(--color-white);
}

.mcq-main {
    background: radial-gradient(white, #14446b);;;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: var(--color-black);
}

.mcq-main ul li {
    border: 1px solid #14446b;
}

#start-screen {
    text-align: center;
}

#timer {
    font-weight: bold;
    color: var(--color-danger);
    text-align: center;
    margin-bottom: 2rem;
}

#question-container h4 {
    margin-bottom: 1.5rem;
}

.correct {
    background: green !important;
    color: white;
}

.incorrect {
    background-color: red !important;
    color: white;
}

#options li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#options input[type="radio"] {
    margin-right: 1rem;
} */


.mcq-main button {
    background: var(--color-primary);
    color: var(--color-white);
}
.mcq-main button {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    margin-top: 2rem;
}

.mcq-main button:hover {
    background: var(--color-bg2);
}

#previous-btn {
    margin-right: 1rem;
}

#results, #welcome {
    text-align: center;
}

#results h3 {
    margin-bottom: 1rem;
    color: var(--color-success);
}

#welcome h3 {
    margin-bottom: 1rem;
}

.exam-list ul li {
    color: #000;
}
/*================FOOTER=================*/
footer {
    background: var(--color-bg1);
    padding-top: 5rem;
    font-size: 0.9rem;
    color: var(--color-white);
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5rem;
}

.footer__container > div h4 {
    margin-bottom: 1.2rem;
}

.footer__1 p {
    margin: 0 0 2rem;
    font-size: 1rem;
}

.footer__1 h5 {
    font-size: 1.3rem;
}

footer ul li {
    margin-bottom: 0.7rem;
}

footer ul li a:hover {
    text-decoration: underline;
}

.footer__socials {
    display: flex;
    gap: 1rem;
    font-size: 1.2rem;
    margin-top: 2rem;
}

.footer__copyright {
    text-align: center;
    margin-top: 4rem;
    padding: 1.2rem 0;
    border-top: 1px solid var(--color-bg2) ;
}

/*=================================MEDIA QUERIES(TABLETS)==================================*/

@media (max-width: 1280px) {
    .container {
        width: var(--container-width-md);
    }

    .logo {
        margin-left: -4rem;
    }

}


@media (max-width: 1024px) {
    .container {
        width: var(--container-width-md);
    }

    h1 {
        font-size: 2.3rem;
    }

    h2 {
        font-size: 1.9rem;
    }

    h3 {
        font-size: 1.7rem;
    }

    h4 {
        font-size: 1.5rem;
    }

    h5 {
        font-size: 1.3rem;
    }

    p {
        font-size: 1rem;
    }

/*=====================NAVBAR=====================*/

    nav button {
        display: inline-block;
        background: transparent;
        font-size: 1.8rem;
        color: var(--color-white);
        cursor: pointer;
    }

    nav button#close-menu-btn {
        display: none;
    }

    .nav__menu {
        position: absolute;
        top: 5rem;
        right: 5%;
        height: fit-content;
        width: 18rem;
        flex-direction: column;
        gap: 0;
        display: none;
        margin-right: 0;
    }

    .nav__menu li {
        width: 100%;
        height: 5.8rem;
        animation: animateNavItems 400ms linear forwards;
        transform-origin: top right;
        opacity: 0;
    }

    .nav__menu li:nth-child(2) {
        animation-delay: 200ms;
    }

    .nav__menu li:nth-child(3) {
        animation-delay: 400ms;
    }

    .nav__menu li:nth-child(4) {
        animation-delay: 600ms;
    }

    @keyframes animateNavItems {
        0% {
            transform: rotateZ(-90deg) rotateX(90deg) scale(0.1);
        }
  
        100% {
            transform: rotateZ(0) rotateX(0) scale(1);
            opacity: 1;
        }
    }

    .nav__menu li a {
        background: var(--color-primary);
        box-shadow: -4rem 6rem 10rem rgba(0, 0, 0, 0.6);
        width: 100%;
        height: 100%;
        display: grid;
        place-items: center;
    }

    .nav__menu li a:hover {
        background: var(--color-bg2);
        color: var(--color-white);
    }

    .logo {
        width: 54px;
        height: 54px;
        margin-left: -3rem;
    }
    /*=====================SUBNAVBAR=====================*/
    .subnav__wrapper {
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .subnav__container {
        display: inline-block;
        padding: 1rem;
        min-width: max-content;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .subnav__container::-webkit-scrollbar {
        display: none;
    }

    .subnav__menu {
        display: inline-flex;
        gap: 1rem;
        padding: 0;
        margin: 0;
        min-width: max-content;
        list-style: none;
    }
    .mcq-container {
        grid-template-columns: 1fr 2fr;
        gap: 1.5rem;
    }

    .mcq-sidebar {
        padding: 1.5rem;
    }

    .mcq-main {
        padding: 1.5rem;
    }
   

    
    /*=====================FOOTER=====================*/
    .footer__container {
        grid-template-columns: 1fr 1fr;
    }
}

/*=================================MEDIA QUERIES(PHONES)==================================*/

@media (max-width: 820px) {
    .container {
        width: var(--container-width-md);
    }

    .logo {
        margin-left: -2.3rem;
    }
    

}

@media (max-width: 768px) {
    .container {
        width: var(--container-width-sm);
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.6rem;
    }

    h4 {
        font-size: 1.4rem;
    }

    h5 {
        font-size: 1.2rem;
    }

    p {
        font-size: 0.9rem;
    }

    .logo {
        width: 48px;
        height: 48px;
        margin-left: -1.2rem;
    }

    .mcq-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .mcq-sidebar {
        padding: 1rem;
    }

    .mcq-main {
        padding: 1rem;
    }

    #timer {
        font-size: 1.2rem;
    }

    #question-container h4 {
        font-size: 1.2rem;
    }
    

    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer__1 p {
        margin: 1rem auto;
    }

    .footer__socials {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .container {
        width: var(--container-width-sm);
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    h4 {
        font-size: 1.2rem;
    }

    h5 {
        font-size: 1.1rem;
    }

    p {
        font-size: 0.9rem;
    }


    .logo {
        width: 44px;
        height: 44px;
        margin-left: -0.8rem;
    }

    

    .mcq-section {
        padding: 2rem 0;
    }

    .mcq-sidebar h3 {
        font-size: 1.4rem;
    }

    .exam-list a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /*=====================FOOTER=====================*/
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer__1 p {
        margin: 1rem auto;
    }

    .footer__socials {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        width: var(--container-width-sm);
    }

    .logo {
        width: 40px;
        height: 40px;
        margin-left: -0.6rem;
    }

    .mcq-sidebar {
        padding: 0.75rem;
    }

    .mcq-main {
        padding: 0.75rem;
    }

    #timer {
        font-size: 1rem;
    }

    #question-container h4 {
        font-size: 1rem;
    }

    #options span {
        font-size: 1rem;
    }

    .footer__container {
        gap: 1rem;
    }

    .footer__socials {
        gap: 0.5rem;
        font-size: 1rem;
    }
}