.background {
    min-height: 100vh;
    padding-bottom: 150px;  
    box-sizing: border-box;
    position: relative;
    z-index: 1;
  }
  
 /*  carousel slide */
.carousel {
    position: relative;
    overflow: hidden;
    width: 100vw;
    max-height: 100vh;
  }
  
.slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 300%;
    }

.slide {
    min-width: 100vw;
    height: 100vh;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* yuan dian */
.carousel-dots {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 11;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.carousel-dots .dot.active {
    background-color: white;
    transform: scale(1.3);
}


/* wen ben kuang */
.caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    padding: 0 30px;
    max-width: 90vw;
    background: transparent; /* tou ming */
}

.caption-title {
    font-size: 60px;
    font-weight: bold;
    margin-bottom: 20px;
}

.caption-text {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
}


.cta-button {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #f1b458;
    color: white;
    border-radius: 5px;
    text-decoration: none;
}

/* Arrow buttons */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}
.arrow.left {
    left: 10px;
    }
.arrow.right {
    right: 10px;
}
  

/* nav bar */
.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    width: 100vw;
    box-sizing: border-box;
    background-color: #f1b458; 
}

#nav-links a {
    font-weight: 600; 
  }
  

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-row ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-row ul li a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-row ul li a:hover {
    color: #f1b458;
}



.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
}

@media (max-width: 768px) {
  .nav-row {
    flex-wrap: wrap;
    padding: 10px 20px;
  }

  .menu-toggle {
    display: block;
  }

  #nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 10px;
  }

  #nav-links.show {
    display: flex;
  }

  #nav-links li {
    margin: 10px 0;
  }

  .nav-row ul li a {
    font-size: 16px;
  }
}

/* dong hua */
#nav-links {
    transition: all 0.3s ease-in-out;
  }
  


/* body fonts */
body {
    font-family: 'Montserrat', sans-serif;
  }
  



/* intro section */
.intro-section {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 100px;
    min-height: 40vh;
    overflow: hidden;
    gap: 60px;
    background-color: white; 
    z-index: 1;
  }
  
/* diagonal background using pseudo elements */
  .intro-section::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: #f7f7f7;
      clip-path: polygon(0 100%, 41% 100%, 66% 0, 0 0);
      z-index: 0;
  }

  .intro-left {
      flex: 1;
      z-index: 2;
      display: flex;
      flex-direction: column;
      justify-content: center;
  }

  .intro-right {
      flex: 1;
      z-index: 2;
      opacity: 0;
      transform: translateX(100px);/*Default rightward offset of 100px (waiting for sliding in)*/
      transition: all 1s ease-out;/*All attribute changes are completed within 1 second, with a buffering effect*/
      clip-path: polygon(38% 0, 100% 0, 100% 100%, 0 100%);
      display: flex;
      align-items: center;
      justify-content: center;
  }
  
  .intro-right.reveal {
      opacity: 1;/*Gradually becoming visible*/
      transform: translateX(0);/*Slide back to the original position, trigger animation*/
  }

  .intro-right img {
      max-width: 100%;
      border-radius: 12px;
      height: 100%; 
      object-fit: cover;
  }


  .intro-left h2 {
      font-size: 40px; 
      font-weight: 700;
      margin-bottom: 20px;
  }

  .intro-left p {
      font-size: 20px; 
      line-height: 1.8;
      color: #333;
  }



/* back to top button */
#backToTop {
    position: fixed;
    bottom: 40px;
    right: 40px;
    padding: 12px 16px;
    font-size: 20px;
    background-color: #f1b458;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 999;
}

#backToTop.show {
    opacity: 1;
    pointer-events: auto;
}
  
  
/* course rec */
.course-section {
    position: relative;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }
  
  .background-gif {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
  }
  
  .overlay-content {
    position: relative;
    z-index: 2;
    background-color: transparent;
    color: white;
    padding: 40px 60px;
    border-radius: 12px;
    text-align: center;
    padding: 30px 40px;
  }

  .overlay-content h2 {
    font-size: 28px;   
    margin-bottom: 15px;
  }
  
  .overlay-content p {
    font-size: 18px;   
    line-height: 1.6;
  }



/* compare section */
.salary-section {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 100px;
    min-height: 40vh;
    overflow: hidden;
    gap: 60px;
    background-color: white;
    z-index: 1;
  }
  
  /* Reverse diagonal background */
  .salary-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    clip-path: polygon(100% 100%, 59% 100%, 34% 0, 100% 0);
    z-index: 0;
  }
  
  /* image on the left side */
  .salary-left {
    flex: 1;
    z-index: 2;
    opacity: 0;
    transform: translateX(-100px);
    transition: all 1s ease-out;
    clip-path: polygon(0 0, 62% 0, 100% 100%, 0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .salary-left.reveal {
    opacity: 1;
    transform: translateX(0);
  }
  
  .salary-left img {
    max-width: 100%;
    border-radius: 12px;
    height: 100%;
    object-fit: cover;
  }
  
  /* right text */
  .salary-right {
    flex: 1;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .salary-right h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 20px;
  }
  
  .salary-right p {
    font-size: 20px;
    line-height: 1.8;
    color: #333;
  }
/* left and right button */
  .salary-right .cta-button {
    margin-top: 20px;
    align-self: center;
  }
  
  
  .intro-left .cta-button {
    margin-top: 20px;
    align-self: center; 
  }
  
  