/* ==========================================================================
   opportunity_list — Current Opportunities (opportunities CPT)
   Filter bar + hairline-separated job rows + Load-more. Rows link out (apply_link).
   ========================================================================== */

.opportunity-list {
  padding-block: var(--section-y);
}
/* Section sits on the shared 12-col grid (.container.grid); every block spans the full
   width and vertical rhythm stays on the children's own margins (row-gap zeroed so the
   grid doesn't double it). Mirrors the people_grid layout. */
.opportunity-list__inner {
  row-gap: 0;
}
.opportunity-list__inner > * {
  grid-column: 1 / -1;
}
.opportunity-list__header {
  margin-block-end: clamp(2rem, 4vw, 3rem);
}
.opportunity-list__header .section-header__eyebrow {
  color: var(--color-clay);
  margin: 0 0 0.75rem;
}

/* Filter bar */
.opp-filter {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2xl);
  margin-block-end: clamp(1.5rem, 3vw, 2.5rem);
  /* Lift the whole filter bar above the rows so the open dropdown (.pf-menu) is never
     covered by a row card (.opp-row__card is position:relative and paints on its own). */
  position: relative;
  z-index: 2;
}
.opp-filter__selects {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.opp-filter .pf-field {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.opp-filter .pf-field__label {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-h6);
  color: var(--color-steel);
  white-space: nowrap;
}
.opp-filter .pf-field__select {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.opp-filter .pf-select {
  font-family: var(--font-body);
  font-size: var(--text-h6);
  color: var(--color-clay);
  background: transparent;
  border: 0;
  padding: 0 1.6em 0 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  line-height: var(--lh-snug);
}
/* No focus box — the open teal panel + caret flip signal state (matches projects). */
.opp-filter .pf-select:focus,
.opp-filter .pf-select:focus-visible {
  outline: none;
}
.opp-filter .pf-field__caret {
  position: absolute;
  right: 0;
  color: var(--color-clay);
  pointer-events: none;
  font-size: 0.7em;
  transition: transform 0.2s ease;
}
.opp-filter__status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}
.opp-filter .pf-count {
  font-family: var(--font-body);
  font-size: var(--text-h7);
  color: var(--color-steel);
  margin: 0;
  white-space: nowrap;
}
.opp-filter .pf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.opp-filter .pf-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-white);
  border: 0;
  border-radius: 100px;
  padding: 0.4em 0.7em 0.4em 1em;
  font-family: var(--font-body);
  font-size: var(--text-h7);
  color: var(--color-steel);
  cursor: pointer;
}
.opp-filter .pf-chip .ph {
  font-size: 1.1em;
  width: 0.75rem;
}
.opp-filter .pf-clear {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-h7);
  color: var(--color-steel);
  margin-inline-start: auto;
}

/* Rows */
.opp-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(30, 23, 17, 0.16);
  position: relative;
  z-index: 1; /* below .opp-filter so an open .pf-menu overlays the row cards */
}
/* Each row splits into a left ~34% description-reveal column and the job card,
   which starts at 33.75% of the row (Figma Frame 21093). */
.opp-row {
  display: grid;
  grid-template-columns: 33.75% 1fr;
  align-items: stretch;
  padding-block: var(--sp-sm);
}
.opp-row.is-paged {
  display: none;
}

/* Left column: short description, revealed on row hover. Holds its track even
   when hidden so the card keeps to the right ~2/3 in both states. */
.opp-row__desc {
  align-self: center;
  padding-inline: 1.25% clamp(1.5rem, 4vw, 4.5rem);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}
.opp-row:hover .opp-row__desc,
.opp-row:focus-within .opp-row__desc {
  opacity: 1;
  transform: none;
}
.opp-row__desc-label {
  font-family: var(--font-body);
  font-size: var(--text-h7);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-steel);
  margin: 0 0 var(--sp-sm);
}
.opp-row__desc-text {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-body-main);
  line-height: var(--lh-body);
  color: var(--color-steel);
  margin: 0;
}

/* Right column: the job card (Frame 21093) — a translucent-white panel that
   turns into a Water (navy) block on hover; meta pinned top, foot pinned bottom. */
.opp-row__card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  min-height: clamp(13rem, 18vw, 21.75rem);
  padding: clamp(1.5rem, 2vw, 1.75rem) clamp(1.5rem, 3vw, 2.75rem) clamp(1.5rem, 2vw, 1.75rem) clamp(1.75rem, 3.7vw, 4.4rem);
  background: rgba(255, 255, 255, 0.5);
  transition: background-color 0.45s ease, color 0.45s ease;
}
.opp-row:hover .opp-row__card,
.opp-row:focus-within .opp-row__card {
  background: var(--color-water);
  color: var(--color-alabaster);
}
/* Divider between two cards */
.opp-row:not(:last-child) .opp-row__card::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: calc(-1 * var(--sp-sm));
  width: 100%;
  height: 1px;
  background: rgba(30, 23, 17, 0.15);
}

/* Meta line: "full time  +  Sydney - Australia" — Water navy, 18px. */
.opp-row__meta {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-h7);
  color: var(--color-water);
  margin: 0;
}
.opp-row__meta-type {
  text-transform: lowercase;
}
.opp-row__meta-sep {
  font-size: 1em;
  color: var(--color-water);
}
.opp-row:hover .opp-row__meta,
.opp-row:hover .opp-row__meta-sep,
.opp-row:focus-within .opp-row__meta,
.opp-row:focus-within .opp-row__meta-sep {
  color: var(--color-alabaster);
}

/* Foot: chip stacked above title (left) + apply link (right, bottom-aligned). */
.opp-row__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(1.5rem, 3vw, 3rem);
  flex-wrap: wrap;
}
.opp-row__headline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(0.85rem, 1.6vw, 1.5rem);
  width: calc(100% - 12.5rem); /* leave room for the apply link */
}
.opp-row__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.5rem;
  background: transparent;
  color: var(--color-water);
  border: 1px solid var(--color-water);
  border-radius: 120px;
  padding: 0.2em 1.1em;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.875rem;
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease;
}
.opp-row:hover .opp-row__chip,
.opp-row:focus-within .opp-row__chip {
  border-color: rgba(247, 244, 231, 0.5);
  color: var(--color-alabaster);
}
.opp-row__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h3);
  line-height: 1.3;
  color: var(--color-steel);
  margin: 0;
}
.opp-row:hover .opp-row__title,
.opp-row:focus-within .opp-row__title {
  color: var(--color-alabaster);
}
.opp-row__apply {
  flex: 0 0 auto;
  gap: 1rem;
  font-size: var(--text-h7);
  font-weight: 400;
  color: var(--color-water);
}
.opp-row:hover .opp-row__apply,
.opp-row:focus-within .opp-row__apply {
  color: var(--color-alabaster);
}
/* Filled clay circle around the arrow (Figma Frame 5 — 44×44, arrow inset via padding
   so it sits centred inside the circle rather than filling it). Clay in both states. */
.opp-row__apply .ph {
  box-sizing: border-box;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.75rem;
  border-radius: 50%;
  background: var(--color-clay);
  color: #fff;
}
.opp-empty {
  font-size: var(--text-body-lg);
  color: var(--color-steel);
}

@media (max-width: 860px) {
  .opp-row {
    grid-template-columns: 1fr;
  }
  .opp-row__desc {
    display: none;
  }
}

@media (max-width: 600px) {
  .opp-row__card {
    min-height: 0;
    gap: 2rem;
  }
  .opp-row__foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .opp-filter .pf-clear {
    margin-inline-start: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .opp-row__desc {
    transform: none;
    transition: opacity 0.2s ease;
  }
}
