/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background 0.5s ease, color 0.5s ease;
  line-height: 1.6;
}
img {
  max-width: 100%;
  display: block;
}

/* VARIABILI E THEME */
/* Tema scuro di default */
:root {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --accent-color: #bb86fc;
  --card-bg: #1e1e1e;
  --card-border: #333;
  --overlay-color: rgba(0, 0, 0, 0.5);
}
/* Tema light */
[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #121212;
  --accent-color: #6200ee;
  --card-bg: #f7f7f7;
  --card-border: #ccc;
  --overlay-color: rgba(255, 255, 255, 0.8);
}

/* Pulsante per il toggle del tema */
#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--accent-color);
  color: var(--bg-color);
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.5s ease, color 0.5s ease;
  z-index: 1000;
}

/* SEZIONE HERO */
.hero {
  position: relative;
  height: 400px;
  overflow: hidden;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-color);
  transition: background 0.5s ease;
}
.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-color);
  padding: 0 15px;
  transition: color 0.5s ease;
}
.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}
.hero-text p {
  font-size: 1.5rem;
}

/* SEZIONI GENERALI */
.section {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  transition: background 0.5s ease, color 0.5s ease;
}
.section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}
.section p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

/* CARDS DEI PERCORSI */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  flex: 1 1 300px;
  max-width: 32%;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-5px);
}
.card-img {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card-content {
  padding: 15px;
  text-align: left;
}
.card-content h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}
.card-content p {
  font-size: 1rem;
}

/* SEZIONE MAPPA E QR CODE */
.qr-container {
  text-align: center;
  background-color: var(--bg-color);
  padding: 20px;
  border: 2px solid var(--text-color);
  border-radius: 8px;
  margin: 0 auto;
  max-width: 250px;
}
.qr-code {
  width: 200px;
  height: auto;
  margin: 0 auto;
}
.qr-container p {
  font-size: 1.1rem;
  margin-top: 10px;
}

/* SEZIONE "NOVITÀ ED EVENTI" */
.news-events {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.news-events h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}
.news-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 20px;
}
.news-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  flex: 1 1 300px;
  max-width: 45%;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.news-card:hover {
  transform: translateY(-5px);
}
.news-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.news-content {
  padding: 15px;
  text-align: left;
}
.news-content h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}
.news-content p {
  font-size: 1rem;
}

/* RESPONSIVITÀ */
@media (max-width: 768px) {
  .hero {
    height: 300px;
  }
  .hero-text h1 {
    font-size: 2.5rem;
  }
  .hero-text p {
    font-size: 1.2rem;
  }
  .cards {
    flex-direction: column;
    align-items: center;
  }
  .card {
    max-width: 90%;
  }
  .news-cards {
    flex-direction: column;
    align-items: center;
  }
  .news-card {
    max-width: 90%;
  }
}

/* Esempio in home.css */
.hero {
  position: relative;
  height: 600px; /* Altezza maggiore per desktop */
  overflow: hidden;
}
@media (max-width: 768px) {
  .hero {
    height: 400px; /* Altezza maggiore anche per mobile */
  }
}

/* Regole per i link */
a:link,
a:visited {
  text-decoration: none;
  color: var(--text-color);
}

a:hover,
a:focus {
  text-decoration: none;
  color: var(--accent-color);
}



