.jobs-hero {
  position: relative;
  height: 360px;
  overflow: hidden;
}

.jobs-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jobs-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #fff 0%, rgba(255, 255, 255, .9) 28%, rgba(255, 255, 255, .28) 68%, transparent 100%);
}

.jobs-hero-content {
  position: absolute;
  right: 0;
  bottom: 45px;
  left: 0;
}

.section-label,
.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.jobs-hero h1 {
  max-width: 680px;
  margin-bottom: 10px;
  color: var(--foreground);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.05em;
}

.jobs-hero h1 span {
  color: var(--primary);
}

.jobs-hero p {
  max-width: 580px;
  color: var(--muted-text);
  font-size: 17px;
}

.jobs-content {
  padding-top: 38px;
  padding-bottom: 70px;
}

.featured-section {
  margin-bottom: 44px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2,
.search-section h2 {
  color: var(--foreground);
  font-size: 22px;
  letter-spacing: -.03em;
}

.carousel-controls {
  display: flex;
  gap: 6px;
}

.carousel-controls button,
.pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--card);
  color: var(--muted-text);
  cursor: pointer;
}

.carousel-controls button:hover,
.pagination button:hover,
.pagination button.is-current {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.featured-grid,
.job-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.job-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.job-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, .35);
  box-shadow: var(--shadow-glow);
}

.job-card-top,
.job-footer,
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.job-type {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, .09);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 700;
}

.like-btn {
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.like-btn.is-liked {
  color: #e11d48;
}

.job-company {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  margin: 15px 0 8px;
}

.job-company img {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 10px;
  object-fit: cover;
}

.job-company h3 {
  color: var(--foreground);
  font-size: 15px;
  line-height: 1.25;
}

.job-company p,
.job-location,
.job-description,
.results-toolbar,
.job-footer {
  color: var(--muted-text);
  font-size: 12px;
}

.job-company p {
  margin-top: 5px;
}

.job-location {
  margin-bottom: 10px;
  color: #475569;
}

.job-description {
  min-height: 54px;
  line-height: 1.55;
}

.job-description.is-expanded {
  display: block;
  overflow: visible;
  min-height: 0;
}

.description-toggle {
  align-self: flex-start;
  margin-top: 7px;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.job-footer {
  align-items: end;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.job-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.job-card-tools {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.job-card-tools button {
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--muted-text);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}

.job-card-tools button:hover {
  color: var(--primary);
}

.job-footer a {
  color: var(--primary);
  font-weight: 700;
}

.search-section {
  margin: 10px 0 28px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--muted);
}

.search-section h2 {
  margin-bottom: 16px;
}

.search-input {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input > span {
  position: absolute;
  left: 14px;
  color: var(--muted-text);
  font-size: 22px;
}

.search-input input {
  width: 100%;
  min-height: 46px;
  padding: 0 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  outline: none;
}

.search-input input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.search-input button {
  position: absolute;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--muted-text);
  cursor: pointer;
  font-size: 22px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.filter-btn {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--card);
  color: var(--muted-text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.filter-btn b {
  margin-left: 4px;
  opacity: .65;
  font-size: 11px;
}

.filter-btn.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.results-toolbar {
  margin-bottom: 16px;
}

.results-toolbar strong {
  color: var(--foreground);
}

.results-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.results-toolbar select {
  padding: 7px 24px 7px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--foreground);
}

.empty-state {
  padding: 55px 20px;
  text-align: center;
}

.empty-state > div {
  color: var(--primary);
  font-size: 38px;
}

.empty-state h2 {
  margin: 8px 0;
  font-size: 20px;
}

.empty-state p {
  margin-bottom: 18px;
  color: var(--muted-text);
}

.empty-state button {
  padding: 10px 15px;
  border: 0;
  border-radius: 9px;
  background: var(--primary);
  color: white;
  cursor: pointer;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 30px;
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: .4;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  color: var(--muted-text);
}

.featured-grid {
  align-items: stretch;
}

.featured-card {
  overflow: hidden;
  padding: 0;
}

.featured-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 112px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(99, 102, 241, .12), var(--muted));
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-badge,
.new-label {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.featured-badge {
  position: absolute;
  top: 10px;
  left: 10px;
}

.featured-card > h3,
.featured-card > p,
.featured-card > .job-apply {
  margin-right: 16px;
  margin-left: 16px;
}

.featured-card > h3 {
  margin-top: 16px;
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.4;
}

.featured-company,
.featured-location {
  margin-top: 5px;
  color: var(--muted-text);
  font-size: 11px;
}

.featured-card .job-description {
  flex: 1;
  margin-top: 12px;
  margin-bottom: 15px;
}

.featured-card > .job-apply {
  margin-bottom: 16px;
}

.job-card {
  position: relative;
  min-height: 260px;
}

.job-card-top {
  align-items: flex-start;
}

.job-card-top h3 {
  flex: 1;
  color: var(--foreground);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
}

.job-card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.like-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.like-btn:hover {
  background: var(--muted);
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0;
}

.job-meta span,
.job-date {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--muted);
  color: var(--muted-text);
  font-size: 11px;
  line-height: 1.35;
}

.job-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  min-height: 60px;
  color: var(--muted-text);
  font-size: 13px;
  line-height: 1.55;
}

.job-footer {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.job-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.job-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.job-apply:hover {
  background: var(--primary-dark);
}

.job-apply.is-disabled {
  background: var(--muted);
  color: var(--muted-text) !important;
}

.is-expired {
  opacity: .62;
}

.expired-label {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  padding: 7px 13px;
  transform: translate(-50%, -50%) rotate(-3deg);
  border-radius: 7px;
  background: #dc2626;
  color: white;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.is-expired .job-apply,
.is-expired .like-btn {
  pointer-events: none;
}

.sync-status {
  margin-top: 4px;
  color: var(--muted-text);
  font-size: 11px;
}

.jobs-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 160px;
  color: var(--muted-text);
  font-size: 14px;
}

.jobs-status:not(.is-error)::before {
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary);
  border-right-color: transparent;
  border-radius: 50%;
  animation: jobs-spin .8s linear infinite;
  content: "";
}

.jobs-status.is-error {
  flex-direction: column;
  text-align: center;
}

.jobs-status button {
  padding: 9px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  cursor: pointer;
}

@keyframes jobs-spin {
  to { transform: rotate(360deg); }
}

[hidden] {
  display: none !important;
}

@media (max-width: 850px) {
  .featured-grid,
  .job-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .jobs-hero {
    height: 320px;
  }

  .jobs-hero-content {
    bottom: 30px;
  }

  .jobs-hero p {
    font-size: 15px;
  }

  .featured-grid,
  .job-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .results-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-section {
    padding: 18px;
  }

  .job-card {
    min-height: 0;
  }

  .job-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .job-apply {
    width: 100%;
  }
}
