/* ═══════════════════════════════════════════
   css/events.css — algo-freedom society
   Stili per events.php (archivio) e event.php (dettaglio)
   ═══════════════════════════════════════════ */

/* ─── Hero sezione eventi ─────────────────────────────── */
.ev-hero {
  position: relative;
  min-height: 300px;
  background:
    linear-gradient(105deg, rgba(8,22,44,.92) 0%, rgba(10,26,50,.68) 50%, rgba(14,32,58,.24) 100%),
    linear-gradient(135deg, #030b17 0%, #071829 35%, #0f2a46 65%, #1a3f60 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.ev-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .45; }
.ev-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(transparent, transparent 39px, rgba(105,168,232,.06) 39px, rgba(105,168,232,.06) 40px);
  pointer-events: none;
}
.ev-hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 300px at 8% 22%, rgba(105,168,232,.12), transparent 60%),
    radial-gradient(500px 260px at 80% 65%, rgba(63,121,183,.10), transparent 58%);
  pointer-events: none;
  mix-blend-mode: screen;
}
.ev-hero-inner {
  position: relative;
  z-index: 2;
  padding: 72px 0 66px;
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.ev-hero-left { flex: 1; }
.ev-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(105,168,232,.14);
  border: 1px solid rgba(105,168,232,.26);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: rgba(105,168,232,.95);
  margin-bottom: 18px;
  animation: evFadeSlide .7s ease both;
}
.ev-hero-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: evPulse 2s ease infinite;
}
@keyframes evPulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.45; transform:scale(1.35); } }
@keyframes evFadeSlide { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:translateY(0); } }
.ev-hero-title {
  margin: 0;
  font-size: 58px;
  line-height: 1.04;
  letter-spacing: -.6px;
  font-weight: 800;
  text-shadow: 0 14px 38px rgba(0,0,0,.38);
  animation: evFadeSlide .7s .1s ease both;
}
.ev-hero-title .thin { font-weight: 100; opacity: .9; }
.ev-hero-sub {
  margin: 14px 0 0;
  font-size: 17px;
  color: rgba(255,255,255,.82);
  font-weight: 500;
  max-width: 560px;
  line-height: 1.58;
  animation: evFadeSlide .7s .2s ease both;
}
.ev-hero-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 0 0 auto;
  animation: evFadeSlide .7s .3s ease both;
}
.ev-stat-pill {
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 14px 22px;
  text-align: right;
  backdrop-filter: blur(6px);
  min-width: 150px;
}
.ev-stat-pill .sp-num { display: block; font-size: 28px; font-weight: 900; line-height: 1; color: #fff; letter-spacing: -.5px; }
.ev-stat-pill .sp-label { display: block; font-size: 11.5px; font-weight: 700; color: rgba(255,255,255,.68); letter-spacing: .3px; margin-top: 4px; }

/* ─── Tab bar ─────────────────────────────────────────── */
.ev-tabbar {
  background: var(--card);
  border-bottom: 2px solid rgba(15,23,42,.09);
  position: sticky;
  top: 76px;
  z-index: 40;
  box-shadow: 0 4px 12px rgba(15,23,42,.06);
}
.ev-tabbar-inner {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.ev-tabbar-inner::-webkit-scrollbar { display: none; }
.ev-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 22px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  position: relative;
  top: 2px;
  text-decoration: none;
}
.ev-tab:hover { color: var(--nav-2); }
.ev-tab.active { color: var(--nav-2); border-bottom-color: var(--accent); }
.ev-tab-count {
  width: 20px; height: 20px;
  border-radius: 6px;
  background: rgba(105,168,232,.12);
  border: 1px solid rgba(105,168,232,.2);
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 900;
  color: var(--accent-2);
}
.ev-tab.active .ev-tab-count { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }

/* ─── Main section ────────────────────────────────────── */
.ev-section { padding: 48px 0 56px; }
.ev-section--past { background: #f4f7fb; border-top: 1px solid rgba(15,23,42,.07); }

/* ─── Event cards (grid) ──────────────────────────────── */
.ev-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 28px;
}

.ev-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .14s ease, box-shadow .14s ease;
  text-decoration: none;
  color: inherit;
}
.ev-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ev-card--past { opacity: .85; }
.ev-card--past:hover { opacity: 1; }

.ev-card-top {
  padding: 22px 22px 18px;
  background:
    radial-gradient(400px 180px at 15% 15%, rgba(105,168,232,.10), transparent 60%),
    linear-gradient(180deg, #fff, rgba(245,248,253,.95));
  border-bottom: 1px solid rgba(15,23,42,.07);
  flex: 1;
  position: relative;
}

.ev-card-date-badge {
  position: absolute;
  top: 18px; right: 18px;
  background: linear-gradient(135deg, var(--nav-1), var(--nav-3));
  color: #fff;
  border-radius: 9px;
  width: 50px; height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ev-card-date-badge .d-day { font-size: 20px; font-weight: 900; line-height: 1; }
.ev-card-date-badge .d-mon { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; opacity: .82; }

.ev-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
  background: rgba(63,121,183,.12);
  color: var(--accent-2);
}
.ev-type-badge.seminario { background: rgba(63,121,183,.12); color: #2a6496; }
.ev-type-badge.workshop  { background: rgba(43,79,114,.12);  color: #1f3550; }
.ev-type-badge.conferenza{ background: rgba(105,168,232,.14);color: #3f79b7; }
.ev-type-badge.webinar   { background: rgba(42,100,150,.12); color: #2a6496; }
.ev-type-badge.altro     { background: rgba(91,102,120,.10); color: var(--muted); }
.ev-type-badge.past-label{ background: rgba(91,102,120,.10); color: var(--muted); }

.ev-card-title {
  margin: 0 60px 8px 0;
  font-size: 14px;
  font-weight: 800;
  color: #1b2a44;
  line-height: 1.35;
}
.ev-card-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ev-card-bottom {
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
}
.ev-card-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-card-location svg { flex-shrink: 0; width: 13px; height: 13px; fill: none; stroke: var(--muted); stroke-width: 2; }
.ev-card-arrow {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(63,121,183,.10);
  border: 1px solid rgba(63,121,183,.16);
  display: grid;
  place-items: center;
  color: var(--accent-2);
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  transition: background .12s;
}
.ev-card:hover .ev-card-arrow { background: var(--accent-2); color: #fff; border-color: var(--accent-2); }

/* ─── Empty state ─────────────────────────────────────── */
.ev-empty {
  text-align: center;
  padding: 56px 0;
  color: var(--muted);
}
.ev-empty svg { width: 44px; height: 44px; opacity: .3; margin-bottom: 14px; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.ev-empty p { margin: 8px 0 0; font-size: 15px; font-weight: 600; }

/* ─── Pagination ──────────────────────────────────────── */
.ev-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.ev-page-btn {
  min-width: 40px; height: 40px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 2px 6px rgba(15,23,42,.06);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background .12s, color .12s, border-color .12s;
}
.ev-page-btn:hover { background: rgba(105,168,232,.10); color: var(--nav-2); border-color: rgba(105,168,232,.3); }
.ev-page-btn.active { background: var(--nav-2); color: #fff; border-color: var(--nav-2); }
.ev-page-btn:disabled,
.ev-page-btn[aria-disabled="true"] { opacity: .4; cursor: default; pointer-events: none; }

/* ─── Area tematica pill (archivio) ───────────────────── */
.ev-area-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-2);
  background: rgba(63,121,183,.08);
  border: 1px solid rgba(63,121,183,.15);
  border-radius: 999px;
  padding: 3px 10px;
  margin-top: 8px;
}

/* ─── Homepage: CTA sotto lista eventi ────────────────── */
.news-events-footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.news-events-footer .btn-all-events {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-2);
  background: rgba(63,121,183,.08);
  border: 1px solid rgba(63,121,183,.18);
  border-radius: 8px;
  padding: 9px 18px;
  transition: background .12s, color .12s;
  text-decoration: none;
}
.news-events-footer .btn-all-events:hover { background: var(--accent-2); color: #fff; }
.news-events-footer .btn-all-events svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.5; }

/* ─── Dettaglio evento ────────────────────────────────── */
.ev-detail-wrap {
  padding: 48px 0 64px;
}
.ev-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 28px;
}
.ev-breadcrumb a { color: var(--accent-2); text-decoration: none; transition: opacity .12s; }
.ev-breadcrumb a:hover { opacity: .75; }
.ev-breadcrumb svg { width: 12px; height: 12px; fill: none; stroke: var(--muted); stroke-width: 2.5; flex-shrink: 0; }

.ev-detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

/* Main content column */
.ev-detail-main {}
.ev-detail-header {
  margin-bottom: 28px;
}
.ev-detail-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.ev-detail-date-badge {
  background: linear-gradient(135deg, var(--nav-1), var(--nav-3));
  color: #fff;
  border-radius: 9px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
}
.ev-detail-date-badge svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2; opacity: .85; }
.ev-detail-title {
  margin: 0 0 20px;
  font-size: 32px;
  font-weight: 900;
  color: #1b2a44;
  line-height: 1.2;
  letter-spacing: -.3px;
}
.ev-detail-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(15,23,42,.09);
}
.ev-info-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.ev-info-chip svg { width: 15px; height: 15px; fill: none; stroke: var(--accent-2); stroke-width: 2; flex-shrink: 0; }
.ev-info-chip strong { color: var(--text); }

/* ── Banner hero evento (tra header e body) ───────────────────────────── */
.ev-detail-banner {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 0 28px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #eef2f7, #f8fafc);
  aspect-ratio: 16 / 6;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, .06),
    0 10px 28px -14px rgba(15, 23, 42, .22);
  isolation: isolate;
}
.ev-detail-banner img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
  display: block;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.ev-detail-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0) 60%,
    rgba(15, 23, 42, .08) 100%
  );
  z-index: 1;
}
.ev-detail-banner:hover img { transform: scale(1.015); }

@media (max-width: 720px) {
  .ev-detail-banner {
    aspect-ratio: 4 / 3;
    border-radius: 11px;
    margin-bottom: 22px;
  }
}

.ev-detail-body h2 {
  font-size: 18px;
  font-weight: 800;
  color: #1b2a44;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ev-detail-body h2::after { content: ""; flex: 1; height: 1px; background: rgba(15,23,42,.10); border-radius: 999px; }
.ev-detail-body p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 18px;
}
.ev-speakers-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ev-speakers-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 16px;
  min-width: 0;
  word-break: break-word;
}
@media (max-width: 900px) {
  .ev-speakers-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .ev-speakers-list { grid-template-columns: 1fr; }
}
.ev-speakers-list li::before {
  content: "";
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--nav-1), var(--nav-3));
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
/* Membro interno: mini foto profilo al posto del pallino decorativo */
.ev-speakers-list li.has-photo::before { display: none; }
.ev-person-photo {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.ev-person-link {
  color: inherit;
  text-decoration: none;
}
.ev-person-link:hover,
.ev-person-link:focus-visible { text-decoration: underline; color: var(--nav-1); }

/* Back button */
.ev-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-2);
  background: none;
  border: 1px solid rgba(63,121,183,.22);
  border-radius: 8px;
  padding: 9px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, color .12s;
  margin-top: 32px;
}
.ev-back-btn:hover { background: rgba(63,121,183,.08); }
.ev-back-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.5; }

/* Sidebar column */
.ev-detail-sidebar {}
.ev-sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 18px;
}
.ev-sidebar-card-header {
  background: linear-gradient(135deg, var(--nav-1), var(--nav-3));
  color: #fff;
  padding: 16px 20px 14px;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 9px;
}
.ev-sidebar-card-header svg { width: 16px; height: 16px; fill: none; stroke: rgba(255,255,255,.8); stroke-width: 2; }
.ev-sidebar-card-body { padding: 18px 20px; }
.ev-sidebar-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(15,23,42,.07);
}
.ev-sidebar-row:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.ev-sidebar-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
}
.ev-sidebar-value {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

/* Attachment card */
.ev-attachment-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ev-attachment-preview {
  position: relative;
  display: block;
  background: #f4f7fb;
  overflow: hidden;
}
.ev-attachment-preview img {
  width: 100%;
  display: block;
  max-height: 340px;
  object-fit: contain;
  background: #f4f7fb;
  transition: transform .35s ease;
}
a.ev-attachment-preview { cursor: zoom-in; }
a.ev-attachment-preview:hover img { transform: scale(1.04); }

/* PDF first-page thumbnail (rendered via PDF.js) */
.ev-attachment-preview-pdf-thumb {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.ev-attachment-preview-pdf-thumb canvas {
  display: block;
  max-width: 100%;
  height: auto;
  box-shadow: 0 1px 6px rgba(15,23,42,.18);
  background: #fff;
  transition: transform .35s ease;
}
.ev-attachment-preview-pdf-thumb:hover canvas { transform: scale(1.03); }
.ev-attachment-pdf-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  color: var(--muted);
  pointer-events: none;
  background: rgba(244,247,251,.6);
}
.ev-attachment-preview-pdf-thumb canvas.is-rendered + .ev-attachment-pdf-loading { display: none; }

/* PDF lightbox modal (custom) */
.pdf-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .88);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  animation: pdfModalFadeIn .18s ease-out;
}
.pdf-modal[hidden] { display: none; }
@keyframes pdfModalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.pdf-modal-body {
  width: 100%;
  max-width: 1200px;
  height: 100%;
  max-height: 92vh;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
  overflow: hidden;
}
.pdf-modal iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #525659;
}
.pdf-modal-close {
  position: absolute;
  top: 16px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.pdf-modal-close:hover,
.pdf-modal-close:focus-visible {
  background: rgba(255, 255, 255, .28);
  outline: none;
}
@media (max-width: 600px) {
  .pdf-modal { padding: 12px; }
  .pdf-modal-close { top: 8px; right: 8px; width: 38px; height: 38px; font-size: 24px; }
}
.ev-attachment-zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15,23,42,.55);
  color: #fff;
  border-radius: 6px;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.ev-attachment-zoom svg { width: 16px; height: 16px; }
a.ev-attachment-preview:hover .ev-attachment-zoom,
a.ev-attachment-preview:focus-visible .ev-attachment-zoom { opacity: 1; }
.ev-attachment-preview-pdf {
  background: rgba(30,58,95,.06);
  border-top: 1px solid var(--border);
  padding: 16px 20px;
}
.ev-attachment-pdf-icon {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.ev-attachment-pdf-icon svg { width: 36px; height: 36px; fill: none; stroke: var(--accent-2); stroke-width: 1.5; }
.ev-attachment-pdf-icon span { font-size: 13px; font-weight: 700; color: var(--text); }
.ev-attachment-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  background: var(--accent-2);
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s;
  width: 100%;
  justify-content: center;
}
.ev-attachment-download:hover { background: var(--nav-2); }
.ev-attachment-download svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; }

/* Past event notice */
.ev-past-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(91,102,120,.07);
  border: 1px solid rgba(91,102,120,.15);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 24px;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.5;
}
.ev-past-notice svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex-shrink: 0; margin-top: 1px; }

/* ─── Homepage: "vedi tutti gli eventi" footer ────────── */
.news-section-footer {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(15,23,42,.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.news-section-footer .ev-count-note {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}
.btn-all-events {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-2);
  background: rgba(63,121,183,.08);
  border: 1px solid rgba(63,121,183,.18);
  border-radius: 8px;
  padding: 9px 18px;
  transition: background .12s, color .12s;
  text-decoration: none;
}
.btn-all-events:hover { background: var(--accent-2); color: #fff; border-color: var(--accent-2); }
.btn-all-events svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.5; }

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  .ev-grid { grid-template-columns: repeat(2, 1fr); }
  .ev-detail-grid { grid-template-columns: 1fr; }
  .ev-detail-sidebar { order: -1; }
  .ev-hero-title { font-size: 44px; }
  .ev-hero-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .ev-hero-stats { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 620px) {
  .ev-grid { grid-template-columns: 1fr; }
  .ev-hero-title { font-size: 36px; }
  .ev-detail-title { font-size: 24px; }
}

/* ── Multi-day events: sezione "Programma" (event.php) ─── */
.ev-program {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.1rem;
  background: rgba(248, 250, 252, .65);
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 10px;
}
.ev-program-title {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0 0 .75rem;
  font-size: 1rem;
  font-weight: 700;
  color: #1b2a44;
}
.ev-program-title svg {
  stroke: var(--accent-2, #1e3a5f);
  flex-shrink: 0;
}
.ev-program-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.ev-program-item {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  padding: .35rem .55rem;
  border-left: 3px solid var(--accent-2, #1e3a5f);
  background: #ffffff;
  border-radius: 0 6px 6px 0;
  font-size: .95rem;
}
.ev-program-date {
  font-weight: 600;
  color: #1b2a44;
}
.ev-program-sep {
  color: var(--muted, #5b6678);
}
.ev-program-time {
  color: var(--muted, #5b6678);
  font-variant-numeric: tabular-nums;
}

/* ── Multi-day events: sidebar mini-programma ──────────── */
.ev-sidebar-row-program {
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: .4rem;
}
.ev-sidebar-program {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  width: 100%;
}
.ev-sidebar-program-item {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: .2rem 0;
  font-size: .85rem;
}
.ev-sidebar-program-date {
  font-weight: 600;
  color: #1b2a44;
}
.ev-sidebar-program-time {
  color: var(--muted, #5b6678);
  font-variant-numeric: tabular-nums;
}

/* ── Listing: badge data card per eventi multi-day ─────── */
.ev-card-date-badge--multi .d-day {
  font-size: 1.15rem;
  letter-spacing: -0.5px;
}
