* {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  text-decoration: none;
  box-sizing: border-box;
  list-style: none;
}

:root {
  --color-primary: #6c63ff;
  --color-success: #00bf8e;
  --color-warning: #f7c94b;
  --color-danger: #f75842;
  --color-white: #ffff;
  --color-light: rgba (255, 255, 255, 0.7);
  --color-black: #000;
  --color-bg: #1f2641;
  --color-bg1: #2e3267;
  --color-bg2: #424890;
  --container-width-1g: 84%;
  --container-width-md: 90%;
  --container-width-sm: 94%;
  --transition: all 400ms ease;
}

body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.7;
  color: var(--color-white);
  background: var(--color-bg);
}

a {
  text-decoration-line: none;
}

.container {
  width: var(--container-width-1g);
  margin: 0 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;
}

.btn {
  display: inline-block;
  background: var(--color-danger);
  color: var(--color-white);
  padding: 1rem 2rem;
  border: 1px solid transparent;
  font-weight: 500;
  transform: var(--transition);
}

.btn:hover {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-primary {
  background-color: var(--color-danger);
  color: var(--color-white);
}

/* navbar  */
nav {
  background: transparent;
  width: 100vw;
  height: 5rem;
  position: fixed;
  top: 0;
  z-index: 11;
}

.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);
}

/* js navbar */

.window-scroll {
  background: var(--color-primary);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

/* header */

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;
}

/* caregories */

.categories {
  background: var(--color-bg1);
}

.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;
  align-items: center;
}

.categories__right p {
  font-size: 0.9rem;
}

.category {
  background-color: var(--color-bg2);
  border-radius: 2rem;
  transition: var(--transition);
}

.category:hover {
  box-shadow: 0 3rem 3rem rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.category h5 {
  padding-left: 2rem;
  margin: 0.7rem 0 0.3rem;
}

.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:nth-child(6) .category__icon {
  background: var(--color-primary);
}

.category__icon {
  background-color: var(--color-primary);
  padding: 0.7rem;
  border-radius: 50%; /* Make icons circular */
  display: inline-flex; /* Center icon in circle */
  justify-content: center;
  align-items: center;
  width: 4rem; /* Fixed width */
  height: 4rem; /* Fixed height */
}

.category__icon i {
  font-size: 1.5rem; /* Adjust icon size */
}

/* Make text shorter to match the image */
.category p {
  font-size: 0.85rem;
  max-height: 4rem; /* Limit paragraph height */
  overflow: hidden;
  text-align: center;
}

/* Adjust button on the left side */
.categories__left .btn {
  background-color: var(--color-white);
  color: var(--color-black);
  border-radius: 0;
  text-transform: capitalize;
}

/* courses */
.card {
  --card-gradient: rgba(0, 0, 0, 0.8);
  --card-gradient: #5e9ad9, #e271ad;
  --card-gradient: tomato, orange;
  --card-blend-mode: overlay;
  --card-blend-mode: multiply;

  background-color: var(--color-bg1);
  border-radius: 0.5rem;
  box-shadow: 0.05rem 0.1rem 0.3rem -0.03rem rgba(0, 0, 0, 0.45);
  padding-bottom: 1rem;
  overflow: hidden;

  &:hover,
  &:focus-within {
    --card-gradient: #24a9d5 max(8.5rem, 20vh);
  }
}

.courses-container {
  display: grid;
  place-content: center;
  justify-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 1rem;
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir,
    helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial, sans-serif;
  color: var(--color-bg2);
}

.courses-container h2 {
  place-content: center;
  justify-items: center;

  margin: 1rem 0 1rem 0;
  padding: 1rem;
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir,
    helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial, sans-serif;
  color: var(--color-white);
}

.card h3 {
  margin-top: 1rem;
  font-size: 1.25rem;
  text-align: center;
  padding-bottom: 1rem;
  color: var(--color-white);
}

.card p {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-white);
}

.card a {
  color: inherit;
}

.card-wrapper {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30ch, 1fr));
  grid-gap: 1.5rem;
  max-width: 100vw;
  width: 120ch;
  padding-left: 1rem;
  padding-right: 1rem;
  color: var(--color-bg);
}

/* faqs */

.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;
}

.faq h4 {
  line-height: 2.2;
}

.faq__icon {
  align-self: flex-start;
}

.faq p {
  margin-top: 0.8rem;
  display: none;
}

.faq.open p {
  display: block;
}

.testimonials__container {
  overflow-x: hidden;
  position: relative;
  margin-bottom: 5rem;
}

.testimonial {
  padding-top: 2rem;
}

.avatar {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1rem;
  border: 1rem solid var(--color-bg1);
}

.testimonial__info {
  text-align: center;
}

.testimonial__body {
  background: var(--color-primary);
  padding: 2rem;
  margin-top: 3rem;
  position: relative;
}

.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: 50%;
  top: -1.5rem;
  transform: rotate(45deg);
}

/* footer */

.footer-section {
  background: #151414;
  position: relative;
}
.footer-cta {
  border-bottom: 1px solid #373636;
}
.single-cta i {
  color: #ff5e14;
  font-size: 30px;
  float: left;
  margin-top: 8px;
}
.cta-text {
  padding-left: 15px;
  display: inline-block;
}
.cta-text h4 {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 2px;
}
.cta-text span {
  color: #757575;
  font-size: 15px;
}
.footer-content {
  position: relative;
  z-index: 2;
}
.footer-pattern img {
  position: absolute;
  top: 0;
  left: 0;
  height: 330px;
  background-size: cover;
  background-position: 100% 100%;
}
.footer-logo {
  margin-bottom: 30px;
}
.footer-logo img {
  max-width: 200px;
}
.footer-text p {
  margin-bottom: 14px;
  font-size: 14px;
  color: #7e7e7e;
  line-height: 28px;
}
.footer-social-icon span {
  color: #fff;
  display: block;
  font-size: 20px;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  margin-bottom: 20px;
}
.footer-social-icon a {
  color: #fff;
  font-size: 16px;
  margin-right: 15px;
}
.footer-social-icon i {
  height: 40px;
  width: 40px;
  text-align: center;
  line-height: 38px;
  border-radius: 50%;
}
.facebook-bg {
  background: #3b5998;
}
.twitter-bg {
  background: #55acee;
}
.google-bg {
  background: #dd4b39;
}
.footer-widget-heading h3 {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 40px;
  position: relative;
}
.footer-widget-heading h3::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -15px;
  height: 2px;
  width: 50px;
  background: #ff5e14;
}
.footer-widget ul li {
  display: inline-block;
  /* float: left; */
  width: 50%;
  margin-bottom: 12px;
}
.footer-widget ul li a:hover {
  color: #ff5e14;
}
.footer-widget ul li a {
  color: #878787;
  text-transform: capitalize;
}
.subscribe-form {
  position: relative;
  overflow: hidden;
}
.subscribe-form input {
  width: 100%;
  padding: 14px 28px;
  background: #2e2e2e;
  border: 1px solid #2e2e2e;
  color: #fff;
}
.subscribe-form button {
  position: absolute;
  right: 0;
  background: #ff5e14;
  padding: 13px 20px;
  border: 1px solid #ff5e14;
  top: 0;
}
.subscribe-form button i {
  color: #fff;
  font-size: 22px;
  transform: rotate(-6deg);
}
.copyright-area {
  background: #202020;
  padding: 25px 0;
}
.copyright-text p {
  margin: 0;
  font-size: 14px;
  color: #878787;
}
.copyright-text p a {
  color: #ff5e14;
}
.footer-menu li {
  display: inline-block;
  margin-left: 20px;
}
.footer-menu li:hover a {
  color: #ff5e14;
}
.footer-menu li a {
  font-size: 14px;
  color: #878787;
}

/* meida queries */
@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 */

  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: animateNavItem is linear forwards;
    transform-origin: top right;
  }

  .nav_menu li:nth-child(2) {
    animation-delay: 200ms;
  }
  .nav_menu li:nth-child(3) {
    animation-delay: 300ms;
  }
  .nav_menu li:nth-child(4) {
    animation-delay: 400ms;
  }

  @keyframes animateNavItem {
    0% {
      transform: rotate(-90deg) rotateX(90 deg) 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 */

  header {
    height: 52h;
    margin-bottom: 4rem;
  }
  .header__container {
    gap: 0;
    padding-bottom: 3rem;
  }

  /* categories */
  .categories {
    height: auto;
  }
  .categories__container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .categories__left {
    margin-right: 0;
  }

  /* course */
  .course {
    margin-top: 0;
  }

  .courses-container {
    grid-template-columns: 1fr 1fr;
  }

  /* fAQ */
  .faqs__container {
    grid-template-columns: 1fr;
  }

  .faq {
    padding: 1.5rem;
  }

  /* meida queries for phone */

  @media screen and (max-width: 600px) {
    .container {
      width: var(--container-width-sm);
    }

    /* navbar  */
    .nav_menu {
      right: 3%;
    }
    /* header */
    header {
      height: 100vh;
    }
    .header__container {
      grid-template-columns: 1fr;
      text-align: center;
      margin-top: 0;
    }
    .header__left p {
      margin-bottom: 1.3rem;
    }

    /* categories */
    .categories__right {
      grid-template-columns: 1fr 1fr;
      gap: 0.7rem;
    }

    .category {
      padding: 1rem;
      border-radius: 1rem;
    }

    .category__icon {
      margin-top: 4px;
      display: inline-block;
    }

    /* course */
    .courses-container {
      grid-template-columns: 1fr;
    }

    /* testimonial */
    .testimonial__body {
      padding: 1.2rem;
    }
  }

  /* not properly responsive will need help of ai  */
  /* keyframe */
  /* animation */
  /* btns in courses and reduce courses by 3 */
  /* btn in header  */
  /* catogories cards */
  /* bootstrap line issue  */
}
