/* ================================================
   CAREERS — VARIABILI & ROOT
   ================================================ */
:root {
  --red: #e9530e;
  --yellow: rgb(241, 195, 42);
}

/* ================================================
   ANIMAZIONI
   ================================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}

/* ================================================
   HERO
   ================================================ */
#careers-hero {
  min-height: 92vh;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 60px 10%;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  width: 100%;
  height: 100%;
  z-index: -1;
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: 100% center; 
  transform: scale(1.3);
  transform-origin: left center;
}

@media (max-width: 600px) {
  .hero-bg {
    object-position: center;
  }
}

.careers-hero-container {
  display: flex;
  gap: 4rem;
  align-items: center;
  justify-content: center;
}

.careers-hero-badge {
  display: inline-block;
  background: var(--black);
  color: var(--yellow-primary);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  animation: fadeUp 0.5s ease both;
  animation-delay: 0.1s;
}

.careers-heading {
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.25s;
}

.careers-hero-content h1 {
  display: flex;
  color: #ffffff;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.808);
  font-size: 5rem;
}

.careers-hero-content h3 {
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.35s;
}

.careers-hero h2,
.heading-CHI,
.heading-AMA {
  font-size: 4rem;
  line-height: 1.1;
  color: var(--black);
}

.heading-CHI {
  color: var(--yellow-primary);
}
.heading-AMA {
  color: var(--orange-primary);
}

.careers-hero h2 span {
  display: block;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  margin-top: 12px;
  font-weight: 500;
  line-height: 1.4;
}

h3 span {
  color: var(--orange-primary);
  text-shadow: -1px 2px 0px rgba(0, 0, 0, 0.541);
}

.careers-hero-description {
  font-size: clamp(1.2rem, 1.5vw, 1.25rem);
  max-width: 600px;
  color: rgb(255, 255, 255);
  text-shadow:
    2px 2px 10px #000,
    2px 2px 10px #000;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.4s;
}

.careers-hero-visual {
  width: 25%;
}

span::after {
  display: none;
}

/* ================================================
   BOTTONI HERO
   ================================================ */
.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.careers-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.55s;
}

.btn {
  padding: 0.9rem 1.6rem;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: all 0.25s ease;
}

.btn:nth-child(1) {
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
  animation-delay: 0.6s;
}

.btn:nth-child(2) {
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
  animation-delay: 0.72s;
}

.btn-primary {
  background: #e9530e;
  color: #fff;
  border: 0;
  max-height: 54px;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(233, 83, 14, 0.25);
  border: 0;
}

.btn-company-profile {
  border: 1px solid #ddd;
  color: #333;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  box-shadow: none;
}

.btn-company-profile:hover {
  border-color: #e9530e;
  color: #e9530e;
  background: var(--white);
  box-shadow: 0 10px 25px rgba(233, 83, 14, 0.25);
  transform: translateY(-2px);
}

.btn-primary-careers {
  width: 40%;
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  text-align: center;
  margin-top: 15px;
}

.btn-primary-careers-form,
.btn-primary-careers-cta {
  width: 30%;
  padding: 1rem 1.5rem;
  font-size: 0.8rem;
  margin-top: 15px;
  text-align: center;
}

.btn-primary:disabled {
    background: linear-gradient(135deg, var(--red-accent) 0%, var(--orange-primary) 100%) !important;
    border-color: var(--orange-primary) !important;
    color: #fff !important;
    opacity: 1;
}

.careers-buttons .btn-primary-careers:nth-child(1),
.careers-buttons .btn-primary-careers-cta:nth-child(1) {
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
  animation-delay: 0.6s;
}

.careers-buttons .btn-primary-careers:nth-child(2),
.careers-buttons .btn-primary-careers-form:nth-child(1) {
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
  animation-delay: 0.72s;
}

.careers-buttons .btn-primary-careers:nth-child(3),
.careers-buttons .btn-primary-careers-form:nth-child(2) {
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
  animation-delay: 0.84s;
}

/* ================================================
   BENEFITS
   ================================================ */
#careers-benefits {
  padding: 60px 10%;
  background: var(--white);
}

.careers-benefits-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.careers-benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.benefit-card {
  padding: 2rem;
  background: var(--gray-light);
  border-radius: 20px;
  border: 1px solid var(--gray-medium);
  display: flex;
  flex-direction: column;
  width: 100%;
  opacity: 0;
  transition: all 0.3s ease;
  animation: fadeUp 0.55s ease forwards;
}

.benefit-card:nth-child(1) {
  animation-delay: 0.1s;
}
.benefit-card:nth-child(2) {
  animation-delay: 0.2s;
}
.benefit-card:nth-child(3) {
  animation-delay: 0.3s;
}
.benefit-card:nth-child(4) {
  animation-delay: 0.4s;
}
.benefit-card:nth-child(5) {
  animation-delay: 0.5s;
}
.benefit-card:nth-child(6) {
  animation-delay: 0.6s;
}

.benefit-card:hover {
  transform: translateY(-8px);
  background: var(--white);
  box-shadow: 0 15px 35px rgba(233, 83, 14, 0.1);
  border-color: var(--orange-primary);
}

.benefit-card-icon {
  width: 50px;
  height: 50px;
  color: var(--orange-primary);
  margin-bottom: 1.5rem;
}

.benefit-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--black);
  line-height: 1.3;
}

/* ================================================
   REQUIREMENTS
   ================================================ */
#careers-requirements {
  padding: 60px 10%;
  background: var(--gray-light);
  border: none;
  overflow: visible;
}

.requirements-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 50px auto;
  border-radius: 20px;
  overflow: visible;
}

.requirements-card {
  background: var(--white);
  padding: clamp(1.5rem, 5vw, 3rem);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  overflow: visible;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.15s;
}

.container-card-title {
  display: flex;
  flex-direction: row;
  gap: 10rem;
}

/* ================================================
   FORM
   ================================================ */
.careers-form-section {
  padding: 60px 10%;
  max-width: 1400px;
  margin: 60px auto;
  width: 80%;
  background-color: #ffffff;
  border-radius: 20px;
  border: 1px solid var(--gray-medium, #e0e0e0);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.04),
    0 12px 40px rgba(233, 83, 14, 0.08);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.2s;
}

#careers-hero {
  padding-block: 0;
}

.careers-form-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--orange-primary, #e9530e),
    var(--yellow-primary, #f9af17)
  );
  border-radius: 20px 20px 0 0;
}

.careers-form input,
.careers-form select,
.careers-form textarea {
  padding: 0.9rem 1.2rem;
  border: 2px solid var(--gray-medium);
  border-radius: 12px;
  width: 100%;
  font-size: 1rem;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 1.5rem 0 2rem;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--orange-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-group label {
  font-size: 0.9rem;
  color: var(--gray-text);
  cursor: pointer;
  line-height: 1.5;
  margin: 0;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.checkbox-group label a {
  color: var(--orange-primary);
  text-decoration: none;
  font-weight: 600;
  text-transform: none;
}

.checkbox-group label a:hover {
  text-decoration: underline;
}

.field-error {
  display: block;
  color: red;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.careers-form .input-error,
.submitForm .input-error {
  border-color: red;
  outline: none;
}

.careers-cta {
  margin-bottom: 10px;
}

/* ================================================
   TAB JOBS
   ================================================ */
.tab-jobs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0 auto 2.5rem;
  padding: 0.4rem;
  max-width: fit-content;
  background: var(--white);
  border-radius: 9999px;
  animation: fadeIn 0.5s ease both;
  animation-delay: 0.1s;
}

.tab-job-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray-text);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.tab-job-item:hover {
  color: var(--red);
  background: rgba(233, 83, 14, 0.08);
  transform: translateY(-1px);
}

.tab-job-item.active,
.tab-job-item[aria-selected="true"] {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(233, 83, 14, 0.35);
}

.tab-job-item.active::after,
.tab-job-item[aria-selected="true"]::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: var(--yellow);
  border-radius: 50%;
  opacity: 0.9;
}

.tab-job-item:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.tab-job-item svg {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
  flex-shrink: 0;
  stroke: currentColor;
  transition: stroke 0.2s ease;
}

/* ================================================
   CAREERS GRID
   ================================================ */
#careersGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
}

.careers-empty,
.news-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-text);
  font-size: 1.1rem;
  grid-column: 1 / -1;
}

.news-empty {
  font-size: 1rem;
}

/* ================================================
   CAREERS ITEM
   ================================================ */
.careers-item {
  background: var(--white);
  border-radius: 20px;
  padding: 0.75rem !important;
  border: 1px solid var(--gray-medium) !important;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  overflow: visible;
  opacity: 0;
  transition: all 0.3s ease;
  animation: slideInLeft 0.45s ease forwards;
}

.careers-item:nth-child(1) {
  animation-delay: 0.05s;
}
.careers-item:nth-child(2) {
  animation-delay: 0.12s;
}
.careers-item:nth-child(3) {
  animation-delay: 0.19s;
}
.careers-item:nth-child(4) {
  animation-delay: 0.26s;
}
.careers-item:nth-child(5) {
  animation-delay: 0.33s;
}
.careers-item:nth-child(6) {
  animation-delay: 0.4s;
}

.careers-item:last-child {
  border-bottom: none;
}

.careers-item p {
  align-self: center;
}

.careers-item--expanded {
  background: #ffffff;
  flex-direction: column;
}

.careers-item-header {
  margin-bottom: 1.5rem;
}

.careers-description {
  font-size: 0.95rem;
  color: var(--gray-text);
  line-height: 1.6;
}

/* Titolo */
.careers-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--black);
  margin: 0 10px;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.careers-item--expanded .careers-name {
  color: var(--orange-primary);
  border-bottom: 2px solid var(--red);
}

/* Bottone espandi */
.expand-career {
  max-width: 50px;
  padding: 0.9rem 1.5rem;
  background: none !important;
  border: none;
  border-radius: 12px;
  color: var(--black);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.expand-career:hover,
.expand-career[aria-expanded="true"] {
  background: none !important;
  border: none;
  color: var(--black);
}

.expand-icon {
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease;
}

.expand-career[aria-expanded="true"] .expand-icon {
  transform: rotate(180deg);
}

/* Icone su/giù */
.careers-item--expanded .icon-up {
  display: none;
}
.careers-item .icon-up {
  display: visible;
}
.careers-item .icon-down {
  display: none;
}
.careers-item--expanded .icon-down {
  display: flex;
  align-self: center;
  justify-self: center;
}

/* ================================================
   CAREERS DETAILS (accordion)
   ================================================ */
.careers-details {
  gap: 4rem;
  margin: 2rem 1rem;
  grid-column: span 2;
}

.careers-content {
  display: grid;
  padding-inline: 5%;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: start;
}

.careers-content .overview-container {
  grid-column: span 2;
  /* text-align: center; */
}

.careers-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a202c;
  margin: 1.5rem 0 0.75rem 0;
  border-bottom: 3px solid var(--yellow);
  display: inline-block;
}

.careers-content p {
  font-size: 1.1rem;
  color: #4a5568;
  line-height: 1.6;
}

.careers-content ul {
  margin: 0.5rem 0 1rem 0;
  padding-left: 1.5rem;
}

.careers-content li {
  font-size: 1rem;
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 0.4rem;
}

/* Pannello destra */
#right {
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  border: 2px solid #f0f0f0;
  border-radius: 16px;
  padding: 1.5rem;
  min-height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin: auto 0;
  align-items: center;
  justify-content: center;
}

#left {
  gap: 1rem;
}

/* Dettagli */
.careers-detail-item {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #2d3748;
  gap: 0 !important;
  margin: 0 !important;
}

.careers-detail-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.careers-detail-item-strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--red) !important;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-family: var(--lato);
  padding: 20px 0 10px 0;
  margin: 0 !important;
}

.careers-detail-item-span {
  font-size: 1.05rem;
  color: var(--yellow) !important;
  font-weight: 700;
  display: block;
  margin: -10px 0 0 0;
  font-family: var(--lato);
}

/* Grid dettagli + bottone */
.careers-content-details {
  grid-column: span 2;
  display: flex;
  justify-content: space-around;
  align-items: center;
  row-gap: 3rem;
}

.careers-content-details div {
  text-align: center;
}

.careers-btn-container {
  grid-column: span 2;
  display: flex;
  justify-content: center;
}
.careers-btn-container a {
  width: 300px;
  align-self: center;
  max-width: 100%;
}

/* Bottone CTA interno */
.careers-button {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 1rem 1.5rem;
  background: var(--red);
  color: #fff;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  align-self: center;
  grid-column: span 3;
}

.careers-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ================================================
   CAREER DETAIL (pagina dedicata)
   ================================================ */
.career-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.career-detail-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--gray-light);
}

.career-detail-section h3 {
  font-size: 1.3rem;
  color: var(--black);
  margin-bottom: 1.25rem;
}

.career-detail-section ul {
  list-style: none;
  padding: 0;
}

.career-detail-section li {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  position: relative;
  color: var(--gray-text);
}

.career-detail-section li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--orange-primary);
  font-weight: 700;
}

/* ================================================
   TABLET MOCKUP
   ================================================ */
.tablet-outer {
  width: 396px;
  background: #1a1a1a;
  border-radius: 36px;
  padding: 18px 14px 22px;
  border: 1px solid #333;
  position: relative;
  box-sizing: border-box;
}

.tablet-camera {
  width: 8px;
  height: 8px;
  background: #2e2e2e;
  border-radius: 50%;
  border: 1px solid #404040;
  margin: 0 auto 10px;
}

.tablet-screen {
  width: 368px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  position: relative;
}

.tablet-home {
  width: 100px;
  height: 8px;
  background: #444;
  border-radius: 4px;
  margin: 12px auto 0;
}

.slider-wrapper {
  width: 600px;
  overflow: hidden;
}

.slider {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.18, 1);
}

.slider div {
  width: 368px;
  height: 654px;
  flex-shrink: 0;
  overflow: hidden;
}

.slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================================================
   ACCESSIBILITÀ
   ================================================ */
.careers-item:focus-within,
.expand-career:focus-visible,
.tab-job-item:focus-visible {
  outline: 2px solid var(--orange-primary);
  outline-offset: 2px;
  border-radius: 12px;
}



/* ================================================
   RESPONSIVE — 1400px
   ================================================ */
@media (max-width: 1400px) {
  .careers-benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================================================
   RESPONSIVE — 1024px
   ================================================ */
@media (max-width: 1024px) {
  #careers-hero {
    min-height: 700px;
    justify-content: center;
  }

  .careers-hero-container {
    gap: 2rem;
    padding-block: 0;
    width: 100%;
  }

  .careers-hero-content {
    padding-block: 2rem;
    width: 100%;
    position: relative;
  }

  .careers-hero-content::before {
    position: absolute;
    backdrop-filter: blur(4px);
    opacity: 0.4;
    content: "";
    background: rgba(255, 255, 255, 0.295);
    width: 108%;
    height: 100%;
    transform: translateX(-4%);
    left: 0;
    top: 0;
    border-radius: 30px;
    z-index: 0;
  }

  .careers-heading--span {
    font-size: 4.5rem;
  }

  .careers-buttons {
    flex-wrap: wrap;
  }

  .careers-item {
    padding: 1.25rem 1.5rem;
    gap: 0.75rem;
  }

  .expand-career {
    max-width: 180px;
    font-size: 1rem;
  }

  .careers-details:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .btn-primary-careers,
  .btn-primary-careers-form,
  .btn-primary-careers-cta {
    width: auto;
    min-width: 180px;
    flex: 1;
    max-width: 220px;
  }
}

/* ================================================
   RESPONSIVE — 991px
   ================================================ */
@media (max-width: 991px) {
  #careers-hero {
    background-size: cover;
    background-position: center;
  }

  .careers-hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 0 1.5rem;
  }

  .careers-heading {
    justify-content: center;
  }

  .careers-hero-badge,
  .careers-hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .careers-hero-visual {
    display: none;
  }

  .careers-buttons {
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }

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

  #right {
    flex-direction: row;
    justify-self: center;
    position: static;
    padding: 1.5rem;
    margin: 0;
  }
}

/* ================================================
   RESPONSIVE — 768px
   ================================================ */
@media (max-width: 768px) {
  #careers-hero,
  #careers-benefits,
  #careers-requirements {
    padding: 60px 5%;
  }

  .careers-form-section {
    padding: 60px 5%;
    width: 80%;
    margin: 40px auto;
  }

  .careers-hero {
    min-height: auto;
    padding-bottom: 2rem;
  }

  .careers-hero h2 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .careers-hero h2 span {
    font-size: 1rem;
    margin-top: 8px;
  }

  .careers-hero-description {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary-careers,
  .btn-primary-careers-form,
  .btn-primary-careers-cta {
    width: 100%;
    max-width: 300px;
  }

  .careers-content {
    grid-template-columns: 1fr;
  }

  .careers-content div {
    grid-column: span 2;
    grid-template-rows: repeat(3, 1fr);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .careers-benefits-grid {
    display: flex;
    flex-direction: column;
  }

  .benefit-card {
    padding: 1.5rem;
    text-align: center;
  }

  .benefit-card-icon {
    margin: 0 auto 1rem;
  }

  .requirements-grid {
    padding: 0 1rem;
  }

  .careers-item {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    padding: 1rem 1.25rem;
    text-align: left;
  }

  .careers-name {
    grid-column: 1 / -1;
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
  }

  .expand-career {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
    max-width: none;
    margin-top: 0.5rem;
    font-size: 1rem;
    padding: 0.8rem 1rem;
  }

  .expand-icon {
    width: 24px;
    height: 24px;
  }

  .careers-details:not([hidden]) {
    display: flex;
    flex-direction: column;
  }

  #right {
    position: static;
    padding: 1.25rem;
    margin: 0;
  }

  .careers-detail-item-strong {
    font-size: 1.05rem;
  }
  .careers-detail-item-span {
    font-size: 0.95rem;
    margin-top: -0.5rem;
  }

  .careers-form .form-group {
    margin-bottom: 1.25rem;
  }

  .careers-form input,
  .careers-form select,
  .careers-form textarea {
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }

  .checkbox-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
  }

  .tab-jobs::-webkit-scrollbar {
    display: none;
  }

  .tab-job-item {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .careers-content-details {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
    justify-items: start;
  }

  .careers-button {
    grid-column: unset;
  }

  .btn {
    width: 60%;
  }
}

/* ================================================
   RESPONSIVE — 640px
   ================================================ */
@media (max-width: 640px) {
  .tab-jobs {
    max-width: 100%;
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    flex-wrap: nowrap;
    justify-content: center;
    border-radius: 9999px;
    padding: 0.4rem 0.75rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .careers-content-details {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
    justify-items: start;
  }

  .careers-button {
    grid-column: unset;
  }
}

/* ================================================
   RESPONSIVE — 480px
   ================================================ */
@media (max-width: 480px) {
  .careers-hero h2,
  .heading-CHI,
  .heading-AMA {
    font-size: 1.8rem;
  }

  .careers-hero {
    padding: 1rem 0;
  }
  .careers-hero-container {
    padding: 0;
  }
  .careers-hero-content {
    padding: 1rem;
  }

  .careers-hero-badge {
    font-size: 0.7rem;
    padding: 0.4rem 1rem;
  }

  .role-description {
    font-size: 0.95rem;
  }

  .careers-item {
    padding: 0.875rem 1rem;
    border-radius: 16px;
  }

  .careers-name {
    font-size: 1.05rem;
    line-height: 1.25;
  }

  .expand-career {
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
    min-height: 44px;
  }

  .expand-icon {
    width: 22px;
    height: 22px;
  }

  .careers-detail-item-strong {
    font-size: 1rem;
  }
  .careers-detail-item-span {
    font-size: 0.95rem;
    margin-top: -5px;
  }

  .careers-content h3 {
    font-size: 1.1rem;
  }

  .careers-content p,
  .careers-content li {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .careers-button {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }

   .careers-form-section {
    padding: 60px 5%;
    width: 100%;
  }


  .btn-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
  }

  .careers-content-details {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
    justify-items: start;
  }

  .careers-button {
    grid-column: unset;
  }

  .btn {
    width: 100%;
  }
}

/* ================================================
   RESPONSIVE — 360px
   ================================================ */
@media (max-width: 360px) {
  .careers-hero-container,
  #careers-benefits,
  #careers-requirements,
  .careers-form-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .careers-buttons {
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
  }
}

.tab-jobs-wrapper {
  width: 100%;
  overflow: hidden; /* contiene il track */
  position: relative;
}

.tab-jobs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  padding: 4px 2px;
  scrollbar-width: none;
  box-sizing: border-box;
}

.tab-jobs::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.tab-job-item {
  flex-shrink: 0; /* ← fondamentale: impedisce lo shrink */
  scroll-snap-align: start; /* ← necessario per lo snap */
  white-space: nowrap;
  /* ...resto degli stili */
}

@keyframes scrollfade {
  0% {
    --left-fade: 0;
  }
  10%,
  100% {
    --left-fade: 5rem;
  }
  0%,
  90% {
    --right-fade: 5rem;
  }
  100% {
    --right-fade: 0;
  }
}

.tab-jobs {
  overflow-x: scroll;
  animation: scrollfade;
  animation-timeline: --scrollfade;
  scroll-timeline: --scrollfade x;
}

.tab-jobs-wrapper {
  max-height: 50px;
  border: 1px solid var(--gray-medium);
  border-radius: 20px;
}

/* Aggiungi scroll-padding per allineare lo snap all'area visibile */
.tab-jobs {
  overflow-x: scroll;
  scroll-padding-left: 160px; /* i tab snappano dopo il fade sinistro */
  animation: scrollfade;
  animation-timeline: --scrollfade;
  scroll-timeline: --scrollfade x;
  display: flex;
  justify-content: start;
  flex-wrap: nowrap;
}

/* Il wrapper deve essere position: relative per ancorare i fade */
.tab-jobs-wrapper {
  position: relative; /* ← necessario se non già presente */
  max-height: 60px;
  border: 1px solid var(--gray-medium);
  border-radius: 20px;
  background-color: white;
}

@media (max-width: 768px) {
  .tab-jobs-wrapper {
    max-height: 50px;
  }
}

@media (min-width: 425px) {
  .tab-jobs {
    margin: 0;
    justify-self: center;
  }
  .tab-jobs-wrapper {
    max-width: fit-content;
    justify-self: center;
  }
}

.requirements-grid {
  padding: 0;
}

.expand-career {
  max-width: 50px;
}

.expand-career[aria-expanded="true"]{ display: none; }
.expand-career[aria-expanded="false"]{ display: block; }