/* ─── SEMC Course Finder – Frontend CSS ──────────────── */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@700,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');

/* Wrapper */
.semc-course-finder-wrap {
  font-family: 'Lato', sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 20px;
}

/* Title */
.semc-finder-title {
  font-family: 'Satoshi', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  text-align: center;
  color: #1a1a1a;
  margin: 0 0 32px;
  letter-spacing: -0.5px;
}

.semc-finder-title span {
  color: #810081;
}

/* Filters */
.semc-filters-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.semc-filter-group {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.semc-filter-group::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #810081;
  pointer-events: none;
  font-size: 18px;
}

.semc-filter-select {
  width: 100%;
  padding: 11px 36px 11px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  color: #444;
  background: #fff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border .2s, box-shadow .2s;
}

.semc-filter-select:focus {
  outline: none;
  border-color: #810081;
  box-shadow: 0 0 0 3px rgba(129, 0, 129, .1);
}

.semc-filter-select:hover {
  border-color: #810081;
}

/* Results bar */
.semc-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 2px;
}

.semc-results-info {
  font-size: 13px;
  color: #888;
}

.semc-clear-btn {
  background: none;
  border: 1px solid #ddd;
  color: #810081;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}

.semc-clear-btn:hover {
  background: #810081;
  color: #fff;
  border-color: #810081;
}

/* Grid */
.semc-courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid #e8e8e8;
  border-radius: 2px;
  overflow: hidden;
  min-height: 200px;
  transition: opacity .3s;
}

.semc-courses-grid.semc-loading {
  opacity: .5;
  pointer-events: none;
}

/* Card */
.semc-course-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid #e8e8e8;
  background: #fff;
  transition: background .2s, box-shadow .15s;
  position: relative;
}

.semc-course-card:hover {
  background: #fdf5fd;
  box-shadow: inset 0 0 0 2px #810081;
}

.semc-card-logo-wrap {
  flex-shrink: 0;
  width: 90px;
  text-align: center;
}

.semc-course-logo {
  width: 90px;
  height: 72px;
  object-fit: contain;
}

.semc-logo-placeholder {
  width: 90px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f3e8f3, #e0c0e0);
  border-radius: 8px;
  font-family: 'Satoshi', sans-serif;
  font-size: 18px;
  font-weight: 900;
  color: #810081;
}

.semc-card-body {
  flex: 1;
  min-width: 0;
}

.semc-university-name {
  font-size: 12px;
  color: #810081;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.3;
  cursor: pointer;
}

.semc-university-name:hover {
  text-decoration: underline;
}

.semc-course-name {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
  line-height: 1.35;
}

.semc-learn-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #810081;
  font-weight: 700;
  text-decoration: none;
  transition: gap .2s;
}

.semc-learn-more:hover {
  gap: 8px;
  color: #5a005a;
}

.semc-learn-more span {
  transition: transform .2s;
  display: inline-block;
}

.semc-learn-more:hover span {
  transform: translateX(3px);
}

/* No results */
.semc-no-results {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.semc-no-results-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.semc-no-results p {
  margin: 4px 0;
  font-size: 15px;
}

.semc-no-results-sub {
  font-size: 13px;
  color: #aaa;
}

/* Pagination */
.semc-pagination-wrap {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.semc-pagination {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.semc-page-btn {
  padding: 8px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #555;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  font-family: 'Lato', sans-serif;
}

.semc-page-btn:hover {
  border-color: #810081;
  color: #810081;
  background: #fdf5fd;
}

.semc-page-btn.semc-page-active {
  background: #810081;
  color: #fff;
  border-color: #810081;
}

/* Loading spinner overlay */
.semc-courses-grid.semc-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .6);
  border-radius: 2px;
}

/* Responsive */
@media(max-width:900px) {
  .semc-courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .semc-finder-title {
    font-size: 1.5rem;
  }
}

@media(max-width:560px) {
  .semc-courses-grid {
    grid-template-columns: 1fr;
  }

  .semc-filters-bar {
    flex-direction: column;
  }

  .semc-filter-group {
    min-width: 100%;
  }

  .semc-finder-title {
    font-size: 1.25rem;
  }
}