.royal-jobs-page {
  padding: 56px 0 72px;
  background: #f8fafc;
  color: #1f2937;
}

.royal-jobs-tools {
  margin-bottom: 28px;
}

.royal-jobs-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  max-width: 720px;
}

.royal-jobs-search-field {
  min-width: 0;
}

.royal-jobs-search-field label {
  display: block;
  margin-bottom: 8px;
  color: #374151;
  font-weight: 600;
}

.royal-jobs-search-field input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font: inherit;
}

.royal-jobs-search button,
.royal-jobs-filter,
.royal-job-card-action a,
.royal-job-apply,
.royal-job-back,
.royal-jobs-page-link {
  min-height: 44px;
}

.royal-jobs-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 108px;
}

.royal-jobs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.royal-jobs-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #4b5563;
  text-decoration: none;
}

.royal-jobs-filter:hover,
.royal-jobs-filter.is-active {
  border-color: #9ca3af;
  background: #eef2f7;
  color: #1f2937;
}

.royal-jobs-results {
  scroll-margin-top: 96px;
}

.royal-jobs-list {
  display: grid;
  gap: 16px;
}

.royal-job-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.royal-job-card-content,
.royal-job-content {
  min-width: 0;
  overflow-wrap: anywhere;
}

.royal-job-card-content h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: 0;
}

.royal-job-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: #5f6b7a;
  font-size: 14px;
}

.royal-job-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.royal-job-type {
  padding: 4px 9px;
  border: 1px solid #dce3ea;
  border-radius: 4px;
  background: #f3f6f8;
  color: #52606d;
}

.royal-job-summary {
  margin: 14px 0 0;
  color: #4b5563;
  line-height: 1.7;
}

.royal-job-card-action a,
.royal-job-apply,
.royal-job-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.royal-jobs-empty {
  padding: 64px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.royal-jobs-empty h2 {
  margin: 0;
  color: #374151;
  font-size: 20px;
  letter-spacing: 0;
}

.royal-jobs-empty a {
  margin-top: 20px;
}

.royal-jobs-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.royal-jobs-page-link {
  display: inline-flex;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  text-decoration: none;
}

.royal-jobs-page-link:hover,
.royal-jobs-page-link.is-current {
  border-color: #2563eb;
  color: #1d4ed8;
}

.royal-job-detail-page {
  padding-top: 40px;
  margin-top: var(--royal-header-height, 88px);
}

.royal-job-back {
  width: fit-content;
  margin-bottom: 20px;
  color: #374151;
  text-decoration: none;
}

.royal-job-detail {
  max-width: 920px;
  padding: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.royal-job-detail-header {
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.royal-job-detail-header h1 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 32px;
  line-height: 1.3;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.royal-job-detail-section {
  padding: 28px 0;
}

.royal-job-detail-section h2 {
  margin: 0 0 18px;
  color: #111827;
  font-size: 22px;
  letter-spacing: 0;
}

.royal-job-content {
  color: #374151;
  line-height: 1.8;
}

.royal-job-content img,
.royal-job-content video {
  max-width: 100%;
  height: auto;
}

.royal-job-content table,
.royal-job-content pre {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.royal-job-apply-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.royal-job-email {
    display: grid;
    flex: 1 0 100%;
    min-width: 0;
    gap: 4px;
}

.royal-job-email-label {
  color: #5f6b7a;
  font-size: 14px;
}

.royal-job-email-address,
.royal-job-apply-unavailable {
  overflow-wrap: anywhere;
}

.royal-job-email-address {
  color: #1f2937;
  user-select: all;
}

.royal-job-apply-unavailable {
  margin: 0;
  color: #6b7280;
}

.royal-job-apply {
  min-width: 148px;
}

.royal-jobs-search-field input:focus-visible,
.royal-jobs-filter:focus-visible,
.royal-job-card-action a:focus-visible,
.royal-job-apply:focus-visible,
.royal-job-back:focus-visible,
.royal-jobs-page-link:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .royal-jobs-page {
    padding: 36px 0 48px;
  }

  .royal-jobs-search {
    grid-template-columns: 1fr;
  }

  .royal-jobs-search button,
  .royal-job-card-action a,
  .royal-job-apply {
    width: 100%;
  }

  .royal-job-card {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 18px;
    padding: 20px;
  }

  .royal-job-detail {
    padding: 20px;
  }

  .royal-job-detail-header h1 {
    font-size: 26px;
  }

  .royal-job-apply-row {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 390px) {
  .royal-jobs-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .royal-jobs-filter {
    min-width: 0;
    padding-inline: 10px;
    overflow-wrap: anywhere;
  }

  .royal-job-card,
  .royal-job-detail {
    padding: 16px;
  }
}
