/*───────────── COURSE SECTION ─────────────*/
/*───────────── BASIC ───────────── */
html {
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
}

/*───────────── BASIC END ───────────── */
.course-section {
  padding: 40px 20px;
  background-color: #f4f4f4;
}

.courses-heading {
  text-align: center;
  margin-bottom: 30px;
}

.courses-heading h3 {
  font-size: 32px;
  font-weight: bold;
  color: #0096FF;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.courses-heading h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  background-color: #0096FF;
  border-radius: 2px;
}

/* --- Responsive Course Wrapper --- */
.course-wrapper {
  display:grid;
  gap: 30px;
  padding: 0 10px;
  margin-left: %;
}

/* Mobile view: 1 card per row */
@media (max-width: 786px) {
  .course-wrapper {
    grid-template-columns: 1fr; 
    max-width: 350px;
    margin: 0 auto;
  }
}

/* Tablet view: 2 cards per row */
@media (min-width: 787px) and (max-width: 1023px) {
  .course-wrapper {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin: 0 auto;
  }
}

/* Desktop view: 3 cards per row */
@media (min-width: 1024px) {
  .course-wrapper {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1100px;
    margin: 0 auto;
  }
}

/* --- Individual Course Card --- */
.course-card {
  position: relative;
  background: white;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.15);
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  
}

.course-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* --- Ribbon Label (Duration) --- */
.ribbon {
  position: absolute;
  top: 0;
  right: 0;
  background-color: red;
  color: white;
  padding: 5px 15px;
  border-top-right-radius: 15px;
  border-bottom-left-radius: 10px;
  font-size: 14px;
  font-weight: bold;
}

/* --- Text Content --- */
.course-title {
  color: #007bff;
  font-size: 22px;
  margin-top: 10px;
  font-weight: bold;
}

.course-description {
  font-size: 16px;
  color: black;
  margin: 15px 0;
}

/* --- Price --- */
.price {
  margin-bottom: 15px;
}

.old-price {
  text-decoration: line-through;
  color: red;
  font-size: 16px;
  margin-right: 10px;
}

.new-price {
  color: green;
  font-size: 20px;
  font-weight: bold;
}

/* --- Buy Now Button --- */
.buy-btn{
  background-color: #009eff;
  color: white;
  border: none;
  padding: 10px 25px;
  font-size: 16px;
  border-radius: 8px;
  text-decoration: none; 
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.buy-btn:hover{
    background-color: #007acc;
  font-weight: bold;
  transform: scale(1.05);
}

.buy-btn a{
  background-color: #009eff;
  color: white;
  border: none;
  padding: 10px 25px;
  font-size: 16px;
  border-radius: 8px;
  text-decoration: none; 
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.buy-btn:hover a{
  background-color: #007acc;
  font-weight: bold;
  transform: scale(1.05);
}
