* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#first_section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 50px 100px;
  background-color: #fff;
  height: 200px;
}

/* --- Base heading layout --- */
#first_section h1 {
  font-size: 2rem;
  color: #222;
  line-height: 1.2;
  font-family: 'Times New Roman', Times, serif;
  margin: 0;
  position: relative;
  left: -30px;
}

/* Right heading/paragraph */
#first_section p {
  font-size: 1.1rem;
  color: #444;
  max-width: 45%;                 /* keep it narrower for readability */
  margin: 0;
  line-height: 1.4;
  text-align: justify;             /* straight column like justification */
  font-family: 'Times New Roman', Times, serif
}

#second_section {
  padding: 50px 100px;
  background-color: #f9f9f9;
  margin-top: 0;
}

.section-title {
  text-align: center;
  font-family: 'Times New Roman', Times, serif;
  font-size: 2rem;
  color: #03368e;
  margin-bottom: 40px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 2px;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

/* Center 25th item */
.center-item {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  margin-left: 10px;
margin-right: 5px;
gap: 10px;

}

.grid-item {
  position: relative; /* required for pseudo-element */
  padding: 10px;
  text-align: center;
  cursor: pointer;
  height: 290px;
  width: 290px;
  background: url("./images/BG_COURSE.gif");
  color: #001f54;
  margin-left: 40px;
  font-family: 'Times New Roman', Times, serif;
  padding-bottom: 0;
  border: 3px solid yellow;
  transition: transform 0.5s;
  clip-path: polygon(3% 0, 97% 0, 100% 97%, 0 97%);
}

/* Neon yellow border along polygon edges */
.grid-item::before {
  content: "";
  position: absolute;
  top: -3px; left: -3px; right: -3px; bottom: -3px; /* extend a bit outside */
  clip-path: inherit; /* same polygon shape */
  border: 3px solid yellow; /* base neon color */
  z-index: -1; /* behind the content */
  animation: neonBlink 1.5s infinite alternate; /* blinking animation */
}

/* Keyframes for blinking glow */
@keyframes neonBlink {
  0% {
    filter: drop-shadow(0 0 5px yellow)
            drop-shadow(0 0 15px yellow)
            drop-shadow(0 0 25px yellow);
  }
  50% {
    filter: drop-shadow(0 0 12px yellow)
            drop-shadow(0 0 25px yellow)
            drop-shadow(0 0 40px yellow);
  }
  100% {
    filter: drop-shadow(0 0 5px yellow)
            drop-shadow(0 0 15px yellow)
            drop-shadow(0 0 25px yellow);
  }
}

/* Hover effect for zoom and glow */
.grid-item:hover {
  transform: translateY(-5px) scale(1.1); /* Slightly more zoom */
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.8),   /* Outer glow */
              0 0 40px rgba(0, 255, 255, 0.6),   /* Stronger glow */
              0 0 60px rgba(0, 255, 255, 0.4);   /* Fading glow */
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth animation */
}

.pic {
  height: 170px;
  width: 170px;
  margin-top: 15px;
  margin-bottom: 0;
  padding-bottom: 0;
  border: 2px solid skyblue; /* Base border */
  border-radius: 10px;

  /* Neon glow effect */
  box-shadow: 0 0 8px skyblue,   /* soft glow */
              0 0 15px skyblue,  /* stronger glow */
              0 0 25px skyblue;  /* extended glow */

  transition: box-shadow 0.3s ease;
}

/* Optional: Hover effect for more intense neon glow */
.pic:hover {
    transform: translateY(-15px) scale(1.1); /* Slightly more zoom */
  box-shadow: 0 0 12px skyblue,
              0 0 25px skyblue,
              0 0 40px skyblue;
}

figcaption {
  margin-top: 10px;
  padding-bottom: 10px;
  font-size: 1rem;
  font-weight: bold;
  color: white;               /* text color */
  -webkit-text-stroke: 0.4px yellow; /* border/stroke around text */
  text-align: center;          /* optional, keeps it neat */
}


/* Third Section - Enroll Now */
#third_section {
  color: #ffffff; /* White text */
  padding: 60px 20px;
  text-align: center;
  font-family: 'Times New Roman', Times, serif;
}

#third_section .container {
  max-width: 800px;
  margin: 0 auto;
  height: 200px;
}

#third_section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  font-weight: bold;
  color: #03368e;
}

#third_section p {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 30px;
  color: black;
}

#third_section .enroll-btn {
  display: inline-block;
  padding: 15px 35px;
  background-color: #061ed2; /* Yellow button */
  color: white;
  font-size: 1em;
  font-weight: bold;
  text-decoration: none;
  border-radius: 50px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#third_section .enroll-btn:hover {
  background-color: #2e35f7;
  transform: scale(1.05);
}


/* ===== Footer ===== */
#site_footer {
  background-color: #012f7e;   /* deep navy to match headings */
  color: #ffffff;
  text-align: center;
  padding: 20px 0;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1rem;
  margin-top: 40px;  /* space above footer */
  height: 70px;
  padding-top: 30px;
}

#site_footer p {
  margin: 0;
}





/* Scroll Top Button */
#scrollTopBtn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 100;
  background: linear-gradient(135deg, #5e0eea, #2600ff);
  color: #fff;
  border-radius: 30px;
  border: none;
  padding: 12px 16px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  display: none; /* hidden by default */
  transition: all 0.4s ease;
}

/* Hover Effect */
#scrollTopBtn:hover {
  transform: scale(1.2) rotate(10deg);
  box-shadow: 0 8px 25px rgba(0, 150, 255, 0.7);
}

/* ================= RESPONSIVENESS ENHANCER (Add at END only) ================= */

/* For tablets and medium screens */
@media (max-width: 1024px) {
  #first_section {
    flex-direction: column;
    text-align: center;
    padding: 40px 30px;
    height: auto;
  }

  #first_section h1 {
    left: 0;
    font-size: 1.8rem;
  }

  #first_section p {
    max-width: 100%;
    margin-top: 20px;
  }

  #second_section {
    padding: 40px 30px;
  }

  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .center-item {
    flex-direction: column;
    align-items: center;
    margin-left: 0;
    margin-right: 0;
    gap: 15px;
  }

  .grid-item {
    width: 90%;
    height: auto;
    margin-left: 0;
  }

  .pic {
    height: auto;
    width: 100%;
  }

  #third_section .container {
    height: auto;
    padding: 30px 20px;
  }

  #third_section h2 {
    font-size: 1.8rem;
  }

  #third_section p {
    font-size: 1rem;
  }

  #third_section .enroll-btn {
    padding: 12px 25px;
    font-size: 0.95rem;
  }


/* Footer adjustments */
@media (max-width: 768px) {
  #site_footer {
    font-size: 0.9rem;
    height: auto;
    padding: 20px 10px;
  }
}

  .navbar {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .logo img {
    margin-left: 0;
    height: 80px;
    width: 80px;
  }

  .nav-links {
    margin: 10px 0;
  }

  .social-icons {
    margin: 10px 0;
  }

  .join-btn {
    margin: 10px 0;
  }
}

/* For mobile screens */
@media (max-width: 600px) {
  #first_section {
    flex-direction: column;
    padding: 20px;
  }

  #first_section h1 {
    font-size: 1.5rem;
    left: 0;
  }

  #first_section p {
    font-size: 1rem;
    line-height: 1.4;
  }

  #second_section {
    padding: 20px 15px;
  }

  .grid-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .center-item {
    flex-direction: column;
    align-items: center;
    margin-left: 0;
    margin-right: 0;
    gap: 15px;
  }

  .grid-item {
    width: 100%;
    height: auto;
    margin-left: 0;
  }

  .pic {
    height: auto;
    width: 100%;
    border-radius: 10px;
  }

  #third_section .container {
    padding: 20px 10px;
  }

  #third_section h2 {
    font-size: 1.4rem;
  }

  #third_section p {
    font-size: 0.95rem;
  }

  #third_section .enroll-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

/* Footer adjustments */
@media (max-width: 768px) {
  #site_footer {
    font-size: 0.9rem;
    height: auto;
    padding: 20px 10px;
  }
}

}

/* ================= Hamburger Menu ================= */
.hamburger-menu {
  display: none;
  font-size: 1.8rem;
  color: white;
  cursor: pointer;
  margin-right: 30px;
}

/* Show hamburger on smaller screens */
@media (max-width: 768px) {
  .nav-links, .social-icons, .join-btn {
    display: none; /* hide normal menu */
    width: 100%;
    text-align: center;
    margin: 10px 0;
  }

  .hamburger-menu {
    display: block; /* show hamburger */
  }

  /* Toggle visibility when active */
  .navbar.active .nav-links,
  .navbar.active .social-icons,
  .navbar.active .join-btn {
    display: block;
  }

  .nav-links a {
    display: block;
    margin: 10px 0;
  }

  .social-icons {
    justify-content: center;
    margin: 10px 0;
  }

  .join-btn {
    margin: 15px 0;
  }
}

/* ========== Responsive Tweaks for Courses Grid ========== */
@media (max-width: 1024px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
  .center-item {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .grid-item {
    width: 90%;
    margin: 0 auto;
  }
  .pic {
    width: 100%;
    height: auto;
  }
}

