/* Search results — aligned with jobs/list page rhythm */
body.search-page {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f8fafc;
  color: #0f172a;
}

.search-page .main-container {
  margin-top: 16px;
  margin-bottom: 32px;
}

/* ===== Top bar ===== */
.search-page .top-bar {
  margin-bottom: 14px;
}

.search-page .home-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  background: #fff;
  color: #1e40af;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.search-page .home-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  transform: none;
  box-shadow: none;
}

/* ===== Page header ===== */
.search-page #searchTitle {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #1e3a8a;
}

.search-page #resultCount {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.4;
  color: #64748b;
}

.search-page #results > p {
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: #fff;
  color: #64748b;
  font-size: 14px;
  text-align: center;
}

/* ===== Results list ===== */
.search-page #results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-page .search-results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-page .result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.search-page .result-card:hover {
  border-color: var(--hover-border);
  box-shadow: var(--hover-shadow);
  transform: none;
}

.search-page .result-card__main {
  flex: 1 1 auto;
  min-width: 0;
}

.search-page .result-card h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.search-page .result-card h2 a {
  color: #1e293b;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.search-page .result-card h2 a:hover {
  color: #1d4ed8;
  text-decoration: none;
}

.search-page .result-card p:empty {
  display: none;
}

.search-page .result-card p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}

/* ===== Status badges ===== */
.search-page .badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
}

.search-page .badge-green {
  background: #dcfce7;
  color: #166534;
}

.search-page .badge-blue {
  background: #dbeafe;
  color: #1e40af;
}

.search-page .badge-orange {
  background: #ffedd5;
  color: #c2410c;
}

.search-page .badge-purple {
  background: #ede9fe;
  color: #6d28d9;
}

.search-page .badge-teal {
  background: #ccfbf1;
  color: #0f766e;
}

.search-page .badge-default {
  background: #f1f5f9;
  color: #475569;
}

/* ===== Query highlight ===== */
.search-page .highlight {
  background: #fef08a;
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 700;
}

/* ===== Loader ===== */
.search-page .loader {
  border: 4px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: search-spin 0.8s linear infinite;
  margin: 20px auto;
}

.search-page .loader.is-hidden {
  display: none;
}

@keyframes search-spin {
  100% {
    transform: rotate(360deg);
  }
}

/* ===== Pagination ===== */
.search-page .pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 4px;
}

.search-page .page-btn {
  min-width: 40px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.search-page .page-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.search-page .page-btn.active {
  background: linear-gradient(135deg, #4f79d6, #2bb6b0);
  border-color: transparent;
  color: #fff;
}

/* ===== Fallback lists ===== */
.search-page .job-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #334155;
}

.search-page .job-list li + li {
  margin-top: 8px;
}

.search-page .job-list a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.search-page .job-list a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .search-page .main-container {
    margin-top: 12px;
    margin-bottom: 24px;
  }

  .search-page #searchTitle {
    font-size: 20px;
  }

  .search-page #resultCount {
    margin-bottom: 12px;
    font-size: 13px;
  }

  .search-page .result-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
  }

  .search-page .result-card h2 {
    font-size: 14px;
    line-height: 1.3;
  }

  .search-page .badge {
    align-self: flex-start;
    font-size: 9px;
    min-height: 22px;
    padding: 3px 8px;
  }

  .search-page .home-btn {
    font-size: 12px;
    padding: 7px 12px;
  }
}
