/* --------------------------------------------------
   VARIABILI GLOBALI
-------------------------------------------------- */
:root {
  --bg: #0d0d0d;
  --card-bg: #1a1a1a    ;
  --border: #CCC;;
  --text: #e8e8e8;
  --accent: #7da0c4;
  --radius: 10px;
  --shadow: 0 4px 10px rgba(0,0,0,0.06);
  --font-title: "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", Arial, sans-serif;
}

/* --------------------------------------------------
   BASE
-------------------------------------------------- */
body {
  margin: 1rem auto;
  max-width: 1100px;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}


/* Overlay verticale per migliorare la leggibilità dell'header */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 40vh; /* quanto vuoi che scenda il gradiente */
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.90) 0%,
    rgba(0,0,0,0.55) 40%,
    rgba(0,0,0,0.25) 70%,
    rgba(0,0,0,0) 100%
  );
  pointer-events: none;
  z-index: -1;
}


header.calendario-titolo {
    text-align: center;
    margin: 2rem 0 1rem 0;
}

header.calendario-titolo h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #bbc8d6;
    letter-spacing: 1.2px; /* tracking aumentato */
}


header.calendario-titolo h2 {
    font-size: 1rem;
    font-weight: 300;
    color: #bbb;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

header.calendario-titolo p {
       color: #bbc8d6;
    font-style: italic;
        margin: 0;
}




/* --------------------------------------------------
   CONTROLLI
-------------------------------------------------- */
#controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

select {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  font-size: 1rem;
  background: #222;
  color: #eee;
  border: 1px solid #000;
}


button {
  padding: 0.55rem 1.2rem;
  border: 1px solid #000;
  border-radius: var(--radius);
  background: rgb(38, 45, 61);;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s ease;
}

button:hover {
  background: #004a9c;
}

/* --------------------------------------------------
   LAYOUT DELLE CARTE
-------------------------------------------------- */
.top-row,
.bottom-row {
  display: grid;
  gap: 1.5rem;
}

.top-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem; /* spazio tra le due righe */
}


.bottom-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}


/* --------------------------------------------------
   CARTE
-------------------------------------------------- */
.card {
  background: rgba(0,0,0,0.80);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.card h2 {
  margin: 0 0 0.8rem 0;
  font-family: var(--font-title);
  font-size: 1.3rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 1.1rem;
}

.card h3 {}
.card h3 span { float: right}

.card .content p {
  margin: 0.4rem 0;
}



.card a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.card a:hover {
  text-decoration: underline;
}



/* --------------------------------------------------
   FIRMA
-------------------------------------------------- */



.footer-fixed {
text-align: center;
  font-size: 0.7rem;
  color: #e6e6e6;
  background: #000000a1; /* scuro ma non pesante */
  padding: 0.1rem 0.2rem;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.08); /* micro-bordo elegante */
  backdrop-filter: blur(4px); /* effetto premium */
  opacity: 0.7;
  transition: opacity 0.25s ease, background 0.25s ease;
  z-index: 9999;
  margin-top:10px
}

.footer-fixed:hover {
  opacity: 1;
  background: rgba(0,0,0,0.6);
}

.footer-fixed a {
  color: #e6e6e6;
  text-decoration: none;
  letter-spacing: 0.3px;
}

.footer-fixed a:hover {
  text-decoration: underline;
}




/* --------------------------------------------------
   RESPONSIVE
-------------------------------------------------- */

/* Tablet / small desktop */
@media (max-width: 900px) {
  body {
    margin: 0.5rem auto;
    padding: 0 0.5rem;
  }

  header.calendario-titolo h1 {
    font-size: 1.7rem;
  }

  header.calendario-titolo h2 {
    font-size: 0.9rem;
    letter-spacing: 1.5px;
  }

  .top-row {
    grid-template-columns: 1fr 1fr;
  }

  .bottom-row {
    grid-template-columns: 1fr 1fr;
  }

  .bottom-row .card:last-child {
    grid-column: 1 / -1; /* l’ultima carta prende tutta la riga */
  }
}

/* Smartphone */
@media (max-width: 600px) {
  body {
    margin: 30px;
    padding: 0.5rem;
  }

  header.calendario-titolo {
    margin: 1.2rem 0 0.8rem 0;
  }

  header.calendario-titolo h1 {
    font-size: 1.4rem;
  }

  header.calendario-titolo h2 {
    font-size: 0.8rem;
    letter-spacing: 1.2px;
  }

  header.calendario-titolo p {
	  visibility:hidden;
	  height:20px;
 }


  #controls {
    flex-direction: row;      /* sempre affiancati */
    align-items: center;
    gap: 0.6rem;
  }

  #controls select {
    flex: 1;                  /* select si allarga */
  }

  #controls button {
    flex-shrink: 0;           /* il bottone non si schiaccia */
    padding: 0.7rem 1rem;
  }


  .top-row,
  .bottom-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .card {
    padding: 1rem 1.1rem;
    min-height: auto;
  }

  .card h2 {
    font-size: 1rem;
  }

  .card .content p {
    font-size: 0.9rem;
  }



    
  
}
