/* ═══════════════════════════════════════════════════
   CREA Web Identity — Stili Articoli Blog
   ═══════════════════════════════════════════════════ */

/* ─── LAYOUT COLONNA ARTICOLO ─────────────────────── */
.article-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ─── H1 ───────────────────────────────────────────── */
.article-h1 {
  font-family: var(--font-bricolage);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: 2rem;
  margin-bottom: 1.25rem;
}

/* ─── META (autore, data, tempo lettura) ───────────── */
.article-meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  font-family: var(--font-inter);
}

.article-meta span::before {
  content: "·";
  margin-right: 0.6rem;
  opacity: 0.4;
}

.article-meta span:first-child::before {
  content: none;
}

/* ─── INTRO ─────────────────────────────────────────── */
.article-intro p {
  font-size: 1.1rem;
  line-height: 1.85;
  margin-bottom: 1.1rem;
  color: var(--text-color);
}

/* ─── HERO IMAGE ────────────────────────────────────── */
.article-hero {
  width: 100%;
  border-radius: 16px;
  margin: 2rem 0 2.5rem;
  display: block;
  max-height: 500px;
  object-fit: contain;
}

/* ─── INDICE (TOC) ───────────────────────────────────── */
.toc-box {
  border-left: 3px solid var(--text-color);
  padding: 1.5rem 1.75rem;
  background: rgba(31, 31, 31, 0.04);
  border-radius: 0 12px 12px 0;
  margin: 0 0 3rem;
}

.toc-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  opacity: 0.5;
}

.toc-box ol {
  margin: 0;
  padding-left: 1.25rem;
}

.toc-box ol li {
  margin-bottom: 0.45rem;
}

.toc-box ol li a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  font-family: var(--font-inter);
  transition: opacity 0.15s;
}

.toc-box ol li a:hover {
  opacity: 0.6;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─── CONTENUTO ARTICOLO ────────────────────────────── */
.article-content h2 {
  font-family: var(--font-bricolage);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-top: 3.5rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  font-family: var(--font-bricolage);
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.article-content p {
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.75rem;
}

.article-content strong,
.article-intro strong {
  color: #e0357f;
}

.article-content ul,
.article-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.article-content li {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 0.65rem;
}

.article-content img {
  width: 100%;
  border-radius: 14px;
  margin: 2rem 0;
  display: block;
  max-height: 420px;
  object-fit: contain;
}

/* ─── FIGURE / FIGCAPTION ────────────────────────────── */
.article-content figure {
  margin: 2rem 0;
}

.article-content figure img {
  margin: 0;
}

.article-content figcaption {
  text-align: center;
  font-size: 0.78rem;
  color: #999;
  margin-top: 0.5rem;
  letter-spacing: 0.01em;
}

.article-content figcaption a {
  color: #999;
  text-decoration: none;
}

.article-content figcaption a:hover {
  color: #555;
  text-decoration: underline;
}

/* ─── HERO CAPTION ───────────────────────────────────── */
.article-hero-caption {
  text-align: center;
  font-size: 0.78rem;
  color: #999;
  margin-top: -1.5rem;
  margin-bottom: 2rem;
  letter-spacing: 0.01em;
}

.article-hero-caption a {
  color: #999;
  text-decoration: none;
}

.article-hero-caption a:hover {
  color: #555;
  text-decoration: underline;
}

/* ─── HIGHLIGHT BOX ─────────────────────────────────── */
.article-highlight {
  background: var(--purple-color);
  border-radius: 14px;
  padding: 1.4rem 1.75rem;
  margin: 2rem 0;
}

.article-highlight p {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.75;
}

/* ─── LINK INTERNI ───────────────────────────────────── */
.link-interni {
  color: var(--text-color);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: opacity 0.15s;
}

.link-interni:hover {
  opacity: 0.65;
  color: var(--text-color);
}

/* ─── LINK ESTERNI (vai al sito) ──────────────────────── */
.link-esterno {
  color: #e0357f;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: opacity 0.15s;
}

.link-esterno:hover {
  opacity: 0.7;
  color: #e0357f;
}

/* ─── TABELLE (Pro/Contro + confronto) ───────────────── */
.article-content .table-responsive {
  margin: 1.75rem 0;
  border-radius: 12px;
  border: 1px solid rgba(31, 31, 31, 0.1);
}

.article-content .table {
  margin-bottom: 0;
}

/* style-blog.css definisce una regola globale "th, td { text-align:center;
   padding:12px }" pensata per un'altra tabella del sito: qui la sovrascriviamo
   per le tabelle degli articoli con selettori più specifici */
.article-content .table th {
  font-family: var(--font-bricolage);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  background: rgba(31, 31, 31, 0.04);
  border-bottom-width: 1px;
  padding: 1rem 1.5rem;
}

.article-content .table td {
  vertical-align: top;
  text-align: left;
  padding: 1.25rem 1.5rem;
}

.article-content .table td + td {
  border-left: 1px solid rgba(31, 31, 31, 0.1);
}

.article-content .table ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.article-content .table li {
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 0.7rem;
  color: var(--text-color);
}

.article-content .table li:last-child {
  margin-bottom: 0;
}

/* Tabelle Pro/Contro: non far comprimere le colonne, forza lo
   scroll orizzontale (.table-responsive) invece del wrap illeggibile */
.article-content .table-pro-contro th,
.article-content .table-pro-contro td {
  min-width: 240px;
}

@media (max-width: 767px) {
  .article-content .table-pro-contro th,
  .article-content .table-pro-contro td {
    min-width: 210px;
  }
}

/* ─── FAQ ACCORDION ───────────────────────────────────── */
.faq-accordion {
  margin-top: 1.5rem;
}

.faq-accordion {
  --bs-accordion-color: var(--text-color);
  --bs-accordion-bg: transparent;
  --bs-accordion-border-color: rgba(31, 31, 31, 0.12);
  --bs-accordion-border-radius: 0;
  --bs-accordion-inner-border-radius: 0;
  --bs-accordion-btn-padding-x: 0;
  --bs-accordion-btn-padding-y: 1.35rem;
  --bs-accordion-btn-color: var(--text-color);
  --bs-accordion-btn-bg: transparent;
  --bs-accordion-btn-focus-border-color: transparent;
  --bs-accordion-btn-focus-box-shadow: none;
  --bs-accordion-body-padding-x: 0;
  --bs-accordion-body-padding-y: 0.5rem;
  --bs-accordion-active-color: #e0357f;
  --bs-accordion-active-bg: transparent;
  --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231f1f1f'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e0357f'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* style-blog.css definisce già un ".accordion-item" (widget "vertical-accordion"
   di altre sezioni del sito) con display:flex/position:relative: qui lo
   neutralizziamo per evitare che rompa il layout verticale dell'accordion FAQ */
.faq-accordion .accordion-item {
  display: block;
  position: static;
  transition: none;
}

.faq-accordion .accordion-button {
  font-family: var(--font-bricolage);
  font-size: 1.05rem;
  font-weight: 700;
}

.faq-accordion .accordion-body {
  padding-top: 0;
  padding-bottom: 1.5rem;
}

.faq-accordion .accordion-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: 0;
}

/* ─── ARTICOLI CORRELATI ─────────────────────────────── */
.related-section {
  padding: 3.5rem 0 1rem;
  border-top: 1px solid rgba(31, 31, 31, 0.12);
  margin-top: 4rem;
}

.related-section > h2 {
  font-family: var(--font-bricolage);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
}

.related-card {
  border: 1px solid rgba(31, 31, 31, 0.1);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-color);
  display: block;
  height: 100%;
  background: var(--withe-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
  color: var(--text-color);
}

.related-card > img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.related-card-body {
  padding: 1.2rem 1.3rem 1.5rem;
}

.related-card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 0.45rem;
}

.related-card h3 {
  font-family: var(--font-bricolage);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

/* ─── BREADCRUMB ─────────────────────────────────────── */
.breadcrumb {
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.briciole a {
  color: var(--text-color);
  opacity: 0.5;
  text-decoration: none;
  transition: opacity 0.15s;
}

.briciole a:hover {
  opacity: 1;
}

.breadcrumb-item.active {
  opacity: 0.5;
}

/* ─── MENU ARTICOLI ──────────────────────────────────── */
.article-body .nav-link {
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-color);
  opacity: 0.75;
  transition: opacity 0.15s;
  padding: 0.25rem 0;
}

.article-body .nav-link:hover {
  opacity: 1;
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 767px) {
  .article-h1 {
    font-size: 1.85rem;
  }

  .article-hero {
    border-radius: 10px;
    max-height: 280px;
  }

  .article-content img {
    border-radius: 10px;
    max-height: 260px;
  }

  .toc-box {
    padding: 1.2rem 1.35rem;
  }

  .article-highlight {
    padding: 1.1rem 1.35rem;
  }

  .related-card > img {
    height: 200px;
  }
}
