* {
  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;
  position: relative;  /* needed for floating patterns */
  overflow: hidden;
  z-index: 0;
}

#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;
  z-index: 1;
}

#first_section h1{
    overflow:hidden;
    color:#222;
    position:relative;

    /* smooth colour glow loop */
    animation: colorAura 4s linear infinite;
}

/* moving colourful glow around text */
@keyframes colorAura{
    0%{
        text-shadow:
            0 0 6px rgba(255,0,110,0.4),
            0 0 14px rgba(131,56,236,0.3),
            0 0 22px rgba(58,134,255,0.3);
    }
    20%{
        text-shadow:
            0 0 8px rgba(0,200,83,0.6),
            0 0 18px rgba(255,190,11,0.5),
            0 0 30px rgba(255,0,110,0.5);
    }
    40%{
        text-shadow:
            0 0 12px rgba(58,134,255,0.8),
            0 0 26px rgba(131,56,236,0.7),
            0 0 40px rgba(0,200,83,0.7);
    }
    60%{
        text-shadow:
            0 0 10px rgba(255,190,11,0.7),
            0 0 22px rgba(255,0,110,0.7),
            0 0 34px rgba(58,134,255,0.6);
    }
    80%{
        text-shadow:
            0 0 12px rgba(131,56,236,0.8),
            0 0 26px rgba(58,134,255,0.8),
            0 0 40px rgba(255,190,11,0.7);
    }
    100%{
        text-shadow:
            0 0 6px rgba(255,0,110,0.4),
            0 0 14px rgba(131,56,236,0.3),
            0 0 22px rgba(58,134,255,0.3);
    }
}

/* animated colourful underline bar */
#first_section h1::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-6px;
    width:100%;
    height:3px;

    background:linear-gradient(
        90deg,
        #ff006e,
        #8338ec,
        #3a86ff,
        #00c853,
        #ffbe0b,
        #ff006e
    );
    background-size:300% 100%;

    animation: underlineFlow 6s linear infinite;
    box-shadow:0 0 8px rgba(255,255,255,0.5);
}

/* flowing underline */
@keyframes underlineFlow{
    0%{ background-position:0% 0; }
    100%{ background-position:300% 0; }
}

/* subtle moving light sweep */
#first_section h1::before{
    content:"";
    position:absolute;
    top:0;
    left:-120%;
    width:120%;
    height:100%;
    background:linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,0.5),
        transparent
    );
    transform:skewX(-20deg);
    animation: lightSweep 7s infinite;
}

@keyframes lightSweep{
    0%{ left:-120%; }
    60%{ left:120%; }
    100%{ left:120%; }
}

#first_section p {
  font-size: 1.1rem;
  color: #444;
  max-width: 45%;
  margin: 0;
  line-height: 1.4;
  text-align: justify;
  font-family: 'Times New Roman', Times, serif;
  position: relative;
  z-index: 1;
}


/* Glass highlight strip behind text */
.learn-line{
    position:relative;
    padding:6px 12px;
    border-radius:6px;
    background:rgba(255,255,255,0.15);
    backdrop-filter:blur(3px);
}

/* subtle moving highlight shimmer */
.learn-line::before{
    content:"";
    position:absolute;
    top:0;
    left:-120%;
    width:120%;
    height:100%;
    background:linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,0.4),
        transparent
    );
    transform:skewX(-20deg);
    animation: shimmerMove 8s infinite;
}

@keyframes shimmerMove{
    0%{ left:-120%; }
    60%{ left:120%; }
    100%{ left:120%; }
}

/* Links style (different from H1) */
.learn-line a{
    color:#0066ff;
    text-decoration:none;
    position:relative;
    font-weight:600;
    transition:0.3s;
}

/* animated colour underline wave */
.learn-line a::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-3px;
    width:100%;
    height:2px;
    background:linear-gradient(
        90deg,
        #ff006e,
        #8338ec,
        #3a86ff,
        #00c853,
        #ffbe0b
    );
    background-size:300% 100%;
    animation: underlineWave 5s linear infinite;
}

/* underline gradient movement */
@keyframes underlineWave{
    0%{ background-position:0% 0; }
    100%{ background-position:300% 0; }
}

/* ripple glow on hover */
.learn-line a:hover{
    text-shadow:0 0 8px rgba(0,102,255,0.6);
}



/* --- Floating tech shapes like emoji icons --- */
#first_section::before,
#first_section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-repeat: no-repeat;
}

/* Random floating tech shapes layer 1 */
#first_section::before {
  background-image: 
    radial-gradient(circle, rgba(0,150,255,0.8) 5px, transparent 5px),
    radial-gradient(circle, rgba(0,180,255,0.6) 3px, transparent 3px),
    radial-gradient(circle, rgba(0,200,255,0.5) 4px, transparent 4px);
  background-size: 40px 40px, 50px 50px, 60px 60px;
  animation: floatTech1 20s linear infinite;
}

/* Random floating tech shapes layer 2 */
#first_section::after {
  background-image: 
    radial-gradient(circle, rgba(0,120,255,0.7) 6px, transparent 6px),
    radial-gradient(circle, rgba(0,160,255,0.5) 3px, transparent 3px),
    radial-gradient(circle, rgba(0,190,255,0.4) 5px, transparent 5px);
  background-size: 50px 50px, 60px 60px, 70px 70px;
  animation: floatTech2 25s linear infinite;
}

/* Layer 1 animation: floating from 4 corners */
@keyframes floatTech1 {
  0%   { background-position: 0 0, 100% 0, 0 100%; }   /* top-left, top-right, bottom-left */
  25%  { background-position: 20px 30px, 80% 20px, 10px 90%; }
  50%  { background-position: 40px 60px, 60% 40px, 30px 80%; }
  75%  { background-position: 20px 40px, 90% 30px, 5px 95%; }
  100% { background-position: 0 0, 100% 0, 0 100%; }
}

/* Layer 2 animation: floating independently from all 4 corners */
@keyframes floatTech2 {
  0%   { background-position: 100% 100%, 0 100%, 100% 0; }  /* bottom-right, bottom-left, top-right */
  25%  { background-position: 80% 80%, 20px 90%, 90% 10px; }
  50%  { background-position: 60% 60%, 40px 70%, 70% 30px; }
  75%  { background-position: 90% 90%, 10px 80%, 95% 20px; }
  100% { background-position: 100% 100%, 0 100%, 100% 0; }
}


#second_section {
  padding: 50px 100px;
  background : url("./images/white_heart.gif");
  margin-top: 0;
}

/* Text with looping orange-yellow-blue glow + sparkles */
.section-title {
  text-align: center;
  font-family: 'Times New Roman', Times, serif;
  font-size: 2rem; /* same as original */
  margin-bottom: 40px; /* same as original */
  position: relative;

  color: #ffd700; /* fallback */
  animation: colorGlowLoop 4s linear infinite, sparkle 2s ease-in-out infinite;
}

/* underline stays same but glowing */
.section-title::after {
  content: '';
  display: block;
  width: 320px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 2px;

  background: linear-gradient(90deg, #ff8c00, #ffd700, #00c3ff);
  box-shadow: 0 0 8px #ff8c00,
              0 0 15px #ffd700,
              0 0 25px #00c3ff;
  animation: underlineGlow 2s ease-in-out infinite alternate;
}

/* looping text color glow */
@keyframes colorGlowLoop {
  0%   { color: #ff8c00; text-shadow: 0 0 5px #ff8c00, 0 0 10px #ffd700; }
  25%  { color: #ffd700; text-shadow: 0 0 10px #ffd700, 0 0 15px #00c3ff; }
  50%  { color: #00c3ff; text-shadow: 0 0 15px #00c3ff, 0 0 20px #ff8c00; }
  75%  { color: #ffd700; text-shadow: 0 0 10px #ffd700, 0 0 15px #00c3ff; }
  100% { color: #ff8c00; text-shadow: 0 0 5px #ff8c00, 0 0 10px #ffd700; }
}

/* tiny sparkle flicker */
@keyframes sparkle {
  0%, 100% { text-shadow: 0 0 5px #ff8c00, 0 0 10px #ffd700, 0 0 15px #00c3ff; }
  50%      { text-shadow: 0 0 8px #ff8c00, 0 0 18px #ffd700, 0 0 25px #00c3ff; }
}

/* underline pulse glow */
@keyframes underlineGlow {
  from{ box-shadow: 0 0 8px #ff8c00, 0 0 15px #ffd700, 0 0 25px #00c3ff; }
  to{ box-shadow: 0 0 12px #ff8c00, 0 0 25px #ffd700, 0 0 35px #00c3ff; }
}
.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 - Enroll Now */
/* ---------- Third Section ---------- */
#third_section {
  color: #ffffff; /* White text */
  padding: 60px 20px;
  height: 410px;
  margin-bottom: 0;
  text-align: center;
  font-family: 'Times New Roman', Times, serif;
  position: relative; /* Needed for particles */
  overflow: hidden;   /* Hide moving particles overflow */
}

/* Container */
#third_section .container {
  max-width: 800px;
  margin: 0 auto;
  height: 200px;
  position: relative; /* Layer above particles */
  z-index: 2;
}

/* Heading */
#third_section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  font-weight: bold;
  color: #03368e;
  opacity: 0;
  animation: headingFadeUp 1.5s ease forwards, headingGlow 2s ease-in-out infinite alternate;
  position: relative;
  z-index: 3;
}

/* Paragraph */
#third_section p {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 15px; /* Reduced space */
  color: black;
  opacity: 0;
  animation: paraSlideFade 2s ease forwards;
  animation-delay: 0.8s;
  position: relative;
  z-index: 3;
}

/* Button */
#third_section .enroll-btn {
  display: inline-block;
  padding: 15px 35px;
  background-color: #061ed2;
  color: white;
  font-size: 1em;
  margin-top: 10px; /* Reduced space from paragraph */
  font-weight: bold;
  text-decoration: none;
  border-radius: 50px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  position: relative;
  z-index: 3;
  animation: buttonPulse 2s infinite, buttonGlow 1.5s ease-in-out infinite alternate;
}

/* Button Hover Scaling */
#third_section .enroll-btn:hover {
  background-color: #2e35f7;
  transform: scale(1.05);
}

/* Button Glow Always Visible */
#third_section .enroll-btn::after {
  content: '';
  position: absolute;
  top: -5px; left: -5px; right: -5px; bottom: -5px;
  border-radius: 50px;
  box-shadow: 0 0 10px #061ed2, 0 0 20px #2e35f7;
  opacity: 1; /* Always glow */
}

/* Floating Particles */
#third_section::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  background-image: radial-gradient(#ffffff33 1px, transparent 1px);
  background-size: 20px 20px;
  animation: particlesMove 25s linear infinite;
}

/* ---------- Keyframes ---------- */

/* Heading fade + up */
@keyframes headingFadeUp {
  0% {opacity: 0; transform: translateY(30px);}
  100% {opacity: 1; transform: translateY(0);}
}

/* Heading glow */
@keyframes headingGlow {
  0% {text-shadow: 0 0 5px #03368e, 0 0 10px #03368e;}
  50% {text-shadow: 0 0 12px #2e35f7, 0 0 25px #2e35f7;}
  100% {text-shadow: 0 0 5px #03368e, 0 0 10px #03368e;}
}

/* Paragraph slide + fade */
@keyframes paraSlideFade {
  0% {opacity: 0; transform: translateX(-20px);}
  100% {opacity: 1; transform: translateX(0);}
}

/* Button pulse */
@keyframes buttonPulse {
  0% {transform: scale(1);}
  50% {transform: scale(1.05);}
  100% {transform: scale(1);}
}

/* Button glow continuously */
@keyframes buttonGlow {
  0% {box-shadow: 0 0 10px #061ed2, 0 0 20px #2e35f7;}
  50% {box-shadow: 0 0 20px #061ed2, 0 0 40px #2e35f7;}
  100% {box-shadow: 0 0 10px #061ed2, 0 0 20px #2e35f7;}
}

/* Floating particles movement */
@keyframes particlesMove {
  0% {background-position: 0 0;}
  100% {background-position: 200px 200px;}
}


/* ===== Footer ===== */
/* ===== 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: 1.4rem;
  margin-top: 50px;  /* space above footer */
  height: 100px;
  padding-top: 40px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Sparkling moving dots */
#site_footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(circle, rgba(255,255,255,0.8) 1px, transparent 1px) repeat,
    radial-gradient(circle, rgba(255,255,255,0.5) 2px, transparent 2px) repeat;
  background-size: 20px 20px, 50px 50px;
  animation: sparkleMove 15s linear infinite, sparkleFloat 12s linear infinite alternate;
  z-index: 0;
  pointer-events: none;
}

/* Subtle glowing flowing waves */
#site_footer::after {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(120deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 100%);
  background-size: 200% 200%;
  animation: waveFlow 20s linear infinite;
  z-index: 0;
  pointer-events: none;
}

/* Sparkle horizontal/vertical motion */
@keyframes sparkleMove {
  0% { background-position: 0 0, 0 0; }
  50% { background-position: 100px 50px, 50px 100px; }
  100% { background-position: 0 0, 0 0; }
}

/* Slight float up and down for extra magic */
@keyframes sparkleFloat {
  0% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(-5px); opacity: 1; }
  100% { transform: translateY(0); opacity: 0.8; }
}

/* Slow wave movement for premium effect */
@keyframes waveFlow {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

#site_footer p {
  margin: 0;
  position: relative;
  z-index: 1; /* ensures text stays above magic effects */
}





/* 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;
  }
}

