/* =====================================================================
   Blog article — impaginazione strutturata "dossier editoriale"
   Namespace .bx-  (isolato dal resto del sito)
   Font: Instrument Serif (display) + Plus Jakarta Sans (testo)
   ===================================================================== */
.bx {
  --bx-ink: #17232e;
  --bx-soft: #5c6b78;
  --bx-navy: #0c4a6e;
  --bx-navy-deep: #082f45;
  --bx-gold: #bf912f;
  --bx-line: #e7e2d9;
  --bx-paper: #fbfaf7;
  --bx-card: #ffffff;
  --bx-sky: #0fbcf5;
  --bx-measure: 66ch;
  background: var(--bx-paper);
  color: var(--bx-ink);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ---------- HERO ---------- */
.bx-hero {
  position: relative;
  min-height: clamp(360px, 52vh, 560px);
  display: flex;
  align-items: flex-end;
  background-image: var(--bx-hero);
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
}
.bx-hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,32,49,.28) 0%, rgba(8,32,49,.55) 48%, rgba(6,24,38,.92) 100%),
    linear-gradient(90deg, rgba(8,32,49,.45), transparent 60%);
}
.bx-hero-inner {
  position: relative;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px 54px;
}
.bx-crumbs { font-size: .8rem; letter-spacing: .02em; margin-bottom: 22px; opacity: .9; }
.bx-crumbs a { color: #dbeafe; text-decoration: none; }
.bx-crumbs a:hover { color: #fff; text-decoration: underline; }
.bx-crumbs i { margin: 0 8px; opacity: .5; font-style: normal; }
.bx-kicker {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: #ffe6a8; padding: 5px 12px; border: 1px solid rgba(255,230,168,.4);
  border-radius: 100px; margin-bottom: 18px;
}
.bx-hero h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -.01em;
  margin: 0 0 20px;
  max-width: 20ch;
  text-shadow: 0 2px 30px rgba(0,0,0,.35);
}
.bx-standfirst {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.55; max-width: 60ch; margin: 0 0 22px;
  color: #eaf1f6; font-weight: 300;
}
.bx-hero-meta { display: flex; gap: 10px; align-items: center; font-size: .84rem; color: #cdd9e3; flex-wrap: wrap; }
.bx-hero-meta span:nth-child(2n) { opacity: .5; }
.bx-hero-meta time { color: #fff; font-weight: 600; }

/* ---------- LAYOUT ---------- */
.bx-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 40px 40px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.bx-main { min-width: 0; }

/* ---------- RAIL / INDICE ---------- */
.bx-rail { position: sticky; top: 28px; align-self: start; }
.bx-rail-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--bx-gold); margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--bx-line);
}
.bx-rail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bx-rail-list a {
  display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: baseline;
  padding: 8px 4px; font-size: .82rem; line-height: 1.35; color: var(--bx-soft);
  text-decoration: none; border-radius: 8px; transition: color .2s, background .2s;
}
.bx-rail-list a span { font-size: .68rem; font-weight: 700; color: #b9c2cb; letter-spacing: .04em; }
.bx-rail-list a:hover { color: var(--bx-navy); }
.bx-rail-list a.is-active { color: var(--bx-navy); font-weight: 600; }
.bx-rail-list a.is-active span { color: var(--bx-gold); }
.bx-rail-cta {
  margin-top: 22px; padding: 18px 16px; border-radius: 14px;
  background: linear-gradient(160deg, var(--bx-navy), var(--bx-navy-deep)); color: #e6f2fb;
}
.bx-rail-cta p { margin: 0 0 12px; font-size: .82rem; line-height: 1.4; font-weight: 600; }
.bx-rail-cta a {
  display: block; text-align: center; background: var(--bx-gold); color: #241a03;
  font-weight: 700; font-size: .8rem; padding: 9px 12px; border-radius: 9px; text-decoration: none;
  transition: transform .15s, filter .15s;
}
.bx-rail-cta a:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* ---------- RICH TEXT ---------- */
.bx-rt { font-size: 1.075rem; line-height: 1.78; color: #2c3945; }
.bx-rt p { margin: 0 0 1.15em; max-width: var(--bx-measure); }
.bx-rt p:last-child { margin-bottom: 0; }
.bx-rt strong { color: var(--bx-navy-deep); font-weight: 700; }
.bx-rt a { color: var(--bx-navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(12,74,110,.35); }
.bx-rt a:hover { text-decoration-color: var(--bx-navy); }
/* Marker inline: restano attaccati al testo anche quando la lista avvolge il float */
.bx-rt ul, .bx-rt ol { margin: 0 0 1.2em; padding: 0; list-style: none; max-width: var(--bx-measure); }
.bx-rt ul li, .bx-rt ol li { margin-bottom: .62em; line-height: 1.62; }
.bx-rt ul li::before {
  content: "\25C6"; color: var(--bx-gold); font-size: .58em;
  margin-right: .72em; vertical-align: 2px;
}
.bx-rt ol { counter-reset: bxli; }
.bx-rt ol li { counter-increment: bxli; }
.bx-rt ol li::before {
  content: counter(bxli) ".";
  color: var(--bx-gold); font-weight: 700; margin-right: .5em;
}

/* ---------- LEAD / APERTURA ---------- */
.bx-lead { margin-bottom: 56px; max-width: 68ch; }
.bx-lead > p:first-of-type { font-size: 1.22rem; line-height: 1.72; color: #26333f; }
.bx-lead > p:first-of-type::first-letter {
  float: left; font-family: 'Instrument Serif', Georgia, serif;
  font-size: 4.4rem; line-height: .74; padding: 6px 14px 0 0; color: var(--bx-navy);
}

/* ---------- SEZIONE TESTO (senza immagine) ---------- */
.bx-textsec { padding: 52px 0; border-top: 1px solid var(--bx-line); }

/* ---------- SPLIT (immagine FLOAT: testo a lato e sotto) ---------- */
.bx-split {
  padding: 52px 0;
  border-top: 1px solid var(--bx-line);
}
.bx-split::after { content: ""; display: block; clear: both; }

.bx-split-h {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 400;
  font-size: clamp(1.7rem, 2.5vw, 2.15rem); line-height: 1.12; letter-spacing: -.01em;
  color: var(--bx-navy-deep); margin: 0 0 24px; position: relative; padding-bottom: 16px;
}
.bx-split-h::after { content: ""; position: absolute; left: 0; bottom: 0; width: 46px; height: 3px; background: var(--bx-gold); border-radius: 2px; }

/* L'immagine fluttua: il testo la avvolge e prosegue sotto a piena larghezza */
.bx-plate {
  position: relative;
  float: left;
  width: 42%;
  max-width: 400px;
  margin: 4px 38px 22px 0;
}
.bx-split.is-flip .bx-plate { float: right; margin: 4px 0 22px 38px; }

.bx-plate-img {
  position: relative;
  aspect-ratio: 4 / 3;            /* proporzione SEMPRE corretta */
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 22px 48px -18px rgba(8,47,69,.45);
  background: #eef4f8;
}
.bx-plate-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bx-plate-img::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(160deg, rgba(15,188,245,.10), transparent 55%);
  mix-blend-mode: multiply;
}
.bx-plate-no {
  position: absolute; top: -16px; left: -12px; z-index: 2;
  font-family: 'Instrument Serif', Georgia, serif; font-size: 2.3rem; line-height: 1;
  color: var(--bx-gold); background: var(--bx-paper);
  padding: 4px 12px; border-radius: 10px;
}
.bx-split.is-flip .bx-plate-no { left: auto; right: -12px; }
.bx-cap { margin: 12px 2px 0; font-size: .78rem; font-style: italic; color: var(--bx-soft); line-height: 1.45; }

/* ---------- SEZIONI FULL (tabella / gallery / faq) ---------- */
.bx-sec-head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 26px; }
.bx-sec-no { font-family: 'Instrument Serif', Georgia, serif; font-size: 1.9rem; color: var(--bx-gold); line-height: 1; }
.bx-sec-head h2 {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 400;
  font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1.1; color: var(--bx-navy-deep); margin: 0;
}
.bx-tablewrap, .bx-gallerysec, .bx-faq { padding: 56px 0; border-top: 1px solid var(--bx-line); }

/* Tabella */
.bx-table { overflow-x: auto; }
.bx-table table { width: 100%; border-collapse: collapse; font-size: .92rem; margin-top: 8px; min-width: 520px; }
.bx-table thead { background: var(--bx-navy-deep); color: #eaf4fb; }
.bx-table th, .bx-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--bx-line); }
.bx-table th { font-weight: 600; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.bx-table tbody tr:nth-child(even) { background: #f5f8fa; }
.bx-table tbody tr:hover { background: #eef6fb; }

/* Gallery */
.bx-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 30px; }
.bx-gcard { display: block; position: relative; margin: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 5; box-shadow: 0 16px 34px -16px rgba(8,47,69,.4); text-decoration: none; }
.bx-gcard img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.bx-gcard:hover img { transform: scale(1.05); }
.bx-gcard:focus-visible { outline: 3px solid var(--bx-gold); outline-offset: 2px; }
.bx-gcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 16px 14px; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
  color: #fff; font-size: .82rem; font-weight: 600; line-height: 1.35;
  background: linear-gradient(180deg, transparent, rgba(6,24,38,.9));
}
.bx-gcaption-arrow {
  flex-shrink: 0; font-style: normal; color: var(--bx-gold); font-size: 1.05rem;
  transform: translateX(-4px); opacity: 0; transition: opacity .25s, transform .25s;
}
.bx-gcard:hover .bx-gcaption-arrow { opacity: 1; transform: translateX(0); }

/* FAQ */
.bx-qa { border-bottom: 1px solid var(--bx-line); }
.bx-qa summary {
  list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative;
  font-size: 1.08rem; font-weight: 600; color: var(--bx-navy-deep); line-height: 1.4;
}
.bx-qa summary::-webkit-details-marker { display: none; }
.bx-qa summary::after {
  content: "+"; position: absolute; right: 6px; top: 16px; font-size: 1.5rem; font-weight: 300;
  color: var(--bx-gold); transition: transform .25s;
}
.bx-qa[open] summary::after { transform: rotate(45deg); }
.bx-qa-body { padding: 0 44px 22px 0; font-size: 1.02rem; line-height: 1.72; color: #3a4753; }
.bx-qa-body p { margin: 0 0 .8em; }

/* ---------- CTA finale ---------- */
.bx-cta {
  margin-top: 20px; padding: 34px 38px; border-radius: 20px;
  background: linear-gradient(150deg, var(--bx-navy), var(--bx-navy-deep));
  color: #eaf4fb; display: flex; align-items: center; gap: 30px; justify-content: space-between; flex-wrap: wrap;
}
.bx-cta-eyebrow { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ffe6a8; margin-bottom: 8px; }
.bx-cta strong { display: block; font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 1.7rem; line-height: 1.15; margin-bottom: 8px; }
.bx-cta p { margin: 0; font-size: .95rem; color: #cfe0ec; max-width: 46ch; }
.bx-cta-btn { flex-shrink: 0; background: var(--bx-gold); color: #241a03; font-weight: 700; padding: 14px 26px; border-radius: 11px; text-decoration: none; transition: transform .15s, filter .15s; }
.bx-cta-btn:hover { filter: brightness(1.07); transform: translateY(-2px); }

/* ---------- Elementi specifici SETTORI (template bx) ---------- */
.bx-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.bx-hero-btn {
  display: inline-flex; align-items: center; padding: 12px 26px; border-radius: 11px;
  font-weight: 700; font-size: .92rem; text-decoration: none;
  background: var(--bx-gold); color: #241a03; transition: transform .15s, filter .15s;
}
.bx-hero-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.bx-hero-btn.is-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.45); }
.bx-hero-btn.is-ghost:hover { background: rgba(255,255,255,.16); }

.bx-benefits {
  margin-top: 24px; padding: 32px 34px; border-radius: 18px;
  background: #f4f9fc; border: 1px solid var(--bx-line);
}
.bx-benefits-eyebrow { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bx-gold); margin-bottom: 6px; }
.bx-benefits h2 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: clamp(1.5rem, 2.2vw, 1.95rem); color: var(--bx-navy-deep); margin: 0 0 20px; }
.bx-benefits ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.bx-benefits li { position: relative; padding: 14px 16px 14px 42px; background: #fff; border: 1px solid var(--bx-line); border-radius: 12px; font-size: .96rem; line-height: 1.45; color: #2c3945; }
.bx-benefits li::before { content: "\2713"; position: absolute; left: 16px; top: 13px; color: var(--bx-gold); font-weight: 700; }

.bx-sector-nav { margin-top: 30px; }
.bx-sector-nav a { font-weight: 700; color: var(--bx-navy); text-decoration: none; }
.bx-sector-nav a:hover { color: var(--bx-navy-deep); }

@media (max-width: 700px) { .bx-benefits ul { grid-template-columns: 1fr; } }

/* ---------- REVEAL soft ---------- */
.bx-split, .bx-tablewrap, .bx-textsec, .bx-gallerysec, .bx-faq, .bx-lead { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1); }
.bx-in { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) { .bx-split, .bx-tablewrap, .bx-textsec, .bx-gallerysec, .bx-faq, .bx-lead { opacity: 1; transform: none; } }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) {
  .bx-wrap { grid-template-columns: 1fr; gap: 0; padding: 40px 22px; }
  .bx-rail { display: none; }
  .bx-hero-inner { padding: 0 22px 40px; }
  .bx-split { padding: 40px 0; }
  .bx-plate,
  .bx-split.is-flip .bx-plate { float: none; width: 100%; max-width: none; margin: 0 0 22px; }
  .bx-plate-no { top: -14px; left: 10px; font-size: 2rem; }
  .bx-split.is-flip .bx-plate-no { right: auto; left: 10px; }
  .bx-gallery { grid-template-columns: 1fr; }
  .bx-gcard { aspect-ratio: 16 / 10; }
  .bx-cta { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
}
