/**
 * Welcome — bacheca attività attive
 */

.welcome-bacheca {
  --fest-orange: #f58220;
  --fest-orange-soft: #ff9a2e;
  --fest-purple: #602d91;
  --fest-navy: #15265c;
  --fest-text: #1a2744;
  --fest-text-muted: #4a5568;
  --fest-surface: #eef1f7;
  --fest-card: #ffffff;
  --fest-radius: 1.15rem;
  --fest-shadow: 0 4px 24px rgba(21, 38, 92, 0.08), 0 1px 3px rgba(21, 38, 92, 0.06);

  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding: 0 0.75rem 2.5rem;
  font-family: "Plus Jakarta Sans", "Public Sans", system-ui, sans-serif;
  color: var(--fest-text);
}

.misc-wrapper.misc-wrapper--welcome-bacheca {
  text-align: start;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 1rem 0 2rem;
  max-width: 100%;
  min-block-size: auto;
  background: transparent;
}

html.welcome-bacheca-page,
html.welcome-bacheca-page body {
  background: #f4eef8;
}

/*
 * Prova colorazione sfondo — varianti:
 *   default (nessun attributo) = colorato Fest
 *   data-bg="soft"  = più tenue
 *   data-bg="bold"  = più saturo
 */
.welcome-bacheca__bg {
  --bg-warm: #fff6ee;
  --bg-mid: #f3ebf8;
  --bg-cool: #e6edf8;

  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(
    145deg,
    var(--bg-warm) 0%,
    var(--bg-mid) 38%,
    var(--bg-cool) 100%
  );
}

.welcome-bacheca__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 55% at 8% 18%, rgba(245, 130, 32, 0.38) 0%, transparent 58%),
    radial-gradient(ellipse 70% 50% at 95% 82%, rgba(96, 45, 145, 0.32) 0%, transparent 55%),
    radial-gradient(ellipse 55% 40% at 55% 0%, rgba(21, 38, 92, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse 45% 35% at 72% 42%, rgba(245, 130, 32, 0.12) 0%, transparent 48%);
  pointer-events: none;
}

.welcome-bacheca__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    118deg,
    rgba(245, 130, 32, 0.07) 0%,
    transparent 32%,
    transparent 58%,
    rgba(96, 45, 145, 0.09) 78%,
    rgba(21, 38, 92, 0.06) 100%
  );
  pointer-events: none;
}

.welcome-bacheca__bg[data-bg="soft"] {
  --bg-warm: #faf8fc;
  --bg-mid: #f4f2f8;
  --bg-cool: #eef1f8;
}

.welcome-bacheca__bg[data-bg="soft"]::before {
  opacity: 0.55;
}

.welcome-bacheca__bg[data-bg="bold"] {
  --bg-warm: #ffe8d4;
  --bg-mid: #ecd8f5;
  --bg-cool: #d8e4f8;
}

.welcome-bacheca__bg[data-bg="bold"]::before {
  background:
    radial-gradient(ellipse 80% 60% at 5% 15%, rgba(245, 130, 32, 0.55) 0%, transparent 55%),
    radial-gradient(ellipse 75% 55% at 98% 88%, rgba(96, 45, 145, 0.48) 0%, transparent 52%),
    radial-gradient(ellipse 50% 40% at 50% 5%, rgba(21, 38, 92, 0.22) 0%, transparent 48%);
}

.welcome-bacheca__bg-stripe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  z-index: 2;
  background: linear-gradient(
    90deg,
    var(--fest-orange) 0%,
    var(--fest-purple) 50%,
    var(--fest-navy) 100%
  );
  box-shadow: 0 3px 16px rgba(96, 45, 145, 0.25);
}

.welcome-bacheca__bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg width='56' height='56' viewBox='0 0 56 56' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28 4L52 28L28 52L4 28Z' stroke='%23f58220' stroke-opacity='.22' stroke-width='.7' fill='none'/%3E%3Cpath d='M28 12L44 28L28 44L12 28Z' stroke='%23602d91' stroke-opacity='.18' stroke-width='.55' fill='none'/%3E%3Ccircle cx='28' cy='28' r='1.35' fill='%2315265c' fill-opacity='.15'/%3E%3C/svg%3E");
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 50%, transparent 100%);
}

.welcome-bacheca__bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
  mix-blend-mode: multiply;
}

.welcome-bacheca__bg-glow--orange {
  width: min(58vw, 520px);
  height: min(58vw, 520px);
  top: -14%;
  right: -10%;
  background: rgba(245, 130, 32, 0.45);
  mix-blend-mode: normal;
}

.welcome-bacheca__bg-glow--purple {
  width: min(54vw, 460px);
  height: min(54vw, 460px);
  bottom: -12%;
  left: -8%;
  background: rgba(96, 45, 145, 0.38);
  mix-blend-mode: normal;
}

.welcome-bacheca__bg-glow--navy {
  width: min(44vw, 400px);
  height: min(44vw, 400px);
  top: 42%;
  left: 48%;
  transform: translate(-50%, -50%);
  background: rgba(21, 38, 92, 0.18);
  filter: blur(100px);
  mix-blend-mode: normal;
}

/* Masthead (logo + bacheca eventi) */
.welcome-bacheca__masthead {
  margin-bottom: 2rem;
  padding: 1.35rem 1.35rem 1.5rem;
  border-radius: calc(var(--fest-radius) + 0.15rem);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 32px rgba(21, 38, 92, 0.09);
}

.welcome-bacheca__masthead-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(21, 38, 92, 0.08);
}

.welcome-bacheca__brand {
  max-width: min(200px, 50vw);
  flex-shrink: 0;
}

.welcome-bacheca__logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 3.25rem;
  object-fit: contain;
  object-position: left center;
}

.welcome-bacheca__masthead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.welcome-bacheca__masthead-body {
  max-width: 40rem;
}

.welcome-bacheca__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.welcome-bacheca__btn--ghost {
  color: var(--fest-navy);
  background: #fff;
  border-color: rgba(21, 38, 92, 0.2);
}

.welcome-bacheca__btn--ghost:hover {
  color: var(--fest-navy);
  background: #fff;
  border-color: var(--fest-navy);
}

.welcome-bacheca__btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--fest-orange) 0%, var(--fest-orange-soft) 100%);
  box-shadow: 0 3px 12px rgba(245, 130, 32, 0.3);
}

.welcome-bacheca__btn--primary:hover {
  color: #fff;
  box-shadow: 0 4px 16px rgba(245, 130, 32, 0.38);
}

.welcome-bacheca__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fest-purple);
}

.welcome-bacheca__live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  animation: welcome-pulse 2s ease-in-out infinite;
}

@keyframes welcome-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.92); }
}

.welcome-bacheca__title {
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 800;
  color: var(--fest-navy);
  margin: 0 0 0.5rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.welcome-bacheca__lead {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fest-text-muted);
  margin: 0;
  max-width: 32rem;
}

/* Board */
.welcome-bacheca__board {
  margin-bottom: 1rem;
}

.welcome-bacheca__board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding: 0 0.15rem;
}

.welcome-bacheca__board-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fest-navy);
}

.welcome-bacheca__board-title i {
  color: var(--fest-orange);
  font-size: 1.2rem;
}

/* Grid eventi */
.welcome-bacheca__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  padding: 0;
  margin: 0;
}

@media (min-width: 900px) {
  .welcome-bacheca__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .welcome-bacheca__card--featured {
    grid-column: span 2;
  }

  .welcome-bacheca__card--featured .welcome-bacheca__card-cover {
    min-height: 11rem;
  }

  .welcome-bacheca__card--featured .welcome-bacheca__card-cover-logo {
    width: 5.5rem;
    height: 5.5rem;
  }
}

@media (min-width: 1200px) {
  .welcome-bacheca__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .welcome-bacheca__card--featured {
    grid-column: span 2;
  }
}

.welcome-bacheca__card {
  position: relative;
  min-width: 0;
}

.welcome-bacheca__card-hit {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  text-align: left;
  border: none;
  border-radius: var(--fest-radius);
  background: #fff;
  box-shadow:
    0 1px 2px rgba(21, 38, 92, 0.05),
    0 10px 28px rgba(21, 38, 92, 0.08);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.22s ease;
}

.welcome-bacheca__card-hit:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow:
    0 4px 8px rgba(21, 38, 92, 0.06),
    0 20px 40px rgba(21, 38, 92, 0.14);
}

.welcome-bacheca__card-hit:focus-visible {
  outline: 2px solid var(--fest-orange);
  outline-offset: 3px;
}

.welcome-bacheca__card-pin {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  z-index: 3;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: var(--fest-orange);
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(21, 38, 92, 0.15);
  transform: rotate(12deg);
  transition: transform 0.2s ease;
}

.welcome-bacheca__card-hit:hover .welcome-bacheca__card-pin {
  transform: rotate(0deg) scale(1.08);
}

.welcome-bacheca__card-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 8.5rem;
  background: linear-gradient(
    135deg,
    var(--card-accent, var(--fest-orange)) 0%,
    color-mix(in srgb, var(--card-accent, var(--fest-orange)) 55%, var(--fest-purple)) 100%
  );
  overflow: hidden;
}

.welcome-bacheca__card-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.welcome-bacheca__card-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(21, 38, 92, 0.05) 0%,
    rgba(21, 38, 92, 0.35) 100%
  );
}

.welcome-bacheca__card-cover-logo {
  position: relative;
  z-index: 1;
  width: 4.25rem;
  height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(21, 38, 92, 0.2);
  overflow: hidden;
}

.welcome-bacheca__card-cover-logo img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.welcome-bacheca__card-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--card-accent, var(--fest-orange)), var(--fest-purple));
}

.welcome-bacheca__card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
  padding: 1.1rem 1.15rem 1.2rem;
}

.welcome-bacheca__card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.welcome-bacheca__card-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0d7a4a;
  background: rgba(13, 122, 74, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 2rem;
}

.welcome-bacheca__card-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fest-purple);
  background: rgba(96, 45, 145, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 2rem;
}

.welcome-bacheca__card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--fest-navy);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.welcome-bacheca__card-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--fest-text-muted);
  flex: 1;
}

.welcome-bacheca__card-desc--muted {
  font-style: italic;
  opacity: 0.85;
}

.welcome-bacheca__card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--fest-orange);
  transition: gap 0.15s ease;
}

.welcome-bacheca__card-hit:hover .welcome-bacheca__card-cta {
  gap: 0.45rem;
}

.welcome-bacheca__card-cta i {
  font-size: 1.15rem;
}

/* Empty */
.welcome-bacheca__empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--fest-radius);
  border: 1px dashed rgba(21, 38, 92, 0.12);
  box-shadow: var(--fest-shadow);
}

.welcome-bacheca__empty-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 130, 32, 0.15), rgba(96, 45, 145, 0.12));
  color: var(--fest-purple);
  font-size: 1.75rem;
}

.welcome-bacheca__empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fest-navy);
  margin: 0 0 0.5rem;
}

.welcome-bacheca__empty-text {
  color: var(--fest-text-muted);
  margin: 0 0 1.25rem;
  max-width: 22rem;
  margin-inline: auto;
}

/* Footer */
.welcome-bacheca__footer {
  margin-top: 2.5rem;
  font-size: 0.8rem;
  color: #6b7280;
  text-align: center;
}

/* Modal */
.welcome-bacheca__modal {
  border-radius: 1rem;
  border: none;
  box-shadow: 0 16px 48px rgba(21, 38, 92, 0.18);
}

.welcome-bacheca__modal-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.welcome-bacheca__modal-media {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  background: rgba(21, 38, 92, 0.06);
  overflow: hidden;
}

.welcome-bacheca__modal-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.2rem;
}

.welcome-bacheca__modal-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--card-accent, var(--fest-orange)), var(--fest-purple));
}

.welcome-bacheca__modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fest-navy);
}

.welcome-bacheca__modal-desc {
  font-size: 0.85rem;
  color: var(--fest-text-muted);
  line-height: 1.4;
}

.welcome-bacheca__modal-hint {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fest-text-muted);
  margin-bottom: 0.75rem;
}

.welcome-bacheca__modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.welcome-bacheca__action {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  text-align: left;
  text-decoration: none;
  color: var(--fest-text);
  background: #f8f9fc;
  border: 1px solid rgba(21, 38, 92, 0.08);
  border-radius: 0.65rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

button.welcome-bacheca__action {
  font: inherit;
}

.welcome-bacheca__action:not(.is-disabled):hover {
  background: #fff;
  border-color: rgba(21, 38, 92, 0.16);
  color: var(--fest-navy);
}

.welcome-bacheca__action.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.welcome-bacheca__action strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fest-navy);
}

.welcome-bacheca__action small {
  display: block;
  font-size: 0.78rem;
  color: var(--fest-text-muted);
  margin-top: 0.1rem;
}

.welcome-bacheca__action-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-size: 1.15rem;
  background: rgba(21, 38, 92, 0.08);
  color: var(--fest-navy);
}

.welcome-bacheca__action-icon--orange {
  background: rgba(245, 130, 32, 0.15);
  color: #c45f00;
}

.welcome-bacheca__action-icon--purple {
  background: rgba(96, 45, 145, 0.12);
  color: var(--fest-purple);
}

.welcome-bacheca__action-icon--navy {
  background: rgba(21, 38, 92, 0.1);
  color: var(--fest-navy);
}

@media (max-width: 575.98px) {
  .welcome-bacheca__masthead {
    padding: 1.1rem 1rem 1.25rem;
  }

  .welcome-bacheca__masthead-row {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
  }

  .welcome-bacheca__masthead-actions {
    width: 100%;
  }

  .welcome-bacheca__masthead-actions .welcome-bacheca__btn {
    flex: 1;
  }

  .welcome-bacheca__grid {
    grid-template-columns: 1fr;
  }

  .welcome-bacheca__card--featured {
    grid-column: span 1;
  }
}
