/* ===================================
   SHARED CARD SYSTEM — "Spotlight"
   Single source of truth for the job + talent marketplace cards.
   Loaded by every page that renders these cards (hub index, jobs, talent,
   company, job-posting) so the renderers in render-card.js never drift from
   their styling again. Page-chrome (containers: .jobs-list, .talent-grid,
   .strip-scroll) stays in the per-page stylesheets.
   =================================== */

/* ===================================
   JOB CARD — logo-left · title hero · ≤3 tinted chips · bold salary ·
   single Apply · whole-card tappable via overlay link. No banner.
   =================================== */
.job-card {
  position: relative;
  background: #fff;
  border: 1px solid #eceef1;
  border-radius: 16px;
  padding: 1rem;
  /* 2-layer cool-tinted shadow — never one flat blur. */
  box-shadow: 0 1px 2px hsl(220 25% 10% / 0.04), 0 2px 6px hsl(220 25% 10% / 0.05);
  /* Transition only what moves — never `all`. */
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  animation: fadeInUp 0.5s ease backwards;
}

.job-card:nth-child(1) { animation-delay: 0.05s; }
.job-card:nth-child(2) { animation-delay: 0.1s; }
.job-card:nth-child(3) { animation-delay: 0.15s; }

.job-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px hsl(220 25% 10% / 0.05), 0 8px 20px hsl(220 25% 10% / 0.08);
}

.job-card:active {
  transform: scale(0.99);
}

/* Whole-card overlay link — sits behind the interactive controls. */
.job-card-link {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
}

/* Interactive controls float above the overlay link. */
.save-job-btn,
.quick-apply-btn {
  position: relative;
  z-index: 1;
}

/* Save heart — pinned top-right. */
.save-job-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: #fff;
  border: 1px solid #eceef1;
  color: #8a929e;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.save-job-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.save-job-btn.saved {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* Head — logo + headings */
.job-card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  /* leave room for the pinned heart */
  padding-right: 2.5rem;
}

.job-logo {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  background: #f7f8fa;
  display: flex;
  align-items: center;
  justify-content: center;
  /* inset hairline ring — premium tell */
  box-shadow: inset 0 0 0 1px hsl(220 25% 10% / 0.06);
}

.job-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.job-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1;
}

.job-card__headings {
  min-width: 0;
  flex: 1;
}

.job-title {
  font-size: 1.0625rem;
  font-weight: 680;
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: #0f1115;
  margin: 0 0 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-company {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0;
  min-width: 0;
}

/* Scoped to .job-company — a bare `.company-name` also exists for Top
   Companies and would otherwise win by source order. */
.job-company .company-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #5b6471;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-verified {
  flex: 0 0 auto;
  color: var(--primary-color);
  font-size: 0.8125rem;
}

/* Chips — ≤3 tinted 8px squircles (shared by job + talent cards) */
.job-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.875rem;
}

.job-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #f1f3f5;
  color: #5b6471;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.job-chip i {
  font-size: 0.6875rem;
  opacity: 0.85;
}

.job-chip--remote {
  background: #e7f0fe;
  color: #1e4fa3;
}

.job-chip--new,
.job-chip--available {
  background: #e3f5e9;
  color: #1a7a3d;
}

/* Foot — salary (+posted) left, single Apply right */
.job-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid #f1f3f5;
}

.job-pay {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.job-salary {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f1115;
  font-variant-numeric: tabular-nums;
}

.job-posted {
  font-size: 0.75rem;
  color: #8a929e;
}

.quick-apply-btn {
  flex: 0 0 auto;
  padding: 0.5rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--primary-color);
  color: #fff;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.quick-apply-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* ===================================
   TALENT CARD — mirrors the job card. Avatar-left (circle, people not
   companies) · name hero · tinted chips · 1-line summary · ≤3 skills ·
   single Contact · whole-card tappable.
   =================================== */
.talent-card {
  position: relative;
  background: #fff;
  border: 1px solid #eceef1;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 1px 2px hsl(220 25% 10% / 0.04), 0 2px 6px hsl(220 25% 10% / 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  animation: fadeInUp 0.5s ease backwards;
  display: flex;
  flex-direction: column;
}

.talent-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px hsl(220 25% 10% / 0.05), 0 8px 20px hsl(220 25% 10% / 0.08);
}

.talent-card:active {
  transform: scale(0.99);
}

/* Whole-card overlay link → talent-profile; Contact floats above it. */
.talent-card-link {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
}

.contact-talent-btn {
  position: relative;
  z-index: 1;
}

.talent-card__head {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.talent-avatar {
  position: relative;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
}

.talent-avatar img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px hsl(220 25% 10% / 0.06);
}

.talent-avatar-fallback {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  font-weight: 650;
  line-height: 1;
  box-shadow: inset 0 0 0 1px hsl(220 25% 10% / 0.06);
}

/* Availability dot — also reused by talent-profile.html (kept in talent.css). */
.availability-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 14px;
  height: 14px;
  background-color: #c4c9d1;
  border-radius: 50%;
  border: 2.5px solid #fff;
}

.availability-dot.available {
  background-color: #10b981;
}

.talent-card__headings {
  min-width: 0;
  flex: 1;
}

.talent-name {
  font-size: 1.0625rem;
  font-weight: 680;
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: #0f1115;
  margin: 0 0 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.talent-headline {
  font-size: 0.875rem;
  font-weight: 500;
  color: #5b6471;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.talent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.875rem;
}

.talent-summary {
  margin: 0.875rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #5b6471;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.talent-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.875rem;
}

.talent-card__foot {
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid #f1f3f5;
}

.contact-talent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.5rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--primary-color);
  color: #fff;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.contact-talent-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* Skill chips on the talent card. Scoped to .talent-card so it beats the bare
   `.skill-tag` in services.css (loaded after cards.css on the hub) regardless
   of source order — only the talent card renders skill chips now. */
.talent-card .skill-tag {
  background: #f3f4f6;
  color: #4b5563;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}
