/* sections.css — Stili delle sezioni Professioni e Città (LavoroAnnunci.it) */

:root {
  --hub-ink: #1f2937;
  --hub-muted: #6b7280;
  --hub-line: #e5e7eb;
  --hub-bg: #f6f8fb;
  --hub-card: #ffffff;
  --hub-accent: #0d6efd;
  --hub-accent-soft: #e8f0fe;
  --hub-good: #198754;
  --hub-radius: 12px;
}

.hub-page { background: var(--hub-bg); color: var(--hub-ink); }
.hub-page main { min-height: 60vh; }

/* ── Hero ─────────────────────────────────────────── */
.hub-hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--hub-bg) 100%);
  border-bottom: 1px solid var(--hub-line);
  padding: 1.25rem 0 2rem;
  margin-bottom: 1.75rem;
}
.hub-breadcrumb { font-size: .85rem; margin-bottom: .75rem; }
.hub-breadcrumb a { text-decoration: none; }
.hub-kicker {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--hub-accent); background: var(--hub-accent-soft);
  padding: .2rem .6rem; border-radius: 999px; margin-bottom: .5rem;
}
.hub-hero__title { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; line-height: 1.2; margin-bottom: .6rem; }
.hub-hero__lead { font-size: 1.05rem; color: #374151; max-width: 60rem; margin-bottom: 1.1rem; }
.hub-updated { font-size: .8rem; color: var(--hub-muted); margin: .9rem 0 0; }

/* ── KPI ──────────────────────────────────────────── */
.hub-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; max-width: 60rem; }
.hub-kpi {
  background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: var(--hub-radius);
  padding: .8rem 1rem; display: flex; flex-direction: column;
}
.hub-kpi__v { font-size: 1.45rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hub-kpi__l { font-size: .8rem; color: var(--hub-muted); }

/* ── Ricerche ─────────────────────────────────────── */
.hub-search { position: relative; max-width: 36rem; }
.hub-search i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--hub-muted); }
.hub-search .form-control { padding-left: 2.4rem; border-radius: 999px; height: 2.9rem; }
.hub-inline-search { display: flex; gap: .5rem; max-width: 36rem; margin-top: 1rem; }
.hub-inline-search .form-control { border-radius: 999px; }
.hub-inline-search .btn { border-radius: 999px; white-space: nowrap; }

/* ── Card ─────────────────────────────────────────── */
.hub-card {
  background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: var(--hub-radius);
  padding: 1.25rem 1.35rem; margin-bottom: 1.25rem;
}
.hub-card--muted { background: #fbfcfe; }
.hub-card__title { font-size: 1.1rem; font-weight: 700; margin-bottom: .9rem; }
.hub-card__title i { color: var(--hub-accent); margin-right: .35rem; }
.hub-card__subtitle { font-size: .9rem; font-weight: 700; color: #374151; margin: .9rem 0 .5rem; }
.hub-card .row .hub-card__subtitle { margin-top: 0; }

.hub-checklist { list-style: none; padding: 0; margin: 0; }
.hub-checklist li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem; }
.hub-checklist li::before {
  content: "\f00c"; font-family: "Font Awesome 5 Free"; font-weight: 900; font-size: .8rem;
  position: absolute; left: 0; top: .2rem; color: var(--hub-good);
}

.hub-list-plain { list-style: none; padding: 0; margin: 0 0 .5rem; }
.hub-list-plain li { padding: .3rem 0; border-bottom: 1px dashed var(--hub-line); }
.hub-list-plain li:last-child { border-bottom: 0; }
.hub-list-plain a { text-decoration: none; }

/* Classifiche */
.hub-rank { list-style: none; counter-reset: r; padding: 0; margin: 0; }
.hub-rank li {
  counter-increment: r; display: flex; align-items: center; gap: .6rem;
  padding: .45rem 0; border-bottom: 1px solid var(--hub-line);
}
.hub-rank li:last-child { border-bottom: 0; }
.hub-rank li::before {
  content: counter(r); flex: 0 0 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--hub-accent-soft); color: var(--hub-accent); font-size: .75rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.hub-rank a { text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.hub-rank__n { margin-left: auto; font-size: .82rem; color: var(--hub-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hub-rank__more { color: var(--hub-muted); font-size: .85rem; }
.hub-rank--compact li { padding: .35rem 0; font-size: .93rem; }

/* Chips */
.hub-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.hub-chip {
  background: var(--hub-accent-soft); color: #1e3a8a; border-radius: 999px;
  padding: .3rem .7rem; font-size: .85rem;
}
.hub-chip small { color: var(--hub-muted); margin-left: .15rem; }

/* Barre */
.hub-bars { list-style: none; padding: 0; margin: 0; }
.hub-bars li { display: grid; grid-template-columns: 1fr 2.6rem; align-items: center; gap: .15rem .5rem; margin-bottom: .55rem; font-size: .85rem; }
.hub-bars__label { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-bars__track { background: #eef1f5; border-radius: 999px; height: .55rem; overflow: hidden; }
.hub-bars__fill { display: block; height: 100%; background: var(--hub-accent); border-radius: 999px; }
.hub-bars__val { text-align: right; color: var(--hub-muted); font-variant-numeric: tabular-nums; }

/* Stipendi */
.hub-salary__main { display: flex; flex-direction: column; margin-bottom: .75rem; }
.hub-salary__value { font-size: 1.9rem; font-weight: 700; color: var(--hub-good); line-height: 1.1; font-variant-numeric: tabular-nums; }
.hub-salary__label { font-size: .85rem; color: var(--hub-muted); }
.hub-salary__range { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: .9rem; margin-bottom: .6rem; font-variant-numeric: tabular-nums; }
.hub-salary__bar { flex: 1; height: .6rem; border-radius: 999px; background: linear-gradient(90deg, #cfe8da, var(--hub-good), #cfe8da); }

/* Settori e griglie */
.hub-sector { margin-bottom: 2rem; }
.hub-sector__title { font-size: 1.2rem; font-weight: 700; margin-bottom: .85rem; }
.hub-sector__title i { color: var(--hub-accent); margin-right: .4rem; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.hub-grid--tight { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.hub-tile {
  display: flex; flex-direction: column; gap: .2rem; background: var(--hub-card);
  border: 1px solid var(--hub-line); border-radius: var(--hub-radius); padding: .85rem 1rem;
  text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.hub-tile:hover, a.hub-tile:focus-visible { border-color: var(--hub-accent); box-shadow: 0 4px 14px rgba(13,110,253,.12); transform: translateY(-1px); }
.hub-tile__name { font-weight: 600; color: var(--hub-ink); text-decoration: none; }
a.hub-tile .hub-tile__name, .hub-tile--static .hub-tile__name { color: #0b5ed7; }
.hub-tile__meta { font-size: .8rem; color: var(--hub-muted); }
.hub-tile--static { background: #fbfcfe; }

/* Aree (indice città) */
.hub-areas { columns: 3 280px; column-gap: 1.5rem; }
.hub-area { break-inside: avoid; background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: var(--hub-radius); padding: 1rem 1.1rem; margin-bottom: 1.25rem; }
.hub-area__title { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.hub-area__list { list-style: none; padding: 0; margin: 0; }
.hub-area__list li { display: flex; justify-content: space-between; gap: .5rem; padding: .15rem 0; font-size: .92rem; }
.hub-area__list a { text-decoration: none; }

/* Annunci */
.hub-job { padding: .85rem 0; border-bottom: 1px solid var(--hub-line); }
.hub-job:last-of-type { border-bottom: 0; }
.hub-job__title { font-size: 1rem; font-weight: 600; margin-bottom: .35rem; }
.hub-job__title a { text-decoration: none; }
.hub-job .job-card__meta { display: flex; flex-wrap: wrap; gap: .35rem .8rem; font-size: .82rem; color: var(--hub-muted); }

/* Alert */
.hub-alert {
  display: flex; align-items: center; gap: 1rem; background: #fff8e1; border: 1px solid #ffe08a;
  border-radius: var(--hub-radius); padding: 1rem 1.2rem; margin-bottom: 1.25rem;
}
.hub-alert i { color: #b7791f; }

/* FAQ */
.hub-faq .accordion-button { font-weight: 600; font-size: .95rem; }

[hidden] { display: none !important; }

@media (max-width: 575.98px) {
  .hub-alert { flex-wrap: wrap; }
  .hub-inline-search { flex-direction: column; }
}
