/* ROSSO — Blog
   Coerente con base.css. Desktop default; override mobile in fondo. */

.nav-links a.is-active { color: var(--red); }
.nav-links a.is-active::after { right: 0; }

/* ============ HERO ============ */
.blog-hero {
  background: linear-gradient(135deg, #3D0810 0%, #7A0A1B 100%);
  color: var(--cream);
  padding: 48px 56px 56px;
}
.blog-hero-inner { max-width: 1180px; margin: 0 auto; }
.blog-hero .crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: rgba(245, 239, 230, 0.72);
  margin-bottom: 28px;
}
.blog-hero .crumbs a {
  color: rgba(245, 239, 230, 0.72);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.blog-hero .crumbs a:hover { color: #fff; }
.blog-hero .crumbs .sep { opacity: 0.5; }
.blog-hero .crumbs [aria-current] { color: #fff; }
.blog-hero h1 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0;
  color: #fff;
}
.blog-hero-sub {
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.5;
  color: rgba(245, 239, 230, 0.88);
  margin: 16px 0 0;
  max-width: 640px;
}

/* ============ BARRA CATEGORIE ============ */
.blog-catbar {
  border-bottom: 1px solid var(--line);
  background: var(--cream);
  padding: 18px 56px;
}
.blog-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 1180px;
  margin: 0 auto;
}

/* ============ PILL ============ */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--ink2);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pill:hover { border-color: var(--ink2); }
.pill.active { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.pill.solid { background: var(--red); border-color: var(--red); color: #fff; cursor: default; }
.pill.on-photo {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(20, 10, 12, 0.62);
  backdrop-filter: blur(6px);
  border-color: transparent;
  color: #fff;
  font-size: 12px;
  padding: 6px 12px;
  cursor: inherit;
}

/* ============ SECTIONS ============ */
.blog-section {
  padding: 44px 56px;
  max-width: 1180px;
  margin: 0 auto;
}
.blog-section + .blog-section { padding-top: 8px; }
.section-head {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.blog-empty p, .blog-noresult {
  font-size: 17px;
  color: var(--muted);
}
.blog-noresult { margin-top: 8px; }
.is-hidden { display: none !important; }

/* ============ FEATURED ============ */
.feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature:hover {
  box-shadow: 0 24px 50px -28px rgba(61, 8, 16, 0.35);
  transform: translateY(-2px);
}
.feature-media {
  min-height: 380px;
  background-size: cover;
  background-position: center;
}
.feature-media.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}
.feature-media.ph span {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.feature-body {
  padding: 44px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}
.feature-body h2 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
}
.feature-body .dek {
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}
.feature-link {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.feature-link .arrow { transition: transform 0.2s; }
.feature:hover .feature-link .arrow { transform: translateX(4px); }

/* ============ GRID CARD ============ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}
.post-card:hover {
  box-shadow: 0 20px 40px -26px rgba(61, 8, 16, 0.32);
  transform: translateY(-3px);
}
.post-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
}
.post-card-media.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.post-card-media.cream { background-color: var(--cream2); }
.post-card-media.plasma { background-color: var(--plasma); }
.post-card-media.red { background-color: var(--red); }
.post-card-media.ink { background-color: var(--ink); }
.post-card-media .ph-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
}
.post-card-media.cream .ph-title, .post-card-media.plasma .ph-title { color: var(--ink); }
.post-card-media.red .ph-title, .post-card-media.ink .ph-title { color: #FFF7EA; }
.post-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.post-card h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  transition: color 0.15s;
}
.post-card:hover h3 { color: var(--red); }
.post-card .dek {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  flex: 1;
}

/* ---- meta (data · tempo lettura · autore) ---- */
.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted2);
}
.meta .author { color: var(--ink2); font-weight: 600; }
.meta .dot { opacity: 0.5; }
.post-card .meta { margin-top: 2px; font-size: 12.5px; }

/* ====================================================== */
/* ============ ARTICOLO (POST) ========================= */
/* ====================================================== */
.post { padding: 0 0 8px; }
.post-header {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 8px;
}
.post-back {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 24px;
  transition: color 0.15s;
}
.post-back:hover { color: var(--red); }
.post-back .arrow { transition: transform 0.2s; }
.post-back:hover .arrow { transform: translateX(-3px); }
.post-cat {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.post-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(32px, 4.8vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0;
}
.post-dek {
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.5;
  color: var(--muted);
  margin: 18px 0 0;
}
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted2);
}
.post-meta .author { color: var(--ink2); font-weight: 600; }
.post-meta .sep { opacity: 0.5; }

.post-cover {
  max-width: 760px;
  margin: 32px auto 0;
  padding: 0 24px;
}
.post-cover img {
  width: 100%;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--cream2);
}
.post-cover figcaption {
  font-size: 13px;
  color: var(--muted2);
  text-align: center;
  margin-top: 12px;
}
.post-cover-placeholder {
  max-width: 760px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 40px;
}
.post-cover-placeholder.cream { background: var(--cream2); }
.post-cover-placeholder.plasma { background: var(--plasma); }
.post-cover-placeholder.red { background: var(--red); }
.post-cover-placeholder.ink { background: var(--ink); }
.post-cover-placeholder .placeholder {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 44px);
  text-align: center;
  letter-spacing: -0.03em;
}
.post-cover-placeholder.cream .placeholder,
.post-cover-placeholder.plasma .placeholder { color: var(--ink); }
.post-cover-placeholder.red .placeholder,
.post-cover-placeholder.ink .placeholder { color: #FFF7EA; }

/* ---- Prose (corpo articolo) ---- */
.prose {
  max-width: 760px;
  margin: 36px auto 0;
  padding: 0 24px;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.72;
  color: var(--ink2);
  letter-spacing: -0.003em;
}
.prose > * + * { margin-top: 1.25em; }
.prose p { margin: 0; }
.prose h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-top: 1.9em;
}
.prose h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-top: 1.6em;
}
.prose a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.5em; }
.prose img { border-radius: 10px; margin: 1.6em 0; }
.prose blockquote {
  border-left: 3px solid var(--red);
  padding: 4px 0 4px 24px;
  margin: 1.8em 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.5;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.prose blockquote cite { display: block; font-style: normal; font-family: var(--sans); font-size: 14px; color: var(--muted); margin-top: 10px; }

/* Immagini / gallery / embed (blocchi Editor.js) */
.prose figure { margin: 1.8em 0; }
.prose figure img { width: 100%; border-radius: 10px; display: block; }
.prose figure figcaption { font-family: var(--sans); font-size: 13px; color: var(--muted2); text-align: center; margin-top: 10px; }
.prose-img.bordo img { border: 1px solid var(--line2); }
.prose-img.larga { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.prose-img.larga img { border-radius: 0; }
.prose-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 1.8em 0; }
.prose-gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; aspect-ratio: 4/3; }
.prose-embed { margin: 1.8em 0; }
.prose-embed iframe { width: 100%; aspect-ratio: 16/9; border-radius: 10px; border: 0; }

/* Editor.js holder (area /admin) */
.editorjs-holder { border: 1px solid var(--line2); border-radius: 10px; background: #fff; padding: 8px 12px; min-height: 260px; }

/* ---- Footer articolo ---- */
.post-footer { max-width: 760px; margin: 52px auto 0; padding: 0 24px; }
.post-cta {
  background: var(--cream2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.post-cta .kicker { margin-bottom: 8px; }
.post-cta h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
  color: var(--ink);
}
.post-cta p { font-size: 14.5px; color: var(--muted); margin: 0; max-width: 38ch; }
.post-cta .btn { flex-shrink: 0; }
.post-back.foot { margin: 36px 0 0; }

/* ====================================================== */
/* ============ MOBILE (≤ 900px) ======================== */
/* ====================================================== */
@media (max-width: 900px) {
  .blog-hero { padding: 28px 18px 32px; }
  .blog-hero .crumbs { margin-bottom: 18px; }

  .blog-catbar { padding: 14px 0 14px 18px; }
  .blog-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-right: 18px;
  }
  .blog-filters::-webkit-scrollbar { display: none; }
  .pill { flex: 0 0 auto; }

  .blog-section { padding: 28px 18px; }

  .feature { grid-template-columns: 1fr; }
  .feature-media { min-height: 220px; aspect-ratio: 16/10; }
  .feature-body { padding: 26px; gap: 12px; }

  .post-grid { grid-template-columns: 1fr; gap: 22px; }

  .post-header { padding: 28px 18px 4px; }
  .post-cover { margin-top: 26px; padding: 0 18px; }
  .prose { font-size: 17px; padding: 0 20px; margin-top: 30px; }
  .prose h2 { font-size: 23px; }
  .post-footer { padding: 0 20px; }
  .post-cta { flex-direction: column; align-items: flex-start; padding: 24px; gap: 18px; }
  .post-cta .btn { width: 100%; }
}

@media (min-width: 720px) and (max-width: 1040px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ CTA STICKY ARTICOLO (in cima: testo + × sopra, bottone rosso pieno sotto) ============ */
.post-sticky-cta {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: linear-gradient(135deg, #3D0810 0%, #7A0A1B 100%);
  box-shadow: 0 14px 36px -16px rgba(61, 8, 16, 0.55);
  transform: translateY(-130%);
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1);
}
.post-sticky-cta.is-visible { transform: translateY(0); }
.psc-inner {
  max-width: 760px; margin: 0 auto;
  padding: 13px 24px 15px;
  display: flex; flex-direction: column; gap: 11px;
}
.psc-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.psc-text { font-size: 14.5px; line-height: 1.4; color: rgba(255,255,255,0.9); }
.psc-text strong { color: #fff; font-weight: 700; }
.psc-inner .btn { width: 100%; }
/* bottone bianco ad alto contrasto sulla barra rossa */
.psc-inner .btn.primary { background: #fff; color: var(--red-dark); }
.psc-inner .btn.primary:hover { background: var(--cream); }
.psc-close {
  background: transparent; border: 0; color: rgba(255,255,255,0.7);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; flex-shrink: 0;
}
.psc-close:hover { color: #fff; }
@media (max-width: 560px) {
  .psc-inner { padding: 10px 14px 12px; }
  .psc-text { font-size: 13.5px; }
}

/* Segnaposto senza copertina: cuore Rosso in filigrana (niente titolo duplicato) */
.ph-mark { width: 72px; height: auto; display: block; opacity: 0.3; }
.feature-media.ph .ph-mark { width: 100px; }
.post-cover-placeholder .ph-mark { width: 110px; }
.post-card-media.ph.red .ph-mark, .post-card-media.ph.ink .ph-mark,
.feature-media.ph.red .ph-mark, .feature-media.ph.ink .ph-mark,
.post-cover-placeholder.red .ph-mark, .post-cover-placeholder.ink .ph-mark {
  filter: brightness(0) invert(1); opacity: 0.45;
}
