/* ============================================================
   COMPONENTS — Classi condivise riutilizzabili.
   Prefisso .ff- per evitare collisioni con il resto del codice.
   Le pagine specifiche possono ancora avere le loro regole, ma per
   nuovi componenti partire da qui.
   ============================================================ */

/* ---------- Sezione standard ---------- */

.ff-section {
  position: relative;
  width: 100%;
}

.ff-section--soft   { background: #f8f8f4; }
.ff-section--white  { background: #fff; }
.ff-section--brand  { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; }

.ff-section--top {
  padding-top: calc(var(--h-header) + var(--header-top) + 30px);
}

/* ---------- Section head (kicker + h2 + lead) ---------- */

.ff-head           { text-align: center; margin-bottom: 30px; }
.ff-head--left     { text-align: left; }

.ff-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brand);
  background: rgba(82, 132, 3, 0.12);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.ff-kicker--ghost {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
}

.ff-title {
  margin: 0 0 8px 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #2a2a2a;
  line-height: 1.15;
}

.ff-title--lg { font-size: 44px; }
.ff-title--sm { font-size: 24px; }
.ff-title--brand { color: var(--brand); }
.ff-title--inverse { color: #fff; text-shadow: 0 4px 22px rgba(0, 0, 0, 0.2); }

.ff-lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: #777;
}

.ff-lead--inverse { color: rgba(255, 255, 255, 0.92); }

/* ---------- Card ---------- */

.ff-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  padding: 24px;
  box-sizing: border-box;
}

.ff-card--lg { padding: 32px; }
.ff-card--sm { padding: 16px; }

.ff-card--soft {
  background: linear-gradient(135deg, #f0f7d8 0%, #e2eebd 100%);
  border-color: #cfe0a3;
}

.ff-card--hoverable {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ff-card--hoverable:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  border-color: #cdd9b1;
}

/* ---------- Button ---------- */

.ff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 28px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.ff-btn:active { transform: scale(0.98); }

.ff-btn--primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 6px 16px rgba(82, 132, 3, 0.25);
}

.ff-btn--primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.ff-btn--ghost {
  background: transparent;
  color: var(--brand-dark);
  border-color: #e2e2e2;
}

.ff-btn--ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.ff-btn--secondary {
  background: #f0f0ec;
  color: #555;
  border-color: #f0f0ec;
}

.ff-btn--secondary:hover { background: #e4e4df; }

.ff-btn--pill { border-radius: 999px; padding: 13px 26px; }
.ff-btn--block { width: 100%; }
.ff-btn--lg { padding: 16px 36px; font-size: 15px; }
.ff-btn--sm { padding: 9px 18px; font-size: 13px; }

.ff-btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ---------- Form ---------- */

.ff-field {
  position: relative;
  margin-bottom: 14px;
}

.ff-field input[type="text"],
.ff-field input[type="email"],
.ff-field input[type="password"],
.ff-field input[type="tel"],
.ff-field input[type="number"],
.ff-field textarea {
  width: 100%;
  padding: 24px 14px 10px 14px;
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color: #222;
}

.ff-field input:focus,
.ff-field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(82, 132, 3, 0.12);
}

.ff-field label {
  position: absolute;
  top: 18px;
  left: 14px;
  font-size: 14px;
  color: #888;
  pointer-events: none;
  transition: 0.2s;
}

.ff-field input:not(:placeholder-shown) + label,
.ff-field input:focus + label,
.ff-field textarea:not(:placeholder-shown) + label,
.ff-field textarea:focus + label {
  top: 7px;
  font-size: 11px;
  color: var(--brand);
  background: #fff;
  padding: 0 4px;
}

.ff-field input::placeholder,
.ff-field textarea::placeholder { color: transparent; }

.ff-field textarea {
  min-height: 90px;
  resize: vertical;
  padding-top: 22px;
}

/* ---------- Breadcrumb ---------- */

.ff-breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 13px;
  color: #777;
}

.ff-breadcrumb a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.ff-breadcrumb a:hover { text-decoration: underline; }
.ff-breadcrumb .ff-sep { color: #bbb; }

.ff-breadcrumb--inverse { color: rgba(255, 255, 255, 0.85); }
.ff-breadcrumb--inverse a { color: #fff; }
.ff-breadcrumb--inverse .ff-sep { color: rgba(255, 255, 255, 0.5); }

/* ---------- Badge ---------- */

.ff-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ff-badge--outline {
  background: transparent;
  border: 1px solid var(--brand);
  color: var(--brand);
}

/* ---------- Hero wave (reusable) ---------- */

.ff-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 130px;
  pointer-events: none;
  display: block;
}

.ff-wave--sm { height: 90px; }

/* ---------- Utility ---------- */

.ff-stack { display: flex; flex-direction: column; gap: 14px; }
.ff-stack--lg { gap: 24px; }
.ff-row   { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.ff-row--end { justify-content: flex-end; }
.ff-row--between { justify-content: space-between; }
.ff-row--center { justify-content: center; }

.ff-text-center  { text-align: center; }
.ff-text-muted   { color: #888; }
.ff-text-brand   { color: var(--brand); }
.ff-text-strong  { font-weight: 700; }

.ff-hidden       { display: none !important; }

@media (max-width: 800px) {
  .ff-title    { font-size: 26px; }
  .ff-title--lg { font-size: 32px; }

  .ff-wave    { height: 70px; }
  .ff-wave--sm { height: 50px; }
}
