/* Resettaggio e stili di base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* body {
  font-family: "Roboto", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f7f9;
  margin: 0;
  padding: 0;
} */

/* Layout del post */
#single-post {
  max-width: 800px;
  margin: 4rem auto;
  background-color: #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.post-header {
  position: relative;
  background-color: #2c3e50;
  color: #fff;
  padding: 3rem 2rem;
  text-align: center;
}

.post-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.post-meta {
  font-size: 0.9rem;
  opacity: 0.8;
}

.post-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.post-content {
  padding: 2rem;
}

/* Stili del contenuto */
.post-content h2 {
  font-size: 1.8rem;
  color: #2c3e50;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #eee;
  padding-bottom: 0.5rem;
}

.post-content h3 {
  font-size: 1.5rem;
  color: #34495e;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

.post-content p {
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.post-content blockquote {
  background-color: #f9f9f9;
  border-left: 4px solid #3498db;
  padding: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #555;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.2rem;
  padding-left: 2rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content a {
  color: #3498db;
  text-decoration: none;
  border-bottom: 1px dotted #3498db;
  transition: border-bottom 0.3s ease;
}

.post-content a:hover {
  border-bottom: 1px solid #3498db;
}

/* Stili per il codice */
.post-content pre,
.post-content code {
  background-color: #f8f8f8;
  border-radius: 4px;
  font-family: "Courier New", Courier, monospace;
}

.post-content pre {
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid #e1e1e8;
}

.post-content code {
  padding: 0.2rem 0.4rem;
  font-size: 0.9rem;
}

/* Pulsante "Torna al Blog" */
.back-to-blog {
  display: inline-block;
  margin: 2rem;
  padding: 0.7rem 1.5rem;
  background-color: #307abb;
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  font-weight: bold;
}

.back-to-blog:hover {
  background-color: #3498db;
  transform: translateY(-2px);
}

/* Condivisione sui social media */
.social-share {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.social-share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  transition: transform 0.3s ease;
}

.social-share a:hover {
  transform: scale(1.1);
}

.share-facebook {
  background-color: #3b5998;
}
.share-twitter {
  background-color: #1da1f2;
}
.share-linkedin {
  background-color: #0077b5;
}

/* Sezione commenti */
.comments-section {
  margin-top: 3rem;
  padding: 2rem;
  background-color: #f9f9f9;
  border-radius: 8px;
}

.comments-section h3 {
  margin-bottom: 1rem;
}

.comment {
  background-color: #fff;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.comment-author {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

/* Lettura stimata e indice dei contenuti */
.reading-time {
  font-style: italic;
  margin-bottom: 1rem;
  color: #777;
}

.table-of-contents {
  background-color: #f9f9f9;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 2rem;
}

.table-of-contents h3 {
  margin-top: 0;
}

.table-of-contents ul {
  list-style-type: none;
  padding-left: 0;
}

.table-of-contents li {
  margin-bottom: 0.5rem;
}

.table-of-contents a {
  color: #333;
  text-decoration: none;
}

.table-of-contents a:hover {
  color: #3498db;
}

/* Responsive design */
@media (max-width: 768px) {
  #single-post {
    margin: 0;
    border-radius: 0;
  }

  .post-header {
    padding: 2rem 1rem;
  }

  .post-title {
    font-size: 2rem;
  }

  .post-content {
    padding: 1rem;
  }
}

/* Animazioni */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.post-content {
  animation: fadeIn 0.5s ease-out;
}
