/* =========================================================
   Manuel Bova — Sito ufficiale
   Style: Professional / Literary
   ========================================================= */

/* --- Reset & Base ---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #1E2832;
  --gold:    #B8965A;
  --gold-lt: #D4AF7A;
  --cream:   #FAFAF6;
  --cream-2: #F2EDE4;
  --white:   #FFFFFF;
  --text:    #1A1A1A;
  --muted:   #6B6560;
  --border:  #E0D8CC;
  --radius:  6px;
  --shadow:  0 4px 24px rgba(30,40,50,.08);
  --shadow-lg: 0 12px 40px rgba(30,40,50,.14);
  --ff-head: 'Playfair Display', Georgia, serif;
  --ff-body: 'Inter', system-ui, sans-serif;
  --nav-h:   68px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--ff-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }

/* --- Typography ------------------------------------------ */
h1,h2,h3,h4 { font-family: var(--ff-head); line-height: 1.2; }
h1 { font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }

/* --- Containers ------------------------------------------ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navbar ---------------------------------------------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(250,250,246,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.navbar.scrolled { box-shadow: var(--shadow); }

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--ff-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s;
  letter-spacing: .02em;
}
.nav-links a:hover { color: var(--navy); }

.btn-nav {
  background: var(--navy) !important;
  color: var(--white) !important;
  padding: 8px 20px !important;
  border-radius: 40px !important;
  font-size: .85rem !important;
  transition: background .2s !important;
}
.btn-nav:hover { background: var(--gold) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: .3s;
}

/* --- Buttons --------------------------------------------- */
.btn-primary {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 13px 28px;
  border-radius: 40px;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .03em;
  transition: background .2s, transform .15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--gold); transform: translateY(-1px); }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--navy);
  padding: 13px 28px;
  border-radius: 40px;
  font-size: .9rem;
  font-weight: 600;
  border: 2px solid var(--navy);
  transition: .2s;
}
.btn-secondary:hover { background: var(--navy); color: var(--white); }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--gold);
  padding: 10px 22px;
  border-radius: 40px;
  font-size: .85rem;
  font-weight: 600;
  border: 2px solid var(--gold);
  transition: .2s;
  letter-spacing: .02em;
}
.btn-outline:hover { background: var(--gold); color: var(--white); }

.btn-book {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  padding: 9px 22px;
  border-radius: 40px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .03em;
  transition: .2s;
  margin-top: 8px;
}
.btn-book:hover { background: var(--navy); }

/* --- Sections -------------------------------------------- */
.section {
  padding: 96px 0;
}
.section-alt {
  background: var(--cream-2);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-sub {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* --- Hero ------------------------------------------------ */
.hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 96px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.hero-title {
  color: var(--navy);
  margin-bottom: 28px;
  line-height: 1.05;
}

.hero-quote {
  font-family: var(--ff-head);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--muted);
  border-left: 3px solid var(--gold);
  padding-left: 20px;
  margin-bottom: 40px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  max-width: 480px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  aspect-ratio: 3/4;
  margin-left: auto;
}

.hero-image::before {
  content: '';
  position: absolute;
  inset: -16px -16px 16px 16px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  z-index: -1;
  opacity: .4;
}

/* --- Books ----------------------------------------------- */
.books-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
}

/* Card = libro fisico */
.book-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  transition: transform .25s ease;
}
.book-card:hover { transform: translateY(-6px); }

/* Copertina con proporzioni 2:3 e ombra libro */
.book-cover {
  aspect-ratio: 2 / 3;
  border-radius: 4px 8px 8px 4px;
  overflow: hidden;
  box-shadow:
    -3px 0 6px rgba(0,0,0,.15),
     4px 6px 20px rgba(0,0,0,.25),
     8px 10px 30px rgba(0,0,0,.12);
  position: relative;
  background: var(--cream-2);
  flex-shrink: 0;
}

/* Linea dorso libro */
.book-cover::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(to right, rgba(0,0,0,.18), rgba(0,0,0,.04));
  border-radius: 4px 0 0 4px;
  pointer-events: none;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.book-card:hover .book-cover img { transform: scale(1.03); }

/* Placeholder copertina mancante */
.book-cover-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #1E2832 0%, #2C4A5A 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  gap: 12px;
}
.book-cover-placeholder::before {
  content: '✦';
  font-size: 1.4rem;
  color: var(--gold);
  opacity: .6;
}
.book-cover-placeholder span {
  font-family: var(--ff-head);
  font-style: italic;
  font-size: .95rem;
  color: rgba(255,255,255,.65);
  text-align: center;
  line-height: 1.5;
}

/* Info sotto la copertina */
.book-info {
  padding: 16px 4px 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-publisher {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
  line-height: 1.4;
}

.book-info h3 {
  font-family: var(--ff-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.25;
}

.book-info p {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.6;
  /* Clamp a 3 righe */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: 12px;
}

.btn-book {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 8px 18px;
  border-radius: 40px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  transition: background .2s;
  align-self: flex-start;
}
.btn-book:hover { background: var(--gold); }

/* --- About ----------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: center;
}

.about-image img {
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.about-text .section-label { margin-bottom: 12px; }
.about-text h2 { margin-bottom: 24px; color: var(--navy); }

.about-text p {
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 1.02rem;
}

/* --- Events ---------------------------------------------- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.events-grid--4 {
  grid-template-columns: repeat(2, 1fr);
}

.event-card {
  background: var(--white);
  border-radius: 12px;
  padding: 36px 28px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .2s, box-shadow .2s;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.events-cta {
  text-align: center;
  margin-top: 48px;
}

.event-icon {
  font-size: 2rem;
  margin-bottom: 4px;
}

.event-card h3 { color: var(--navy); font-size: 1.25rem; }

.event-subtitle {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
}

.event-card p {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.65;
  flex: 1;
}

.event-features {
  list-style: none;
  margin: 4px 0 12px;
}
.event-features li {
  font-size: .85rem;
  color: var(--muted);
  padding: 3px 0;
  padding-left: 18px;
  position: relative;
}
.event-features li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: .75rem;
}

/* --- Agenda ---------------------------------------------- */
.agenda-list {
  max-width: 760px;
  margin: 0 auto;
}

.agenda-item {
  background: var(--white);
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  align-items: center;
  box-shadow: var(--shadow);
  transition: transform .15s;
}
.agenda-item:hover { transform: translateX(4px); }

.agenda-date {
  text-align: center;
}
.agenda-date .day {
  font-family: var(--ff-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.agenda-date .month {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
}

.agenda-info h4 { color: var(--navy); font-size: 1rem; margin-bottom: 4px; }
.agenda-info p  { font-size: .85rem; color: var(--muted); }

.agenda-badge {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--cream-2);
  color: var(--muted);
  white-space: nowrap;
}
.agenda-badge.presentazione { background: #EAF0FB; color: #2A5CAA; }
.agenda-badge.cena          { background: #FBF3EA; color: #A05A0A; }
.agenda-badge.quiz          { background: #EAF8F1; color: #1A7A4C; }
.agenda-badge.tesoro        { background: #F5EAF8; color: #7A2A9A; }

.agenda-empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 0;
  font-style: italic;
}

/* --- Social / Contact ------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-text h2 { color: var(--navy); margin-bottom: 16px; }
.contact-text p  { color: var(--muted); margin-bottom: 32px; }

.social-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .9rem;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--cream-2);
  border: 1px solid var(--border);
  transition: .2s;
}
.social-link:hover { background: var(--navy); color: var(--white); }

.social-link svg { width: 20px; height: 20px; flex-shrink: 0; }

/* --- Contact Form ---------------------------------------- */
.contact-form {
  background: var(--white);
  border-radius: 12px;
  padding: 36px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  font-family: var(--ff-body);
  font-size: .95rem;
  color: var(--text);
  transition: border-color .2s;
  outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--gold);
}

/* --- Footer ---------------------------------------------- */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,.5);
  padding: 36px 0;
  text-align: center;
  font-size: .85rem;
}
.footer a { color: var(--gold-lt); }

/* --- Book card actions ----------------------------------- */
.book-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-book-scopri {
  background: var(--navy);
}
.btn-book-scopri:hover { background: var(--gold); }

.btn-book-buy {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-book-buy:hover { background: var(--navy); color: var(--white); }

/* Copertina cliccabile (ha_pagina = true) */
a.book-cover {
  display: block;
  cursor: pointer;
}

/* ========================================================
   Pagina libro — libro.php
   ======================================================== */

/* --- Hero libro ------------------------------------------ */
.libro-hero {
  padding-top: calc(var(--nav-h) + 64px);
  padding-bottom: 80px;
  background: var(--cream);
}
.libro-hero--detective {
  background: linear-gradient(160deg, #fffef7 0%, #fdf8ed 100%);
}

.libro-breadcrumb {
  margin-bottom: 40px;
}
.libro-breadcrumb a {
  font-size: .85rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: .02em;
  transition: color .2s;
}
.libro-breadcrumb a:hover { color: var(--navy); }

.libro-hero-inner {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 72px;
  align-items: flex-start;
}

/* --- Copertina grande ------------------------------------ */
.libro-cover-col {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.libro-cover-wrap {
  aspect-ratio: 2/3;
  border-radius: 4px 10px 10px 4px;
  overflow: hidden;
  box-shadow:
    -4px 0 8px rgba(0,0,0,.18),
    6px 10px 32px rgba(0,0,0,.28),
    12px 18px 48px rgba(0,0,0,.14);
  position: relative;
  background: var(--cream-2);
}

.libro-cover-wrap::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 8px;
  background: linear-gradient(to right, rgba(0,0,0,.22), rgba(0,0,0,.04));
  border-radius: 4px 0 0 4px;
  pointer-events: none;
}

.libro-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.libro-cover-ebook {
  margin-top: 16px;
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
}
.libro-cover-ebook a {
  color: var(--gold);
  font-weight: 600;
  transition: color .2s;
}
.libro-cover-ebook a:hover { color: var(--navy); }

/* --- Meta colonna destra --------------------------------- */
.libro-meta-col {
  padding-top: 8px;
}

.libro-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.libro-title {
  font-family: var(--ff-head);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 12px;
}

.libro-autore {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 16px;
  letter-spacing: .02em;
}

.libro-dati {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}

.libro-desc-breve {
  font-size: 1.08rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 540px;
  font-family: var(--ff-head);
  font-style: italic;
}

/* --- Bottoni acquisto ------------------------------------ */
.libro-buy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.btn-buy-main {
  padding: 15px 36px;
  font-size: 1rem;
}

.libro-buy-alt {
  display: flex;
  gap: 10px;
}

.btn-buy-shop {
  display: inline-block;
  padding: 9px 22px;
  border: 1.5px solid var(--border);
  border-radius: 40px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  transition: .2s;
  letter-spacing: .02em;
}
.btn-buy-shop:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--cream-2);
}

/* --- Sezione descrizione --------------------------------- */
.libro-desc-section {
  padding: 80px 0;
}

.libro-desc-inner {
  max-width: 680px;
}

.libro-desc-inner .section-label {
  display: block;
  margin-bottom: 28px;
}

.libro-trama p {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 20px;
}
.libro-trama p:last-child { margin-bottom: 0; }

/* --- Come funziona (Detective Giusti) -------------------- */
.libro-come-funziona {
  background: var(--cream-2);
}

.come-funziona-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 8px;
}

.come-funziona-step {
  background: var(--white);
  border-radius: 12px;
  padding: 36px 28px;
  box-shadow: var(--shadow);
  position: relative;
}

.step-num {
  font-family: var(--ff-head);
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  opacity: .25;
  line-height: 1;
  margin-bottom: 12px;
}

.come-funziona-step h3 {
  color: var(--navy);
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.come-funziona-step p {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.65;
}

/* --- Gallery pagine interne ------------------------------ */
.libro-gallery-section {
  padding: 80px 0;
}

.libro-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 3/4;
  background: var(--cream-2);
}

.gallery-item {
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: block;
  width: 100%;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease, filter .35s ease;
}
.gallery-item:hover img {
  transform: scale(1.03);
  filter: brightness(.85);
}

.gallery-zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--white);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.gallery-item:hover .gallery-zoom { opacity: 1; }

/* --- Lightbox -------------------------------------------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 30, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lightbox-img {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 700px);
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
  background: rgba(255,255,255,.12);
  border: none;
  color: var(--white);
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }

/* --- Libri correlati ------------------------------------- */
.libri-correlati {
  background: var(--cream-2);
}

.correlati-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
}

.correlato-card {
  display: flex;
  flex-direction: column;
  transition: transform .25s ease;
  text-decoration: none;
}
.correlato-card:hover { transform: translateY(-6px); }

.correlato-cover {
  aspect-ratio: 2/3;
  border-radius: 4px 8px 8px 4px;
  overflow: hidden;
  box-shadow:
    -3px 0 6px rgba(0,0,0,.15),
    4px 6px 20px rgba(0,0,0,.25);
  position: relative;
  background: var(--cream);
  flex-shrink: 0;
}

.correlato-cover::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(to right, rgba(0,0,0,.18), rgba(0,0,0,.04));
  border-radius: 4px 0 0 4px;
  pointer-events: none;
}

.correlato-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.correlato-card:hover .correlato-cover img { transform: scale(1.03); }

.correlato-info {
  padding: 14px 4px 0;
}
.correlato-info h3 {
  font-size: 1rem;
  color: var(--navy);
  margin-top: 6px;
  line-height: 1.25;
}

/* --- Responsive libro ------------------------------------ */
@media (max-width: 900px) {
  .libro-hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .libro-cover-col {
    position: static;
    max-width: 280px;
    margin: 0 auto;
  }
  .come-funziona-grid { grid-template-columns: 1fr; }
  .libro-gallery       { grid-template-columns: repeat(2, 1fr); }
  .correlati-grid      { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .libro-gallery       { grid-template-columns: 1fr; }
  .correlati-grid      { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .libro-buy           { flex-direction: column; }
}

/* --- Responsive ------------------------------------------ */
@media (max-width: 1024px) {
  .books-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .hero-inner       { grid-template-columns: 1fr; gap: 48px; }
  .hero-image       { order: -1; }
  .hero-image img   { max-width: 320px; margin: 0 auto; aspect-ratio: 1/1; }
  .hero-image::before { display: none; }
  .books-grid       { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .about-grid       { grid-template-columns: 1fr; gap: 40px; }
  .about-image      { max-width: 360px; margin: 0 auto; }
  .events-grid,
  .events-grid--4   { grid-template-columns: 1fr; }
  .contact-grid     { grid-template-columns: 1fr; gap: 40px; }
  .agenda-item      { grid-template-columns: 60px 1fr; }
  .agenda-badge     { display: none; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .nav-links { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--cream); border-bottom: 1px solid var(--border); flex-direction: column; padding: 20px 24px; gap: 20px; }
  .nav-links.open { display: flex; }
  .btn-nav { align-self: flex-start; }
  .nav-toggle { display: flex; }
  .books-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .hero-cta { flex-direction: column; }
}
