/* Styles for Top Essentials section (modular) */
.courses {
  background: radial-gradient(#ffffff, #fff1c8);
  height: 70vh;
  display: flex;               /* center the wrapper vertically/horizontally */
  align-items: center;
  justify-content: center;
}

.top-essentials-wrapper .course-list-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
  height: auto;
}

.top-essentials-wrapper .course-list {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.top-essentials-wrapper .course-card {
  color: white;
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: left;
  width: 300px;
  height: 300px;
  border-radius: 50px;
  font-size: 1.2rem;
  padding: 2.5rem 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.top-essentials-wrapper .course-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 1.5rem;
}

.top-essentials-wrapper .course-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.top-essentials-wrapper .web-dev { background: linear-gradient(to bottom, #f4e49b, #fab312); padding-left: 40px; }
.top-essentials-wrapper .game-dev { background: linear-gradient(to bottom, #2ebad7, #00548d); padding-left: 40px; }
.top-essentials-wrapper .software-eng { background: linear-gradient(to bottom, #ff7324, #ff0832); padding-left: 40px; }
.top-essentials-wrapper .analytics { background: linear-gradient(to bottom, #f4e49b, #fab312); padding-left: 40px; }

.top-essentials-wrapper .browse-all {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
  color: #333;
  font-weight: 600;
}

#courses h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  text-align: left;
  margin-bottom: 2rem;
  color: #1a1a1a;
  justify-content: center;
}

.top-essentials-wrapper .course-list-wrapper .browse-all { margin-left: 10px; }


/* Next-button image replacement */
.top-essentials-wrapper .next-button-logo {
  width: 70px;
  height: 70px;
  margin-bottom: 15px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.top-essentials-wrapper .next-button-logo:hover { 
    transform: scale(1.08);
}



.top-essentials-wrapper {
  flex-direction: column;
  align-items: center;
}

/* Mobile responsive styles */
@media (max-width: 1024px) {
  .courses {
    height: auto;
    min-height: 60vh;
    padding: 2.5rem 1.5rem;
  }
  
  #courses h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
  }
  
  .top-essentials-wrapper .course-list-wrapper {
    flex-direction: column;
    gap: 15px;
  }
  
  .top-essentials-wrapper .course-list {
    gap: 1.5rem;
    margin-top: 1.5rem;
  }
  
  .top-essentials-wrapper .course-card {
    width: 280px;
    height: 280px;
    border-radius: 40px;
    font-size: 1.1rem;
    padding: 2rem 1rem;
  }
  
  .top-essentials-wrapper .course-icon {
    width: 85px;
    height: 85px;
    margin-bottom: 1.2rem;
  }
  
  .top-essentials-wrapper .web-dev,
  .top-essentials-wrapper .game-dev,
  .top-essentials-wrapper .software-eng,
  .top-essentials-wrapper .analytics {
    padding-left: 30px;
  }
  
  .top-essentials-wrapper .next-button-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 12px;
  }
}

@media (max-width: 768px) {
  .courses {
    min-height: 50vh;
    padding: 2rem 1rem;
  }
  
  #courses h2 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
  }
  
  .top-essentials-wrapper .course-list {
    gap: 1.2rem;
    margin-top: 1.2rem;
  }
  
  .top-essentials-wrapper .course-card {
    width: 240px;
    height: 240px;
    border-radius: 35px;
    font-size: 1rem;
    padding: 1.5rem 0.8rem;
  }
  
  .top-essentials-wrapper .course-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 1rem;
  }
  
  .top-essentials-wrapper .web-dev,
  .top-essentials-wrapper .game-dev,
  .top-essentials-wrapper .software-eng,
  .top-essentials-wrapper .analytics {
    padding-left: 25px;
  }
  
  .top-essentials-wrapper .next-button-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
  }
  
  .top-essentials-wrapper .browse-all {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .courses {
    min-height: 40vh;
    padding: 1.5rem 0.8rem;
  }
  
  #courses h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
  
  .top-essentials-wrapper .course-list-wrapper {
    gap: 10px;
  }
  
  .top-essentials-wrapper .course-list {
    gap: 1rem;
    margin-top: 1rem;
  }
  
  .top-essentials-wrapper .course-card {
    width: 200px;
    height: 200px;
    border-radius: 30px;
    font-size: 0.9rem;
    padding: 1.2rem 0.7rem;
  }
  
  .top-essentials-wrapper .course-icon {
    width: 55px;
    height: 55px;
    margin-bottom: 0.8rem;
  }
  
  .top-essentials-wrapper .web-dev,
  .top-essentials-wrapper .game-dev,
  .top-essentials-wrapper .software-eng,
  .top-essentials-wrapper .analytics {
    padding-left: 20px;
  }
  
  .top-essentials-wrapper .next-button-logo {
    width: 42px;
    height: 42px;
    margin-bottom: 8px;
  }
  
  .top-essentials-wrapper .browse-all {
    font-size: 0.85rem;
  }
}
