/* ===== GUIDE ARTICLE — CSS SEPARATO ===== */

/* BREADCRUMB */
.breadcrumb {
  font-size: 13px;
  color: #718096;
  margin-bottom: 20px;
}
.breadcrumb a {
  color: #667eea;
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }

/* WRAPPER ARTICOLO */
.guide-article {
  max-width: 780px;
  margin: 0 auto;
}

/* ✅ FIX: .container usato come wrapper articolo non deve avere hover */
.guide-article.container:hover,
div.container:has(.guide-article):hover {
  transform: none !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
}

/* HEADER — no viola, sovrascrive tag header globale */
.article-header {
  background: #f8f9fa !important;
  border: 2px solid #e9ecef !important;
  border-radius: 16px;
  padding: 28px 30px;
  margin-bottom: 30px;
  text-align: left;
  box-shadow: none !important;
  color: #2d3748 !important;
}
.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.guide-tag {
  background: #edf2ff;
  color: #667eea;
  border: 1px solid #c3d0f5;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
}
.article-header h1 {
  font-size: 2em;
  color: #2d3748 !important;
  margin: 12px 0;
}
.article-subtitle {
  font-size: 1.1em;
  color: #718096;
  line-height: 1.6;
  margin-bottom: 16px;
}
.article-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: #a0aec0;
  flex-wrap: wrap;
}

/* INDICE */
.article-toc {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0;
}
.article-toc h4 {
  margin: 0 0 12px;
  color: #2d3748;
  font-size: 15px;
}
.article-toc ol {
  margin: 0;
  padding-left: 20px;
}
.article-toc li { margin-bottom: 6px; }
.article-toc a {
  color: #667eea;
  font-size: 14px;
  text-decoration: none;
}
.article-toc a:hover { text-decoration: underline; }

/* SEZIONI */
.guide-article section { margin-bottom: 36px; }
.guide-article h2 {
  font-size: 1.4em;
  color: #2d3748;
  border-left: 4px solid #667eea;
  padding-left: 12px;
  margin-bottom: 16px;
}
.guide-article p {
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 14px;
}

/* INFO BOX */
.info-box {
  padding: 16px 20px;
  border-radius: 10px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
}
.info-box.warning {
  background: #fef5e7;
  border-left: 4px solid #ed8936;
}
.info-box.success {
  background: #e8f5e8;
  border-left: 4px solid #27ae60;
}

/* FORMULA BOX */
.formula-box {
  background: #0f0f1e;
  color: white;
  border-radius: 12px;
  padding: 24px;
  margin: 16px 0;
  text-align: center;
}
.formula-title {
  color: #a78bfa;
  font-weight: 700;
  margin-bottom: 12px;
}
.formula-box code {
  display: block;
  font-size: 1.05em;
  color: #68d391;
  margin: 8px 0;
  font-family: monospace;
  line-height: 1.6;
}
.formula-box hr {
  border-color: rgba(255,255,255,0.1);
  margin: 12px 0;
}
.formula-vars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.var-item {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #4a5568;
  line-height: 1.5;
}
.var-item strong {
  display: block;
  color: #2d3748;
  margin-bottom: 4px;
}

/* EXAMPLE BOX */
.example-box {
  background: #edf2ff;
  border: 2px solid #c3d0f5;
  border-radius: 12px;
  padding: 22px;
  margin: 16px 0;
}
.example-box h4 {
  margin: 0 0 14px;
  color: #2d3748;
}
.example-box ul {
  margin: 0 0 14px;
  padding-left: 20px;
}
.example-box li {
  color: #4a5568;
  font-size: 14px;
  margin-bottom: 6px;
  line-height: 1.5;
}
.example-box hr {
  border-color: #c3d0f5;
  margin: 14px 0;
}
.example-box p {
  margin: 8px 0;
  font-size: 15px;
  color: #4a5568;
}
.example-result {
  background: white;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  color: #27ae60 !important;
}

/* ERRORS GRID */
.errors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.error-item {
  display: flex;
  gap: 14px;
  background: #fff5f5;
  border: 2px solid #fed7d7;
  border-radius: 10px;
  padding: 16px;
}
.error-icon { font-size: 22px; flex-shrink: 0; }
.error-item strong {
  display: block;
  color: #2d3748;
  margin-bottom: 4px;
  font-size: 14px;
}
.error-item p {
  margin: 0;
  font-size: 13px;
  color: #718096;
}

/* CTA */
.article-cta {
  background: #1a1a2e;
  border: 2px solid #2d2d4e;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin: 30px 0;
  color: white;
}
.article-cta h3 {
  margin: 0 0 10px;
  font-size: 1.4em;
  color: white;
}
.article-cta p {
  margin: 0 0 20px;
  color: #a0aec0;
}

/* ✅ RELATED — versione guide (sovrascrive style.css) */
.guide-article .related-tools {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 16px;
}
.guide-article .related-tools h3 {
  margin: 0 0 14px;
  font-size: 16px;
  color: #2d3748;
  border-bottom: none;
  padding-bottom: 0;
}
.guide-article .related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.guide-article .related-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  transform: none !important;
}
.guide-article .related-card:hover {
  background: white !important;
  border-color: #667eea;
  color: #667eea;
  transform: none !important;
}

/* RESPONSIVE */
@media (max-width: 820px) {
  .article-header { padding: 20px; }
  .article-header h1 { font-size: 1.5em; }
  .article-meta { gap: 10px; }
  .formula-box code { font-size: 0.85em; }
  .errors-grid { grid-template-columns: 1fr; }
  .article-cta { padding: 24px 16px; }
  .guide-article .related-grid { grid-template-columns: 1fr 1fr; }
}
