:root{
  --blue-main:#004080;
  --accent:#cc6600;
  --card-bg:#f7f9fc;
  --border-soft:#dde6f5;
  --pill-blue:#0066cc;
  --pill-blue-dark:#003366;
}

*{box-sizing:border-box;}

body{
  margin:0;
  font-family:"Poppins",system-ui,-apple-system,"Segoe UI",sans-serif;
  background:radial-gradient(circle at top left, #eef3ff 0, #ffffff 55%, #f5f7ff 100%);
  color:#222;
  line-height:1.65;
}

a{color:#0b4da2;text-decoration:none;}
a:hover{text-decoration:underline;}

header{
  background:linear-gradient(135deg,var(--blue-main),#0060a8);
  color:#fff;
  padding:42px 20px 40px;
  position:relative;
  overflow:hidden;
  text-align:center;
}

header::before, header::after{
  content:"";
  position:absolute;
  border-radius:50%;
  pointer-events:none;
}

header::before{
  width:260px;height:260px;background:rgba(255,255,255,0.08);
  top:-80px;left:-60px;
}

header::after{
  width:420px;height:420px;background:rgba(0,0,0,0.20);
  filter:blur(40px);
  bottom:-220px;right:-120px;
}

.header-inner{position:relative;z-index:1;max-width:900px;margin:0 auto;}

/* BADGE (fix mobile: stringe e non sfonda) */
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 12px;
  border-radius:999px;
  background:rgba(0,0,0,0.38);
  font-size:0.75rem;
  letter-spacing:0.14em;
  text-transform:uppercase;
  margin-bottom:14px;
  color:#f5f7ff;

  /* prima era nowrap: sul mobile può sfondare */
  white-space:normal;
  text-align:center;
  max-width:100%;
  width:fit-content;
  line-height:1.25;
  margin-left:auto;
  margin-right:auto;
}

h1{
  margin:6px 0 6px;
  font-size:1.8rem;
  letter-spacing:0.08em;
  text-transform:uppercase;
  text-shadow:0 1px 0 rgba(0,0,0,0.18), 0 3px 10px rgba(0,0,0,0.35);
}

header p{
  max-width:720px;
  margin:10px auto 0;
  font-weight:300;
  font-size:0.96rem;
  opacity:0.95;
}

main{max-width:1100px;margin:26px auto;padding:0 20px;}

.card{
  background:var(--card-bg);
  border-radius:18px;
  padding:22px;
  border:1px solid var(--border-soft);
  box-shadow:0 10px 26px rgba(0,0,0,0.10);
}

.post-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:18px;
}

.post{
  background:#fff;
  border:1px solid var(--border-soft);
  border-radius:16px;
  padding:16px;
  box-shadow:0 6px 16px rgba(0,0,0,0.06);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.post:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 28px rgba(0,0,0,0.12);
  border-color:rgba(0,102,204,0.4);
}

.post h2{margin:0 0 6px;font-size:1.05rem;color:#123a70;}
.meta{font-size:0.85rem;color:#555;margin-bottom:8px;}

.btn{
  display:inline-block;
  background:#fff;
  color:var(--blue-main);
  padding:10px 18px;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  font-size:0.85rem;
  border:1px solid rgba(0,64,128,0.18);
  transition:transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.btn:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(0,0,0,0.12);opacity:0.95;}
.btn.primary{background:#0073e6;color:#fff;border:none;}
.btn.danger{background:#b00020;color:#fff;border:none;}

.form-row{display:flex;gap:12px;flex-wrap:wrap;}

input[type=text], textarea, input[type=password]{
  width:100%;
  padding:10px 12px;
  border:1px solid #ccdff6;
  border-radius:10px;
  font-family:inherit;
  font-size:0.95rem;
}

textarea{min-height:220px;resize:vertical;}
label{font-weight:600;color:var(--blue-main);font-size:0.85rem;}
.field{margin:12px 0;}

.alert{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(0,64,128,0.18);
  background:#fff;
}

.alert.info{border-color:rgba(0,102,204,0.25);}
.alert.ok{border-color:rgba(0,120,60,0.25);}
.alert.err{border-color:rgba(176,0,32,0.25);}

footer{
  background:#001a33;
  color:#e5ecff;
  padding:22px 20px 18px;
  font-size:0.86rem;
  margin-top:40px;
  border-top:1px solid rgba(255,255,255,0.08);
}

.footer-inner{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  gap:12px;
  justify-content:space-between;
  flex-wrap:wrap;
}

.footer-inner a{color:#e5ecff;}

/* COOKIE BANNER */
.cookie-banner{
  position:fixed;
  left:0;
  bottom:0;
  width:100%;
  background:rgba(0,26,51,0.95);
  backdrop-filter: blur(6px);
  color:#e5ecff;
  z-index:9999;
  padding:14px 16px;
  display:none;
}

.cookie-box{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

.cookie-text{
  font-size:0.82rem;
  line-height:1.5;
  margin:0;
  flex:1 1 320px;
}

.cookie-text a{color:#7fb8ff;}
.cookie-actions{display:flex;gap:10px;flex-wrap:wrap;}

.cookie-btn{
  border-radius:999px;
  padding:8px 16px;
  font-size:0.8rem;
  font-weight:800;
  border:none;
  cursor:pointer;
  white-space:nowrap;
  transition:transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.cookie-btn.primary{background:#ffffff;color:#004080;box-shadow:0 4px 10px rgba(0,0,0,0.25);}
.cookie-btn.secondary{background:transparent;color:#ffffff;border:1px solid rgba(255,255,255,0.5);}
.cookie-btn:hover{transform:translateY(-1px);opacity:0.95;}

/* RESPONSIVE */
@media (max-width:600px){
  nav .container{ padding:10px 14px; gap:10px; }
  nav .links{ gap:6px; }
  nav .links a{ padding:10px 14px; font-size:0.86rem; }
  .cookie-box{flex-direction:column;align-items:flex-start;}

  /* stringo leggermente la badge sul cellulare */
  .badge{
    padding:4px 10px;
    font-size:0.68rem;
    letter-spacing:0.11em;
  }
}

@media (max-width:360px){
  .badge{
    padding:4px 9px;
    font-size:0.66rem;
    letter-spacing:0.10em;
  }
}

