/* Mail2Wa, proposta 3 "Conversazioni che lavorano". Solo pagine WordPress interne. */
:root {
  --m2wa-ink: oklch(22% 0.1 283);
  --m2wa-ink-soft: oklch(35% 0.07 283);
  --m2wa-purple: oklch(48% 0.17 321);
  --m2wa-purple-deep: oklch(36% 0.15 313);
  --m2wa-lime: oklch(83% 0.19 121);
  --m2wa-lime-soft: oklch(92% 0.105 121);
  --m2wa-sky: oklch(93% 0.034 242);
  --m2wa-sky-soft: oklch(97% 0.016 318);
  --m2wa-paper: oklch(99% 0.008 318);
  --m2wa-line: oklch(84% 0.028 255);
  --m2wa-muted: oklch(49% 0.035 276);
  --m2wa-shadow: 0 22px 60px oklch(22% 0.1 283 / 0.12);
  --m2wa-wrap: min(1180px, calc(100vw - 40px));
}

body.m2wa-restyle {
  overflow-x: clip;
  background: var(--m2wa-paper);
  color: var(--m2wa-ink);
  font-family: "Poppins", "Roboto", system-ui, sans-serif;
  text-rendering: optimizeLegibility;
}

body.m2wa-restyle :where(#m2wa-topbar, .elementor-location-header, .elementor-location-single, .elementor-location-footer)
  :where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--m2wa-lime);
  outline-offset: 3px;
}

body.m2wa-restyle :where(#m2wa-topbar, .elementor-location-header, .elementor-location-single, .elementor-location-footer)
  :where(p, li, label, input, select, textarea) {
  font-family: "Poppins", "Roboto", system-ui, sans-serif;
}

/* Topbar esistente, contenuto invariato. */
body.m2wa-restyle #m2wa-topbar {
  min-height: 42px;
  border-bottom: 2px solid var(--m2wa-lime);
  background: var(--m2wa-ink) !important;
  color: var(--m2wa-paper) !important;
  font-family: "Poppins", system-ui, sans-serif !important;
}

body.m2wa-restyle #m2wa-topbar a {
  border-radius: 999px !important;
  background: var(--m2wa-lime) !important;
  color: var(--m2wa-ink) !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

/* Header Elementor: più compatto, stessa gerarchia della homepage V3. */
body.m2wa-restyle .elementor-location-header {
  position: sticky;
  top: 0;
  z-index: 9990;
  background: oklch(99% 0.008 318 / 0.97);
  box-shadow: 0 12px 40px oklch(22% 0.1 283 / 0.08);
  backdrop-filter: saturate(130%) blur(16px);
}

body.m2wa-restyle .elementor-location-header :is([data-id="bdf0d09"], [data-id="66d80dc9"]) {
  display: grid !important;
  grid-template-columns: 126px minmax(0, 1fr) 148px;
  align-items: center !important;
  width: var(--m2wa-wrap) !important;
  max-width: none !important;
  min-height: 82px !important;
  margin-inline: auto !important;
  padding: 9px 0 !important;
  background: transparent !important;
  gap: clamp(18px, 2.3vw, 34px) !important;
}

body.m2wa-restyle .elementor-location-header :is([data-id="bb6f3de"], [data-id="3b67af72"]) {
  width: 126px !important;
  min-width: 0 !important;
  justify-self: start;
}

body.m2wa-restyle .elementor-location-header :is([data-id="f9470fe"], [data-id="335d60fd"]) img {
  width: auto !important;
  max-height: 58px !important;
  object-fit: contain;
}

body.m2wa-restyle .elementor-location-header :is([data-id="e19ee07"], [data-id="4d07f296"]) {
  width: 100% !important;
  min-width: 0 !important;
  justify-self: center;
}

body.m2wa-restyle .elementor-location-header :is([data-id="c02e26b"], [data-id="6236aebd"]) {
  display: flex !important;
  width: 148px !important;
  min-width: 0 !important;
  justify-self: end;
  justify-content: flex-end !important;
}

body.m2wa-restyle .elementor-location-header :is([data-id="c550031"], [data-id="c3aa91"]) a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

body.m2wa-restyle .elementor-location-header :is([data-id="c550031"], [data-id="c3aa91"]) img {
  width: 141px !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 40px !important;
  object-fit: contain;
}

body.m2wa-restyle .elementor-location-header .elementor-nav-menu--main ul {
  display: flex;
  justify-content: center;
  gap: 2px;
  width: 100%;
}

body.m2wa-restyle .elementor-location-header .elementor-nav-menu--main .elementor-item {
  min-height: 44px;
  padding: 11px clamp(7px, 0.72vw, 11px) !important;
  border-radius: 999px;
  color: var(--m2wa-ink) !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  transition: color 180ms ease, background-color 180ms ease;
}

body.m2wa-restyle .elementor-location-header .elementor-nav-menu--main .elementor-item::after {
  display: none !important;
}

body.m2wa-restyle .elementor-location-header .elementor-nav-menu--main .elementor-item:hover,
body.m2wa-restyle .elementor-location-header .elementor-nav-menu--main .elementor-item-active {
  background: var(--m2wa-purple) !important;
  color: var(--m2wa-paper) !important;
}

body.m2wa-restyle .elementor-location-header .elementor-menu-toggle {
  border-radius: 16px;
  background: var(--m2wa-purple) !important;
  color: var(--m2wa-paper) !important;
}

body.m2wa-restyle .elementor-location-header .elementor-nav-menu--dropdown {
  margin-top: 12px !important;
  border-radius: 22px;
  background: var(--m2wa-ink) !important;
  box-shadow: var(--m2wa-shadow);
  overflow: hidden;
}

body.m2wa-restyle .elementor-location-header .elementor-nav-menu--dropdown .elementor-item {
  color: var(--m2wa-paper) !important;
  font-weight: 650 !important;
}

body.m2wa-restyle .elementor-location-header .elementor-nav-menu--dropdown .elementor-item:hover,
body.m2wa-restyle .elementor-location-header .elementor-nav-menu--dropdown .elementor-item-active {
  background: var(--m2wa-purple) !important;
}

/* Corpo pagina. */
body.m2wa-restyle .elementor-location-single {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background:
    radial-gradient(circle at 8% 7%, oklch(92% 0.045 241 / 0.72), transparent 28rem),
    var(--m2wa-paper);
  color: var(--m2wa-ink);
}

body.m2wa-restyle .elementor-location-single::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 8rem;
  right: -11rem;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: var(--m2wa-sky);
  opacity: 0.72;
  filter: blur(2px);
}

body.m2wa-restyle .elementor-widget-theme-page-title {
  margin: 0 !important;
  padding: clamp(38px, 6vw, 76px) max(20px, calc((100vw - 1180px) / 2)) !important;
  background: var(--m2wa-purple) !important;
  color: var(--m2wa-paper) !important;
}

body.m2wa-restyle .elementor-widget-theme-page-title .elementor-heading-title {
  max-width: 18ch;
  margin: 0 !important;
  color: var(--m2wa-paper) !important;
  font-family: "Poppins", system-ui, sans-serif !important;
  font-size: clamp(2.2rem, 5vw, 4.8rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.045em;
  line-height: 0.98 !important;
  text-wrap: balance;
}

body.m2wa-restyle .elementor-widget-theme-post-content > .elementor-widget-container {
  padding-block: clamp(28px, 5vw, 72px);
}

body.m2wa-restyle .elementor-location-single :where(h1, h2, h3, h4) {
  color: var(--m2wa-purple-deep);
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}

body.m2wa-restyle .elementor-location-single h1 {
  font-size: clamp(2.3rem, 5vw, 4.7rem);
}

body.m2wa-restyle .elementor-location-single h2 {
  font-size: clamp(1.9rem, 3.4vw, 3.2rem);
}

body.m2wa-restyle .elementor-location-single h3 {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

body.m2wa-restyle .elementor-location-single :where(p, li) {
  color: var(--m2wa-ink-soft);
  font-size: clamp(1rem, 0.3vw + 0.94rem, 1.12rem);
  line-height: 1.75;
}

body.m2wa-restyle .elementor-location-single a:not(.elementor-button) {
  color: var(--m2wa-purple);
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.2em;
}

body.m2wa-restyle .elementor-location-single img,
body.m2wa-restyle .elementor-location-single video,
body.m2wa-restyle .elementor-location-single iframe {
  max-width: 100%;
  border-radius: 28px;
}

body.m2wa-restyle .elementor-location-single video,
body.m2wa-restyle .elementor-location-single iframe {
  box-shadow: var(--m2wa-shadow);
}

/* CTA e controlli. */
body.m2wa-restyle .elementor-button,
body.m2wa-restyle .elementor-location-single button:not(.elementor-menu-toggle),
body.m2wa-restyle .elementor-location-single input[type="submit"] {
  min-height: 48px;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--m2wa-purple) !important;
  color: var(--m2wa-paper) !important;
  font-family: "Poppins", system-ui, sans-serif !important;
  font-weight: 800 !important;
  box-shadow: 0 14px 34px oklch(48% 0.17 321 / 0.22) !important;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 180ms ease;
}

body.m2wa-restyle .elementor-button:hover,
body.m2wa-restyle .elementor-location-single button:not(.elementor-menu-toggle):hover,
body.m2wa-restyle .elementor-location-single input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px oklch(48% 0.17 321 / 0.28) !important;
}

body.m2wa-restyle .elementor-location-single :where(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), select, textarea) {
  min-height: 50px;
  border: 2px solid var(--m2wa-line) !important;
  border-radius: 16px !important;
  background: var(--m2wa-paper) !important;
  color: var(--m2wa-ink) !important;
  box-shadow: none !important;
}

body.m2wa-restyle .elementor-location-single textarea {
  min-height: 138px;
}

body.m2wa-restyle .elementor-location-single :where(input, select, textarea):focus {
  border-color: var(--m2wa-purple) !important;
}

/* FAQ e contenuti espandibili. */
body.m2wa-restyle .elementor-accordion {
  display: grid;
  gap: 12px;
}

body.m2wa-restyle .elementor-accordion-item {
  border: 0 !important;
  border-radius: 20px;
  background: var(--m2wa-paper);
  box-shadow: 0 10px 34px oklch(22% 0.1 283 / 0.08);
  overflow: hidden;
}

body.m2wa-restyle .elementor-accordion .elementor-tab-title {
  min-height: 58px;
  padding: 18px 20px !important;
  border: 0 !important;
  color: var(--m2wa-ink) !important;
  font-weight: 750 !important;
}

body.m2wa-restyle .elementor-accordion .elementor-tab-title.elementor-active {
  background: var(--m2wa-purple) !important;
  color: var(--m2wa-paper) !important;
}

body.m2wa-restyle .elementor-accordion .elementor-tab-content {
  padding: 20px !important;
  border: 0 !important;
  background: var(--m2wa-sky-soft);
}

/* Tabelle e testi legali. */
body.m2wa-restyle .m2wa-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 20px;
  box-shadow: 0 10px 30px oklch(22% 0.1 283 / 0.08);
}

body.m2wa-restyle table {
  width: 100%;
  border-collapse: collapse;
  background: var(--m2wa-paper);
}

body.m2wa-restyle :where(th, td) {
  padding: 14px 16px !important;
  border-color: var(--m2wa-line) !important;
  color: var(--m2wa-ink-soft);
  text-align: left;
}

body.m2wa-restyle th {
  background: var(--m2wa-purple-deep);
  color: var(--m2wa-paper);
}

body.m2wa-restyle:is(.page-id-799, .page-id-801, .page-id-810, .page-id-879, .page-id-2479)
  .elementor-widget-theme-post-content .elementor-widget-container {
  max-width: 900px;
  margin-inline: auto;
}

/* Funnel: design coerente, struttura funzionale intatta. */
body.m2wa-restyle-flow .elementor-widget-theme-post-content > .elementor-widget-container {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
}

body.m2wa-restyle-flow form {
  border-radius: 28px;
  background: var(--m2wa-paper);
  box-shadow: var(--m2wa-shadow);
}

/* Footer Elementor, contenuti e link invariati. */
body.m2wa-restyle .elementor-location-footer {
  position: relative;
  background: var(--m2wa-ink);
  color: var(--m2wa-paper);
}

body.m2wa-restyle .elementor-location-footer [data-id="5ad1bdc"] {
  padding: 0 !important;
  background: var(--m2wa-ink) !important;
}

body.m2wa-restyle .elementor-location-footer [data-id="5ad1bdc"] > .e-con-inner {
  width: var(--m2wa-wrap) !important;
  max-width: none !important;
  padding-block: 0 48px;
}

body.m2wa-restyle .elementor-location-footer [data-id="c348099"] {
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  padding: 22px max(20px, calc((100vw - 1180px) / 2)) !important;
  background: var(--m2wa-purple) !important;
}

body.m2wa-restyle .elementor-location-footer [data-id="c348099"] h2,
body.m2wa-restyle .elementor-location-footer [data-id="c348099"] a {
  margin: 0 !important;
  color: var(--m2wa-paper) !important;
  font-family: "Poppins", system-ui, sans-serif !important;
  font-size: clamp(1rem, 1.5vw, 1.3rem) !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  text-align: center;
  text-decoration: none !important;
}

body.m2wa-restyle .elementor-location-footer [data-id="3564903"] {
  display: grid !important;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  width: var(--m2wa-wrap) !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-inline: auto !important;
  gap: clamp(28px, 5vw, 64px);
  padding-top: 48px;
}

body.m2wa-restyle .elementor-location-footer [data-id="3564903"] > .e-con {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
}

body.m2wa-restyle .elementor-location-footer :where(p, li, span) {
  color: oklch(91% 0.02 285) !important;
  font-family: "Poppins", system-ui, sans-serif !important;
  line-height: 1.65;
}

body.m2wa-restyle .elementor-location-footer a {
  color: var(--m2wa-paper) !important;
}

body.m2wa-restyle .elementor-location-footer svg {
  color: var(--m2wa-lime) !important;
  fill: currentColor !important;
}

@media (max-width: 1024px) {
  body.m2wa-restyle .elementor-location-header :is([data-id="bdf0d09"], [data-id="66d80dc9"]) {
    grid-template-columns: 116px minmax(52px, 1fr) 130px;
    min-height: 74px !important;
  }

  body.m2wa-restyle .elementor-location-footer [data-id="3564903"] {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  :root {
    --m2wa-wrap: min(100% - 28px, 1180px);
  }

  body.m2wa-restyle #m2wa-topbar {
    font-size: 0.75rem !important;
  }

  body.m2wa-restyle .elementor-location-header :is([data-id="bdf0d09"], [data-id="66d80dc9"]) {
    grid-template-columns: 92px minmax(44px, 1fr) 104px;
    min-height: 68px !important;
    padding-block: 8px !important;
    gap: 12px !important;
  }

  body.m2wa-restyle .elementor-location-header :is([data-id="bb6f3de"], [data-id="3b67af72"]) {
    width: 92px !important;
  }

  body.m2wa-restyle .elementor-location-header :is([data-id="f9470fe"], [data-id="335d60fd"]) img {
    max-height: 48px !important;
  }

  body.m2wa-restyle .elementor-location-header :is([data-id="c02e26b"], [data-id="6236aebd"]) {
    width: 104px !important;
  }

  body.m2wa-restyle .elementor-location-header :is([data-id="c550031"], [data-id="c3aa91"]) img {
    width: 104px !important;
    max-height: 30px !important;
  }

  body.m2wa-restyle .elementor-widget-theme-page-title {
    padding-inline: 20px !important;
  }

  body.m2wa-restyle .elementor-location-single::before {
    right: -15rem;
  }

  body.m2wa-restyle .elementor-location-footer [data-id="3564903"] {
    grid-template-columns: 1fr;
    padding-inline: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.m2wa-restyle :where(.elementor-location-header, .elementor-location-single, .elementor-location-footer) *,
  body.m2wa-restyle :where(.elementor-location-header, .elementor-location-single, .elementor-location-footer) *::before,
  body.m2wa-restyle :where(.elementor-location-header, .elementor-location-single, .elementor-location-footer) *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

