/* ============================================
   Da Santo a Santo — Restyling 2026
   ============================================ */

:root {
  /* Brand */
  --dsas-blu: #015ea7;
  --dsas-blu-soft: rgba(1, 94, 167, 0.08);
  --dsas-crema: #f0efea;
  --dsas-grigio-testo: #50504f;
  --dsas-grigio-light: #707070;

  /* Tappe */
  --tappa-1: #a285a2;
  --tappa-2: #8b6079;
  --tappa-3: #6c8eaf;
  --tappa-4: #676882;
  --tappa-5: #6d9e8f;
  --tappa-6: #a9b17a;

  /* Tipografia */
  --fs-hero: clamp(2rem, 5vw, 3.5rem);
  --fs-section: clamp(1.5rem, 3vw, 2rem);
  --fs-body: 18px;

  /* Spacing */
  --space-section: clamp(3rem, 8vw, 6rem);
  --container-max: 1100px;
}

/* ============================================
   Overrides al CSS legacy
   ============================================ */

html {
  scroll-behavior: smooth;
}

body {
  background: var(--dsas-crema);
  color: var(--dsas-grigio-testo);
  font-family: 'Onest', sans-serif;
  font-size: var(--fs-body);
  text-align: left;
}

/* Il wrapper #container del legacy deve diventare full-width fluido */
#container {
  max-width: none !important;
  width: 100%;
  display: block !important;
  background: transparent;
  margin: 0;
}

/* Spegne il vecchio layout a due colonne */
.col-left,
.col-right {
  float: none !important;
  width: 100% !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ============================================
   Sezioni
   ============================================ */

.dsas-section {
  padding-block: var(--space-section);
  padding-inline: 1.5rem;
}

.dsas-section--crema {
  background: var(--dsas-crema);
}

.dsas-section--white {
  background: #fff;
}

.dsas-container {
  max-width: var(--container-max);
  margin-inline: auto;
}

/* ============================================
   Typography helpers
   ============================================ */

.dsas-h1 {
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 1.1;
  color: var(--dsas-blu);
  margin: 0;
}

.dsas-h2 {
  font-size: var(--fs-section);
  font-weight: 700;
  line-height: 1.2;
  color: var(--dsas-blu);
  margin: 0 0 1.5rem 0;
}

.dsas-kicker {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dsas-blu);
  margin: 0 0 1rem 0;
}

sub, sup {
  font-size: 65%;
  vertical-align: top;
  line-height: 1;
  text-transform: lowercase;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  position: relative;
  text-align: center;
  overflow: hidden;
  padding-block: clamp(2rem, 5vw, 4rem);
}

/* Bande verticali colorate di sfondo (7 colori: 6 tappe + blu istituzionale) */
.hero__bands {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    90deg,
    var(--tappa-1) 0% calc(100% / 7),
    var(--tappa-2) calc(100% / 7) calc(200% / 7),
    var(--tappa-3) calc(200% / 7) calc(300% / 7),
    var(--tappa-4) calc(300% / 7) calc(400% / 7),
    var(--tappa-5) calc(400% / 7) calc(500% / 7),
    var(--tappa-6) calc(500% / 7) calc(600% / 7),
    var(--dsas-blu)  calc(600% / 7) 100%
  );
  opacity: 0.85;
}

.hero__lang {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  background: #fff;
  color: var(--dsas-blu);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease;
}

.hero__lang:hover {
  transform: translateY(-1px);
}

/* Card centrale leggibile sopra le bande */
.hero__inner {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 24px;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.hero__logo-link {
  display: block;
}

.hero__logo {
  width: 100%;
  max-width: 320px;
  height: auto;
}

.hero__claim {
  text-align: center;
  margin: 0;
}

.hero__hashtag {
  color: var(--dsas-blu);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  margin: 0;
}

.hero__facts {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 0.5rem;
  border-top: 2px dashed var(--dsas-blu-soft);
  padding-top: 1.5rem;
}

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

.hero__facts li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  color: var(--dsas-blu);
}

.hero__facts strong {
  font-family: Impact, 'Arial Narrow', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
}

.hero__facts span {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dsas-grigio-light);
}

/* ============================================
   Counter
   ============================================ */

.counter {
  text-align: center;
}

.counter__inner {
  display: flex;
  justify-content: center;
}

.counter__svg {
  width: 100%;
  max-width: 600px;
  height: auto;
}

/* ============================================
   Mappa percorso
   ============================================ */

.mappa {
  text-align: center;
}

.mappa__title {
  text-align: center;
}

.mappa__subtitle {
  text-align: center;
  color: var(--dsas-grigio-light);
  margin: -1rem 0 2rem 0;
}

.mappa__img {
  width: 100%;
  height: auto;
  max-width: 1100px;
  margin-inline: auto;
  display: block;
}

.mappa__img--desktop { display: none; }
.mappa__img--mobile  { display: block; max-width: 350px; }

@media (min-width: 768px) {
  .mappa__img--desktop { display: block; }
  .mappa__img--mobile  { display: none; }
}

/* ============================================
   Dona ora
   ============================================ */

.donate {
  text-align: center;
  scroll-margin-top: 80px; /* lascia spazio sopra quando si arriva da scroll/anchor */
}

.donate__inner {
  max-width: 720px;
}

.donate__title { text-align: center; }

.donate__lead {
  text-align: center;
  margin: -1rem 0 2rem 0;
  color: var(--dsas-grigio-testo);
}

.donate__card {
  background: #fff;
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.10);
  text-align: left;
}

.donate__form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.donate__rate {
  margin: 0;
  text-align: center;
}

.donate__rate-badge {
  display: inline-block;
  background: var(--dsas-blu);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 1.1875rem;
}

/* Preset rapidi */
.donate__presets {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.donate__presets-label {
  font-weight: 700;
  color: var(--dsas-blu);
  font-size: 1.25rem;
  text-align: center;
}

.donate__presets-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

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

.donate__preset {
  font-family: inherit;
  background: #fff;
  border: 2px solid var(--dsas-blu-soft);
  color: var(--dsas-blu);
  border-radius: 14px;
  padding: 0.9rem 0.5rem;
  font-weight: 800;
  font-size: 1.375rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.donate__preset small {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dsas-grigio-light);
  letter-spacing: 0.02em;
}

.donate__preset:hover {
  border-color: var(--dsas-blu);
  transform: translateY(-2px);
}

.donate__preset.is-active {
  background: var(--dsas-blu);
  border-color: var(--dsas-blu);
  color: #fff;
}

.donate__preset.is-active small {
  color: rgba(255, 255, 255, 0.85);
}

/* Riga km custom + totale */
.donate__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: end;
}

@media (min-width: 640px) {
  .donate__row {
    grid-template-columns: 1.2fr 1fr;
  }
}

.donate__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
}

.donate__field--full {
  text-align: center;
  align-items: center;
}

.donate__field--total {
  align-items: center;
  text-align: center;
}

.donate__label {
  font-weight: 700;
  color: var(--dsas-blu);
  font-size: 1.0625rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: auto;
}

.donate__input {
  font-family: inherit;
  font-size: 1.4375rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--dsas-blu-soft);
  border-radius: 12px;
  background: #fff;
  color: var(--dsas-grigio-testo);
  width: 100%;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.donate__input:focus {
  outline: none;
  border-color: var(--dsas-blu);
  box-shadow: 0 0 0 4px var(--dsas-blu-soft);
}

.donate__input--cf {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  max-width: 360px;
  text-align: center;
}

/* Input km custom: evidenziato e centrato */
#km {
  background: var(--dsas-blu-soft);
  text-align: center;
  font-weight: 800;
  color: var(--dsas-blu);
}

#km:focus {
  background: #fff;
}

.donate__total {
  font-family: Impact, 'Arial Narrow', sans-serif;
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  line-height: 1;
  color: var(--dsas-blu);
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  padding-top: 0.2rem;
}

.donate__total-currency {
  font-size: 0.6em;
  font-weight: 400;
}

.donate__hint {
  font-size: 1rem;
  color: var(--tappa-2);
  font-weight: 600;
  margin-top: 0.25rem;
}

/* PayPal: si attiva visivamente solo quando CF >10 */
.donate__paypal {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.donate__paypal.is-ready {
  opacity: 1;
  pointer-events: auto;
}

/* Conferma */
.donate__confirm {
  text-align: center;
  padding: 1rem 0.5rem;
}

.donate__confirm-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--tappa-5);
  color: #fff;
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.donate__confirm-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dsas-blu);
  margin: 0 0 0.5rem 0;
}

.donate__confirm p {
  margin: 0.3rem 0;
}

/* ============================================
   Info Fondazione
   ============================================ */

.info {
  text-align: center;
}

.info__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 720px;
}

.info__logo-link {
  display: block;
}

.info__logo {
  width: 100%;
  max-width: 280px;
  height: auto;
}

.info__text {
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--dsas-grigio-testo);
  margin: 0;
}

.info__cta {
  color: var(--dsas-blu);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.05rem;
}

.info__cta:hover {
  text-decoration: underline;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  text-align: center;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.site-footer__line {
  margin: 0;
  font-size: 0.95rem;
  color: var(--dsas-grigio-testo);
}

.site-footer__link {
  color: var(--dsas-blu);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.site-footer__link:hover {
  text-decoration: underline;
}

.site-footer__icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.site-footer__legal {
  font-size: 0.85rem;
  color: var(--dsas-grigio-light);
  margin: 0;
}

.site-footer__credit {
  font-size: 0.85rem;
  margin: 1rem 0 0 0;
}

.site-footer__credit a {
  color: #FF6C2F;
  text-decoration: none;
}

/* ============================================
   FAB — Dona ora (sempre visibile)
   ============================================ */

.dsas-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--dsas-blu);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(1, 94, 167, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: dsas-fab-pulse 2.4s ease-in-out infinite;
}

.dsas-fab:hover {
  color: #fff;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 18px 40px rgba(1, 94, 167, 0.5);
  animation-play-state: paused;
}

.dsas-fab__arrow {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
}

@keyframes dsas-fab-pulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(1, 94, 167, 0.35); }
  50%      { box-shadow: 0 12px 30px rgba(1, 94, 167, 0.35),
                         0 0 0 12px rgba(1, 94, 167, 0); }
  25%      { box-shadow: 0 12px 30px rgba(1, 94, 167, 0.35),
                         0 0 0 0 rgba(1, 94, 167, 0.4); }
}

/* Su mobile compatto: solo label + freccia, ma riduco padding */
@media (max-width: 480px) {
  .dsas-fab {
    bottom: 1rem;
    right: 1rem;
    padding: 0.75rem 1.1rem;
    font-size: 1.125rem;
  }
}

/* Nascondi il FAB quando la sezione dona e' visibile (gentile, no JS) */
.donate:target ~ .dsas-fab,
.donate:hover ~ .dsas-fab {
  /* fallback: pseudo-target non sempre affidabile; lo lasciamo visibile.
     Per nasconderlo davvero servirebbe IntersectionObserver in JS. */
}

