* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    text-decoration: none;
    list-style: none;
    box-sizing: border-box;
}

:root {
    --color-primary: #6c63ff;
    --color-success: #00bf8e;
    --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-1g: 90%;
    --container-width-md: 90%;
    --container-width-sm: 94%;

    --transition: all 400ms ease;
    --border-radius: 5px;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.7;
    color: var(--color-white);
    background: var(--color-bg);
}

.container {
    width: var(--container-width-1g);
    margin: auto;
}

section {
    padding: 6rem 0;
}

section h2 {
    text-align: center;
    margin-bottom: 4rem;
}

h1,
h2,
h3,
h4,
h5 {
    line-height: 1.2;
}

h1 {
    font-size: 2.4rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.6rem;
}

h4 {
    font-size: 1.3rem;
}

a {
    color: var(--color-white);
}

img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* Navbar Style Using CSS */
.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);
    border-radius: var(--border-radius);
}

.btn:hover {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-primary {
    background: var(--color-danger);
    color: var(--color-white);
}

nav {
    background: transparent;
    width: 100vw;
    height: 5rem;
    position: fixed;
    top: 0;
    z-index: 11;
}

.test {
    display: flex;
}

.name_color {
    color: var(--color-success);
}

/* Change Navbar Styles on Scrolling Using Javascript */
.window-scroll {
    background-color: var(--color-bg1);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.3);
}

.nav_container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav button {
    display: none;
}

.nav_menu {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.nav_menu a {
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav_menu a:hover {
    color: var(--color-bg2);
}

/* Header Style Using CSS */
header {
    position: relative;
    top: 5rem;
    overflow: hidden;
    height: 70vh;
    margin-bottom: 5rem;
}

.header_container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 5rem;
    height: 100%;
}

.header_left p {
    margin: 1rem 0 2.4rem;
}

/* Categories Style Using CSS */
.categories {
    background: var(--color-bg1);
    height: 33rem;
}

.categories h1 {
    line-height: 1;
    margin-bottom: 3rem;
}

.categories_container {
    display: grid;
    grid-template-columns: 40% 60%;
}

.categories_left {
    margin-right: 4rem;
}

.categories_left p {
    margin: 1rem 0 3rem;
}

.categories_right {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.category {
    background: var(--color-bg2);
    padding: 2rem;
    border-radius: 20px;
    transition: var(--transition);
}

.category:hover {
    box-shadow: 0 3rem 3rem rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.category:nth-child(2) .category_icon {
    background: var(--color-danger);
}

.category:nth-child(3) .category_icon {
    background: var(--color-success);
}

.category:nth-child(4) .category_icon {
    background: var(--color-warning);
}

.category:nth-child(5) .category_icon {
    background: var(--color-success);
}

.category_icon {
    background: var(--color-primary);
    padding: 0.7rem;
    border-radius: 12px;
}

.category h5 {
    margin: 2rem 0 1rem;
}

.category p {
    font-size: 0.85rem;
}

/* Courses Style Using CSS */
.courses {
    margin-top: 10rem;
}

.courses_container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;

}

.course {
    background: var(--color-bg1);
    text-align: center;
    border: 1px solid transparent;
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.course:hover {
    background: transparent;
    border-color: var(--color-primary);
}

.popular_courses_image {
    border-radius: var(--border-radius);
}

.course_info {
    padding: 2rem;
}

.course_info p {
    margin: 1.2rem 0 2rem;
    font-size: 0.9rem;
}

/* FAQs Style Using CSS */
.faqs {
    background: var(--color-bg1);
    box-shadow: inset 0 0 3rem rgba(0, 0, 0, 0.5);
}

.faqs_container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.faq {
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    height: fit-content;
    background: var(--color-primary);
    cursor: pointer;
    border-radius: var(--border-radius);
}

.faq h4 {
    font-size: 1rem;
    line-height: 2.2;
}

.faq_icon {
    align-self: flex-start;
    font-size: 1.2rem;
}

.faq p {
    margin: 0.8rem;
    display: none;
}

.faq.open p {
    display: block;
}


/* Testimonials Style Using CSS */

.testimonials_container {
    overflow-x: hidden;
    position: relative;
    margin-bottom: 5rem;
}

.testimonials {
    padding-top: 2rem;
}

.avatar {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 0.3rem solid var(--color-primary);
}

.testimonial_info {
    text-align: center;
}

.testimonial_body {
    background: var(--color-primary);
    padding: 2rem;
    margin-top: 3rem;
    position: relative;
    border-radius: var(--border-radius);
}

.testimonial_body::before {
    content: "";
    display: block;
    background: linear-gradient(135deg,
            transparent,
            var(--color-primary),
            var(--color-primary),
            var(--color-primary));
    width: 3rem;
    height: 3rem;
    position: absolute;
    left: 46%;
    top: -1.5rem;
    transform: rotate(45deg);
}

/* Footer Style Using CSS */
.footer {
    background: var(--color-bg1);
    padding-top: 5rem;
}

.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 ul li {
    margin-bottom: 0.7rem;
}

footer ul li a:hover {
    text-decoration: underline;
}

.footer_socials {
    display: flex;
    gap: 1rem;
    font-size: 25px;
    margin-top: 2rem;
}

.rotate_icon:hover {
    transition: 0.70s;
    transform: rotate(360deg);
    -webkit-transform: rotate(360deg);
    -ms-transform: rotate(360deg);

}

.footer_copyright {
    background: var(--color-bg2);
    padding: 5px;
    box-shadow: inset 0 0 2rem rgba(0, 0, 0, 0.5);
}

.copyright_width {
    width: var(--container-width-1g);
    display: flex;
    margin: 0 5%;
    gap: 23rem;

}

.font_weight {
    font-weight: 500;
}

.active {
    font-weight: 700;
    box-shadow: inset 0 -3px 0 0 rgba(0, 255, 0, 0.70);
}

/* Media Queries for TABLETS */

@media screen and (max-width: 1024px) {
    .container {
        width: var(--container-width-md);
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    h4 {
        font-size: 1.2rem;
    }

    /* NAVBAR Style Using CSS */
    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: fixed;
        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: 100ms;
    }

    .nav_menu li:nth-child(3) {
        animation-delay: 200ms;
    }

    .nav_menu li:nth-child(4) {
        animation-delay: 300ms;
    }

    @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);

    }

    /* HEADER Style Using CSS */

    header {
        height: 52vh;
        margin-bottom: 4rem;
    }

    .header_container {
        gap: 0;
        padding-bottom: 3rem;
    }

    /* CATEGORIES Style Using CSS */

    .categories {
        height: auto;
    }

    .categories_container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .categories_left {
        margin-right: 0;
    }

    /* POPULAR COURSES Style Using CSS */

    .courses {
        margin-top: 0;
    }

    .courses_container {
        grid-template-columns: 1fr 1fr;
    }

    /* FAQ Style Using CSS */
    .faqs_container {
        grid-template-columns: 1fr;
    }

    .faq {
        padding: 1.5rem;
    }

    .testimonial_body::before {
        content: "";
        display: block;
        background: linear-gradient(135deg,
                transparent,
                var(--color-primary),
                var(--color-primary),
                var(--color-primary));
        width: 3rem;
        height: 3rem;
        position: absolute;
        left: 45%;
        top: -1.5rem;
        transform: rotate(45deg);
    }

    /* FOOTER Style Using CSS */
    .footer_container {
        grid-template-columns: 1fr 1fr;
        gap: 1rem 5rem;
        margin-bottom: 2rem;
    }

    .copyright_width {
        width: var(--container-width-md);
        gap: 9.6rem;
        margin: 0 5%;
    }
}

/* Media Queries for 960px */
@media screen and (max-width: 960px) {
    header {
        height: 69vh;
    }
}

/* Media Queries for PHONES */

@media screen and (max-width: 600px) {
    .container {
        width: var(--container-width-sm);
    }

    /* NAV MENU Style Using CSS */

    .nav_menu {
        right: 3%;
    }

    /* HEADER Style Using CSS */
    header {
        height: 100vh;
    }

    .header_container {
        grid-template-columns: 1fr;
        text-align: center;
        margin-top: 0;
    }

    .header_left p {
        margin-bottom: 1.3rem;
    }

    /* CATEGORIES Style Using CSS */
    .categories_right {
        grid-template-columns: 1fr 1fr;
        gap: 0.7rem;
    }

    .category {
        padding: 1rem;
        border-radius: 1rem;
    }

    .category_icon {
        margin-top: 4px;
        display: inline-block;
    }

    /* COURSES Style Using CSS */
    .courses_container {
        grid-template-columns: 1fr;
    }

    .testimonial_body {
        padding: 1.2rem;
    }

    .testimonial_body::before {
        content: "";
        display: block;
        background: linear-gradient(135deg,
                transparent,
                var(--color-primary),
                var(--color-primary),
                var(--color-primary));
        width: 3rem;
        height: 3rem;
        position: absolute;
        left: 44%;
        top: -1.5rem;
        transform: rotate(45deg);
    }

    /* FOOTER Style Using CSS */
    .footer_container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer_1 p {
        margin: 1rem auto;
    }

    .footer_socials {
        justify-content: center;
    }

    .copyright_width {
        width: var(--container-width-sm);
        display: grid;
        text-align: center;
        margin: 0 3%;
        gap: 0.7rem;
    }
}