/* ============================================================
   style.css — Stile ufficiale Webbin24 (area affiliati)
   Identico a webbin24.com / GDPR. Palette nero/grigio/bianco,
   font DM Sans + DM Serif Display.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=DM+Serif+Display&display=swap');

:root {
  --wb-black:#0B0B0B; --wb-dark:#1F1F1F; --wb-gray:#262626;
  --wb-border:#3F3F46; --wb-muted:#71717A; --wb-light:#D4D4D8;
  --wb-bg:#e5e5e5; --wb-bg2:#F5F5F5; --wb-white:#FFFFFF; --wb-text:#111111;
  --wb-green:#22C55E; --wb-red:#EF4444; --wb-amber:#F59E0B;
  --wb-radius:14px; --wb-grid:44px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family:'DM Sans',sans-serif; background:var(--wb-bg); color:var(--wb-text); line-height:1.6; min-height:100vh; display:flex; flex-direction:column; }

/* ── NAVBAR ── */
nav.wb-navbar { position:sticky; top:0; z-index:1000; background:var(--wb-gray); border-bottom:1px solid var(--wb-border); padding:0 2rem; height:86px; display:flex; align-items:center; justify-content:space-between; }
.wb-logo { display:flex; align-items:center; text-decoration:none; height:86px; width:300px; overflow:hidden; }
.wb-logo-img { height:74px; width:auto; max-width:280px; display:block; object-fit:contain; }
.wb-nav-links { display:flex; align-items:center; gap:1.6rem; list-style:none; }
.wb-nav-links a { color:var(--wb-light); text-decoration:none; font-size:0.92rem; font-weight:600; transition:color .2s; }
.wb-nav-links a:hover { color:var(--wb-white); }
.wb-nav-cta { background:var(--wb-white) !important; color:var(--wb-gray) !important; padding:0.55rem 1.2rem; border-radius:8px; font-weight:700 !important; }
.wb-nav-cta:hover { background:var(--wb-light) !important; color:var(--wb-text) !important; }
.wb-hamburger { display:none; background:none; border:none; cursor:pointer; padding:4px; }
.wb-hamburger span { display:block; width:24px; height:2px; background:var(--wb-white); margin:5px 0; border-radius:2px; }

/* ── AREA CENTRALE con griglia ── */
.wb-main { flex:1; position:relative; overflow:hidden; background:linear-gradient(180deg,var(--wb-bg2) 0%,var(--wb-bg) 100%); display:flex; align-items:center; justify-content:center; padding:60px 24px; }
.wb-main::before { content:''; position:absolute; inset:0; background-image:linear-gradient(rgba(0,0,0,0.04) 1px,transparent 1px),linear-gradient(90deg,rgba(0,0,0,0.04) 1px,transparent 1px); background-size:var(--wb-grid) var(--wb-grid); pointer-events:none; }

/* ── CARD ── */
.wb-card { position:relative; z-index:1; background:var(--wb-white); border:1px solid var(--wb-light); border-radius:var(--wb-radius); padding:40px; max-width:440px; width:100%; box-shadow:0 1px 2px rgba(0,0,0,0.04),0 4px 12px rgba(0,0,0,0.03); }
.wb-card.wide { max-width:720px; }
.wb-badge { display:inline-flex; align-items:center; gap:8px; background:var(--wb-bg2); border:1px solid var(--wb-light); border-radius:999px; padding:0.4rem 0.9rem; font-size:0.72rem; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:var(--wb-gray); margin-bottom:20px; }
.wb-card h1 { font-family:'DM Serif Display',serif; font-size:2rem; line-height:1.15; color:var(--wb-text); margin-bottom:10px; letter-spacing:-0.5px; }
.wb-card .muted { color:var(--wb-muted); font-size:0.95rem; line-height:1.6; margin-bottom:26px; }

/* ── FORM ── */
label { display:block; font-size:0.82rem; font-weight:600; margin-bottom:7px; color:var(--wb-border); }
input[type=email], input[type=text], select { width:100%; padding:0.8rem 0.9rem; border:1px solid var(--wb-light); border-radius:8px; font-size:0.95rem; font-family:inherit; color:var(--wb-text); margin-bottom:18px; background:var(--wb-white); }
input:focus, select:focus { outline:none; border-color:var(--wb-gray); }
.btn-primary { display:inline-flex; align-items:center; justify-content:center; gap:0.5rem; width:100%; background:var(--wb-gray); color:var(--wb-white); padding:0.85rem 1.7rem; border-radius:8px; font-weight:700; font-size:0.95rem; border:1px solid var(--wb-gray); text-decoration:none; cursor:pointer; font-family:inherit; transition:all .2s; }
.btn-primary:hover { background:var(--wb-border); border-color:var(--wb-border); }
.btn-secondary { display:inline-flex; align-items:center; justify-content:center; gap:0.5rem; width:100%; background:var(--wb-white); border:1px solid var(--wb-light); color:var(--wb-gray); padding:0.85rem 1.45rem; border-radius:8px; font-size:0.92rem; font-weight:600; text-decoration:none; cursor:pointer; font-family:inherit; transition:all .2s; }
.btn-secondary:hover { border-color:var(--wb-gray); color:var(--wb-text); background:var(--wb-bg2); }

/* ── ALERT ── */
.alert { padding:0.8rem 0.9rem; border-radius:8px; font-size:0.85rem; line-height:1.5; margin-bottom:20px; }
.alert a { color:inherit; font-weight:700; }
.alert-ok { background:#DCFCE7; color:#166534; border:1px solid #86EFAC; }
.alert-err { background:#FEE2E2; color:#991B1B; border:1px solid #FCA5A5; }
.alert-warn { background:#FEF3C7; color:#92400E; border:1px solid #FCD34D; }

/* ── FOOTER ── */
footer.wb-footer { background:var(--wb-dark); border-top:1px solid var(--wb-border); padding:2.5rem 1.5rem 2rem; }
.wb-footer-inner { max-width:1120px; margin:0 auto; display:flex; flex-direction:column; align-items:center; gap:1.3rem; text-align:center; }
.wb-footer-logo img { height:70px; width:auto; max-width:300px; object-fit:contain; display:block; margin:0 auto; }
.wb-footer-social { display:flex; gap:1.25rem; }
.wb-footer-social a { color:var(--wb-light); font-size:0.9rem; text-decoration:none; transition:color .2s; }
.wb-footer-social a:hover { color:var(--wb-white); }
.wb-footer-nav { display:flex; gap:1.4rem; flex-wrap:wrap; justify-content:center; list-style:none; }
.wb-footer-nav a { color:var(--wb-light); font-size:0.86rem; text-decoration:none; transition:color .2s; }
.wb-footer-nav a:hover { color:var(--wb-white); }
.wb-footer-legal { color:var(--wb-muted); font-size:0.78rem; line-height:1.8; }

/* ── GENERATORE BANNER ── */
.gen-controls { display:flex; gap:16px; flex-wrap:wrap; margin:8px 0 24px; }
.gen-field { flex:1; min-width:160px; }
.gen-field select { cursor:pointer; margin-bottom:0; }
.gen-preview { background:var(--wb-bg); border:1px solid var(--wb-light); border-radius:12px; padding:24px; display:flex; justify-content:center; align-items:center; min-height:200px; margin-bottom:20px; overflow:auto; }
.gen-preview canvas { max-width:100%; box-shadow:0 4px 16px rgba(0,0,0,0.12); border-radius:4px; }
.gen-actions { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:24px; }
.gen-actions .btn-primary, .gen-actions .btn-secondary { width:auto; flex:0 0 auto; }
.gen-link input { width:100%; margin-bottom:0; }

/* ── RESPONSIVE ── */
@media(max-width:768px) {
  nav.wb-navbar { height:76px; padding:0 1rem; }
  .wb-logo { height:76px; width:210px; }
  .wb-logo-img { height:58px; max-width:200px; }
  .wb-nav-links { display:none; position:absolute; top:76px; left:0; right:0; background:var(--wb-gray); border-bottom:1px solid var(--wb-border); flex-direction:column; padding:1rem 1.5rem; gap:1rem; }
  .wb-nav-links.open { display:flex; }
  .wb-hamburger { display:block; }
  .wb-footer-logo img { height:56px; max-width:240px; }
  .wb-card h1 { font-size:1.6rem; }
}

/* ── Embed code ── */
.gen-embed { margin-top:24px; padding-top:24px; border-top:1px solid var(--wb-light); }
.gen-embed code { background:#f0f0f0; padding:2px 5px; border-radius:4px; font-family:'IBM Plex Mono',monospace; font-size:0.78rem; color:#111; }
.gen-embed textarea:focus { outline:none; border-color:var(--wb-gray); }
