/* ═══════════════════════════════════════════════════════════
   SHOURAI — article.css
   CSS specifico di article.php (pagina singolo articolo).
   Richiede main.css caricato prima.
   ═══════════════════════════════════════════════════════════ */

/* Container narrow (solo article) */
.container-narrow {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Article Hero ─────────────────────────────────────────── */
.article-hero {
  position: relative;
  margin-top: 61px;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.article-hero-bg { position: absolute; inset: 0; z-index: 0; }
.article-hero-gradient { position: absolute; inset: 0; opacity: 0.55; }
.article-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 20%, transparent 80%);
}
.article-hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(0,0,0,0) 0%, rgba(7,7,15,0.85) 100%);
}
.article-hero-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120px; height: 120px;
  border-radius: 28px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255,255,255,0.7);
}
.article-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 56px 0 52px;
}

/* ── Category badge ───────────────────────────────────────── */
.cat-badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.badge-press     { background: rgba(99,102,241,0.18); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.25); }
.badge-news      { background: rgba(0,217,255,0.14);  color: #67e8f9; border: 1px solid rgba(0,217,255,0.22); }
.badge-casestudy { background: rgba(34,197,94,0.15);  color: #86efac; border: 1px solid rgba(34,197,94,0.22); }

/* ── Article header ───────────────────────────────────────── */
.article-header { padding: 52px 0 40px; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.meta-sep { color: var(--clr-subtle); font-size: 0.75rem; }
.article-date { font-size: 0.875rem; color: var(--clr-muted); }
.article-read-time { font-size: 0.875rem; color: var(--clr-muted); }
.article-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: 24px;
  color: var(--clr-text);
}
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tag { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 500; background: var(--clr-surface); border: 1px solid var(--clr-border); color: var(--clr-muted); }
.article-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  width: fit-content;
}
.author-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99,102,241,0.35), rgba(124,58,237,0.35));
  border: 1px solid rgba(99,102,241,0.3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 0.8rem; font-weight: 700; color: #a5b4fc;
  flex-shrink: 0;
}
.author-name { font-size: 0.9rem; font-weight: 600; color: var(--clr-text); }
.author-role { font-size: 0.8rem; color: var(--clr-muted); }

/* ── Article body ─────────────────────────────────────────── */
.article-divider { height: 1px; background: linear-gradient(90deg, var(--clr-primary), transparent); margin: 0 0 48px; opacity: 0.35; }
.article-lead {
  font-size: 1.15rem;
  line-height: 1.75;
  color: rgba(240,240,255,0.85);
  margin-bottom: 36px;
  padding-left: 20px;
  border-left: 3px solid var(--clr-primary);
}
.article-content { font-size: 1rem; line-height: 1.85; color: var(--clr-muted); margin-bottom: 56px; }
.article-content p  { margin-bottom: 1.4em; }
.article-content h2 { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; color: var(--clr-text); margin: 2em 0 0.8em; }
.article-content h3 { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 600; color: var(--clr-text); margin: 1.6em 0 0.6em; }
.article-content ul,
.article-content ol { padding-left: 1.5em; margin-bottom: 1.2em; }
.article-content li { margin-bottom: 0.5em; }
.article-content strong { color: var(--clr-text); font-weight: 600; }
.article-content a { color: var(--clr-primary); text-decoration: underline; text-underline-offset: 3px; }

.article-no-content {
  padding: 48px 40px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--clr-muted);
  font-size: 0.95rem;
  margin-bottom: 56px;
}
.article-no-content svg { margin: 0 auto 12px; color: var(--clr-subtle); }
.article-no-content p { max-width: 400px; margin: 0 auto; }

/* ── Share / back bar ─────────────────────────────────────── */
.article-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  margin-bottom: 80px;
}
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--clr-border);
  background: var(--clr-surface);
  color: var(--clr-muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.action-btn:hover { color: var(--clr-text); border-color: rgba(99,102,241,0.4); background: rgba(99,102,241,0.08); }
.action-btn.copied { color: #86efac; border-color: rgba(34,197,94,0.3); }

/* ── Leggi anche ──────────────────────────────────────────── */
.leggi-anche { padding: 0 0 80px; }
.leggi-anche-header { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.leggi-anche-title { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; color: var(--clr-text); white-space: nowrap; }
.leggi-anche-line { flex: 1; height: 1px; background: var(--clr-border); }

/* Article cards grid (related articles) */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  cursor: pointer;
}
.article-card:hover { border-color: rgba(99,102,241,0.4); transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.35); }
.card-visual { position: relative; height: 140px; overflow: hidden; flex-shrink: 0; }
.card-visual-bg   { position: absolute; inset: 0; }
.card-visual-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.card-visual-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.5); }
.card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.card-date { font-size: 0.78rem; color: var(--clr-subtle); }
.card-title { font-family: var(--font-heading); font-size: 0.975rem; font-weight: 600; line-height: 1.4; color: var(--clr-text); margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-excerpt { font-size: 0.85rem; color: var(--clr-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 16px; flex: 1; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.06); }
.card-author { display: flex; align-items: center; gap: 7px; }
.card-avatar { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, rgba(99,102,241,0.35), rgba(124,58,237,0.35)); display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-weight: 700; font-family: var(--font-heading); color: #a5b4fc; flex-shrink: 0; }
.card-author-name { font-size: 0.78rem; color: var(--clr-muted); }
.read-cta { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; font-weight: 700; color: var(--clr-primary); transition: gap 0.2s var(--ease-out), color 0.2s; white-space: nowrap; }
.article-card:hover .read-cta { gap: 8px; color: var(--clr-accent); }

/* ── 404 ──────────────────────────────────────────────────── */
.not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 80px 24px;
}
.not-found svg { color: var(--clr-subtle); margin: 0 auto; }
.not-found h1 { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; }
.not-found p { color: var(--clr-muted); max-width: 400px; }

/* ── Footer article ───────────────────────────────────────── */
footer { padding: 24px 0; }
.footer-legal { gap: 20px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .article-hero { min-height: 320px; }
  .article-hero-icon { width: 80px; height: 80px; border-radius: 20px; }
  .article-hero-icon svg { width: 32px !important; height: 32px !important; }
  .nav-links-row { display: none; }
  .cards-grid { grid-template-columns: 1fr; }
  .article-actions { flex-direction: column; align-items: flex-start; }
}
