/* changes the navbar for fixing and removing spaces */
.navbar {
  width: 100vw; /* Sets the width to 100% of the viewport width */
  position: fixed; /* Makes the navbar stick to the top */
  top: 0; /* Aligns the navbar to the very top */
  left: 0; /* Aligns the navbar to the very left */
  z-index: 1000; /* Ensures the navbar is on top of other content */
  /* You may need to add padding-top to the body or main content to prevent it from being hidden behind the fixed navbar */
}

/* fixes navBar toggle when width becoms 1047px */
@media screen and (max-width: 1047px) {
  .navbar .nav-links {
    display: none;
  }

  .navbar .nav-toggle {
    display: block !important;
    position: relative;
    right: 10px;
    width: 40px;
    height: 40px;
    display: flex;
  }

  .navbar .nav-links.active {
    z-index: 2 !important;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100vw;
    background-color: white;
    border: 1px solid black;
    padding: 10px;
    font-size: larger;
    height: 90vh;
  }

  .navbar .nav-links.active a {
    margin: 5px;
  }

  .navbar .nav-links.active a.btn {
    margin: 5px;
    width: 180px;
  }

  .hero-section-imgs#hero-img-center {
    animation: animate-center-image 3s infinite;
  }

  .hero-section-imgs.hero-imgs-muted {
    animation: animate-muted-images 3s infinite;
  }

  /* Dark mode for mobile nav */
  body.dark .navbar .nav-links.active {
    background-color: #181818;
    border: 1px solid #444;
  }
  body.dark .navbar .nav-links.active a,
  body.dark .navbar .nav-links.active a.btn {
    color: #fff;
    background-color: transparent;
    border-color: #fff;
  }
  body.dark .navbar .nav-links.active a.btn {
    background-color: #fff;
    color: #222;
  }
  body.dark .navbar .nav-links.active a.btn:hover {
    background-color: #222;
    color: #fff;
  }

  @keyframes animate-center-image {
    50% {
      width: 220px;
      height: 220px;
    }

    100% {
      width: 200px;
      height: 200px;
    }
  }

  @keyframes animate-muted-images {
    0% {
      width: 80px;
      height: 80px;
    }

    50% {
      width: 50;
      height: 50;
    }

    100% {
      width: 80px;
      height: 80px;
    }
  }

  .margin-top-mv-3 {
    margin-top: 3rem !important;
  }

  /* trending course */
  #webdev {
    flex-direction: column;
    background-position-y: top;
    background-size: 80%;
  }

  #webdev img {
    margin: 10px;
  }

  #webdev .info {
    margin-left: 0;
    margin-top: 10px;
  }

  #webdev .tech {
    margin: 10px;
  }

  #courses {
    width: 100%;
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
    flex-wrap: wrap !important;
  }

  .course {
    /* justify-content: center; */
    width: 100% !important;
    gap: 10px !important;
  }

  /* .course img {
      margin: auto;
    } */

  .course-info {
    margin-left: 0;
    margin-top: 10px;
  }

  .footer {
    flex-direction: column;
    gap: 2rem;
  }
  .footer-left{
    border-bottom: 2px solid white;
  }

  .footer h3 {
    margin-top: 20px;
  }

  .footer .social {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 5px;
  }

  .footer .form input,
  .footer .form textarea {
    width: 300px;
  }

  /* Dark mode for footer */
  body.dark .footer {
    background-color: #181818;
    color: #fff;
  }
  body.dark .footer a {
    color: #fff;
  }
}

@media screen and (min-width: 769px) {
  .navbar .nav-toggle {
    display: none;
  }
}

@media screen and (max-width: 710px) {
  #testimonial-card-1 {
    display: none;
  }
  #getCertificate {
    max-width: 300px;
    min-width: 280px;
  }
  div#certificate-template-part {
    overflow-x: scroll;
  }
  div#captureArea {
    transform: translateX(250px);
  }
}
@media screen and (max-width: 677px) {
  .footer-left{
    flex-direction: column;
    align-items: start;
    gap: .8rem;
    border-bottom: none;
  }
  .social ,.contact{
    padding-bottom: 1.5rem;
  }
  .social ,.contact , .form{
    border-bottom: 2px solid white;
    margin-bottom: 1.5rem;
  }
  .contact{
    gap: .8rem;
  }
}

@media screen and (max-width: 1090px) {
  #testimonial-card-3 {
    display: none;
  }
}

/* Additional responsive styles for courses and hero section */
@media (max-width: 992px) {
  #courses {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #our-course-h1 h1 {
    font-size: 2rem;
  }
  
  .main h1 {
    font-size: 2rem;
  }
  
  .hero-section-imgs {
    width: 200px;
  }
}

@media (max-width: 600px) {
  #courses {
    grid-template-columns: 1fr;
  }
  
  #our-course-h1 h1 {
    font-size: 1.5rem;
    margin: 0.5rem 0;
    padding: 0 1rem;
  }
  
  .main h1 {
    font-size: 1.5rem;
    padding: 0 1rem;
  }
  
  .hero-section-imgs {
    width: 100%;
    max-width: 250px;
    margin-bottom: 1rem;
  }
  
  .images {
    gap: 0.5rem;
  }
}