/* ============================================
   Professional Course Listing - Production Ready
   Mobile-first, accessible, scalable design
   ============================================ */

/* Container: Handles both table (desktop) and card (mobile) layouts */
#course-pills-2 .course-listing-container {
  width: 100%;
  overflow-x: auto;
}

/* Desktop: no horizontal scroll; table fits container */
@media (min-width: 992px) {
  #course-pills-2 .course-listing-container,
  #course-pills-2 .table-responsive {
    overflow-x: visible !important;
  }
}

/* ===== DESKTOP: TABLE LAYOUT ===== */
#course-pills-2 .course-table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Table header */
#course-pills-2 .course-table thead {
  background: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

#course-pills-2 .course-table th {
  padding: 1rem;
  text-align: right;
  font-weight: 600;
  font-size: 0.875rem;
  color: #495057;
  white-space: nowrap;
  position: relative;
}

#course-pills-2 .course-table th:first-child { padding-right: 1.5rem; }
#course-pills-2 .course-table th:last-child { padding-left: 1.5rem; }

/* Header with inline controls */
#course-pills-2 .course-table th.filterable {
  cursor: pointer;
  user-select: none;
}

#course-pills-2 .course-table th.filterable:hover {
  background-color: #f0f0f0;
}

/* Dropdown indicator for filterable columns (Type & Provider) */
#course-pills-2 .course-filter-indicator {
  display: inline-block;
  margin-right: 0.25rem;
  color: #6c757d;
  font-size: 0.75rem;
  vertical-align: middle;
  transition: color 0.2s ease;
}

#course-pills-2 .course-table th.filterable:hover .course-filter-indicator {
  color: #495057;
}

#course-pills-2 .course-table th.filterable.active .course-filter-indicator {
  color: #0d6efd;
}

/* Filter dropdown menu */
#course-pills-2 .course-filter-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 180px;
  z-index: 100;
  margin-top: 0.25rem;
  padding: 0.5rem 0;
  max-height: 300px;
  overflow-y: auto;
}

#course-pills-2 .course-filter-dropdown.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#course-pills-2 .course-filter-option {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  text-align: right;
  font-size: 0.875rem;
  color: #495057;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

#course-pills-2 .course-filter-option:hover {
  background-color: #f8f9fa;
}

#course-pills-2 .course-filter-option.active {
  background-color: #e7f3ff;
  color: #0d6efd;
  font-weight: 500;
}

#course-pills-2 .course-filter-option[data-value=""] {
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 0.25rem;
  padding-bottom: 0.75rem;
}

/* Sortable header (Price & Rating) */
#course-pills-2 .course-table th.sortable {
  cursor: pointer;
  user-select: none;
}

#course-pills-2 .course-table th.sortable:hover {
  background-color: #f0f0f0;
}

/* Sort arrows - inline after label */
#course-pills-2 .course-sort-arrows {
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 0.75rem;
  vertical-align: middle;
  line-height: 1;
}

#course-pills-2 .course-sort-arrows::before {
  content: "↑↓";
  color: #adb5bd;
  opacity: 0.5;
}

#course-pills-2 .course-table th.sortable:hover .course-sort-arrows::before {
  opacity: 0.7;
}

/* Price column arrows - green color */
#course-pills-2 .course-table th.sortable[data-sort="price"] .course-sort-arrows {
  color: #28a745;
  font-size: 1rem;
}

#course-pills-2 .course-table th.sortable[data-sort="price"].sort-asc .course-sort-arrows::before {
  content: "↑";
  opacity: 1;
  color: #28a745;
}

#course-pills-2 .course-table th.sortable[data-sort="price"].sort-desc .course-sort-arrows::before {
  content: "↓";
  opacity: 1;
  color: #28a745;
}

/* Rating column arrows - yellow/star color */
#course-pills-2 .course-table th.sortable[data-sort="rating"] .course-sort-arrows {
  color: #ffc107;
  font-size: 1rem;
}

#course-pills-2 .course-table th.sortable[data-sort="rating"].sort-asc .course-sort-arrows::before {
  content: "↑";
  opacity: 1;
  color: #ffc107;
}

#course-pills-2 .course-table th.sortable[data-sort="rating"].sort-desc .course-sort-arrows::before {
  content: "↓";
  opacity: 1;
  color: #ffc107;
}

/* Mobile Filter & Sort Button */
#course-pills-2 .mobile-filter-sort-btn {
  display: none;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s ease;
}

#course-pills-2 .mobile-filter-sort-btn:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

#course-pills-2 .mobile-filter-sort-btn i {
  margin-left: 0.5rem;
}

/* Mobile Filter & Sort Modal */
#course-pills-2 .mobile-filter-modal {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  z-index: 1000;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

#course-pills-2 .mobile-filter-modal.active {
  display: block;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

#course-pills-2 .mobile-filter-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

#course-pills-2 .mobile-filter-modal-overlay.active {
  display: block;
}

#course-pills-2 .mobile-filter-modal-header {
  padding: 1.25rem;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

#course-pills-2 .mobile-filter-modal-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #212529;
}

#course-pills-2 .mobile-filter-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

#course-pills-2 .mobile-filter-modal-close:hover {
  background: #f8f9fa;
}

#course-pills-2 .mobile-filter-modal-body {
  padding: 1.25rem;
}

#course-pills-2 .mobile-filter-section {
  margin-bottom: 2rem;
}

#course-pills-2 .mobile-filter-section h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
  margin: 0 0 1rem 0;
}

#course-pills-2 .mobile-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-sort-option {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#course-pills-2 .mobile-sort-option:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

#course-pills-2 .mobile-sort-option.active {
  background: #e7f3ff;
  border-color: #0d6efd;
  color: #0d6efd;
}

#course-pills-2 .mobile-sort-option input[type="radio"] {
  margin-left: 0.75rem;
  cursor: pointer;
}

#course-pills-2 .mobile-filter-actions {
  padding: 1.25rem;
  border-top: 1px solid #dee2e6;
  display: flex;
  gap: 0.75rem;
  position: sticky;
  bottom: 0;
  background: #fff;
}

.mobile-filter-btn {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

#course-pills-2 .mobile-filter-btn-primary {
  background: #0d6efd;
  color: #fff;
}

#course-pills-2 .mobile-filter-btn-primary:hover {
  background: #0b5ed7;
}

#course-pills-2 .mobile-filter-btn-secondary {
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
}

#course-pills-2 .mobile-filter-btn-secondary:hover {
  background: #e9ecef;
}

/* Table rows */
#course-pills-2 .course-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.15s ease;
}

#course-pills-2 .course-table tbody tr:hover {
  background-color: #f8f9fa;
}

#course-pills-2 .course-table tbody tr.expanded {
  background-color: #f0f7ff;
}

#course-pills-2 .course-table td {
  padding: 1.25rem 1rem;
  vertical-align: top;
}

/* Column widths - نام دوره حداکثر فضا؛ نوع و امتیاز فشرده برای دادن جا به نام دوره */
#course-pills-2 .course-table .col-title { width: 62%; min-width: 320px; }
#course-pills-2 .course-table .col-type { width: 3%; min-width: 72px; }
#course-pills-2 .course-table .col-provider { width: 8%; min-width: 90px; }
#course-pills-2 .course-table .col-price { width: 9%; min-width: 110px; }
#course-pills-2 .course-table .col-rating { width: 8%; min-width: 72px; }
#course-pills-2 .course-table .col-actions { width: 10%; min-width: 130px; }

/* Actions column: keep readable, no squeeze */
#course-pills-2 .course-table th:last-child,
#course-pills-2 .course-table td:last-child {
  min-width: 120px;
  white-space: nowrap;
}

/* Badges in table (e.g. type) must not break */
#course-pills-2 .course-table .course-type-badge,
#course-pills-2 .course-table .badge {
  white-space: nowrap;
}

/* Course title - strongest visual element */
#course-pills-2 .course-title {
  font-size: 1rem;
  font-weight: 600;
  color: #212529;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.8em;
  max-height: 2.8em;
}

#course-pills-2 .course-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

#course-pills-2 .course-title a:hover {
  color: #0d6efd;
}

/* Meta fields under title - exactly TWO inline fields */
#course-pills-2 .course-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: #6c757d;
  margin-top: 0.5rem;
  direction: rtl;
  text-align: right;
}

#course-pills-2 .course-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

#course-pills-2 .course-meta-item i {
  font-size: 0.875rem;
}

/* Type badge - فشرده؛ نوع کلاس در دو سطر: کلاس آنلاین / (خصوصی) */
#course-pills-2 .course-table .course-type-badge {
  display: inline-block;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: pre-line;
  line-height: 1.25;
  text-align: center;
}

#course-pills-2 .course-type-badge.video { background: #e7f3ff; color: #0d6efd; }
#course-pills-2 .course-type-badge.book { background: #fff3cd; color: #856404; }
#course-pills-2 .course-type-badge.pdf { background: #f8d7da; color: #721c24; }
#course-pills-2 .course-type-badge.in-person { background: #d1ecf1; color: #0c5460; }
#course-pills-2 .course-type-badge.private { background: #d4edda; color: #155724; }
#course-pills-2 .course-type-badge.webinar { background: #d1ecf1; color: #0c5460; }
#course-pills-2 .course-type-badge.audio { background: #e2d5f1; color: #5a3d7a; }

/* Provider */
#course-pills-2 .course-provider {
  font-size: 0.875rem;
  color: #495057;
}

/* Price - bold and clearly visible */
#course-pills-2 .course-price {
  font-size: 1rem;
  font-weight: 700;
  color: #28a745;
}

#course-pills-2 .course-price.free {
  color: #0d6efd;
}

/* Rating - ستاره‌ها و عدد در دو سطر برای صرفه‌جویی فضا */
#course-pills-2 .course-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#course-pills-2 .course-rating-stacked {
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

#course-pills-2 .course-rating-stacked .course-rating-stars {
  font-size: 0.8125rem;
  line-height: 1;
}

#course-pills-2 .course-rating-stacked .course-rating-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
}

#course-pills-2 .course-rating-stars {
  display: flex;
  gap: 0.125rem;
  color: #ffc107;
  font-size: 0.875rem;
}

#course-pills-2 .course-rating-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
}

/* Actions column */
#course-pills-2 .course-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Toggle button for details */
#course-pills-2 .course-toggle-btn {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: #495057;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#course-pills-2 .course-toggle-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #212529;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#course-pills-2 .course-toggle-btn:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

#course-pills-2 .course-toggle-btn[aria-expanded="true"] {
  background: #e7f3ff;
  border-color: #0d6efd;
  color: #0d6efd;
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

#course-pills-2 .course-toggle-icon {
  transition: transform 0.3s ease;
}

#course-pills-2 .course-toggle-btn[aria-expanded="true"] .course-toggle-icon {
  transform: rotate(180deg);
}

/* Primary CTA button */
#course-pills-2 .course-cta-btn {
  background: #0d6efd;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease;
  flex: 1;
  text-align: center;
}

#course-pills-2 .course-cta-btn:hover {
  background: #0b5ed7;
  color: #fff;
}

#course-pills-2 .course-cta-btn.free {
  background: #0d6efd;
}

#course-pills-2 .course-cta-btn.free:hover {
  background: #0b5ed7;
}

/* Disabled CTA button styling */
#course-pills-2 .course-cta-btn:disabled,
#course-pills-2 .course-cta-btn.disabled {
  background: #e9ecef;
  color: #6c757d;
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

#course-pills-2 .course-cta-btn:disabled:hover,
#course-pills-2 .course-cta-btn.disabled:hover {
  background: #e9ecef;
  color: #6c757d;
}

/* Compare button - Secondary style */
#course-pills-2 .course-compare-btn {
  background: #6c757d;
  color: #fff;
}

#course-pills-2 .course-compare-btn:hover {
  background: #5c636a;
  color: #fff;
}

/* Favorite button */
#course-pills-2 .course-favorite-btn {
  min-width: 44px;
  background: #6c757d;
  color: #fff;
}
#course-pills-2 .course-favorite-btn:hover {
  background: #5c636a;
  color: #fff;
}
#course-pills-2 .course-favorite-btn.favorited {
  background: var(--bs-danger, #dc3545);
  color: #fff;
}
#course-pills-2 .course-favorite-btn.favorited:hover {
  background: #bb2d3b;
  color: #fff;
}
#course-pills-2 .course-favorite-btn .fa-bookmark:nth-child(2) {
  display: none;
}
#course-pills-2 .course-favorite-btn.favorited .fa-bookmark:first-child {
  display: none;
}
#course-pills-2 .course-favorite-btn.favorited .fa-bookmark:nth-child(2) {
  display: inline-block;
}

/* Expandable details row */
#course-pills-2 .course-details {
  display: none;
  padding: 0;
  background: #f8f9fa;
}

#course-pills-2 .course-details.expanded {
  display: table-row;
}

#course-pills-2 .course-details-cell {
  padding: 1.5rem;
  border-top: 1px solid #dee2e6;
}

#course-pills-2 .course-details-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#course-pills-2 .course-details-section h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
  margin: 0 0 0.75rem 0;
}

#course-pills-2 .course-details-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#course-pills-2 .course-details-list li {
  font-size: 0.875rem;
  color: #6c757d;
  padding: 0.25rem 0;
  padding-right: 1.25rem;
  position: relative;
}

#course-pills-2 .course-details-list li::before {
  content: "•";
  position: absolute;
  right: 0;
  color: #0d6efd;
  font-weight: bold;
}

#course-pills-2 .course-details-list.advantages li::before {
  color: #28a745;
}

#course-pills-2 .course-details-list.disadvantages li::before {
  color: #dc3545;
}

#course-pills-2 .course-details-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#course-pills-2 .course-details-meta h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
  margin: 0 0 0.75rem 0;
}

#course-pills-2 .course-details-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #495057;
}

#course-pills-2 .course-details-meta-item i {
  color: #0d6efd;
  width: 1rem;
}


/* ===== MOBILE: CARD LAYOUT ===== */
@media (max-width: 768px) {
  #course-pills-2 .course-table,
  #course-pills-2 .course-table thead,
  #course-pills-2 .course-table tbody,
  #course-pills-2 .course-table tr,
  #course-pills-2 .course-table td {
    display: block;
  }

  #course-pills-2 .course-table thead {
    display: none;
  }

  #course-pills-2 .mobile-filter-sort-btn {
    display: block;
  }

  /* Hide inline header controls on mobile */
  #course-pills-2 .course-table th .course-filter-indicator,
  #course-pills-2 .course-table th .course-sort-arrows,
  #course-pills-2 .course-filter-dropdown {
    display: none !important;
  }

  #course-pills-2 .course-table th.filterable,
  #course-pills-2 .course-table th.sortable {
    cursor: default;
  }

  #course-pills-2 .course-table th.filterable:hover,
  #course-pills-2 .course-table th.sortable:hover {
    background-color: transparent;
  }

  #course-pills-2 .course-table tbody tr {
    display: block;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }

  #course-pills-2 .course-table td {
    padding: 0.75rem 0;
    border: none;
    text-align: right;
  }

  #course-pills-2 .course-table td:not(:last-child) {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
  }

  /* Card header */
  #course-pills-2 .course-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  #course-pills-2 .course-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
  }

  #course-pills-2 .course-meta {
    gap: 1rem;
  }

  /* Card info row */
  #course-pills-2 .course-card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  #course-pills-2 .course-type-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  #course-pills-2 .course-provider {
    font-size: 0.8125rem;
  }

  #course-pills-2 .course-price {
    font-size: 1.125rem;
  }

  #course-pills-2 .course-rating {
    justify-content: flex-start;
  }

  /* Card actions */
  #course-pills-2 .course-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
  }

  #course-pills-2 .course-cta-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  #course-pills-2 .course-toggle-btn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Mobile details accordion */
  #course-pills-2 .course-details {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
  }

  #course-pills-2 .course-details.expanded {
    display: block;
  }

  #course-pills-2 .course-details-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  #course-pills-2 .course-details-meta h4 {
    margin-bottom: 0.75rem;
  }

}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
#course-pills-2 .course-toggle-btn:focus-visible,
#course-pills-2 .course-cta-btn:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* RTL support */
#course-pills-2 [dir="rtl"] .course-table th,
#course-pills-2 [dir="rtl"] .course-table td {
  text-align: right;
}

#course-pills-2 [dir="rtl"] .course-meta {
  flex-direction: row;
}

#course-pills-2 [dir="rtl"] .course-rating {
  flex-direction: row-reverse;
}

#course-pills-2 [dir="rtl"] .course-actions {
  flex-direction: row-reverse;
}

/* ============================================
   RESPONSIVE IMPROVEMENTS - Production Ready
   Desktop: Pixel-perfect (no changes)
   Tablet: Clean layout, no overflow
   Mobile: No horizontal scroll, readable text
   ============================================ */

/* ===== TABLET (768px - 1199px) ===== */
@media (min-width: 768px) and (max-width: 1199px) {
  /* Container adjustments */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Page intro section */
  .bg-light .row {
    margin-left: 0;
    margin-right: 0;
  }

  .bg-light .col-lg-8,
  .bg-light .col-lg-4 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Typography scaling */
  h1.fs-3 {
    font-size: 1.5rem !important;
    line-height: 1.4;
  }

  .snippet-answer {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  /* Tab navigation */
  .nav-pills .nav-link {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }

  /* Course table adjustments */
  #course-pills-2 .course-table {
    font-size: 0.875rem;
  }

  #course-pills-2 .course-table th {
    padding: 0.75rem 0.5rem;
    font-size: 0.8125rem;
  }

  #course-pills-2 .course-table td {
    padding: 1rem 0.5rem;
  }

  #course-pills-2 .course-title {
    font-size: 0.9375rem;
  }

  #course-pills-2 .course-meta {
    font-size: 0.75rem;
    gap: 1rem;
  }

  #course-pills-2 .course-type-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  #course-pills-2 .course-provider {
    font-size: 0.8125rem;
  }

  #course-pills-2 .course-price {
    font-size: 0.9375rem;
  }

  #course-pills-2 .course-rating-value {
    font-size: 0.8125rem;
  }

  #course-pills-2 .course-cta-btn {
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
  }

  #course-pills-2 .course-toggle-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
  }

  /* Column width adjustments for tablet - نام دوره گسترده‌تر */
  #course-pills-2 .course-table .col-title {
    min-width: 280px;
  }

  #course-pills-2 .course-table .col-type {
    min-width: 65px;
  }

  #course-pills-2 .course-table .col-provider {
    min-width: 85px;
  }

  #course-pills-2 .course-table .col-price {
    min-width: 100px;
  }

  #course-pills-2 .course-table .col-rating {
    min-width: 65px;
  }

  #course-pills-2 .course-table .col-actions {
    min-width: 120px;
  }

  /* Content sections */
  .card-body {
    padding: 1.5rem !important;
  }

  .col-8,
  .col-4 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Image responsiveness */
  .bg-light .col-lg-4 img {
    max-width: 100%;
    height: auto;
  }

  /* Video card sidebar */
  .col-4 .card {
    padding: 1rem !important;
  }

  /* List groups */
  .list-group-item {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }

  /* Breadcrumb */
  .breadcrumb {
    font-size: 0.875rem;
  }

  /* Social links */
  .social-links {
    font-size: 0.875rem;
  }

  .social-links li {
    margin: 0 0.25rem;
  }
}

/* ===== MOBILE (≤767px) ===== */
@media (max-width: 767px) {
  /* Container full width with padding */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
  }

  /* Page intro section */
  .bg-light {
    padding: 1rem 0;
  }

  .bg-light .row {
    margin-left: 0;
    margin-right: 0;
  }

  .bg-light .col-lg-8,
  .bg-light .col-lg-4 {
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 1.5rem;
  }

  /* Typography scaling for mobile */
  h1.fs-3 {
    font-size: 1.25rem !important;
    line-height: 1.3;
    margin-bottom: 1rem;
  }

  .snippet-answer {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  /* Breadcrumb mobile */
  .breadcrumb {
    font-size: 0.75rem;
    padding: 0.5rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .breadcrumb-item {
    display: inline-block;
  }

  /* Social links mobile */
  .social-links {
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8125rem;
  }

  .social-links li {
    margin: 0;
  }

  /* Badge adjustments */
  .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
  }

  /* Tab navigation mobile */
  .nav-pills {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-pills .nav-link {
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
  }

  .card-header {
    padding: 1rem !important;
  }

  /* Content sections mobile */
  .card-body {
    padding: 1rem !important;
  }

  /* Column adjustments */
  .col-8,
  .col-4 {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 1.5rem;
  }

  /* Typography in content */
  h2 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
  }

  p {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  ul, ol {
    font-size: 0.875rem;
    padding-right: 1.25rem;
  }

  li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
  }

  /* List groups mobile */
  .list-group-item {
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
  }

  .list-group-item i {
    font-size: 0.875rem;
  }

  /* Image responsiveness */
  .bg-light .col-lg-4 img {
    width: 100%;
    height: auto;
    border-radius: 8px;
  }

  /* Video card sidebar mobile */
  .col-4 .card {
    margin-bottom: 1.5rem;
  }

  .col-4 .card .card-img {
    width: 100%;
    height: auto;
  }

  /* Buttons mobile */
  .btn {
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .btn-lg {
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
  }

  /* Course listing container mobile */
  #course-pills-2 .course-listing-container {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    overflow-x: visible;
  }

  /* Prevent table overflow on mobile */
  #course-pills-2 .course-table {
    overflow-x: visible;
    display: block;
  }

  /* Table improvements already handled in existing mobile styles */
  /* Additional mobile table refinements */
  #course-pills-2 .course-table tbody tr {
    padding: 0.75rem;
  }

  #course-pills-2 .course-table td {
    padding: 0.5rem 0;
    font-size: 0.875rem;
  }

  #course-pills-2 .course-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  #course-pills-2 .course-meta {
    font-size: 0.8125rem;
    gap: 0.75rem;
  }

  #course-pills-2 .course-meta-item {
    font-size: 0.75rem;
  }

  #course-pills-2 .course-type-badge {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
  }

  #course-pills-2 .course-provider {
    font-size: 0.75rem;
  }

  #course-pills-2 .course-price {
    font-size: 1rem;
  }

  #course-pills-2 .course-rating {
    font-size: 0.875rem;
  }

  #course-pills-2 .course-rating-stars {
    font-size: 0.75rem;
  }

  #course-pills-2 .course-rating-value {
    font-size: 0.8125rem;
  }

  #course-pills-2 .course-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  #course-pills-2 .course-cta-btn {
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  #course-pills-2 .course-toggle-btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  /* Course details mobile */
  #course-pills-2 .course-details-cell {
    padding: 1rem;
  }

  #course-pills-2 .course-details-content {
    gap: 1rem;
  }

  #course-pills-2 .course-details-section h4 {
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
  }

  #course-pills-2 .course-details-list li {
    font-size: 0.8125rem;
    padding: 0.25rem 0;
  }

  #course-pills-2 .course-details-meta-item {
    font-size: 0.8125rem;
  }

  /* Mobile filter modal improvements */
  #course-pills-2 .mobile-filter-modal {
    max-height: 85vh;
  }

  #course-pills-2 .mobile-filter-modal-body {
    padding: 1rem;
  }

  #course-pills-2 .mobile-filter-section {
    margin-bottom: 1.5rem;
  }

  #course-pills-2 .mobile-filter-section h4 {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
  }

  #course-pills-2 .mobile-sort-option {
    padding: 0.625rem;
    font-size: 0.875rem;
  }

  #course-pills-2 .mobile-filter-btn {
    padding: 0.75rem;
    font-size: 0.875rem;
  }

  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }

  /** {
    max-width: 100%;
  }
*/
  img {
    max-width: 100%;
    height: auto;
  }

  /* White space handling */
  #course-pills-2 .course-table td {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  #course-pills-2 .course-title a {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* ===== SMALL MOBILE (≤480px) ===== */
@media (max-width: 480px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  h1.fs-3 {
    font-size: 1.125rem !important;
  }

  .nav-pills .nav-link {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
  }

  #course-pills-2 .course-table tbody tr {
    padding: 0.5rem;
  }

  #course-pills-2 .course-title {
    font-size: 0.9375rem;
  }

  #course-pills-2 .course-meta {
    font-size: 0.75rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn {
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
  }
}

/* ===== LARGE DESKTOP (≥1400px) - Ensure pixel-perfect ===== */
@media (min-width: 1400px) {
  /* Maintain exact desktop layout */
  #course-pills-2 .course-table {
    font-size: 1rem;
  }

  #course-pills-2 .course-table th {
    padding: 1rem;
  }

  #course-pills-2 .course-table td {
    padding: 1.25rem 1rem;
  }
}

/* ============================================
   OTHER COURSES SLIDER - Responsive Styles
   ============================================ */

/* Slider container responsive */
section.pt-0 .container {
  overflow: hidden;
}

/* Tiny slider responsive adjustments */
section.pt-0 .tiny-slider {
  position: relative;
  width: 100%;
}

section.pt-0 .tiny-slider-inner {
  width: 100%;
}

/* Slider cards responsive */
section.pt-0 .tiny-slider .pb-4 {
  padding-bottom: 1rem;
}

section.pt-0 .tiny-slider .card {
  height: 100%;
  margin: 0;
}

section.pt-0 .tiny-slider .card-img-top {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Course card title - 2-line clamp */
section.pt-0 .tiny-slider .card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  min-height: 3em;
}

section.pt-0 .tiny-slider .card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

section.pt-0 .tiny-slider .card-title a:hover {
  color: #0d6efd;
}

/* Course card badge icon - consistent font-weight */
section.pt-0 .tiny-slider .badge i.text-primary {
  font-weight: 600;
}

/* Slider arrows responsive
section.pt-0 .tiny-slider .tns-controls [data-controls] {
  width: 40px;
  height: 40px;
  font-size: 0.875rem;
  z-index: 10;
}
 */
/* ===== TABLET (768px - 1199px) ===== */
@media (min-width: 768px) and (max-width: 1199px) {
  /* Slider adjustments for tablet 
  section.pt-0 .tiny-slider .tns-controls [data-controls] {
    width: 36px;
    height: 36px;
    font-size: 0.8125rem;
  }
*/
  section.pt-0 .tiny-slider .card {
    padding: 0.75rem;
  }

  section.pt-0 .tiny-slider .card-title {
    font-size: 0.9375rem;
  }

  section.pt-0 .tiny-slider .card-body {
    padding: 0.75rem;
  }

  /* Icon circles */
  section.pt-0 .tiny-slider .icon-md {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.875rem;
  }

  section.pt-0 .tiny-slider .small {
    font-size: 0.75rem;
  }
}

/* ===== MOBILE (≤767px) ===== */
@media (max-width: 767px) {
  /* Slider section mobile */
  section.pt-0 {
    padding-top: 1.5rem !important;
    padding-bottom: 1rem !important;
  }

  section.pt-0 .container {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
  }

  /* Slider title mobile */
  section.pt-0 .row.mb-4 {
    margin-bottom: 1rem !important;
    margin-left: 0;
    margin-right: 0;
  }

  section.pt-0 h2 {
    font-size: 1.125rem;
    margin-bottom: 0;
    padding: 0;
  }

  /* Slider row mobile */
  section.pt-0 > .container > .row {
    margin-left: 0;
    margin-right: 0;
  }

  /* Slider container mobile */
  section.pt-0 .tiny-slider {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    overflow: visible;
  }

  section.pt-0 .tiny-slider-inner {
    width: 100%;
    margin: 0;
  }

  /* Slider arrows mobile - make them more visible and touch-friendly
  section.pt-0 .tiny-slider .tns-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    pointer-events: none;
    z-index: 10;
  }

  section.pt-0 .tiny-slider .tns-controls [data-controls] {
    width: 44px;
    height: 44px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    pointer-events: all;
    border: 1px solid rgba(0, 0, 0, 0.1);
  }
*/
  section.pt-0 .tiny-slider .tns-controls [data-controls]:hover,
  section.pt-0 .tiny-slider .tns-controls [data-controls]:active {
    background: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
  }

  section.pt-0 .tiny-slider .tns-controls [data-controls="prev"] {
    right: 0.5rem;
  }

  section.pt-0 .tiny-slider .tns-controls [data-controls="next"] {
    left: 0.5rem;
  }
 
  /* Slider items mobile */
  section.pt-0 .tiny-slider .tns-item {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  section.pt-0 .tiny-slider .pb-4 {
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    max-width: 100%;
  }

  /* Slider cards mobile */
  section.pt-0 .tiny-slider .card {
    padding: 0.75rem;
    border-radius: 8px;
    margin: 0;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  section.pt-0 .tiny-slider .card-img-top {
    border-radius: 6px;
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
  }

  section.pt-0 .tiny-slider .card-body {
    padding: 0.75rem 0;
  }

  /* Icon section mobile */
  section.pt-0 .tiny-slider .d-flex.justify-content-center {
    margin-bottom: 0.5rem;
  }

  section.pt-0 .tiny-slider .d-flex.gap-3 {
    gap: 0.5rem !important;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Icon circles mobile */
  section.pt-0 .tiny-slider .icon-md {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.875rem;
    flex-shrink: 0;
  }

  section.pt-0 .tiny-slider .d-flex.flex-column.align-items-center {
    min-width: 60px;
  }

  section.pt-0 .tiny-slider .small {
    font-size: 0.6875rem;
    margin-top: 0.25rem;
    text-align: center;
    white-space: nowrap;
  }

  section.pt-0 .tiny-slider .h6 {
    font-size: 0.75rem;
    margin: 0;
  }

  /* Divider mobile */
  section.pt-0 .tiny-slider hr {
    margin: 0.75rem 0;
    opacity: 0.3;
  }

  /* Card title mobile */
  section.pt-0 .tiny-slider .card-title {
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    min-height: 3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  section.pt-0 .tiny-slider .card-title a {
    font-size: 0.9375rem;
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
  }

  section.pt-0 .tiny-slider .card-title a:hover {
    color: #0d6efd;
  }

  /* Badge mobile */
  section.pt-0 .tiny-slider .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
  }

  section.pt-0 .tiny-slider .badge i {
    font-size: 0.8125rem;
  }

  /* Ensure slider doesn't overflow */
  section.pt-0 .tiny-slider .tns-outer {
    overflow: hidden;
    position: relative;
    width: 100%;
  }

  section.pt-0 .tiny-slider .tns-inner {
    overflow: visible;
  }

  section.pt-0 .tiny-slider .tns-ovh {
    overflow: hidden;
  }

  /* Fix for tiny-slider container */
  section.pt-0 .row > div {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
  }
}

/* ===== SMALL MOBILE (≤480px) ===== */
@media (max-width: 480px) {
  /* Slider section small mobile */
  section.pt-0 {
    padding-top: 1rem !important;
  }

  section.pt-0 .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  section.pt-0 h2 {
    font-size: 1rem;
  }

  /* Slider adjustments for small mobile
  section.pt-0 .tiny-slider .tns-controls [data-controls] {
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
  }

  section.pt-0 .tiny-slider .tns-controls [data-controls="prev"] {
    right: 0.25rem;
  }

  section.pt-0 .tiny-slider .tns-controls [data-controls="next"] {
    left: 0.25rem;
  }

  section.pt-0 .tiny-slider .tns-item {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
 */
  section.pt-0 .tiny-slider .card {
    padding: 0.625rem;
  }

  section.pt-0 .tiny-slider .card-body {
    padding: 0.625rem 0;
  }

  section.pt-0 .tiny-slider .card-title {
    font-size: 0.875rem;
    margin-bottom: 0.625rem;
  }

  section.pt-0 .tiny-slider .card-title a {
    font-size: 0.875rem;
  }

  section.pt-0 .tiny-slider .icon-md {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.8125rem;
  }

  section.pt-0 .tiny-slider .d-flex.flex-column.align-items-center {
    min-width: 55px;
  }

  section.pt-0 .tiny-slider .small {
    font-size: 0.625rem;
  }

  section.pt-0 .tiny-slider .h6 {
    font-size: 0.6875rem;
  }

  section.pt-0 .tiny-slider .badge {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
  }

  section.pt-0 .tiny-slider .badge i {
    font-size: 0.75rem;
  }

  section.pt-0 .tiny-slider hr {
    margin: 0.625rem 0;
  }

  section.pt-0 .tiny-slider .d-flex.gap-3 {
    gap: 0.375rem !important;
  }
}

/* Prevent horizontal scroll on slider */
@media (max-width: 767px) {
  section.pt-0 .tiny-slider .tns-item {
    min-width: 0;
  }

  section.pt-0 .tiny-slider .tns-outer {
    position: relative;
    overflow: hidden;
  }
}

/* ============================================
   COMMENTS SECTION - Visual Organization
   Scoped to #course-pills-4
   ============================================ */

/* Comment Summary Box - Improved alignment and spacing */
#course-pills-4 .comment-summary-box {
  margin-bottom: 2rem;
}

/* Custom column widths for comment summary row 2 */
#course-pills-4 .comment-summary-box .row:last-child .comment-summary-col-1 {
  flex: 0 0 18%;
  max-width: 18%;
}

#course-pills-4 .comment-summary-box .row:last-child .comment-summary-col-2 {
  flex: 0 0 30%;
  max-width: 30%;
}

#course-pills-4 .comment-summary-box .row:last-child .comment-summary-col-3 {
  flex: 0 0 52%;
  max-width: 52%;
}

#course-pills-4 .comment-summary-box .row:first-child {
  margin-bottom: 1.5rem;
}

#course-pills-4 .comment-summary-box .row:first-child p {
  margin-bottom: 0;
  line-height: 1.7;
  color: #495057;
}

/* Summary cards - Visual balance and consistent heights */
#course-pills-4 .comment-summary-box .row:last-child .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#course-pills-4 .comment-summary-box .row:last-child .card-body {
  flex: 1;
  padding: 1.5rem;
}

#course-pills-4 .comment-summary-box .row:last-child .card-body .row {
  height: 100%;
}

/* Rating display - Better alignment */
#course-pills-4 .comment-summary-box .d-flex.align-items-center.justify-content-center {
  align-items: center;
  gap: 0.75rem;
}

#course-pills-4 .comment-summary-box h2 {
  margin-bottom: 0;
  line-height: 1;
  vertical-align: middle;
}

#course-pills-4 .comment-summary-box .text-success {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  line-height: 1;
}

#course-pills-4 .comment-summary-box .text-success i {
  font-size: 1.25rem;
  line-height: 1;
}

#course-pills-4 .comment-summary-box .mb-2 {
  margin-bottom: 0.5rem;
}

#course-pills-4 .comment-summary-box p.mb-0.text-muted.small {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

/* Total comments card - Consistent spacing */
#course-pills-4 .comment-summary-box h3 {
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

#course-pills-4 .comment-summary-box .comment-summary-col-2 .mt-3 {
  margin-top: 1rem;
  padding-top: 0.5rem;
}

#course-pills-4 .comment-summary-box .comment-summary-col-2 .mt-3 p {
  line-height: 1.6;
  font-size: 0.875rem;
}

/* Course select card - Better spacing */
#course-pills-4 .comment-summary-box .comment-summary-col-3 .card-body {
  padding: 1.5rem;
}

#course-pills-4 .comment-summary-box .form-label {
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
}

/* Comment submission form - Normalized spacing */
#course-pills-4 .card.shadow-sm.mb-4 {
  margin-bottom: 2rem;
}

#course-pills-4 #comment-form h4 {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

#course-pills-4 #comment-form .row.mb-3 {
  margin-bottom: 1.25rem;
}

#course-pills-4 #comment-form .form-label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
}

#course-pills-4 #comment-form .form-control,
#course-pills-4 #comment-form .form-select {
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

#course-pills-4 #comment-form .mb-3 {
  margin-bottom: 1.25rem;
}

#course-pills-4 #comment-form .star-rating {
  margin-top: 0.5rem;
}

/* Star rating - Better alignment and spacing */
#course-pills-4 .star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.375rem;
  margin-top: 0.5rem;
  align-items: center;
}

#course-pills-4 .star-label {
  cursor: pointer;
  color: #ddd;
  font-size: 1.75rem;
  transition: all 0.2s ease;
  margin: 0;
  padding: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#course-pills-4 .star-label:hover,
#course-pills-4 .star-label:hover ~ .star-label {
  color: #ffc107;
}

#course-pills-4 .star-rating-input:checked ~ .star-label,
#course-pills-4 .star-rating-input:checked ~ .star-label ~ .star-label {
  color: #28a745;
}

#course-pills-4 .star-label i {
  display: block;
  line-height: 1;
}

/* Sort section - Better alignment */
#course-pills-4 .d-flex.justify-content-between.align-items-center.mb-3 {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

#course-pills-4 .d-flex.justify-content-between.align-items-center.mb-3 h5 {
  margin-bottom: 0;
  font-size: 1.125rem;
  font-weight: 700;
}

#course-pills-4 .d-flex.justify-content-between.align-items-center.mb-3 .d-flex.align-items-center {
  gap: 0.5rem;
  align-items: center;
}

#course-pills-4 .d-flex.justify-content-between.align-items-center.mb-3 .form-label {
  margin-bottom: 0;
  font-size: 0.875rem;
}

#course-pills-4 .d-flex.justify-content-between.align-items-center.mb-3 .form-select-sm {
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  font-size: 0.875rem;
}

/* Comment cards - Visual balance and consistent spacing */
#course-pills-4 .comment-card {
  margin-bottom: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 0.5rem;
}

#course-pills-4 .comment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

#course-pills-4 .comment-card .card-body {
  padding: 1.5rem;
}

#course-pills-4 .comment-card .d-flex.align-items-start {
  gap: 1rem;
}

#course-pills-4 .comment-card .flex-shrink-0 img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Comment header - Better alignment */
#course-pills-4 .comment-card .d-flex.justify-content-between.align-items-start {
  margin-bottom: 0.75rem;
  align-items: flex-start;
  gap: 1rem;
}

#course-pills-4 .comment-card h6 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

#course-pills-4 .comment-card .d-flex.align-items-center.mb-2 {
  margin-bottom: 0.5rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#course-pills-4 .comment-card .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  font-weight: 500;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

#course-pills-4 .comment-card .text-muted.small {
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* Rating stars in comments - Better alignment */
#course-pills-4 .comment-card .text-success {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  line-height: 1;
  flex-shrink: 0;
}

#course-pills-4 .comment-card .text-success i {
  font-size: 1rem;
  line-height: 1;
}

/* Comment text - Consistent line height */
#course-pills-4 .comment-card p.mb-0.text-dark {
  line-height: 1.75;
  margin-bottom: 0;
  font-size: 0.9375rem;
  color: #212529;
}

/* Load more button - Better spacing */
#course-pills-4 .text-center.mt-4 {
  margin-top: 2rem;
  padding-top: 1rem;
}

#course-pills-4 #load-more-comments {
  padding: 0.625rem 1.5rem;
  font-weight: 500;
}

/* Responsive adjustments for comments section */
@media (max-width: 991px) {
  #course-pills-4 .comment-summary-box .row > div {
    margin-bottom: 1rem;
  }

  #course-pills-4 .comment-summary-box .comment-summary-col-1,
  #course-pills-4 .comment-summary-box .comment-summary-col-2,
  #course-pills-4 .comment-summary-box .comment-summary-col-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #course-pills-4 .comment-summary-box .comment-summary-col-2 .mt-3 {
    margin-top: 0.75rem;
  }

  #course-pills-4 .comment-summary-box .card-body {
    padding: 1.25rem;
  }

  #course-pills-4 .comment-card .card-body {
    padding: 1.25rem;
  }
}

@media (max-width: 767px) {
  #course-pills-4 .comment-summary-box {
    margin-bottom: 1.5rem;
  }

  #course-pills-4 .comment-summary-box .row:first-child {
    margin-bottom: 1rem;
  }

  #course-pills-4 .comment-summary-box h2 {
    font-size: 2.5rem;
  }

  #course-pills-4 .comment-summary-box .text-success i {
    font-size: 1.125rem;
  }

  #course-pills-4 .comment-summary-box h3 {
    font-size: 1.75rem;
  }

  #course-pills-4 .card.shadow-sm.mb-4 {
    margin-bottom: 1.5rem;
  }

  #course-pills-4 #comment-form .row.mb-3 {
    margin-bottom: 1rem;
  }

  #course-pills-4 .star-label {
    font-size: 1.5rem;
  }

  #course-pills-4 .star-rating {
    gap: 0.25rem;
  }

  #course-pills-4 .d-flex.justify-content-between.align-items-center.mb-3 {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  #course-pills-4 .comment-card .card-body {
    padding: 1rem;
  }

  #course-pills-4 .comment-card .d-flex.align-items-start {
    gap: 0.75rem;
  }

  #course-pills-4 .comment-card .flex-shrink-0 img {
    width: 45px;
    height: 45px;
  }

  #course-pills-4 .comment-card .d-flex.justify-content-between.align-items-start {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  #course-pills-4 .comment-card .text-success {
    order: -1;
  }
}

@media (max-width: 480px) {
  #course-pills-4 .comment-summary-box h2 {
    font-size: 2rem;
  }

  #course-pills-4 .comment-summary-box .text-success i {
    font-size: 1rem;
  }

  #course-pills-4 .comment-summary-box h3 {
    font-size: 1.5rem;
  }

  #course-pills-4 .comment-card .card-body {
    padding: 0.875rem;
  }

  #course-pills-4 .star-label {
    font-size: 1.375rem;
  }
}flex;
  align-items: center;
  gap: 0.25rem;
}

#course-pills-4 .comment-card .text-muted.small {
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* Rating stars in comments - Better alignment */
#course-pills-4 .comment-card .text-success {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  line-height: 1;
  flex-shrink: 0;
}

#course-pills-4 .comment-card .text-success i {
  font-size: 1rem;
  line-height: 1;
}

/* Comment text - Consistent line height */
#course-pills-4 .comment-card p.mb-0.text-dark {
  line-height: 1.75;
  margin-bottom: 0;
  font-size: 0.9375rem;
  color: #212529;
}

/* Load more button - Better spacing */
#course-pills-4 .text-center.mt-4 {
  margin-top: 2rem;
  padding-top: 1rem;
}

#course-pills-4 #load-more-comments {
  padding: 0.625rem 1.5rem;
  font-weight: 500;
}

/* Responsive adjustments for comments section */
@media (max-width: 991px) {
  #course-pills-4 .comment-summary-box .row > div {
    margin-bottom: 1rem;
  }

  #course-pills-4 .comment-summary-box .comment-summary-col-1,
  #course-pills-4 .comment-summary-box .comment-summary-col-2,
  #course-pills-4 .comment-summary-box .comment-summary-col-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #course-pills-4 .comment-summary-box .comment-summary-col-2 .mt-3 {
    margin-top: 0.75rem;
  }

  #course-pills-4 .comment-summary-box .card-body {
    padding: 1.25rem;
  }

  #course-pills-4 .comment-card .card-body {
    padding: 1.25rem;
  }
}

@media (max-width: 767px) {
  #course-pills-4 .comment-summary-box {
    margin-bottom: 1.5rem;
  }

  #course-pills-4 .comment-summary-box .row:first-child {
    margin-bottom: 1rem;
  }

  #course-pills-4 .comment-summary-box h2 {
    font-size: 2.5rem;
  }

  #course-pills-4 .comment-summary-box .text-success i {
    font-size: 1.125rem;
  }

  #course-pills-4 .comment-summary-box h3 {
    font-size: 1.75rem;
  }

  #course-pills-4 .card.shadow-sm.mb-4 {
    margin-bottom: 1.5rem;
  }

  #course-pills-4 #comment-form .row.mb-3 {
    margin-bottom: 1rem;
  }

  #course-pills-4 .star-label {
    font-size: 1.5rem;
  }

  #course-pills-4 .star-rating {
    gap: 0.25rem;
  }

  #course-pills-4 .d-flex.justify-content-between.align-items-center.mb-3 {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  #course-pills-4 .comment-card .card-body {
    padding: 1rem;
  }

  #course-pills-4 .comment-card .d-flex.align-items-start {
    gap: 0.75rem;
  }

  #course-pills-4 .comment-card .flex-shrink-0 img {
    width: 45px;
    height: 45px;
  }

  #course-pills-4 .comment-card .d-flex.justify-content-between.align-items-start {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  #course-pills-4 .comment-card .text-success {
    order: -1;
  }
}

@media (max-width: 480px) {
  #course-pills-4 .comment-summary-box h2 {
    font-size: 2rem;
  }

  #course-pills-4 .comment-summary-box .text-success i {
    font-size: 1rem;
  }

  #course-pills-4 .comment-summary-box h3 {
    font-size: 1.5rem;
  }

  #course-pills-4 .comment-card .card-body {
    padding: 0.875rem;
  }

  #course-pills-4 .star-label {
    font-size: 1.375rem;
  }
}

/* ========== Featured courses (compact / Proposition A) ========== */
.featured-courses {
  direction: rtl;
  padding: 0.75rem 0 0.5rem;
  background: linear-gradient(
    to bottom,
    rgb(193, 195, 231) 0%,
    rgba(193, 195, 231, 0.7) 35%,
    rgba(193, 195, 231, 0.3) 65%,
    rgba(193, 195, 231, 0) 100%
  );
}

.featured-courses__panel {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.featured-courses__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.featured-courses__title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: #1f2937;
  line-height: 1.75;
}

.featured-courses__star {
  flex-shrink: 0;
  font-size: 0.95rem;
  line-height: 1;
}

.featured-courses__view-all {
  background: none;
  border: none;
  padding: 0;
  color: #0d6efd;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.3;
}

.featured-courses__view-all:hover {
  text-decoration: none;
  color: #0a58ca;
}

.featured-courses__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.featured-courses.fc-cols-m2 .featured-courses__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .featured-courses__grid,
  .featured-courses.fc-cols-t2 .featured-courses__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .featured-courses.fc-cols-t3 .featured-courses__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .featured-courses__grid,
  .featured-courses.fc-cols-d3 .featured-courses__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .featured-courses.fc-cols-d2 .featured-courses__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.featured-courses.fc-title-align-center .featured-courses__header {
  justify-content: center;
  text-align: center;
}

.featured-courses.fc-title-align-end .featured-courses__header {
  flex-direction: row-reverse;
}

.featured-courses.fc-viewall-start .featured-courses__header {
  flex-direction: row-reverse;
}

.featured-courses.fc-viewall-below_title .featured-courses__view-all {
  display: inline-flex;
  margin: 0.5rem 0 1rem;
}

/* Type icon positions (RTL): start = visual left (Arena), end = visual right */
.featured-courses.fc-icon-start .fc-card__content {
  padding-left: 3.75rem;
  padding-right: 0;
}

.featured-courses.fc-icon-start .fc-card__visual {
  left: 0;
  right: auto;
}

.featured-courses.fc-icon-end .fc-card__content {
  padding-left: 0;
  padding-right: 3.75rem;
}

.featured-courses.fc-icon-end .fc-card__visual {
  left: auto;
  right: 0;
}

.featured-courses.fc-compare-bottom_end .fc-card__actions {
  justify-content: flex-end;
}

.featured-courses.fc-compare-bottom_center .fc-card__actions {
  justify-content: center;
}

.featured-courses.fc-compare-bottom_start .fc-card__actions {
  justify-content: flex-start;
}

/* Compare + icon on same bottom edge (Arena): keep actions clear of icon */
.featured-courses.fc-icon-start.fc-compare-bottom_end .fc-card__actions {
  justify-content: flex-end;
  padding-left: 0;
}

.featured-courses.fc-icon-start .fc-card__actions {
  position: relative;
  z-index: 1;
}

.mcs-share-align-start {
  justify-content: flex-start !important;
}

.mcs-share-align-center {
  justify-content: center !important;
}

.mcs-share-align-end {
  justify-content: flex-end !important;
}

@media (max-width: 991.98px) {
  .mcs-hero-image-mobile-bottom .row.py-2 {
    display: flex;
    flex-direction: column;
  }

  .mcs-hero-image-mobile-bottom .mcs-hero-image-col {
    order: 2;
  }

  .mcs-hero-image-mobile-top .row.py-2 {
    display: flex;
    flex-direction: column;
  }

  .mcs-hero-image-mobile-top .mcs-hero-image-col {
    order: -1;
  }
}

.fc-card {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: none;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fc-card:hover {
  transform: none;
  border-color: #cfd6e0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.fc-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  /* reserve bottom-left visual; meta/title can sit slightly over soft gradient */
  padding-left: 3.75rem;
  min-width: 0;
}

.fc-card__visual {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 0;
  width: 4.5rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border: none;
  box-shadow: none;
  /* mid blend: diagonal wash + soft radial fade so corners soften but color stays present */
  background:
    radial-gradient(
      120% 120% at 0% 100%,
      rgba(99, 102, 241, 0.22) 0%,
      rgba(129, 140, 248, 0.08) 40%,
      rgba(255, 255, 255, 0) 70%
    ),
    linear-gradient(
      to top right,
      rgba(99, 102, 241, 0.26) 0%,
      rgba(129, 140, 248, 0.12) 28%,
      rgba(199, 210, 254, 0.05) 52%,
      rgba(255, 255, 255, 0) 72%
    );
}

.fc-card__visual--video {
  background:
    radial-gradient(
      120% 120% at 0% 100%,
      rgba(91, 108, 255, 0.24) 0%,
      rgba(124, 140, 248, 0.08) 40%,
      rgba(255, 255, 255, 0) 70%
    ),
    linear-gradient(
      to top right,
      rgba(91, 108, 255, 0.28) 0%,
      rgba(124, 140, 248, 0.13) 28%,
      rgba(199, 210, 254, 0.05) 52%,
      rgba(255, 255, 255, 0) 72%
    );
}

.fc-card__visual--audio {
  background:
    radial-gradient(
      120% 120% at 0% 100%,
      rgba(139, 92, 246, 0.22) 0%,
      rgba(167, 139, 250, 0.08) 40%,
      rgba(255, 255, 255, 0) 70%
    ),
    linear-gradient(
      to top right,
      rgba(139, 92, 246, 0.26) 0%,
      rgba(167, 139, 250, 0.12) 28%,
      rgba(221, 214, 254, 0.05) 52%,
      rgba(255, 255, 255, 0) 72%
    );
}

.fc-card__visual--book,
.fc-card__visual--document {
  background:
    radial-gradient(
      120% 120% at 0% 100%,
      rgba(37, 99, 235, 0.22) 0%,
      rgba(56, 189, 248, 0.07) 40%,
      rgba(255, 255, 255, 0) 70%
    ),
    linear-gradient(
      to top right,
      rgba(37, 99, 235, 0.26) 0%,
      rgba(56, 189, 248, 0.11) 28%,
      rgba(186, 230, 253, 0.05) 52%,
      rgba(255, 255, 255, 0) 72%
    );
}

.fc-card__visual--webinar,
.fc-card__visual--online {
  background:
    radial-gradient(
      120% 120% at 0% 100%,
      rgba(14, 165, 233, 0.22) 0%,
      rgba(56, 189, 248, 0.07) 40%,
      rgba(255, 255, 255, 0) 70%
    ),
    linear-gradient(
      to top right,
      rgba(14, 165, 233, 0.26) 0%,
      rgba(56, 189, 248, 0.11) 28%,
      rgba(165, 243, 252, 0.05) 52%,
      rgba(255, 255, 255, 0) 72%
    );
}

.fc-card__visual--inperson {
  background:
    radial-gradient(
      120% 120% at 0% 100%,
      rgba(13, 148, 136, 0.22) 0%,
      rgba(45, 212, 191, 0.07) 40%,
      rgba(255, 255, 255, 0) 70%
    ),
    linear-gradient(
      to top right,
      rgba(13, 148, 136, 0.26) 0%,
      rgba(45, 212, 191, 0.11) 28%,
      rgba(153, 246, 228, 0.05) 52%,
      rgba(255, 255, 255, 0) 72%
    );
}

.fc-card__visual--private {
  background:
    radial-gradient(
      120% 120% at 0% 100%,
      rgba(99, 102, 241, 0.22) 0%,
      rgba(167, 139, 250, 0.08) 40%,
      rgba(255, 255, 255, 0) 70%
    ),
    linear-gradient(
      to top right,
      rgba(99, 102, 241, 0.26) 0%,
      rgba(167, 139, 250, 0.12) 28%,
      rgba(221, 214, 254, 0.05) 52%,
      rgba(255, 255, 255, 0) 72%
    );
}

.fc-card__visual svg {
  width: 3.3rem; /* 3.15rem + ~5% */
  height: 3.3rem;
  display: block;
  overflow: visible;
}

.fc-card__star {
  flex-shrink: 0;
  font-size: 0.8rem;
  line-height: 1;
}

.fc-card__title {
  display: flex;
  align-items: anchor-center;
  gap: 0.3rem;
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
  min-width: 0;
}

.fc-card__title-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: #111827;
  text-align: inherit;
  text-decoration: none;
  cursor: pointer;
  line-height: inherit;
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.fc-card__title-link:hover,
.fc-card__title-link:focus-visible {
  color: #0d6efd;
  text-decoration: none;
}

.fc-card__meta {
  margin: 0;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.3rem;
  min-width: 0;
}

.fc-card__meta-line {
  flex-shrink: 0;
  white-space: nowrap;
}

/* only long provider names truncate — duration/level stay fully visible */
.fc-card__meta-line:last-child {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fc-card__meta-sep {
  flex-shrink: 0;
  color: #d1d5db;
}

.fc-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
  padding-top: 0;
}

.fc-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 7px;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fc-card__btn--primary {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}

.fc-card__btn--primary:hover {
  background: #0b5ed7;
  color: #fff;
}

.fc-card__btn--compare {
  background: #fff;
  color: #0d6efd;
  border-color: #b6d4fe;
}

.fc-card__btn--compare:hover {
  background: #eef5ff;
  color: #0a58ca;
}

.fc-card__btn--compare.is-active {
  background: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
}

.fc-card__btn--compare.is-active:hover {
  background: #0b5ed7;
  color: #fff;
}

.fc-card__btn--disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

@media (max-width: 575.98px) {
  .featured-courses__title {
    font-size: 0.95rem;
  }

  .featured-courses__header {
    margin-bottom: 0.6rem;
  }

  .fc-card__content {
    padding-left: 3.25rem;
  }

  .fc-card__visual {
    width: 4.5rem;
    height: 4.5rem;
  }

  .fc-card__visual svg {
    width: 3rem;
    height: 3rem;
  }
}

/* ========== Overview tab: Smart TOC + Sidebar (mcs-*) ========== */
:root {
  --header-h: 96px;
  --mcs-toc-sticky-top: calc(var(--header-h) + 12px);
}

/* PHASE S: allow sticky inside tab card */
.mcs-tab-card,
.mcs-tab-card > .card-body,
.mcs-tab-card #course-pills-1 {
  overflow: visible;
}

/* Course tabs replace main navbar as sticky nav on single pages */
.mcs-tab-card {
  overflow: visible !important;
  /* Own stacking root so sticky header always paints above scrolling body */
  isolation: isolate;
}

.mcs-tab-card > .card-body {
  position: relative;
  z-index: 1;
}

.mcs-tabs-anchor {
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

.mcs-tabs-sticky {
  position: sticky;
  top: 0;
  z-index: 30;
  overflow: visible;
  background: #fff;
  /* Fixed padding — changing height on is-stuck caused sticky jitter */
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.mcs-tabs-sticky.is-stuck {
  box-shadow: 0 2px 0 rgba(15, 23, 42, 0.08);
}

.mcs-tabs-sticky__list {
  flex-wrap: wrap;
  overflow: visible;
  margin-bottom: 0;
}

.mcs-tabs-sticky__list .nav-item {
  flex: 0 0 auto;
}

.mcs-tabs-sticky__list .nav-link {
  margin-bottom: 0 !important;
  white-space: nowrap;
}

body.mcs-course-single-page {
  --header-h: 64px;
  --mcs-toc-sticky-top: calc(var(--header-h) + 12px);
}

#course-overview-article h2[id],
#course-overview-article h3[id],
#overview-article h2[id],
#overview-article h3[id] {
  scroll-margin-top: var(--mcs-toc-sticky-top);
}

.mcs-toc-sentinel {
  height: 1px;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.mcs-overview-aside {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-width: 0;
}

.mcs-sidebar-toc-wrap {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.mcs-sidebar-toc {
  position: sticky;
  top: var(--mcs-toc-sticky-top);
  z-index: 4;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  padding: 1rem 1rem 1.05rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.mcs-sidebar-toc__head {
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.mcs-sidebar-toc__brand {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.mcs-sidebar-toc__brand-icon {
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  font-size: 1.05rem;
}

.mcs-sidebar-toc__brand-text {
  min-width: 0;
  flex: 1;
}

.mcs-sidebar-toc__title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}

.mcs-sidebar-toc__subtitle {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #94a3b8;
}

.mcs-sidebar-toc__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.mcs-sidebar-toc__stat {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.55rem 0.55rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  min-width: 0;
}

.mcs-sidebar-toc__stat-icon {
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.78rem;
}

.mcs-sidebar-toc__stat-label {
  display: block;
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.3;
}

.mcs-sidebar-toc__stat-value {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  line-height: 1.35;
}

.mcs-sidebar-toc__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.mcs-sidebar-toc__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.mcs-sidebar-toc__badge i {
  font-size: 0.7rem;
}

.mcs-sidebar-toc__list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.mcs-sidebar-toc__item--l3 .mcs-sidebar-toc__link {
  padding-right: 0.85rem;
  font-size: 0.88rem;
}

.mcs-sidebar-toc.is-compact .mcs-sidebar-toc__item--l3 {
  display: none;
}

.mcs-sidebar-toc__link {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-align: right;
  padding: 0.55rem 0.55rem;
  border-radius: 0.7rem;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.45;
}

.mcs-sidebar-toc__link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.mcs-sidebar-toc__item.is-active .mcs-sidebar-toc__link {
  color: #1d4ed8;
  font-weight: 700;
  background: #eff6ff;
}

.mcs-sidebar-toc__label {
  flex: 1 1 auto;
  min-width: 0;
}

.mcs-sidebar-toc__chevron {
  flex: 0 0 auto;
  color: #cbd5e1;
  font-size: 0.85rem;
  line-height: 1;
}

.mcs-sidebar-toc__item.is-active .mcs-sidebar-toc__chevron {
  color: #2563eb;
}

.mcs-sidebar-toc__footer {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.mcs-sidebar-toc__compare-btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.mcs-sidebar-toc__compare-btn:hover {
  filter: brightness(1.05);
  color: #fff;
}

.mcs-sidebar-toc__trust {
  line-height: 1.6;
}

.mcs-mobile-toc {
  position: sticky;
  top: var(--header-h, 64px);
  z-index: 3;
  margin: 0 0 1rem;
  padding: 0.35rem 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.mcs-mobile-toc__scroller {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.15rem 0.25rem 0.35rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.mcs-mobile-toc__chip {
  flex: 0 0 auto;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.mcs-mobile-toc__chip.is-active {
  border-color: #0cbc87;
  color: #067a58;
  background: rgba(12, 188, 135, 0.12);
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Level survey (single question) */
.mcs-level-survey {
  background: linear-gradient(135deg, rgba(12, 188, 135, 0.12), rgba(37, 99, 235, 0.08));
  border: 1px solid rgba(12, 188, 135, 0.25);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}

.mcs-level-survey__title {
  font-weight: 700;
  color: #0b1220;
}

.mcs-level-survey__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (max-width: 575.98px) {
  .mcs-level-survey__options {
    grid-template-columns: 1fr;
  }
}

.mcs-level-survey__option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  text-align: right;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.65rem 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #334155;
}

.mcs-level-survey__option:hover {
  border-color: rgba(12, 188, 135, 0.45);
  background: rgba(12, 188, 135, 0.06);
}

.mcs-level-survey__option.is-selected {
  border-color: #0cbc87;
  background: rgba(12, 188, 135, 0.12);
  font-weight: 600;
}

.mcs-level-survey__option-emoji {
  flex: 0 0 auto;
  line-height: 1.4;
}

.mcs-level-survey--collapsed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  background: rgba(12, 188, 135, 0.08);
  border: 1px solid rgba(12, 188, 135, 0.2);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.mcs-level-survey__summary,
.mcs-level-survey__sep {
  line-height: inherit;
}

.mcs-level-survey__change {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #2563eb;
  font: inherit;
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
  vertical-align: baseline;
  text-decoration: none !important;
  box-shadow: none !important;
  cursor: pointer;
}

.mcs-level-survey__change:hover,
.mcs-level-survey__change:focus,
.mcs-level-survey__change:focus-visible,
.mcs-level-survey__change:active {
  color: #1d4ed8;
  text-decoration: none !important;
  box-shadow: none !important;
  outline: none;
}

.mcs-level-badge,
h2[data-mcs-recommended]::after,
h3[data-mcs-recommended]::after {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(12, 188, 135, 0.15);
  color: #067a58;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
}

h2[data-mcs-recommended]::after,
h3[data-mcs-recommended]::after {
  content: 'پیشنهاد برای سطح شما';
  margin-right: 0;
  margin-inline-start: 0.35rem;
}

.mcs-level-badge--toc {
  display: block;
  margin-top: 0.2rem;
  margin-right: 0;
  width: fit-content;
}

.mcs-mobile-toc__chip .mcs-level-badge--toc {
  display: inline-block;
  margin-top: 0;
  margin-right: 0.25rem;
  font-size: 0.65rem;
  padding: 0.05rem 0.35rem;
}

/* Quick info bar — 3 equal columns under course title */
.course-quick-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem 0.75rem;
  align-items: center;
  background: rgba(0, 0, 0, 0.03);
}

.course-quick-info__col {
  min-width: 0;
  text-align: center;
}

.course-quick-info__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  max-width: 100%;
  line-height: 1.4;
}

.course-quick-info__icon {
  flex-shrink: 0;
}

@media (max-width: 575.98px) {
  .course-quick-info {
    gap: 0.35rem 0.5rem;
    font-size: 0.75rem;
  }

  .course-quick-info__item {
    gap: 0.25rem;
  }
}

/* Readiness checklist — #prerequisites */
.mcs-readiness-checklist {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.7);
}

.mcs-readiness-checklist__title {
  font-weight: 600;
}

.mcs-readiness-checklist__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1rem;
  margin-bottom: 0;
}

.mcs-readiness-checklist__item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  min-height: 2rem;
}

.mcs-readiness-checklist__checkbox {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.mcs-readiness-checklist__label {
  cursor: pointer;
  line-height: 1.45;
  user-select: none;
}

.mcs-readiness-checklist__progress {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.mcs-readiness-checklist__progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0cbc87, #066a4e);
  transition: width 0.25s ease;
}

.mcs-readiness-checklist__reset {
  font-size: 0.8rem;
  text-decoration: none;
}

.mcs-readiness-checklist__reset:hover {
  text-decoration: underline;
}

.mcs-section-highlight {
  outline: 2px solid rgba(12, 188, 135, 0.35);
  outline-offset: 4px;
  border-radius: 0.35rem;
  transition: outline-color 0.3s ease;
}

@media (max-width: 767.98px) {
  .mcs-readiness-checklist__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mcs-readiness-checklist__progress-bar {
    transition: none;
  }

  .mcs-section-highlight {
    transition: none;
  }
}

/* Important Topics Roadmap — not Learning Path */
.mcs-topics-roadmap-section {
  margin-top: 0.5rem;
  position: relative;
  z-index: 0;
  /* Keep timeline/chips under sticky tabs + sidebar while scrolling */
  isolation: isolate;
}

#roadmap {
  scroll-margin-top: var(--mcs-toc-sticky-top);
}

.mcs-topics-roadmap__title {
  font-weight: 600;
}

.mcs-topics-roadmap__timeline {
  position: relative;
}

.mcs-topics-roadmap__step {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.mcs-topics-roadmap__step:last-child {
  margin-bottom: 0;
}

.mcs-topics-roadmap__rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mcs-topics-roadmap__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(12, 188, 135, 0.15);
  color: #067a58;
  flex-shrink: 0;
}

.mcs-topics-roadmap__step--intermediate .mcs-topics-roadmap__dot {
  background: rgba(13, 110, 253, 0.12);
  color: #0a58ca;
}

.mcs-topics-roadmap__step--advanced .mcs-topics-roadmap__dot {
  background: rgba(111, 66, 193, 0.12);
  color: #6f42c1;
}

.mcs-topics-roadmap__line {
  flex: 1;
  width: 2px;
  min-height: 1.5rem;
  margin-top: 0.35rem;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 1px;
}

.mcs-topics-roadmap__card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.75);
}

.mcs-topics-roadmap__step.is-current .mcs-topics-roadmap__card {
  border-color: rgba(12, 188, 135, 0.45);
  background: rgba(12, 188, 135, 0.04);
}

.mcs-topics-roadmap__step--intermediate.is-current .mcs-topics-roadmap__card {
  border-color: rgba(13, 110, 253, 0.35);
  background: rgba(13, 110, 253, 0.03);
}

.mcs-topics-roadmap__step--advanced.is-current .mcs-topics-roadmap__card {
  border-color: rgba(111, 66, 193, 0.35);
  background: rgba(111, 66, 193, 0.03);
}

.mcs-topics-roadmap__marker {
  color: #067a58;
  font-weight: 600;
}

.mcs-topics-roadmap__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
}

.mcs-topics-roadmap__chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  font-size: 0.82rem;
  line-height: 1.45;
}

.mcs-topics-roadmap__cta {
  min-height: 2.25rem;
}

@media (max-width: 575.98px) {
  .mcs-topics-roadmap__step {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.5rem 0.75rem;
  }

  .mcs-topics-roadmap__cta {
    width: 100%;
  }
}

/* Editorial callouts */
.mcs-editorial-callout-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.25rem 0;
}

.mcs-editorial-callout {
  margin: 0;
}

.mcs-editorial-callout__inner {
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  border-inline-start: 4px solid transparent;
  background: rgba(0, 0, 0, 0.03);
}

.mcs-editorial-callout__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.mcs-editorial-callout__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.mcs-editorial-callout__title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

.mcs-editorial-callout__body {
  font-size: 0.9rem;
  line-height: 1.65;
  color: inherit;
}

.mcs-editorial-callout__action {
  margin-top: 0.55rem;
}

.mcs-editorial-callout__cta {
  min-height: 2rem;
  text-decoration: none;
}

.mcs-editorial-callout--note .mcs-editorial-callout__inner {
  border-inline-start-color: rgba(13, 110, 253, 0.75);
  background: rgba(13, 110, 253, 0.06);
}

.mcs-editorial-callout--note .mcs-editorial-callout__icon {
  color: #0d6efd;
}

.mcs-editorial-callout--warning .mcs-editorial-callout__inner {
  border-inline-start-color: rgba(255, 193, 7, 0.9);
  background: rgba(255, 193, 7, 0.1);
}

.mcs-editorial-callout--warning .mcs-editorial-callout__icon {
  color: #cc9a06;
}

.mcs-editorial-callout--editorial_recommendation .mcs-editorial-callout__inner {
  border-inline-start-color: rgba(25, 135, 84, 0.75);
  background: rgba(25, 135, 84, 0.07);
}

.mcs-editorial-callout--editorial_recommendation .mcs-editorial-callout__icon {
  color: #198754;
}

/* Course list context notice (not editorial callout) */
.mcs-context-notice {
  margin: 1rem 0 0;
}

.mcs-context-notice__inner {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.45rem;
  border-inline-start: 4px solid rgba(108, 117, 125, 0.55);
  background: rgba(108, 117, 125, 0.08);
}

.mcs-context-notice__icon {
  color: #6c757d;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.mcs-context-notice__body {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #495057;
}

@media (max-width: 575.98px) {
  .mcs-editorial-callout__inner,
  .mcs-context-notice__inner {
    padding-inline: 0.75rem;
  }
}

/* Reading progress — overview tab only; above sticky header (1020) */
.reading-progress {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 3px;
  z-index: 1030;
  pointer-events: none;
}

.reading-progress__fill {
  height: 100%;
  width: calc(var(--reading-progress, 0) * 100%);
  background-color: #0cbc87;
  transition: width 0.1s linear;
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress__fill {
    transition: none;
  }
}

/* Learning Path intro card (overview tab) */
.mcs-learning-path-card__heading {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: #0b1220;
}

.mcs-learning-path-card__icon {
  font-size: 1.1rem;
  line-height: 1;
}

.mcs-learning-path-card__body {
  border: 1px solid rgba(12, 188, 135, 0.22);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, rgba(12, 188, 135, 0.06), rgba(37, 99, 235, 0.04));
}

.mcs-learning-path-card__title {
  font-weight: 700;
  color: #0f172a;
}

.mcs-learning-path-card__steps {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.mcs-learning-path-card__step-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.mcs-learning-path-card__step {
  display: inline-block;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.1);
  font-size: 0.84rem;
  color: #334155;
  white-space: nowrap;
}

.mcs-learning-path-card__sep::before {
  content: '→';
  color: #64748b;
  font-size: 0.82rem;
}

.mcs-learning-path-card__cta-wrap {
  margin-top: 0.25rem;
}

.mcs-learning-path-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.mcs-learning-path-card__cta-arrow {
  font-size: 0.95rem;
  line-height: 1;
}

@media (min-width: 768px) {
  .mcs-learning-path-card__steps {
    flex-direction: column;
    align-items: flex-start;
    overflow-x: visible;
    flex-wrap: nowrap;
    gap: 0.2rem;
  }

  .mcs-learning-path-card__step-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .mcs-learning-path-card__sep::before {
    content: '↓';
    display: block;
    padding-inline-start: 0.55rem;
  }
}

/* Course list decision toolbar */
.mcs-course-list-toolbar {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 0.75rem;
  background: #f8fafc;
}

.mcs-course-list-toolbar__summary {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  flex: 0 0 auto;
}

.mcs-course-list-toolbar__summary-icon {
  color: #6366f1;
  font-size: 0.9rem;
}

.mcs-course-list-toolbar__filtered-hint {
  font-size: 0.78rem;
  font-weight: 500;
}

.mcs-course-list-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.mcs-course-list-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1 1 auto;
  justify-content: center;
}

.mcs-course-list-toolbar__chip {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.mcs-course-list-toolbar__chip:hover {
  border-color: rgba(99, 102, 241, 0.45);
  color: #4338ca;
}

.mcs-course-list-toolbar__chip.is-active {
  border-color: #6366f1;
  color: #4338ca;
  background: rgba(99, 102, 241, 0.1);
  font-weight: 600;
}

.mcs-course-list-toolbar__sort {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.mcs-course-list-toolbar__sort-label {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
  white-space: nowrap;
}

.mcs-course-list-toolbar__sort-select {
  min-width: 12rem;
  max-width: 100%;
  direction: rtl;
  unicode-bidi: normal;
  text-align: right;
}

.mcs-course-list-toolbar__sort-select option {
  direction: rtl;
  unicode-bidi: normal;
  text-align: right;
}

@media (max-width: 575.98px) {
  .mcs-course-list-toolbar__row {
    flex-direction: column;
    align-items: stretch;
  }

  .mcs-course-list-toolbar__sort {
    width: 100%;
  }

  .mcs-course-list-toolbar__sort-select {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* Hero: vertically center cover image column (desktop two-column layout only) */
@media (min-width: 992px) {
  section.bg-light.py-0 > .container > .row > .col-lg-4 {
    align-self: center;
  }
}

/* Hero Social/Share Actions — scoped overrides only (do not touch global li / .btn-sm) */
.mcs-hero-social-actions,
.mcs-hero-social-actions li {
  line-height: 1.1;
}

.mcs-hero-social-actions .share-buttons .btn-sm {
  --bs-btn-padding-x: 0.5rem;
}
