:root {
  --accent: #ffd200;
  --brand: #b3141a;
  --ink: #111;
  --dark: #0f0f0f;
  --container: 1120px;
  --header-h: 64px;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial;
  color: var(--ink);
  line-height: 1.6;
  background: #fff;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 20px;
}
.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header fisso come sito */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
}
.nav {
  height: var(--header-h);
  display: grid;
  grid-template-columns: 190px 1fr max-content;
  align-items: center;
  column-gap: 12px;
}
.logo img {
  height: 48px;
}
.menu {
  display: flex;
  justify-content: center;
  gap: 28px;
}
.menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.menu .current-menu-item > a,
.menu a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
}
.area-clienti {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  justify-self: end;
}
.area-clienti .badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  position: relative;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.area-clienti .badge::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: center/contain no-repeat
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ffd200" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h13"/><path d="M12 5l7 7-7 7"/></svg>');
}

html {
  scroll-padding-top: var(--header-h);
}

/* HERO generico */
.hero {
  position: relative;
  color: #fff;
  background: #000;
  display: grid;
  place-items: center;
  min-height: min(720px, calc(100svh - var(--header-h)));
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.58),
    rgba(0, 0, 0, 0.35) 55%,
    rgba(0, 0, 0, 0.48)
  );
}
.hero .hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-inline: 20px;
}
.hero .scroll-dot {
  --size: 46px;
  --fg: var(--accent);
  --bd: rgba(255, 255, 255, 0.28);
  width: var(--size);
  height: var(--size);
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--bd);
  color: var(--fg);
  background: radial-gradient(
    120% 120% at 50% 20%,
    rgba(255, 255, 255, 0.16),
    rgba(255, 255, 255, 0.04)
  );
  backdrop-filter: saturate(140%) blur(6px);
  margin: 28px auto 0;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.25s, border-color 0.25s;
}
.hero .scroll-dot::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}

.hero--blog h1 {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 900;
  font-size: clamp(28px, 6vw, 62px);
  line-height: 1.08;
}
.hero--blog .sub {
  margin: 0 auto;
  max-width: 900px;
  color: #ececec;
}

/* LISTA ARTICOLI */
.block {
  padding: 64px 0;
}
.blog-list {
  display: grid;
  gap: 46px;
}
.post {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 28px;
  align-items: start;
}
.thumb {
  border: 5px solid var(--accent);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post .cat {
  color: #caa400;
  font-weight: 700;
  font-size: 12px;
  margin: 4px 0 8px;
}
.post h2 {
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.25;
}
.post h2 a {
  color: #111;
  text-decoration: none;
}
.post p {
  margin: 0 0 10px;
}
.post .btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.post .date {
  color: #8a8a8a;
  font-size: 12px;
  margin-top: 8px;
}

/* PAGINAZIONE */
.pagination {
  text-align: center;
  margin-top: 34px;
}
.pagination a,
.pagination span {
  display: inline-block;
  margin: 0 5px;
  padding: 8px 12px;
  background: #f0f0f0;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
}
.pagination .current {
  background: #333;
  color: #fff;
}

/* FOOTER */
footer {
  background: #0b0b0b;
  color: #fff;
  padding: 42px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
footer a {
  color: #fff;
  text-decoration: none;
}

/* REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.show {
  opacity: 1;
  transform: none;
}

/* MOBILE: immagine di sfondo dietro al testo, sempre */
@media (max-width: 980px) {
  .post {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .thumb {
    max-width: 540px;
  }
}
@media (max-width: 760px) {
  .container {
    padding-inline: clamp(16px, 4vw, 22px);
  }
  .hero-media img {
    object-position: 50% 92%;
  }
}
@media (max-width: 600px) {
  .hero-media img {
    object-position: 50% 88%;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 420px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
@media (hover: hover) {
  .scroll-dot:hover {
    transform: translateY(-2px) scale(1.02);
  }
}
:root {
  --accent: #ffd200;
  --brand: #b3141a;
  --ink: #111;
  --dark: #0f0f0f;
  --container: 1120px;
}

/* container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.post-wrap {
  padding: 64px 0;
}
.post-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 980px) {
  .post-layout {
    grid-template-columns: 1fr;
  }
}

/* HERO */
.post-hero {
  position: relative;
  min-height: min(560px, calc(100svh - 64px));
  color: #fff;
  background: #000;
  display: grid;
  align-items: end;
  overflow: hidden;
}
.post-hero .hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.post-hero .hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
  image-rendering: auto;
  backface-visibility: hidden;
}
.post-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.65),
    rgba(0, 0, 0, 0.35) 55%,
    rgba(0, 0, 0, 0.5)
  );
}
.post-hero .hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 14% 9% 12%;
  text-align: center;
}
.post-hero .post-cat {
  margin: 0 0 6px;
  color: #f0f0f0;
  font-weight: 700;
  font-size: 12px;
}
.post-hero .post-title {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 900;
  font-size: clamp(28px, 6vw, 54px);
  line-height: 1.06;
}
.post-hero .post-meta {
  margin: 0;
  color: #e9e9e9;
  font-size: 14px;
  opacity: 0.95;
}
.post-hero .dot {
  margin: 0 6px;
}
.scroll-dot {
  --size: 44px;
  width: var(--size);
  height: var(--size);
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--accent);
  margin: 22px auto 0;
  background: radial-gradient(
    120% 120% at 50% 20%,
    rgba(255, 255, 255, 0.16),
    rgba(255, 255, 255, 0.04)
  );
  cursor: pointer;
}
.scroll-dot::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}
@media (max-width: 900px) {
  .post-hero .hero-media img {
    object-position: 50% 92%;
  }
}
@media (max-width: 600px) {
  .post-hero .hero-media img {
    object-position: 50% 88%;
  }
}

/* TOC */
.post-toc {
  position: sticky;
  top: 88px;
  align-self: start;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}
.post-toc h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.post-toc nav {
  display: grid;
  gap: 6px;
}
.post-toc a {
  color: #444;
  text-decoration: none;
  font-size: 14px;
}
.post-toc a.active {
  color: #000;
  font-weight: 800;
}

/* CONTENT */
.post-content {
  color: #333;
  font-size: 18px;
  line-height: 1.7;
}
.post-content h2 {
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.25;
  margin: 26px 0 10px;
}
.post-content h3 {
  margin: 22px 0 8px;
}
.post-content p {
  margin: 0 0 14px;
}
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
.post-content figure {
  margin: 18px 0;
}
.post-content blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--accent);
  background: #fff8c7;
  border-radius: 8px;
}
.post-content ul,
.post-content ol {
  padding-left: 20px;
}

/* SHARE / NAV */
.post-share {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 0 8px;
  border-top: 1px solid #eee;
  margin-top: 24px;
}
.post-share .share-btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 8px;
  border-top: 1px solid #eee;
}
.post-nav a {
  text-decoration: none;
  color: #111;
}
.post-nav a:hover {
  text-decoration: underline;
}

/* CORRELATI */
.related {
  padding: 38px 0;
}
.related h2 {
  margin: 0 0 12px;
  font-size: 22px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 980px) {
  .related-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}
.rel-card {
  display: grid;
  gap: 8px;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 10px;
}
.rel-card .thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: 8px;
}
.rel-title {
  margin: 0;
  font-size: 16px;
}
.rel-title a {
  text-decoration: none;
  color: #111;
}
.rel-date {
  margin: 0;
  color: #888;
  font-size: 12px;
}

/* Container base, identico al sito "flat" */
.container {
  max-width: 1340px;
  margin: 0 auto;
  padding-inline: 20px;
}

/* Blog index – card più pulite e responsive */
.article-grid {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 980px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .article-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 14px;
  }
}

.grid-item {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  transition: transform 0.18s, box-shadow 0.25s;
}
.grid-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.featured-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.grid-item h2 {
  font-size: 18px;
  margin: 10px 12px 6px;
}
.grid-item h2 a {
  color: #111;
  text-decoration: none;
}
.grid-item .excerpt {
  font-size: 14px;
  color: #555;
  margin: 0 12px 10px;
}
.grid-item .card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8b8b8b;
  font-size: 12px;
  margin: 0 12px 12px;
}
.grid-item .card-meta .dot {
  opacity: 0.6;
}
.read-more {
  margin: 0 12px 12px;
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: #b3141a;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}
.post-date {
  display: none;
} /* sostituito da .card-meta */
