/*
Theme Name: MS Sistemi Blog
Theme URI: https://mssistemi.it/blog
Description: Tema custom per il blog SEO di MS Sistemi — design coerente con la landing page aziendale.
Version: 1.0
Author: MS Sistemi
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --rosso: #F70024;
  --rosso2: #DB0028;
  --bg: #0D1B2A;
  --text: #1A252F;
  --muted: #6B7A8D;
  --border: #E8ECF0;
  --white: #fff;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── HEADER ── */
header {
  position: sticky;
  top: 0;
  background: rgba(13,27,42,.97);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.site-logo img { height: 52px; width: auto; }

.site-logo span {
  color: var(--white);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
}

nav ul a {
  color: rgba(255,255,255,.7);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
}

nav ul a:hover { color: var(--white); }

.header-cta {
  display: inline-block;
  padding: 10px 22px;
  background: var(--rosso);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  border-radius: 6px;
  transition: all .2s;
  white-space: nowrap;
}

.header-cta:hover {
  background: var(--rosso2);
  transform: translateY(-1px);
}

/* ── CONTAINER ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── BLOG ARCHIVE ── */
.blog-header {
  background: var(--bg);
  color: var(--white);
  padding: 72px 0 56px;
  text-align: center;
}

.blog-header .eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--rosso);
  margin-bottom: 16px;
}

.blog-header h1 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.blog-header h1 em {
  color: var(--rosso);
  font-style: normal;
}

.blog-header p {
  font-size: 17px;
  color: rgba(255,255,255,.65);
  max-width: 520px;
  margin: 0 auto;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 64px 0;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .3s, transform .3s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,.10);
  transform: translateY(-4px);
}

.post-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f0f2f4;
}

.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.post-card:hover .post-card-img img { transform: scale(1.04); }

.post-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.post-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--rosso);
}

.post-date {
  font-size: 12px;
  color: var(--muted);
}

.post-card h2 {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
  color: var(--text);
}

.post-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

.post-card .read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--rosso);
  transition: gap .2s;
}

.post-card .read-more:hover { gap: 10px; }

/* ── SINGLE POST ── */
.single-header {
  background: var(--bg);
  color: var(--white);
  padding: 64px 0 48px;
  text-align: center;
}

.single-header .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--rosso);
  display: block;
  margin-bottom: 16px;
}

.single-header h1 {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.15;
  max-width: 800px;
  margin: 0 auto 20px;
}

.single-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,.55);
}

.single-meta strong { color: rgba(255,255,255,.85); }

.post-featured-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 40px;
}

.post-content-wrap {
  max-width: 760px;
  margin: 56px auto 80px;
  padding: 0 32px;
}

.post-content h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 40px 0 14px;
  color: var(--text);
}

.post-content h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 32px 0 10px;
  color: var(--text);
}

.post-content p {
  font-size: 17px;
  line-height: 1.85;
  color: #2C3E50;
  margin-bottom: 20px;
}

.post-content ul, .post-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.post-content li {
  font-size: 17px;
  line-height: 1.8;
  color: #2C3E50;
  margin-bottom: 6px;
}

.post-content strong { font-weight: 700; color: var(--text); }

.post-content a {
  color: var(--rosso);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content blockquote {
  border-left: 4px solid var(--rosso);
  padding: 16px 24px;
  margin: 28px 0;
  background: #FFF5F6;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text);
  font-size: 17px;
}

/* ── CTA BANNER ── */
.cta-banner {
  background: var(--bg);
  color: var(--white);
  padding: 64px 0;
  text-align: center;
}

.cta-banner h2 {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
}

.cta-banner p {
  font-size: 16px;
  color: rgba(255,255,255,.65);
  margin-bottom: 28px;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--rosso);
  color: var(--white);
  font-weight: 700;
  border-radius: 6px;
  transition: all .2s;
  font-size: 15px;
}

.btn:hover {
  background: var(--rosso2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(247,0,36,.35);
}

/* ── FOOTER ── */
footer {
  background: #07111C;
  color: rgba(255,255,255,.5);
  padding: 40px 0;
  font-size: 13px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo { height: 36px; opacity: .7; }

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a { color: rgba(255,255,255,.45); transition: color .2s; }
.footer-links a:hover { color: var(--white); }

/* ── PAGINATION ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 0 64px;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text);
  transition: all .2s;
}

.pagination a:hover, .pagination .current {
  background: var(--rosso);
  color: var(--white);
  border-color: var(--rosso);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
  .header-inner { padding: 0 20px; }
  nav ul { display: none; }
  .post-content-wrap { padding: 0 20px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
