/* ==========================================================================
   families/books.css
   Schede dei volumi: copertina, dati editoriali, indice, estratti.
   Caricato da 4 pagine.
   ========================================================================== */

body.v2-editorial-book {
  background: var(--v2-canvas);
  color: var(--v2-ink);
}

.v2-book-cover {
  padding: var(--hero-pad-y) 1.5rem;
  --glb-section-pad-y: var(--hero-pad-y);
  min-height: var(--hero-min-h-media);
  align-content: center;
}

.v2-book-cover__inner {
  margin: 0 auto;
  display: grid;
  grid-template-columns: 285px minmax(0,1fr);
  gap: clamp(3rem,5vw,5.3rem);
  align-items: center;
}

.v2-book-cover__visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 32px 70px rgba(0,0,0,.35),0 0 0 1px rgba(255,255,255,.12);
}

.v2-book-cover__visual p {
  margin: .75rem 0 0;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.v2-book-cover__copy {
  min-width: 0;
}

.v2-book-cover__kicker {
  margin: 0 0 .75rem;
  color: var(--v2-gold-soft);
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.v2-book-cover h1 {
  margin: 0 auto .85rem !important;
  color: #fff !important;
  font-family: var(--v2-serif);
  font-weight: 600 !important;
  letter-spacing: -.027em;
  text-align: center;
  text-align-last: center;
}

.v2-book-cover__subtitle {
  margin: 0 0 1.25rem;
  color: rgba(255,255,255,.82);
}

.v2-book-cover__thesis {
  max-width: 720px;
  margin: 0 0 1.35rem;
  padding: .8rem 0 .8rem 1.1rem;
  border-left: 2px solid var(--v2-gold);
  color: #fff;
  font-family: var(--v2-serif);
  font-size: clamp(1.25rem,2vw,1.6rem);
  font-style: italic;
  line-height: 1.35;
}

.v2-book-cover__meta {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: .55rem;
  margin-bottom: 1.2rem;
}

.v2-book-cover__meta span {
  padding: .62rem .72rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 11px;
  background: rgba(255,255,255,.055);
  color: #fff;
  font-size: .77rem;
}

.v2-book-cover__meta strong {
  display: block;
  margin-bottom: .16rem;
  color: var(--v2-gold-soft);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.v2-book-cover__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 1rem;
}

.v2-book-cover__actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .72rem .95rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 11px;
  background: rgba(255,255,255,.07);
  color: #fff;
  text-decoration: none;
  font-size: .8rem;
  font-weight: 800;
}

.v2-book-cover__actions a.v2-book-primary {
  background: linear-gradient(180deg,#faf7f0,#ede3d2);
  border-color: rgba(255,255,255,.8);
  color: #102235;
}

.v2-book-cover__isbn {
  margin: 0;
}

body.v2-editorial-book #mpf-main {
  background: var(--v2-canvas);
}

.v2-editorial-book .sezione {
  max-width: 1040px;
  padding: clamp(3.8rem,6vw,5.8rem) 1.5rem;
}

.v2-editorial-book .sezione-sfondo {
  background: #fff;
  border-color: var(--v2-divider);
}

.v2-editorial-book .sezione h2 {
  padding: 0;
  border: 0;
  color: var(--v2-heading);
  font-family: var(--v2-serif);
  letter-spacing: -.018em;
}

.v2-editorial-book .quarta-testo {
  max-width: 780px;
  color: var(--v2-text);
  font-size: 1.02rem;
  line-height: 1.82;
}

.v2-editorial-book .quarta-testo p {
  margin-bottom: 1rem;
}

.v2-editorial-book .quarta-testo p:last-child {
  margin-bottom: 0;
}

.v2-editorial-book .v2-book-intro {
  position: relative;
}

.v2-editorial-book .v2-book-intro::before {
  content: "Tesi e destinatari";
  display: block;
  margin-bottom: .6rem;
  color: var(--v2-gold-text);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.v2-editorial-book .avviso-cartaceo {
  max-width: 780px;
  margin-top: 1.5rem;
  border: 1px solid var(--v2-border-strong);
  border-left: 0;
  border-radius: 15px;
  background: #f7f9fc;
}

.v2-editorial-book .avviso-cartaceo p {
  color: #526174;
}

.v2-editorial-book .v2-book-index {
  max-width: 1040px;
}

.v2-editorial-book .indice-grid {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.v2-editorial-book .capitolo-item {
  min-height: 84px;
  align-items: flex-start;
  padding: 1rem 1.05rem;
  background: #fff;
}

.v2-editorial-book .cap-num {
  min-width: 62px;
  color: var(--v2-gold-text);
  font-style: normal;
}

.v2-editorial-book .cap-titolo {
  color: #25384d;
  font-style: normal;
  line-height: 1.45;
}

.v2-editorial-book .indice-extra {
  gap: .45rem;
  margin-top: 1rem;
}

.v2-editorial-book .tag-extra {
  border-radius: 999px;
  background: #edf2f7;
}

.v2-editorial-book .storia-card {
  background: #fff;
}

.v2-editorial-book .storia-card h3 {
  font-family: var(--v2-serif);
}

.v2-editorial-book .autore-box {
  padding: 1.45rem;
  background: #fff;
}

.v2-editorial-book .autore-foto {
  width: 145px;
  border-radius: 16px;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.v2-editorial-book .autore-testo h3 {
  font-family: var(--v2-serif);
}

.v2-editorial-book .related-manuale .inner {
  max-width: 1040px;
}

.v2-editorial-book .manuale-store-preview-wrap {
  background: #eef3f7;
}

.v2-editorial-book .quarta-testo p,
.v2-editorial-book .autore-testo p,
.v2-editorial-book .legal-note {
  text-align: left;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-wrap: pretty;
}

.v2-editorial-book .cap-num {
  font-size: .75rem;
}

.v2-editorial-book .manuale-store-preview p,
.v2-editorial-book .book-store-lead {
  max-width: 78ch !important;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-wrap: pretty;
}

body.v2-editorial-book.root-special-page .avviso-cartaceo p {
  text-align: left;
  text-align-last: left;
  text-wrap: pretty;
}

.v2-editorial-book .v2-book-cover__copy :is(p,blockquote) {
  text-align: left;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.v2-editorial-book .avviso-cartaceo p,
.v2-editorial-book .manuale-cases-note,
.v2-editorial-book .related-label,
.v2-editorial-book .cta-box-text {
  text-align: left;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-wrap: pretty;
}

.v2-editorial-book .related-label {
  max-width: 78ch;
}

/* Approfondimenti correlati delle schede-libro (Educare, Manuale, La Scuola della Totalita'): etichetta
   centrata, colonne uguali e schede bianche con pulsante, uguali nelle tre pagine. */
.v2-editorial-book :is(.related-esm,.related-manuale,.related-totalita) .related-label {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  text-align-last: center;
}

.v2-editorial-book :is(.related-esm,.related-manuale,.related-totalita) .rel-grid {
  display: grid;
  gap: 1rem;
  margin-left: auto;
  margin-right: auto;
}

.v2-editorial-book .related-esm .rel-grid {
  grid-template-columns: repeat(2,minmax(0,1fr));
  max-width: 760px;
}

.v2-editorial-book :is(.related-manuale,.related-totalita) .rel-grid {
  grid-template-columns: repeat(3,minmax(0,1fr));
}

.v2-editorial-book :is(.related-esm,.related-manuale,.related-totalita) .rel-card {
  background: #fff;
  padding: 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.v2-editorial-book :is(.related-esm,.related-manuale,.related-totalita) .rel-card h3 {
  color: var(--blu-notte);
}

.v2-editorial-book :is(.related-esm,.related-manuale,.related-totalita) .rel-card p {
  color: #505a66;
  margin: 0 0 .65rem;
  flex: 1;
  width: 100%;
  text-align: left;
  text-align-last: left;
}

.v2-editorial-book :is(.related-esm,.related-manuale,.related-totalita) .rel-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: .62rem .95rem;
  border-radius: var(--r);
  background: var(--blu-accent);
  color: #fff;
  text-decoration: none;
  font-size: .86rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: background .2s ease,transform .2s ease;
}

.v2-editorial-book :is(.related-esm,.related-manuale,.related-totalita) .rel-card a:hover {
  background: var(--blu-notte);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .v2-editorial-book :is(.related-esm,.related-manuale,.related-totalita) .rel-grid {
    grid-template-columns: 1fr;
  }
}

.v2-book-cover__visual p,
.v2-book-cover__isbn {
  color: rgba(255,255,255,.68);
}

body.v2-editorial-book .v2-book-intro>h2,
body.v2-editorial-book .v2-book-intro::before {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

body.v2-editorial-book .quarta-testo,
body.v2-editorial-book .avviso-cartaceo {
  margin-left: auto;
  margin-right: auto;
}

body.v2-editorial-book :is(.v2-book-cover__kicker,.v2-book-intro::before) {
  font-size: .75rem !important;
}

body.v2-editorial-book-family {
  background: var(--v2-canvas);
  color: var(--v2-ink);
}

body.v2-editorial-book-family main {
  background: var(--v2-canvas);
}

body.v2-editorial-book-family :is(.section,.paper,.book-detail-prose-section) {
  color: var(--v2-text);
}

body.v2-editorial-book-family :is(.section,.paper,.book-detail-prose-section) h2 {
  color: var(--v2-heading);
  font-family: var(--v2-serif);
  letter-spacing: -.018em;
  text-wrap: balance;
}

body.v2-editorial-book-family :is(.section,.paper,.book-detail-prose-section) p {
  text-align: left;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-wrap: pretty;
}

body.v2-editorial-book-family a:not(.btn-store):not(.btn-w):not(.btn-o) {
  text-underline-offset: .16em;
}

body.v2-editorial-book-family .v2-book-cover {
  margin: 0;
}

body.v2-editorial-book-family .v2-book-cover__visual img {
  max-height: 430px;
  object-fit: contain;
  background: #fff;
}

body.v2-editorial-book-family .v2-book-cover__meta {
  grid-template-columns: repeat(4,minmax(0,1fr));
}

body.v2-editorial-book-family .v2-book-cover__meta span {
  line-height: 1.35;
}

body.v2-editorial-book-family .v2-book-cover__actions a {
  line-height: 1.25;
}

body.v2-editorial-book-family .v2-book-cover__summary {
  margin: .2rem 0 1.25rem;
  color: rgba(255,255,255,.83);
  text-wrap: pretty;
}

body.v2-editorial-book-family .v2-book-cover__note {
  margin: .15rem 0 .95rem;
  color: rgba(255,255,255,.72);
}

body.v2-editorial-book-family .book-detail-prose-section,
body.v2-editorial-book-family .legacy-book-reading,
body.v2-editorial-book-family .professione-use-panel,
body.v2-editorial-book-family .totalita-audience-panel {
  margin-inline: auto;
}

body.v2-editorial-book-family .book-store-preview {
  margin-inline: auto;
  border-radius: 18px;
}

body.v2-editorial-book-family .legacy-book-reading,
body.v2-editorial-book-family .professione-use-panel,
body.v2-editorial-book-family .totalita-audience-panel,
body.v2-editorial-book-family main .paper {
  border: 1px solid var(--v2-border);
  border-radius: 18px;
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow-card);
}

body.v2-editorial-book-family .related .inner {
  max-width: 1040px;
}

body.v2-editorial-book-family .related {
  background: var(--v2-surface-muted);
}

body.v2-editorial-book-family.page-book-detail .book-store-lead,
body.v2-editorial-book-family.page-book-legacy-detail .book-store-lead,
body.v2-editorial-book-family.page-book-legacy-detail .professione-section-lead {
  max-width: 78ch !important;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
}

body.v2-editorial-book-family :is(.professione-card-kicker,.totalita-card-kicker,.totalita-video-kicker) {
  color: var(--v2-gold-text);
}

body.v2-editorial-book-family :is(.professione-card-kicker,.totalita-card-kicker,.totalita-video-kicker,.v2-book-cover__note) {
  font-size: 12px !important;
}

body.v2-editorial-book-family.page-book-legacy-detail main .paper > p {
  max-width: 760px !important;
  margin-left: auto;
  margin-right: auto;
}

body.v2-editorial-book-family.page-book-detail .book-detail-prose > h2 {
  max-width: 760px !important;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

body.v2-editorial-book-family.page-book-detail .book-detail-prose > p {
  max-width: 760px !important;
  margin-left: auto;
  margin-right: auto;
}

body.page-book-legacy-detail .legacy-book-reading h2.legacy-book-section-label-heading {
  font-family: var(--font-titoli);
  font-size: 22px;
  line-height: 28.16px;
  font-weight: 700;
  color: var(--blu-notte);
  letter-spacing: normal;
  margin: 0 auto 12px !important;
  padding: 0;
  border: 0;
  text-wrap: wrap;
}

@media (max-width: 900px) {
  .v2-book-cover__inner {
    grid-template-columns: 230px minmax(0,1fr);
    gap: 2.4rem;
  }
  .v2-book-cover__meta,
body.v2-editorial-book-family .v2-book-cover__meta{
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  
}

@media (max-width: 680px) {
  .v2-book-cover {
    padding: var(--hero-pad-y) 1rem;
  }
  .v2-book-cover__inner {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .v2-book-cover__visual {
    max-width: 190px;
    margin: 0 auto;
  }
  .v2-book-cover__copy {
    text-align: center;
  }
  .v2-book-cover h1 {
    text-align: center;
  }
  .v2-book-cover__subtitle,
  .v2-book-cover__thesis {
    margin-left: auto;
    margin-right: auto;
  }
  .v2-book-cover__thesis {
    padding: .7rem 0;
    border-left: 0;
    border-top: 1px solid rgba(212,180,109,.45);
    border-bottom: 1px solid rgba(212,180,109,.25);
  }
  .v2-book-cover__actions {
    justify-content: center;
  }
  .v2-editorial-book .sezione {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .v2-editorial-book .indice-grid {
    grid-template-columns: 1fr;
  }
  .v2-editorial-book .autore-box {
    flex-direction: column;
  }
  .v2-editorial-book .autore-foto {
    width: 120px;
  }
  .v2-editorial-book .quarta-testo {
    text-align: left;
    text-align-last: left;
  }
  .v2-editorial-book .v2-book-cover__copy :is(.v2-book-cover__kicker,.v2-book-cover__subtitle,.v2-book-cover__isbn),
.v2-editorial-book .cta-box-text{
    text-align: center;
  }
  
  body.v2-editorial-book-family main .paper {
    border-radius: 15px;
  }
}

@media (max-width: 430px) {
  .v2-book-cover__meta {
    grid-template-columns: 1fr;
  }
  .v2-book-cover__actions a {
    width: 100%;
  }
}

/* Occhiello di "Dove acquistare": segue il titolo centrato. */
body.v2-editorial-book main :is(.book-store-kicker, .manuale-store-kicker):has(+ h2),
body.v2-editorial-book main .book-store-preview > .book-store-kicker {
  text-align: center;
  text-align-last: center;
}

/* R5.17 · Su telefono la tesi in copertina va a bandiera come il resto della prosa: niente giustificato in colonna stretta (proposta 3). */
@media (max-width: 720px) {
  .v2-editorial-book .v2-book-cover__copy blockquote {
    text-align: left;
    text-align-last: auto;
  }
}

/* R5.17 · Forma a pillola soltanto per ciò che si clicca (§ 3.6, proposta 5): parti aggiuntive del volume come testo semplice. */
.v2-editorial-book :is(#_r517_label, .tag-extra) {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--v2-text);
}

.v2-editorial-book :is(#_r517_label, .tag-extra)::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--oro, #d4b46d);
}

.v2-editorial-book :is(#_r517_label, .indice-extra) {
  column-gap: 1.1rem;
  row-gap: .35rem;
}

/* R5.17 · Un solo blocco di rimandi nelle schede libro (§ 3.8, proposta 9): le letture e gli approfondimenti
   che erano in tre blocchi separati chiudono, come collegamenti di testo, il blocco delle schede correlate. */
.related-links {
  margin: 1.4rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--v2-border, #dbe4ee);
  color: var(--v2-text, #435366);
  font-size: .95rem;
  line-height: 1.9;
  text-align: center;
  text-align-last: center;
  text-wrap: balance;
}

.related-links a {
  color: var(--blu-accent, #2c5080);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(44,80,128,.35);
  text-underline-offset: 3px;
}

/* R5.31 (D14): scheda tecnica, descrizione e nota ISBN escono dalla testata e stanno subito sotto, su fondo chiaro */
.v2-book-sheet__inner {
  max-width: 1040px;
  margin: 0 auto;
}

.v2-book-sheet .v2-book-cover__meta span {
  border-color: var(--v2-border);
  background: #fff;
  color: var(--v2-ink);
  box-shadow: var(--v2-shadow-card);
}

.v2-book-sheet .v2-book-cover__meta strong {
  color: var(--v2-gold-text);
}

body:is(.v2-editorial-book,.v2-editorial-book-family) .v2-book-sheet .v2-book-cover__summary {
  margin: 1.4rem 0 .8rem;
  color: var(--v2-text);
}

body:is(.v2-editorial-book,.v2-editorial-book-family) .v2-book-sheet :is(.v2-book-cover__note,.v2-book-cover__isbn) {
  margin: 0;
  color: var(--v2-muted);
}

/* R5.31: copertina entro l'altezza unica della fascia */
@media (min-width: 701px) {
  body:is(.v2-editorial-book,.v2-editorial-book-family) .v2-book-cover__visual img {
    width: auto;
    max-width: 100%;
    max-height: 300px;
    margin-inline: auto;
  }
}

/* R5.31: copertina su smartphone con lo stesso limite delle altre testate */
@media (max-width: 700px) {
  body:is(.v2-editorial-book,.v2-editorial-book-family) .v2-book-cover__visual img {
    width: auto;
    max-width: 100%;
    max-height: var(--hero-media-max-height-mobile,200px);
    margin-inline: auto;
  }
}
