* {
    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;
}

h1, h2, h3, h4, h5 {
    line-height: 1.2;
}

h1 {
    font-size: 2.4rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.8rem;
    padding-top: 1.5rem;
}

h4 {
    font-size: 1.6rem;
    padding-top: 1rem;
}

h5 {
    font-size: 1.4rem;
}

p {
    font-size: 1.2rem;
    margin: 0 1rem; 
}

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;
}

section p {
    padding-top: 1rem;
}

/*-------------CATEGORIES---------*/

.categories {
    width: 85%;
    font-size: 20px;
    transition: var(--toc-transition);
}

.subart h1 {
    padding-top: 2rem;
}

.h_p p {
    padding-bottom: 2rem;
}

/* PDF Viewer Styles */
.pdf-viewer {
    margin-top: 2rem;
}

.pdf-container {
    margin-top: 1rem;
    max-width: 70%;
    height: 600px; 
    overflow-y: auto; 
    overflow-x: hidden; 
    border: 2px solid var(--color-bg2); 
    border-radius: 8px;
    padding: 1rem;
    background: var(--color-white);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    scrollbar-width: thin; 
    scrollbar-color: var(--color-primary) var(--color-light);
}

.pdf-container::-webkit-scrollbar {
    width: 8px;
}

.pdf-container::-webkit-scrollbar-track {
    background: var(--color-light);
}

.pdf-container::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

.pdf-container img {
    max-width: 100%; /* Images fit the container width */
    height: auto; /* Maintain aspect ratio */
    margin-bottom: 1rem; /* Space between pages */
    display: block;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

article {
    padding-top: 2rem;
}

.subart {
    font-size: 20px;
} 

.pdf a {
    color: rgb(226, 62, 12);
    text-decoration: underline;
}

.pdf a:hover,
.pdf a.active {
    color: #bf5600;
}
/*================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;
}

.footer__2,
.footer__3 a {
    font-size: 1rem;
}

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;
    }


/*=====================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;
    }

    .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-bg);
        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;
    }

    .categories {
        width: auto;
    }
    
    
    .category_left {
        width: auto;
    }

    /*=====================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;
    }

    .logo {
        width: 48px;
        height: 48px;
        margin-left: -1.2rem;
    }

    .nav__menu {
        right: 4%;
    } 

    .categories {
        width: auto;
    }
    

    .category_left {
        width: auto;
    }

    .pdf-container {
        max-width: 100%;
        height: 400px;
    }

    .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);
    }

    section h1 {
        font-size: 2rem;
    }

    section h2 {
        font-size: 1.6rem;
    }

    section h3 {
        font-size: 1.4rem;
    }

    section h4 {
        font-size: 1.2rem;
    }

    section h5 {
        font-size: 1.1rem;
    }

    p {
        font-size: 1rem;
    }

    

    .nav__menu {
        right: 3%;
    }

    .logo {
        width: 44px;
        height: 44px;
        margin-left: -0.8rem;
    }


    .categories {
        width: auto;
    }


    .category_left {
        width: auto;
    }

    .pdf-container {
        width: auto;
        height: 350px; 
        padding: 0.8rem; 
    }
    .pdf-container img {
        margin-bottom: 0.8rem; 
    }

    /*=====================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);
    }

    section h1 {
        font-size: 1.9rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    section h3 {
        font-size: 1.3rem;
    }

    section h4 {
        font-size: 1.1rem;
    }

    section h5 {
        font-size: 1rem;
    }
    
    .nav__menu {
        right: 2%;
    }

    .logo {
        width: 40px;
        height: 40px;
        margin-left: -0.6rem;
    }
    .categories {
        width: auto;
    }


    .category_left {
        width: auto;
    }

   .pdf-container {
        width: auto;
        height: 300px; 
    }

    .footer__container {
        gap: 1rem;
    }

    .footer__socials {
        gap: 0.5rem;
        font-size: 1rem;
    }

}

