/*
 Theme Name: Un giorno da campioni
 Theme URI: https://ungiornodacampioni.it
 Author: Erre Elle Net
 Author URI: https://www.erre-elle.net
 Description: Tema per evento un giorno da campioni.
 Version: 1.0.0
 Requires at least: 6.1
 Tested up to: 6.6
 Requires PHP: 7.4
 License: GPL-2.0-or-later
 License URI: https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: ugi-event-theme
*/

/* ========================================
   CSS Variables & Design Tokens
   ======================================== */

.logged-in, .logged-in header { margin-top: 32px; }

:root {
  /* Color Palette */
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #51607a;
  --brand: #3b82f6;
  --accent: #1d4ed8;
  --surface: #f4f8ff;
  --border: #dbeafe;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Spacing - 8px System */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 2.5rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --space-12: 6rem;

  /* Typography */
  --font-sans: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --line-height-body: 1.5;
  --line-height-heading: 1.2;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Accent blobs background (rainbow identity) */
  --accent-blobs: radial-gradient(circle at 12% 22%, rgba(255, 99, 132, 0.1) 0 18%, transparent 24%), radial-gradient(circle at 78% 28%, rgba(54, 162, 235, 0.1) 0 16%, transparent 22%), radial-gradient(circle at 30% 78%, rgba(75, 192, 192, 0.1) 0 14%, transparent 20%), radial-gradient(circle at 70% 70%, rgba(255, 205, 86, 0.1) 0 14%, transparent 20%);

  /* Header Height */
  --header-height: 100px;
}

/* ========================================
   CSS Reset & Base Styles
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: var(--line-height-body);
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

/* ========================================
   Typography
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: var(--line-height-heading);
  font-weight: 700;
  color: var(--text);
}

h1 {
  font-size: clamp(2.5rem, 2rem + 2vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 1.75rem + 1.25vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
}

/* ========================================
   Accessibility
   ======================================== */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--brand);
  color: white;
  padding: var(--space-2);
  z-index: 10000;
  text-decoration: none;
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ========================================
   Layout Utilities
   ======================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--space-3);
  padding-right: var(--space-3);
}

.section {
  padding-top: clamp(3rem, 5vw, 6rem);
  padding-bottom: clamp(3rem, 5vw, 6rem);
}

.section__title {
  margin-bottom: var(--space-4);
  color: var(--text);
}

.section__title--center {
  text-align: center;
}

/* ========================================
   Header
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #ffffff;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-3);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand);
  transition: opacity var(--transition-fast);
  height: calc(var(--header-height) - 1rem);
}

.header__logo img {
  height: 100%;
}

.header__logo:hover {
  opacity: 0.8;
}

.header__logo:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.header__menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
  color: var(--text);
}

.header__menu-toggle:hover {
  background: var(--surface);
}

.header__menu-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.hamburger {
  position: relative;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: all var(--transition-base);
  display: block;
  border-radius: 1px;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: all var(--transition-base);
  left: 0;
  border-radius: 1px;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

.nav-list {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.nav-cta {
 flex: 1;
}

.nav-link {
  padding: var(--space-1) var(--space-2);
  font-weight: 500;
  color: var(--text);
  transition: color var(--transition-fast);
  border-radius: var(--radius-sm);
}

.nav-link:hover {
  color: var(--brand);
}

.nav-link.active {
  color: var(--brand);
  background: var(--surface);
}

.nav-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .header__menu-toggle {
    display: flex;
  }

  .header__nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
  }

  .header__nav.open {
    max-height: 400px;
    box-shadow: var(--shadow-lg);
  }

  .nav-list {
    flex-direction: column;
    padding: var(--space-3);
    gap: var(--space-1);
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: var(--space-2);
    text-align: center;
  }
}

/* ========================================
   Hero Section
   ======================================== */
#main-content {
  margin-top: var(--header-height);
}

.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* neutral gray background with subtle accents */
  background: linear-gradient(135deg, #f3f4f6 0%, #eceff4 100%);
  color: var(--text);
  text-align: left;
  padding: var(--space-8) var(--space-3);
}

@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
  }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  display: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

/* rainbow accent blobs */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: var(--accent-blobs);
}

/* Hero grid with right scroller */
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: center;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero__text {
  max-width: 700px;
}

.hero__scroller {
  height: 420px;
  overflow: hidden;
  position: relative;
}
.hero__scroller-track {
  display: flex;
  gap: var(--space-3);
  will-change: transform;
}
.hero__scroller-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-width: 560px;
}
.hero__scroller-item img {
  width: 560px;
  height: 420px;
  object-fit: cover;
  display: block;
}

/* edge fades so the scroller doesn't feel like it floats */
.hero__scroller::before,
.hero__scroller::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  pointer-events: none;
  z-index: 2;
}

.hero__scroller::before {
  left: 0;
  background: linear-gradient(to right, #f3f4f6, rgba(243, 244, 246, 0));
}

.hero__scroller::after {
  right: 0;
  background: linear-gradient(to left, #f3f4f6, rgba(243, 244, 246, 0));
}

.hero__title {
  margin-bottom: var(--space-3);
  color: var(--text);
  text-shadow: none;
  font-family: var(--font-sans);
}

.hero__dates {
  color: #374151;
  font-size: 0.9rem;
  margin-bottom: var(--space-2);
  font-weight: 600;
}

.hero__places {
  color: #1f2937;
  font-size: 1rem;
  margin-bottom: var(--space-3);
}

.hero__subtitle {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);
  line-height: 1.5;
  margin-bottom: var(--space-5);
  color: #374151;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero__cta {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: clamp(0.75rem, 0.7rem + 0.25vw, 1rem) clamp(1.5rem, 1.25rem + 1vw, 2rem);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  text-decoration: none;
  border: 2px solid transparent;
}

.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}

.btn--primary {
  background: var(--accent);
  color: white;
}

.btn--primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--secondary {
  background: white;
  color: var(--brand);
  border-color: white;
}

.btn--secondary:hover {
  background: transparent;
  color: white;
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}

.btn--outline:hover {
  background: var(--brand);
  color: white;
}

.btn--small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn--full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn__icon {
  width: 20px;
  height: 20px;
}

/* ========================================
   About Section
   ======================================== */
.about {
  background: var(--surface);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: center;
}

@media (min-width: 768px) {
  .about__grid {
    grid-template-columns: 2fr 1fr;
  }
}

.about__text {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--muted);
  margin-top: var(--space-3);
}

.ugi-box {
  background: white;
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.ugi-box__logo {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-3);
  color: var(--brand);
}

.ugi-box__brand-logo {
  width: 120px;
  height: auto;
  margin: 0 auto var(--space-2);
  display: block;
}

.ugi-box__title {
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
  color: var(--brand);
}

.ugi-box__text {
  color: var(--muted);
  margin-bottom: var(--space-3);
  font-size: 0.9rem;
}

.ugi-box__link {
  display: inline-block;
  color: var(--brand);
  font-weight: 600;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
}

.ugi-box__link:hover {
  background: var(--surface);
}

.ugi-box__link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ========================================
   Programma Section
   ======================================== */
.programma__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

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

.event-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--brand);
}

/* featured variant removed (cards now identical) */

.event-card__header {
  background: var(--surface);
  padding: var(--space-3);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.event-card__day {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: var(--space-1);
}

.event-card__date {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.event-card__body {
  padding: var(--space-4);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.event-card__location {
  font-size: 1.75rem;
  margin-bottom: var(--space-3);
  color: var(--brand);
}

.event-card__time,
.event-card__place {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--muted);
  margin-bottom: var(--space-2);
  font-size: 1rem;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.programma__highlight {
  background: linear-gradient(135deg, var(--brand) 0%, #2563eb 100%);
  color: white;
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  text-align: center;
}

.highlight-text {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.6;
}

/* Map link style inside cards */
.event-card__map {
  display: inline-block;
  margin-top: var(--space-2);
  color: var(--brand);
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
}

.event-card__map:hover {
  background: var(--surface);
}

/* ========================================
   Donazioni Section
   ======================================== */
.donazioni {
  background: var(--surface);
}

.donazioni__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .donazioni__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.fondi-counter {
  background: white;
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.fondi-counter__title {
  font-size: 1.25rem;
  margin-bottom: var(--space-3);
  color: var(--muted);
}

.fondi-counter__amount {
  font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-4);
  transition: transform var(--transition-fast);
}

.fondi-counter__amount.animating {
  transform: scale(1.05);
}

.fondi-counter__progress {
  margin-bottom: var(--space-4);
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: var(--surface);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: var(--space-2);
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
  border-radius: 999px;
  transition: width 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.fondi-counter__goal {
  font-size: 0.875rem;
  color: var(--muted);
}

.donazione-form {
  background: white;
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);

  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.donazione-form__title {
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
  text-align: center;
}

.amount-selector__label {
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--text);
}

.amount-selector__buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

@media (max-width: 480px) {
  .amount-selector__buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

.amount-btn {
  padding: var(--space-3);
  font-weight: 600;
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.amount-btn:hover {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.amount-btn.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.amount-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.amount-selector__custom {
  margin-top: var(--space-3);
}

.amount-input {
  width: 100%;
  padding: var(--space-3);
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.amount-input:focus {
  outline: none;
  border-color: var(--brand);
}

.error-message {
  display: block;
  margin-top: var(--space-1);
  font-size: 0.875rem;
  color: #dc2626;
}

.donazione-form__note {
  margin-top: var(--space-4);
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.link {
  color: var(--brand);
  text-decoration: underline;
}

.link:hover {
  color: #1e40af;
}

/* ========================================
   Galleria Section
   ======================================== */
/* gallery toggle removed */

/* carousel removed */

.galleria__masonry {
  column-count: 1;
  column-gap: var(--space-3);
}

@media (min-width: 640px) {
  .galleria__masonry {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .galleria__masonry {
    column-count: 3;
  }
}

.masonry__item {
  break-inside: avoid;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.masonry__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.masonry__item img {
  width: 100%;
  height: auto;
  display: block;
}

/* masonry captions removed */

/* ========================================
   FAQ Section
   ======================================== */
.faq {
  background: var(--surface);
}

.faq__list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base);
}

.faq-item[open] {
  box-shadow: var(--shadow-md);
}

.faq-item__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.faq-item__question::-webkit-details-marker {
  display: none;
}

.faq-item__question:hover {
  color: var(--brand);
}

.faq-item__question:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.faq-item__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.faq-item[open] .faq-item__icon {
  transform: rotate(180deg);
}

.faq-item__answer {
  padding: 0 var(--space-4) var(--space-4);
  color: var(--muted);
  line-height: 1.75;
}

/* ========================================
   Contatti Section
   ======================================== */
.contatti__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .contatti__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contatti__info {
  background: white;
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.contatti__subtitle {
  font-size: 1.25rem;
  margin-bottom: var(--space-4);
  color: var(--brand);
}

.contatti__name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text);
}

.contatti__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  color: var(--muted);
}

.contatti__item a {
  color: var(--brand);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.contatti__item a:hover {
  color: #1e40af;
  text-decoration: underline;
}

.contatti__item a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.contatti__map {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.map-placeholder {
  height: 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  padding: var(--space-5);
  text-align: center;
}

.map-placeholder__icon {
  width: 64px;
  height: 64px;
  color: var(--brand);
  margin-bottom: var(--space-3);
}

.map-placeholder p {
  color: var(--muted);
  line-height: 1.75;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-8) 0 var(--space-4);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

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

@media (min-width: 1024px) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer__title {
  color: white;
  font-size: 1.25rem;
  margin-bottom: var(--space-3);
}

.footer__text {
  line-height: 1.75;
  margin-bottom: var(--space-3);
}

.footer__link {
  color: var(--accent);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: white;
}

.footer__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__list a {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition-fast);
}

.footer__list a:hover {
  color: white;
}

.footer__list a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.footer__social-links {
  display: flex;
  gap: var(--space-3);
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: white;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.social-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.footer__bottom {
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer__credits,
.footer__disclaimer {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-2);
}

/* ========================================
   Modal
   ======================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
}

.modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 200ms ease;
}

.modal__content {
  position: relative;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 300ms ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  transition: all var(--transition-fast);
}

.modal__close:hover {
  background: var(--border);
}

.modal__close:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.modal__close svg {
  width: 20px;
  height: 20px;
}

.modal__title {
  padding: var(--space-5) var(--space-5) var(--space-3);
  font-size: 1.75rem;
  color: var(--text);
}

.modal__body {
  padding: 0 var(--space-5) var(--space-4);
}

.modal__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 50%;
  color: var(--brand);
}

.modal__icon svg {
  width: 40px;
  height: 40px;
}

.modal__text {
  text-align: center;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: var(--space-4);
}

.modal__amount {
  text-align: center;
  padding: var(--space-4);
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.modal__amount p:first-child {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: var(--space-1);
}

.modal__amount-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.modal__footer {
  padding: var(--space-4) var(--space-5) var(--space-5);
  display: flex;
  gap: var(--space-3);
}

.modal__footer .btn {
  flex: 1;
}

/* ========================================
   Toast
   ======================================== */
.toast {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  background: var(--accent);
  color: white;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  z-index: 10000;
  animation: slideIn 300ms ease;
  max-width: 400px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.toast__message {
  font-weight: 500;
}


/* ========================================
   Donazioni page
   ======================================== */

#donation-page, #donation-page > section { height: 100vh; }

#donation-page > section > div { 
  height: 100%;
  display: flex;
  flex-direction: column;
} 

#donation-page .donation-box {
  width: 100%;
}



/* Contenitore a schermo intero con background cover */
.raccolto{
  position: relative;
  min-height: 100svh;              /* usa la “small viewport height” per i mobile browser */
  display: grid;
  place-items: center;              /* centra i contenuti */
  padding: 6rem 1.25rem;            /* respiro ai bordi */
  color: #fff;                      /* testo chiaro sopra overlay */
  isolation: isolate;               /* assicura che l’overlay non influenzi i figli con z-index */
  background-image: var(--bg-url);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Overlay scuro per leggibilità (modifica l'opacità a piacere) */
.raccolto::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(101 101 103 / 35%);     /* opacità: più alto = più leggibile */
  z-index: -1;                      /* sotto al contenuto ma sopra al bg */
  backdrop-filter: none;            /* puoi usare: blur(2px) se vuoi ammorbidire l'immagine */
}

/* Alternativa: overlay a gradiente (sostituisci il blocco sopra con questo)
.hero-cover::before{
  content:""; position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.55) 100%);
  z-index:-1;
}
*/

/* Contenuto */
.raccolto > div {
  width: min(960px, 92%);
  text-align: center;
}