/* ===========================================================================
   Whitehills Care — vacancy detail page
   ---------------------------------------------------------------------------
   The job page used to be five icon cards, each centred in its own tile, on a
   four-column grid that a five-item vacancy broke into a row of four and one
   orphan. A candidate had to scroll past most of a screen of whitespace before
   reaching a word about the job. This replaces it with the shape the facts
   actually have: one sheet, a title, a row of label-and-value facts, then the
   copy in labelled sections.

   Everything is scoped under .vacancy. style.css carries its own .overview-card,
   .content-card and .detail-block rules in three separate places, several of
   them overriding each other; new class names are how this stays out of that
   argument rather than adding a fourth round of it.

   Gold is a rule and a border here, never text: #C09041 on white is 2.87:1,
   which is under the 3.0:1 that scripts/check-contrast.py enforces. Labels are
   teal or muted grey.
   =========================================================================== */

.vacancy {
  background: var(--light-bg);
  padding: 2rem 0 4rem;
}

.vacancy__paper {
  max-width: 62rem;
  margin-inline: auto;
  background: var(--white-bg);
  border: 1px solid var(--border-col);
  border-radius: 4px;
  overflow: hidden;
}

/* --- Header ---------------------------------------------------------------
   The markup uses a div here, never a <header>: header.css styles the bare
   element as the site hero, 90vh tall and centred, with a photograph on
   ::before. A <header> inside this sheet swallows the whole first screen. */

.vacancy__head {
  padding: 2.25rem 2.5rem 1.75rem;
}

.vacancy__eyebrow {
  margin: 0 0 0.6rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.vacancy__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.4vw, 2.85rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--primary-dark);
  text-wrap: balance;
}

.vacancy__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.1rem;
  margin-top: 0.85rem;
}

.vacancy__reference {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.vacancy__status {
  display: inline-block;
  padding: 0.2rem 0.62rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vacancy__status--open {
  background: var(--primary-color);
  color: #fff;
}

.vacancy__status--closed {
  background: #F3F1EC;
  color: var(--text-color);
  border: 1px solid var(--border-col);
}

/* --- The facts ------------------------------------------------------------ */

.vacancy__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.6rem 2.25rem;
  padding: 1.6rem 2.5rem 1.9rem;
  border-top: 1px solid var(--border-col);
  border-bottom: 1px solid var(--border-col);
  background: #FCFBF9;
}

.fact__label {
  margin: 0 0 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--primary-color);
}

.fact__value {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.4;
  color: var(--text-color);
}

.fact__note {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.83rem;
  line-height: 1.4;
  color: var(--text-muted);
}

/* --- Body ----------------------------------------------------------------- */

.vacancy__body {
  padding: 0.5rem 2.5rem 2.25rem;
}

.vacancy__section {
  padding-top: 2rem;
}

.vacancy__section + .vacancy__section {
  border-top: 1px solid #EDEAE3;
}

.vacancy__section h2 {
  margin: 0 0 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-color);
}

.vacancy__prose {
  max-width: 44rem;
  color: var(--text-color);
}

.vacancy__prose p {
  margin: 0 0 1rem;
  line-height: 1.7;
}

.vacancy__prose p:last-child {
  margin-bottom: 0;
}

.vacancy__prose ul,
.vacancy__prose ol {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  line-height: 1.7;
}

.vacancy__prose li + li {
  margin-top: 0.3rem;
}

/* --- Apply ---------------------------------------------------------------- */

.vacancy__apply {
  margin-top: 2.25rem;
  padding: 1.9rem 2rem;
  border: 1px solid var(--border-col);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  background: var(--brand-cream, #FCF8EC);
}

.vacancy__apply h2 {
  margin: 0 0 0.5rem;
  padding: 0;
  border: 0;
  display: block;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--primary-dark);
}

.vacancy__apply p {
  margin: 0 0 1.25rem;
  max-width: 40rem;
  color: var(--text-color);
}

.vacancy__apply p:last-child {
  margin-bottom: 0;
}

.vacancy__btn {
  display: inline-block;
  padding: 0.8rem 1.9rem;
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  background: var(--primary-color);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.vacancy__btn:hover,
.vacancy__btn:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.vacancy__btn--quiet {
  background: transparent;
  color: var(--primary-color);
}

.vacancy__btn--quiet:hover,
.vacancy__btn--quiet:focus {
  background: var(--primary-color);
  color: #fff;
}

/* --- Narrow screens ------------------------------------------------------- */

@media (max-width: 40rem) {
  .vacancy {
    padding: 1rem 0 2.5rem;
  }

  .vacancy__head {
    padding: 1.75rem 1.4rem 1.4rem;
  }

  .vacancy__facts {
    grid-template-columns: 1fr 1fr;
    gap: 1.3rem 1.4rem;
    padding: 1.4rem;
  }

  .vacancy__body {
    padding: 0.25rem 1.4rem 1.75rem;
  }

  .vacancy__apply {
    padding: 1.5rem 1.3rem;
  }
}

@media (max-width: 26rem) {
  .vacancy__facts {
    grid-template-columns: 1fr;
  }
}
