*{box-sizing:border-box}
:root{
  --gp-blue:#2454a6;
  --gp-blue-dark:#173d7a;
  --gp-blue-light:#8ea9f2;
  --hp-navy:#112f68;
  --hp-lime:#b8d532;
  --text:#18345f;
  --muted:#627594;
  --line:#d9e4f3;
  --white:rgba(255,255,255,.94)
}
body{
  margin:0;
  font-family:Inter,Arial,sans-serif;
  background:#f5f8fd;
  color:var(--text);
  position:relative;
  min-height:100vh;
  overflow-x:hidden
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  background-image:url('../assets/background.png');
  background-size:900px auto;
  background-position:center;
  background-repeat:repeat;
  opacity:.18;
  z-index:-2;
  pointer-events:none
}
body::after{
  content:"";
  position:fixed;
  inset:0;
  background:
    radial-gradient(circle at 15% 10%,rgba(142,169,242,.14),transparent 30%),
    radial-gradient(circle at 85% 85%,rgba(184,213,50,.08),transparent 25%),
    rgba(255,255,255,.55);
  z-index:-1;
  pointer-events:none
}
header{
  background:linear-gradient(135deg,rgba(23,61,122,.97),rgba(36,84,166,.94));
  padding:58px 20px 48px;
  text-align:center;
  border-bottom:4px solid var(--hp-lime);
  box-shadow:0 12px 35px rgba(23,61,122,.18)
}
header h1{
  margin:0 auto;
  max-width:900px;
  font-size:clamp(2rem,4vw,3rem);
  line-height:1.1;
  color:#fff;
  letter-spacing:-.03em
}
header p{
  max-width:820px;
  margin:18px auto 0;
  color:rgba(255,255,255,.88);
  line-height:1.6;
  font-size:1.02rem
}
.container{
  max-width:1100px;
  margin:auto;
  padding:34px 28px 50px
}
.sectiontitle{
  font-size:1.8rem;
  font-weight:800;
  color:var(--hp-navy);
  margin-bottom:20px;
  position:relative;
  padding-left:15px
}
.sectiontitle:before{
  content:"";
  position:absolute;
  left:0;
  top:5px;
  width:5px;
  height:27px;
  border-radius:4px;
  background:var(--hp-lime)
}
.cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:22px
}
.card{
  position:relative;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:20px;
  padding:24px;
  box-shadow:0 12px 30px rgba(30,75,135,.10);
  cursor:pointer;
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease;
  overflow:hidden
}
.card:before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:5px;
  background:linear-gradient(90deg,var(--gp-blue),var(--gp-blue-light),var(--hp-lime))
}
.card:hover{
  transform:translateY(-5px);
  border-color:#9bb5e8;
  box-shadow:0 18px 38px rgba(30,75,135,.16)
}
.card h3{
  margin:2px 0 0;
  color:var(--hp-navy);
  font-size:1.25rem
}
.event-location{
  display:flex;
  align-items:center;
  gap:9px;
  margin-top:13px;
  color:var(--muted);
  font-size:.94rem;
  font-weight:650
}
.event-location svg{
  width:19px;
  height:19px;
  flex:none;
  stroke:var(--gp-blue);
  stroke-width:2;
  fill:none
}
#days,form,#done{
  display:none;
  background:rgba(255,255,255,.95);
  border:1px solid var(--line);
  border-radius:20px;
  padding:24px;
  margin-top:24px;
  box-shadow:0 12px 30px rgba(30,75,135,.10)
}
#days h3,form h3,#done h3{
  color:var(--hp-navy)
}
.daybtn,.submit{
  background:linear-gradient(135deg,var(--gp-blue),#3975d0);
  color:#fff;
  border:none;
  border-radius:24px;
  padding:11px 20px;
  font-weight:750;
  cursor:pointer;
  margin:5px;
  box-shadow:0 6px 14px rgba(36,84,166,.18);
  transition:transform .18s ease,box-shadow .18s ease
}
.daybtn:hover,.submit:hover{
  transform:translateY(-2px);
  box-shadow:0 9px 18px rgba(36,84,166,.25)
}
#slots{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  margin-top:15px
}
.slotgroup h4{
  margin:0 0 10px;
  color:var(--hp-navy);
  font-size:1rem
}
.slotlist{
  display:flex;
  flex-wrap:wrap;
  gap:7px
}
.slot{
  width:64px;
  padding:8px 4px;
  background:#f7faff;
  border:1px solid var(--line);
  border-radius:10px;
  text-align:center;
  cursor:pointer;
  transition:.18s ease
}
.slot:hover{
  border-color:#8ea9f2;
  background:#eef4ff;
  transform:translateY(-2px)
}
.slot h4{
  margin:0;
  font-size:.92rem
}
.slot p{
  margin:2px 0 0;
  font-size:.65rem;
  color:#6b7d90
}
.grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
input{
  padding:12px 13px;
  border:1px solid #ccd9e8;
  border-radius:10px;
  outline:none;
  transition:.18s ease
}
input:focus{
  border-color:#7899db;
  box-shadow:0 0 0 3px rgba(120,153,219,.13)
}
.invalid{
  border:2px solid #d32f2f!important;
  background:#fff6f6
}
.valid{
  border:2px solid #2e7d32!important;
  background:#f8fff8
}
html{scroll-behavior:smooth}
#days,#form,#done{scroll-margin-top:14px}
#slots{scroll-margin-top:14px}
@media(max-width:700px){
  .grid{grid-template-columns:1fr}
  #slots{grid-template-columns:1fr}
  .container{padding:26px 18px 40px}
  header{padding:45px 18px 38px}
}

.slot.selected{
  border-color:var(--gp-blue);
  background:#e7efff;
  box-shadow:0 0 0 2px rgba(36,84,166,.25)
}
.daybtn.selected{
  background:linear-gradient(135deg,var(--hp-navy),var(--gp-blue));
  box-shadow:0 0 0 3px rgba(184,213,50,.45)
}
#done .submit{margin-top:14px}

/* --- selezione e stati --- */
.card.selected{
  border-color:var(--gp-blue);
  box-shadow:0 0 0 3px rgba(36,84,166,.22),0 18px 38px rgba(30,75,135,.16)
}
.slot.selected{
  border-color:var(--gp-blue);
  background:#e7efff;
  box-shadow:0 0 0 2px rgba(36,84,166,.25)
}
.daybtn.selected{
  background:linear-gradient(135deg,var(--hp-navy),var(--gp-blue));
  box-shadow:0 0 0 3px rgba(184,213,50,.45)
}
.submit[disabled]{opacity:.6;cursor:not-allowed}
.msg-vuoto{
  color:var(--muted);
  font-style:italic;
  margin-top:12px
}
.argomenti{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px
}
.privacy-label{
  display:flex;
  align-items:flex-start;
  gap:8px;
  font-size:.92rem;
  line-height:1.4
}
#done .submit{margin-top:14px}
@media(max-width:700px){
  .argomenti{grid-template-columns:1fr}
}

.argomenti.invalid-box{
  border:2px solid #d32f2f;
  border-radius:10px;
  padding:8px;
  background:#fff6f6
}