/* =====================================================================
   WITService — Componenti "landing" per le pagine generate da Excel
   Tutto e' scoped sotto .wit-landing per non entrare in conflitto con
   il tema del sito (Bootstrap 4). Include:
   1) Variabili e stili dei componenti (hero, metrics, features, ...)
   2) Uno shim delle utility Bootstrap 5 usate nel markup generato ma
      assenti in Bootstrap 4 (g-*, gap-*, rounded-3/4, display-5/6, ...)
   ===================================================================== */
.header-area, .footer-bottom-area, .footer-area { display: none; }
.wit-landing {
  --brand: #b5121b;
  --brand-dark: #971018;
  --brand-soft: #c9666d;
  --ink: #242424;
  --muted: #6b6f75;
  --surface: #f2f2f2;
  --line: #8e949b;
  color: var(--ink);
  line-height: 1.5;
}

/* ---------------------------------------------------------------------
   1) SHIM UTILITY BOOTSTRAP 5 (mancanti o diverse in Bootstrap 4)
   --------------------------------------------------------------------- */
.wit-landing .site-container { max-width: 1180px; margin-inline: auto; }

/* gutter (g-*) -> emulati con padding sulle colonne + margini negativi sulla row */
.wit-landing .row.g-0 { margin-right: 0; margin-left: 0; }
.wit-landing .row.g-0 > [class*="col-"],
.wit-landing .row.g-0 > .col { padding-right: 0; padding-left: 0; }
.wit-landing .row.g-3 { margin: -.5rem; }
.wit-landing .row.g-3 > [class*="col-"],
.wit-landing .row.g-3 > .col { padding: .5rem; }
.wit-landing .row.g-4 { margin: -.75rem; }
.wit-landing .row.g-4 > [class*="col-"],
.wit-landing .row.g-4 > .col { padding: .75rem; }
.wit-landing .row.g-5 { margin: -1.25rem; }
.wit-landing .row.g-5 > [class*="col-"],
.wit-landing .row.g-5 > .col { padding: 1.25rem; }

/* gap-* */
.wit-landing .gap-3 { gap: 1rem !important; }
@media (min-width: 992px) {
  .wit-landing .gap-lg-3 { gap: 1rem !important; }
  .wit-landing .gap-lg-4 { gap: 1.5rem !important; }
}

/* flex responsive + align (presenti in BS4 ma li ridichiaro per sicurezza) */
@media (min-width: 576px) {
  .wit-landing .flex-sm-row { flex-direction: row !important; }
  .wit-landing .align-items-sm-center { align-items: center !important; }
}

/* margin/padding logici BS5 */
.wit-landing .ms-1 { margin-left: .25rem !important; }
.wit-landing .me-2 { margin-right: .5rem !important; }
.wit-landing .ms-auto { margin-left: auto !important; }
@media (min-width: 992px) { .wit-landing .ms-lg-2 { margin-left: .5rem !important; } }
@media (min-width: 1200px) { .wit-landing .p-xl-5 { padding: 3rem !important; } }

/* padding verticale grande (custom della landing) */
.wit-landing .py-lg-6 { padding-top: 3rem; padding-bottom: 3rem; }
@media (min-width: 992px) {
  .wit-landing .py-lg-6 { padding-top: 6rem !important; padding-bottom: 6rem !important; }
}

/* radius */
.wit-landing .rounded-3 { border-radius: .5rem !important; }
.wit-landing .rounded-4 { border-radius: 1rem !important; }

/* tipografia BS5 */
.wit-landing .fw-800 { font-weight: 800 !important; }
.wit-landing .fw-bold { font-weight: 700 !important; }
.wit-landing .lh-1 { line-height: 1 !important; }
.wit-landing .display-3 { font-size: calc(1.575rem + 3.9vw); font-weight: 300; line-height: 1.2; }
.wit-landing .display-5 { font-size: calc(1.425rem + 2.1vw); font-weight: 300; line-height: 1.2; }
.wit-landing .display-6 { font-size: calc(1.375rem + 1.5vw); font-weight: 300; line-height: 1.2; }
@media (min-width: 1200px) {
  .wit-landing .display-3 { font-size: 4.5rem; }
  .wit-landing .display-5 { font-size: 3rem; }
  .wit-landing .display-6 { font-size: 2.5rem; }
}

/* opacity */
.wit-landing .opacity-75 { opacity: .75 !important; }

/* colori brand */
.wit-landing .text-brand { color: var(--brand) !important; }

/* ---------------------------------------------------------------------
   MENU / HEADER (tipo_blocco = menu)
   --------------------------------------------------------------------- */
.wit-landing .topbar { background: var(--brand); font-size: 1rem; }
.wit-landing .topbar a { color: #fff; text-decoration: none; text-underline-offset: 3px; }
.wit-landing .topbar a:hover { text-decoration: underline; }
.wit-landing .site-header { z-index: 1030; }
.wit-landing .navbar-brand img { display: block; height: 44px; width: auto; }
.wit-landing .navbar .nav-link { color: var(--ink); font-weight: 500; font-size: .94rem; }
.wit-landing .navbar .nav-link:hover,
.wit-landing .navbar .nav-link:focus { color: var(--brand); }
.wit-landing .navbar-toggler:focus { box-shadow: none; outline: 0; }

/* ---------------------------------------------------------------------
   2) BOTTONI
   --------------------------------------------------------------------- */
.wit-landing .btn {
  border-radius: 0;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.wit-landing .btn:hover { transform: translateY(-1px); }
.wit-landing .btn-brand {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.wit-landing .btn-brand:hover,
.wit-landing .btn-brand:focus {
  background: var(--brand-dark);
  color: #fff;
  border-color: var(--brand-dark);
}
.wit-landing .btn-brand-dark {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}
.wit-landing .btn-brand-dark:hover,
.wit-landing .btn-brand-dark:focus {
  background: #7f0c13;
  border-color: #7f0c13;
  color: #fff;
}

/* ---------------------------------------------------------------------
   3) SEZIONI GENERICHE
   --------------------------------------------------------------------- */
.wit-landing .eyebrow {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
}
.wit-landing .section-heading { max-width: 920px; margin-inline: auto; }
.wit-landing .section-white { background: #fff; border-bottom: 1px solid var(--line); }

/* ---------------------------------------------------------------------
   4) HERO
   --------------------------------------------------------------------- */
.wit-landing .hero-section,
.wit-landing .process-section,
.wit-landing .final-cta { background: var(--brand); }
.wit-landing .hero-section { min-height: 610px; }
.wit-landing .hero-copy { max-width: 640px; font-size: 1.05rem; line-height: 1.55; }
.wit-landing .phone-link { text-decoration: none; }
.wit-landing .demo-card {
  background: rgba(255, 255, 255, .28);
  backdrop-filter: blur(2px);
  box-shadow: 0 1.2rem 2.6rem rgba(75, 0, 8, .16);
}
.wit-landing .demo-card .form-label { font-size: .82rem; margin-bottom: .35rem; }
.wit-landing .demo-card .form-control {
  border: 0;
  border-radius: 0;
  min-height: 44px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  box-shadow: none;
}
.wit-landing .demo-card textarea.form-control { min-height: 100px; }
.wit-landing .demo-card .form-control:focus {
  background: rgba(255, 255, 255, .27);
  color: #fff;
  outline: 2px solid rgba(255, 255, 255, .7);
}

/* ---------------------------------------------------------------------
   5) PARTNERS
   --------------------------------------------------------------------- */
.wit-landing .partners-section { border-bottom: 1px solid var(--line); }
.wit-landing .partner-logo {
  background: #d8d8d8;
  min-height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .74rem;
  letter-spacing: .12em;
}

/* ---------------------------------------------------------------------
   6) METRICS (risultati)
   --------------------------------------------------------------------- */
.wit-landing .metric-card { border: 2px solid var(--brand); background: #fff; font-size: .88rem; }
.wit-landing .metric-icon {
  width: 42px;
  height: 42px;
  border-radius: .4rem;
  background: #dedede;
  display: grid;
  place-items: center;
  color: #222;
  font-size: 1.2rem;
}
.wit-landing .metric-value {
  color: var(--brand);
  font-size: 2.05rem;
  line-height: 1;
  font-weight: 800;
  margin: 1rem 0 .35rem;
}

/* ---------------------------------------------------------------------
   7) FEATURES (funzionalita')
   --------------------------------------------------------------------- */
.wit-landing .features-section { background: var(--surface); }
.wit-landing .feature-item { border-right: 1px solid #d4d4d4; font-size: .85rem; }
.wit-landing .feature-grid > div:nth-child(4n) .feature-item { border-right: 0; }
.wit-landing .feature-grid > div:nth-child(-n+4) .feature-item { border-bottom: 1px solid #d4d4d4; }
.wit-landing .feature-icon { color: var(--brand); font-size: 2rem; }

/* ---------------------------------------------------------------------
   8) DASHBOARD
   --------------------------------------------------------------------- */
.wit-landing .dashboard-list li { margin-bottom: .55rem; color: var(--brand); font-weight: 500; }
.wit-landing .dashboard-list i { margin-right: .45rem; }
.wit-landing .dashboard-visual::after {
  content: "";
  position: absolute;
  inset: 8% -4% -5% 9%;
  border-radius: 1.5rem;
  background: rgba(181, 18, 27, .08);
  z-index: -1;
}

/* ---------------------------------------------------------------------
   9) PROCESS (come funziona)
   --------------------------------------------------------------------- */
.wit-landing .process-intro { max-width: 780px; }
.wit-landing .process-row::before {
  content: "";
  position: absolute;
  left: 16.7%;
  right: 16.7%;
  top: 27px;
  height: 1px;
  background: rgba(255, 255, 255, .55);
}
.wit-landing .process-step { position: relative; }
.wit-landing .step-number {
  width: 54px;
  height: 54px;
  border: 2px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto;
  background: var(--brand);
  position: relative;
  z-index: 2;
  font-weight: 700;
}
.wit-landing .process-step p { font-size: .88rem; opacity: .94; }

/* ---------------------------------------------------------------------
   10) TESTIMONIANZE
   --------------------------------------------------------------------- */
.wit-landing .testimonial-card { border: 1.5px solid #6e747b; background: #fff; font-size: .9rem; }
.wit-landing .stars { color: var(--brand); letter-spacing: .11em; font-size: 1.05rem; }
.wit-landing .testimonial-card .review { min-height: 105px; }

/* ---------------------------------------------------------------------
   11) FINAL CTA
   --------------------------------------------------------------------- */
.wit-landing .final-copy { max-width: 760px; color: #fff; }

/* ---------------------------------------------------------------------
   12) FAQ / ACCORDION (tipo_blocco = accordion)
   --------------------------------------------------------------------- */
.wit-landing section.accordion { background: var(--surface); }
.wit-landing section.accordion .container { max-width: 860px; }

/* titolo sezione (sopra-titolo) */
.wit-landing section.accordion .sopra-titolo-wrapper { text-align: center; margin-bottom: 2.5rem; }
.wit-landing section.accordion .sopra-titolo {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

/* singola card della FAQ */
.wit-landing section.accordion .card {
  border: 1px solid #e3e3e3;
  border-radius: .75rem;
  background: #fff;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.wit-landing section.accordion .card:hover { box-shadow: 0 .5rem 1.2rem rgba(0, 0, 0, .08); }

.wit-landing section.accordion .card-header {
  background: transparent;
  border: 0;
  padding: 0;
}

/* la domanda (bottone) */
.wit-landing section.accordion .card-header .btn-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.15rem 1.4rem;
  text-align: left;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
  border-radius: 0;
  white-space: normal;
  transition: color .2s ease;
}
.wit-landing section.accordion .card-header .btn-link:hover,
.wit-landing section.accordion .card-header .btn-link:focus { color: var(--brand); text-decoration: none; box-shadow: none; }

/* chevron a destra che ruota quando la card e' aperta */
.wit-landing section.accordion .card-header .btn-link::after {
  content: "";
  flex: 0 0 auto;
  width: .62rem;
  height: .62rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .25s ease;
  margin-top: -.2rem;
}
.wit-landing section.accordion .card-header .btn-link:not(.collapsed) { color: var(--brand); }
.wit-landing section.accordion .card-header .btn-link:not(.collapsed)::after { transform: rotate(-135deg); margin-top: .12rem; }

/* la risposta */
.wit-landing section.accordion .card-body {
  padding: 0 1.4rem 1.3rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .wit-landing .hero-section { min-height: auto; }
  .wit-landing .display-3 { font-size: clamp(2.5rem, 9vw, 4.25rem); }
  .wit-landing .feature-grid > div .feature-item { border-bottom: 1px solid #d4d4d4; }
  .wit-landing .feature-grid > div:nth-child(even) .feature-item { border-right: 0; }
  .wit-landing .process-row::before { display: none; }
}

@media (max-width: 575.98px) {
  .wit-landing .py-lg-6 { padding-top: 4.5rem !important; padding-bottom: 4.5rem !important; }
  .wit-landing .hero-section { padding-top: 3.5rem !important; }
  .wit-landing .hero-section h1 { font-size: 2.65rem; }
  .wit-landing .hero-copy { font-size: .98rem; }
  .wit-landing .feature-grid > div .feature-item { border-right: 0; border-bottom: 1px solid #d4d4d4; }
  .wit-landing .display-6 { font-size: 2rem; }
  .wit-landing .final-cta h2 { font-size: 2.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .wit-landing *, .wit-landing *::before, .wit-landing *::after { transition: none !important; }
}
