/* ================= ROOT VARIABLES ================= */
:root {
  --section-bg-light: #f8fafc;
  /* Professional soft slate/blue-gray */
  --text-main: #0f172a;
  /* Deep navy text */
  --text-muted: #64748b;
  /* Soft gray for subtitles */
  --accent-color: #ea580c;
  /* Matching the vibrant orange from the cards */
  --accent-light: rgba(234, 88, 12, 0.1);
}

/* ================= BASE LAYOUT (Section Wrapper) ================= */
/* We use !important here to override your HTML's inline "border-radius: 0px" and "background: #fff" */
.upcoming-courses-section {
  position: relative;
  overflow: hidden;
  border-radius: 32px !important;
  padding: 80px 48px !important;
  /* Spacious, breathable padding */
  background: linear-gradient(145deg, #ffffff 0%, var(--section-bg-light) 100%) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02) !important;
  margin: 40px 0;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

/* FIX: Neutralize the outer "upcoming-course-card" wrapper so the whole section doesn't hover like a card */
div.upcoming-course-card:has(> .upcoming-courses-section) {
  box-shadow: none !important;
  transform: none !important;
  background: transparent !important;
  border: none !important;
  height: auto !important;
}

div.upcoming-course-card:has(> .upcoming-courses-section):hover {
  transform: none !important;
  box-shadow: none !important;
}

/* ================= TYPOGRAPHY & HEADER ================= */
.upcoming-courses-section h2 {
  color: var(--text-main) !important;
  font-weight: 800 !important;
  letter-spacing: -0.5px;
  margin-bottom: 12px !important;
}

.upcoming-courses-section p {
  color: var(--text-muted) !important;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  font-size: 16px !important;
}

/* Pre-title pill (The little badge above the title) */
.upcoming-courses-section .border-primary {
  background-color: var(--accent-light) !important;
  color: var(--accent-color) !important;
  border: 1px solid rgba(234, 88, 12, 0.2) !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 16px !important;
  border-radius: 40px !important;
  /* Modern pill shape */
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.05);
}

/* ================= BOTTOM BUTTON ================= */
.upcoming-courses-section .btn-primary {
  background-color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  padding: 14px 32px !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.2) !important;
}

.upcoming-courses-section .btn-primary:hover {
  background-color: #c2410c !important;
  /* Darker orange on hover */
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.3) !important;
}

/* ================= BACKGROUND EFFECTS (Modern Subtle Glow) ================= */
.upcoming-courses-section::before {
  content: "";
  position: absolute;
  top: -150px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(234, 88, 12, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.upcoming-courses-section::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.04) 0%, transparent 70%);
  /* Soft blue accent */
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

/* Ensure all text and content stays safely above the background effects */
.upcoming-courses-section>div {
  position: relative;
  z-index: 2;
}

/* ================= RESPONSIVE DESIGN (Tablets & Mobile First) ================= */

/* Tablets (iPad, etc.) */
@media (max-width: 991px) {
  .upcoming-courses-section {
    padding: 60px 32px !important;
    border-radius: 24px !important;
    margin: 24px 0;
  }

  .upcoming-courses-section h2 {
    font-size: 28px !important;
  }
}

/* Mobile Phones */
@media (max-width: 767px) {
  .upcoming-courses-section {
    padding: 40px 16px !important;
    /* tighter padding for small screens */
    border-radius: 20px !important;
    margin: 16px 0;
  }

  .upcoming-courses-section h2 {
    font-size: 24px !important;
  }

  .upcoming-courses-section p {
    font-size: 14px !important;
    padding: 0 10px;
    /* keeps text from hitting screen edges */
  }

  /* Make the button full width on mobile for easier thumb tapping */
  .upcoming-courses-section .mt-40 {
    margin-top: 24px !important;
  }

  .upcoming-courses-section .btn-primary {
    width: 100% !important;
    justify-content: center !important;
  }
}