/* 🎨 Variabili colore */
:root {
  --rosso-roma: #8e0000;
  --giallo-roma: #f7c600;
  --blu-link: #0077cc;
  --grigio-chiaro: #f4f4f4;
  --grigio-hover: #e1e1e1;
  --amazon-orange: #FF9900;
}

/* 🔄 Reset base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* Aggiunti font di riserva per Mac/Android */
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #fdfdfd;
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

/* 📐 Layout principale */
#page {
  max-width: 1000px;
  margin: auto;
}

/* 🟥 Header */
#header h1 {
  text-align: center;
  font-size: 2.5em;
  margin-bottom: 20px;
  color: var(--rosso-roma);
}

/* 📎 Menu */
#menu ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  gap: 15px;
  margin-bottom: 30px;
  padding: 0;
}

#menu a {
  text-decoration: none;
  color: var(--blu-link);
  font-weight: bold;
  transition: 0.3s ease;
  padding: 5px;
}

#menu a:hover {
  text-decoration: underline;
  color: var(--rosso-roma);
}

/* 📄 Contenuto */
#content h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--rosso-roma);
}

.date {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 10px;
  font-style: italic;
}

/* --- STILE LISTA ARTICOLI (HOME PAGE) --- */
/* Aggiunto per distanziare gli articoli nella home */
.blog-post {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eee; /* Linea sottile tra gli articoli */
}

.blog-post:last-child {
  border-bottom: none;
}

.blog-post h3 {
  font-size: 1.5em;
  margin-bottom: 10px;
}

.blog-post h3 a {
  text-decoration: none;
  color: #333;
  transition: color 0.2s;
}

.blog-post h3 a:hover {
  color: var(--rosso-roma);
}

/* --- GESTIONE IMMAGINI (CRUCIALE) --- */
/* Assicura che le immagini non escano mai dal contenitore */
.blog-post img, 
.single-post img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 15px 0;
  display: block; /* Toglie lo spazietto fastidioso sotto le immagini */
}

/* Stile per la pagina dell'articolo singolo (se usata) */
.single-post {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
}

/* 🏷️ Tags */
.tags {
  margin: 15px 0;
}

.tag {
  display: inline-block;
  background-color: var(--giallo-roma);
  color: #000;
  padding: 4px 10px;
  margin: 0 5px 5px 0;
  border-radius: 4px;
  font-size: 0.85em;
  text-decoration: none;
  transition: background-color 0.2s;
  font-weight: 500;
}

.tag:hover {
  background-color: #ffe680;
}

/* 🎥 Video & TikTok */
.video-container {
  margin: 25px 0;
  display: flex;
  justify-content: center;
  width: 100%;
}

.video-container video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.tiktok-embed {
    margin: 20px auto !important;
}

/* 🔍 Filtri (Home Page) - MIGLIORATI */
.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.filter-buttons button {
  padding: 10px 20px;
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 25px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  color: #555;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-buttons button:hover {
  background-color: var(--rosso-roma);
  color: white;
  border-color: var(--rosso-roma);
  transform: translateY(-2px); /* Effetto sollevamento */
  box-shadow: 0 4px 8px rgba(142, 0, 0, 0.2);
}

/* 🛒 Box Amazon */
.amazon-box {
    margin: 30px 0;
    padding: 20px;
    background-color: #fff8e1;
    border: 1px solid #eee;
    border-radius: 8px;
    text-align: center;
}

.amazon-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 25px;
    background-color: var(--amazon-orange);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.amazon-btn:hover {
    background-color: #e68a00;
    color: white;
}

/* 📤 Share buttons */
.share-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.share-button {
  padding: 10px 15px;
  border-radius: 5px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.3s ease;
  border: none;
  display: inline-block;
}

.share-button:hover {
  opacity: 0.85;
}

.share-button.facebook { background-color: #4267B2; }
.share-button.whatsapp { background-color: #25D366; }
.share-button.instagram { background-color: #E1306C; }

/* ☕ Box Donazioni */
.donation-box {
    margin-top: 30px;
    text-align: center;
    padding: 20px;
    background-color: #f9faff; /* Leggermente azzurrino */
    border: 2px dashed #ccddee;
    border-radius: 12px;
}

.donate-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 25px;
    background-color: var(--blu-link);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 119, 204, 0.2);
    transition: transform 0.2s ease, background-color 0.3s, box-shadow 0.3s;
}

.donate-btn:hover {
    background-color: #005fa3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 119, 204, 0.3);
}

/* 📎 Footer */
#footer {
  text-align: center;
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid #ddd;
  font-size: 0.9em;
  color: #777;
}

#footer a {
    color: #555;
    text-decoration: underline;
}

/* 💬 Commenti */
.commentbox {
  margin-top: 40px;
  padding: 20px;
  background-color: #fafafa;
  border-top: 3px solid var(--rosso-roma);
  border-radius: 8px;
}

.commentbox .commentbox-header h3 {
  color: transparent;
  position: relative;
  height: 30px;
}

.commentbox .commentbox-header h3::before {
  content: "Lascia un commento";
  position: absolute;
  left: 0;
  top: 0;
  color: #333;
  font-size: 20px;
  font-weight: bold;
  visibility: visible;
}

/* 📱 Responsive */
@media (max-width: 768px) {
  #menu ul {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  #header h1 {
      font-size: 2em;
  }

  .share-button {
    width: 100%;
    text-align: center;
    margin-bottom: 5px;
  }
  
  #page {
      padding: 0 5px;
  }
  
  .filter-buttons button {
      width: 48%; /* Bottoni filtro su due colonne su mobile */
      margin-bottom: 5px;
  }
}

@media (max-width: 480px) {
  #header h1 {
    font-size: 1.8em;
  }
}
/* Stile specifico per la pagina Collabora */
.service-list {
  list-style: none; /* Toglie i pallini standard */
  padding: 0;
  margin: 20px 0;
}

.service-list li {
  background-color: #f9f9f9;
  border-left: 4px solid var(--rosso-roma); /* Linea rossa a sinistra */
  margin-bottom: 10px;
  padding: 10px 15px;
  border-radius: 0 5px 5px 0;
  font-size: 1.1em;
}
/* --- OTTIMIZZAZIONE VIDEO PLACEHOLDER --- */
.video-placeholder {
    position: relative;
    width: 100%;
    /* Rimuoviamo l'altezza fissa per evitare tagli */
    aspect-ratio: 9 / 16; 
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-placeholder img {
    width: 100%;
    height: 100%;
    /* CAMBIA DA 'cover' A 'contain' PER VEDERE TUTTA LA FIGURA */
    object-fit: contain; 
    background-color: #1a1a1a; /* Sfondo scuro per le bande laterali */
    opacity: 0.85;
    transition: 0.3s ease;
}

.video-placeholder:hover img {
    opacity: 1;
}

.play-button {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Non blocca il clic sul video */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.play-button::after {
    content: "";
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 18px solid var(--rosso-roma);
    margin-left: 5px;
}