/* System-i Blog – Stili specifici del blog (integrano style.css principale) */

/* Hero blog (leggermente più compatto della hero principale) */
.blog-hero { padding: 60px 0 50px; }
.blog-hero h1 { font-size: 2.1rem; line-height: 1.25; }
@media (max-width: 768px) {
  .blog-hero h1 { font-size: 1.6rem; }
  .blog-hero { padding: 45px 0 35px; }
}

/* Meta articolo (data, tempo lettura, autore) */
.article-meta { color: rgba(255,255,255,.85); font-size: .92rem; }
.article-meta i { color: rgba(255,255,255,.65); }

/* Cover image dell'articolo */
.article-cover img { width: 100%; max-height: 420px; object-fit: cover; box-shadow: 0 10px 30px rgba(0,0,0,.12); }

/* Placeholder quando la cover non è disponibile */
.article-cover-placeholder {
  width: 100%;
  aspect-ratio: 16 / 7;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 60%, var(--primary) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: 4.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  position: relative;
  overflow: hidden;
}
.article-cover-placeholder::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
}
.article-cover-placeholder i { position: relative; z-index: 1; }

/* Corpo articolo: tipografia leggibile */
.article-body { font-size: 1.05rem; line-height: 1.75; color: #333; }
.article-body .lead-paragraph { font-size: 1.2rem; font-weight: 400; color: #2c3e50; margin-bottom: 1.5rem; }
.article-body h2 { font-size: 1.55rem; font-weight: 700; color: var(--secondary); margin: 2.5rem 0 1rem; padding-bottom: .5rem; border-bottom: 2px solid #f0f0f0; }
.article-body h3 { font-size: 1.25rem; font-weight: 600; color: var(--secondary); margin: 2rem 0 .8rem; }
.article-body p { margin-bottom: 1.2rem; }
.article-body ul, .article-body ol { margin-bottom: 1.4rem; padding-left: 1.4rem; }
.article-body ul li, .article-body ol li { margin-bottom: .5rem; }
.article-body a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-body a:hover { color: var(--primary-dark); }
.article-body blockquote { border-left: 4px solid var(--primary); padding: 1rem 1.5rem; margin: 1.5rem 0; background: var(--light-bg); border-radius: 0 8px 8px 0; font-style: italic; color: var(--secondary); }
.article-body code { background: #f4f6f8; padding: 2px 6px; border-radius: 4px; font-size: .92em; color: #d63384; }
.article-body pre { background: #2c3e50; color: #fff; padding: 1rem 1.2rem; border-radius: 8px; overflow-x: auto; }
.article-body pre code { background: transparent; color: inherit; padding: 0; }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 1.5rem 0; }
.article-body figure { margin: 1.5rem 0; text-align: center; }
.article-body figcaption { font-size: .85rem; color: var(--text-muted-custom); margin-top: .5rem; }
.article-body table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; font-size: .95rem; }
.article-body table th, .article-body table td { padding: .75rem 1rem; border-bottom: 1px solid #e9ecef; text-align: left; }
.article-body table th { background: var(--light-bg); font-weight: 600; color: var(--secondary); }

/* Share buttons */
.article-share { font-size: .95rem; }

/* Blog cards (usate in indice, categorie, related) */
.blog-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.06); transition: all .3s; height: 100%; display: flex; flex-direction: column; }
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.blog-card-image { position: relative; overflow: hidden; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--secondary), var(--primary-dark)); }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.blog-card:hover .blog-card-image img { transform: scale(1.05); }
.blog-card-image .blog-card-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.5); font-size: 3rem; }
.blog-card-body { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.blog-card-body .badge { align-self: flex-start; font-weight: 500; font-size: .75rem; padding: .35rem .7rem; }
.blog-card-body h3 { font-size: 1.1rem; font-weight: 600; color: var(--secondary); margin: .6rem 0 .5rem; line-height: 1.35; }
.blog-card-body p { color: var(--text-muted-custom); font-size: .92rem; margin-bottom: .8rem; flex-grow: 1; }
.blog-card-body .blog-card-meta { font-size: .82rem; color: var(--text-muted-custom); margin-top: auto; padding-top: .6rem; border-top: 1px solid #f0f0f0; }
.blog-card-body .blog-card-meta i { color: var(--primary); }

/* Card CTA (l'ultima card negli "related" che invita a vedere tutti gli articoli) */
.blog-card-cta { background: transparent; border: 2px dashed #cfd8dc; box-shadow: none; }
.blog-card-cta:hover { background: #fff; border-style: solid; border-color: var(--primary); }

/* Filtri categoria nell'indice */
.blog-filters { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 2.5rem; }
.blog-filter { padding: .5rem 1.2rem; border-radius: 50px; border: 1.5px solid #e9ecef; color: var(--secondary); font-weight: 500; font-size: .9rem; text-decoration: none; transition: all .2s; background: #fff; }
.blog-filter:hover { border-color: var(--primary); color: var(--primary); }
.blog-filter.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Paginazione */
.blog-pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 3rem; }
.blog-pagination a, .blog-pagination span { padding: .5rem .9rem; border-radius: 8px; border: 1px solid #e9ecef; color: var(--secondary); font-weight: 500; text-decoration: none; transition: all .2s; }
.blog-pagination a:hover { border-color: var(--primary); color: var(--primary); }
.blog-pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.blog-pagination .disabled { opacity: .4; cursor: not-allowed; }

/* Featured post (primo articolo evidenziato nell'indice) */
.blog-featured { background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%); color: #fff; border-radius: 14px; overflow: hidden; margin-bottom: 3rem; }
.blog-featured .blog-featured-body { padding: 2.5rem; }
.blog-featured .badge { background: rgba(255,255,255,.2); color: #fff; margin-bottom: 1rem; }
.blog-featured h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 1rem; }
.blog-featured p { opacity: .9; margin-bottom: 1.5rem; }
.blog-featured a.read-more { color: #fff; font-weight: 600; text-decoration: none; }
.blog-featured a.read-more:hover { text-decoration: underline; }
.blog-featured .blog-featured-image { height: 100%; min-height: 260px; background-size: cover; background-position: center; }

/* Empty state */
.blog-empty { text-align: center; padding: 4rem 1rem; color: var(--text-muted-custom); }
.blog-empty i { font-size: 3rem; color: #cfd8dc; margin-bottom: 1rem; }
