/**
 * Featured Jobs section — homepage mockup layout.
 * Scoped to .featured-jobs-section to avoid affecting other pages.
 */

/* ─── Section shell ─── */
.apm-home .apm-home-jobs.featured-jobs-section,
.apm-home.apm-home--premium .apm-home-jobs.featured-jobs-section {
  position: relative;
  padding-block: clamp(56px, 6vw, 76px);
  background:
    radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.06), transparent 35%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-top: none;
}

.featured-jobs-section::before {
  display: none;
}

.featured-jobs-section__container {
  max-width: 1240px;
}

/* ─── Header ─── */
.featured-jobs-section .apm-section__header--split {
  align-items: flex-end;
  margin-bottom: 20px;
}

.featured-jobs-section .apm-section__header--split .apm-section__eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1d4ed8;
}

.featured-jobs-section .apm-section__header--split .apm-section__eyebrow::after {
  content: '';
  display: block;
  width: 34px;
  height: 3px;
  margin-top: 8px;
  border-radius: 999px;
  background: #22c55e;
}

.featured-jobs-section .apm-section__header--split .apm-section__title {
  margin: 0 0 8px;
  font-size: clamp(1.875rem, 3.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #0f172a;
}

.featured-jobs-section .apm-section__header--split .apm-section__subtitle {
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.5;
  color: #64748b;
}

.featured-jobs-section .apm-section__header--split .apm-section__link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.featured-jobs-section .apm-section__header--split .apm-section__link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* ─── Toolbar (tabs) ─── */
.featured-jobs-section__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.featured-jobs-section__tabs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  background: transparent;
}

.featured-jobs-section__tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #dbe5f2;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.featured-jobs-section__tabs button svg {
  flex-shrink: 0;
}

.featured-jobs-section__tabs button:not(.is-active) svg {
  color: #2563eb;
}

.featured-jobs-section__tabs button:hover:not(.is-active) {
  border-color: #bfdbfe;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.featured-jobs-section__tabs button.is-active {
  border-color: #1d4ed8;
  background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

.featured-jobs-section__tabs button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ─── Job grid — compact 3 columns ─── */
.featured-jobs-section__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.featured-jobs-section__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  text-align: center;
  color: #64748b;
  background: #fff;
  border: 1px dashed #dbe5f2;
  border-radius: 12px;
}

/* ─── Compact job card ─── */
.featured-job-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 96px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.featured-job-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
}

.featured-job-card:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.featured-job-card__logo {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f1f5f9;
  color: #1d4ed8;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
}

.featured-job-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 36px;
}

.featured-job-card__title {
  display: block;
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-job-card:hover .featured-job-card__title {
  color: #1d4ed8;
}

.featured-job-card__company {
  display: block;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-job-card__salary {
  display: block;
  margin-top: 2px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.35;
  color: #ea580c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-job-card__location {
  display: block;
  margin-top: 2px;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-job-card__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.featured-job-card__badge--new {
  background: #dcfce7;
  color: #15803d;
}

.featured-job-card__badge--hot {
  background: #fee2e2;
  color: #dc2626;
}

.featured-job-card__badge--urgent {
  background: #fef3c7;
  color: #d97706;
}

/* ─── Bottom CTA ─── */
.featured-jobs-section__cta {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 16px;
  background: linear-gradient(90deg, #eef7ff 0%, #f0fdf8 100%);
  border: 1px solid #dbeafe;
}

.featured-jobs-section__cta-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.24);
}

.featured-jobs-section__cta-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.featured-jobs-section__cta-text strong {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
}

.featured-jobs-section__cta-text span {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #64748b;
}

.featured-jobs-section__cta-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  color: #1d4ed8;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.featured-jobs-section__cta-btn:hover {
  color: #1d4ed8;
  background: #f8fbff;
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.featured-jobs-section__cta-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .featured-jobs-section__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .apm-home .apm-home-jobs.featured-jobs-section,
  .apm-home.apm-home--premium .apm-home-jobs.featured-jobs-section {
    padding-block: 48px;
  }

  .featured-jobs-section .apm-section__header--split {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .featured-jobs-section__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .featured-jobs-section__tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .featured-jobs-section__tabs::-webkit-scrollbar {
    display: none;
  }

  .featured-jobs-section__tabs button {
    flex: 1 0 auto;
  }

  .featured-jobs-section__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .featured-jobs-section__cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .featured-jobs-section__cta-btn {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .featured-jobs-section__container {
    padding-inline: 16px;
  }

  .featured-jobs-section .apm-section__header--split .apm-section__title {
    font-size: 1.875rem;
  }
}
