/*
 * Job postings / Open roles — Careers page
 * Shortcode: [open_roles]
 * Typography & button aligned with style.css :root + resources-grid CTA (.post-card__read-more)
 */

/* List wrapper: column stack (gw-card-row uses row + column at 980px for Divi columns) */
.gw-open-roles {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.6rem;
  width: 100%;
}

.gw-open-roles--empty .gw-open-roles__empty {
  margin: 0;
  color: var(--white80, rgba(255, 255, 255, 0.8));
  font-size: var(--copyFontSmall, 1.5rem);
}

/* Card — flex row, button vertically centered (target mockup) */
.gw-job-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem 3.5rem;
  background-color: var(--black, #000);
  border: 1px solid #333;
  border-radius: 14px;
  box-sizing: border-box;
}

.gw-job-card__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Title — between small / medium header scale (html 62.5% base) */
.gw-job-card__title {
  margin: 0 0 1.2rem;
  font-size: clamp(
    var(--smallFontMin, 2rem),
    2.2vw,
    var(--smallFontMax, 2.7rem)
  );
  font-weight: 400;
  line-height: 1.25;
  color: var(--white, #fff);
}

.gw-job-card__excerpt {
  margin: -0.4rem 0 1.2rem;
  font-size: var(--copyFontSmall, 1.5rem);
  line-height: 1.5;
  color: var(--white80, rgba(255, 255, 255, 0.8));
  max-width: 65ch;
}

/* Pills — standard tag scale + horizontal row */
.gw-job-card__tags {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gw-job-card__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  font-size: clamp(
    var(--standardFontMin, 1.2rem),
    1.2vw,
    var(--standardFontMax, 1.4rem)
  );
  line-height: 1.2;
  font-weight: 500;
  color: var(--white, #fff);
  border: 1px solid var(--white50, rgba(255, 255, 255, 0.5));
  border-radius: 999px;
  background: transparent;
}

/* Salary — solid white pill, dark text (target mockup) */
/* .gw-job-card__tag--salary {
  color: var(--black, #000);
  background-color: var(--white, #fff);
  border-color: rgba(0, 0, 0, 0.12);
} */

/* Card hover container — same as .gw-card-row .et_pb_column (resources-grid.css) */
.gw-open-roles .gw-job-card[data-job-apply-url] {
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 14px;
}

/* Card hover effect */
.gw-open-roles .gw-job-card[data-job-apply-url]:hover {
  border-color: #bff67e;
  box-shadow:
    0 0 0 1px #bff67e,
    0 10px 30px rgba(191, 246, 126, 0.25);
  transform: translateY(-3px);
}

/* Highlight the card title on hover */
.gw-open-roles .gw-job-card[data-job-apply-url]:hover h1,
.gw-open-roles .gw-job-card[data-job-apply-url]:hover h2,
.gw-open-roles .gw-job-card[data-job-apply-url]:hover h3,
.gw-open-roles .gw-job-card[data-job-apply-url]:hover h4 {
  color: #bff67e !important;
}

/* Apply button stays on top for independent clicks (same idea as ymc-resource-card-clickable) */
.gw-open-roles .gw-job-card .gw-job-card__apply {
  position: relative;
  z-index: 10;
}

/* Apply — match featured resource “Download” / read-more pill (resources-grid.css) */
.gw-job-card__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gw-job-card__apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.4rem;
  font-size: var(--copyFontSmall, 1.5rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--black, #000) !important;
  text-decoration: none !important;
  background-color: #bff67e;
  border: 1px solid #bff67e;
  border-radius: 40px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.gw-job-card__apply:hover {
  color: var(--black, #000) !important;
  background-color: #a8e555;
  border-color: #a8e555;
  filter: brightness(1.05);
  text-decoration: none !important;
}

.gw-job-card__apply--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Tablet */
@media screen and (max-width: 980px) {
  .gw-job-card {
    flex-wrap: wrap;
    padding: 2.5rem 2.5rem;
    gap: 1.75rem;
  }

  .gw-job-card__actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Mobile — stack */
@media screen and (max-width: 600px) {
  .gw-job-card {
    flex-direction: column;
    align-items: stretch;
    padding: 2.4rem 2rem;
  }

  .gw-job-card__tags {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }

  .gw-job-card__tag {
    width: auto;
    max-width: 100%;
    justify-content: center;
  }

  .gw-job-card__actions {
    width: 100%;
  }

  .gw-job-card__apply {
    width: 100%;
    justify-content: center;
  }
}
