* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box;
}



/*variables*/
:root {
    --color-primary: blue;
    --color-danger: rgb(172, 12, 31);
    --color-success: #3da33d;
    --color-warning: rgb(255, 255, 0);
    --color-light: rgba(247, 245, 245, 0.925);
    --color-white: #fff;
    --color-bg1: rgb(11, 9, 9);
    --color-bg: #000000;
    --color-gray: #131111;
    --container-width-lg: 76%;
    --container-width-md: 90%;
    --container-width-sm: 94%;
    --transition: all 350ms ease;

}


body {
    font-family: 'Montserrat', sans-serif;
    color: var(--color-white);
    background: var(--color-bg);
    line-height: 1.6;
}

.container {
    width: var(--container-width-lg);
    margin: 0 auto;

}

section {
    padding: 6rem 0;

}

section h2 {
    text-align: center;
    margin-bottom: 4rem;
    margin-top: 2rem;
}



h1,
h2,
h3,
h4,
h5 {
    line-height: 1.3;

}

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;
}

.btn {
    display: inline-block;
    background: var(--color-danger);
    color: var(--color-white);
    padding: 1rem 2rem;
    border: 1px solid transparent;
    font-weight: 300;
}

.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 {
    top: 0;
    /* background: red;*/
    width: 100vw;
    height: 5rem;
    z-index: 10;
    position: fixed;
    /*padding:15px;*/
}

/*change navbar style on scrolling using javascript*/
.window-scroll {
    background: var(--color-danger);
    box-shadow: 0 1rem 2rem rgba(247, 245, 245, 0.3);
}

.nav__container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* margin-left: 79px;
    margin-right: 79px; */
}


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 {
    text-decoration: underline;
}


/*HEADER*/
header {
    position: relative;
    top: 5rem;
    overflow: hidden;
    align-items: center;
    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.3rem;
}



/*CATEGORIES*/
.categories {
    background: var(--color-bg1);
}

.categories h1 {
    margin-bottom: 3rem;
    line-height: 1;
}

.categories__container {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 6rem;
}


.categories__left p {
    margin: 1rem 0 2rem;
}


.categories__right {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}

.category {
    background: var(--color-gray);
    border-radius: 2.3rem;
    padding: 2rem;
    transition: var(--transition)
}

.category:hover {
    box-shadow: 0 2rem 2rem rgba(240, 24, 24, 0.2);
    z-index: 1;
}


.category:nth-child(2) .category__icon {
    background: var(--color-success);
}

.category:nth-child(3) .category__icon {
    background: var(--color-light);
}

.category:nth-child(4) .category__icon {
    background: var(--color-warning);
}

.category:nth-child(5) .category__icon {
    background: var(--color-danger);
}

.category:nth-child(6) .category__icon {
    background: var(--color-primary);
}

.category__icon {
    background: var(--color-primary);
    border-radius: 0.5rem;
    padding: 0.6rem;

}

.category h5 {
    margin: 2rem 0 1rem;
}


.category p {
    font-size: 0.8rem;
}




/*+=======POPULAR COURSES==========*/
.courses {
    margin-top: 0.5rem;
}


.courses__container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;

}




.course {
    background: var(--color-gray);
    text-align: center;
    border: 1px solid transparent;
    transition: var(--transition);
}

.course:hover {
    background: transparent;
    border-color: var(--color-gray);
}

.course_Info {
    padding: 2rem;

}

.course_Info p {
    margin: 1.2rem 0 1.1rem;
    font-size: 0.8rem;
}

.course_Info h4 {
    font-size: 0.9rem;

}

/*==FAQS===*/
.faqs {
    background: var(--color-bg1);
    box-shadow: inset 0 0 3rem rgba(255, 255, 255, 0.3);
}

.faqs__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}


.faq {
    padding: 1.9rem;
    display: flex;
    align-items: center;
    background: var(--color-gray);
    gap: 1rem;
    height: fit-content;
    cursor: pointer;
}


.faq h4 {
    font-size: 1rem;
    line-height: 2.2;
}

.faq__icon {
    align-self: flex-start;
    font-size: 1.1rem;
}

.faq p {
    font-size: 0.9rem;
    margin-top: 0.9rem;
    display: none;
}

/*show p when click */
.faq.open p {
    display: block;
}




/*TESTIMONIALS*/
.testimonials__container {
    overflow-x: hidden;
    margin-bottom: 8rem;
    position: relative;

}

.testimonials__container h2 {
    margin-top: 5rem;
}

.testimonial {
    padding-top: 2rem;
    margin-bottom: 8rem;

}

.avatar {
    width: 8rem;
    height: 7.6rem;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 1rem solid var(--color-danger);

}

.testimonial_Info {
    text-align: center;
}


.testimonial__body {
    /* text-align: center; */
    background: var(--color-gray);
    margin-top: 3rem;
    padding: 2rem;
    position: relative;
}



.testimonial__body::before {
    content: "";
    width: 3.2rem;
    height: 3.2rem;
    position: absolute;
    background: linear-gradient(130deg, transparent, var(--color-gray), var(--color-gray));
    display: block;
    left: 50%;
    top: -1.5rem;
    transform: rotate(45deg);

}






/* FOOTER */
.footer {

    background: var(--color-bg1);
    font-size: 0.9rem;
    padding-top: 4rem;




}

.footer__container {
    margin-left: 4rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5rem;
}

.footer__container>div h4 {
    margin-bottom: 3rem;
}

.footer1 p {
    margin: 0 0 1rem;
}

.footer__container ul li {
    margin-bottom: 2rem;
}


.footer__container ul li a:hover {
    text-decoration: underline;
}

.footer__socials {
    display: flex;
    font-size: 2rem;
    gap: 1rem;
    margin-top: 2rem;
    margin-left: -4rem;
}

.footer4 div p {
    padding: 0.3rem;
    text-align: left;
}



.footer__copyright {
    border-top: 1px solid var(--color-bg);
    margin-top: 4rem;
    text-align: center;
    padding: 1.2rem 0;
}

.footer__copyright small {
    font-size: 1rem;
}



/*========MEDIA QUERY FOR TABLET======*/

@media screen and (max-width:1024px) {

    .container {
        width: var(--container-width-md);
    }

    h1 {
        font-size: 1.9rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    h4 {
        font-size: 1.2rem;
    }

    /*======NAVBAR===*/
    .nav__container {
        background: transparent;
    }

    nav button {
        display: inline-block;
        color: white;
        font-size: 1.8rem;
        cursor: pointer;
        background: transparent;
    }

    #close-menu-btn {
        display: none;
    }

    .nav__menu {
        top: 5rem;
        right: 60%;
        position: fixed;
        flex-direction: column;
        width: 18rem;
        height: fit-content;
        gap: 0;
        display: none;
        /* overflow:hidden; */
    }

    .nav__menu li {
        height: 5.8rem;
        width: 100%;
        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;
    }


    /*ANIMATION NAV ITEMS*/

    @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 {
        display: grid;
        place-items: center;
        height: 100%;
        width: 100%;
        background: var(--color-danger);
        box-shadow: -3rem 5rem 9rem rgba(165, 68, 68, 0.3);
    }


    .nav__menu li a:hover {
        background: white;
        color: var(--color-danger);
        font-weight: bold;
    }


    /*=====HEADER =====*/
    header {
        height: 58vh;
        top: 9rem;
    }

    .header {

        margin-bottom: 5rem;

    }

    .header__container {

        padding-bottom: 13rem;
        gap: 0;
    }

    .header__container h1 {
        font-size: 1.5rem;
    }



    /*====CATEGORY===*/
    .categories {
        height: fit-content;
        text-align: center;

    }

    .categories__container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .categories__left {
        margin-right: 0;
    }


    /*=====COURSES===*/
    .courses {
        margin-top: 0;
    }

    .courses__container {
        grid-template-columns: 1fr 1fr;
    }


    /*===FAQS===*/

    .faqs__container {
        grid-template-columns: 1fr;

    }

    .faqs h2 {
        padding: 0;
    }

    .faq {
        padding: 1.5rem;
    }

    /*=====FOOTER*/
    .footer__container {
        grid-template-columns: 1fr 1fr;
        text-align: center;

    }


    .footer div>h4 {
        margin-bottom: 1.3rem;
    }

    .footer4>div p {
        text-align: center;
    }


    .footer4 .footer__socials {
        margin-left: 1rem;
        justify-content: center;

    }
}

/*===MEDIA QUERY FOR MOBILE===*/
@media screen and (max-width:600px) {

    .container {
        width: var(--container-width-sm);
    }


    /*====nav bar==*/
    .nav__menu {
        right: 76%;
        width: 17rem;

    }


    /*===header==*/
    header {
        height: 100vh;
    }

    .header__container {
        grid-template-columns: 1fr;
        margin-top: 0;
        text-align: center;
    }


    .header__left {
        padding-bottom: 0.8rem;
    }

    .header__left p {
        padding: 0.9rem;

    }

    .header__right {
        padding: 2rem;

    }


    /*===category==*/
    .categories__right {
        grid-template-columns: 1fr 1fr;
    }

    .category {
        padding: 1rem;
        border-radius: 1rem;
    }

    .category__icon {
        margin-top: 5px;
        display: inline-block;
    }

    /*===COURSES===*/
    .courses__container {
        grid-template-columns: 1fr;
    }

    /*===TESTIMONILAS===*/

    .testimonial__body p {
        padding: 0;
        margin-top: 0;

    }

    /*====FOOTER==*/
    .footer__container {
        margin-left: auto;
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer_1 h4 {
        padding-bottom: 1rem;
    }

    .footer3 h4 {
        padding-bottom: 1rem;
    }


    .footer4 h4 {
        padding-bottom: 1rem;
    }


    .footer__socials {
        justify-content: center;
    }

}