/* ==========================================================================
   Career page
   Markup: resources/views/frontend/career.blade.php
   Design: "Webase — Services Section Redesign" canvas, Career.dc.html
   ========================================================================== */

.wb-career {
  --wb-career-bg: #F4F1EA;
  --wb-career-dark: #0E0720;
  --wb-career-navy: #202547;
  --wb-career-muted: #5B6080;
  --wb-career-accent: #ED194E;
  --wb-career-eyebrow: #C8163F;
  --wb-career-green: #22C55E;
  --wb-career-ease: cubic-bezier(.2, .8, .2, 1);

  background: var(--wb-career-bg);
  color: var(--wb-career-navy);
  font-family: 'Inter', system-ui, sans-serif;
}

/* ---------- Hero (same pattern as the Case Study page) ---------- */

.wb-career-hero {
  position: relative;
  overflow: hidden;
  /* the global header overlays the top */
  padding: calc(var(--wb-header-height, 108px) + 64px) 0 96px;
  background: var(--wb-career-dark);
  color: #FFFFFF;
  font-family: 'Inter Tight', system-ui, sans-serif;
}

.wb-career-hero__photo,
.wb-career-hero__shade,
.wb-career-hero__glow {
  position: absolute;
  pointer-events: none;
}

.wb-career-hero__photo {
  inset: 0;
  background: url('../../img/hero/hero-slide-2.webp') 70% center / cover no-repeat;
}

.wb-career-hero__shade {
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 8, 48, .97) 0%, rgba(28, 12, 66, .9) 55%, rgba(42, 18, 96, .72) 100%);
}

.wb-career-hero__glow {
  border-radius: 50%;
  filter: blur(160px);
}

.wb-career-hero__glow--red {
  right: -140px;
  top: -220px;
  width: 620px;
  height: 620px;
  background: var(--wb-career-accent);
  opacity: .18;
}

.wb-career-hero__glow--violet {
  left: -220px;
  bottom: -300px;
  width: 760px;
  height: 760px;
  background: #8B5CF6;
  opacity: .22;
}

.wb-career-hero__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.wb-career-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #FF6B8E;
}

.wb-career-hero__eyebrow::before,
.wb-career-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--wb-career-accent);
}

.wb-career-hero__title {
  margin: 0;
  font-family: inherit;
  /* same scale as the other inner-page heroes */
  font-size: clamp(46px, 4.8vw, 72px);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -0.05em;
  color: #FFFFFF;
}

/* ---------- Openings ---------- */

.wb-career-openings {
  position: relative;
  padding: 110px 0 130px;
}

.wb-career-glow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.wb-career-glow span {
  position: absolute;
  display: block;
  border-radius: 50%;
}

.wb-career-glow__red {
  right: -120px;
  top: 80px;
  width: 460px;
  height: 420px;
  background: var(--wb-career-accent);
  opacity: .1;
  filter: blur(120px);
}

.wb-career-glow__blue {
  left: -160px;
  bottom: 0;
  width: 520px;
  height: 460px;
  background: #3D5AFE;
  opacity: .1;
  filter: blur(130px);
}

.wb-career-openings__wrap {
  position: relative;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* Sticky side panel (below the fixed header) */
.wb-career-side {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.wb-career-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wb-career-eyebrow);
}

.wb-career-side__title {
  margin: 0;
  font-family: 'Kanit', sans-serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--wb-career-navy);
}

.wb-career-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wb-career-list > li {
  display: flex;
}

/* ---------- Job card ---------- */

.wb-career .wb-job {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 12px;
  border: 1px solid rgba(32, 37, 71, .08);
  border-radius: 30px;
  background: #FFFFFF;
  box-shadow: 0 14px 40px -26px rgba(32, 37, 71, .35);
  color: var(--wb-career-navy);
  text-decoration: none;
  transition: transform .5s var(--wb-career-ease), box-shadow .5s ease, border-color .5s ease;
}

.wb-career .wb-job:hover {
  color: var(--wb-career-navy);
  border-color: rgba(237, 25, 78, .3);
  transform: translateY(-8px);
  box-shadow: 0 34px 60px -30px rgba(32, 37, 71, .45);
}

.wb-career .wb-job:focus-visible {
  outline: 3px solid var(--wb-career-accent);
  outline-offset: 3px;
}

.wb-job__media {
  position: relative;
  display: block;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  border-radius: 20px;
  background: var(--wb-career-navy);
}

.wb-job__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--wb-career-ease);
}

.wb-job:hover .wb-job__media img {
  transform: scale(1.06);
}

.wb-job__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 18px;
  padding: 22px 14px 12px;
}

.wb-job__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wb-job__title {
  font-family: 'Kanit', sans-serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  transition: color .4s ease;
}

.wb-job:hover .wb-job__title {
  color: var(--wb-career-eyebrow);
}

.wb-job__status {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.wb-job__status--open {
  background: rgba(34, 197, 94, .1);
  color: #15803D;
}

.wb-job__status--closed {
  background: rgba(32, 37, 71, .07);
  color: var(--wb-career-muted);
}

/* Pulsing "live" dot */
.wb-job__pulse {
  position: relative;
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wb-career-green);
}

.wb-job__pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--wb-career-green);
  animation: wb-career-ping 1.8s var(--wb-career-ease) infinite;
}

@keyframes wb-career-ping {
  0%   { transform: scale(1); opacity: .6; }
  100% { transform: scale(2.6); opacity: 0; }
}

.wb-job__meta {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  border-radius: 16px;
  background: var(--wb-career-bg);
}

.wb-job__meta > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
}

.wb-job__meta > span + span {
  border-left: 1px solid rgba(32, 37, 71, .08);
}

.wb-job__meta-label {
  font-size: 12px;
  color: var(--wb-career-muted);
}

.wb-job__meta strong {
  font-size: 15px;
  font-weight: 600;
}

.wb-job__meta .wb-job__vacancy {
  font-weight: 700;
  color: var(--wb-career-eyebrow);
}

.wb-job__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  box-sizing: border-box;
  margin-top: auto;
  padding: 0 8px 0 22px;
  border: 1.5px solid var(--wb-career-navy);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: background-color .4s ease, border-color .4s ease, color .4s ease;
}

.wb-job:hover .wb-job__btn {
  border-color: var(--wb-career-accent);
  background: var(--wb-career-accent);
  color: #FFFFFF;
}

.wb-job__btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--wb-career-navy);
  color: #FFFFFF;
  transition: background-color .4s ease, color .4s ease;
}

.wb-job__btn-icon svg {
  transition: transform .45s var(--wb-career-ease);
}

.wb-job:hover .wb-job__btn-icon {
  background: #FFFFFF;
  color: var(--wb-career-accent);
}

.wb-job:hover .wb-job__btn-icon svg {
  transform: translateX(3px);
}

/* ---------- Responsive (Bootstrap steps) ---------- */

@media (max-width: 1199.98px) {
  .wb-career-openings__wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .wb-career-side {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .wb-career-hero {
    padding: calc(var(--wb-header-height, 92px) + 32px) 0 70px;
  }

  .wb-career-hero__title {
    font-size: 40px;
  }

  .wb-career-openings {
    padding: 50px 0;
  }

  .wb-career-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .wb-career-side__title {
    font-size: 40px;
  }

  .wb-career-side__title br {
    display: none;
  }

  .wb-job__title {
    font-size: 22px;
  }
}

@media (max-width: 575.98px) {
  .wb-career-hero__title {
    font-size: 36px;
  }

  /* meta strip stacks into rows on small phones */
  .wb-job__meta {
    grid-auto-flow: row;
  }

  .wb-job__meta > span + span {
    border-left: 0;
    border-top: 1px solid rgba(32, 37, 71, .08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wb-job__pulse::after {
    animation: none;
  }

  .wb-career .wb-job,
  .wb-job__media img,
  .wb-job__title,
  .wb-job__btn,
  .wb-job__btn-icon,
  .wb-job__btn-icon svg {
    transition: none;
  }
}
