/* ============================================================
   AGROLAVORO — NUOVO DESIGN
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display&display=swap');

:root {
  --verde:       #2d6a2d;
  --verde-light: #e8f2e8;
  --verde-mid:   #4a8c3f;
  --bg:          #f7f5f0;
  --white:       #ffffff;
  --gray-100:    #f0ede8;
  --gray-200:    #e2ddd6;
  --gray-400:    #9b9489;
  --gray-600:    #6b6560;
  --text:        #1e1c19;
  --text-muted:  #6b6560;
  --border:      #ddd9d2;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.07);
  --shadow-md:   0 4px 16px rgba(0,0,0,.09);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.11);
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --font-body:   'DM Sans', system-ui, sans-serif;
  --font-display:'DM Serif Display', Georgia, serif;
  --max-w:       1080px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* NAVBAR */
.navbar { background: var(--white); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100; }
.navbar-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; height: 62px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 22px; color: var(--verde); text-decoration: none; }
.logo-icon { width: 34px; height: 34px; background: var(--verde); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link { padding: 8px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--gray-600); cursor: pointer; transition: background .15s, color .15s; border: none; background: none; text-decoration: none; }
.nav-link:hover { background: var(--gray-100); color: var(--text); }
.nav-link.active { color: var(--verde); font-weight: 600; }
.btn-nav-primary { padding: 9px 20px; background: var(--verde); color: var(--white) !important; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: background .15s; text-decoration: none; }
.btn-nav-primary:hover { background: var(--verde-mid); }

/* LAYOUT */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 48px 0; }
.section-sm { padding: 28px 0; }

/* HERO */
.hero { background: var(--white); border-bottom: 1px solid var(--border); padding: 56px 24px 48px; text-align: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--verde-light); color: var(--verde); border: 1px solid rgba(45,106,45,.2); border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(28px, 5vw, 46px); color: var(--text); line-height: 1.2; margin-bottom: 14px; max-width: 680px; margin-left: auto; margin-right: auto; }
.hero h1 em { font-style: normal; color: var(--verde); }
.hero-sub { font-size: 17px; color: var(--text-muted); max-width: 520px; margin: 0 auto 32px; }

/* SEARCH BOX */
.search-box { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); display: flex; align-items: center; max-width: 680px; margin: 0 auto; }
.search-field { flex: 1; display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-right: 1px solid var(--border); }
.search-field input, .search-field select { border: none; background: transparent; font-family: var(--font-body); font-size: 15px; color: var(--text); width: 100%; outline: none; }
.search-field input::placeholder { color: var(--gray-400); }
.search-btn { margin: 8px; padding: 12px 22px; background: var(--verde); color: var(--white); border: none; border-radius: var(--radius-md); font-size: 15px; font-weight: 600; white-space: nowrap; flex-shrink: 0; cursor: pointer; }
.search-btn:hover { background: var(--verde-mid); }

/* STATS */
.stats-bar { display: flex; justify-content: center; gap: 32px; padding: 20px 24px; background: var(--verde-light); border-bottom: 1px solid rgba(45,106,45,.15); flex-wrap: wrap; }
.stat-item { text-align: center; font-size: 13px; color: var(--verde); font-weight: 500; }
.stat-item strong { display: block; font-size: 22px; font-weight: 700; font-family: var(--font-display); }

/* CTA GRID */
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 760px; margin: 0 auto; }
.cta-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 28px 24px; transition: box-shadow .2s, transform .2s, border-color .2s; cursor: pointer; display: block; }
.cta-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--verde); }
.cta-card-icon { font-size: 36px; margin-bottom: 14px; }
.cta-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.cta-card p { font-size: 14px; color: var(--text-muted); line-height: 1.5; margin-bottom: 18px; }
.btn-card { display: inline-block; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; }
.cta-card.primary .btn-card { background: var(--verde); color: var(--white); }
.cta-card.secondary .btn-card { background: var(--gray-100); color: var(--text); border: 1.5px solid var(--border); }

/* ANNUNCI */
.annuncio-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 22px 22px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; transition: box-shadow .15s, border-color .15s, transform .15s; }
.annuncio-card:hover { box-shadow: var(--shadow-md); border-color: var(--verde); transform: translateX(3px); }
.annuncio-main { flex: 1; min-width: 0; }
.annuncio-mansione { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.annuncio-azienda { font-size: 15px; font-weight: 600; color: var(--verde); margin-bottom: 6px; }
.annuncio-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 14px; color: var(--text-muted); }
.annuncio-time { font-size: 12px; color: var(--gray-400); white-space: nowrap; align-self: flex-start; }
.btn-candidati { flex-shrink: 0; padding: 14px 22px; background: var(--verde); color: var(--white); border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; cursor: pointer; transition: background .15s; min-height: 50px; text-decoration: none; display: inline-flex; align-items: center; }
.btn-candidati:hover { background: var(--verde-mid); }

/* FILTRI */
.filtri-bar { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 16px 20px; display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.filtro-group { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 160px; }
.filtro-group label { font-size: 13px; font-weight: 700; color: #1a1a1a; margin-bottom: 2px; }
.filtro-group input, .filtro-group select { border: 2.5px solid #1a1a1a; border-radius: var(--radius-sm); padding: 13px 14px; font-family: var(--font-body); font-size: 16px; color: var(--text); background: #fafaf8; outline: none; min-height: 52px; }
.filtro-group input:focus, .filtro-group select:focus { border-color: var(--verde); box-shadow: 0 0 0 3px rgba(45,106,45,.12); }
.btn-cerca { padding: 13px 28px; background: var(--verde); color: var(--white); border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; height: 52px; align-self: flex-end; cursor: pointer; }
.btn-cerca:hover { background: var(--verde-mid); }

/* FORM */
.form-card { background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 36px 28px; max-width: 620px; margin: 0 auto; box-shadow: var(--shadow-md); }
.form-title { font-family: var(--font-display); font-size: 28px; margin-bottom: 8px; }
.form-subtitle { font-size: 15px; color: var(--text-muted); margin-bottom: 32px; }
.form-group { margin-bottom: 26px; }
.form-group label { display: block; font-size: 15px; font-weight: 700; color: #1a1a1a; margin-bottom: 10px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; border: 2.5px solid #1a1a1a; border-radius: var(--radius-sm); padding: 16px 16px; font-family: var(--font-body); font-size: 17px; color: var(--text); background: #fafaf8; outline: none; transition: border-color .15s, box-shadow .15s; min-height: 56px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--verde); box-shadow: 0 0 0 4px rgba(45,106,45,.15); background: #fff; }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 13px; color: var(--gray-400); margin-top: 7px; }
.btn-pubblica { width: 100%; padding: 18px; background: var(--verde); color: var(--white); border: none; border-radius: var(--radius-md); font-size: 18px; font-weight: 700; margin-top: 12px; cursor: pointer; transition: background .15s; letter-spacing: .3px; }
.btn-pubblica:hover { background: var(--verde-mid); }
.privacy-note { font-size: 13px; color: var(--gray-400); text-align: center; margin-top: 14px; }
.err { background: #fef2f2; border: 1.5px solid #fca5a5; color: #991b1b; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 600; }
.ok-box { background: #f0fdf4; border: 1.5px solid #86efac; color: #166534; padding: 20px; border-radius: var(--radius-md); font-weight: 700; }

/* SUGGEST COMUNI */
.suggest { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border: 2.5px solid #1a1a1a; border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); z-index: 200; max-height: 220px; overflow-y: auto; }
.suggest-item { padding: 11px 16px; cursor: pointer; font-size: 15px; border-bottom: 1px solid var(--border); }
.suggest-item:hover { background: var(--verde-light); }
.suggest-item:last-child { border-bottom: none; }

/* BADGE */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-verde { background: var(--verde-light); color: var(--verde); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* LISTA CANDIDATI */
.candidato-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 20px 22px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.candidato-card.sbloccato { border-color: #86efac; background: #f0fdf4; }
.candidato-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.candidato-nome { font-size: 17px; font-weight: 700; }
.candidato-data { font-size: 12px; color: var(--gray-400); }
.candidato-msg { font-size: 14px; color: var(--text-muted); line-height: 1.6; background: var(--gray-100); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 14px; }
.censored-bar { height: 16px; background: var(--gray-200); border-radius: 4px; display: inline-block; filter: blur(4px); user-select: none; }
.field-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 14px; }
.field-label { color: var(--gray-400); font-size: 13px; min-width: 70px; font-weight: 500; }
.field-value { color: var(--text); font-weight: 600; }
.field-value a { color: var(--verde); }
.btn-sblocca { display: block; width: 100%; margin-top: 14px; padding: 15px 22px; background: var(--verde); color: var(--white); border: none; border-radius: var(--radius-sm); font-size: 16px; font-weight: 700; cursor: pointer; text-align: center; min-height: 52px; }
.btn-sblocca:hover { background: var(--verde-mid); }
.box-tutti { background: var(--white); border: 1.5px solid var(--verde); border-radius: var(--radius-md); padding: 20px 22px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; box-shadow: var(--shadow-sm); }
.box-tutti-info h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.box-tutti-info p { font-size: 13px; color: var(--text-muted); }
.prezzo-scontato-big { font-size: 22px; font-weight: 700; color: var(--verde); }
.prezzo-originale-sm { font-size: 13px; color: var(--gray-400); text-decoration: line-through; margin-right: 6px; }
.cv-preview { margin: 12px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.cv-preview-header { padding: 8px 14px; background: var(--gray-100); font-size: 12px; font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: .5px; }
.cv-preview-body { padding: 12px 14px; font-size: 13px; color: var(--text-muted); line-height: 1.6; max-height: 80px; overflow: hidden; transition: max-height .3s ease; white-space: pre-wrap; }
.cv-preview-body.espanso { max-height: 400px; }
.cv-toggle { background: none; border: none; border-top: 1px solid var(--border); color: var(--verde); font-size: 13px; font-weight: 600; cursor: pointer; padding: 8px 14px; width: 100%; text-align: left; font-family: var(--font-body); }

/* SOCIAL PROOF */
.social-proof { display: inline-flex; align-items: center; gap: 6px; background: var(--verde-light); color: var(--verde); border: 1px solid rgba(45,106,45,.2); border-radius: 999px; padding: 6px 16px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }

/* MODALE */
.modale-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9998; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(3px); }
.modale-overlay.open { display: flex; }
.modale-box { background: var(--white); border-radius: var(--radius-lg); padding: 32px 28px; max-width: 440px; width: 100%; box-shadow: 0 24px 64px rgba(0,0,0,.18); animation: popIn .18s ease; }
@keyframes popIn { from { transform: scale(.93); opacity:0; } to { transform: scale(1); opacity:1; } }
.modale-icon { font-size: 40px; text-align: center; margin-bottom: 12px; }
.modale-title { font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 10px; }
.modale-text { font-size: 14px; color: var(--text-muted); text-align: center; line-height: 1.6; margin-bottom: 22px; }
.modale-btn { display: block; width: 100%; padding: 13px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; text-align: center; border: none; cursor: pointer; margin-bottom: 10px; font-family: var(--font-body); }
.modale-btn.primary { background: var(--verde); color: var(--white); }
.modale-btn.secondary { background: var(--gray-100); color: var(--text); border: 1.5px solid var(--border); }

/* FOOTER */
.footer { background: var(--white); border-top: 1px solid var(--border); padding: 24px; text-align: center; font-size: 13px; color: var(--gray-400); margin-top: 60px; }

/* MOBILE */
@media (max-width: 600px) {
  .cta-grid { grid-template-columns: 1fr !important; }
  .hero { padding: 36px 16px 32px; }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 15px; }
  .search-box { flex-direction: column; }
  .search-field { border-right: none; border-bottom: 1px solid var(--border); padding: 14px 16px; }
  .search-btn { width: calc(100% - 16px); margin: 8px; }
  .stats-bar { gap: 16px; padding: 16px; }
  .stat-item strong { font-size: 20px; }
  .filtri-bar { flex-direction: column; }
  .filtro-group { min-width: 100%; }
  .btn-cerca { width: 100%; }
  .annuncio-card { flex-direction: column; align-items: stretch; }
  .btn-candidati { width: 100%; text-align: center; justify-content: center; margin-top: 12px; }
  .form-card { padding: 24px 18px; }
  .form-title { font-size: 24px; }
  .container { padding: 0 14px; }
  .navbar-inner { padding: 0 14px; }
  .nav-link:not(.btn-nav-primary) { display: none; }
  .box-tutti { flex-direction: column; }
  .box-tutti > div:last-child { text-align: left; }
  .candidato-card { padding: 16px; }
  .modale-box { padding: 24px 18px; }
  .section-sm { padding: 20px 0; }
}