/* Articoli del blog: riepilogo in home, archivio (articoli/index.html) e pagina del singolo articolo.
   Colori e caratteri del sito: verde #7db440, Open Sans. */
:root { --blog-green: #7db440; --blog-green-dark: #5f8f2c; --blog-ink: #10243a; }

/* ---------- Etichetta argomento ---------- */
.blog-cat {
  display: inline-flex; align-items: center; gap: .35em;
  font-family: "Open Sans", sans-serif; font-weight: 600; font-size: .72rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--blog-green-dark);
}
.blog-date { font-size: .8rem; color: #8a96a3; }

/* ---------- HOME: articolo in evidenza + ultimi articoli ---------- */
.blog-featured {
  position: relative; display: block; height: 100%; min-height: 380px;
  border-radius: .5rem; overflow: hidden; color: #fff; text-decoration: none;
  box-shadow: 0 .5rem 1.5rem rgba(16,36,58,.12);
}
.blog-featured img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.blog-featured::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,36,58,0) 25%, rgba(16,36,58,.88) 100%);
}
.blog-featured:hover img { transform: scale(1.05); }
.blog-featured-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 1.75rem; }
.blog-featured .blog-cat { color: #c9ef9f; }
.blog-featured h3 {
  color: #fff; font-family: "Open Sans", sans-serif; font-weight: 300; letter-spacing: .02em;
  font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); line-height: 1.2; margin: .4rem 0 .6rem;
}
.blog-featured p { color: rgba(255,255,255,.85); font-size: .95rem; margin-bottom: .5rem; }
.blog-featured .blog-date { color: rgba(255,255,255,.7); }

.blog-mini { display: flex; gap: 1rem; align-items: center; padding: .8rem 0; text-decoration: none; color: inherit; border-bottom: 1px solid #e3e9ef; }
.blog-mini:last-child { border-bottom: 0; }
.blog-mini img { width: 96px; height: 70px; object-fit: cover; border-radius: .35rem; flex-shrink: 0; }
.blog-mini h3 { font-family: "Open Sans", sans-serif; font-weight: 600; font-size: .98rem; line-height: 1.3; color: #222; margin: .15rem 0 .2rem; transition: color .2s; }
.blog-mini:hover h3 { color: var(--blog-green-dark); }

/* Argomenti come "pillole" */
.blog-topics { display: flex; flex-wrap: wrap; gap: .5rem; }
.blog-topic {
  display: inline-flex; align-items: center; gap: .4em; padding: .45rem .85rem;
  font-family: "Open Sans", sans-serif; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  color: #555; background: #fff; border: 1px solid #dfe6ec; border-radius: 2rem; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.blog-topic .n { font-size: .7rem; color: #9aa6b2; }
.blog-topic:hover, .blog-topic.active { background: var(--blog-green); border-color: var(--blog-green); color: #fff; }
.blog-topic:hover .n, .blog-topic.active .n { color: rgba(255,255,255,.8); }
.btn-blog {
  font-family: "Open Sans", sans-serif; text-transform: uppercase; letter-spacing: .05em; font-size: .85rem;
  color: #fff; background: var(--blog-green); border: 2px solid var(--blog-green); border-radius: 6px; padding: .7rem 1.3rem;
}
.btn-blog:hover { background: #fff; color: var(--blog-green); border-color: var(--blog-green); }

/* ---------- ARCHIVIO: schede compatte a pagine ---------- */
.blog-card {
  display: flex; flex-direction: column; height: 100%; background: #fff; border-radius: .5rem; overflow: hidden;
  text-decoration: none; color: inherit; box-shadow: 0 .15rem .6rem rgba(16,36,58,.06);
  transition: transform .25s ease, box-shadow .25s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 .75rem 1.5rem rgba(16,36,58,.13); }
.blog-card img { width: 100%; height: 170px; object-fit: cover; }
.blog-card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.blog-card h3 { font-family: "Open Sans", sans-serif; font-weight: 600; font-size: 1.02rem; line-height: 1.32; color: #222; margin: .35rem 0 .45rem; }
.blog-card p { font-size: .88rem; color: #6b7785; line-height: 1.5; margin: 0 0 .7rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card .blog-date { margin-top: auto; }
.blog-card.is-hidden { display: none; }
.blog-search { max-width: 420px; }
.blog-search .form-control { border-radius: 2rem; padding-left: 2.6rem; }
.blog-search .bi { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #9aa6b2; }
.blog-pager .page-link { color: #555; border-radius: .35rem; margin: 0 .15rem; border-color: #dfe6ec; min-width: 2.4rem; text-align: center; }
.blog-pager .page-item.active .page-link { background: var(--blog-green); border-color: var(--blog-green); color: #fff; }
.blog-empty { display: none; }

/* ---------- PAGINA ARTICOLO ---------- */
.post-hero { background: linear-gradient(135deg, #0c1c2e 0%, #10243a 55%, #12413f 100%); color: #d7e2ee; padding: 3.5rem 0 3rem; }
.post-hero .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.45); font-size: .85rem; }
.post-hero .breadcrumb a { color: rgba(255,255,255,.75); text-decoration: none; }
.post-hero .breadcrumb a:hover { color: #fff; }
.post-hero .breadcrumb-item.active { color: rgba(255,255,255,.5); }
.post-hero .blog-cat { color: #c9ef9f; }
.post-hero h1 {
  color: #fff; font-family: "Open Sans", sans-serif; font-weight: 300; text-transform: uppercase;
  letter-spacing: .05em; line-height: 1.15; font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.9rem);
  text-shadow: 2px 2px 8px rgba(0,0,0,.35); max-width: 26ch; margin: .6rem 0 1rem;
}
.post-meta { color: rgba(255,255,255,.7); font-size: .9rem; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.post-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: .5rem; margin-top: -2rem; box-shadow: 0 .75rem 2rem rgba(16,36,58,.18); background: #e9eef2; }
.post-body { font-family: "Open Sans", sans-serif; font-size: 1.06rem; line-height: 1.8; color: #333; }
.post-body > p:first-child { font-size: 1.2rem; font-weight: 300; color: #444; line-height: 1.7; }
.post-body h2 {
  font-family: "Open Sans", sans-serif; font-weight: 600; font-size: 1.45rem; line-height: 1.3; color: #222;
  letter-spacing: normal; margin: 2.4rem 0 1rem; padding-left: .9rem; border-left: 4px solid var(--blog-green);
}
.post-body h3 { font-family: "Open Sans", sans-serif; font-weight: 600; font-size: 1.15rem; color: #333; letter-spacing: normal; margin: 1.8rem 0 .7rem; }
.post-body a { color: var(--blog-green-dark); text-decoration: underline; text-decoration-color: rgba(125,180,64,.45); text-underline-offset: 3px; }
.post-body a:hover { text-decoration-color: var(--blog-green-dark); }
.post-body ul { padding-left: 1.2rem; }
.post-body li { margin-bottom: .5rem; }
.post-body li::marker { color: var(--blog-green); }
.post-body strong { color: #222; }
.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.post-share a, .post-share button {
  width: 2.4rem; height: 2.4rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid #dfe6ec; background: #fff; color: #555; text-decoration: none; transition: all .2s;
}
.post-share a:hover, .post-share button:hover { background: var(--blog-green); border-color: var(--blog-green); color: #fff; }
.post-aside { position: sticky; top: 90px; }
.post-cta { background: var(--blog-green); color: #fff; border-radius: .5rem; padding: 1.6rem; }
.post-cta h2 { color: #fff; font-family: "Open Sans", sans-serif; font-weight: 300; text-transform: uppercase; letter-spacing: .06em; font-size: 1.25rem; }
.post-cta .btn { border: 2px solid #fff; color: #fff; text-transform: uppercase; font-family: "Open Sans", sans-serif; font-size: .85rem; letter-spacing: .05em; }
.post-cta .btn:hover { background: #fff; color: var(--blog-green); }
.post-aside h2.h6 { font-family: "Open Sans", sans-serif; text-transform: uppercase; letter-spacing: .08em; color: #888; font-weight: 600; }
.post-nav a { display: block; height: 100%; padding: 1rem 1.2rem; border: 1px solid #e3e9ef; border-radius: .5rem; text-decoration: none; color: #222; background: #fff; transition: border-color .2s, box-shadow .2s; }
.post-nav a:hover { border-color: var(--blog-green); box-shadow: 0 .4rem 1rem rgba(16,36,58,.08); }
.post-nav small { color: #8a96a3; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.post-nav strong { display: block; font-family: "Open Sans", sans-serif; font-weight: 600; margin-top: .2rem; line-height: 1.3; }

@media (max-width: 575.98px) {
  .blog-featured { min-height: 320px; }
  .blog-featured-body { padding: 1.2rem; }
  .blog-featured p { display: none; }
  .blog-mini img { width: 80px; height: 60px; }
  .post-cover { margin-top: -1.25rem; }
  .post-body { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .blog-featured img, .blog-card { transition: none; }
}
