/* ==========================================================================
   carriera.css - pagina "Carriera" (lavoro, studi, certificazioni)
   Usa i token di critical.css. Nessuna animazione di scroll: solo stati di
   hover/focus brevi. Senza JS le tre sezioni sono una sotto l'altra.
   ========================================================================== */

/* ---------- Intestazione e schede ---------- */
.career-hero { padding-block: clamp(24px, 4vw, 56px) 0; }
.crumbs { margin-bottom: clamp(16px, 3vw, 32px); font-family: var(--font-display); font-size: 0.875rem; color: var(--ink-60); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 10px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 10px; color: var(--mist); }
.crumbs [aria-current] { color: var(--ink); }
.career-hero .display { margin-bottom: clamp(20px, 3vw, 32px); }

.tabs { display: none; gap: 4px; border-bottom: 1px solid var(--mist); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
html.js-tabs .tabs { display: flex; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 10px; flex: none; min-height: 52px; padding: 12px 20px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--ink-60);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: color 160ms ease;
}
.tab .icon { width: 1.125rem; height: 1.125rem; }
.tab em {
  font-style: normal; font-size: 0.75rem; line-height: 1; padding: 4px 8px; border-radius: 9999px; background: var(--tint); color: var(--ink-60);
}
.tab::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--copper);
  transform: scaleX(0); transition: transform 200ms var(--ease-out);
}
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"] .icon { color: var(--copper); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }
.tab:active { background: var(--tint); }
@media (hover: hover) and (pointer: fine) { .tab:hover { color: var(--ink); } }

/* ---------- Pannelli ---------- */
.career-panels.section { padding-block: clamp(24px, 4vw, 48px) clamp(48px, 7vw, 96px); }
.panel { margin-bottom: clamp(40px, 6vw, 72px); }
.panel[hidden] { display: none; }
html.js-tabs .panel { margin-bottom: 0; }
.panel__title { /* con le schede il titolo e' gia' nella scheda: resta solo per chi non ha JS */
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.25rem); line-height: 1.1; color: var(--ink); margin-bottom: 24px;
}
html.js-tabs .panel__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
.panel__sub { margin: 40px 0 8px; font-family: var(--font-display); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-60); }

/* ---------- Lavoro: righe che si aprono ---------- */
.rows { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--mist); }
.rows > li { border-top: 1px solid var(--mist); transition: border-color 200ms var(--ease-out); }
.row summary, .rows--flat > li {
  display: grid; grid-template-columns: 1fr; gap: 2px 24px; align-items: center; padding: 18px 0; list-style: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.row summary::-webkit-details-marker { display: none; }
.rows--flat > li { cursor: default; }
.row__date { font-family: var(--font-display); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-60); }
.row__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row__main b { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.3; color: var(--ink); }
.row__main span { font-family: var(--font-display); font-weight: 500; font-size: 0.9375rem; color: var(--ink-60); }
.row__place { display: none; font-family: var(--font-display); font-size: 0.9375rem; color: var(--ink-60); }
.row summary .icon { position: absolute; right: 0; top: 22px; width: 1.25rem; height: 1.25rem; color: var(--ink-60); transition: transform 240ms var(--ease-out); }
.row summary { position: relative; padding-right: 36px; }
.row[open] summary .icon { transform: rotate(180deg); color: var(--copper); }
.row__text { max-width: 62ch; padding: 0 36px 22px 0; font-weight: 300; font-size: 1.0625rem; line-height: 1.55; color: var(--ink-80); }
@media (min-width: 768px) {
  .row summary, .rows--flat > li { grid-template-columns: 200px minmax(0, 1fr) 160px; padding-block: 20px; }
  .rows--flat > li { grid-template-columns: 200px minmax(0, 1fr); }
  .row__place { display: block; }
  .row summary .icon { top: 26px; }
  .row__text { padding-left: 224px; }
}
@media (hover: hover) and (pointer: fine) {
  .rows > li:hover { border-top-color: var(--copper); }
}

/* ---------- Studi: stesse righe del Lavoro, con i dettagli a tendina ---------- */
.row__result { display: flex; flex-direction: column; margin-top: 6px; font-family: var(--font-display); }
.row__result b { font-weight: 700; font-size: 1.25rem; line-height: 1.2; color: var(--ink); }
.row__result small { font-size: 0.8125rem; color: var(--ink-60); }
.row--plain { display: grid; grid-template-columns: 1fr; gap: 2px 24px; align-items: center; padding: 18px 0; }
.row__more { padding: 4px 36px 24px 0; }
.row__more > p:not(.row__label) { max-width: 62ch; font-weight: 300; font-size: 1.0625rem; line-height: 1.55; color: var(--ink-80); }
.row__list { margin: 12px 0 0; padding-left: 1.25rem; list-style: disc; max-width: 62ch; font-weight: 300; font-size: 1.0625rem; line-height: 1.6; color: var(--ink-80); }
.row__list li::marker { color: var(--copper); }
.rows > .row--plain { border-top: 1px solid var(--mist); }
.row__label { margin-bottom: 12px; font-family: var(--font-display); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-60); }
@media (min-width: 768px) {
  .rows--edu .row summary, .row--plain { grid-template-columns: 200px minmax(0, 1fr) 160px; padding-block: 24px; }
  .rows--edu .row summary .icon { top: 30px; }
  .row__result { margin-top: 0; align-items: flex-end; text-align: right; }
  .rows--edu .row summary { padding-right: 40px; }
  .row__more { padding-left: 224px; }
}

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border-radius: 9999px; background: #fff; border: 1px solid var(--mist);
  font-family: var(--font-display); font-weight: 500; font-size: 0.875rem; line-height: 1.3; color: var(--ink);
}
.chip { background: var(--tint); }
.chip--top { padding-right: 6px; }

/* Stella del voto massimo: etichetta al mouse, al focus da tastiera e al tocco */
.star {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
  color: var(--copper); background: rgba(184, 117, 50, 0.14); cursor: help; -webkit-tap-highlight-color: transparent;
}
.star .icon { width: 14px; height: 14px; fill: currentColor; }
.star__tip {
  position: absolute; right: -6px; bottom: calc(100% + 10px); z-index: 5; white-space: nowrap; pointer-events: none;
  padding: 6px 12px; border-radius: 8px; background: var(--ink); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 0.8125rem; line-height: 1.4;
  opacity: 0; transform: translateY(4px); visibility: hidden;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out), visibility 0s linear 160ms;
}
.star__tip::after { content: ""; position: absolute; top: 100%; right: 14px; border: 5px solid transparent; border-top-color: var(--ink); }
.star:focus-visible .star__tip, .star.is-tip .star__tip { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
@media (hover: hover) and (pointer: fine) {
  .star:hover .star__tip { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
}

/* ---------- Certificazioni ---------- */
.certs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .certs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .certs { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.cert {
  display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--mist); border-radius: 8px;
  transition: border-color 200ms var(--ease-out);
}
.cert__date { font-family: var(--font-display); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-60); margin-bottom: 6px; }
.cert__title { font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; line-height: 1.3; color: var(--ink); }
.cert__org { margin-top: 4px; font-family: var(--font-display); font-weight: 500; font-size: 0.875rem; line-height: 1.4; color: var(--ink-60); }
.cert__link {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content; min-height: 32px; margin-top: auto; padding-top: 12px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.875rem; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--mist); text-underline-offset: 5px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
.cert__link .icon { width: 0.9rem; height: 0.9rem; }
@media (hover: hover) and (pointer: fine) {
  .cert:hover { border-color: var(--copper); }
  .cert__link:hover { color: var(--copper); text-decoration-color: var(--copper); }
}
