.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.job-listing-page__header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.job-listing-page .page-title {
  grid-column: 2;
  text-align: center;
  background-color: white;
  margin: 0;
  color: var(--navy);
  font-size: 2.5rem;
  font-weight: 325;
  padding: 1.25rem;
}

.job-listing-page {
  max-width: 1120px;
  margin: 0 auto 4rem;
  padding: 0 1.25rem;
}

.job-listing-page .create-button {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.job-listing-page .create-button:hover {
  background: var(--navy);
  color: #fff;
}

@media (max-width: 640px) {
  .job-listing-page__header {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .job-listing-page .page-title,
  .job-listing-page .create-button {
    grid-column: 1;
    justify-self: center;
  }
}

.job-listing-intro {
  margin: 0 auto 2rem;
  max-width: 52rem;
  text-align: center;
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 400;
}

/* Job filters: full width of .job-listing-page, not homepage search layout */
.job-listing-page #job-listings-filters.search-form {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-sizing: border-box;
}

.job-listing-page #job-listings-filters.search-form--home {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.job-listing-page #job-listings-filters .search-form__title {
  width: 100%;
  max-width: 100%;
  text-align: left;
  padding: 0;
}

.job-listing-page #job-listings-filters .search-form__divider {
  width: 100%;
  max-width: 100%;
}

.job-listing-page #job-listings-filters .search-form__inputs-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  align-items: stretch;
}

.job-listing-page #job-listings-filters .row {
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: none;
}

.job-listing-page #job-listings-filters select,
.job-listing-page #job-listings-filters input[type="text"],
.job-listing-page #job-listings-filters input[type="search"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 50px;
  box-sizing: border-box;
}

.job-listing-page #job-listings-filters .search-button {
  align-self: flex-start;
}

@media (max-width: 900px) {
  .job-listing-page #job-listings-filters .search-form__inputs-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .job-listing-page #job-listings-filters .search-form__inputs-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1400px) {
  .job-listing-page #job-listings-filters.search-form--home {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
  }

  .job-listing-page #job-listings-filters .search-form__inputs-row {
    flex-direction: unset;
    flex-wrap: unset;
    width: 100%;
    max-width: 100%;
  }

  .job-listing-page #job-listings-filters .row {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
  }
}

.job-listing-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1rem;
}

.job-listing-count {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.job-listing-sort-note {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.job-listings-empty {
  margin: 0.5rem 0 1.5rem;
  padding: 2.5rem 2rem;
  text-align: center;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 72, 125, 0.06);
}

.job-listings-empty__title {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

.job-listings-empty__text {
  margin: 0 auto;
  max-width: 32rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #475569;
}

.job-listing-table-wrap {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 72, 125, 0.08);
  overflow-x: auto;
}

.job-listing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.job-listing-table thead {
  background: var(--sky);
  border-bottom: 2px solid #c5d4dc;
}

.job-listing-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  white-space: nowrap;
}

.job-listing-table td {
  padding: 0.9rem 1rem;
  border-top: 1px solid #e8eef4;
  color: #1e293b;
  vertical-align: top;
}

.job-listing-table tbody tr:hover {
  background: #f8fbfd;
}

.job-listing-table .col-title {
  font-weight: 600;
  color: var(--navy);
  min-width: 12rem;
}

.job-listing-table .col-photo {
  width: 10.5rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  vertical-align: middle;
}

.job-listing-photo-link {
  display: block;
  width: 9rem;
  height: 6.5rem;
  border-radius: 6px;
  overflow: hidden;
  background: #e8eef4;
  border: 1px solid #dbe3ef;
}

.job-listing-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job-listing-photo--empty {
  background: linear-gradient(135deg, #ecf4f8 0%, #dbe3ef 100%);
}

.job-listing-table .col-company {
  min-width: 9rem;
}

.job-listing-table .col-location {
  min-width: 8rem;
}

.job-listing-table .col-type,
.job-listing-table .col-category {
  white-space: nowrap;
}

.job-listing-table .col-posted {
  white-space: nowrap;
  color: #475569;
}

.job-listing-table .col-posted time {
  font-weight: 500;
}

.job-listing-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #ecf4f8;
  color: var(--navy);
  border: 1px solid #c5d4dc;
}

.job-listing-badge--new {
  background: rgba(241, 90, 34, 0.12);
  border-color: rgba(241, 90, 34, 0.35);
  color: #c2410c;
  margin-left: 0.35rem;
}

.job-listing-link {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.job-listing-link:hover {
  color: var(--orange);
  text-decoration: underline;
}

.job-listing-placeholder-note {
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: #fff8f3;
  border: 1px dashed rgba(241, 90, 34, 0.45);
  font-size: 0.85rem;
  color: #7c2d12;
  text-align: center;
}

.job-listing-title-link {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

.job-listing-title-link:hover {
  color: var(--orange);
  text-decoration: underline;
}

/* Job detail page */
.job-detail-page {
  max-width: 800px;
  margin: 0 auto 4rem;
  padding: 0 1.25rem;
}

.job-detail-breadcrumb {
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  color: #64748b;
}

.job-detail-breadcrumb a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
}

.job-detail-breadcrumb a:hover {
  color: var(--orange);
  text-decoration: underline;
}

.job-detail-breadcrumb__sep {
  margin: 0 0.4rem;
}

.job-detail-card {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 72, 125, 0.08);
  overflow: hidden;
}

.job-detail-header {
  padding: 1.75rem 1.75rem 1.25rem;
  border-bottom: 1px solid #e8eef4;
  background: linear-gradient(180deg, #f8fbfd 0%, #fff 100%);
}

.job-detail-company {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.job-detail-title {
  margin: 0 0 1.25rem;
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
}

.job-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.85rem 1.5rem;
  margin: 0;
}

.job-detail-meta__item {
  margin: 0;
}

.job-detail-meta dt {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.job-detail-meta dd {
  margin: 0;
  font-size: 0.95rem;
  color: #1e293b;
}

.job-detail-body {
  padding: 1.5rem 1.75rem;
}

.job-detail-section-title {
  margin: 0 0 0.85rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
}

.job-detail-description {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: #334155;
}

.job-detail-description--empty {
  color: #64748b;
  font-style: italic;
}

.job-detail-actions {
  padding: 1.25rem 1.75rem 1.75rem;
  border-top: 1px solid #e8eef4;
  background: #f8fbfd;
}

.job-detail-apply-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.job-detail-apply-btn:hover {
  background: #d94e1c;
  color: #fff;
}

.job-detail-apply-btn--modal {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.job-detail-apply-note,
.job-detail-apply-unavailable {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

/* Job apply modal */
.job-apply-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.job-apply-modal.hidden {
  display: none;
}

body.job-apply-modal-open {
  overflow: hidden;
}

.job-apply-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 36, 61, 0.55);
}

.job-apply-modal__dialog {
  position: relative;
  width: min(42rem, 100%);
  max-height: min(92vh, 820px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.job-apply-modal__toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem 0.5rem 0;
}

.job-apply-modal__close {
  border: none;
  background: transparent;
  color: var(--navy);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
}

.job-apply-modal__close:hover {
  background: var(--sky);
  color: var(--orange);
}

.job-apply-modal__body {
  overflow-y: auto;
  padding: 0 1.5rem 1.5rem;
}

.job-apply-modal__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
}

.job-apply-modal__subtitle {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #64748b;
}

.job-apply-modal__content--success .job-apply-modal__subtitle {
  margin-bottom: 1.5rem;
}

.job-apply-form__section {
  margin: 0 0 1.15rem;
  padding: 0;
  border: none;
}

.job-apply-form__section-title {
  display: block;
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 0 0 0.35rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
}

.job-apply-form__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.job-apply-form__checkbox-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
}

.job-apply-form__checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.86rem;
  line-height: 1.35;
  color: #334155;
  cursor: pointer;
}

.job-apply-form__checkbox-row input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.job-apply-form__errors {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.9rem;
}

.job-apply-form__errors ul {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}

.job-apply-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.job-apply-form__group {
  margin-bottom: 0.85rem;
}

.job-apply-form__group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.job-apply-form__required {
  color: #dc2626;
}

.job-apply-form__optional {
  font-weight: 400;
  color: #64748b;
}

.job-apply-form__input,
.job-apply-form__textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1e293b;
}

.job-apply-form__input:focus,
.job-apply-form__textarea:focus {
  outline: 2px solid rgba(241, 90, 34, 0.35);
  border-color: var(--orange);
}

.job-apply-form__textarea {
  resize: vertical;
  min-height: 5rem;
}

.job-apply-form__hint {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: #64748b;
}

.job-apply-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.job-apply-form__actions--center {
  justify-content: center;
}

.job-apply-form__cancel,
.job-apply-form__submit {
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.job-apply-form__cancel {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--navy);
}

.job-apply-form__cancel:hover {
  background: #f8fafc;
}

.job-apply-form__submit {
  border: none;
  background: var(--orange);
  color: #fff;
}

.job-apply-form__submit:hover {
  background: #d94e1c;
}

@media (max-width: 540px) {
  .job-apply-form__row {
    grid-template-columns: 1fr;
  }

  .job-apply-form__checkbox-list {
    grid-template-columns: 1fr;
  }
}

.job-detail-apply-unavailable {
  margin-bottom: 0.5rem;
}

.job-detail-back-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}

.job-detail-back-link:hover {
  color: var(--orange);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .job-listing-table .col-category,
  .job-listing-table th:nth-child(5),
  .job-listing-table td:nth-child(5) {
    display: none;
  }

  .job-detail-header,
  .job-detail-body,
  .job-detail-actions {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .job-detail-title {
    font-size: 1.5rem;
  }
}
