@import url("https://fonts.googleapis.com/css?family=SF+Pro+Display:300,400,500,700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "SF Pro Display", sans-serif;
  transition: all 0.3s linear;
}

body {
  width: 100vw !important;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 10px;
  height: 85px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar h1 {
  font-size: 24px;
  font-weight: bold;
  color: black;
  margin-left: 10px;
}

.navbar a {
  color: black;
  text-decoration: none;
  margin: 10px 2px;
  transition: color 0.3s;
  display: flex;
  position: relative;
}

.navbar .nav-links a {
  /* color: #2c3e50; */
  display: inline-block;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  transition: all 0.3s ease;
}

.navbar .nav-links a:nth-child(-n + 9)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1.5px;
  width: 0%;
  background-color: rgba(0, 0, 0, 0.889);
  transition: width 0.3s ease;
}

.navbar .nav-links a:nth-child(-n + 9):hover::after {
  width: 100%;
}

.navbar .btn.login {
  border: 1px solid black;
  display: inline-block;
  box-sizing: border-box;
  outline: none;
  background-color: transparent;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 5px;
  margin-left: 5px;
  margin-right: 5px;
  font-weight: 500;
  transition: background-color 0.3s, color 0.3s;
}

.navbar .btn.login:hover {
  background-color: black;
  color: white;
}

.navbar .btn.signup {
  border: 1px solid black;
  display: inline-block;
  box-sizing: border-box;
  outline: none;
  background-color: black;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 5px;
  margin-left: 5px;
  margin-right: 5px;
  font-weight: 500;
  color: white;
  transition: background-color 0.3s, color 0.3s;
}

.navbar .btn.signup:hover {
  background-color: white;
  color: black;
}

.navbar .nav-links {
  display: flex;
  padding: 0 10px;
  /* font-size: 0.9rem; */
}

/* dropdown styles */
.nav-item{
  list-style: none;
  position: relative;
}
.dropdown{
  display: none;
  position: absolute;
  top: 100%;
  left: 0; 
  background-color: #444;
  min-width: 180px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3); /* shadow */
  z-index: 1000;
  overflow: hidden; 
  margin-top: 5px;
}
.arrow{
   font-size: 14px;   /* force equal size */
  width: 14px;       /* fix width */
  height: 14px;      /* fix height */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}
.dropdown a{
  display: block;              /* ensures full width */
  width: 100%;   
  border-bottom: 1px solid rgba(255,255,255,0.2); /* divider line */
  color: #fff !important;
  margin: 0; 
}
.dropdown a:last-child {
  border-bottom: none; /* remove last line */
}
.dropdown a:hover{
  background-color: #555;  
} 
 /* Show dropdown when active */
.nav-item.show .dropdown{
  display: block;
}
.nav-item.show .arrow {
    transform: rotate(180deg); /* flip arrow */
}
/* #navbar-x-logo {} */
/* } */

.main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 80vh;
  background-color: white;
  margin-top: 20px;
}

.main h1 {
  font-size: 48px;
  text-align: center;
  margin-bottom: 20px;
}

.main .images {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.main img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  margin: 10px;
}

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

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

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

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

@keyframes animate-muted-images {
  50% {
    width: 130;
    height: 130;
  }

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

.main img.hero-imgs-muted {
  opacity: 0.3;
}

.main img#hero-img-center {
  width: 300px;
  height: 300px;
  object-fit: cover;
  margin: 10px;
}

/* trending course */
/* #webdev {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background-color: #ffffff;
  padding: 30px;
  height: 500px;
  background-image: url("../../assets/images/webdev.png");
  background-position-x: center;
  background-position-y: bottom;
  background-size: 80%;
  background-repeat: no-repeat;
  position: relative;
  margin-top: 20px;
}

.course-overlay {
  width: 100%;
  height: 100%;
  position: absolute;
  background-color: black;
  opacity: 0.1;
}

#webdev .info {
  z-index: 2;
  display: flex;
  flex-direction: column;
  margin-left: 10px;
}

#webdev .info h1 {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #39009c;
}

#webdev .info p {
  font-size: 24px;
  margin-bottom: 10px;
}

#webdev .info span {
  color: red;
  font-size: 36px;
  margin-right: 10px;
}

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

#webdev .info button {
  border: none;
  outline: none;
  background-color: blue;
  color: white;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
}

#webdev .info button:hover {
  background-color: white;
  color: blue;
}

#webdev .tech {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 300px;
  margin-top: 10px;
}

#webdev .tech img {
  width: 50px;
  height: 50px;
  object-fit: cover;
} */

  /* courses-heading */
#our-course-h1 {
  font-size: 2.4rem;
  font-weight: 800;
  text-align: center;
  margin: 40px 0 20px;
  color: #2575fc;
  transition: 0.4s ease;
}

#our-course-h1:hover {
  color: #240d64;
}

body.dark #our-course-h1 {
  color: #00c6ff;
}

body.dark #our-course-h1:hover {
  color: #ff512f;
}

  /* courses */
/* COURSES SECTION */
#courses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 40px 20px;
  width: 100%;
  box-sizing: border-box;
  background-color: var(--bg-color);
}

/* Individual course box */
.course {
  background: linear-gradient(145deg, #1a1a1a, #2b2b2b);
  color: white;
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.course:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 30px rgba(255,255,255,0.1);
}

/* Image */
.course img {
  width: 120px;
  height: 110px;
  border-radius: 50%;
  object-fit: contain;
  margin-bottom: 20px;
}

/* Course info */
.course-info h3 {
  font-size: 20px;
  margin-bottom: 10px;
  font-weight: 600;
  color: #fff;
}

.course-info span {
  font-size: 20px;
  color: #ff4d4d;
  font-weight: bold;
}

.course-info del {
  color: #ccc;
  margin-left: 10px;
}

.course-info p {
  margin-top: 8px;
  color: #aaa;
}

/* Enroll button */
.course-info button {
  margin-top: 15px;
  background-color: white;
  color: #111;
  padding: 10px 20px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease;
}

.course-info button:hover {
  background-color: transparent;
  border: 1px solid #fff;
  color: #fff;
}



/* footer CSS */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background-color: black;
  color: white;
  padding: 20px;
  border-start-start-radius: 10px;
  border-start-end-radius: 10px;
  position: relative;
  padding-bottom: 30px !important;
}

.footer h3 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}

.footer a {
  color: white;
  text-decoration: none;
  margin: 5px;
}

.footer a:hover {
  color: #f0f0f0;
}

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

.footer .social h1 {
  font-size: 36px;
  font-weight: bold;
  color: white;
  margin-bottom: 10px;
  text-align: center;
}

.footer .social svg {
  width: 40px;
  height: 40px;
  object-fit: cover;
  margin: 5px;
  border-radius: 50%;
  background-color: white;
  border: 1px solid white;
  transition: transform 0.3s ease, color 0.3s ease;
}

.footer .social svg:hover {
  transform: scale(1.05);
  background-color: rgba(245, 244, 244, 0.466);
  border: 1px solid rgba(245, 244, 244, 0.466);
  transition: transform 0.3s ease, color 0.3s ease;
}

.footer .contact {
  display: flex;
  flex-direction: column;
}

.contact a {
  color: #b3b3b3;
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
  color: white;
}

#envelope-icon, #call-icon {
  margin-right: 10px;
}

.footer .form {
  display: flex;
  flex-direction: column;
  padding-bottom: 30px;
}

.footer .form input,
.footer .form textarea {
  border: none;
  outline: none;
  padding: 10px;
  margin: 5px;
  width: 200px;
  border-radius: 5px;
}

.footer .form button {
  border: none;
  outline: none;
  background-color: blue;
  color: white;
  padding: 10px;
  margin: 5px;
  width: 100px;
  cursor: pointer;
  border-radius: 5px;
}

.footer .form button:hover {
  background-color: white;
  color: blue;
}

.footer .copy {
  text-align: center;
  margin-top: 20px;
  position: absolute;
  bottom: 10px;
  width: 100%;
}

/* This CSS is for testimonial */
.testimonial-container {
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
}

.testimonial-card {
  width: 330px;
  max-width: 700px;
  background-color: black;
  color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* 3D Hover Effect */
.testimonial-card:hover {
  transform: translateY(-12px) scale(1.03) rotateX(3deg) rotateY(-3deg);
  box-shadow: 0 20px 40px rgba(0, 255, 255, 0.25); /* Aqua glow */
  cursor: pointer;
}

.testimonial-card img {
  width: 120px;
  border-radius: 50%;
  margin-bottom: 10px;
}

.testimonial-quote {
  font-style: italic;
  margin-bottom: 10px;
}

.testimonial-name {
  font-weight: bold;
}

.testimonial-position {
  color: #888;
  font-size: 14px;
}

/* Scroll to top */
#scrollTopBtn { 
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999; 
  border: none;
  outline: none;
  background-color: #0a0a0a;
  color: white;
  cursor: pointer;
  padding: 10px 15px;
  border-radius: 50%;
  box-shadow:  0 12px 20px rgba(20, 5, 158, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  /* initially at bottom */
  transform: translateY(65px);
}

#scrollTopBtn svg{
  width: 24px;
  height: 24px;
  transition: transform 0.4s ease;
  fill: white;
  position: relative;
  top: 4px;
}
#scrollTopBtn.show{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);

}
#scrollTopBtn:hover{
  background-color: #093586;
  transform: translateY(0) scale(1.05);
  box-shadow: 0 0 10px rgba(14 , 39 , 182 , 0.4);
}
#scrollTopBtn:hover svg{
  transform: scale(1.1);
  top: 0;
}
.dark #scrollTopBtn{
  background-color: white;
  
}
.dark #scrollTopBtn svg {
  fill: #0a0a0a; /* arrow color for dark mode */
}

/* bounce animation added to back to top */
@keyframes bounce {
  0% , 100%{
    transform: translateY(0);
  }
  50%{
    transform: translateY(-6px);
  }
}

/* apply bounce when not hover  */
#scrollTopBtn.bounce:not(:hover) svg{
  animation: bounce 2s infinite;
}

/* Dark Mode Switch Styles  */
.toggle-switch {
  position: relative;
  width: 60px;
  height: 10px;
  margin-left: auto;
  margin-right: 40px;
  margin-bottom: 30px;
  padding: 10px;
  --light: #d8dbe0;
  --dark: #28292c;
  --link: rgb(27, 129, 112);
  --link-hover: rgb(24, 94, 82);
}

.switch-label {
  position: absolute;
  width: 100%;
  height: 30px;
  background-color: var(--dark);
  border-radius: 25px;
  cursor: pointer;
  border: 3px solid var(--dark);
}

.checkbox {
  position: absolute;
  display: none;
}

.slider {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 25px;
  -webkit-transition: 0.3s;
  transition: 0.3s;
}

.checkbox:checked ~ .slider {
  background-color: var(--light);
}

.slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 5px;
  width: 20px;
  height: 20px;
  border-radius: 100%;
  -webkit-box-shadow: inset 12px -4px 0px 0px var(--light);
  box-shadow: inset 12px -4px 0px 0px var(--light);
  background-color: var(--dark);
  -webkit-transition: 0.3s;
  transition: 0.3s;
}

.checkbox:checked ~ .slider::before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
  background-color: var(--dark);
  -webkit-box-shadow: none;
  box-shadow: none;
}

/* Dark Mode Switch Styles for Body element*/

body.dark {
  background-color: #222;
}

body.dark h1,
body.dark .support a {
  color: #fff;
}

/* Dark mode for navbar */
body.dark .navbar {
  background-color: rgba(24, 24, 24, 0.6);
  border: 1px solid #444;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body.dark .navbar h1,
body.dark .navbar a {
  color: #fff;
}
body.dark .navbar a.btn {
  background-color: #222;
  color: #fff;
  border-color: #fff;
}
body.dark .navbar a.btn:hover {
  background-color: #fff;
  color: #222;
}
/* White underline for nav links in dark mode */
body.dark .navbar .nav-links a::after {
  content: "";
  display: block;
  height: 1px;
  background-color: white;
  transition: width 0.3s ease;
  width: 0;
}

body.dark .navbar .nav-links a:hover::after,
body.dark .navbar .nav-links a.active::after {
  width: 100%;
}

/* Dark mode for main section */
body.dark .main {
  background-color: #222;
  color: #fff;
}

/* Dark mode for courses */
/* body.dark .course,
body.dark .course-info {
  background-color: #222 !important;
  color: #fff !important;
  border-color: #fff !important;
}
body.dark .course-info button {
  background-color: #fff;
  color: #222;
}
body.dark .course-info button:hover {
  background-color: black;
  color: #fff;
} */

/* DARK MODE OVERRIDE */
body.dark .course {
  background: linear-gradient(145deg, #111, #1d1d1d);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark .course-info button {
  background-color: #fff;
  color: #000;
}

body.dark .course-info button:hover {
  background-color: transparent;
  color: #fff;
  border: 1px solid #fff;
}

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

/* Dark mode for testimonial cards */
body.dark .testimonial-card {
  background-color: #fff;
  color: #222;
}
/* Why Learn With Us Section */
#why-learn {
  padding: 60px 20px;
  background: #f0f4f8;
}

#why-learn h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2em;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.why-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.why-card:hover {
  border: 2px solid #4a90e2;
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
  cursor: pointer;
}

.why-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.why-card h3 {
  font-size: 1.2em;
  margin: 10px 0;
}

.why-card p {
  font-size: 0.95em;
  color: #555;
}

@media (max-width: 600px) {
  #why-learn {
    padding: 40px 10px;
  }

  .why-card {
    padding: 16px;
  }
}
