/* ==========================================================================
   Porta Blu · sezione Blog (elenco /blog/ e articoli /blog/<slug>)
   Struttura ispirata alla pagina blog di cosmicarentals.com, rifatta con
   palette, Montserrat e componenti Porta Blu. Usa i token di porta-blu.css.
   Si animano solo transform e opacity.
   ========================================================================== */

.b-main { overflow: clip; }

/* -------------------------------------------------------- percorso -- */
.b-crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: var(--fs-small); color: var(--pb-grey); margin-bottom: 1.4rem; }
.b-crumbs a { color: inherit; text-decoration: none; }
.b-crumbs a:hover { color: var(--pb-blue); text-decoration: underline; text-underline-offset: 3px; }
.b-crumbs [aria-current] { color: var(--pb-navy); font-weight: 700; }
.b-crumbs--dark, .b-crumbs--dark [aria-current] { color: hsl(0 0% 100% / 0.85); }
.b-crumbs--dark a:hover { color: var(--pb-cyan); }

/* -------------------------------------------------- testata elenco -- */
.b-head {
  padding: calc(var(--nav-h) + clamp(3rem, 7vw, 6rem)) 0 clamp(2.5rem, 5vw, 4rem);
  text-align: center;
  background:
    radial-gradient(40% 60% at 12% 10%, hsl(196 100% 51% / 0.13), transparent 70%),
    radial-gradient(35% 55% at 90% 30%, hsl(183 98% 51% / 0.12), transparent 70%);
}
.b-head__in { display: grid; justify-items: center; }
.b-head .b-crumbs { justify-content: center; }
.b-head h1 {
  font-size: var(--fs-hero); font-weight: 900; line-height: 1.08; letter-spacing: var(--track-display);
  max-width: 20ch; margin: 0;
}
.b-head .lede { margin: 1.2rem auto 0; text-align: center; max-width: 52ch; }

/* firma con la foto di Filippo */
.b-by { display: inline-flex; align-items: center; gap: 0.6rem; font-size: var(--fs-small); color: var(--pb-grey); }
.b-by img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--pb-white), 0 0 0 4px var(--pb-blue); }
.b-by strong { color: var(--pb-navy); }
.b-head .b-by { margin-top: 1.8rem; }

/* ----------------------------------------------------------- schede -- */
.b-grid-wrap { padding: 0 0 var(--section); }
.b-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.75rem); }
.b-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--pb-white); border-radius: var(--r);
  box-shadow: 0 0 0 1px hsl(206 74% 15% / 0.07), var(--e1);
  transition: transform 0.5s var(--spring);
}
.b-card::after { /* ombra più alta al passaggio: si anima solo l'opacità */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: var(--e3); opacity: 0; transition: opacity 0.4s var(--spring);
}
.b-card:hover { transform: translateY(-6px); }
.b-card:hover::after { opacity: 1; }
.b-card:active { transform: translateY(-2px) scale(0.99); }
.b-card__img { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--pb-soft); }
.b-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--spring); }
.b-card__img::before { /* velo di colore del brand sulle foto */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(160deg, hsl(196 100% 51% / 0.22), transparent 55%);
  mix-blend-mode: multiply;
}
.b-card__img::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, hsl(206 74% 10% / 0.35), transparent 45%);
}
.b-card:hover .b-card__img img { transform: scale(1.05); }
.b-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem; padding: 1.3rem 1.4rem 1.5rem; flex: 1; }
.b-card__title { font-size: 1.12rem; font-weight: 800; line-height: 1.3; letter-spacing: -0.015em; margin: 0; }
.b-card__title a { color: var(--pb-navy); text-decoration: none; }
.b-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: var(--r); } /* tutta la scheda è cliccabile */
.b-card__title a:focus-visible { outline: none; }
.b-card__title a:focus-visible::after { outline: 3px solid var(--pb-blue); outline-offset: 3px; }
.b-card__text { font-size: 0.93rem; line-height: 1.6; color: var(--pb-grey); margin: 0; }
.b-card__more { margin-top: auto; padding-top: 0.3rem; display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 0.92rem; color: var(--pb-blue); }
.b-card__more svg { width: 18px; height: 18px; transition: transform 0.4s var(--spring); }
.b-card:hover .b-card__more svg { transform: translateX(4px); }

.b-pill {
  display: inline-block; padding: 0.28rem 0.75rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--pb-navy); background: var(--pb-soft); box-shadow: inset 0 0 0 1px hsl(196 100% 51% / 0.28);
}
.b-pill--dark { color: var(--pb-navy); background: var(--pb-grad); box-shadow: none; }

/* --------------------------------------------------- testata articolo -- */
.b-hero {
  position: relative; isolation: isolate; color: var(--pb-white);
  padding: calc(var(--nav-h) + clamp(3rem, 8vw, 6.5rem)) 0 clamp(2.6rem, 6vw, 4.5rem);
  text-align: center;
}
.b-hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.b-hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(135deg, hsl(196 100% 51% / 0.55), hsl(183 98% 51% / 0.25)),
    linear-gradient(to top, hsl(206 74% 10% / 0.9), hsl(206 74% 15% / 0.62));
}
.b-hero__in { display: grid; justify-items: center; }
.b-hero .b-crumbs { justify-content: center; }
.b-hero h1 {
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.3rem); font-weight: 900; line-height: 1.1;
  letter-spacing: var(--track-display); max-width: 22ch; margin: 1rem 0 0; text-wrap: balance;
}
.b-hero__meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem 1.4rem; margin: 1.6rem 0 0; font-size: var(--fs-small); color: hsl(0 0% 100% / 0.85); }
.b-hero .b-by { color: hsl(0 0% 100% / 0.85); }
.b-hero .b-by strong { color: var(--pb-white); }
.b-hero .b-by img { box-shadow: 0 0 0 2px var(--pb-white); }

/* ------------------------------------------------------------ testo -- */
.b-article { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.b-prose { max-width: 46rem; margin-inline: auto; }
.b-prose > p:first-of-type { font-size: var(--fs-lede); line-height: 1.65; font-weight: 600; }
.b-prose p, .b-prose li { line-height: 1.75; }
.b-prose p { margin: 0 0 1.15rem; }
.b-prose h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.2; margin: 2.8rem 0 1rem; }
.b-prose h3 { font-size: var(--fs-h3); font-weight: 800; line-height: 1.3; margin: 2rem 0 0.6rem; }
.b-prose ul, .b-prose ol { padding-left: 1.25rem; margin: 0 0 1.3rem; }
.b-prose li { margin: 0.35rem 0; }
.b-prose li::marker { color: var(--pb-blue); font-weight: 800; }
.b-prose a { color: var(--pb-navy); font-weight: 700; text-decoration: underline; text-decoration-color: var(--pb-blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.b-prose a:hover { color: var(--pb-blue); }
.b-prose strong { color: var(--pb-navy); font-weight: 700; }
.b-prose blockquote {
  margin: 1.6rem 0; padding: 1.1rem 1.4rem; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  border-left: 4px solid var(--pb-blue); background: var(--pb-soft); font-style: italic;
}
.b-tab { overflow-x: auto; margin: 1.6rem 0; border-radius: var(--r-sm); box-shadow: 0 0 0 1px hsl(206 74% 15% / 0.08), var(--e1); }
.b-tab table { width: 100%; border-collapse: collapse; font-size: 0.93rem; background: var(--pb-white); }
.b-tab th { text-align: left; padding: 0.75rem 1rem; background: var(--pb-navy); color: var(--pb-white); font-weight: 700; white-space: nowrap; }
.b-tab td { padding: 0.75rem 1rem; border-top: 1px solid hsl(206 74% 15% / 0.08); vertical-align: top; }
.b-tab tr:nth-child(even) td { background: hsl(198 100% 96% / 0.7); }

/* riquadri: in breve, approfondire, autore */
.b-summary, .b-more {
  position: relative; margin: 0 0 2.2rem; padding: 1.3rem 1.5rem; border-radius: var(--r);
  background:
    radial-gradient(60% 80% at 100% 0%, hsl(183 98% 51% / 0.16), transparent 70%),
    var(--pb-soft);
  box-shadow: inset 0 0 0 1px hsl(196 100% 51% / 0.22);
}
.b-summary__t, .b-more__t { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pb-blue); margin: 0 0 0.45rem !important; }
.b-summary p:last-child { margin: 0; }
.b-more { margin-top: 2.6rem; }
.b-more ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.b-more li { margin: 0; }
.b-more a { text-decoration: none; }
.b-more a::after { content: " →"; color: var(--pb-blue); }

.b-inline-cta { margin: 2.4rem 0 0; }
.b-inline-cta .btn--mega { width: min(100%, 37.5rem); }

.b-author {
  display: grid; grid-template-columns: 96px 1fr; gap: 1.3rem; align-items: start;
  margin-top: 2.6rem; padding: 1.5rem; border-radius: var(--r);
  background: var(--pb-white); box-shadow: 0 0 0 1px hsl(206 74% 15% / 0.07), var(--e2);
}
.b-author img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--pb-white), 0 0 0 5px var(--pb-blue); }
.b-author p { margin: 0 0 0.6rem; font-size: 0.95rem; color: var(--pb-grey); }
.b-author .b-author__name { font-size: 1.15rem; font-weight: 900; color: var(--pb-navy); margin-bottom: 0.3rem; }
.b-author__ig {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.55rem 1rem; border-radius: 999px;
  font-size: 0.88rem; font-weight: 700; text-decoration: none !important; color: var(--pb-white) !important;
  background: linear-gradient(90deg, #FEDA75, #FA7E1E, #D62976, #962FBF, #4F5BD5);
  transition: transform 0.4s var(--spring);
}
.b-author__ig svg { width: 18px; height: 18px; }
.b-author__ig:hover { transform: translateY(-2px); }
.b-author__ig:active { transform: scale(0.97); }
.b-author__ig:focus-visible { outline: 3px solid var(--pb-blue); outline-offset: 3px; }

/* domande frequenti: riusa la fisarmonica della home */
.b-faq { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.b-faq .faq__list { max-width: 50rem; margin-inline: auto; }

/* -------------------------------------------------------- invito -- */
.b-cta {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
  background:
    radial-gradient(45% 70% at 10% 20%, hsl(196 100% 51% / 0.28), transparent 70%),
    radial-gradient(40% 60% at 92% 80%, hsl(183 98% 51% / 0.26), transparent 70%),
    var(--pb-navy);
  color: var(--pb-white);
}
.b-cta__in { display: grid; justify-items: center; text-align: center; }
.b-cta .h2 { color: var(--pb-white); max-width: 20ch; margin: 0; font-weight: 900; letter-spacing: var(--track-display); }
.b-cta .dot { color: var(--pb-cyan); }
.b-cta .lede { color: hsl(0 0% 100% / 0.82); margin: 1rem auto 2rem; text-align: center; }
.b-cta .btn--mega { width: min(100%, 37.5rem); }

/* ------------------------------------------------ continua a leggere -- */
.b-next { padding: clamp(3.5rem, 7vw, 6rem) 0 var(--section); }
.b-next__t { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); font-weight: 900; letter-spacing: -0.02em; text-align: center; margin: 0 0 2rem; }

/* ------------------------------------------------------------ misure -- */
@media (max-width: 1000px) {
  .b-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-grid--3 > :nth-child(3) { display: none; }
}
@media (max-width: 640px) {
  .b-grid { grid-template-columns: 1fr; }
  .b-grid--3 > :nth-child(3) { display: flex; }
  .b-head { text-align: left; }
  .b-head__in { justify-items: start; }
  .b-head .b-crumbs { justify-content: flex-start; }
  .b-head .lede { text-align: left; margin-left: 0; }
  .b-hero { text-align: left; }
  .b-hero__in { justify-items: start; }
  .b-hero .b-crumbs, .b-hero__meta { justify-content: flex-start; }
  .b-author { grid-template-columns: 1fr; }
  .b-summary, .b-more, .b-author { padding: 1.1rem 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .b-card, .b-card::after, .b-card__img img, .b-card__more svg, .b-author__ig { transition: none; }
  .b-card:hover, .b-card:hover .b-card__img img { transform: none; }
}
