/* ===========================================================
   PLCinCloud — light theme override
   Da caricare DOPO site.css. Ribalta i background scuri in chiari
   mantenendo accenti viola/teal e tipografia.
   =========================================================== */

:root, body {
  /* palette base ribaltata */
  --bg-deep:  #ffffff;
  --bg-1:     #ffffff;
  --bg-2:     #f7f7fb;
  --bg-3:     #eef0f7;
  --bg-card:  rgba(0,0,0,0.025);

  --line-1: rgba(31,27,58,0.08);
  --line-2: rgba(31,27,58,0.14);
  --line-3: rgba(31,27,58,0.24);

  --fg-1: #1F1B3A;
  --fg-2: #4A4567;
  --fg-3: #7B7795;
  --fg-mute: #A4A0BD;
}

body {
  background: #ffffff !important;
  color: #1F1B3A !important;
}

/* ---------- Nav ---------- */
.nav {
  background: rgba(255,255,255,0.92) !important;
  border-bottom: 1px solid rgba(31,27,58,0.08) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-links a, .nav-links .nav-item-toggle { color: #4A4567 !important; }
.nav-links a:hover, .nav-links .nav-item-toggle:hover { color: #1F1B3A !important; }
.link-quiet { color: #4A4567 !important; }
.link-quiet:hover { color: #1F1B3A !important; }

/* Dropdown desktop light theme */
.nav-dropdown {
  background: rgba(255,255,255,0.98) !important;
  border-color: rgba(31,27,58,0.10) !important;
  box-shadow: 0 16px 48px rgba(31,27,58,0.16) !important;
}
.nav-dropdown > a { color: #1F1B3A !important; }
.nav-dropdown > a:hover { background: rgba(124,91,216,0.10) !important; color: #1F1B3A !important; }
.nav-dropdown > a.dd-muted { color: #7B7795 !important; }
.nav-dropdown hr { border-top-color: rgba(31,27,58,0.08) !important; }
.nav-dropdown .dd-all { color: #6B47C9 !important; }
.mega-col > a { color: #1F1B3A !important; }
.mega-col > a:hover { background: rgba(124,91,216,0.10) !important; }
.mega-cat { border-bottom-color: rgba(31,27,58,0.08) !important; }
.mega-foot { border-top-color: rgba(31,27,58,0.08) !important; }
.nav-toggle span { background: #1F1B3A !important; }

.nav-mobile { background: #ffffff !important; }
.nav-mobile a { color: #1F1B3A !important; }
.nav-mobile-inner a { border-bottom: 1px solid rgba(31,27,58,0.08) !important; }
.nav-mobile-inner a:hover { background: rgba(31,27,58,0.04) !important; }
.nav-mobile-inner a.btn { border-bottom: 0 !important; }
.nav-mobile-inner a.btn:hover { background: linear-gradient(90deg, #6B47C9 0%, #1FA382 100%) !important; }
.nav-mobile-head { border-bottom-color: rgba(31,27,58,0.10) !important; background: #ffffff !important; }
.nav-mobile-brand img { filter: none !important; }
.nav-mobile-close {
  background: rgba(31,27,58,0.04) !important;
  border-color: rgba(31,27,58,0.14) !important;
  color: #1F1B3A !important;
}
.nav-mobile-close:hover { background: rgba(31,27,58,0.08) !important; }
.nav-mobile-backdrop { background: rgba(31,27,58,0.45) !important; }

/* hamburger button visibile su sfondo bianco */
.nav-toggle {
  background: rgba(31,27,58,0.04) !important;
  border-color: rgba(31,27,58,0.14) !important;
}
.nav-toggle:hover { background: rgba(31,27,58,0.08) !important; }

/* brand sul nav light: rimuovi inversione bianca */
.nav-brand img { filter: none !important; }

/* ---------- Generici ---------- */
.btn {
  background: #ffffff !important;
  border: 1px solid rgba(31,27,58,0.16) !important;
  color: #1F1B3A !important;
}
.btn:hover { background: #f7f7fb !important; border-color: rgba(31,27,58,0.28) !important; }
.btn-primary {
  background: linear-gradient(90deg, #7C5BD8 0%, #27C19F 100%) !important;
  color: #fff !important;
  border: 0 !important;
}
.btn-ghost { background: transparent !important; border-color: rgba(31,27,58,0.14) !important; }

.tag {
  background: rgba(31,27,58,0.06) !important;
  color: #4A4567 !important;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f7f7fb 100%) !important;
  color: #1F1B3A !important;
}
.hero-sub { color: #4A4567 !important; }
.hero-sub strong { color: #1F1B3A !important; }
.hero-meta { color: #7B7795 !important; }
.hero-foot, .hero-pill {
  background: rgba(39,193,159,0.10) !important;
  border: 1px solid rgba(39,193,159,0.30) !important;
  color: #1FA382 !important;
}

/* ---------- Sezioni generiche ---------- */
section { background: #ffffff; }
section:nth-of-type(even), .sec-alt { background: #f7f7fb; }
.sec-title, h1, h2, h3, h4 { color: #1F1B3A !important; }
.sec-sub, .lead, p { color: #4A4567 !important; }
.dim, .small, .meta { color: #7B7795 !important; }

/* ---------- Card / box generici ---------- */
.card, .module-card, .feature, .step, .protocol, .faq-item, .price, .testi,
.box, .panel, .info-box {
  background: #ffffff !important;
  border: 1px solid rgba(31,27,58,0.08) !important;
  box-shadow: 0 1px 2px rgba(31,27,58,0.04), 0 8px 24px rgba(31,27,58,0.04) !important;
  color: #1F1B3A !important;
}
.card:hover, .module-card:hover, .feature:hover {
  box-shadow: 0 1px 2px rgba(31,27,58,0.06), 0 12px 32px rgba(124,91,216,0.10) !important;
  border-color: rgba(124,91,216,0.25) !important;
}
.card-head { border-bottom: 1px solid rgba(31,27,58,0.08) !important; }

/* ---------- Mockup (lascio scuro: simula admin che è dark) ---------- */
/* nessun override sui .mock-* */

/* ---------- Footer ---------- */
footer, .footer {
  background: #15112B !important;
  color: #B5AFD0 !important;
}
footer a, .footer a { color: #F4F2FB !important; }
footer .dim, .footer .dim { color: #7E78A0 !important; }

/* ---------- FAQ ---------- */
.faq-q { color: #1F1B3A !important; }
.faq-a { color: #4A4567 !important; }
details summary { color: #1F1B3A !important; }

/* ---------- Protocolli / icone ---------- */
.protocol b, .protocol strong { color: #1F1B3A !important; }
.protocol { background: #ffffff !important; }

/* ---------- Steps / numbered ---------- */
.step-num, .step-icon {
  background: linear-gradient(135deg, #7C5BD8 0%, #27C19F 100%) !important;
  color: #fff !important;
}

/* ---------- Misc ---------- */
hr { border-color: rgba(31,27,58,0.08) !important; }
code, pre {
  background: rgba(124,91,216,0.06) !important;
  color: #6B47C9 !important;
  border: 1px solid rgba(124,91,216,0.18) !important;
}

/* Tutte le aree con bg rgba bianchi (su scuro) → adeguale a nero (su bianco) */
[style*="background: rgba(255,255,255,0.025)"],
[style*="background: rgba(255,255,255,0.04)"],
[style*="background: rgba(255,255,255,0.06)"],
[style*="background: rgba(255,255,255,0.08)"],
[style*="background: rgba(255,255,255,0.10)"],
[style*="background: rgba(255,255,255,0.15)"] {
  background: #f7f7fb !important;
}

/* ---------- Selezione testo ---------- */
::selection { background: rgba(124,91,216,0.20); color: #1F1B3A; }
