/* Talentia HR Italia — main styles */
:root {
  --navy: #0f2040;
  --navy-soft: #1a3358;
  --teal: #1f9e93;
  --teal-dark: #178078;
  --green: #2d8a5e;
  --bg: #f7f9fb;
  --bg-alt: #eef3f7;
  --white: #ffffff;
  --text: #0f2040;
  --muted: #5a6a7e;
  --border: #d5dee8;
  --focus: #1f9e93;
  --error: #b42318;
  --success: #1a7a4c;
  --shadow: 0 8px 28px rgba(15, 32, 64, 0.08);
  --radius: 12px;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  --max: 1120px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.05rem;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 10000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.demo-banner {
  background: #fff4e5;
  color: #7a4a00;
  border-bottom: 1px solid #f0d9a8;
  font-size: 0.85rem;
  text-align: center;
  padding: 0.55rem 1rem;
  font-weight: 600;
}

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  font-size: 1.1rem;
}
.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--navy), var(--teal));
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
}
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  color: var(--navy);
  min-width: 44px;
  min-height: 44px;
}
.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.site-nav a {
  text-decoration: none;
  color: var(--navy-soft);
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--bg-alt);
  color: var(--navy);
}
.nav-cta {
  background: var(--teal) !important;
  color: #fff !important;
  margin-left: 0.35rem;
}
.nav-cta:hover { background: var(--teal-dark) !important; }

.has-submenu { position: relative; }
.has-submenu > button {
  background: transparent;
  border: 0;
  color: var(--navy-soft);
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  min-height: 44px;
}
.has-submenu > button:hover,
.has-submenu > button[aria-expanded="true"] {
  background: var(--bg-alt);
  color: var(--navy);
}
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem;
  list-style: none;
  margin: 0;
  z-index: 20;
}
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu,
.has-submenu > button[aria-expanded="true"] + .submenu {
  display: block;
}
.submenu a {
  display: block;
  padding: 0.55rem 0.75rem;
}

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .submenu {
    position: static;
    box-shadow: none;
    border: 0;
    padding-left: 0.75rem;
    display: none;
  }
  .has-submenu > button[aria-expanded="true"] + .submenu { display: block; }
  .nav-cta { margin-left: 0; text-align: center; }
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
  background:
    linear-gradient(120deg, rgba(15,32,64,0.92) 0%, rgba(26,51,88,0.78) 45%, rgba(31,158,147,0.55) 100%),
    url("../assets/hero.svg") center/cover no-repeat;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(31,158,147,0.25), transparent 50%);
  z-index: -1;
}
.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.hero h1 {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 600;
  margin: 0 0 1rem;
  max-width: 36rem;
  line-height: 1.35;
}
.hero p {
  max-width: 40rem;
  font-size: 1.1rem;
  opacity: 0.95;
  margin: 0 0 1.75rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-secondary:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-outline {
  background: #fff;
  color: var(--navy);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--border);
}

section { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--white); }
.section-muted { background: var(--bg-alt); }

.section-head { max-width: 42rem; margin-bottom: 2rem; }
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}
.section-head p { margin: 0; color: var(--muted); }

.grid-2 { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; gap: 1.25rem; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  height: 100%;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: #b7d8d4; transform: translateY(-2px); }
.card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(145deg, #e8f6f4, #dceaf5);
  display: grid; place-items: center;
  margin-bottom: 0.85rem;
  color: var(--teal-dark);
  font-size: 1.25rem;
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.card a.card-link {
  display: inline-block;
  margin-top: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.split {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
}
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem 1.1rem 3.5rem;
  position: relative;
  box-shadow: var(--shadow);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem; top: 1.1rem;
  width: 1.75rem; height: 1.75rem;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.values li { margin-bottom: 0.5rem; }
.pill-list { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0; list-style: none; }
.pill-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy-soft);
}

.faq details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.65rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
}
.faq details p { margin: 0.75rem 0 0; color: var(--muted); }

.breadcrumbs {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 1rem 0 0;
}
.breadcrumbs ol {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  list-style: none; margin: 0; padding: 0;
}
.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: #9aabbd;
}
.breadcrumbs a { text-decoration: none; color: var(--teal-dark); }

.page-hero {
  background: linear-gradient(135deg, var(--white), var(--bg-alt));
  border-bottom: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
}
.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin: 0.5rem 0 0.75rem;
  letter-spacing: -0.02em;
}
.page-hero p { margin: 0; max-width: 44rem; color: var(--muted); }

.prose { max-width: 48rem; }
.prose h2 { font-family: var(--display); margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1rem 0;
}
.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.prose th { background: var(--bg-alt); }

/* Forms */
.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-weight: 650; font-size: 0.95rem; }
.req { color: var(--error); }
.form-group input,
.form-group select,
.form-group textarea {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  background: #fff;
  color: var(--text);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown),
.field-error {
  border-color: var(--error) !important;
}
.hint, .error-text { font-size: 0.85rem; color: var(--muted); }
.error-text { color: var(--error); display: none; }
.form-group.has-error .error-text { display: block; }
.checkbox-group {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0.35rem 0;
}
.checkbox-group input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.form-status {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-weight: 600;
}
.form-status.success { display: block; background: #e8f7ef; color: var(--success); }
.form-status.error { display: block; background: #fdeceb; color: var(--error); }

/* Map gate */
.map-gate {
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}
.map-frame {
  border: 0;
  width: 100%;
  height: 360px;
  border-radius: var(--radius);
  display: none;
}
.map-frame.is-visible { display: block; }
.map-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1rem; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin-bottom: 0.65rem; }

/* Footer */
.site-footer {
  background: var(--navy);
  color: #d7e0ec;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}
.site-footer a { color: #b8e6e1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h2, .site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 0.85rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; font-size: 0.92rem; }
.footer-legal {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}
.footer-copy {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: #9aabc0;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 720px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(15,32,64,0.18);
  padding: 1.25rem;
  z-index: 5000;
  display: none;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner h2 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.cookie-banner p { margin: 0 0 1rem; color: var(--muted); font-size: 0.95rem; }
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cookie-actions .btn { flex: 1 1 140px; }
.cookie-actions .btn-reject {
  background: #fff;
  border-color: var(--navy);
  color: var(--navy);
}
.cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(15,32,64,0.45);
  z-index: 5100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.cookie-modal.is-open { display: flex; }
.cookie-panel {
  background: #fff;
  width: min(100%, 640px);
  max-height: 90vh;
  overflow: auto;
  border-radius: 14px;
  padding: 1.35rem;
}
.cookie-cat {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem;
  margin-bottom: 0.75rem;
}
.cookie-cat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  inset: 0;
  background: #c5d0dc;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s;
}
.slider::before {
  content: "";
  position: absolute;
  height: 22px; width: 22px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}
.switch input:checked + .slider { background: var(--teal); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:disabled + .slider { opacity: 0.7; cursor: not-allowed; }
.cookie-table { font-size: 0.85rem; width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.cookie-table th, .cookie-table td {
  border: 1px solid var(--border);
  padding: 0.4rem;
  text-align: left;
}

.job-card .meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.notice {
  background: #eef7f6;
  border-left: 4px solid var(--teal);
  padding: 0.9rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.thankyou-box {
  text-align: center;
  padding: 3rem 1rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.error-404 {
  text-align: center;
  padding: 4rem 1rem;
}
.error-404 .code {
  font-family: var(--display);
  font-size: 4rem;
  color: var(--teal);
  margin: 0;
}
