/**
 * Career / Join Us banner section
 */

:root {
  --career-grid-color: #9CA3AF;
  --career-accent: #00BCD4;
  --career-accent-deep: #001F5C;
}

.aptly-careers-hero-section {
  padding-top: var(--header-height, 72px);
  height: 100vh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #F9F9F9;
}

.aptly-careers-bg-overlay {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50vw;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, var(--career-grid-color) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  opacity: 0.4;
}

.grid-line {
  position: absolute;
  z-index: 2;
}

.line-top,
.line-bottom {
  width: 100vw;
  height: 1px;
  left: 50%;
  transform: translateX(-50%);
  background-image: linear-gradient(to right, var(--career-grid-color) 33%, rgba(255, 255, 255, 0) 0%);
  background-position: bottom;
  background-size: 6px 1px;
  background-repeat: repeat-x;
}

.line-top {
  top: 0;
}

.line-bottom {
  bottom: 0;
}

.line-left,
.line-right,
.line-center {
  width: 1px;
  height: 100%;
  top: 0;
  bottom: 0;
  background-image: linear-gradient(to bottom, var(--career-grid-color) 33%, rgba(255, 255, 255, 0) 0%);
  background-size: 1px 6px;
  background-repeat: repeat-y;
}

.line-left {
  left: 0;
}

.line-right {
  right: 0;
}

.line-center {
  left: 50%;
  transform: translateX(-50%);
}

.aptly-careers-wrapper {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 100%;
  padding-top: 1.5rem;
}

/* Hero typography base lives in style.css (global). Career-specific overrides below in media queries. */
.aptly-careers-hero-section .aptly-hero-heading {
  opacity: 0;
  transform: translateY(80px);
  animation: aptlyHeroSlideUpFade 0.6s ease-out 0.15s forwards;
}

.aptly-careers-hero-section .aptly-hero-description {
  opacity: 0;
  transform: translateY(80px);
  animation: aptlyHeroSlideUpFade 0.6s ease-out 0.25s forwards;
}

@keyframes aptlyHeroSlideUpFade {
  from {
    opacity: 0;
    transform: translateY(80px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.aptly-careers-right {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 100%;
}

.aptly-roles-container {
  position: relative;
  width: 520px;
  height: 560px;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  justify-items: center;
  align-items: center;
  row-gap: 28px;
  column-gap: 48px;
}

.aptly-connections {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.aptly-role-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  color: #1a1a1a;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  z-index: 5;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.aptly-role-card span {
  min-width: 0;
  display: block;
  text-align: center;
  width: 100%;
}

.aptly-role-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 12px 28px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
  background: #fff;
}

.aptly-role-business {
  grid-column: 1;
  grid-row: 1;
  transform: translateX(20px);
}

.aptly-role-business:hover {
  transform: translateX(20px) translateY(-3px);
}

.aptly-role-designers {
  grid-column: 3;
  grid-row: 1;
  transform: translateX(-20px);
}

.aptly-role-designers:hover {
  transform: translateX(-20px) translateY(-3px);
}

.aptly-role-qa {
  grid-column: 1;
  grid-row: 2;
}

.aptly-role-qa:hover {
  transform: translateY(-3px);
}

.aptly-role-software {
  grid-column: 3;
  grid-row: 2;
}

.aptly-role-software:hover {
  transform: translateY(-3px);
}

.aptly-role-hr {
  grid-column: 1;
  grid-row: 3;
  transform: translateX(20px);
}

.aptly-role-hr:hover {
  transform: translateX(20px) translateY(-3px);
}

.aptly-role-finance {
  grid-column: 3;
  grid-row: 3;
  transform: translateX(-20px);
}

.aptly-role-finance:hover {
  transform: translateX(-20px) translateY(-3px);
}

.aptly-hub-center {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  z-index: 10;
}

.aptly-hub-box {
  position: relative;
  width: 150px;
  height: 150px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
  border-radius: 40px;
  box-shadow: 0 16px 48px rgba(0, 31, 92, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: aptlyHubFloat 4s ease-in-out infinite;
  z-index: 2;
}

.aptly-hub-box::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 46px;
  padding: 6px;
  background: linear-gradient(135deg, var(--career-accent-deep) 0%, var(--career-accent) 50%, #08BBD2 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.9;
}

.aptly-hub-box::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 188, 212, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.aptly-icon-wrapper {
  width: 78%;
  height: 78%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aptly-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes aptlyHubFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Tablet: scale down right section to fit */
@media (max-width: 1024px) {
  .aptly-careers-right {
    padding-left: 1rem;
  }

  .aptly-roles-container {
    width: 420px;
    height: 450px;
    row-gap: 20px;
    column-gap: 32px;
  }

  .aptly-role-card {
    padding: 14px 20px;
    font-size: 0.875rem;
  }

  .aptly-role-business {
    transform: translateX(14px);
  }

  .aptly-role-business:hover {
    transform: translateX(14px) translateY(-3px);
  }

  .aptly-role-designers {
    transform: translateX(-14px);
  }

  .aptly-role-designers:hover {
    transform: translateX(-14px) translateY(-3px);
  }

  .aptly-role-hr {
    transform: translateX(14px);
  }

  .aptly-role-hr:hover {
    transform: translateX(14px) translateY(-3px);
  }

  .aptly-role-finance {
    transform: translateX(-14px);
  }

  .aptly-role-finance:hover {
    transform: translateX(-14px) translateY(-3px);
  }

  .aptly-hub-box {
    width: 120px;
    height: 120px;
    border-radius: 32px;
  }

  .aptly-hub-box::before {
    inset: -5px;
    border-radius: 37px;
    padding: 5px;
  }
}

@media (max-width: 768px) {
  .aptly-careers-right {
    display: flex;
    padding-left: 0;
    padding-top: 2rem;
    min-height: 0;
    text-align: center;
  }

  .aptly-careers-right .aptly-role-card,
  .aptly-careers-right .aptly-role-card span {
    text-align: center;
  }

  .aptly-careers-wrapper {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 0;
  }

  .aptly-careers-hero-section {
    height: auto;
    min-height: 100vh;
  }

  .aptly-hero-heading {
    font-size: 38px;
    margin-bottom: 32px;
    line-height: 1.4;
    margin-left: 0;
  }

  .aptly-hero-description {
    font-size: 20px;
    line-height: 1.8;
  }

  .grid-line,
  .aptly-careers-bg-overlay {
    display: none;
  }

  /* Compact right section: smaller grid, centered */
  .aptly-roles-container {
    width: 100%;
    max-width: 340px;
    height: 380px;
    margin: 0 auto;
    row-gap: 14px;
    column-gap: 24px;
  }

  .aptly-role-card {
    padding: 12px 16px;
    font-size: 0.8125rem;
    line-height: 1.2;
  }

  .aptly-role-business {
    transform: translateX(10px);
  }

  .aptly-role-business:hover {
    transform: translateX(10px) translateY(-3px);
  }

  .aptly-role-designers {
    transform: translateX(-10px);
  }

  .aptly-role-designers:hover {
    transform: translateX(-10px) translateY(-3px);
  }

  .aptly-role-hr {
    transform: translateX(10px);
  }

  .aptly-role-hr:hover {
    transform: translateX(10px) translateY(-3px);
  }

  .aptly-role-finance {
    transform: translateX(-10px);
  }

  .aptly-role-finance:hover {
    transform: translateX(-10px) translateY(-3px);
  }

  .aptly-hub-box {
    width: 90px;
    height: 90px;
    border-radius: 24px;
  }

  .aptly-hub-box::before {
    inset: -4px;
    border-radius: 28px;
    padding: 4px;
  }
}

@media (max-width: 480px) {
  .aptly-hero-heading {
    font-size: 28px;
  }

  .aptly-hero-description {
    font-size: 15px;
    line-height: 1.8;
  }

  .aptly-roles-container {
    max-width: 300px;
    height: 340px;
    row-gap: 10px;
    column-gap: 18px;
  }

  .aptly-role-card {
    padding: 10px 12px;
    font-size: 0.75rem;
  }

  .aptly-role-business {
    transform: translateX(8px);
  }

  .aptly-role-business:hover {
    transform: translateX(8px) translateY(-3px);
  }

  .aptly-role-designers {
    transform: translateX(-8px);
  }

  .aptly-role-designers:hover {
    transform: translateX(-8px) translateY(-3px);
  }

  .aptly-role-hr {
    transform: translateX(8px);
  }

  .aptly-role-hr:hover {
    transform: translateX(8px) translateY(-3px);
  }

  .aptly-role-finance {
    transform: translateX(-8px);
  }

  .aptly-role-finance:hover {
    transform: translateX(-8px) translateY(-3px);
  }

  .aptly-hub-box {
    width: 72px;
    height: 72px;
    border-radius: 20px;
  }

  .aptly-hub-box::before {
    inset: -3px;
    border-radius: 23px;
    padding: 3px;
  }
}
