/* =========================================================
   VALAPPILA — Careers Page
   (Header, hero, intro block, pagination & footer live in common.css)
   ========================================================= */

/* =========================================================
   AVAILABLE POSITIONS
   ========================================================= */
.positions {
  background: #ED241C;
  padding: 90px 0 80px;
  scroll-margin-top: 20px;
}

.pos-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

.pos-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.1;
  color: #FFFFFF;
}

.pos-text {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: #FFFFFFE6;
  max-width: 380px;
  padding-top: 10px;
}

/* ---------- Job table ---------- */
.job-head,
.job-row {
  display: grid;
  grid-template-columns: 2.1fr 1.5fr 1.1fr 0.9fr 1.4fr;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
}

.job-head {
  padding-bottom: 14px;
  border-bottom: 1px solid #FFFFFF59;
  margin-bottom: 24px;
}

.job-head span {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.job-row {
  padding-top: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid #FFFFFF40;
  transition: background var(--transition);
}

.job-row[hidden] {
  display: none;
}

.job-row:hover {
  background: #FFFFFF0F;
}

.job-title {
  position: relative;
  padding-left: 18px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.3;
  color: #FFFFFF;
}

.job-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFFFFF;
  transform: translateY(-50%);
}

.job-cell {
  font-family: var(--font-body);
  font-size: 13px;
  color: #FFFFFF;
}

.job-label {
  display: none;
}

.job-apply {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFFFFF;
  color: #ED241C;
  border-radius: 100px;
  padding: 9px 22px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  transition: background var(--transition), color var(--transition);
}

.job-apply span {
  transition: transform var(--transition);
}

.job-apply:hover {
  background: #171513;
  color: #FFFFFF;
}

.job-apply:hover span {
  transform: translate(2px, -2px);
}

.job-apply:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 3px;
}

.job-list.is-switching .job-row:not([hidden]) {
  animation: jobIn 0.4s ease both;
}

@keyframes jobIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* =========================================================
   WHY WORK HERE
   ========================================================= */
.why-work {
  background: #F6F1EA;
  padding: 90px 0 100px;
}

.ww-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 46px;
}

.ww-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.1;
  color: #171513;
  max-width: 620px;
}

.ww-text {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: #746E69;
  max-width: 380px;
  padding-top: 6px;
}

.perk-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 44px;
}

.perk-card {
  display: flex;
  flex-direction: column;
  min-height: 188px;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 22px 22px 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.perk-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(157, 6, 0, 0.3);
}

.perk-icon {
  display: flex;
  color: #ED241C;
  margin-bottom: auto;
}

.perk-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.perk-name {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 18px;
  color: #171513;
  margin: 40px 0 8px;
}

.perk-text {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
  color: #746E69;
}

/* Dark CTA band */
.resume-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: #171513;
  border-radius: 14px;
  padding: 34px 30px;
}

.rc-title {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.25;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.rc-text {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: #FFFFFFCC;
  max-width: 660px;
}

.rc-text a {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rc-btn {
  flex-shrink: 0;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .positions,
  .why-work {
    padding: 80px 0;
  }

  .pos-title,
  .ww-title {
    font-size: 36px;
  }

  .job-head,
  .job-row {
    grid-template-columns: 2fr 1.4fr 1fr 1fr auto;
    padding-left: 10px;
    padding-right: 10px;
  }

  .job-title {
    font-size: 16px;
  }

  .perk-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .positions,
  .why-work {
    padding: 64px 0;
  }

  .pos-head,
  .ww-head {
    flex-direction: column;
    gap: 14px;
    margin-bottom: 30px;
  }

  .pos-text,
  .ww-text {
    padding-top: 0;
  }

  .pos-title,
  .ww-title {
    font-size: 32px;
  }

  /* Table → stacked job cards */
  .job-head {
    display: none;
  }

  .job-list {
    border-top: 1px solid #FFFFFF40;
  }

  .job-row {
    grid-template-columns: repeat(3, auto) 1fr;
    gap: 8px 18px;
    padding: 20px 4px;
  }

  .job-title {
    grid-column: 1 / -1;
    font-size: 17px;
  }

  .job-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #FFFFFFB3;
    margin-bottom: 2px;
  }

  .job-apply {
    justify-self: end;
    align-self: end;
  }

  .resume-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
  }

  .rc-title {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .positions,
  .why-work {
    padding: 52px 0;
  }

  .pos-title,
  .ww-title {
    font-size: 27px;
  }

  .job-row {
    grid-template-columns: repeat(3, auto);
  }

  .job-apply {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 6px;
  }

  .perk-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .perk-card {
    min-height: 0;
  }

  .perk-name {
    margin-top: 22px;
  }
}
