.events-hero {
  border-radius: 18px;
  padding: 22px;
  background:
    radial-gradient(1200px 300px at 0% 0%, rgba(133, 33, 58, 0.10), transparent 55%),
    linear-gradient(135deg, rgba(15,23,42,0.06), rgba(15,23,42,0.02));
  border: 1px solid rgba(15,23,42,0.10);
}

.events-card__img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.events-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
}

.events-btn--primary {
  color: #fff;
  border: 1px solid #85213a;
  background: linear-gradient(180deg, #9a2a46, #85213a);
}

.events-btn--primary:hover {
  color: #fff;
  border-color: #6f1b31;
  background: linear-gradient(180deg, #8d253f, #6f1b31);
}

.events-btn--soft {
  color: #2c2f33;
  border: 1px solid rgba(15,23,42,0.20);
  background: #fff;
}

.events-btn--soft:hover {
  background: rgba(15,23,42,0.04);
}

.events-btn--ghost {
  color: #1f2937;
  border: 1px dashed rgba(15,23,42,0.35);
  background: rgba(255,255,255,0.75);
}

.events-btn--ghost:hover {
  background: #fff;
}

.atti-flow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.convocazione-wizard-card {
  scroll-margin-top: 96px;
}

.events-hub__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.events-hub__item {
  display: grid;
  gap: 4px;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: #fff;
  padding: 14px;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.events-hub__item:hover {
  transform: translateY(-1px);
  border-color: rgba(133, 33, 58, 0.36);
  box-shadow: 0 8px 18px rgba(15,23,42,0.08);
}

.events-hub__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #85213a;
  background: rgba(133, 33, 58, 0.10);
}

.events-hub__title {
  font-weight: 700;
  line-height: 1.2;
}

.events-hub__meta {
  font-size: 0.86rem;
  color: rgba(15,23,42,0.74);
  line-height: 1.25;
}

.events-calendar {
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 14px;
  overflow: hidden;
}

.events-calendar__head {
  background: rgba(15,23,42,0.03);
  border-bottom: 1px solid rgba(15,23,42,0.08);
}

.events-calendar__cell {
  min-height: 110px;
  vertical-align: top;
}

.events-calendar__day {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.events-calendar__event {
  display: block;
  padding: 6px 8px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid rgba(15,23,42,0.10);
  background: #fff;
}

.events-calendar__event:hover {
  background: rgba(15,23,42,0.03);
}

.events-calendar__event-meta {
  font-size: 0.82rem;
  color: rgba(15,23,42,0.75);
}

.events-form-context {
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.01));
}

.events-form-context__title {
  font-size: 0.82rem;
  color: rgba(15, 23, 42, 0.70);
  font-weight: 600;
  margin-bottom: 6px;
}

.events-form-context__chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.events-hub-hero {
  border-radius: 1.2rem;
  padding: 1.25rem;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(13, 110, 253, 0.16), rgba(13, 110, 253, 0)),
    radial-gradient(120% 120% at 100% 100%, rgba(32, 201, 151, 0.16), rgba(32, 201, 151, 0)),
    linear-gradient(135deg, #f8fbff, #f4fffb);
  border: 1px solid rgba(13, 110, 253, 0.16);
}

.events-hub-card {
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.events-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: rgba(13, 110, 253, 0.35);
}

.events-hub-btn {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
  padding: 1rem 1rem 0.95rem;
}

.events-hub-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.events-hub-title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
}

.events-hub-desc {
  font-size: 0.87rem;
  color: #64748b;
  margin-top: 0.35rem;
}

.events-focus-target {
  scroll-margin-top: 90px;
}

.events-focus-highlight {
  border-radius: 1rem;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.28), 0 16px 36px rgba(13, 110, 253, 0.12);
  transition: box-shadow 0.22s ease;
}

.events-stat-grid .card {
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.events-oneclick {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 1rem;
  padding: 0.9rem;
  background: #fff;
}

.events-oneclick-btn {
  min-height: 72px;
  border-radius: 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  display: flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.events-oneclick-btn i {
  font-size: 1rem;
}

.events-oneclick-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
  border-color: rgba(13, 110, 253, 0.4);
}

.events-oneclick-btn--primary {
  color: #fff;
  border-color: #85213a;
  background: linear-gradient(180deg, #9a2a46, #85213a);
}

.events-five-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}

.events-four-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (max-width: 1200px) {
  .events-five-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .events-four-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .events-five-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  .events-four-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

.events-manage-page.is-focus .events-focus-hide {
  display: none !important;
}

.events-manage-page.is-focus #manage-details .accordion-item:not(#music):not(#casting):not(#media):not(#vetrina) {
  display: none;
}

.events-oneclick-btn--primary:hover {
  color: #fff;
  border-color: #6f1b31;
}

.events-oneclick-btn--warning {
  border-color: rgba(180, 83, 9, 0.35);
  background: linear-gradient(180deg, #fff7e6, #ffefc7);
}

.events-oneclick-btn--disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.events-primary-action {
  border: 1px solid rgba(13, 110, 253, 0.24);
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.06), rgba(255, 255, 255, 0.98));
}

.events-primary-action-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.08);
}

.events-step-current .btn {
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25), 0 8px 16px rgba(13, 110, 253, 0.1);
}

.events-mediahub-mini {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #fbfdff, #f6fffb);
}

.events-mediahub-mini__link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0.85rem 1rem;
}

.events-mediahub-mini__title {
  font-weight: 700;
}

.events-mediahub-mini__meta {
  font-size: 0.9rem;
  color: #64748b;
}

.events-wizard-strip {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.8rem;
}

.events-wizard-strip__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}

.events-wizard-step {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 0.8rem;
  padding: 0.55rem 0.65rem;
  text-decoration: none;
  color: inherit;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.events-wizard-step:hover {
  border-color: rgba(13, 110, 253, 0.36);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.events-wizard-step__num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.events-wizard-step__label {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
}

.events-wizard-step--final {
  background: linear-gradient(180deg, #fff7e6, #ffefc7);
}

.events-wizard-event {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.85rem;
}

.events-wizard-event__steps {
  display: grid;
  gap: 0.45rem;
}

.events-wizard-event__step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 0.8rem;
  background: #fff;
  padding: 0.5rem 0.65rem;
}

.events-wizard-event__step:hover {
  border-color: rgba(13, 110, 253, 0.35);
}

.events-wizard-event__step.is-done {
  border-color: rgba(22, 163, 74, 0.35);
  background: linear-gradient(180deg, #f3fff7, #ffffff);
}

.events-wizard-event__step.is-current {
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.32), 0 10px 20px rgba(13, 110, 253, 0.12);
}

.events-wizard-event__num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.events-wizard-event__label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
}

.events-wizard-event__hint {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
}

.events-simple-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 1rem;
  padding: 0.95rem;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(133, 33, 58, 0.16), transparent 55%),
    radial-gradient(120% 140% at 100% 0%, rgba(14, 116, 144, 0.16), transparent 60%),
    linear-gradient(145deg, #f8fbff, #f7fffc);
}

.events-simple-hero__glow {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -80px;
  top: -90px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(133, 33, 58, 0.2), rgba(133, 33, 58, 0));
  pointer-events: none;
}

.events-simple-hero__eyebrow {
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
}

.events-simple-hero__cta {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.events-simple-kpi {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.events-now-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(133, 33, 58, 0.35);
  background: linear-gradient(180deg, #fff2f6, #ffe8ef);
  color: #7a1e35;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Global Eventi theme: applies to all pages under /eventi/ via .events-skin in base.html */
.events-skin .card {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.95rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.events-skin .card .card-header {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.events-skin .btn-primary {
  border-color: #85213a;
  background: linear-gradient(180deg, #9a2a46, #85213a);
}

.events-skin .btn-primary:hover,
.events-skin .btn-primary:focus {
  border-color: #6f1b31;
  background: linear-gradient(180deg, #8d253f, #6f1b31);
}

.events-skin .btn-outline-primary {
  border-color: rgba(133, 33, 58, 0.35);
  color: #7a1e35;
}

.events-skin .btn-outline-primary:hover {
  background: rgba(133, 33, 58, 0.08);
  color: #63172c;
}

.events-skin .ea-page-head,
.events-skin .events-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 1rem;
  padding: 1rem;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(133, 33, 58, 0.12), transparent 55%),
    radial-gradient(120% 140% at 100% 0%, rgba(14, 116, 144, 0.12), transparent 60%),
    linear-gradient(145deg, #f8fbff, #f7fffc);
}

.events-skin .table {
  --bs-table-striped-bg: rgba(15, 23, 42, 0.02);
}

.events-skin .form-control:focus,
.events-skin .form-select:focus {
  border-color: rgba(133, 33, 58, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(133, 33, 58, 0.12);
}

/* Long pages refinement: Event manage + MediaHub assets */
.events-manage-head {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 1rem;
  padding: 1rem;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(133, 33, 58, 0.12), transparent 55%),
    linear-gradient(145deg, #f8fbff, #f7fffc);
}

.events-manage-layout .position-sticky {
  top: 1rem;
}

.events-manage-page .accordion-item {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.9rem;
  overflow: hidden;
  margin-bottom: 0.55rem;
}

.events-manage-page .accordion-button {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.events-publish-floating {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 1040;
}

.events-publish-floating .btn {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

@keyframes eventsPublishPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.32), 0 10px 24px rgba(15, 23, 42, 0.18);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(34, 197, 94, 0), 0 10px 24px rgba(15, 23, 42, 0.18);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0), 0 10px 24px rgba(15, 23, 42, 0.18);
  }
}

.events-publish-ready {
  border-color: rgba(22, 163, 74, 0.65) !important;
  animation: eventsPublishPulse 2.2s ease-out infinite;
}

.events-publish-ready:hover,
.events-publish-ready:focus {
  animation-play-state: paused;
}

.events-mediahub-head {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 1rem;
  padding: 1rem;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(133, 33, 58, 0.12), transparent 55%),
    radial-gradient(120% 140% at 100% 0%, rgba(14, 116, 144, 0.12), transparent 60%),
    linear-gradient(145deg, #f8fbff, #f7fffc);
}

.mediahub-mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.mediahub-mobile-spacer {
  height: 4rem;
}

.mediahub-chipbar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.mediahub-upload-dropzone {
  border: 2px dashed rgba(13, 110, 253, 0.35);
  border-radius: 0.75rem;
  background: rgba(13, 110, 253, 0.04);
  padding: 0.75rem;
  transition: all 0.2s ease;
}

.mediahub-upload-dropzone.is-dragover {
  border-color: rgba(13, 110, 253, 0.75);
  background: rgba(13, 110, 253, 0.1);
}

.mediahub-special-fields.is-hidden {
  display: none;
}

.mediahub-progress {
  height: 0.5rem;
  border-radius: 999px;
}

.mediahub-subdash-btn {
  display: block;
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  padding: 0.9rem;
  text-decoration: none;
  color: inherit;
  background: #fff;
}

.mediahub-subdash-btn:hover {
  border-color: rgba(13, 110, 253, 0.35);
}

@media (max-width: 991px) {
  .events-publish-floating {
    display: none !important;
  }

  .events-manage-layout .position-sticky {
    position: static !important;
  }

  .events-wizard-strip__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .events-hub__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .events-wizard-strip__grid {
    grid-template-columns: 1fr;
  }

  .events-hub__grid {
    grid-template-columns: 1fr;
  }

  .events-simple-hero__cta {
    width: 100%;
  }

  .events-oneclick-btn {
    min-height: 64px;
    justify-content: flex-start;
    padding: 0 0.8rem;
  }

  .events-wizard-event__step {
    align-items: flex-start;
    flex-direction: column;
  }

  .events-manage-head .btn {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 150px;
  }

  .events-manage-page .accordion-button {
    font-size: 0.95rem;
  }

  .events-manage-page {
    padding-bottom: 5.25rem;
  }
}

@media (min-width: 992px) {
  .mediahub-mobile-bar,
  .mediahub-mobile-spacer {
    display: none;
  }
}
