/* --- Variabili Colore (Assicurati che siano coerenti con il tuo main.css) --- */

/* --- Wrapper Principale --- */
.article-wrapper {
  max-width: 1200px;
  margin: 4rem auto;
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(233, 83, 14, 0.08);
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out both;
}

/* --- Immagine di Copertina (Top) --- */
.article-header-image {
  width: 100%;
  height: 600px;
  overflow: hidden;
  position: relative;
  background-color: #f5f5f5;
}

.article-header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Contenuto Principale --- */
.article-main-content {
  padding: 3rem 4rem;
}

/* --- Meta: Categoria e Data --- */
.article-meta-top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-medium);
}

.article-category-badge {
  background: linear-gradient(
    135deg,
    var(--orange-primary),
    var(--yellow-primary)
  );
  color: var(--white);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.article-date {
  color: var(--gray-text);
  font-size: 0.9rem;
  font-weight: 500;
}

/* --- Titolo Articolo --- */
.article-title-single {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 2.5rem;
  color: var(--black);
  /* Effetto gradiente sul testo */
  background: linear-gradient(135deg, var(--orange-primary), var(--red-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- CORPO DELL'ARTICOLO (Blocchi EditorJS) --- */
.article-body h1{
  display: none;
}

.article-body {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--gray-text);
}

.article-body p {
  margin-bottom: 1.8rem;
}

.article-body a{
  color: var(--orange-primary);
}

/* Titoli interni (H2, H3) */
.article-body h2,
.article-body h3,
.article-body h4 {
  color: var(--black);
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1.2rem;
  line-height: 1.3;
}

.article-body h2 {
  font-size: 1.7rem;
}
.article-body h3 {
  font-size: 1.5rem;
}

/* --- GESTIONE LISTE (Cruciale per ID 7) --- */
.article-body ul,
.article-body ol {
  margin: 1.5rem 0 2rem 2.5rem !important; /* Rientro per vedere i pallini */
  padding-left: 0;
}

.article-body ul {
  list-style-type: disc !important; /* Pallini neri */
}

.article-body ol {
  list-style-type: decimal !important; /* Numeri 1, 2, 3... */
}

.article-body li {
  margin-bottom: 0.8rem;
  padding-left: 0.5rem;
  display: list-item !important; /* Forza il comportamento da lista */
}

/* --- IMMAGINI E FIGURE INTERNE --- */
.article-figure {
  margin: 3.5rem 0;
  text-align: center;
}

.article-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.article-figcaption {
  margin-top: 1.2rem;
  font-size: 0.95rem;
  color: #777;
  font-style: italic;
  line-height: 1.4;
}

/* --- BOTTONE TORNA INDIETRO --- */
.back-to-news {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--orange-primary);
  font-weight: 700;
  text-decoration: none;
  margin-top: 2rem;
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--orange-primary);
  border-radius: 50px;
  transition: all 0.3s ease;
}

.back-to-news:hover {
  background: var(--orange-primary);
  color: var(--white);
  transform: translateX(-5px);
}

.back-to-news svg {
  width: 20px;
  height: 20px;
  transform: rotate(180deg); /* Freccia verso sinistra */
}

/* --- ANIMAZIONI --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .article-wrapper {
    margin: 0;
    border-radius: 0;
  }
  .article-main-content {
    padding: 2rem 1.5rem;
  }
  .article-header-image {
    height: 280px;
  }
  .article-meta-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }
  .article-title-single {
    font-size: 2rem;
  }
  .article-body {
    font-size: 1.05rem;
  }

   .article-body h2{
    font-size: 1rem;
  }
}
.code-container {
  background: #1e1e1e;
  border-radius: 6px;
  margin: 1.5em 0;
  font-family: 'Consolas', 'Monaco', monospace;
  border: 1px solid #333;
  max-width: 100%;
  box-sizing: border-box;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #252526;
  padding: 8px 12px;
  border-bottom: 1px solid #333;
  border-radius: 6px 6px 0 0;
  color: #ccc;
  font-size: 0.85rem;
}

.copy-btn {
  background: #3c3c3c;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: #505050;
}

.code-container pre {
  margin: 0;
  padding: 15px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-content {
  display: block;
  color: #d4d4d4;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 100%;
}

.article-quote {
  border-left: 4px solid #007acc;
  margin: 1.5em 0;
  padding: 10px 20px;
  background: #f9f9f9;
  color: #555;
  font-style: italic;
}

.article-quote cite {
  display: block;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #777;
  font-style: normal;
}

.article-delimiter {
  border: 0;
  border-top: 1px solid #eaeaea;
  margin: 2em 0;
}

.table-wrapper {
  overflow-x: auto;
  margin: 1.5em 0;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.article-table th,
.article-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

.article-table th {
  background: #f4f4f4;
  font-weight: bold;
}

.article-checklist {
  margin: 1em 0;
}

.checklist-item {
  display: flex;
  align-items: center;
  margin: 8px 0;
  cursor: default;
}

.checklist-item input {
  margin-right: 10px;
  cursor: not-allowed;
}

