  /* Header Styles */
header {
  background: var(--gradient-blue);
  color: white;
  text-align: center;
  padding: 20px 20px;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

header h1 {
  font-family: 'Inter', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  margin: 0 10px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}

header p {
  font-family: 'Inter', sans-serif;
  font-size: 1.3rem;
  font-weight: 400;
  margin: 0;
  opacity: 0.95;
  max-width: 1200px;
  margin: 0 auto;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 10px;
}

.section-header h2 {
  font-family: 'Inter', sans-serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--monaco-text);
  margin: 0;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-orange);
  border-radius: 2px;
}

/* Table Styles */
.course-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  font-family: 'Inter', sans-serif;
}

.course-table thead {
  background: var(--gradient-blue);
  color: white;
}

.course-table thead th {
  padding: 15px 10px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  border: none;
}

.course-table tbody tr {
  transition: all 0.3s ease;
  border-bottom: 1px solid #f0f0f0;
}

.course-table tbody tr:hover {
  background-color: var(--light-gray);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.course-table tbody tr:last-child {
  border-bottom: none;
}

.course-table td {
  padding: 10px;
  border: none;
  vertical-align: middle;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Category Title Rows */
.course-table .category-title {
  background: linear-gradient(135deg, var(--monaco-blue) 0%, var(--dark-gray) 100%);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.course-table .category-title:hover {
  background: linear-gradient(135deg, var(--monaco-blue) 0%, var(--dark-gray) 100%);
  transform: none;
  box-shadow: none;
}

.course-table .category-title td {
  padding: 8px 10px 8px 60px;
  font-size: 1rem;
  text-align: left;
  border: none;
  position: relative;
}

.course-table .category-title td::before {
  content: '';
  position: absolute;
  left: 25px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: var(--monaco-orange);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(248, 153, 29, 0.3);
}

.course-table .category-title::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-orange);
}

/* Course Name Column */
.course-table tbody tr:not(.category-title) td:first-child {
  font-weight: 500;
  color: var(--monaco-text);
  position: relative;
  padding-left: 45px;
}

.course-table tbody tr:not(.category-title) td:first-child::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: var(--monaco-orange);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(248, 153, 29, 0.2);
}

/* Duration Column */
.course-table tbody tr:not(.category-title) td:nth-child(2) {
  color: var(--dark-gray);
  font-weight: 500;
  text-align: center;
  position: relative;
  padding-left: 35px;
}

.course-table tbody tr:not(.category-title) td:nth-child(2)::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 2px solid var(--monaco-blue);
  border-radius: 50%;
  background: transparent;
}

.course-table tbody tr:not(.category-title) td:nth-child(2)::after {
  content: '';
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: var(--monaco-blue);
  border-radius: 50%;
}

/* Tuition (UGX) Column */
.course-table tbody tr:not(.category-title) td:nth-child(3) {
  font-weight: 600;
  color: var(--success-green);
  text-align: right;
  font-size: 1.05rem;
  position: relative;
  padding-right: 55px;
}

.course-table tbody tr:not(.category-title) td:nth-child(3)::before {
  content: 'UGX';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: white;
  background: var(--success-green);
  padding: 3px 6px;
  border-radius: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* USD Column */
.course-table tbody tr:not(.category-title) td:nth-child(4) {
  font-weight: 700;
  color: #0066aa;
  text-align: center;
  font-size: 1.05rem;
  background: #f0f7ff;
  border-left: 2px solid #cce0f5;
}

/* =====================================================
   RESPONSIVE — TABLET  (≤ 768px)
   Table shrinks but stays columnar; hide USD, decor
   ===================================================== */
@media (max-width: 768px) {
  header {
    padding: 24px 16px;
  }

  header h1 {
    font-size: 1.9rem;
    line-height: 1.25;
  }

  header p {
    font-size: 1rem;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .course-table {
    font-size: 0.875rem;
    border-radius: 10px;
  }

  .course-table thead th {
    padding: 12px 10px;
    font-size: 0.78rem;
  }

  /* Strip decorative pseudo-elements — too tight */
  .course-table tbody tr:not(.category-title) td:first-child::before,
  .course-table tbody tr:not(.category-title) td:nth-child(2)::before,
  .course-table tbody tr:not(.category-title) td:nth-child(2)::after,
  .course-table tbody tr:not(.category-title) td:nth-child(3)::before {
    display: none;
  }

  .course-table tbody tr:not(.category-title) td:first-child { padding-left: 12px; }
  .course-table tbody tr:not(.category-title) td:nth-child(2) { padding-left: 10px; text-align: left; }
  .course-table tbody tr:not(.category-title) td:nth-child(3) { padding-right: 10px; text-align: left; }

  /* Hide USD + Details columns — too many cols */
  .course-table thead th:nth-child(4),
  .course-table tbody td:nth-child(4),
  .course-table thead th:nth-child(5),
  .course-table tbody td:nth-child(5) {
    display: none;
  }

  .course-table td { padding: 10px 10px; }

  .course-table .category-title td {
    padding: 9px 14px;
    font-size: 0.85rem;
  }
}

/* =====================================================
   RESPONSIVE — MOBILE  (≤ 520px)
   Full card layout — each course = its own card
   ===================================================== */
@media (max-width: 520px) {
  header h1  { font-size: 1.55rem; }
  header p   { font-size: 0.9rem; }
  .section-header h2 { font-size: 1.4rem; }

  /* --- Kill the table structure entirely --- */
  .course-table thead { display: none; }

  .course-table,
  .course-table tbody { display: block; width: 100%; }

  /* Category header rows */
  .course-table tr.category-title { display: flex; }

  .course-table tr.category-title td {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 16px 10px 16px;
    font-size: 0.82rem;
    letter-spacing: 0.8px;
    border-radius: 8px;
    margin-bottom: 8px;
  }

  .course-table tr.category-title td::before { display: none; }
  .course-table tr.category-title::after { display: none; }

  /* --- Course card --- */
  .course-table tr:not(.category-title) {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "name   name"
      "dur    price"
      "btn    btn";
    background: #fff;
    border: 1px solid #e2eaf6;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 75, 155, 0.07);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
  }

  .course-table tr:not(.category-title):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 75, 155, 0.13);
  }

  /* Reset ALL td to block within the grid */
  .course-table tr:not(.category-title) td {
    display: block;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    background: transparent;
  }

  /* ── Course Name ── */
  .course-table tr:not(.category-title) td:nth-child(1) {
    grid-area: name;
    font-weight: 600;
    font-size: 0.92rem;
    color: #1a2b4a;
    padding: 14px 16px 8px;
    line-height: 1.4;
    border-bottom: 1px solid #f0f4fb;
  }

  .course-table tr:not(.category-title) td:nth-child(1)::before { display: none; }

  /* ── Duration pill ── */
  .course-table tr:not(.category-title) td:nth-child(2) {
    grid-area: dur;
    padding: 8px 0 10px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #4a6fa5;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .course-table tr:not(.category-title) td:nth-child(2)::before {
    content: '⏱';
    display: inline;
    position: static;
    width: auto;
    height: auto;
    border: none;
    background: none;
    border-radius: 0;
    transform: none;
    font-size: 0.85rem;
  }

  .course-table tr:not(.category-title) td:nth-child(2)::after { display: none; }

  /* ── UGX Price ── */
  .course-table tr:not(.category-title) td:nth-child(3) {
    grid-area: price;
    padding: 8px 16px 10px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a7a3c;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
  }

  .course-table tr:not(.category-title) td:nth-child(3)::before {
    content: 'UGX';
    position: static;
    transform: none;
    font-size: 0.65rem;
    background: #e6f4ec;
    color: #1a7a3c;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.4px;
  }

  /* ── USD column — hide it ── */
  .course-table tr:not(.category-title) td:nth-child(4) {
    display: none;
  }

  /* ── View More button ── */
  .course-table tr:not(.category-title) td:nth-child(5) {
    grid-area: btn;
    padding: 0;
    background: #f5f8ff;
    border-top: 1px solid #e8eef8;
    text-align: center;
    display: flex;
    align-items: stretch;
  }

  .course-table tr:not(.category-title) td:nth-child(5) .view-more-btn {
    width: 100%;
    margin: 0;
    border-radius: 0;
    padding: 10px 16px;
    font-size: 0.85rem;
    background: transparent;
    color: #004B9B;
    border: none;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.15s ease;
  }

  .course-table tr:not(.category-title) td:nth-child(5) .view-more-btn:hover {
    background: #e8f0ff;
  }

  /* ── Modal — sheet from bottom ── */
  #courseModal {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  #courseModalBox {
    border-radius: 20px 20px 0 0 !important;
    max-height: 92vh !important;
  }

  #courseModalBox #modalBanner > div {
    padding: 20px 18px 16px !important;
  }

  #courseModalBox #modalBanner h2 {
    font-size: 17px !important;
    line-height: 1.35 !important;
  }

  #modalMeta {
    gap: 6px !important;
    font-size: 11px !important;
  }

  #modalTabs {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    gap: 6px !important;
    scrollbar-width: none;
  }

  #modalTabs::-webkit-scrollbar { display: none; }

  .sc-tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px !important;
    padding: 6px 12px !important;
  }
}

/* Add subtle animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.course-table {
  animation: fadeInUp 0.6s ease-out;
}

.section-header {
  animation: fadeInUp 0.4s ease-out;
}
