/* Hero section */
.careers-hero {
  position: absolute;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
}

.careers-hero .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* UnicornStudio Animation Styles for careers hero */
.careers-hero .unicorn-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.careers-hero .unicorn-canvas {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
}

/* Responsive adjustments for careers UnicornStudio canvas */
.careers-hero .unicorn-canvas > div {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

.careers-hero .unicorn-canvas canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
.careers-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 1);
  z-index: -1;
}

.careers-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.careers-hero .text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 888;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
}

/* Animation Loading States */
.animation-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-skeleton {
  width: 200px;
  height: 100px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 75%
  );
  background-size: 200% 100%;
  border-radius: 8px;
  animation: shimmer 2s infinite ease-in-out;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Smooth transitions for animations */
.unicorn-animation {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.unicorn-animation.loaded {
  opacity: 1;
}

/* Enhanced transitions for static images */
.hero-img {
  transition: opacity 0.3s ease-in-out;
}

/* Fallback for failed animations */
.js-fallback-active {
  display: block !important;
  opacity: 1 !important;
}

/* Enhanced animation loading states */
.animation-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Fallback for failed animations */
.js-fallback-active {
  display: block !important;
  opacity: 1 !important;
}

/* JavaScript state classes for careers */
.js-disabled .js-enabled-only {
  display: none !important;
}

.js-disabled .js-disabled-only {
  display: block;
}

body:not(.js-disabled) .js-disabled-only {
  display: none !important;
}

body:not(.js-disabled) .js-enabled-only {
  display: block;
}
.careers-hero .text .title {
  font-weight: 400;
  font-size: 1.5rem;
  margin-bottom: 4rem;
}
.careers-hero .text .description {
  font-weight: 400;
  font-size: 2.506rem;
  line-height: 140%;
  max-width: 60%;
}

/* Open Roles section */
.careers-open-roles {
  margin-top: 100vh;
  padding: 10rem 4.5rem 12rem 4.5rem;
  min-height: 100vh;
}
.careers-open-roles .title {
  text-align: center;
  font-size: 2.625rem;
  font-weight: 400;
  margin-bottom: 4rem;
}
.careers-open-roles .roles-list {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  max-width: 70%;
  margin: 0 auto;
}
.careers-open-roles .role-card {
  border: 0.5px solid #000000;
  position: relative;
  padding: 1.5rem 2.438rem;
  transition: transform 0.3s cubic-bezier(0.77, 0.2, 0.25, 1);
}
.careers-open-roles .role-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: -7.5rem;
  width: 7.5rem;
  height: 100%;
  pointer-events: auto;
}
.careers-open-roles .role-card .role-main {
  flex: 1;
  padding: 2.2rem 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
.careers-open-roles .role-title,
.careers-open-roles .role-desc {
  flex: 0.5;
  line-height: 140%;
  opacity: 0.7;
}
.careers-open-roles .role-title {
  font-size: 1.563rem;
}
.careers-open-roles .role-desc {
  font-size: 1.063rem;
}
.careers-open-roles .role-apply {
  position: absolute;
  right: -7.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 6.5rem;
  height: 2.5rem;
  font-family: "Havelock Titling", sans-serif;
  font-size: 1.063rem;
  font-weight: 400;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.77, 0.2, 0.25, 1);
  z-index: 10;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.careers-open-roles .role-card:hover,
.careers-open-roles .role-card:focus-within {
  transform: translateX(-4rem) translateY(0);
  z-index: 2;
}
.careers-open-roles .role-card:hover .role-apply,
.careers-open-roles .role-card:focus-within .role-apply {
  opacity: 1;
  pointer-events: auto;
}

/* ========================================
   RESPONSIVE DESIGN - CAREERS PAGE
======================================== */

/* Tablet and small desktop styles */
@media screen and (max-width: 1024px) {
  .careers-hero .text .title {
    font-size: 1.4rem;
    margin-bottom: 3rem;
  }

  .careers-hero .text .description {
    font-size: 2.2rem;
    max-width: 70%;
  }

  /* Tablet adjustments for UnicornStudio */
  .careers-hero .unicorn-canvas {
    width: 100%;
    height: 100vh;
  }

  .careers-hero .unicorn-canvas > div {
    width: 100% !important;
    height: 100vh !important;
  }

  .careers-open-roles {
    padding: 8rem 3rem 10rem 3rem;
  }

  .careers-open-roles .title {
    font-size: 2.2rem;
    margin-bottom: 3rem;
  }

  .careers-open-roles .roles-list {
    max-width: 80%;
  }

  #careers-content .home-contacts {
    max-width: 80%;
  }

  #careers-content .home-contacts .content-container {
    padding: 3.5rem 2rem;
  }

  .careers-open-roles .role-card {
    padding: 1.3rem 2rem;
  }

  .careers-open-roles .role-card::after {
    right: -6rem;
    width: 6rem;
  }

  .careers-open-roles .role-apply {
    right: -6rem;
    width: 5.5rem;
  }

  .careers-open-roles .role-card:hover,
  .careers-open-roles .role-card:focus-within {
    transform: translateX(-3rem) translateY(0);
  }
}

/* Mobile styles */
@media screen and (max-width: 768px) {
  /* Hero Section */
  .careers-hero .text .title {
    font-size: 1.2rem;
    margin-bottom: 2rem;
  }

  .careers-hero .text .description {
    font-size: 1.6rem;
    max-width: 90%;
    line-height: 1.3;
  }

  /* Mobile responsive adjustments for UnicornStudio */
  .careers-hero .unicorn-animation {
    padding: 0;
  }

  .careers-hero .unicorn-canvas {
    min-height: 100vh;
  }

  .careers-hero .unicorn-canvas > div {
    min-height: 100vh !important;
  }

  /* Open Roles Section */
  .careers-open-roles {
    padding: 6rem 1.5rem 8rem 1.5rem;
    margin-top: 100vh;
  }

  .careers-open-roles .title {
    font-size: 1.8rem;
    margin-bottom: 3rem;
  }

  .careers-open-roles .roles-list {
    max-width: 100%;
    gap: 1.5rem;
  }

  #careers-content .home-contacts {
    max-width: 100%;
    text-align: left;
    padding: 0 0 4rem 0;
  }

  #careers-content .home-contacts .content-container {
    margin-top: 3rem;
    margin-left: 0;
    margin-right: 0;
    padding: 3rem 2rem !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
  }

  #careers-content .home-contacts .action-contact {
    width: 100%;
    flex-direction: column !important;
    gap: 1rem !important;
  }

  #careers-content .home-contacts .action-contact .contact,
  #careers-content .home-contacts .action-contact .download-pgp-key {
    flex: none !important;
    width: 100% !important;
  }

  #careers-content .home-contacts .download-pgp-key a {
    font-size: 1rem;
  }

  #careers-content .home-contacts .contact a {
    font-size: 1.2rem;
  }

  /* Redesign role cards for mobile */
  .careers-open-roles .role-card {
    padding: 1.5rem;
    position: relative;
    border: 0.5px solid #000000;
    transition: none;
  }

  .careers-open-roles .role-card::after {
    display: none;
  }

  .careers-open-roles .role-card .role-main {
    padding: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .careers-open-roles .role-title {
    flex: none;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }

  .careers-open-roles .role-desc {
    flex: none;
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  /* Mobile apply button */
  .careers-open-roles .role-apply {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    width: auto;
    height: auto;
    background: #0ab692;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
    align-self: flex-start;
    transition: background-color 0.3s ease;
  }

  .careers-open-roles .role-apply:hover {
    background: #089e7e;
  }

  /* Remove desktop hover effects */
  .careers-open-roles .role-card:hover,
  .careers-open-roles .role-card:focus-within {
    transform: none;
  }
}

/* Small mobile styles */
@media screen and (max-width: 480px) {
  .careers-hero .text .title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }

  .careers-hero .text .description {
    font-size: 1.3rem;
    max-width: 95%;
  }

  /* Small mobile adjustments for UnicornStudio */
  .careers-hero .unicorn-canvas {
    min-height: 100vh;
  }

  .careers-hero .unicorn-canvas > div {
    min-height: 100vh !important;
  }

  .careers-open-roles {
    padding: 4rem 1rem 6rem 1rem;
  }

  .careers-open-roles .title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }

  .careers-open-roles .roles-list {
    gap: 1.2rem;
  }

  .careers-open-roles .role-card {
    padding: 1.2rem;
  }

  .careers-open-roles .role-title {
    font-size: 1.2rem;
  }

  .careers-open-roles .role-desc {
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
  }

  .careers-open-roles .role-apply {
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
  }

  #careers-content .home-contacts {
    padding: 0 0 3rem 0;
  }

  #careers-content .home-contacts .content-container {
    margin-left: 0;
    margin-right: 0;
    padding: 2.5rem 1.5rem !important;
    width: 100%;
  }

  #careers-content .home-contacts .action-contact {
    flex-direction: column !important;
    gap: 1rem !important;
  }

  #careers-content .home-contacts .action-contact .contact,
  #careers-content .home-contacts .action-contact .download-pgp-key {
    flex: none !important;
    width: 100% !important;
  }
}

/* Home contacts section alignment with role cards */
#careers-content .home-contacts {
  max-width: 70%;
  margin: 0 auto;
  text-align: center;
}

/* Replicate home-partners styling exactly */
#careers-content .home-contacts .content-container {
  margin-top: 3.5rem;
  position: relative;
  border: 1px solid #cecece;
  padding: 5rem 3rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

#careers-content .home-contacts .action-contact {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  width: 100%;
  align-items: flex-start;
}

#careers-content .home-contacts .action-contact .contact,
#careers-content .home-contacts .action-contact .download-pgp-key {
  flex: 1;
}

#careers-content .home-contacts .contact a {
  font-size: 1.6rem;
  color: #000;
  line-height: 140%;
}

#careers-content .home-contacts .download-pgp-key {
  display: flex;
  gap: 0.5rem;
}

#careers-content .home-contacts .contact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#careers-content .home-contacts .contact .content {
  display: flex;
  flex-direction: column;
}

#careers-content .home-contacts .contact .label {
  font-size: 0.875rem;
  opacity: 0.5;
  line-height: 140%;
  margin: 0;
}

#careers-content .home-contacts .download-pgp-key .label {
  font-size: 0.875rem;
  opacity: 0.5;
  line-height: 140%;
}

#careers-content .home-contacts .download-pgp-key a {
  font-size: 1rem;
  color: #000;
  line-height: 140%;
}

#careers-content .home-contacts .download-pgp-key-button {
  margin-top: 0.5rem;
  width: auto;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 0.563rem 1.375rem;
  gap: 0.5rem;
  background: #f6f6f6;
  border: 0.5px solid #000000;
  line-height: 140%;
  font-weight: 400;
  opacity: 0.7;
}

/* ========================================
   LARGE SCREEN OPTIMIZATION (1900px+)
======================================== */
@media screen and (min-width: 1900px) {
  /* Hero section optimization */
  .careers-hero .text {
    margin: 0 auto;
    padding: 0 6rem;
    width: 100%;
  }

  .careers-hero .text .description {
    max-width: 1200px;
    margin: 0 auto;
  }

  /* Open roles section optimization */
  .careers-open-roles {
    max-width: 1800px;
    margin: 100vh auto 0;
    padding: 10rem 6rem 12rem;
  }

  .careers-open-roles .roles-list {
    max-width: 1400px;
  }

  #careers-content .home-contacts {
    max-width: 1400px;
  }

  .careers-open-roles .role-card {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 3rem;
  }

  .careers-open-roles .role-card .role-main {
    padding: 2.5rem 3rem;
    max-width: 1000px;
    margin: 0 auto;
  }

  /* Typography optimization for large screens */
  .careers-hero .text .title {
    font-size: 1.6rem;
  }

  .careers-hero .text .description {
    font-size: 2.6rem;
  }

  .careers-open-roles .title {
    font-size: 2.8rem;
    max-width: 1200px;
    margin: 0 auto 4rem;
  }

  .careers-open-roles .role-title {
    font-size: 1.7rem;
  }

  .careers-open-roles .role-desc {
    font-size: 1.1rem;
  }

  .careers-open-roles .role-apply {
    width: 7rem;
    height: 2.8rem;
    font-size: 1.1rem;
    right: -8rem;
  }

  .careers-open-roles .role-card::after {
    right: -8rem;
    width: 8rem;
  }

  .careers-open-roles .role-card:hover,
  .careers-open-roles .role-card:focus-within {
    transform: translateX(-4.5rem) translateY(0);
  }

  /* UnicornStudio canvas optimization for large screens */
  .careers-hero .unicorn-canvas {
    max-width: 2400px;
    margin: 0 auto;
  }

  /* Animation loading optimization */
  .animation-loading {
    max-width: 2400px;
    margin: 0 auto;
  }
}
