/* css/style.css — AutoRaduni Italia — Dark Theme */
/* Google Fonts caricati non-blocking via <link> in header.php */

:root {
  --primary:      #e8401c;
  --primary-dark: #c0320e;
  --accent:       #e8401c;
  --orange:       #f5a623;
  --bg:           #0a0a0a;
  --bg-card:      #111111;
  --bg-card2:     #161616;
  --bg-panel:     #1a1a1a;
  --text:         #f0f0f0;
  --text-muted:   #9a9a9a;
  --text-dim:     #888;
  --border:       #2a2a2a;
  --border-light: #333;
  --success:      #27ae60;
  --danger:       #e74c3c;
  --warning:      #f39c12;
  --radius:       10px;
  --radius-sm:    6px;
  --shadow:       0 4px 24px rgba(0,0,0,0.5);
  --shadow-card:  0 2px 16px rgba(0,0,0,0.6);
  --transition:   all 0.2s ease;

  /* Spacing scale */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  0.75rem;
  --space-lg:  1rem;
  --space-xl:  1.5rem;
  --space-2xl: 2rem;
  --space-3xl: 3rem;

  /* Border radius */
  --radius-full: 50px;

  /* Racing chamfer cuts */
  --cut:    12px;
  --cut-sm: 6px;
  --cut-lg: 20px;
  --red:    #ef4942;

  /* Typography scale */
  --text-xs:  0.7rem;
  --text-sm:  0.8rem;
  --text-base: 0.9rem;
  --text-md:  1rem;
  --text-lg:  1.1rem;
  --text-xl:  1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 3rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  font-family: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
.skip-link:focus { top: 0 !important; }
a:hover { color: var(--primary-dark); }
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.event-card:focus-visible,
.cat-item:focus-visible {
  box-shadow: 0 0 0 3px var(--primary);
  outline: none;
}
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
img { max-width: 100%; }

/* -----------------------------------------------
   HEADER / NAV
----------------------------------------------- */
.site-header {
  background: #050505;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.nav-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 1px;
  color: #fff;
  text-transform: uppercase;
}
.nav-logo span { color: var(--primary); }
.nav-logo .logo-icon { display: none; }
.nav-logo-img { height: 40px; width: auto; display: block; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
}
.nav-menu .mobile-only { display: none; }
.nav-menu .desktop-only { display: list-item; }

.nav-menu a {
  color: rgba(255,255,255,0.75);
  padding: 0.55rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: var(--transition);
}
.nav-menu a:hover, .nav-menu a.active {
  color: #fff;
  background: rgba(255,255,255,0.07);
}

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
/* ── Tasto + NUOVO ── */
.nav-menu a.btn-nuovo,
li a.btn-nuovo {
  background: transparent !important;
  color: #fff !important;
  padding: .4rem .9rem !important;
  font-weight: 800 !important;
  letter-spacing: 1px !important;
  font-size: .78rem !important;
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  isolation: isolate !important;
}
.nav-menu a.btn-nuovo::before,
li a.btn-nuovo::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: #e8401c !important;
  /*border-radius: 2px !important;*/
  transform: skewX(-10deg) !important;
  transition: background .2s, transform .2s !important;
  z-index: -1 !important;
}
.nav-menu a.btn-nuovo:hover::before,
li a.btn-nuovo:hover::before {
  background: #c0392b !important;
  transform: skewX(-10deg) translateY(-1px) !important;
}
.nav-menu a.btn-nuovo:hover,
li a.btn-nuovo:hover {
  color: #fff !important;
}

/* ── Notifiche campanella ── */
.notif-dropdown { position: relative; }

.notif-trigger {
  position: relative;
  background: none;
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 5px 6px;
  transition: background .15s;
  line-height: 1;
  color: var(--text-muted);
}
.notif-trigger:hover {
  background: rgba(255,255,255,.07);
}
.notif-trigger svg {
  transition: stroke .2s, fill .2s;
}
/* Campanella gialla con pallino quando ci sono notifiche */
.notif-trigger.has-notif svg {
  stroke: #f5a623;
  fill: #f5a623;
  filter: drop-shadow(0 0 4px rgba(245,166,35,.5));
}

.notif-badge {
  position: absolute;
  top: 0px; right: 0px;
  background: var(--primary);
  color: #fff;
  font-size: .55rem;
  font-weight: 800;
  min-width: 15px; height: 15px;
  border-radius: 50px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  line-height: 1;
  border: 2px solid var(--bg-nav);
}

.notif-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 250px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 1000;
}
.notif-dropdown.open .notif-menu,
.notif-dropdown:focus-within .notif-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.notif-menu a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem 1rem;
  font-size: .83rem;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background .15s, color .15s;
}
.notif-menu a:last-child { border-bottom: none; }
.notif-menu a:hover { background: var(--bg-panel); color: #fff; }


.btn-nav-login {
  color: rgba(255,255,255,0.8) !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  padding: 0.55rem 1.1rem !important;
  border-radius: 4px !important;
}
.btn-nav-login:hover { color: #fff !important; }

.user-dropdown { position: relative; }
.user-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 0.35rem 0.85rem 0.35rem 0.35rem;
  cursor: pointer;
  color: #fff;
  transition: var(--transition);
}
.user-trigger:hover { background: rgba(255,255,255,0.1); }

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  color: #fff;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  min-width: 190px;
  border: 1px solid var(--border);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 100;
}
.user-dropdown:hover .dropdown-menu,
.user-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  color: var(--text);
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
}
.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover { background: var(--bg-panel); color: #fff; }
.dropdown-menu a:hover svg { stroke: #fff; }
.dropdown-menu a svg { stroke: var(--text-muted); transition: stroke 0.15s; flex-shrink: 0; }
.dropdown-menu a.danger { color: var(--text-muted); }
.dropdown-menu a.danger svg { stroke: var(--text-muted); }
.dropdown-menu a.danger:hover { background: rgba(231,76,60,0.12); color: var(--danger); }
.dropdown-menu a.danger:hover svg { stroke: var(--danger); }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

/* -----------------------------------------------
   BUTTONS
----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.4rem;
  /*border-radius: var(--radius-sm);*/
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}

.btn-primary {
  background: transparent;
  color: #fff;
  border-color: transparent;
  position: relative;
  isolation: isolate;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 4px;
  transition: var(--transition);
  z-index: -1;
}
.btn-primary:hover::before {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
}
.btn-primary:hover {
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.35);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-light);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #1e8449; color: #fff; }
.btn-danger {
  background: transparent;
  color: #fff;
  border-color: transparent;
  position: relative;
  isolation: isolate;
}
.btn-danger::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--danger);
  border: 2px solid var(--danger);
  border-radius: 4px;
  transition: var(--transition);
  z-index: -1;
}
.btn-danger:hover::before {
  background: #c0392b;
  border-color: #c0392b;
  transform: translateY(-2px);
}
.btn-danger:hover { color: #fff; }

.btn-sm  { padding: 0.35rem 0.8rem; font-size: 0.75rem; }
.btn-lg  { padding: 0.85rem 2rem; font-size: 0.88rem; letter-spacing: 1px; }
.btn-block { width: 100%; justify-content: center; }

/* -----------------------------------------------
   HERO
----------------------------------------------- */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #000;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  filter: grayscale(30%);
}

/* Video hero */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.38;
  filter: saturate(0.7) brightness(0.9);
  pointer-events: none;
}

/* Hero mobile slideshow */
.hero-mobile-slides { display: none; position: absolute; inset: 0; overflow: hidden; }
.hero-mobile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 0;
}
.hero-mobile-img.active { opacity: 1; }

@media (max-width: 768px) {
  .hero { min-height: 420px; }
  .hero-video { display: none; }
  .hero-mobile-slides { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(175deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 4.5rem 2rem;
  animation: heroFadeIn .8s ease-out;
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #fff;
  line-height: .95;
  margin-bottom: 1.25rem;
  animation: heroTitleIn .6s ease-out .2s both;
}
@keyframes heroTitleIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hero h1 .highlight {
  color: var(--primary);
  text-shadow: 0 0 40px rgba(232,64,28,.3);
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2.5rem;
  font-weight: 400;
  animation: heroFadeIn .6s ease-out .4s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: heroFadeIn .6s ease-out .5s both;
}

.hero-scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.4);
  font-size: 1.2rem;
  animation: bounce 2.5s ease-in-out infinite;
  cursor: pointer;
  transition: color .2s;
}
.hero-scroll:hover { color: var(--primary); }
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: heroFadeIn .6s ease-out .6s both;
}
.hero-stats > div {
  padding: .5rem 1rem;
  background: rgba(255,255,255,.04);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  backdrop-filter: blur(4px);
  transition: border-color .3s;
}
.hero-stats > div:hover { border-color: rgba(232,64,28,.4); }
.hero-stat-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.15rem;
}

/* -----------------------------------------------
   SEARCH / FILTRI HOME
----------------------------------------------- */
.home-search {
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 2rem;
  position: relative;
}
.home-search::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--primary), transparent);
  opacity: .3;
}
.home-search-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}
.home-search .search-q-wrap { flex: 1 1 160px; min-width: 160px; box-sizing: border-box; }
.home-search .search-q-wrap > input { width: 100%; box-sizing: border-box; }
.home-search input,
.home-search select {
  flex: 1;
  min-width: 160px;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.6rem 0.9rem;
  font-size: 0.88rem;
  font-family: inherit;
  transition: var(--transition);
}
.home-search input::placeholder { color: var(--text-dim); }
.home-search input:focus,
.home-search select:focus {
  outline: none;
  border-color: var(--primary);
  background: #1e1e1e;
}
.home-search select option { background: #1a1a1a; }
.home-search-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .5px;
  line-height: 1.1;
  color: #fff;
  max-width: 1320px;
  margin: 0 auto .85rem;
}
.home-search-title span { color: var(--primary); }
body.light-mode .home-search-title { color: #1a1a1a; }

/* -----------------------------------------------
   SEZIONI / LAYOUT
----------------------------------------------- */
.home-section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
}

/* sezione card full-width come mappa */
.cards-section {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cards-section-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.home-section + .home-section {
  padding-top: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-title,
h1.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  overflow-wrap: break-word;
  margin: 0;
  padding: 0;
}
.section-title span { color: var(--primary); }
.section-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* -----------------------------------------------
   EVENT CARDS — Dark Style
----------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  height: 100%;
  overflow: hidden;
}
.event-card:hover {
  border-color: rgba(232,64,28,.4);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

/* overlay invisibile che rende tutta la card cliccabile */
.card-overlay-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.event-card:hover {
  color: inherit;
  text-decoration: none;
}
.event-card:hover {
  color: inherit;
  text-decoration: none;
}
.event-card:hover .card-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.event-card.featured {
  border-color: var(--orange);
  border-width: 2px;
}

/* immagine */
.card-image {
  position: relative;
  height: 360px;
  overflow: hidden;
  background: #000;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
  filter: grayscale(65%) brightness(0.75);
}
.event-card:hover .card-image img {
  transform: scale(1.07);
  filter: grayscale(0%) brightness(1);
}
.card-image-placeholder {
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.3;
}
body.light-mode .card-image-placeholder { background: #f0f0f0; }

/* badge categoria */
.card-badges {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  max-width: calc(100% - 65px);
}
.card-badge {
  background: rgba(0,0,0,0.75);
  border: 1px solid var(--orange);
  color: var(--orange);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}
.card-badge.cat { border-color: var(--orange); color: var(--orange); }
.card-badge.sub { border-color: #666; color: #bbb; }
.card-badge.feat { border-color: var(--primary); color: var(--primary); }

/* corpo card */
.card-body {
  padding: 1rem 1rem 0.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  line-height: 1.2;
  text-align: left;
}

.card-meta-row {
  display: flex;
  gap: 0.6rem 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
  align-items: center;
  justify-content: flex-start;
}
.card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.card-meta-item svg { opacity: 0.6; flex-shrink: 0; }

/* footer card */
.card-footer {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
}
.card-by {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.card-by strong { color: var(--text-muted); }

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.card-icon-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--text-muted);
  transition: var(--transition);
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: transparent;
}
.card-icon-btn:hover { color: #fff; border-color: #555; background: var(--bg-panel); }
.card-arrow {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--bg-panel);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  transition: var(--transition);
}
.card-arrow:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* -----------------------------------------------
   MAPPA
----------------------------------------------- */
.map-section {
  background: var(--bg-card2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.map-section-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
#home-map {
  height: 75vh;
  min-height: 500px;
  max-height: 800px;
  border-radius: 0;
  border: none;
  background: #111;
}
@media (max-width: 768px) {
  #home-map { height: 55vh; min-height: 300px; }
}

/* -----------------------------------------------
   FILTRI PAGINA RADUNI
----------------------------------------------- */
.filters-section {
  background: var(--bg-card);
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.filters-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(232,64,28,.3), transparent);
}
.filters-container { max-width: 1320px; margin: 0 auto; }
.filters-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
  font-weight: 700;
}
.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
  align-items: end;
}
.filter-group { display: flex; flex-direction: column; gap: 0.25rem; }
.filter-group label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.filter-group select,
.filter-group input[type="date"],
.filter-group input[type="text"] {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.82rem;
  background: var(--bg-panel);
  color: var(--text);
  font-family: inherit;
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,64,28,.1);
}
.filter-group select option { background: #1a1a1a; }

/* Quick filter chips */
.filter-chip {
  padding: .3rem .7rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: rgba(232,64,28,.15); border-color: var(--primary); color: var(--primary); }

/* Filter checkbox labels */
.filter-check {
  display: flex;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  font-size: .78rem;
  color: var(--text-muted);
  padding: .2rem .5rem;
  border-radius: 4px;
  transition: background .2s;
}
.filter-check:hover { background: rgba(255,255,255,.05); }

/* -----------------------------------------------
   MAIN CONTENT wrapper
----------------------------------------------- */
.main-content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* vecchi section-header/title per compatibilità */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.section-header .section-title { margin-bottom: 0; }

/* cards grid (usata anche in raduni.php) */
.cards-grid { grid-template-columns: repeat(3, 1fr); }

/* -----------------------------------------------
   CARD DATE BADGE (legacy compat)
----------------------------------------------- */
.card-date-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--primary);
  border-radius: 6px 0 0 0;
  padding: 0.5rem 0.75rem;
  text-align: center;
  line-height: 1;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 52px;
}
.card-date-badge .day {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -1px;
}

/* -----------------------------------------------
   CATEGORIE GRID
----------------------------------------------- */
.cat-section {
  background: #111;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cat-section-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.cat-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--primary); color: #fff; font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s, transform .15s;
}
.cat-arrow:hover { background: var(--primary-dark); transform: translateY(-50%) scale(1.08); }
.cat-arrow-prev { left: .5rem; }
.cat-arrow-next { right: .5rem; }
body.light-mode .cat-arrow { background: var(--primary); }
body.light-mode .cat-arrow:hover { background: var(--primary-dark); }

.cat-slide {
  flex: 0 0 calc(25% - 0.75rem);
  min-width: calc(25% - 0.75rem);
}
@media (max-width: 1024px) {
  .cat-slide { flex: 0 0 calc(33.333% - 0.667rem) !important; min-width: calc(33.333% - 0.667rem) !important; }
}
@media (max-width: 768px) {
  .cat-slide { flex: 0 0 100% !important; min-width: 100% !important; }
  #catTrack { overflow-x: visible; }
  .cat-arrow { width: 34px; height: 34px; font-size: 1rem; }
  .cat-arrow-prev { left: .3rem; }
  .cat-arrow-next { right: .3rem; }
}
@media (max-width: 600px) {
  /* Su mobile: nascondi le frecce del carosello (l'utente swipa, i dot sotto indicano la posizione).
     Evita anche che la freccia copra il banner data in cima alla card. */
  .cat-arrow { display: none; }
}
.cat-item {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: var(--radius-sm);
  aspect-ratio: 3 / 4;
  text-decoration: none;
  transition: box-shadow 0.3s ease;
  overflow: hidden;
}
.cat-item-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}
.cat-item:hover .cat-item-bg {
  transform: scale(1.07);
}
.cat-item::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.1) 100%);
  transition: background 0.3s ease;
}
.cat-item:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.cat-item:hover::before {
  background: linear-gradient(to top, rgba(232,64,28,0.8) 0%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.05) 100%);
}
.cat-item-label {
  position: relative;
  z-index: 1;
  padding: 1.25rem 0.75rem;
  text-align: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
}
.cat-item .cat-emoji { display: none; }
@media (max-width: 380px) {
  .cat-item-label { font-size: 0.82rem; padding: 1rem 0.5rem; }
}

/* -----------------------------------------------
   CTA BANNER
----------------------------------------------- */
.cta-banner {
  background: linear-gradient(135deg, #111 0%, #1a1a1a 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(232,64,28,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.cta-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(-45deg, var(--red) 0, var(--red) 28px, transparent 28px) top right / 30px 30px no-repeat,
    linear-gradient(-45deg, transparent calc(100% - 28px), var(--red) calc(100% - 28px), var(--red) 100%) bottom left / 30px 30px no-repeat;
  opacity: 0.7;
}
.cta-banner h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 0.75rem;
}
.cta-banner p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 2rem;
  font-size: 0.95rem;
}

/* -----------------------------------------------
   ALERT / FLASH
----------------------------------------------- */
.alert {
  padding: 0.9rem 1.25rem;
  border-radius: 4px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  border-left: 3px solid transparent;
}
.alert-success { background: rgba(39,174,96,0.1); border-color: var(--success); color: #5dbb7f; }
.alert-danger   { background: rgba(231,76,60,0.1);  border-color: var(--danger);  color: #e88; }
.alert-warning  { background: rgba(243,156,18,0.1); border-color: var(--warning); color: #f6c35d; }
.alert-info     { background: rgba(52,152,219,0.1); border-color: #3498db; color: #7ab8d9; }

/* -----------------------------------------------
   AUTH PAGES
----------------------------------------------- */
.auth-wrap {
  min-height: calc(100vh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--bg);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
}
.auth-card h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 0.5rem;
}
.auth-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.75rem; }

/* -----------------------------------------------
   FORMS (dashboard, auth)
----------------------------------------------- */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}
.form-section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-control {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  font-family: inherit;
  width: 100%;
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: #1e1e1e;
  box-shadow: 0 0 0 3px rgba(232,64,28,0.12);
}
.form-control::placeholder { color: var(--text-dim); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control option { background: #1a1a1a; }

.form-hint { font-size: 0.76rem; color: var(--text-dim); margin-top: 0.2rem; }
.required { color: var(--primary); }

.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* -----------------------------------------------
   DASHBOARD
----------------------------------------------- */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 2rem;
  min-height: calc(100vh - 62px);
}
.dashboard-layout > main {
  min-width: 0;
}

.sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  height: fit-content;
  position: sticky;
  top: 78px;
}

.sidebar-user {
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.sidebar-avatar {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--primary), var(--orange));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 auto 0.6rem;
}
.sidebar-name  { font-weight: 700; font-size: 0.9rem; color: #fff; }
.sidebar-email { font-size: 0.75rem; color: var(--text-muted); }

.sidebar-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}
.sidebar-nav a:hover { background: var(--bg-panel); color: #fff; }
.sidebar-nav a.active { background: var(--primary); color: #fff; }

/* stats dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  text-align: center;
}
.stat-number {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
}
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* -----------------------------------------------
   TABLE
----------------------------------------------- */
.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.table-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 0.8rem 1rem;
  background: var(--bg-panel);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  vertical-align: middle;
  color: var(--text-muted);
}
.data-table td strong { color: var(--text); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-panel); }

/* -----------------------------------------------
   DETAIL PAGE
----------------------------------------------- */
.detail-header {
  position: relative;
  background-color: #050505;
  border-bottom: none;
  padding: 6rem 2rem 3rem;
  overflow: hidden;
}
/* immagine di sfondo */
.detail-header-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.3) saturate(0.8);
  z-index: 0;
  pointer-events: none;
  user-select: none;
  transition: filter .5s ease;
}
.detail-header:hover .detail-header-bg { filter: brightness(0.35) saturate(0.9); }
/* overlay gradiente raffinato */
.detail-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(175deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.92) 100%);
  z-index: 1;
}
.detail-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--primary), transparent);
  z-index: 2;
}
.detail-header > *:not(.detail-header-bg) { position: relative; z-index: 2; }
.detail-type-badge {
  display: inline-block;
  border: 1px solid var(--orange);
  color: var(--orange);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: 'Barlow Condensed', sans-serif;
}
.detail-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.detail-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.detail-meta-item {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.88rem; color: rgba(255,255,255,.7);
  padding: .25rem .6rem;
  background: rgba(255,255,255,.06);
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.detail-body { max-width: 1320px; margin: 0 auto; padding: 2.5rem 2rem; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; }
@media (max-width: 1100px) {
  .detail-grid { gap: 2rem; }
}
@media (max-width: 900px) {
  .detail-body { padding: 1.5rem 1rem; }
  .detail-grid { gap: 1.25rem; }
  .info-card { padding: 1.1rem; margin-bottom: 1rem; }
  .info-card h2, .info-card h3 { font-size: 1.1rem; padding-bottom: .5rem; margin-bottom: .85rem; }
}
@media (max-width: 480px) {
  .detail-body { padding: 1rem .75rem; }
  .info-card { padding: 1rem .85rem; }
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: box-shadow .2s;
  position: relative;
}
.info-card:hover { border-color: rgba(232,64,28,.3); }
.info-card h2, .info-card h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text);
  margin: 0 0 1rem;
  font-weight: 800;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .55rem;
}
.info-card h2 svg, .info-card h3 svg {
  opacity: .55;
  flex-shrink: 0;
}
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 0.88rem;
  transition: background .15s;
}
.info-row:hover { background: rgba(255,255,255,.02); border-radius: 4px; }
.info-row:last-child { border-bottom: none; }
.info-row .info-icon { font-size: 1rem; min-width: 1.4rem; }
.info-row .info-label { color: var(--text-dim); min-width: 95px; font-size: 0.8rem; font-weight: 600; }
.info-row .info-value { color: var(--text); font-weight: 500; }

/* -----------------------------------------------
   FOOTER
----------------------------------------------- */

/* -----------------------------------------------
   SPONSOR CAROSELLO
----------------------------------------------- */
.sponsor-section {
  background: #0a0a0a;
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 1.75rem;
}
.sponsor-section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}
.sponsor-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.sponsor-section-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sponsor-arrows {
  display: flex;
  gap: .4rem;
}
.sponsor-arrow {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 44px; height: 44px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: .8rem;
  transition: background .2s, color .2s;
  user-select: none;
}
.sponsor-arrow:hover { background: rgba(255,255,255,.12); color: #fff; }

.sponsor-viewport {
  overflow: hidden;
  position: relative;
}
.sponsor-track {
  display: flex;
  transition: transform .4s cubic-bezier(.4,0,.2,1);
  gap: 1rem;
}
.sponsor-card {
  flex: 0 0 calc(25% - .75rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1rem;
  text-decoration: none;
  transition: border-color .2s, background .2s;
  min-height: 150px;
  position: relative;
  gap: .6rem;
}
.sponsor-card:hover {
  border-color: rgba(232,64,28,.4);
  background: rgba(255,255,255,.03);
}
.sponsor-card img {
  height: 44px;
  max-width: 120px;
  object-fit: contain;
  filter: grayscale(50%) brightness(.9);
  transition: filter .3s;
}
.sponsor-card:hover img { filter: grayscale(0%) brightness(1.1); }
.sponsor-card-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  text-align: center;
  transition: color .2s;
}
.sponsor-card:hover .sponsor-card-name { color: #fff; }
.sponsor-conv-dot {
  position: absolute;
  top: 7px; right: 8px;
  font-size: .65rem;
}

/* Pallini */
.sponsor-dots {
  display: flex;
  justify-content: center;
  gap: .45rem;
  margin-top: 1rem;
}
.sponsor-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .25s, transform .25s;
}
.sponsor-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

.site-footer {
  background: #050505;
  border-top: 1px solid var(--border);
  color: #aaa;
  padding: 0;
  font-size: 0.82rem;
  margin-top: auto;
  line-height: 1.6;
}
.site-footer a { color: #bbb; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

/* -----------------------------------------------
   PAGINATION
----------------------------------------------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.4rem; margin-top: 2rem; }
.page-item {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  font-size: 0.85rem; font-weight: 700;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
}
.page-item:hover, .page-item.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

/* -----------------------------------------------
   BADGES / UTILITIES
----------------------------------------------- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-primary { background: rgba(232,64,28,0.15); color: var(--primary); }
.badge-success { background: rgba(39,174,96,0.15); color: var(--success); }
.badge-warning { background: rgba(243,156,18,0.15); color: var(--orange); }
.badge-info    { background: rgba(52,152,219,0.15); color: #7ab8d9; }

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  width: 100%;
}
.empty-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.25; }
.empty-state h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 0.5rem; }

.card-price       { font-size: 0.82rem; color: var(--text-dim); }
.card-price.free  { color: var(--success); }
.card-desc        { font-size: 0.83rem; color: var(--text-dim); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* -----------------------------------------------
   LOADING / MODAL
----------------------------------------------- */
.loading-spinner { display: flex; align-items: center; justify-content: center; padding: 3rem; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 420px; width: 100%;
  transform: scale(0.95);
  transition: var(--transition);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-icon { font-size: 2.5rem; text-align: center; margin-bottom: 0.75rem; }
.modal h3 { font-size: 1.1rem; text-align: center; color: #fff; margin-bottom: 0.5rem; }
.modal p  { text-align: center; color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.9rem; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: center; }

/* -----------------------------------------------
   RESPONSIVE
----------------------------------------------- */
@media (max-width: 1024px) {
  .dashboard-layout { grid-template-columns: 210px 1fr; }
  .data-table td, .data-table th { font-size: 0.78rem; padding: 0.5rem 0.6rem; }
  .data-table .btn-sm { padding: 0.25rem 0.5rem; font-size: 0.7rem; }
  .form-row { flex-wrap: wrap; }
  .filters-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .sticky-cta-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: .75rem 1rem;
    display: flex;
    gap: .5rem;
    box-shadow: 0 -4px 12px rgba(0,0,0,.2);
  }
  .sticky-cta-mobile .btn { flex: 1; justify-content: center; }
  .sticky-cta-mobile .btn-outline { color: #fff; border-color: rgba(255,255,255,.3); }
  .sticky-cta-mobile .btn-outline svg { stroke: #fff; }
  .sticky-cta-mobile .card-fav-btn { flex: 0 0 50px !important; min-width: 50px; max-width: 50px; padding: 0; }
  .detail-body { padding-bottom: 80px; }
  /* Nasconde auth bar guest quando c'e' la sticky CTA (raduno.php) — il CTA ha gia il link login */
  body.has-sticky-cta .hdr-sticky-auth { display: none !important; }
  body.has-sticky-cta #cookieBanner { bottom: 60px; }
}
@media (min-width: 901px) {
  .sticky-cta-mobile { display: none; }
}

@media (max-width: 768px) {
  :root { --cut: 8px; --cut-lg: 14px; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .form-row-keep { grid-template-columns: 1fr 1fr !important; gap: 1rem; }
  .form-row-keep input[type="date"],
  .form-row-keep input[type="time"],
  .form-row-keep input[type="datetime-local"],
  .form-row-keep input[type="number"] { min-width: 0; max-width: 100%; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .home-search-inner { flex-direction: column; }
  .home-search input, .home-search select, .home-search .search-q-wrap { width: 100% !important; min-width: 0 !important; flex: none !important; }
  .home-search .btn { width: 100%; justify-content: center; }
  .filters-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .sponsor-card { flex: 0 0 calc(50% - .5rem); }
  .hero { min-height: 420px; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 4rem); }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 420px; margin-left: auto; margin-right: auto; }
  .how-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .sidebar { display: none !important; }
  .dashboard-layout { grid-template-columns: 1fr !important; }
  .detail-header { padding: 3rem 1rem 2rem; }
}
@media (max-width: 640px) {
  .cards-grid { grid-template-columns: 1fr; }
  .card-image { height: 220px; }
  .how-grid { grid-template-columns: 1fr !important; max-width: 400px; margin: 0 auto !important; }
}
@media (max-width: 600px) {
  #wkTrack, #uiTrack { gap: 1rem !important; }
  .wk-slide, .ui-slide { flex: 0 0 100% !important; min-width: 100% !important; }
}
@media (max-width: 540px) {
  .filters-grid { grid-template-columns: 1fr; }
  .home-section { padding: 2.5rem 1rem; }
  .auth-card { padding: 2rem 1.25rem; }
  .section-title { font-size: clamp(1.8rem, 8vw, 3rem); }
  .card-badge { font-size: 0.6rem; padding: 2px 6px; }
}
@media (max-width: 480px) {
  .hero-content { padding: 3rem 1rem; }
  .hero h1 { font-size: clamp(1.8rem, 9vw, 3rem); }
  .hero-sub { font-size: 0.9rem; padding: 0 0.5rem; }
  .hero-stat-num { font-size: 1.5rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .detail-meta { flex-direction: column; gap: .5rem; }
  .sponsor-card { flex: 0 0 100%; }
}

/* -----------------------------------------------
   UTILITIES
----------------------------------------------- */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.d-flex { display: flex; }
.gap-1  { gap: 0.5rem; }
.gap-2  { gap: 1rem; }
.align-center    { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── Descrizione raduno (HTML da Quill) ──────────────────── */
.descrizione-html p  { margin: 0 0 .4rem; word-break: break-word;}
.descrizione-html p:last-child { margin-bottom: 0; }
.descrizione-html b, .descrizione-html strong { color: var(--text-dim); font-weight: 700; }
.descrizione-html i, .descrizione-html em { font-style: italic; }
.descrizione-html u  { text-decoration: underline; }
.descrizione-html ul, .descrizione-html ol { padding-left: 1.4rem; margin: .5rem 0 .75rem; }
.descrizione-html li { margin-bottom: .25rem; }
.descrizione-html a  { color: var(--primary); text-decoration: underline; }
.descrizione-html a:hover { opacity: .8; }
.descrizione-html img { max-width: 100%; height: auto; border-radius: 8px; margin: .5rem 0; display: block; }
.descrizione-html table { width: 100%; border-collapse: collapse; margin: .75rem 0; font-size: .88rem; }
.descrizione-html td, .descrizione-html th { border: 1px solid var(--border); padding: .5rem .75rem; text-align: left; }
.descrizione-html th { background: rgba(255,255,255,.04); font-weight: 700; color: var(--text-dim); }
.descrizione-html hr { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }
.descrizione-html h2, .descrizione-html h3, .descrizione-html h4 { color: var(--text); margin: 1rem 0 .5rem; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; text-transform: uppercase; }
.descrizione-html h2 { font-size: 1.15rem; }
.descrizione-html h3 { font-size: 1rem; }
.descrizione-html h4 { font-size: .9rem; }

/* -----------------------------------------------
   ADMIN PANEL
----------------------------------------------- */
.dashboard-layout.admin-wide {
  max-width: 1600px;
  grid-template-columns: 200px 1fr;
  padding: 1.5rem 2rem;
}
@media (max-width: 860px) {
  .dashboard-layout.admin-wide { grid-template-columns: 1fr; padding: 1rem; }
}
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.25rem;
  align-items: start;
}

/* Stats bar */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .85rem;
  margin-bottom: 1.5rem;
}
.admin-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  display: flex; align-items: center; gap: .85rem;
  transition: box-shadow .2s, transform .15s;
  text-decoration: none;
}
.admin-stat:hover { border-color: rgba(232,64,28,.4); transform: translateY(-2px); }
.admin-stat-icon {
  width: 40px; height: 40px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.admin-stat-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.75rem; font-weight: 900; line-height: 1;
}
.admin-stat-lbl {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-dim); margin-top: .12rem;
}

/* Cards */
.adm-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}
.adm-card:last-child { margin-bottom: 0; }
.adm-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card2);
}
.adm-card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: .92rem;
  text-transform: uppercase; letter-spacing: .5px; color: #fff;
  display: flex; align-items: center; gap: .45rem;
}

/* Log table */
.adm-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.adm-table th {
  padding: .5rem .85rem; text-align: left;
  font-size: .66rem; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-dim); font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.adm-table td {
  padding: .65rem .85rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
  white-space: nowrap;
}
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr:hover td { background: rgba(255,255,255,.02); }
.adm-table { table-layout: auto; }
.adm-table td:first-child { white-space: normal; }

/* Raduni in attesa - right column items */
.raduno-attesa-row {
  padding: .8rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  display: flex; flex-direction: column; gap: .2rem;
}
.raduno-attesa-row:last-child { border-bottom: none; }

/* Alert box */
.adm-alert {
  display: flex; align-items: center; gap: .65rem;
  padding: .75rem 1rem;
  border-radius: 8px; font-size: .82rem; font-weight: 600;
  margin-bottom: .75rem;
}

@media (max-width: 1100px) {
  .admin-grid { grid-template-columns: 1fr; }
}

/* -----------------------------------------------
   SEARCH RESULTS DROPDOWN
----------------------------------------------- */
.search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background .15s;
  color: var(--text);
}
.search-result-item:hover { background: var(--bg-panel); }
.search-result-title { font-weight: 700; font-size: .88rem; color: var(--text); }
.search-result-meta { font-size: .75rem; color: var(--text-muted); }
.search-result-date { font-size: .75rem; color: var(--text-dim); white-space: nowrap; margin-left: 1rem; }

/* -----------------------------------------------
   SHARE BUTTONS
----------------------------------------------- */
.share-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: .6rem .4rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.share-btn:hover {
  background: var(--bg-card2);
  border-color: var(--border-light);
}

/* -----------------------------------------------
   QUICK FILTER CHIPS (index.php)
----------------------------------------------- */
/* -- Tasti scorciatoia sotto la ricerca -- */
.home-shortcuts {
  max-width: 1320px;
  margin: 1.4rem auto 0;
}
.shortcut-lead {
  display: block;
  margin-bottom: .65rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  line-height: 1.1;
  color: #fff;
}
.shortcut-lead--mt { margin-top: 1.3rem; }
body.light-mode .shortcut-lead { color: #1a1a1a; }
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
}
.shortcut-btn {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.1rem;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--bg-panel);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .2px;
  transition: var(--transition);
  position: relative;
}
.shortcut-btn:hover {
  border-color: var(--primary);
  background: var(--bg-card);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.shortcut-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(232, 64, 28, .1);
  color: var(--primary);
}
.shortcut-label { flex: 1; min-width: 0; line-height: 1.15; text-transform: uppercase; letter-spacing: .3px; }
.shortcut-count {
  flex-shrink: 0;
  min-width: 26px;
  text-align: center;
  padding: .15rem .5rem;
  border-radius: 50px;
  background: var(--primary);
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
}
.shortcut-btn--primary {
  background: rgba(232, 64, 28, .12);
  border-color: rgba(232, 64, 28, .45);
  color: var(--primary);
}
.shortcut-btn--primary .shortcut-ico { background: var(--primary); color: #fff; }
.shortcut-btn--primary:hover { background: rgba(232, 64, 28, .2); border-color: var(--primary); }
.region-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.region-btn {
  display: inline-flex;
  align-items: center;
  padding: .55rem 1.1rem;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-panel);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
  transition: var(--transition);
}
.region-btn:hover {
  border-color: var(--primary);
  background: var(--bg-card);
  transform: translateY(-1px);
}
.region-btn--all {
  background: rgba(232, 64, 28, .12);
  border-color: rgba(232, 64, 28, .45);
  color: var(--primary);
  font-weight: 800;
}
.region-btn--all:hover { background: rgba(232, 64, 28, .2); border-color: var(--primary); }
body.light-mode .region-btn { background: #f8f8f8; border-color: #ddd; color: #1a1a1a; }
body.light-mode .region-btn:hover { background: #fff; border-color: var(--primary); }
body.light-mode .region-btn--all { background: rgba(232, 64, 28, .1); border-color: rgba(232, 64, 28, .4); color: var(--primary); }
@media (max-width: 768px) {
  .shortcut-grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
  .shortcut-btn { padding: .7rem .8rem; font-size: .85rem; gap: .5rem; }
  .shortcut-ico { width: 34px; height: 34px; }
  .shortcut-ico svg { width: 18px; height: 18px; }
}

/* -----------------------------------------------
   TOP CONTRIBUTORS CARDS (index.php)
----------------------------------------------- */
.tc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}
.tc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem .75rem 1rem;
  text-decoration: none;
  transition: border-color .2s, background .2s;
  min-width: 0;
}
.tc-card:hover {
  border-color: var(--primary);
  background: var(--bg-card2);
}
.tc-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--orange));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
  font-family: 'Barlow Condensed', sans-serif;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(232, 64, 28, .25);
}
img.tc-avatar {
  background: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.tc-name {
  font-weight: 700;
  font-size: .85rem;
  color: var(--text);
  line-height: 1.2;
}
.tc-stat {
  font-size: .72rem;
  color: var(--text-dim);
  font-weight: 600;
}
.tc-stars { display: flex; gap: .1rem; justify-content: center; }
.tc-stars svg { width: 12px; height: 12px; }
.tc-last-event {
  font-size: .68rem;
  color: var(--text-dim);
  line-height: 1.3;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 1100px) { .tc-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
  .tc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .tc-grid {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------------------------
   PARTICIPANT AVATARS STACK (raduno.php)
----------------------------------------------- */
.avatar-stack {
  display: flex;
  align-items: center;
  padding: .5rem 0;
}
.avatar-stack-item {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  margin-left: -10px;
  position: relative;
  z-index: 1;
  transition: transform .15s;
  text-decoration: none;
  overflow: hidden;
}
.avatar-stack-item:first-child { margin-left: 0; }
.avatar-stack-item:hover { transform: translateY(-2px) scale(1.1); z-index: 10; }
.avatar-stack-more {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  background: var(--bg-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-left: -10px;
  flex-shrink: 0;
}
.avatar-stack-empty {
  font-size: .82rem;
  color: var(--text-dim);
  padding: .5rem 0;
}

/* -----------------------------------------------
   SEATS PROGRESS BAR (raduno.php)
----------------------------------------------- */
.seats-progress { margin-top: .5rem; margin-bottom: .25rem; }
.seats-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.seats-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .6s ease;
}
.seats-bar-fill--green { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.seats-bar-fill--yellow { background: linear-gradient(90deg, #f39c12, #f1c40f); }
.seats-bar-fill--red { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.seats-text {
  font-size: .72rem;
  color: var(--text-dim);
  margin-top: .3rem;
  font-weight: 600;
}

/* -----------------------------------------------
   SHARE GRID 4-COL (raduno.php)
----------------------------------------------- */
.share-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .4rem;
}
@media (max-width: 480px) {
  .share-grid-4 { grid-template-columns: 1fr 1fr; }
}

/* -----------------------------------------------
   PROGRAM TIMELINE (raduno.php)
----------------------------------------------- */
.program-timeline {
  position: relative;
  padding-left: 1.75rem;
}
.program-timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: .5rem;
  bottom: .5rem;
  width: 2px;
  background: var(--border);
}
.program-entry {
  position: relative;
  padding-bottom: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.program-entry:last-child { padding-bottom: 0; }
.program-entry::before {
  content: '';
  position: absolute;
  left: -1.75rem;
  top: .4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--primary);
  z-index: 2;
  box-shadow: 0 0 0 3px var(--bg);
}
.program-time {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: .95rem;
  color: var(--primary);
  min-width: 50px;
  letter-spacing: .5px;
}
.program-desc {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
}
@media (max-width: 640px) {
  .program-entry { flex-direction: column; gap: .25rem; }
  .program-time { min-width: unset; }
}

/* -----------------------------------------------
   MULTI-DAY WEATHER (raduno.php)
----------------------------------------------- */
.weather-multi {
  display: flex;
  gap: .5rem;
}
.weather-day {
  flex: 1;
  min-width: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .5rem .4rem;
  text-align: center;
}
.weather-day--event {
  border-color: var(--primary);
  border-width: 2px;
  background: rgba(232, 64, 28, .06);
}
.weather-day-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-dim);
  margin-bottom: .2rem;
  line-height: 1.2;
}
.weather-day--event .weather-day-name { color: var(--primary); }
.weather-day-icon { font-size: 1.3rem; line-height: 1; margin-bottom: .15rem; }
.weather-day-temp {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: .82rem;
  color: var(--text);
}
.weather-day-rain { font-size: .6rem; color: var(--text-dim); margin-top: .1rem; }

/* -----------------------------------------------
   SECTION TITLES (raduno.php)
----------------------------------------------- */
.rd-section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
}
.rd-section-title svg { opacity: .55; flex-shrink: 0; }
body.light-mode .rd-section-title { color: #1a1a1a; }
@media (max-width: 900px) {
  .rd-section-title { font-size: 1.1rem; padding-bottom: .5rem; margin-bottom: .85rem; }
}

/* -----------------------------------------------
   COME ARRIVARE (raduno.php)
----------------------------------------------- */
.come-arrivare-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.come-arrivare-card h3 svg { opacity: .55; flex-shrink: 0; }
@media (max-width: 900px) {
  .come-arrivare-card { padding: 1.1rem; }
  .come-arrivare-card h3 { font-size: 1.1rem; }
}
.come-arrivare-card h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text);
  margin-bottom: .75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.come-arrivare-text {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* -----------------------------------------------
   BREADCRUMB INTERACTIVE (raduno.php)
----------------------------------------------- */
.rd-breadcrumb {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}
.rd-breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color .15s;
}
.rd-breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rd-breadcrumb-chevron {
  display: inline-flex;
  align-items: center;
  margin: 0 .4rem;
  color: var(--text-dim);
  opacity: .5;
}
.rd-breadcrumb-current { color: rgba(255,255,255,.7); }

/* -----------------------------------------------
   FLIP CLOCK COUNTDOWN (raduno.php)
----------------------------------------------- */
.flip-unit { text-align: center; min-width: 55px; }
.flip-unit--narrow { min-width: 45px; }
.cd-digit-wrap {
  display: inline-block;
}
.cd-digit {
  display: inline-block;
  transition: opacity .2s, transform .2s;
}
.cd-digit.cd-changing {
  opacity: 0;
  transform: translateY(-4px);
}

/* -----------------------------------------------
   REVEAL ANIMATIONS (scroll-triggered)
----------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-child {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-child.revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-child, .cd-digit {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
}

/* -----------------------------------------------
   LIGHT MODE

----------------------------------------------- */
body.light-mode {
  --bg:           #f5f5f5;
  --bg-card:      #ffffff;
  --bg-card2:     #fafafa;
  --bg-panel:     #f0f0f0;
  --text:         #1a1a1a;
  --text-muted:   #555;
  --text-dim:     #888;
  --border:       #ddd;
  --border-light: #ccc;
  --shadow:       0 4px 24px rgba(0,0,0,0.08);
  --shadow-card:  0 2px 16px rgba(0,0,0,0.06);
}

/* Header light overrides are in header.php <style> */

/* ── Hero (resta dark) ── */
body.light-mode .hero { background: #111; }

/* ── Sections ── */
body.light-mode .section-title { color: #1a1a1a; }
body.light-mode .section-title span { color: var(--primary); }
body.light-mode .section-count { color: #666; }
body.light-mode .cat-section { background: #eee; border-color: #ddd; }
body.light-mode .cta-banner { background: linear-gradient(135deg, #e8401c 0%, #c0320e 100%); border-color: transparent; }
body.light-mode .cta-banner h2 { color: #fff; }
body.light-mode .cta-banner p { color: rgba(255,255,255,.85); }
body.light-mode .cta-banner .btn-primary { color: var(--primary) !important; }
body.light-mode .cta-banner .btn-primary::before { background: #fff !important; border-color: #fff !important; }
body.light-mode .cta-banner .btn-primary:hover { color: #fff !important; }
body.light-mode .cta-banner .btn-primary:hover::before { background: rgba(0,0,0,.2) !important; border-color: rgba(255,255,255,.5) !important; }

/* ── Cards ── */
body.light-mode .event-card { border: 1px solid #ddd; box-shadow: 0 2px 8px rgba(0,0,0,.06); background: #fff; }
body.light-mode .card-image { background: #fff; }
body.light-mode .card-title { color: #1a1a1a; }
body.light-mode .card-body { color: #333; }
body.light-mode .card-by { color: #666; }
body.light-mode .card-by strong { color: #333; }
body.light-mode .card-date-badge { color: #1a1a1a; }
body.light-mode .card-date-badge .day { color: #1a1a1a; }
body.light-mode .card-arrow { color: #333; border-color: #ccc; }
body.light-mode .card-icon-btn { color: #666; border-color: #ccc; }
body.light-mode .card-icon-btn:hover { color: var(--primary); border-color: var(--primary); background: rgba(232,64,28,.05); }

/* ── Sidebar ── */
body.light-mode .sidebar { background: #fff; border: 1px solid #ddd; }
body.light-mode .sidebar-name { color: #1a1a1a; }
body.light-mode .sidebar-email { color: #666; }
body.light-mode .sidebar-nav a { color: #333; }
body.light-mode .sidebar-nav a:hover, body.light-mode .sidebar-nav a.active { background: rgba(232,64,28,.06); color: var(--primary); }

/* ── Stats ── */
body.light-mode .stat-card { background: #fff; border: 1px solid #ddd; }
body.light-mode .stat-number { color: #1a1a1a; }
body.light-mode .stat-label { color: #666; }

/* ── Tables ── */
body.light-mode .table-wrapper { background: #fff; border: 1px solid #ddd; }
body.light-mode .table-header { border-color: #ddd; }
body.light-mode .data-table th { color: #666; border-color: #eee; }
body.light-mode .data-table td { color: #333; border-color: #f0f0f0; }
body.light-mode .data-table tr:hover td { background: #fafafa; }

/* ── Forms ── */
body.light-mode .form-card { background: #fff; border: 1px solid #ddd; }
body.light-mode .form-control { background: #fff; border-color: #ccc; color: #1a1a1a; }
body.light-mode .form-control:focus { border-color: var(--primary); background: #fff; }
body.light-mode select.form-control { background: #fff; color: #1a1a1a; }
body.light-mode select.form-control option { background: #fff; color: #1a1a1a; }
body.light-mode select option { background: #fff !important; color: #1a1a1a !important; }
body.light-mode select { background-color: #fff !important; color: #1a1a1a; }
body.light-mode .form-section-title { color: #222; }
body.light-mode .form-hint { color: #888; }
body.light-mode .form-divider { border-color: #eee; }

/* ── Auth ── */
body.light-mode .auth-card { background: #fff; border-color: #ddd; box-shadow: 0 4px 24px rgba(0,0,0,.06); }
body.light-mode .auth-card h1 { color: #1a1a1a; }

/* ── Detail / Raduno (header resta dark per overlay immagine) ── */
body.light-mode .detail-body { background: var(--bg); }
/* detail-header ha sempre sfondo scuro: TUTTI i testi restano chiari */
body.light-mode .detail-header { background-color: #050505; }
body.light-mode .detail-header * { color: #fff; }
body.light-mode .detail-header .detail-title { color: #fff !important; }
body.light-mode .detail-header .detail-meta-item { color: rgba(255,255,255,.7) !important; background: rgba(255,255,255,.1) !important; }
body.light-mode .detail-header .sub-badge { border-color: rgba(255,255,255,.25) !important; color: rgba(255,255,255,.7) !important; }
body.light-mode .detail-header .sub-badge.cat-badge { background: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; }
body.light-mode .detail-header nav a { color: rgba(255,255,255,.5) !important; }
body.light-mode .detail-header nav span { color: rgba(255,255,255,.5) !important; }
body.light-mode .detail-header #countdown [style*="color:var(--text-muted)"] { color: rgba(255,255,255,.6) !important; }
body.light-mode .detail-header [style*="color:var(--text-dim)"] { color: rgba(255,255,255,.5) !important; }
body.light-mode .detail-header [style*="color:var(--text-muted)"] { color: rgba(255,255,255,.6) !important; }
body.light-mode .info-card { background: #fff; border: 1px solid #ddd; }
body.light-mode .come-arrivare-card h3 { color: #1a1a1a; }
body.light-mode .info-label { color: #666; }
body.light-mode .info-value { color: #333; }
body.light-mode .sub-badge { border-color: #ccc; color: #555; }

/* ── Badges ── */
body.light-mode .badge { border-color: #ddd; }
body.light-mode .badge-primary { background: rgba(232,64,28,0.1); }
body.light-mode .badge-success { background: rgba(39,174,96,0.1); }

/* ── Alerts ── */
body.light-mode .alert { border-color: #ddd; }

/* ── Admin ── */
body.light-mode .admin-stat { background: #fff; border: 1px solid #ddd; }
body.light-mode .admin-stat-val { color: #1a1a1a; }
body.light-mode .adm-card { background: #fff; border-color: #ddd; }
body.light-mode .adm-card-head { background: #f8f8f8; border-color: #ddd; }
body.light-mode .adm-card-title { color: #1a1a1a; }
body.light-mode .adm-table th { color: #666; border-color: #eee; }
body.light-mode .adm-table td { color: #333; border-color: #f0f0f0; }
body.light-mode .adm-table tr:hover td { background: #fafafa; }
body.light-mode .adm-alert { border-color: #ddd; }

/* ── Messaggi ── */
body.light-mode .msg-layout { color: #1a1a1a; }

/* ── Empty state ── */
body.light-mode .empty-state { color: #666; }
body.light-mode .empty-state h3 { color: #1a1a1a; }

/* ── Modal ── */
body.light-mode .modal { background: #fff; border-color: #ddd; }
body.light-mode .modal h3 { color: #1a1a1a; }

/* ── Footer ── */
body.light-mode .site-footer { background: #fff; border-top-color: #ddd; }
body.light-mode .site-footer a { color: #555; }
body.light-mode .site-footer a:hover { color: var(--primary); }
body.light-mode .site-footer [style*="color:#fff"] { color: #1a1a1a !important; }
body.light-mode .site-footer [style*="color:var(--text-dim)"] { color: #888 !important; }
body.light-mode .sponsor-section { background: #f8f8f8; border-color: #ddd; }
body.light-mode .sponsor-section-label { color: #333; }
body.light-mode .sponsor-card { border: 1px solid #ddd; }
body.light-mode .sponsor-card-name { color: #333; }
body.light-mode #cookieBanner { background: #fff !important; border-color: #ddd !important; box-shadow: 0 -4px 20px rgba(0,0,0,.1) !important; }
body.light-mode #cookieBanner p { color: #333 !important; }

/* ── Search ── */
body.light-mode .home-search { background: #fff; border-color: #ddd; }
body.light-mode .home-search input, body.light-mode .home-search select { background: #f8f8f8; border-color: #ccc; color: #1a1a1a; }
body.light-mode .home-search select option { background: #fff; color: #1a1a1a; }
body.light-mode #searchDropdown { background: #fff; border-color: #ddd; }

/* ── Filtri (raduni.php) ── */
body.light-mode .filters-section { background: #fff; border-color: #ddd; }
body.light-mode .filter-chip { background: #f0f0f0; border-color: #ddd; color: #555; }
body.light-mode .filter-chip:hover { border-color: var(--primary); color: var(--primary); }
body.light-mode .filter-chip.active { background: rgba(232,64,28,.1); }
body.light-mode .filter-check { color: #555; }
body.light-mode .filter-check:hover { background: rgba(0,0,0,.04); }
body.light-mode .filter-group select,
body.light-mode .filter-group input[type="date"],
body.light-mode .filter-group input[type="text"] { background: #f8f8f8; border-color: #ccc; color: #1a1a1a; }
body.light-mode .filter-group select option { background: #fff; color: #1a1a1a; }

/* ── View toggle (griglia/mappa/calendario) ── */
body.light-mode .view-toggle { background: #eee; border-color: #ddd; }
body.light-mode .view-toggle-btn { color: #555; }
body.light-mode .view-toggle-btn:hover { color: #1a1a1a; }
body.light-mode .view-toggle-btn.active { background: #fff; color: #1a1a1a; box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* ── Blog ── */
body.light-mode .blog-card { border-color: #ddd; }

/* ── Toggle buttons (dashboard forms) ── */
body.light-mode .toggle-btn { background: #fff; color: #333; border-color: #ccc; }
body.light-mode .toggle-btn:hover { border-color: var(--primary); color: var(--primary); }
body.light-mode .toggle-btn.active { background: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important; }
body.light-mode .toggle-btn.active-green { background: #27ae60 !important; color: #fff !important; border-color: #27ae60 !important; }
body.light-mode .toggle-btn.active-no { background: #e74c3c !important; color: #fff !important; border-color: #e74c3c !important; }

/* ── Quill editor ── */
body.light-mode .ql-container.ql-snow { background: #fff; color: #1a1a1a; border-color: #ccc; }
body.light-mode .ql-toolbar.ql-snow { background: #f8f8f8; border-color: #ccc; }
body.light-mode .ql-snow .ql-stroke { stroke: #555 !important; }
body.light-mode .ql-snow .ql-fill { fill: #555 !important; }
body.light-mode .ql-snow .ql-picker { color: #555 !important; }
body.light-mode .ql-snow .ql-picker-options { background: #fff !important; border-color: #ccc !important; }
body.light-mode .ql-editor { color: #1a1a1a; }

/* ── Override inline color:#fff su tutti gli elementi principali ── */
body.light-mode .dashboard-layout [style*="color:#fff"],
body.light-mode .dashboard-layout [style*="color: #fff"],
body.light-mode .cards-section [style*="color:#fff"],
body.light-mode .cards-section [style*="color: #fff"],
body.light-mode .cards-section-inner [style*="color:#fff"],
body.light-mode .cards-section-inner [style*="color: #fff"],
body.light-mode .msg-layout [style*="color:#fff"],
body.light-mode .msg-layout [style*="color: #fff"],
body.light-mode .auth-wrap [style*="color:#fff"],
body.light-mode .auth-wrap [style*="color: #fff"],
body.light-mode .form-card [style*="color:#fff"],
body.light-mode .form-card [style*="color: #fff"],
body.light-mode .info-card [style*="color:#fff"],
body.light-mode .info-card [style*="color: #fff"],
body.light-mode .table-wrapper [style*="color:#fff"],
body.light-mode .table-wrapper [style*="color: #fff"],
body.light-mode .admin-grid [style*="color:#fff"],
body.light-mode .admin-grid [style*="color: #fff"],
body.light-mode .adm-card [style*="color:#fff"],
body.light-mode .adm-card [style*="color: #fff"],
body.light-mode .stat-card [style*="color:#fff"],
body.light-mode .stat-card [style*="color: #fff"],
body.light-mode .modal [style*="color:#fff"],
body.light-mode .modal [style*="color: #fff"] {
  color: #1a1a1a !important;
}

/* Eccezioni: NON cambiare il testo dentro hero, buttons colorati, badge su immagini, avatar */
body.light-mode .hero [style*="color:#fff"],
body.light-mode .hero [style*="color: #fff"],
body.light-mode .btn-primary,
body.light-mode .btn-success,
body.light-mode .btn-danger,
body.light-mode .card-badges [style*="color:#fff"],
body.light-mode .detail-header [style*="color:#fff"],
body.light-mode .detail-header [style*="color: #fff"],
body.light-mode .cat-item-label,
body.light-mode .user-avatar,
body.light-mode .sidebar-avatar,
body.light-mode [style*="background:var(--primary)"][style*="color:#fff"],
body.light-mode [style*="background:#e8401c"][style*="color:#fff"],
body.light-mode [style*="background:linear-gradient"][style*="color:#fff"],
body.light-mode .notif-badge,
body.light-mode .badge-primary[style*="color:#fff"],
body.light-mode [style*="border-radius:50px"][style*="background:var(--primary)"],
body.light-mode [style*="border-radius:50px"][style*="background:#f5a623"],
body.light-mode [style*="border-radius:50px"][style*="background:#e8401c"],
body.light-mode [style*="background:var(--primary)"][style*="color:#fff"],
body.light-mode [style*="background:var(--primary);color:#fff"] {
  color: #fff !important;
}

/* ── Pulse animation (IN CORSO badge) ── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ── Come funziona ── */
body.light-mode .how-section { background: #f0f0f0 !important; border-color: #ddd !important; }

/* How it works step animation */
.how-grid > div { transition: transform .3s ease; }
.how-grid > div:hover { transform: translateY(-6px); }
.how-grid > div:hover > div:first-child { border-color: var(--primary); background: rgba(232,64,28,.15); }
.how-grid > div > div:first-child { transition: border-color .3s, background .3s; }
body.light-mode .how-grid [style*="color:#fff"],
body.light-mode .how-grid [style*="color: #fff"] {
  color: #1a1a1a !important;
}

/* ── Light mode: nuovi componenti ── */
body.light-mode .shortcut-btn { background: #f8f8f8; border-color: #ddd; color: #1a1a1a; }
body.light-mode .shortcut-btn:hover { background: #fff; border-color: var(--primary); }
body.light-mode .shortcut-btn--primary { background: rgba(232, 64, 28, .1); border-color: rgba(232, 64, 28, .4); color: var(--primary); }
body.light-mode .tc-card { background: #fff; border-color: #ddd; }
body.light-mode .tc-card:hover { border-color: var(--primary); background: #fafafa; }
body.light-mode .tc-name { color: #1a1a1a; }
body.light-mode .avatar-stack-item { border-color: #fff; }
body.light-mode .avatar-stack-more { background: #f0f0f0; color: #555; }
body.light-mode .seats-bar { background: #ddd; }
body.light-mode .weather-day { background: #f8f8f8; border-color: #ddd; }
body.light-mode .weather-day--event { background: rgba(232,64,28,.04); border-color: var(--primary); }
body.light-mode .come-arrivare-card { background: #fff; border-color: #ddd; border-left-color: var(--primary); }
body.light-mode .rd-breadcrumb a { color: #888; }
body.light-mode .rd-breadcrumb a:hover { color: var(--primary); }
body.light-mode .rd-breadcrumb-current { color: #333; }
body.light-mode .program-timeline::before { background: #ddd; }
body.light-mode .program-entry::before { background: #fff; box-shadow: 0 0 0 3px #fff; }

/* Disclaimer "raduno segnalato dalla community" (raduno.php) */
.rd-disclaimer { display: flex; gap: .9rem; align-items: flex-start; background: rgba(245,166,35,.08); border: 1px solid rgba(245,166,35,.35); border-left: 4px solid #f5a623; border-radius: var(--radius-sm); padding: 1.1rem 1.25rem; margin-top: 1.25rem; }
.rd-disclaimer-ico { flex: none; width: 24px; height: 24px; color: #f5a623; margin-top: .1rem; }
.rd-disclaimer-body strong { display: block; font-size: .98rem; font-weight: 700; color: var(--text); margin-bottom: .35rem; }
.rd-disclaimer-body p { font-size: .88rem; line-height: 1.6; color: var(--text-muted); margin: 0; }
body.light-mode .rd-disclaimer { background: rgba(245,166,35,.1); border-color: rgba(245,166,35,.45); }

/* =====================================================================
   HOME2 REDESIGN  (index2.php)  —  tutto scoped sotto .hp2
   Skin DARK = default (.hp2)  /  Skin PAPER = body.light-mode .hp2
   index2 imposta $defaultTheme='light' => paper di default, toggle => dark.
   Font: Archivo / Archivo Expanded / Hanken Grotesk (caricati solo su index2).
   ===================================================================== */
.hp2 {
  /* brand / costanti (indipendenti dal tema) */
  --hp-orange:#E8401C;
  --hp-orange-bright:#FF551F;
  --hp-green:#1F8A4C;
  --hp-gold:#C8922A;
  --hp-ink:#0E0F11;          /* sezioni sempre scure (hero, mappa, cta) */
  --hp-ink-2:#16181C;
  --hp-radius:14px;
  --hp-shadow:0 10px 40px rgba(14,15,17,.10);
  --hp-shadow-card:0 4px 24px rgba(14,15,17,.08);

  /* skin DARK (quando il toggle disattiva light-mode) */
  --hp-bg:#0E0F11;
  --hp-surface:#16181C;
  --hp-surface-2:#22252B;
  --hp-text:#F6F4EF;
  --hp-muted:#9A968E;
  --hp-muted-2:#6E6A62;
  --hp-line:rgba(255,255,255,.10);
  --hp-tab-bg:#1b1e23;

  background:var(--hp-bg);
  color:var(--hp-text);
  font-family:'Hanken Grotesk','Segoe UI',system-ui,sans-serif;
  line-height:1.5;
}
/* skin PAPER (default di index2: body parte con light-mode) */
body.light-mode .hp2 {
  --hp-bg:#F6F4EF;
  --hp-surface:#FFFFFF;
  --hp-surface-2:#EFEBE2;
  --hp-text:#0E0F11;
  --hp-muted:#6E6A62;
  --hp-muted-2:#9A968E;
  --hp-line:#E3DED4;
  --hp-tab-bg:#EDEAE2;
}
.hp2 *,
.hp2 *::before,
.hp2 *::after { box-sizing:border-box; }
.hp2 a { color:inherit; text-decoration:none; }
.hp2 .wrap { max-width:1300px; margin:0 auto; padding:0 24px; }
.hp2 .display { font-family:'Archivo Expanded','Archivo',sans-serif; }
.hp2 .cond { font-family:'Archivo',sans-serif; }
.hp2 section { padding:74px 0; }
@media (max-width:680px){ .hp2 section { padding:54px 0; } }
/* ---- HERO ---- */
.hp2 .hero { position:relative; display:flex; flex-direction:column; justify-content:center; align-items:stretch; text-align:left; min-height:760px; background:var(--hp-ink); color:#fff; overflow:hidden; padding:110px 0; }
.hp2 .hero .wrap { width:100%; }
.hp2 .hero-video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; }
.hp2 .hero-bg { position:absolute; inset:0; z-index:1; opacity:1; filter:none; background:
  radial-gradient(120% 90% at 80% -10%, rgba(232,64,28,.42), transparent 55%),
  radial-gradient(90% 80% at 10% 110%, rgba(40,60,90,.45), transparent 60%),
  linear-gradient(180deg, rgba(14,15,17,.72), rgba(22,24,28,.86)); }
.hp2 .hero-bg::after { content:""; position:absolute; inset:0; opacity:.06; background-image:repeating-linear-gradient(90deg,#fff 0 1px,transparent 1px 56px); }
.hp2 .hero .wrap { position:relative; z-index:2; }
.hp2 .eyebrow { display:inline-flex; align-items:center; gap:8px; font-size:12.5px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:#FFB59E; background:rgba(232,64,28,.16); border:1px solid rgba(232,64,28,.35); padding:6px 14px; border-radius:100px; }
.hp2 .eyebrow .dot { width:7px; height:7px; border-radius:50%; background:var(--hp-orange-bright); box-shadow:0 0 0 4px rgba(255,85,31,.25); }
.hp2 h1.hero-title { font-family:'Archivo Expanded','Archivo',sans-serif; text-transform:none; font-weight:900; font-size:clamp(40px,5.4vw,64px); line-height:1.05; letter-spacing:-.5px; margin:30px 0 22px; max-width:920px; color:#fff; animation:none; }
.hp2 h1.hero-title em { font-style:normal; color:var(--hp-orange-bright); }
.hp2 .hero-sub { font-size:clamp(16px,1.7vw,18px); line-height:1.65; color:#C9C7C2; max-width:640px; margin-bottom:46px; }
/* searchbar */
.hp2 .searchbar { display:flex; gap:0; background:#fff; border-radius:16px; padding:8px; box-shadow:0 20px 50px rgba(0,0,0,.4); max-width:none; align-items:stretch; }
.hp2 .sb-field { flex:1; padding:8px 16px; border-right:1px solid #E3DED4; position:relative; min-width:0; }
.hp2 .sb-field--q { flex:1.4; }
.hp2 .sb-field label { display:block; font-size:11px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; color:#6E6A62; }
.hp2 .sb-field .val { display:flex; align-items:center; gap:7px; color:#0E0F11; font-weight:600; font-size:15px; margin-top:3px; }
.hp2 .sb-field .val svg { color:var(--hp-orange); flex:none; }
.hp2 .sb-field .val input, .hp2 .sb-field .val select { border:0; outline:0; background:transparent; font:inherit; color:#0E0F11; font-weight:600; width:100%; padding:0; cursor:pointer; }
.hp2 .sb-field .val input { cursor:text; }
.hp2 .sb-field .val select { appearance:none; -webkit-appearance:none; }
.hp2 .sb-go { background:var(--hp-orange); color:#fff; border:0; border-radius:12px; padding:0 26px; font-weight:800; font-size:15px; cursor:pointer; display:flex; align-items:center; gap:8px; font-family:'Archivo',sans-serif; transition:.18s; flex:none; }
.hp2 .sb-go:hover { background:var(--hp-orange-bright); }
.hp2 .geo-hint { margin-top:18px; display:inline-flex; align-items:center; gap:9px; color:#FFB59E; font-size:13.5px; font-weight:600; }
.hp2 .geo-hint:hover { color:#fff; }
/* chips */
.hp2 .chips { display:flex; flex-wrap:wrap; gap:10px; margin-top:38px; justify-content:center; }
.hp2 .chip { font-size:13.5px; font-weight:600; color:#D7D5D0; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); padding:8px 16px; border-radius:100px; transition:.18s; }
.hp2 .chip:hover { background:rgba(255,255,255,.14); color:#fff; }
.hp2 .chip.hot { color:#fff; border-color:rgba(232,64,28,.5); background:rgba(232,64,28,.18); }
/* stats */
.hp2 .hero-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:0; margin:22px 0 44px; border-top:1px solid rgba(255,255,255,.12); border-bottom:1px solid rgba(255,255,255,.12); }
.hp2 .hstat { padding:28px 22px; text-align:center; background:none; box-shadow:none; backdrop-filter:none; border-radius:0; border-right:1px solid rgba(255,255,255,.12); }
.hp2 .hstat:last-child { border-right:0; }
.hp2 .hstat .num { font-family:'Archivo Expanded',sans-serif; font-weight:900; font-size:clamp(28px,3.4vw,38px); color:#fff; line-height:1; }
.hp2 .hstat .lbl { font-size:13px; color:var(--hp-muted); font-weight:600; margin-top:6px; text-transform:uppercase; letter-spacing:.4px; }
/* search dropdown */
.hp2 .hp2-search-dd { display:none; position:absolute; top:calc(100% + 10px); left:0; right:0; background:#fff; border:1px solid #E3DED4; border-radius:12px; max-height:340px; overflow-y:auto; z-index:60; box-shadow:0 16px 40px rgba(0,0,0,.25); text-align:left; }
.hp2 .search-result-item { display:flex; align-items:center; gap:.7rem; padding:.6rem .85rem; text-decoration:none; color:#0E0F11; border-bottom:1px solid #EFEBE2; }
.hp2 .search-result-item:last-child { border-bottom:none; }
.hp2 .search-result-item:hover, .hp2 .search-result-item.active { background:rgba(232,64,28,.08); }
.hp2 .search-result-thumb { flex-shrink:0; width:42px; height:42px; border-radius:6px; object-fit:cover; background:#EFEBE2; }
.hp2 .search-result-thumb-empty { flex-shrink:0; width:42px; height:42px; border-radius:6px; background:linear-gradient(135deg,#e8401c33,#c0392b33); display:flex; align-items:center; justify-content:center; font-size:1.1rem; }
.hp2 .search-result-body { flex:1; min-width:0; }
.hp2 .search-result-title { font-weight:700; font-size:.88rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.2; }
.hp2 .search-result-meta { font-size:.74rem; color:#6E6A62; margin-top:.15rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hp2 .search-result-date { flex-shrink:0; font-size:.74rem; color:#9A968E; font-weight:600; }
.hp2 .search-state { padding:1rem; text-align:center; color:#6E6A62; font-size:.85rem; }
.hp2 .search-state-loading { display:inline-block; width:14px; height:14px; border:2px solid #E3DED4; border-top-color:var(--hp-orange); border-radius:50%; animation:hpspin .8s linear infinite; vertical-align:middle; margin-right:.4rem; }
.hp2 .search-result-footer { display:block; padding:.6rem .85rem; text-align:center; font-size:.78rem; font-weight:700; color:var(--hp-orange); text-transform:uppercase; letter-spacing:.4px; border-top:1px solid #EFEBE2; background:#FAF7F1; text-decoration:none; }
.hp2 .search-result-footer:hover { background:rgba(232,64,28,.1); }
@keyframes hpspin { to { transform:rotate(360deg); } }
@media (max-width:820px){
  .hp2 .hero { min-height:auto; padding:60px 0; }
  .hp2 .searchbar { flex-direction:column; gap:6px; }
  .hp2 .sb-field { border-right:0; border-bottom:1px solid #E3DED4; }
  .hp2 .sb-field:last-of-type { border-bottom:0; }
  .hp2 .sb-go { padding:14px; justify-content:center; }
  .hp2 .hero-stats { grid-template-columns:repeat(2,1fr); }
  .hp2 .hstat:nth-child(2n) { border-right:0; }
  .hp2 .hstat:nth-child(1), .hp2 .hstat:nth-child(2) { border-bottom:1px solid rgba(255,255,255,.1); }
  .hp2 .hstat { padding:16px 8px; }
  .hp2 .hstat .num { font-size:30px; }
}
/* ---- SEZIONE EVENTI A TAB (Discovery) ---- */
.hp2 .sec-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:30px; flex-wrap:wrap; }
.hp2 .sec-head .k { font-size:12.5px; font-weight:800; letter-spacing:1.6px; text-transform:uppercase; color:var(--hp-orange); }
.hp2 .sec-head h2 { font-weight:900; font-size:clamp(26px,3.6vw,40px); letter-spacing:-.5px; margin-top:6px; line-height:1.02; color:var(--hp-text); }
.hp2 .sec-head p { color:var(--hp-muted); font-size:15px; margin-top:8px; }
.hp2 .seeall { color:var(--hp-text); font-weight:700; font-size:14px; display:inline-flex; align-items:center; gap:6px; border-bottom:2px solid var(--hp-orange); padding-bottom:3px; white-space:nowrap; }
.hp2 .seeall:hover { color:var(--hp-orange); }
.hp2 .tabs { display:flex; gap:8px; background:var(--hp-tab-bg); padding:6px; border-radius:13px; margin-bottom:30px; flex-wrap:wrap; width:fit-content; max-width:100%; }
.hp2 .tab { font-family:'Archivo',sans-serif; font-weight:700; font-size:14.5px; color:var(--hp-muted); padding:10px 20px; border-radius:9px; border:0; background:transparent; cursor:pointer; transition:.18s; }
.hp2 .tab:hover { color:var(--hp-text); }
.hp2 .tab.active { background:var(--hp-surface); color:var(--hp-text); box-shadow:0 2px 8px rgba(0,0,0,.06); }
.hp2 .tab .cnt { color:var(--hp-orange); font-weight:800; }
.hp2 .panel { display:none; }
.hp2 .panel.show { display:block; animation:hpfade .35s ease; }
@keyframes hpfade { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
.hp2 .hp2-empty { padding:40px; text-align:center; color:var(--hp-muted); background:var(--hp-surface); border:1px solid var(--hp-line); border-radius:var(--hp-radius); }
@media (max-width:560px){
  .hp2 .tabs { width:100%; overflow-x:auto; flex-wrap:nowrap; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
  .hp2 .tabs::-webkit-scrollbar { display:none; }
  .hp2 .tab { flex:none; white-space:nowrap; }
}
/* ---- MAPPA + REGIONI ---- */
.hp2 .map-grid { display:grid; grid-template-columns:1.4fr 1fr; gap:30px; align-items:stretch; }
.hp2 .map-box { position:relative; border-radius:18px; overflow:hidden; min-height:460px; border:1px solid var(--hp-line); background:var(--hp-surface); }
.hp2 .map-box #home-map { position:absolute; inset:0; width:auto; height:auto; min-height:0; max-height:none; border:none; border-radius:0; background:transparent; }
.hp2 .region-panel h3 { font-size:22px; margin-bottom:6px; color:var(--hp-text); }
.hp2 .region-panel .sub { color:var(--hp-muted); font-size:14px; margin-bottom:20px; }
.hp2 .region-list { display:flex; flex-direction:column; gap:2px; }
.hp2 .region-row { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-radius:10px; transition:.16s; }
.hp2 .region-row:hover { background:rgba(232,64,28,.08); }
.hp2 .region-row .nm { font-weight:600; font-size:15px; color:var(--hp-text); }
.hp2 .region-row .bar { flex:1; height:5px; background:var(--hp-line); border-radius:3px; margin:0 16px; overflow:hidden; }
.hp2 .region-row .bar i { display:block; height:100%; background:var(--hp-orange); border-radius:3px; }
.hp2 .region-row .v { font-family:'Archivo',sans-serif; font-weight:800; font-size:14px; color:var(--hp-text); min-width:24px; text-align:right; }
.hp2 .region-row--all .nm { color:var(--hp-orange); font-weight:700; }
@media (max-width:900px){
  .hp2 .map-grid { grid-template-columns:1fr; }
  .hp2 .map-box { min-height:340px; }
}
/* ---- CATEGORIE ---- */
.hp2 .cats { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:16px; }
.hp2 .cat { background:var(--hp-surface); border:1px solid var(--hp-line); border-radius:var(--hp-radius); padding:24px 16px; text-align:center; transition:.2s; }
.hp2 .cat:hover { border-color:var(--hp-orange); transform:translateY(-3px); box-shadow:var(--hp-shadow-card); }
.hp2 .cat .ic { font-size:34px; margin-bottom:12px; line-height:1; }
.hp2 .cat .nm { font-family:'Archivo',sans-serif; font-weight:700; font-size:14.5px; color:var(--hp-text); }
.hp2 .cat .qty { font-size:12.5px; color:var(--hp-muted); margin-top:3px; }

/* ---- VALUE PROP ---- */
.hp2 .sec-head--center { display:block; text-align:center; }
.hp2 .sec-head--center .k { color:var(--hp-orange); }
.hp2 .sec-head--center h2 { color:var(--hp-text); font-weight:900; font-size:clamp(26px,3.6vw,40px); letter-spacing:-.5px; margin-top:6px; }
.hp2 .vp-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.hp2 .vp { border-radius:20px; padding:38px 34px; position:relative; overflow:hidden; }
.hp2 .vp.fans { background:var(--hp-surface); border:1px solid var(--hp-line); }
.hp2 .vp.org { background:var(--hp-ink); color:#fff; }
.hp2 .vp .tag { font-size:12.5px; font-weight:800; letter-spacing:1.2px; text-transform:uppercase; color:var(--hp-orange); }
.hp2 .vp h3 { font-size:26px; margin:8px 0 24px; line-height:1.05; color:var(--hp-text); }
.hp2 .vp.org h3 { color:#fff; }
.hp2 .feat { display:flex; gap:14px; padding:13px 0; border-top:1px solid var(--hp-line); }
.hp2 .vp.org .feat { border-color:rgba(255,255,255,.12); }
.hp2 .feat .fi { flex:none; width:38px; height:38px; border-radius:10px; background:rgba(232,64,28,.12); color:var(--hp-orange); display:grid; place-items:center; font-size:18px; }
.hp2 .vp.org .feat .fi { background:rgba(232,64,28,.2); }
.hp2 .feat .ft b { display:block; font-family:'Archivo',sans-serif; font-size:15px; font-weight:700; color:var(--hp-text); }
.hp2 .vp.org .feat .ft b { color:#fff; }
.hp2 .feat .ft small { color:var(--hp-muted); font-size:13px; }
.hp2 .vp.org .feat .ft small { color:#9A968E; }
.hp2 .btn-vp { margin-top:26px; width:100%; justify-content:center; padding:14px; display:inline-flex; align-items:center; gap:8px; font-weight:800; border-radius:10px; background:var(--hp-orange); color:#fff; font-family:'Archivo',sans-serif; transition:.18s; }
.hp2 .btn-vp:hover { background:var(--hp-orange-bright); }
.hp2 .btn-vp--inline { width:auto; padding:16px 36px; font-size:16px; }

/* ---- COMMUNITY ---- */
.hp2 .comm-grid { display:grid; grid-template-columns:1.1fr 1fr; gap:24px; }
.hp2 .panel-box { background:var(--hp-surface); border:1px solid var(--hp-line); border-radius:18px; padding:26px; }
.hp2 .panel-box h3 { font-family:'Archivo',sans-serif; font-size:18px; display:flex; align-items:center; gap:9px; margin-bottom:18px; color:var(--hp-text); }
.hp2 .contrib { display:flex; align-items:center; gap:14px; padding:12px 0; border-top:1px solid var(--hp-line); }
.hp2 .contrib:first-of-type { border-top:0; }
.hp2 .contrib:hover .ci b { color:var(--hp-orange); }
.hp2 .av { width:42px; height:42px; border-radius:11px; background:var(--hp-ink); color:#fff; display:grid; place-items:center; font-family:'Archivo',sans-serif; font-weight:800; font-size:15px; flex:none; }
.hp2 .av.gold { background:var(--hp-gold); }
.hp2 .contrib .ci { flex:1; min-width:0; }
.hp2 .contrib .ci b { font-family:'Archivo',sans-serif; font-size:15px; color:var(--hp-text); transition:.16s; }
.hp2 .contrib .ci small { display:block; color:var(--hp-muted); font-size:12.5px; }
.hp2 .ranked { font-family:'Archivo Expanded',sans-serif; font-weight:900; color:var(--hp-muted-2); font-size:18px; min-width:24px; }
.hp2 .badge-plus { font-family:'Archivo',sans-serif; font-weight:800; font-size:13px; padding:4px 10px; border-radius:8px; color:var(--hp-green); background:rgba(31,138,76,.12); flex:none; }
.hp2 .ticker { max-height:330px; overflow:hidden; position:relative; }
.hp2 .ticker::after { content:""; position:absolute; left:0; right:0; bottom:0; height:60px; background:linear-gradient(transparent,var(--hp-surface)); pointer-events:none; }
.hp2 .act { display:flex; gap:12px; padding:11px 0; border-top:1px solid var(--hp-line); font-size:13.5px; align-items:flex-start; }
.hp2 .act:first-child { border-top:0; }
.hp2 .act .t { font-family:'Archivo',sans-serif; font-weight:700; font-size:11px; color:var(--hp-muted-2); min-width:46px; padding-top:2px; }
.hp2 .act .x { color:var(--hp-text); }
.hp2 .act .x a { color:var(--hp-orange); font-weight:600; }

/* ---- FINAL CTA ---- */
.hp2 .hp2-final { background:var(--hp-ink); color:#fff; text-align:center; position:relative; overflow:hidden; }
.hp2 .final-bg { position:absolute; inset:0; background:radial-gradient(70% 120% at 50% 0%, rgba(232,64,28,.35), transparent 60%); }
.hp2 .hp2-final .wrap { position:relative; z-index:2; }
.hp2 .hp2-final h2 { font-size:clamp(30px,5vw,52px); line-height:1; margin-bottom:16px; color:#fff; }
.hp2 .hp2-final p { color:#C9C7C2; font-size:17px; max-width:46ch; margin:0 auto 28px; }

@media (max-width:900px){
  .hp2 .vp-grid { grid-template-columns:1fr; }
  .hp2 .comm-grid { grid-template-columns:1fr; }
}
@media (max-width:560px){
  .hp2 .cats { grid-template-columns:repeat(2,1fr); }
  .hp2 .vp { padding:28px 22px; }
}
@media (prefers-reduced-motion: reduce){
  .hp2 .panel.show { animation:none; }
  .hp2 .cat:hover, .hp2 .vp .btn-vp:hover { transform:none; }
}

/* ---- icone SVG (sostituiscono le emoji) ---- */
.hp2 .ico-arr { width:15px; height:15px; flex:none; vertical-align:-3px; }
.hp2 .seeall .ico-arr { margin-left:4px; }
.hp2 .btn-vp .ico-arr { margin-left:3px; vertical-align:-2px; }
.hp2 .region-row--all .nm .ico-arr { width:13px; height:13px; margin-left:3px; vertical-align:-1px; }
.hp2 .chip svg { width:14px; height:14px; vertical-align:-2px; margin-right:4px; }
.hp2 .chip.hot svg { color:var(--hp-orange-bright); }
.hp2 .cat .ic { color:var(--hp-orange); line-height:0; }
.hp2 .cat .ic svg { width:32px; height:32px; }
.hp2 .feat .fi svg { width:19px; height:19px; }
.hp2 .panel-box h3 svg { width:19px; height:19px; flex:none; color:var(--hp-orange); }
.hp2 .search-result-thumb-empty svg { width:20px; height:20px; color:rgba(255,255,255,.85); }
.hp2 .search-result-footer .ico-arr { width:13px; height:13px; }
/* ===================  END HOME2 REDESIGN  =================== */

