/* =========================================================================
   Footer: pannello viola con bordo superiore arrotondato, titolo forte con azioni rapide,
   colonne di link animate. Sostituisce l'aspetto "viola piatto" definito in sito-pubblico.css.
   ========================================================================= */

.site-footer.ft {
  position: relative; overflow: hidden; color: #fff;
  margin-top: -1px; padding: 72px 0 28px;
  border-radius: 40px 40px 0 0;
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(255,255,255,.18), transparent 60%),
    radial-gradient(50% 60% at 0% 100%, rgba(0,0,0,.25), transparent 70%),
    linear-gradient(160deg, #A465AB 0%, #8B4B93 40%, #5C2A64 100%);
}
html[data-theme="dark"] .site-footer.ft {
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(255,255,255,.1), transparent 60%),
    linear-gradient(160deg, #6E3A77 0%, #4A2453 45%, #26122C 100%);
}

/* Cerchi decorativi (CSS puro: nitidi a qualsiasi risoluzione) */
.site-footer.ft::before, .site-footer.ft::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none; background: rgba(255,255,255,.06);
}
.site-footer.ft::before { width: 460px; height: 460px; right: -160px; top: -200px; }
.site-footer.ft::after { width: 300px; height: 300px; left: -120px; bottom: -150px; background: rgba(255,255,255,.05); }
.site-footer.ft .container { position: relative; z-index: 1; }

/* ---------- Titolo + azioni rapide ---------- */
.ft-top {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding-bottom: 44px; margin-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.2);
}
.ft-eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.75); margin-bottom: 12px;
}
.ft-claim h2 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.02em; margin: 0; }

.ft-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ft-btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 13px 22px; border-radius: 999px;
  font-weight: 700; font-size: .95rem; line-height: 1.2; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.ft-btn svg { flex: none; width: 20px; height: 20px; }
.ft-btn small { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .65; }
.ft-btn-solid { background: #fff; color: #6E2F77; font-size: 1.15rem; font-weight: 800; box-shadow: 0 12px 26px rgba(0,0,0,.25); padding-right: 28px; }
.ft-btn-solid svg { width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: #6E2F77; color: #fff; }
.ft-btn-line { color: #fff; border: 1.5px solid rgba(255,255,255,.5); background: rgba(255,255,255,.08); }
.site-footer.ft .ft-btn-solid:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(0,0,0,.3); color: #6E2F77; text-decoration: none; }
.site-footer.ft .ft-btn-line:hover { transform: translateY(-3px); background: rgba(255,255,255,.2); border-color: #fff; color: #fff; text-decoration: none; }

/* ---------- Griglia ---------- */
.ft-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr; gap: 36px; margin-bottom: 52px; }
.ft-brand img { height: 46px; width: auto; max-width: none; margin-bottom: 18px; filter: brightness(0) invert(1); }
.ft-brand p { color: rgba(255,255,255,.85); font-size: .95rem; line-height: 1.6; max-width: 36ch; margin: 0 0 18px; }
.ft-brand address { display: flex; gap: 10px; align-items: flex-start; font-style: normal; color: #fff; font-size: .92rem; line-height: 1.5; }
.ft-brand address svg { flex: none; width: 20px; height: 20px; margin-top: 2px; opacity: .85; }

.ft-col h4 { color: rgba(255,255,255,.7); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 18px; }
.ft-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.site-footer.ft .ft-col a {
  position: relative; display: inline-block; color: #fff; font-size: 1.02rem; font-weight: 600; padding: 6px 0;
  transition: transform .25s ease;
}
/* Sottolineatura che cresce al passaggio + leggero scorrimento */
.site-footer.ft .ft-col a::after {
  content: ""; position: absolute; left: 0; bottom: 2px; width: 100%; height: 2px; background: #fff;
  transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.site-footer.ft .ft-col a:hover { text-decoration: none; transform: translateX(4px); color: #fff; }
.site-footer.ft .ft-col a:hover::after { transform: scaleX(1); }

/* ---------- Parte bassa ---------- */
.ft-bottom {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.2); font-size: .85rem; color: rgba(255,255,255,.85);
}
.ft-legal { display: flex; gap: 20px; margin-left: auto; }
.site-footer.ft .ft-legal a { color: #fff; font-weight: 600; }
.site-footer.ft .ft-legal a:hover { text-decoration: underline; text-underline-offset: 4px; color: #fff; }
.ft-top-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.5); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: #fff; background: rgba(255,255,255,.1);
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}
.ft-top-btn svg { width: 20px; height: 20px; }
.ft-top-btn:hover { transform: translateY(-4px); background: rgba(255,255,255,.25); border-color: #fff; }
.ft-top-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .ft-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .ft-contatti { grid-column: 2 / 4; }
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .site-footer.ft { border-radius: 28px 28px 0 0; padding: 52px 0 24px; }
  .ft-top { flex-direction: column; align-items: stretch; gap: 26px; padding-bottom: 32px; margin-bottom: 32px; }
  .ft-actions { flex-direction: column; }
  .ft-btn { justify-content: center; width: 100%; }
  .ft-btn-solid { justify-content: flex-start; }
  .ft-grid { grid-template-columns: 1fr 1fr; gap: 30px 20px; margin-bottom: 36px; }
  .ft-brand { grid-column: 1 / -1; }
  .ft-contatti { grid-column: 1 / -1; }
  .ft-contatti ul { flex-direction: row; flex-wrap: wrap; gap: 4px 22px; }
  .ft-bottom { flex-direction: column; align-items: flex-start; gap: 14px; position: relative; }
  .ft-legal { margin-left: 0; padding-right: 60px; }
  .ft-top-btn { position: absolute; right: 0; bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ft-btn, .ft-top-btn, .site-footer.ft .ft-col a, .site-footer.ft .ft-col a::after { transition: none; }
}
