.careers-section {
  background-color: #f8f8f6;
}

.careers-heading {
  margin-bottom: 60px;
}

.careers-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: 12px;
}

:root {
  --jobs-col-pos: 38%;
  --jobs-col-loc: 22%;
  --jobs-col-type: 22%;
  --jobs-col-icon: 56px;
}

.jobs-table {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Header row */
.jobs-table-header {
  display: grid;
  grid-template-columns:
    var(--jobs-col-pos) var(--jobs-col-loc) var(--jobs-col-type)
    var(--jobs-col-icon);
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.jobs-table-header .jobs-col {
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: hsl(0, 0%, 5%);
}

/* Each vacancy row */
.job-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0s),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0s);
}

.job-row.active {
  opacity: 1;
  transform: translateY(0);
}

.job-row-header {
  display: grid;
  grid-template-columns:
    var(--jobs-col-pos) var(--jobs-col-loc) var(--jobs-col-type)
    var(--jobs-col-icon);
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 26px 0;
  text-align: left;
  gap: 0;
}

.job-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text-dark);
  transition: color 0.3s ease;
  padding-right: 16px;
}

.job-row-header:hover .job-title {
  color: var(--color-accent);
}

.job-row-header[aria-expanded="true"] .job-title {
  color: var(--color-accent);
}

.job-location,
.job-type {
  font-size: 0.9rem;
  color: #555;
  padding-right: 12px;
}

/* Circular toggle button */
.job-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #222;
  color: #fff;
  justify-self: start;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.job-row-header:hover .job-toggle-btn {
  background: var(--color-accent);
}

.job-row-header[aria-expanded="true"] .job-toggle-btn {
  background: #222;
}

.job-toggle-btn .icon-up {
  display: none;
}

.job-row-header[aria-expanded="true"] .icon-plus {
  display: none;
}

.job-row-header[aria-expanded="true"] .icon-up {
  display: block;
}

/* Body — height animation */
.job-row-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.job-row-body.open {
  max-height: 1400px;
}

.job-row-content {
  padding: 0 0 36px;
  padding-left: var(--jobs-col-pos);
  padding-right: calc(var(--jobs-col-icon) + 8px);
}

.job-desc-text {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.85;
  margin-bottom: 28px;
}

.job-detail-block {
  margin-bottom: 22px;
}

.job-detail-label {
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: hsl(0, 0%, 5%);
  margin-bottom: 10px;
}

.job-detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.job-detail-list li {
  font-size: 0.95rem;
  color: #555;
  padding-left: 18px;
  position: relative;
  line-height: 1.65;
}

.job-detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  background-color: var(--color-accent);
  border-radius: 50%;
}

.job-salary {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 24px;
}

.job-apply-wrap {
  margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --jobs-col-pos: 100%;
    --jobs-col-loc: 0;
    --jobs-col-type: 0;
    --jobs-col-icon: 40px;
  }

  .jobs-table-header {
    grid-template-columns: 1fr var(--jobs-col-icon);
  }

  .jobs-table-header .jobs-col:nth-child(2),
  .jobs-table-header .jobs-col:nth-child(3) {
    display: none;
  }

  .job-row-header {
    grid-template-columns: 1fr var(--jobs-col-icon);
    gap: 0;
  }

  .job-location,
  .job-type {
    display: none;
  }

  .job-title {
    font-size: 0.95rem;
  }

  .job-row-content {
    padding-left: 0;
    padding-right: 0;
  }
}

.vacancy-apply-btn {
  display: inline-block;
  padding: 11px 28px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 4px;
  transition: opacity 0.2s ease;
}

.vacancy-apply-btn:hover {
  opacity: 0.85;
}

.apply-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.apply-inner {
  max-width: 700px;
}

.apply-desc {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin: 28px 0 40px;
  line-height: 1.8;
}

.apply-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--color-accent);
}

.apply-department {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-main);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.apply-email {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-accent);
  transition: opacity 0.3s ease;
}

.apply-email:hover {
  opacity: 0.75;
}

@media (max-width: 768px) {
  .accordion-content {
    grid-template-columns: 1fr;
    padding-left: 0;
    gap: 24px;
  }

  .accordion-position {
    font-size: 1.2rem;
  }
}
