/* ==========================================================================
   CODAR TECH AFRICA - COURSES
   Primary: #4E48B2 | Secondary: #E82F58 | Headings: Audiowide
   ========================================================================== */

/* ==========================================================================
   COURSE LISTING TOOLBAR — premium aligned layout
   ========================================================================== */
.course-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

/* Results-count pill on the left */
.course-toolbar .results-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-soft);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.course-toolbar .results-count i {
  color: var(--codar-primary-light);
  font-size: 1rem;
}
.course-toolbar .results-count strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Right-side controls — flex-aligned */
.course-toolbar .toolbar-controls {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  justify-content: flex-end;
}

/* Search wrapper with icon inside */
.course-toolbar .search-box {
  position: relative;
  flex: 1 1 240px;
  max-width: 320px;
  min-width: 200px;
}
.course-toolbar .search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}
.course-toolbar .search-box input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 42px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}
.course-toolbar .search-box input:focus {
  outline: none;
  border-color: var(--codar-primary-light);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(78, 72, 178, 0.1);
}

/* Sort select */
.course-toolbar .sort-select {
  height: 42px;
  padding: 0 36px 0 16px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-pill);
  background: var(--bg-soft) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%237A839A' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 01.753 1.659l-4.796 5.48a1 1 0 01-1.506 0z'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  flex: 0 0 auto;
  min-width: 180px;
  appearance: none;
  -webkit-appearance: none;
  transition: all var(--transition-fast);
}
.course-toolbar .sort-select:focus {
  outline: none;
  border-color: var(--codar-primary-light);
  box-shadow: 0 0 0 4px rgba(78, 72, 178, 0.1);
}

/* Grid/List view toggle */
.view-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-soft);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
  height: 42px;
  flex-shrink: 0;
}
.view-toggle button {
  background: transparent;
  border: none;
  padding: 0 14px;
  height: 100%;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.view-toggle button:hover { color: var(--codar-primary-light); }
.view-toggle button.active {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(78, 72, 178, 0.25);
}

/* Mobile — stack neatly */
@media (max-width: 767.98px) {
  .course-toolbar { padding: 14px; gap: 10px; }
  .course-toolbar .results-count { width: 100%; justify-content: center; }
  .course-toolbar .toolbar-controls { width: 100%; }
  .course-toolbar .search-box { max-width: none; flex: 1 1 100%; }
  .course-toolbar .sort-select { flex: 1 1 calc(100% - 96px); min-width: 0; }
}

/* ===== Course sidebar (filters) ===== */
.course-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 26px;
  position: sticky;
  top: 100px;
}
.course-sidebar .filter-block {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-soft);
}
.course-sidebar .filter-block:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}
.course-sidebar h6 {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.course-sidebar h6 .clear-filter {
  font-size: 0.78rem;
  color: var(--codar-primary-light);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.course-sidebar .form-check {
  padding: 7px 0 7px 28px;
  margin: 0;
}
.course-sidebar .form-check-input {
  margin-left: -28px;
  margin-top: 0.18rem;
  border-color: var(--border-color);
  cursor: pointer;
}
.course-sidebar .form-check-input:checked {
  background-color: var(--codar-primary-light);
  border-color: var(--codar-primary-light);
}
.course-sidebar .form-check-label {
  font-size: 0.92rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.course-sidebar .form-check-label .count {
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}
.course-sidebar .form-check:hover .form-check-label { color: var(--codar-primary-light); }
.course-sidebar .form-check:hover .form-check-label .count {
  background: rgba(78, 72, 178, 0.1);
  color: var(--codar-primary-light);
}

/* Price range slider faux-styling */
.price-range-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 8px;
}
.price-range-display strong { color: var(--codar-primary-light); }

/* Sidebar promo card */
.sidebar-promo {
  background: var(--gradient-primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.sidebar-promo::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: var(--codar-accent);
  border-radius: 50%;
  opacity: 0.18;
}
.sidebar-promo > * { position: relative; z-index: 1; }
.sidebar-promo h6 { color: #fff; font-size: 1rem; margin-bottom: 8px; }
.sidebar-promo p { color: rgba(255,255,255,0.85); font-size: 0.85rem; margin-bottom: 14px; }
.sidebar-promo .btn { background: var(--codar-accent); color: #fff; }

/* ===== Pagination ===== */
.codar-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 50px;
}
.codar-pagination a,
.codar-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.codar-pagination a:hover {
  background: var(--codar-primary-light);
  color: #fff;
  border-color: transparent;
}
.codar-pagination .active {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
}
.codar-pagination .ellipsis {
  background: transparent;
  border: none;
  color: var(--text-muted);
}

/* ===== COURSE CATEGORY TILES ===== */
.cat-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  text-align: center;
  height: 100%;
  text-decoration: none;
  display: block;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.cat-tile::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 0;
  background: var(--gradient-primary);
  transition: height var(--transition-base);
  z-index: 0;
}
.cat-tile:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
  color: #fff;
}
.cat-tile:hover::before { height: 100%; }
.cat-tile > * { position: relative; z-index: 1; }
.cat-tile .cat-icon {
  width: 70px; height: 70px;
  border-radius: var(--radius-md);
  background: rgba(78, 72, 178, 0.1);
  color: var(--codar-primary-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 18px;
  transition: all var(--transition-base);
}
.cat-tile:hover .cat-icon {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.cat-tile h5 {
  font-size: 1.08rem;
  margin-bottom: 6px;
  transition: color var(--transition-base);
}
.cat-tile:hover h5 { color: #fff; }
.cat-tile .cat-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  transition: color var(--transition-base);
}
.cat-tile:hover .cat-count { color: rgba(255,255,255,0.85); }

/* =====================================================================
   COURSE DETAILS PAGE
   ===================================================================== */

/* Hero (course-detail) — banner with breadcrumb, course title, meta */
.course-detail-hero {
  background: var(--gradient-hero);
  color: #fff;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.course-detail-hero::before {
  /* Decorative radial-glow blobs removed site-wide -- flat background only. */
  content: none;
}
.course-detail-hero > .container { position: relative; z-index: 1; }
.course-detail-hero .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0 0 18px;
  font-size: 0.88rem;
}
.course-detail-hero .breadcrumb-item { color: rgba(255,255,255,0.7); }
.course-detail-hero .breadcrumb-item a { color: var(--codar-accent); text-decoration: none; }
.course-detail-hero .breadcrumb-item.active { color: #fff; }
.course-detail-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.4); }
.course-detail-hero .course-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(78, 72, 178, 0.15);
  color: var(--codar-primary-light);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.course-detail-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
}
.course-detail-hero .lead {
  color: rgba(255,255,255,0.88);
  font-size: 1.08rem;
  max-width: 760px;
  margin-bottom: 24px;
}
.course-detail-hero .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.85);
}
.course-detail-hero .hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.course-detail-hero .hero-meta i { color: var(--codar-accent); font-size: 1rem; }
.course-detail-hero .hero-rating .stars { color: var(--codar-accent); }

/* Sticky enrollment card (right column on detail page) */
.enrollment-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 90px;
}
.enrollment-card .preview-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.enrollment-card .preview-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.enrollment-card .preview-img .play-btn {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(78, 72, 178, 0.45);
  color: #fff;
  font-size: 2.6rem;
  text-decoration: none;
  transition: background var(--transition-fast);
}
.enrollment-card .preview-img .play-btn:hover { background: rgba(78, 72, 178, 0.65); }
.enrollment-card .enrollment-body { padding: 26px; }
.enrollment-card .price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.enrollment-card .price-now {
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-size: 2rem;
  font-weight: 800;
  color: var(--codar-primary-light);
  line-height: 1;
}
.enrollment-card .price-was {
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 500;
}
.enrollment-card .price-save {
  background: rgba(16, 185, 129, 0.12);
  color: var(--codar-success);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
}
.enrollment-card .price-note { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 18px; }
.enrollment-card .quick-fact-list { list-style: none; padding: 0; margin: 0 0 22px; }
.enrollment-card .quick-fact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px dashed var(--border-soft);
}
.enrollment-card .quick-fact-list li:last-child { border-bottom: none; }
.enrollment-card .quick-fact-list li i {
  width: 30px;
  color: var(--codar-primary-light);
  font-size: 1rem;
}
.enrollment-card .share-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.enrollment-card .share-row a {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.enrollment-card .share-row a:hover { background: var(--codar-primary-light); color: #fff; }

/* Course tabs */
.course-tabs {
  border-bottom: 2px solid var(--border-soft);
  margin-bottom: 36px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.course-tabs::-webkit-scrollbar { display: none; }
.course-tabs button {
  background: transparent;
  border: none;
  padding: 14px 22px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color var(--transition-fast);
}
.course-tabs button::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 18px; right: 18px;
  height: 3px;
  background: var(--codar-primary-light);
  border-radius: 3px 3px 0 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-base);
}
.course-tabs button.active,
.course-tabs button:hover { color: var(--codar-primary-light); }
.course-tabs button.active::after { transform: scaleX(1); }

.course-tab-pane { display: none; }
.course-tab-pane.active { display: block; animation: fadeUp 0.4s ease; }

/* "What you'll learn" two-column checklist */
.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.outcomes-grid > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.outcomes-grid > div i {
  color: var(--codar-success);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}
@media (max-width: 575.98px) {
  .outcomes-grid { grid-template-columns: 1fr; }
}

/* Curriculum accordion (modules) */
.curriculum-accordion .accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md) !important;
  margin-bottom: 12px;
  overflow: hidden;
}
.curriculum-accordion .accordion-button {
  background: var(--bg-card);
  font-weight: 700;
  padding: 18px 22px;
  color: var(--text-primary);
  box-shadow: none;
  font-size: 0.98rem;
}
.curriculum-accordion .accordion-button:not(.collapsed) {
  background: rgba(78, 72, 178,0.06);
  color: var(--codar-primary-light);
}
.curriculum-accordion .accordion-button:focus { box-shadow: none; border-color: var(--border-soft); }
.curriculum-accordion .module-meta {
  margin-left: auto;
  margin-right: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  gap: 14px;
}
.curriculum-accordion .lesson-list {
  list-style: none;
  padding: 0; margin: 0;
}
.curriculum-accordion .lesson-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.curriculum-accordion .lesson-list li i.lesson-icon {
  color: var(--codar-primary-light);
  width: 22px;
}
.curriculum-accordion .lesson-list li .lesson-time {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.curriculum-accordion .lesson-list li.locked { opacity: 0.6; }
.curriculum-accordion .lesson-list li.locked i.lesson-icon { color: var(--text-muted); }

/* Instructor profile block on details page */
.instructor-profile {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.instructor-profile img {
  width: 110px; height: 110px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 4px solid var(--bg-soft);
}
.instructor-profile h5 { margin-bottom: 4px; }
.instructor-profile .role {
  color: var(--codar-primary-light);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 12px;
}
.instructor-profile .ins-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.instructor-profile .ins-stats span { display: inline-flex; align-items: center; gap: 6px; }
.instructor-profile .ins-stats span i { color: var(--codar-secondary); }
.instructor-profile p { font-size: 0.94rem; margin-bottom: 0; }
@media (max-width: 575.98px) {
  .instructor-profile { flex-direction: column; text-align: center; padding: 24px; }
  .instructor-profile .ins-stats { justify-content: center; }
}

/* Reviews block */
.review-summary {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.review-summary .avg-score {
  text-align: center;
  flex-shrink: 0;
}
.review-summary .avg-score .num {
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 3rem;
  color: var(--codar-primary-light);
  line-height: 1;
}
.review-summary .avg-score .stars { color: var(--codar-secondary); margin: 4px 0; }
.review-summary .avg-score small { color: var(--text-muted); font-size: 0.85rem; }
.review-summary .rating-bars { flex: 1; min-width: 220px; }
.review-summary .rating-bars .bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.review-summary .rating-bars .bar-row .label { width: 36px; }
.review-summary .rating-bars .bar-row .bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-soft);
  border-radius: 4px;
  overflow: hidden;
}
.review-summary .rating-bars .bar-row .bar-fill {
  height: 100%;
  background: var(--gradient-secondary);
  border-radius: 4px;
}
.review-summary .rating-bars .bar-row .pct {
  width: 38px;
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.review-card .review-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.review-card .review-head img {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.review-card .review-head h6 { margin: 0; font-size: 0.95rem; }
.review-card .review-head .review-date { font-size: 0.78rem; color: var(--text-muted); margin: 0; }
.review-card .stars { color: var(--codar-secondary); font-size: 0.85rem; margin-bottom: 8px; }
.review-card p { font-size: 0.92rem; margin: 0; line-height: 1.6; }

/* Bank payment cards (page-specific, complementing .bank-card in style.css) */
.bank-cards-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 991.98px) { .bank-cards-row { grid-template-columns: 1fr; } }

.payment-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
}
@media (max-width: 575.98px) { .payment-form-wrap { padding: 24px 20px; } }
.payment-form-wrap h3 { font-size: 1.4rem; margin-bottom: 8px; }
.payment-form-wrap > p { font-size: 0.94rem; color: var(--text-secondary); margin-bottom: 26px; }

/* "Step" pill ahead of section subheaders */
.step-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(78, 72, 178, 0.1);
  color: var(--codar-primary-light);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.step-pill .step-num-pill {
  background: var(--codar-primary-light);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

/* Course mobile sticky enroll bar */
.mobile-enroll-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -8px 30px rgba(78, 72, 178,0.1);
  padding: 12px 16px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 998;
}
.mobile-enroll-bar .price-now {
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--codar-primary-light);
}
.mobile-enroll-bar .price-was {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 6px;
}
.mobile-enroll-bar .btn {
  padding: 10px 22px;
  font-size: 0.92rem;
}
@media (max-width: 991.98px) {
  .mobile-enroll-bar { display: flex; }
  body.has-mobile-enroll-bar { padding-bottom: 76px; }
  .floating-actions { bottom: 86px !important; }
}

/* =====================================================================
   COURSE DETAILS PAGE -- extended sections
   Moved out of resources/views/frontend/course_details.blade.php's inline
   <style> tag so the page itself stays lean; this is the only page that
   uses these classes, but the file convention throughout this project is
   "one CSS file per page family", not "one file per page" -- courses.css
   already owns the rest of the course-details page above, so its extended
   sections (hero photo blend, enrolment overlay, curriculum panel, tools
   strip, certificate/partner block, testimonials, why-codar cards, campus
   video/carousel, join-online, the click-anywhere pricing cards) belong
   here too. Two categories of rule from the original inline block were
   deliberately NOT carried over:
    - Rules that only re-stated something the global design-system changes
      now already do everywhere (flat brand-colour buttons/badges/hero/
      stats-strip, Inter numerals) -- keeping them here would just be a
      second, redundant declaration of the same thing.
    - Confirmed dead CSS with no matching markup anywhere on this page
      (.why-counters/.counter-item, .campus-slide__placeholder) -- real
      unused rules, not a stylistic choice, so they were dropped rather
      than moved.
   ===================================================================== */

/* ---- Hero photo (right column, desktop) -----------------------------
   Real campus photo blended into the hero band using a blurred "echo" of
   the same photo sitting behind it (same technique as Apple/Spotify
   ambient hero art): the glow picks up the photo's own colours and
   diffuses them into the background, so the edges fade rather than
   showing a hard pasted-on rectangle. No box-shadow on the sharp image on
   purpose -- a defined rectangular shadow is what made it read as
   "attached" rather than blended. ------------------------------------- */
.hero-photo-wrap { position: relative; height: 100%; min-height: 320px; }
.hero-photo-frame__glow {
  position: absolute; inset: -34px;
  background-size: cover; background-position: center;
  filter: blur(46px) saturate(1.35) brightness(.92);
  opacity: .85; z-index: 0; border-radius: inherit;
  pointer-events: none;
}
.hero-photo-frame {
  position: relative; z-index: 1; height: 100%; min-height: 320px;
  -webkit-mask-image: radial-gradient(ellipse 76% 80% at center, #000 52%, transparent 100%);
  mask-image: radial-gradient(ellipse 76% 80% at center, #000 52%, transparent 100%);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.hero-photo-frame__img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; display: block; }
.hero-photo-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(33,27,87,0) 45%, rgba(20,16,64,.65) 100%);
} /* legibility overlay for the badge below -- functional, not decorative gloss */
.hero-photo-frame__badge {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.14);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.28);
  color: #fff; font-size: .78rem; font-weight: 700; padding: 7px 14px; border-radius: 999px;
}
@media (max-width: 991.98px) {
  .hero-photo-wrap { min-height: 220px; }
  .hero-photo-frame { min-height: 220px; }
  .hero-photo-frame__img { min-height: 220px; }
  .hero-photo-frame__glow { inset: -20px; filter: blur(30px) saturate(1.35) brightness(.92); }
}

/* ---- Hero: course description (CMS rich text) block ------------------
   Caps every margin in the stack above "200+ enrolled..." so the block
   reads tight regardless of how many paragraphs the CMS content has, and
   collapses any stray empty paragraph a rich-text editor tends to leave
   behind. ---------------------------------------------------------------*/
.course-description,
.course-description * { color: #fff !important; }
.course-description { margin-bottom: 22px; }
.course-description p { margin: 0 0 10px; }
.course-description p:last-child { margin-bottom: 0; }
.course-description p:empty { display: none; }
.course-detail-hero h4 { margin: 4px 0 14px; line-height: 1; }
.course-detail-hero h4 .course-cat-pill { margin-bottom: 0; }

/* ---- Enrolment overlay ------------------------------------------------
   Desktop: three plans side by side, fully expanded.
   Mobile : all three plans STACKED and visible at once, each collapsed to
            tier + name + price with a chevron. Tapping one expands an
            accordion with a scrollable feature list and a sticky Enroll
            button. No horizontal swiping -- nothing hidden off-screen. --*/
.enrol-overlay { position: fixed; inset: 0; z-index: 1080; display: none; align-items: center; justify-content: center; padding: 24px; }
.enrol-overlay.is-open { display: flex; }
.enrol-overlay__backdrop { position: absolute; inset: 0; background: var(--bg-overlay); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.enrol-overlay__panel {
  position: relative; width: 100%; max-width: 960px; max-height: 90vh; display: flex; flex-direction: column;
  background: var(--bg-card); border-radius: var(--radius-xl); padding: 26px 26px 20px;
  box-shadow: 0 28px 80px rgba(15,12,60,.38); animation: enrolPop .28s cubic-bezier(.2,.9,.3,1.05); overflow: hidden;
  transform: translateZ(0); will-change: transform;
}
@keyframes enrolPop { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

.enrol-overlay__close {
  position: absolute; top: 14px; right: 14px; z-index: 5; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-muted);
  display: grid; place-items: center; transition: all .2s ease; cursor: pointer;
}
.enrol-overlay__close:hover { border-color: var(--codar-danger); color: var(--codar-danger); transform: rotate(90deg); }

.enrol-overlay__head { text-align: center; margin-bottom: 14px; padding-right: 34px; }
.enrol-overlay__head--tight { margin-bottom: 10px; }
.enrol-overlay__head h4 { font-family: var(--font-heading); font-weight: 800; color: var(--text-primary); margin: 0 0 4px; font-size: 1.35rem; }
.enrol-overlay__head p { color: var(--text-muted); margin: 0; font-size: .9rem; }

.enrol-notice {
  display: flex; gap: 10px; align-items: flex-start; background: rgba(239,68,68,.07);
  border: 1px solid rgba(239,68,68,.18); border-radius: var(--radius-md); padding: 11px 13px; margin-bottom: 16px;
  font-size: .83rem; line-height: 1.45; color: var(--text-secondary);
}
.enrol-notice i { color: var(--codar-danger); font-size: 1rem; flex: none; margin-top: 1px; }
.enrol-notice a { color: var(--codar-primary-light); font-weight: 700; text-decoration: underline; }

.enrol-overlay__stage {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 2px 4px;
  overscroll-behavior: contain;        /* do not chain scrolling to the page */
  -webkit-overflow-scrolling: touch;   /* momentum scrolling on iOS */
  transform: translateZ(0);            /* promote to its own layer */
}
.enrol-overlay__stage::-webkit-scrollbar { width: 8px; }
.enrol-overlay__stage::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 8px; }

.enrol-overlay__skeleton { display: none; padding: 8px 4px; }
.enrol-overlay.is-loading .enrol-overlay__skeleton { display: block; }
.enrol-overlay.is-loading .enrol-overlay__stage { display: none !important; }
.enrol-skel-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 10px; }

.enrol-plans { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; align-items: stretch; }
.enrol-plan {
  position: relative; display: flex; flex-direction: column; border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg); background: var(--bg-card); overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.enrol-plan:hover { border-color: var(--codar-primary-light); box-shadow: 0 10px 30px rgba(78,72,178,.12); }
.enrol-plan--featured { background: var(--codar-primary-light); border-color: var(--codar-primary-light); color: #fff; }
.enrol-plan--featured:hover { box-shadow: 0 14px 38px rgba(78,72,178,.34); }
.enrol-plan__tag {
  position: absolute; top: 10px; right: 10px; z-index: 2; background: var(--codar-danger); color: #fff;
  font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 4px; box-shadow: 0 4px 12px rgba(239,68,68,.35);
}
.enrol-plan__tag i { font-size: .6rem; }

.enrol-plan__head {
  width: 100%; text-align: left; background: transparent; border: 0; padding: 18px 16px 14px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; cursor: default; color: inherit;
}
.enrol-plan__headtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.enrol-plan__tier { font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--codar-primary-light); }
.enrol-plan--featured .enrol-plan__tier { color: #ffd9de; }
.enrol-plan__name { font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem; color: var(--text-primary); line-height: 1.25; }
.enrol-plan--featured .enrol-plan__name { color: #fff; }
.enrol-plan__price {
  font-family: var(--font-body); font-variant-numeric: tabular-nums; font-weight: 800;
  font-size: 1.6rem; color: var(--text-primary); line-height: 1.1; margin-top: 4px; display: block;
}
.enrol-plan--featured .enrol-plan__price { color: #fff; }
.enrol-plan__price .cur { font-size: .95rem; vertical-align: super; margin-right: 2px; }
.enrol-plan__price small { display: block; font-size: .72rem; font-weight: 600; color: var(--text-muted); margin-top: 2px; }
.enrol-plan--featured .enrol-plan__price small { color: rgba(255,255,255,.75); }
.enrol-plan__save { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.enrol-plan__save .was { text-decoration: line-through; opacity: .65; font-size: .82rem; }
.enrol-plan__save .badge-save { background: var(--codar-success); color: #fff; font-size: .66rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.enrol-plan__chev { display: none; }

.enrol-plan__panel { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.enrol-plan__scroll { flex: 1 1 auto; min-height: 0; overflow: visible; padding: 0 16px; }
.enrol-plan__feats { list-style: none; margin: 0; padding: 0; }
.enrol-plan__feats li {
  display: flex; gap: 8px; align-items: flex-start; font-size: .83rem; line-height: 1.45;
  padding: 8px 0; border-bottom: 1px solid var(--border-color); color: var(--text-secondary);
}
.enrol-plan--featured .enrol-plan__feats li { border-bottom-color: rgba(255,255,255,.16); color: rgba(255,255,255,.94); }
.enrol-plan__feats li:last-child { border-bottom: 0; }
.enrol-plan__feats i { color: var(--codar-success); font-size: .95rem; flex: none; margin-top: 1px; }
.enrol-plan--featured .enrol-plan__feats i { color: #ff8fa0; }
.enrol-plan__foot { padding: 14px 16px 16px; }

.enrol-form { max-width: 520px; margin: 0 auto; }
.enrol-field { margin-bottom: 14px; }
.enrol-field label { display: block; font-weight: 700; font-size: .84rem; color: var(--text-primary); margin-bottom: 6px; }
.enrol-field .req { color: var(--codar-danger); }
.enrol-field .input-icon-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .95rem; pointer-events: none; }
.enrol-field .input-icon-wrap .form-control { padding-left: 40px; height: 50px; border-radius: var(--radius-md); border: 1.5px solid var(--border-color); }
.enrol-field .input-icon-wrap .form-control:focus { border-color: var(--codar-primary-light); box-shadow: 0 0 0 4px rgba(78,72,178,.12); }
.enrol-field--check { display: flex; gap: 10px; align-items: flex-start; font-size: .84rem; color: var(--text-secondary); }
.enrol-field--check .form-check-input { margin-top: 2px; flex: none; }
.enrol-field--check a { color: var(--codar-primary-light); font-weight: 700; }
.enrol-form__submit { height: 54px; font-weight: 800; border-radius: var(--radius-md); margin-top: 6px; }
.enrol-form__submit[disabled] { opacity: .65; cursor: not-allowed; }

@media (max-width: 640px) {
  /* Centred card, not a bottom sheet -- with the accordions closed the
     content is short, and align-items:flex-end left it sitting low with a
     large empty gap above. Centring keeps it mid-screen at any height.
     dvh (with a vh fallback) tracks the REAL visible viewport height on
     mobile, where 1vh is measured including the collapsible address bar --
     a vh-only max-height overflows the visible area and shifts the panel.
     Blur is dropped on mobile: backdrop-filter forces a GPU re-rasterise
     of the blurred area on every scroll frame, the main cause of stutter
     on phones. A slightly more opaque flat colour looks near-identical. */
  .enrol-overlay__backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg-overlay); }
  .enrol-overlay { padding: 16px 12px; align-items: center; }
  .enrol-overlay__panel {
    max-width: 100%;
    max-height: 88vh;  /* fallback for older mobile browsers */
    max-height: 88dvh; /* accurate on modern mobile browsers */
    border-radius: var(--radius-xl);
    padding: 18px 14px 14px; animation: enrolPopIn .26s cubic-bezier(.2,.9,.3,1.05);
  }
  @keyframes enrolPopIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

  .enrol-overlay__head h4 { font-size: 1.18rem; }
  .enrol-notice { font-size: .78rem; padding: 9px 11px; margin-bottom: 12px; }
  .enrol-skel-grid { grid-template-columns: 1fr; }

  .enrol-plans { grid-template-columns: 1fr; gap: 11px; } /* stack all three -- every plan visible without swiping */

  .enrol-plan { border-width: 1.5px; border-radius: var(--radius-lg); }
  .enrol-plan--reg { background: var(--bg-card); }
  .enrol-plan--tuition { background: var(--bg-soft); }
  .enrol-plan--featured { background: var(--codar-primary-light); }

  .enrol-plan__head { cursor: pointer; padding: 14px 14px; align-items: center; -webkit-tap-highlight-color: transparent; }
  .enrol-plan__head:active { opacity: .85; }
  .enrol-plan__name { font-size: 1rem; }
  .enrol-plan__price { font-size: 1.5rem; margin-top: 2px; }
  .enrol-plan__price small { display: inline; margin-left: 6px; font-size: .7rem; }

  .enrol-plan__chev {
    display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
    background: rgba(78,72,178,.1); color: var(--codar-primary-light); transition: transform .28s ease, background .2s ease;
  }
  .enrol-plan--featured .enrol-plan__chev { background: rgba(255,255,255,.18); color: #fff; }
  .enrol-plan.is-open .enrol-plan__chev { transform: rotate(180deg); }

  .enrol-plan__panel { display: block; max-height: 0; overflow: hidden; transition: max-height .32s cubic-bezier(.25,.8,.3,1); }
  .enrol-plan.is-open .enrol-plan__panel { max-height: 60vh; }

  .enrol-plan__scroll {
    max-height: 38vh; max-height: 38dvh; overflow-y: auto; padding: 0 14px;
    overscroll-behavior: contain; /* without this, reaching the end of this list hands scroll to the
                                      stage behind it -- that handoff is what felt like scroll-sticking */
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
  }
  .enrol-plan__scroll::-webkit-scrollbar { width: 5px; }
  .enrol-plan__scroll::-webkit-scrollbar-thumb { background: rgba(78,72,178,.28); border-radius: 8px; }
  .enrol-plan--featured .enrol-plan__scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.4); }

  .enrol-plan__foot {
    position: sticky; bottom: 0; padding: 12px 14px 14px;
    background: inherit; border-top: 1px solid var(--border-color);
    transform: translateZ(0); will-change: transform;
  } /* pinned below the details so Enroll is never scrolled out of reach */
  .enrol-plan--featured .enrol-plan__foot { border-top-color: rgba(255,255,255,.18); }
  .enrol-plan--tuition .enrol-plan__foot { border-top-color: rgba(78,72,178,.14); }

  .enrol-plan__tag { top: 8px; right: 44px; font-size: .6rem; padding: 3px 8px; }
  .enrol-form { max-width: 100%; }
}

@media (max-width: 991.98px) and (min-width: 641px) { /* tablets: two across */
  .enrol-plans { grid-template-columns: repeat(2,1fr); }
  .enrol-skel-grid { grid-template-columns: repeat(2,1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .enrol-overlay__panel, .enrol-plan__panel, .enrol-plan__chev { animation: none !important; transition: none !important; }
}

/* ---- Standalone curriculum panel --------------------------------------
   ONE single collapsible panel ("Click to expand curriculum") -- not an
   accordion-of-accordions. Once expanded, every module is a plain
   numbered list item with its topics underneath; nothing inside is
   individually collapsible. Border/shadow/icon-tint raised a notch above
   the original flat treatment for a crisper, more premium panel, and the
   "Download Curriculum" button (below, via .btn-outline-codar) is
   elevated to a solid, shadowed brand-colour button so it doesn't read as
   a dull, low-contrast afterthought. ------------------------------------*/
.curriculum-panel {
  background: var(--bg-card); border: 1.5px solid rgba(78,72,178,.16); border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(21,16,64,.08); overflow: hidden;
}
.curriculum-panel__toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: transparent; border: 0; padding: 22px 26px; font-weight: 800; font-size: 1.05rem;
  color: var(--text-primary); cursor: pointer; text-align: left;
}
.curriculum-panel__toggle:hover { background: rgba(78,72,178,.04); }
.curriculum-panel__toggle i.bi-journal-richtext { color: var(--codar-primary-light); margin-right: 10px; }
.curriculum-panel__chev { flex: none; transition: transform .25s ease; color: var(--codar-primary-light); }
.curriculum-panel__toggle:not(.collapsed) .curriculum-panel__chev { transform: rotate(180deg); }
.curriculum-panel__body { padding: 4px 26px 26px; border-top: 1px solid var(--border-soft); }

.curriculum-module { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border-soft); }
.curriculum-module:last-child { border-bottom: 0; }
.curriculum-module__num {
  flex: none; width: 36px; height: 36px; border-radius: 50%; background: rgba(78,72,178,.12);
  color: var(--codar-primary-light); font-weight: 800; font-size: .85rem; display: grid; place-items: center;
}
.curriculum-module__body { flex: 1; min-width: 0; }
.curriculum-module__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.curriculum-module__title { font-weight: 800; color: var(--text-primary); }
.curriculum-module__duration { font-size: .78rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; flex: none; }
.curriculum-module__topics { list-style: none; margin: 0; padding: 0; }
.curriculum-module__topics li { display: flex; align-items: flex-start; gap: 8px; font-size: .88rem; color: var(--text-secondary); padding: 4px 0; }
.curriculum-module__topics i { color: var(--codar-primary-light); margin-top: 3px; flex: none; font-size: .8rem; }

#curriculum-standalone .btn-outline-codar {
  background: var(--codar-primary-light); color: #fff; border-color: var(--codar-primary-light);
  font-weight: 700; padding: 12px 28px; box-shadow: 0 10px 26px rgba(78,72,178,.30);
}
#curriculum-standalone .btn-outline-codar:hover {
  background: var(--codar-primary-dark); border-color: var(--codar-primary-dark);
  box-shadow: 0 14px 32px rgba(78,72,178,.36);
}

@media (max-width: 575.98px) {
  .curriculum-panel__toggle { padding: 18px 18px; font-size: .95rem; }
  .curriculum-panel__body { padding: 2px 18px 18px; }
  .curriculum-module { gap: 12px; }
}

/* ---- Tools strip -------------------------------------------------------*/
.tools-scroll-wrap { display: flex; align-items: center; gap: 12px; }
.tools-grid {
  flex: 1; min-width: 0; display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; padding: 4px 2px;
  scrollbar-width: none;
}
.tools-grid::-webkit-scrollbar { display: none; }
.tool-chip {
  flex: 0 0 auto; width: 150px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid rgba(78,72,178,.14); border-radius: var(--radius-lg);
  padding: 22px 12px; box-shadow: 0 8px 24px rgba(21,16,64,.08); transition: transform .2s ease, box-shadow .2s ease;
}
.tool-chip:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(21,16,64,.14); }
.tool-chip__icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(78,72,178,.13); color: var(--codar-primary-light); font-size: 1.4rem; }
.tool-chip__name { font-weight: 700; font-size: .85rem; color: var(--text-primary); text-align: center; }
.tools-scroll-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--bg-card); border: 1px solid rgba(78,72,178,.16);
  display: grid; place-items: center; color: var(--codar-primary-light); box-shadow: 0 8px 22px rgba(21,16,64,.10);
  cursor: pointer; transition: opacity .2s ease, transform .15s ease;
}
.tools-scroll-btn:hover { transform: translateY(-2px); }
.tools-scroll-btn.is-disabled { opacity: .35; pointer-events: none; }
@media (max-width: 575.98px) { .tool-chip { width: 126px; padding: 16px 8px; } .tools-scroll-btn { width: 38px; height: 38px; } }

/* ---- Certificate sample + partner logos --------------------------------*/
.certificate-showcase {
  background: var(--bg-soft); border: 1px solid rgba(78,72,178,.16); border-radius: var(--radius-lg);
  padding: 14px; box-shadow: 0 20px 46px rgba(21,16,64,.12);
}
.certificate-showcase svg { width: 100%; height: auto; display: block; border-radius: 10px; }
.certificate-caption { font-size: .85rem; }

.partner-badges { display: flex; gap: 16px; flex-wrap: wrap; }
.partner-badge {
  flex: 1; min-width: 160px; display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid rgba(78,72,178,.14); border-radius: var(--radius-md); padding: 16px;
  box-shadow: 0 8px 24px rgba(21,16,64,.08);
}
.partner-badge__icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--codar-primary-light); color: #fff; font-size: 1.2rem; flex: none; }
.partner-badge:nth-child(2) .partner-badge__icon { background: var(--codar-secondary); }
.partner-badge__name { font-weight: 800; color: var(--text-primary); font-size: .92rem; }

/* ---- Certificate section: graduate photos, below the partner badges ----
   Two photo tiles sitting under the partner-logo row so the whole right
   column (heading + paragraph + logos + photos) grows to roughly match
   the height of the certificate image on the left, instead of stopping
   short after just the two logos. bg-card behind each <img> is a safety
   net for the current placeholder art (which has transparent corners) --
   harmless once real photos replace it. ------------------------------- */
.cert-grad-photos { display: flex; gap: 16px; margin-top: 16px; }
.cert-grad-photos__item {
  flex: 1; min-width: 0; aspect-ratio: 4/3; overflow: hidden;
  background: var(--bg-card); border: 1px solid rgba(78,72,178,.14); border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(21,16,64,.08);
}
.cert-grad-photos__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 575.98px) { .cert-grad-photos { gap: 12px; } }

/* ---- Testimonials: video + carousel -------------------------------------*/
.testimonial-video-wrap { max-width: 900px; margin: 0 auto; }
.testimonial-video-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 24px 56px rgba(21,16,64,.18); background: #000; aspect-ratio: 16/9; }
.testimonial-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.testimonial-carousel-wrap { max-width: 720px; margin: 0 auto; position: relative; }
.testimonial-card {
  background: var(--bg-card); border: 1px solid rgba(78,72,178,.14); border-radius: var(--radius-lg); padding: 36px 40px; text-align: center;
  box-shadow: 0 8px 24px rgba(21,16,64,.08); max-width: 640px; margin: 0 auto;
}
.testimonial-quote-icon { font-size: 2rem; color: rgba(78,72,178,.32); }
.testimonial-text { font-size: 1.05rem; line-height: 1.7; color: var(--text-secondary); margin: 12px 0 18px; }
.testimonial-author__name { display: block; font-weight: 800; color: var(--text-primary); }
.testimonial-author__role { display: block; font-size: .82rem; color: var(--text-muted); }

.testimonial-nav-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-card); display: grid; place-items: center; box-shadow: 0 8px 22px rgba(21,16,64,.14); color: var(--codar-primary-light); }
.testimonial-carousel-wrap .carousel-control-prev,
.testimonial-carousel-wrap .carousel-control-next { width: auto; opacity: 1; }
.testimonial-carousel-wrap .carousel-control-prev { left: -10px; }
.testimonial-carousel-wrap .carousel-control-next { right: -10px; }
.carousel-indicators-custom { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.carousel-indicators-custom button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: var(--border-color); padding: 0; transition: all .2s ease; }
.carousel-indicators-custom button.active { background: var(--codar-primary-light); width: 22px; border-radius: 4px; }

@media (max-width: 575.98px) {
  .testimonial-card { padding: 26px 22px; }
  .testimonial-carousel-wrap .carousel-control-prev { left: 0; }
  .testimonial-carousel-wrap .carousel-control-next { right: 0; }
}

/* ---- Why Codar cards -----------------------------------------------------
   (the counters below this grid render through the shared .stats-strip
   component, already styled site-wide -- no page-local rule needed here) */
.why-codar-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.why-card {
  background: var(--bg-card); border: 1px solid rgba(78,72,178,.14); border-radius: var(--radius-lg); padding: 26px 22px;
  box-shadow: 0 8px 24px rgba(21,16,64,.08); transition: transform .2s ease, box-shadow .2s ease;
}
.why-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(21,16,64,.14); }
.why-card__icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: rgba(78,72,178,.13); color: var(--codar-primary-light); font-size: 1.3rem; margin-bottom: 14px; }
.why-card h5 { font-weight: 800; color: var(--text-primary); margin-bottom: 6px; font-size: 1rem; }
.why-card p { color: var(--text-muted); font-size: .88rem; margin: 0; line-height: 1.55; }
@media (max-width: 991.98px) { .why-codar-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 575.98px) { .why-codar-grid { grid-template-columns: 1fr; } }

/* ---- Campus video + carousel ---------------------------------------------*/
.campus-video-wrap { max-width: 900px; margin: 0 auto; }
.campus-video-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 24px 56px rgba(21,16,64,.18); background: #000; aspect-ratio: 16/9; }
.campus-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.campus-video-mute {
  position: absolute; right: 16px; bottom: 16px; z-index: 2; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(15,12,60,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.25); color: #fff; display: grid; place-items: center; cursor: pointer;
  transition: background .2s ease;
}
.campus-video-mute:hover { background: rgba(15,12,60,.75); }
.campus-video-caption { text-align: center; color: var(--text-muted); font-size: .88rem; margin-top: 14px; }

.campus-divider-text {
  display: flex; align-items: center; gap: 14px; max-width: 600px; margin: 36px auto;
  color: var(--text-muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.campus-divider-text::before, .campus-divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border-color); }

.campus-carousel-wrap { max-width: 820px; margin: 0 auto; position: relative; }
.campus-slide { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 22px 52px rgba(21,16,64,.18); }
.campus-slide__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.campus-slide__caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 24px; background: linear-gradient(0deg, rgba(15,12,60,.85), rgba(15,12,60,0)); color: #fff; }
.campus-slide__caption h5 { font-weight: 800; margin: 0 0 4px; }
.campus-slide__caption p { margin: 0; font-size: .86rem; color: rgba(255,255,255,.85); }
@media (max-width: 575.98px) { .campus-slide__caption { padding: 16px 18px; } }

/* ---- Join online sessions ---------------------------------------------
   Left-hand visual: main photo with a floating device-mockup image
   overhanging its left edge -- same technique as the homepage hero's
   floating stat-cards (welcome.blade.php's .hero-image-wrap /
   .floating-card), just carrying an image instead of an icon+text card.
   The floating PNG already has its own transparency, rounding and shadow
   baked in (it's a device-mockup screenshot), so it's rendered plain here
   -- no extra white card background or border-radius clipping, which
   would visibly double up on top of the shadow/edges already in the
   image. A CSS drop-shadow filter lifts it a little further off the page
   than the baked-in shadow alone. ----------------------------------------*/
.join-online-visual-wrap { position: relative; padding: 30px 0 20px 46px; }
.join-online-visual-wrap__main {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
}
.join-online-visual-wrap__floating {
  position: absolute; left: 0; top: 22%; z-index: 2;
  width: 58%; max-width: 300px; height: auto; display: block;
  filter: drop-shadow(0 18px 34px rgba(21,16,64,.28));
  animation: float 4s infinite ease-in-out;
}
@media (max-width: 991.98px) {
  .join-online-visual-wrap { padding: 26px 0 18px 34px; }
  .join-online-visual-wrap__floating { width: 52%; max-width: 240px; }
}
@media (max-width: 575.98px) {
  .join-online-visual-wrap { padding: 20px 0 14px 22px; }
  .join-online-visual-wrap__floating { width: 48%; max-width: 190px; top: auto; bottom: -14px; }
}
@media (prefers-reduced-motion: reduce) {
  .join-online-visual-wrap__floating { animation: none; }
}

.join-online-list { list-style: none; margin: 0; padding: 0; }
.join-online-list li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; color: var(--text-secondary); font-size: .94rem; }
.join-online-list i { color: var(--codar-success); margin-top: 3px; flex: none; }

/* ---- Enrollment sidebar card, deepened shadow ----------------------------*/
.enrollment-card { box-shadow: 0 16px 40px rgba(21,16,64,.12); }

/* ---- Payment section: pricing cards are click-anywhere --------------------
   Cursor nudge scoped to THIS page's payment section only (via its unique
   #payment-section id) -- the shared .pricing-card class is also used on
   pricing.blade.php, whose cards are not wired for click-anywhere, so a
   sitewide cursor:pointer there would be a misleading affordance. --------*/
#payment-section .pricing-card { cursor: pointer; }

/* ==========================================================================
   COURSE HOVER PREVIEW (Udemy-style popover)
   The popover sits inside the .course-card, hidden by default, fading + sliding
   in beside the card on hover (desktop only). On mobile/tablet it stays hidden
   (the user can tap to open the details page instead).
   ========================================================================== */

/* CRITICAL: .course-card in style.css has overflow:hidden (so the image
   corners clip nicely). For cards inside the .course-grid listing, we need
   the popover to escape the card — so we override overflow to visible.
   We also lift the column wrapper out of any clipping context. */
.course-grid .course-item {
  overflow: visible;
  /* position:relative is required so z-index actually applies on hover.
     Without this, the column is `position:static` and z-index is ignored. */
  position: relative;
}
.course-grid .course-card {
  position: relative;
  overflow: visible;
}
/* The image still needs its rounded top corners — re-clip it on the image only */
.course-grid .course-card .course-img {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  overflow: hidden;
}

/* CRITICAL FIX: lift the ENTIRE column on hover, not just the card.
   AOS animations add a `transform` to .course-item which creates an isolated
   stacking context. Without raising the column itself, the popover gets
   trapped behind sibling columns no matter how high its inner z-index is.
   :hover on the column triggers when hovering anywhere inside it, including
   the popover (because the popover is a descendant of the card which is a
   descendant of the column). */
.course-grid .course-item:hover {
  z-index: 100;
}
.course-grid .course-card:hover {
  z-index: 100;
}

.course-preview {
  position: absolute;
  top: 0;
  left: calc(100% + 16px);
  width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(78, 72, 178, 0.18);
  padding: 22px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-12px);
  transition: opacity .28s ease, transform .28s ease, visibility 0s linear .28s;
  pointer-events: none;
}

/* CRITICAL FIX: invisible "bridge" so the cursor can move from the card to
   the popover without crossing dead air. The ::after extends 22px to the
   LEFT of the popover (covering the visible gap + the arrow), keeping the
   cursor inside the card's :hover region the whole way across. */
.course-preview::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -22px;
  width: 22px;
  /* invisible but still receives the cursor, keeping :hover alive */
}

/* Speech-bubble pointer to the left */
.course-preview::before {
  content: '';
  position: absolute;
  top: 30px;
  left: -10px;
  width: 18px; height: 18px;
  background: var(--bg-card);
  border-left: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  transform: rotate(45deg);
  border-radius: 3px;
  z-index: 1;
}

/* Cards in the rightmost column flip the popover to the LEFT side */
.course-card.preview-left .course-preview {
  left: auto;
  right: calc(100% + 16px);
  transform: translateX(12px);
}
/* Bridge for the flipped (left-positioned) variant — extends to the RIGHT */
.course-card.preview-left .course-preview::after {
  left: auto;
  right: -22px;
}
.course-card.preview-left .course-preview::before {
  left: auto;
  right: -10px;
  border-left: none;
  border-bottom: none;
  border-right: 1px solid var(--border-soft);
  border-top: 1px solid var(--border-soft);
}

/* Reveal on hover — desktop only.
   Scope to .course-grid so it ONLY triggers on the listing page (not on
   homepage course cards or other pages where there's no popover markup). */
@media (min-width: 1200px) {
  .course-grid .course-card:hover .course-preview {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
    transition: opacity .28s ease, transform .28s ease, visibility 0s;
  }
  .course-grid .course-card.preview-left:hover .course-preview {
    transform: translateX(0);
  }
}

/* Inner content */
.course-preview h5 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
  color: var(--text-primary);
}
.course-preview .preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.course-preview .preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.course-preview .preview-badge.bestseller {
  background: rgba(232, 47, 88, 0.12);
  color: var(--codar-secondary);
}
.course-preview .preview-badge.premium {
  background: rgba(78, 72, 178, 0.12);
  color: var(--codar-primary-light);
}
.course-preview .preview-badge.hot {
  background: rgba(239, 68, 68, 0.12);
  color: var(--codar-danger);
}

.course-preview .preview-update {
  font-size: 0.82rem;
  color: var(--codar-success);
  font-weight: 600;
  margin-bottom: 4px;
}
.course-preview .preview-update strong { font-weight: 700; }

.course-preview .preview-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.course-preview .preview-meta span + span::before {
  content: '·';
  margin: 0 6px;
  color: var(--text-muted);
}

.course-preview .preview-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.course-preview .preview-points {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.course-preview .preview-points li {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.course-preview .preview-points li i {
  color: var(--codar-success);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.course-preview .preview-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.course-preview .preview-enroll {
  flex: 1;
  background: var(--gradient-primary);
  color: #fff;
  padding: 11px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  text-align: center;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-blue);
}
.course-preview .preview-enroll:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 16px 32px rgba(78, 72, 178, 0.35);
}
.course-preview .preview-wishlist {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--codar-primary-light);
  background: transparent;
  color: var(--codar-primary-light);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.course-preview .preview-wishlist:hover,
.course-preview .preview-wishlist.active {
  background: var(--codar-primary-light);
  color: #fff;
}

/* Hide the popover on mobile/tablet — saves space and avoids broken positioning */
@media (max-width: 1199.98px) {
  .course-preview { display: none !important; }
}

/* ==========================================================================
   LIST VIEW (when toggle is clicked)
   The grid container gets .view-list, which forces every course card column
   to be full width and converts the card to a horizontal layout.
   ========================================================================== */
.course-grid.view-list .course-item {
  width: 100% !important;
  flex: 0 0 100% !important;
  max-width: 100% !important;
}
.course-grid.view-list .course-card {
  flex-direction: row;
  align-items: stretch;
}
.course-grid.view-list .course-card .course-img {
  width: 320px;
  height: auto;
  min-height: 220px;
  flex-shrink: 0;
}
.course-grid.view-list .course-card .course-body {
  flex: 1;
}

/* In list view we also disable the hover preview (it's redundant — the whole
   card is wider and shows more info already) */
.course-grid.view-list .course-preview { display: none !important; }

@media (max-width: 767.98px) {
  /* Force list view back to stacked on small screens */
  .course-grid.view-list .course-card { flex-direction: column; }
  .course-grid.view-list .course-card .course-img { width: 100%; min-height: 0; }
}
