:root{
  --bg:#f7f9fc;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --accent:#31466d;
  --ring:#e6ebf2;
  --cta:#fcb614;
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
}

.wrap{
  max-width:920px;
  margin:40px auto;
  padding:0 16px;
}

.card{
  background:var(--card);
  border:1px solid var(--ring);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 6px 20px rgba(0,0,0,.06);
}

.media{
  display:block;
  width:100%;
  aspect-ratio:16/9;
  object-fit:cover;
  background:#eaeef6;
}

.pad{
  padding:26px;
}

h1{
  margin:0 0 6px;
  font-size:clamp(22px, 4vw, 34px);
  letter-spacing:.2px;
}

.promotore{
  margin:4px 0 10px;
  font-size:clamp(16px, 2.2vw, 22px);
  line-height:1.35;
  color:var(--text);
}

.promotore .ruolo{
  font-style:italic;
}

.promotore .nome{
  font-weight:700;
}

.subtitle{
  margin:0 0 18px;
  color:var(--muted);
  font-size:clamp(15px, 2.3vw, 18px);
}

.badge{
  display:inline-block;
  padding:6px 10px;
  margin:0 0 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  background:#eef2f7;
  color:#31466d;
  border:1px solid #e6ebf2;
}

.info-evento{
  margin:16px 0;
  padding:14px 16px;
  background:linear-gradient(180deg, #fff, #f8fafc);
  border:1px solid #e2e8f0;
  border-radius:14px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
}

.info-evento .main{
  font-size:clamp(16px, 2.3vw, 20px);
  font-weight:800;
  color:#0f172a;
}

.info-evento .sub{
  font-size:14px;
  color:#475569;
  font-style:italic;
  line-height:1.4;
}

.ecm{
  margin-top:6px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;    border-bottom: 1px solid var(--ring);
    padding-bottom: 10px;
}

.chip{
  background:#fff7ed;
  color:#7c2d12;
  border:1px solid #ffedd5;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

/* Area pulsanti */
.buttons-area{
  margin-top:18px;
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:center;
}

.buttons{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  justify-content:center;
  align-items:center;
  width:100%;
}

.buttons.json-buttons{
  margin-bottom:2px;
}

.buttons.standard-buttons{
  padding-top:2px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:170px;
  padding:12px 16px;
  border-radius:12px;
  text-align:center;
  text-decoration:none;
  font-weight:600;
  border:1px solid var(--ring);
  transition:transform .06s, box-shadow .12s, background .12s;
  background:#fff;
  color:var(--accent);
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 14px rgba(0,0,0,.08);
}

.btn.cta{
  background:var(--cta);
  color:#111827;
  border-color:#eab308;
}

.btn svg,
.btn i{
  width:1.1em;
  margin-right:8px;
  text-align:center;
  flex-shrink:0;
}

.btn svg{
  height:1em;
  vertical-align:-2px;
}

.btn.file{
  background:#f8fafc;
  color:#334155;
  border-color:#cbd5e1;
}

.btn.share{
  background:#f1f5f9;
  color:#0f172a;
  border-color:#e2e8f0;
}

.btn.photo{
  background:#ede9fe;
  color:#4c1d95;
  border-color:#ddd6fe;
}

.btn.zoom{
  background:#e0f2fe;
  color:#075985;
  border-color:#bae6fd;
}

.btn.signup{
  background:#dcfce7;
  color:#14532d;
  border-color:#bbf7d0;
}

.btn.map{
  background:#fef3c7;
  color:#92400e;
  border-color:#fde68a;
}

.btn.form{
  background:#ecfdf5;
  color:#065f46;
  border-color:#a7f3d0;
}

.btn.info{
  background:#eef4ff;
  color:var(--accent);
  border-color:#dbe7ff;
}

.btn.hospitality{
  background:#f5f3ff;
  color:#5b21b6;
  border-color:#ddd6fe;
}

.section-block{
  margin-top:16px;
  padding-top:10px;
}

.descrizione{
  margin-top:18px;
  padding-top:10px;
  border-top:1px solid var(--ring);
  color:#334155;
  font-size:16px;
  line-height:1.65;
}

.descrizione a{
  color:var(--accent);
  text-decoration:none;
  font-weight:600;
}

.descrizione a:hover{
  text-decoration:underline;
}

.meta{
  margin-top:16px;
  font-size:13px;
  color:#6b7280;
}

.contacts{
  margin-top:18px;
  padding:14px;
  border:1px solid var(--ring);
  border-radius:12px;
  background:#f8fafc;
}

.contacts .rowc{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  font-weight:600;
  color:#0f172a;
}

.contacts a{
  color:var(--accent);
  text-decoration:none;
}

.contacts a:hover{
  text-decoration:underline;
}

/* Modal */
.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.45);
  display:none;
  z-index:999;
}

.modal-backdrop.show{
  display:block;
}

.modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:1000;
  pointer-events:none;
}

.modal.show{
  display:flex;
}

.modal .panel{
  pointer-events:auto;
  background:#fff;
  border:1px solid var(--ring);
  border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,.25);
  width:min(560px,92vw);
  padding:18px;
}

.modal .panel h3{
  margin:0 0 10px;
  font-size:18px;
  color:#0f172a;
}

.modal .panel .sub{
  margin:-2px 0 14px;
  color:#64748b;
  font-size:14px;
}

.modal .actions{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.modal .actions .btn{
  display:flex;
  width:100%;
  min-width:0;
  text-align:center;
}

.modal .closebar{
  display:flex;
  justify-content:flex-end;
  margin-top:10px;
}

.modal .close{
  background:#f1f5f9;
  border:1px solid #e2e8f0;
  color:#0f172a;
  padding:10px 14px;
  border-radius:10px;
  font-weight:700;
  cursor:pointer;
}

footer{
  margin-top:40px;
  background:linear-gradient(to right,#f8fafc,#eef2f7);
  padding:20px 0;
  border-top:1px solid var(--ring);
}

.footer-inner{
  color:#475569;
  font-size:14px;
  letter-spacing:.2px;
  text-align:center;
}

.footer-inner a{
  color:var(--accent);
  font-weight:600;
  text-decoration:none;
}

.footer-inner a:hover{
  text-decoration:underline;
}

.footer-inner .brand{
  font-weight:700;
  color:var(--accent);
}

@media (max-width:520px){
  .media{
    aspect-ratio:16/9;
  }

  .pad{
    padding:20px;
  }

  .buttons-area{
    align-items:stretch;
  }

  .buttons{
    flex-direction:column;
    align-items:stretch;
  }

  .btn{
    width:100%;
    min-width:0;
  }
}
