/* =========================================================
   SINGLE POST — CSS COMPLETO (stile VPS/Blog)
   Namespace: .vh-post
   File: assets/css/single-post.css
   ========================================================= */

html, body{
  background:#070A12;
  overflow-x:hidden;
}

:root{
  --vh-btn-pad-y: 10px;
  --vh-btn-pad-x: 14px;
  --vh-btn-radius: 12px;
  --vh-btn-bg: rgba(11,54,198,.18);
  --vh-btn-bg-hover: rgba(11,54,198,.24);
  --vh-btn-border: rgba(11,54,198,.26);
  --vh-btn-text: rgba(255,255,255,.92);

  --vh-card-bg: rgba(255,255,255,.04);
  --vh-card-border: rgba(255,255,255,.08);
  --vh-card-shadow: 0 22px 60px rgba(0,0,0,.35);

  --vh-wrap-max: 1180px;
  --vh-wrap-pad: 18px;
}

.vh-post{
  position: relative;
  color:#fff;
  background:
    radial-gradient(900px 480px at 20% 10%, rgba(48, 86, 255, .25), transparent 60%),
    radial-gradient(700px 420px at 80% 30%, rgba(11, 54, 198, .22), transparent 60%),
    radial-gradient(900px 600px at 50% 90%, rgba(0,0,0,.75), transparent 60%),
    linear-gradient(#070A12, #05060C);
}

.vh-post::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events:none;
  z-index: 0;
  opacity: .55;
  background-image: url("../img/home/clouds.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

.vh-post > *{ position: relative; z-index: 1; }

.vh-post .vh-wrap{
  width: 100%;
  max-width: var(--vh-wrap-max);
  margin: 0 auto;
  padding-left: var(--vh-wrap-pad);
  padding-right: var(--vh-wrap-pad);
}

/* reset wrapper theme */
.vh-post,
.vh-post#content,
#content.vh-post{
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.vh-post .site-content,
.vh-post .content-area,
.vh-post #primary,
.vh-post .site-main{
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Buttons */
.vh-post .vh-btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color: var(--vh-btn-text);
  text-decoration:none;
  font-weight:500;
  font-size:14px;
  line-height: 1;
  padding: var(--vh-btn-pad-y) var(--vh-btn-pad-x);
  border-radius: var(--vh-btn-radius);
  background: var(--vh-btn-bg);
  border: 1px solid var(--vh-btn-border);
  width: fit-content;
  white-space: nowrap;
}
.vh-post .vh-btn--primary{
  background: var(--vh-btn-bg);
  border: 1px solid var(--vh-btn-border);
  box-shadow:none;
}
.vh-post .vh-btn:hover{ background: var(--vh-btn-bg-hover); }
.vh-post .vh-arrow{
  width: 10px;
  height: 10px;
  display:inline-block;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

/* Kicker */
.vh-post .vh-kicker{
  display:inline-block;
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.62);
  font-weight: 800;
}

.vh-post .vh-section{ padding: 28px 0 30px; }
.vh-post .vh-section__head{
  text-align:center;
  margin: 0 auto 22px;
  max-width: 920px;
}
.vh-post .vh-section__title{
  font-size: clamp(26px, 3.2vw, 40px);
  margin: 0 0 10px;
  letter-spacing: -0.6px;
  font-weight: 850;
}
.vh-post .vh-section__subtitle{
  margin: 0;
  color: rgba(255,255,255,.72);
  line-height: 1.6;
}

/* Card */
.vh-post .vh-card{
  border-radius: 18px;
  background: var(--vh-card-bg);
  border: 1px solid var(--vh-card-border);
  box-shadow: var(--vh-card-shadow);
  overflow:hidden;
  backdrop-filter: blur(6px);
}

/* HERO */
.vh-post .vh-hero{ padding-top: 100px; }
@media (max-width: 1024px){ .vh-post .vh-hero{ padding-top: 30px; } }

.vh-post .vh-post-hero__inner{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 18px;
  align-items:center;
}

.vh-post .vh-post-hero__title{
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: -0.8px;
  font-weight: 900;
}

.vh-post .vh-post-hero__submeta{
  display:flex;
  flex-wrap: wrap;
  align-items:center;
  gap: 10px;
  color: rgba(255,255,255,.70);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.vh-post .vh-dot{
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
}
.vh-post .vh-post-hero__cat{
  color: rgba(255,255,255,.86);
  text-decoration: none;
}
.vh-post .vh-post-hero__cat:hover{ color:#fff; }

.vh-post .vh-post-hero__cta{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}

.vh-post .vh-post-hero__art{
  width: 100%;
  border-radius: 18px;
  overflow:hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  justify-self: end;
  max-width: 560px;
}
.vh-post .vh-post-hero__art img{
  width:100%;
  height:auto;
  display:block;
}
.vh-post .vh-post-hero__art--fallback{
  aspect-ratio: 16/10;
  background:
    radial-gradient(450px 180px at 20% 20%, rgba(11,54,198,.25), transparent 60%),
    linear-gradient(rgba(255,255,255,.03), rgba(0,0,0,.20));
}
/* =========================================================
   PROSE — TABLES + QUOTES (ADDON)
   Target: contenuto articolo dentro .vh-prose
   ========================================================= */

/* --- Citazioni / Quote (rifinito) --- */
.vh-post .vh-prose blockquote{
  margin: 16px 0;
  padding: 14px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.80);
  position: relative;
}
.vh-post .vh-prose blockquote p:last-child{ margin-bottom: 0; }

/* firma fonte (WordPress spesso usa <cite>) */
.vh-post .vh-prose blockquote cite{
  display:block;
  margin-top: 10px;
  font-style: normal;
  font-weight: 900;
  font-size: 12.5px;
  letter-spacing: .2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.62);
}

/* quote inline */
.vh-post .vh-prose q{
  quotes: "“" "”" "‘" "’";
  color: rgba(255,255,255,.88);
}

/* --- Tabelle (WP editor + HTML) --- */

/* wrapper per scroll orizzontale su mobile */
.vh-post .vh-prose table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.55;

  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  overflow: hidden; /* mantiene gli angoli */
  background: rgba(255,255,255,.02);
}

/* intestazioni */
.vh-post .vh-prose thead th{
  text-align: left;
  font-weight: 900;
  letter-spacing: .2px;
  text-transform: uppercase;
  font-size: 12px;

  color: rgba(255,255,255,.88);
  background: rgba(11,54,198,.16);
  border-bottom: 1px solid rgba(255,255,255,.10);
}

/* celle */
.vh-post .vh-prose th,
.vh-post .vh-prose td{
  padding: 12px 12px;
  vertical-align: top;
  border-right: 1px solid rgba(255,255,255,.08);
}

/* ultima colonna senza bordo destro */
.vh-post .vh-prose tr > *:last-child{
  border-right: none;
}

/* righe body */
.vh-post .vh-prose tbody td{
  color: rgba(255,255,255,.78);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* ultima riga senza bordo bottom */
.vh-post .vh-prose tbody tr:last-child td{
  border-bottom: none;
}

/* zebra soft */
.vh-post .vh-prose tbody tr:nth-child(even){
  background: rgba(255,255,255,.02);
}

/* caption (se presente) */
.vh-post .vh-prose table caption{
  caption-side: bottom;
  padding-top: 10px;
  font-size: 13px;
  color: rgba(255,255,255,.62);
}

/* gestione tabelle larghe su schermi piccoli */
@media (max-width: 768px){
  .vh-post .vh-prose table{
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .vh-post .vh-prose th,
  .vh-post .vh-prose td{
    white-space: nowrap; /* evita “impasti” */
  }
}

/* WP Gutenberg: blocco tabella wrapper */
.vh-post .vh-prose .wp-block-table{
  margin: 16px 0;
}
.vh-post .vh-prose .wp-block-table table{
  margin: 0;
}

/* se Gutenberg usa "has-fixed-layout" */
.vh-post .vh-prose .wp-block-table.is-style-stripes tbody tr:nth-child(odd){
  background: rgba(255,255,255,.02);
}

/* GRID body */
.vh-post .vh-post-grid{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  align-items: start;
}

/* prose container */
.vh-post .vh-post-content{
  padding: 0;
}
.vh-post .vh-post-content__inner{
  padding: 18px 18px 14px;
}

/* simple prose */
.vh-post .vh-prose{
  color: rgba(255,255,255,.82);
  line-height: 1.85;
  font-size: 15.5px;
}
.vh-post .vh-prose p{ margin: 0 0 14px; }
.vh-post .vh-prose a{
  color: rgba(255,255,255,.92);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.vh-post .vh-prose a:hover{ color:#fff; }

.vh-post .vh-prose h2,
.vh-post .vh-prose h3{
  color: rgba(255,255,255,.95);
  letter-spacing: -0.4px;
  line-height: 1.2;
  margin: 20px 0 10px;
  font-weight: 900;
}
.vh-post .vh-prose h2{ font-size: 22px; }
.vh-post .vh-prose h3{ font-size: 18px; opacity: .95; }

.vh-post .vh-prose ul,
.vh-post .vh-prose ol{
  margin: 0 0 14px 18px;
}
.vh-post .vh-prose li{ margin: 0 0 8px; }

.vh-post .vh-prose blockquote{
  margin: 16px 0;
  padding: 14px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.78);
}

/* images inside content */
.vh-post .vh-prose img{
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
}

/* footer in content */
.vh-post .vh-post-footer{
  padding: 0 18px 18px;
  display:flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.vh-post .vh-post-tags{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 14px;
}

.vh-post .vh-chip{
  display:inline-flex;
  align-items:center;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration:none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.vh-post .vh-chip:hover{
  background: rgba(11,54,198,.18);
  border-color: rgba(11,54,198,.26);
  color: rgba(255,255,255,.92);
}

/* prev next */
.vh-post .vh-post-nav{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.vh-post .vh-post-nav a{
  color: rgba(255,255,255,.86);
  text-decoration:none;
  font-weight: 900;
}
.vh-post .vh-post-nav a:hover{ color:#fff; }

/* sidebar */
.vh-post .vh-post-side{
  display:flex;
  flex-direction: column;
  gap: 16px;
    position: sticky;
  top: 80px;
  align-self: start; /* importante in grid */
}


.vh-post .vh-post-toc{
  padding: 14px;
}
.vh-post .vh-post-toc__head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.vh-post .vh-post-toc__toggle{
  appearance:none;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.82);
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
}
.vh-post .vh-post-toc__toggle:hover{
  background: rgba(11,54,198,.18);
  border-color: rgba(11,54,198,.26);
  color: rgba(255,255,255,.92);
}

.vh-post .vh-post-toc__ul{
  list-style:none;
  margin: 0;
  padding: 0;
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.vh-post .vh-post-toc__li a{
  color: rgba(255,255,255,.78);
  text-decoration:none;
  font-weight: 800;
  font-size: 13.5px;
  line-height: 1.3;
}
.vh-post .vh-post-toc__li a:hover{ color:#fff; }
.vh-post .vh-post-toc__li.is-sub{ padding-left: 12px; opacity: .92; }
.vh-post .vh-post-toc__li.is-sub a{ font-weight: 700; }

.vh-post .vh-post-cta{
  padding: 14px;
}
.vh-post .vh-card__title{
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.4px;
}
.vh-post .vh-post-cta__text{
  margin: 0 0 12px;
  color: rgba(255,255,255,.74);
  line-height: 1.7;
  font-size: 14.5px;
}

/* related */
.vh-post .vh-post-related{
  margin-top: 24px;
}
.vh-post .vh-post-related__grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* reuse blog post card bits */
.vh-post .vh-blog-post{
  display:flex;
  flex-direction: column;
  min-width: 0;
}
.vh-post .vh-blog-post__thumb{
  display:block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow:hidden;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
}
.vh-post .vh-blog-post__thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.vh-post .vh-blog-post__thumb--fallback{
  width: 100%;
  height: 100%;
  background:
    radial-gradient(450px 180px at 20% 20%, rgba(11,54,198,.25), transparent 60%),
    linear-gradient(rgba(255,255,255,.03), rgba(0,0,0,.20));
}
.vh-post .vh-blog-post__body{
  padding: 14px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.vh-post .vh-blog-post__meta{
  color: rgba(255,255,255,.62);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .2px;
  text-transform: uppercase;
}
.vh-post .vh-blog-post__title{
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.4px;
  line-height: 1.2;
}
.vh-post .vh-blog-post__title a{
  color: rgba(255,255,255,.92);
  text-decoration:none;
}
.vh-post .vh-blog-post__title a:hover{ color:#fff; }
.vh-post .vh-blog-post__excerpt{
  margin: 0;
  color: rgba(255,255,255,.74);
  line-height: 1.7;
  font-size: 14.5px;
}
.vh-post .vh-blog-post__actions{ margin-top:auto; display:flex; }

/* responsive: tutto centrato */
@media (max-width: 1024px){
  .vh-post .vh-post-hero__inner{
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .vh-post .vh-post-hero__art{
    justify-self: center;
    margin: 0 auto;
    max-width: 520px;
  }
  .vh-post .vh-post-hero__meta{
    text-align:center;
  }
  .vh-post .vh-post-hero__submeta{
    justify-content:center;
  }
  .vh-post .vh-post-hero__cta{
    justify-content:center;
  }
  .vh-post .vh-btn{
    width: 100%;
    justify-content:center;
  }

  .vh-post .vh-post-grid{
    grid-template-columns: 1fr;
  }
  .vh-post .vh-post-side{
    order: 2;
  }
  .vh-post .vh-post-related__grid{
    grid-template-columns: 1fr;
  }
  .vh-post .vh-blog-post__actions{
    justify-content:center;
  }
  .vh-post .vh-post-tags{
    justify-content:center;
  }
  .vh-post .vh-post-nav{
    justify-content:center;
  }
}

@media (max-width: 520px){
  .vh-post::before{
    background-position: center top;
    background-size: cover;
  }
}
