/* layout base */
body {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

h1 {
  text-align: center;
  color: #fff;
  margin: 0;
  padding: 1rem 0;
  background-color: #17446f;
}

/* STATISTICHE */
.stats {
  text-align: center;
  margin: 1rem 0;
  font-size: 1.1rem;
  color: #17446f;
  font-weight: 500;
}

/* FILTRI CATEGORIA */
.filters {
  text-align: center;
  margin: 1rem 0;
}
.filters button {
  margin: 0.25rem;
  height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid #ccc;
  background-color: white;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  line-height: 1.2;
}
.filters button img {
  width: auto;
  height: 1rem;
  vertical-align: middle;
}
.filters button.active-filter,
.filters button:hover {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

/* BARRA DI RICERCA */
.search-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.search-bar input {
  width: 90%;
  max-width: 600px;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

/* HOME + ISCRIVITI */
.home-subscribe {
  text-align: center;
  margin: 1rem 0;
}
.home-button,
.subscribe-button a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s, border 0.3s;
}
.home-button {
  background-color: #007bff;
  color: #fff;
  border: none;
}
.home-button:hover {
  background-color: #0056b3;
}
.subscribe-button a {
  background-color: #FF0000;
  color: #fff;
  border: 1px solid #FF0000;
}
.subscribe-button a:hover {
  background-color: #fff;
  color: #FF0000;
  border-color: #FF0000;
}

/* GRIGLIA PLAYLIST */
#playlistContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  padding: 0 2rem;
  flex: 1;
}

/* CARD DELLA PLAYLIST */
.playlist-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  width: 100%;
  max-width: 300px;
}
.playlist-card:hover {
  transform: translateY(-5px);
}
.playlist-card img {
  width: 100%;
  height: auto;
  display: block;
  loading: lazy;
}
.playlist-title {
  font-weight: 600;
  margin: 0.5rem 0;
  font-size: 1rem;
  color: #333;
}
.playlist-card .open-link {
  display: inline-block;
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
}
.playlist-card .open-link:hover {
  text-decoration: underline;
}

/* SEZIONE VIDEO */
#videoWrapper {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 2px solid #ddd;
  padding: 1.5rem;
  display: none;
}
#playlistTitle {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
#playlistTitle a.open-link {
  display: block;
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: #007bff;
  text-decoration: none;
}
#playlistTitle a.open-link:hover {
  text-decoration: underline;
}
.video-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.video-item {
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}
.video-item.visible {
  opacity: 1;
  transform: translateY(0);
}
.video-item img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.video-item span.video-number {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #444;
}

/* ELENCO COMPLETO DELLE PLAYLIST */
.full-list-button {
  text-align: center;
  margin: 1rem 0;
}
.full-list-button button {
  display: inline-flex !important;
  align-items: center;
  padding: 0.5rem 1rem !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  border: none !important;
  border-radius: 4px !important;
  background-color: #007bff !important;
  color: #fff !important;
  transition: background-color 0.3s, color 0.3s, border 0.3s;
}
.full-list-button button:hover {
  background-color: #fff !important;
  color: #007bff !important;
  border: 1px solid #007bff !important;
}

/* Pulsante Iscriviti in home-subscribe */
.home-subscribe .subscribe-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 6px;
  background-color: #FF0000;
  color: #fff;
  border: 1px solid #FF0000;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.home-subscribe .subscribe-button:hover {
  background-color: #fff;
  color: #FF0000;
  border-color: #FF0000;
}
.stats {
  text-align: center;
  margin: 1rem 0;
  font-size: 1.1rem;
  color: #fff;      /* testo bianco */
  font-weight: 500;
}
footer .subscribe-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.5rem;     /* più alto e più largo */
  font-size: 1rem;             /* dimensione testo standard */
  border-radius: 12px;         /* angoli più arrotondati */
  background-color: #FF0000;
  color: #fff;
  border: 2px solid #FF0000;   /* bordo spesso */
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

footer .subscribe-link:hover {
  background-color: #fff;
  color: #FF0000;
  border-color: #FF0000;
}
/* Pulsante Scrivimi su WhatsApp */
.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: transparent;
  color: #25D366;              /* verde WhatsApp */
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}

.whatsapp-link:hover {
  background-color: #25D366;   /* verde pieno */
  color: #fff;                 /* testo bianco */
}

