/**
 * Pagina Ebook Gratuiti — strato CSS aggiuntivo, allineato allo
 * screenshot di riferimento. Riusa resources.css (hero, sezione goal,
 * FAQ, testimonianze) e contact.css (foglie decorative, titoli con
 * sottolineatura) come base del design system.
 */

.bv-ebooks-wrap { --bv-cs-section-gap: 88px; }
.bv-ebooks-wrap > section { margin-top: var(--bv-cs-section-gap); }
.bv-ebooks-wrap > section:first-child { margin-top: 0; }
/* Respiro extra intorno a Mini Corso → Scegli la risorsa → Cosa
   troverai: ~24px in più rispetto allo stacco standard tra le altre
   sezioni, per staccarle meglio visivamente. */
.bv-ebooks-wrap > .bv-ebooks-categories,
.bv-ebooks-wrap > .bv-ebooks-whats-inside { margin-top: calc(var(--bv-cs-section-gap) + 24px); }
@media (max-width: 700px) { .bv-ebooks-wrap { --bv-cs-section-gap: 56px; } }

/* Titoli centrati con piccola barra verde (Ebook, Categorie, Cosa
   troverai) — stessa regola già introdotta per la pagina Contatti,
   qui riproposta perché .bv-ebooks-wrap è uno scope diverso. */
.bv-ebooks-wrap .bv-res-section-title { position: relative; padding-bottom: .85rem; margin-bottom: 2rem; }
.bv-ebooks-wrap .bv-res-section-title::after {
	content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
	width: 46px; height: 3px; border-radius: 2px; background: var(--bv-res-green, #2d6a4f);
}
/* Titoli allineati a sinistra (Mini Corso, Perché gratuiti, colonne
   Testimonianze/FAQ): niente sottolineatura, la gerarchia la dà l'eyebrow sopra. */
.bv-ebooks-title-left::after,
.bv-ebooks-mini-corso__text .bv-res-section-title::after,
.bv-ebooks-why-free__text .bv-res-section-title::after,
.bv-ebooks-tf__col .bv-res-section-title::after { display: none; }
.bv-ebooks-mini-corso__text .bv-res-section-title,
.bv-ebooks-why-free__text .bv-res-section-title,
.bv-ebooks-tf__col .bv-res-section-title { text-align: left; margin-bottom: .5rem; padding-bottom: 0; }

/* ── Hero: micro-proof in riga orizzontale ──────────────────────────────── */
.bv-ebooks-hero__micropoints {
	list-style: none; margin: 1.75rem 0 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: 1.5rem 1.75rem;
}
.bv-ebooks-hero__micropoints li {
	display: flex; align-items: center; gap: .5rem;
	font-size: .8125rem; font-weight: 700; color: var(--bv-res-text, #1a1a2e);
}
.bv-ebooks-hero__micropoints li span {
	display: flex; align-items: center; justify-content: center; flex-shrink: 0;
	width: 30px; height: 30px; border-radius: 50%;
	background: var(--bv-res-green-light, #EDF6F0); color: var(--bv-res-green, #2d6a4f);
}
.bv-ebooks-hero__badge {
	display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .875rem;
	background: var(--bv-res-green-light, #EDF6F0); color: var(--bv-res-green, #2d6a4f);
	font-size: .75rem; font-weight: 800; letter-spacing: .02em;
	padding: .4rem 1rem; border-radius: 999px;
}
.bv-ebooks-hero__badge span { display: flex; }
.bv-ebooks-hero__subtitle { font-size: 1.0625rem; font-weight: 700; color: var(--bv-res-green, #2d6a4f); margin: 0 0 1rem; }
.bv-ebooks-hero__content--reversed { direction: rtl; }
.bv-ebooks-hero__content--reversed > * { direction: ltr; }
.bv-ebooks-hero__media { position: relative; }
/* Il selettore base .bv-res-hero__media img è già scale(1.06): qui lo
   portiamo più su per l'ulteriore ingrandimento richiesto (l'immagine
   dei libri è l'elemento visivo principale della pagina). */
.bv-ebooks-hero__media img { transform: scale(1.13); }
@media (max-width: 900px) { .bv-ebooks-hero__media img { transform: scale(1.06); } }

/* ── Fascia fiducia sottile (tra Hero e "I nostri ebook") ─────────────────── */
.bv-ebooks-trust-bar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
	gap: .5rem 2rem; padding: 1rem 1.5rem; margin: 0 0 var(--bv-cs-section-gap);
	background: var(--bv-res-green-light, #EDF6F0); border-radius: 12px;
	font-size: .8125rem; font-weight: 700; color: var(--bv-res-text, #1a1a2e);
}
.bv-ebooks-trust-bar__item { display: inline-flex; align-items: center; gap: .4rem; }
.bv-ebooks-trust-bar__item span { display: flex; color: var(--bv-res-green, #2d6a4f); }
@media (max-width: 700px) { .bv-ebooks-trust-bar { gap: .5rem 1.25rem; padding: .875rem 1.25rem; } }
.bv-ebooks-hero__slide { display: none; }
.bv-ebooks-hero__slide.is-active { display: block; animation: bv-eb-fade .5s ease; }
@keyframes bv-eb-fade { from { opacity: 0; } to { opacity: 1; } }

/* ── Griglia Ebook ──────────────────────────────────────────────────────── */
.bv-ebooks-grid-section { text-align: center; }
.bv-ebooks-grid-section .bv-res-goals__subtitle { margin: -1.5rem 0 2rem; }
.bv-ebooks-grid {
	display: grid;
	grid-template-columns: repeat(var(--bv-eb-desktop, 3), 1fr);
	gap: 1.5rem; text-align: left;
}
@media (max-width: 1024px) { .bv-ebooks-grid { grid-template-columns: repeat(var(--bv-eb-tablet, 2), 1fr); } }
@media (max-width: 640px) { .bv-ebooks-grid { grid-template-columns: repeat(var(--bv-eb-mobile, 1), 1fr); } }
/* Le card riusano integralmente .bv-res-resource-card (Risorse
   Gratuite): stesso componente, zero CSS duplicato. flex:0 0 270px
   viene ignorato dentro un contenitore grid, quindi qui si adattano
   naturalmente alla larghezza di colonna. */
.bv-ebooks-grid .bv-res-resource-card { width: 100%; }
/* Pulsante più deciso rispetto allo stile "sottile" di base: verde
   pieno, più alto, con freccia che si anima al passaggio del mouse. */
.bv-ebooks-grid .bv-res-resource-card__btn {
	display: flex; width: 100%; background: var(--bv-res-green, #2d6a4f); color: #fff;
	padding: .85rem 1rem; font-size: .8125rem; font-weight: 800;
}
.bv-ebooks-grid .bv-res-resource-card__btn svg { transition: transform .25s ease; }
.bv-ebooks-grid .bv-res-resource-card__btn:hover { background: #245842; transform: none; }
.bv-ebooks-grid .bv-res-resource-card__btn:hover svg { transform: translateX(3px); }

/* ── Mini Corso ─────────────────────────────────────────────────────────── */
.bv-ebooks-mini-corso { border-radius: 24px; padding: 3rem; }
.bv-ebooks-mini-corso--chiaro { background: var(--bv-res-green-light, #EDF6F0); }
.bv-ebooks-mini-corso--verde { background: var(--bv-res-green-light, #EDF6F0); }
/* Il badge eyebrow è verde-chiaro-su-bianco di serie: su uno sfondo
   già verde chiaro si mimetizzerebbe, quindi qui lo forziamo bianco
   per restare leggibile come un vero badge. */
.bv-ebooks-mini-corso .bv-res-carousel-section__eyebrow { background: #fff; }
.bv-ebooks-mini-corso__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.bv-ebooks-mini-corso__subtitle { font-weight: 700; margin: 0 0 1rem; }
.bv-ebooks-mini-corso__desc { line-height: 1.65; margin: 0 0 1.5rem; color: var(--bv-res-text-muted, #6b7280); }
.bv-ebooks-mini-corso__media img { width: 100%; height: auto; border-radius: 18px; box-shadow: var(--bv-res-shadow, 0 20px 55px rgba(0,0,0,.09)); }
.bv-ebooks-mini-corso__text .bv-res-hero__microcopy { margin-bottom: 1.5rem; }

@media (max-width: 1024px) {
	.bv-ebooks-mini-corso { padding: 2rem; }
	.bv-ebooks-mini-corso__grid { grid-template-columns: 1fr; }
	.bv-ebooks-mini-corso__media { order: -1; }
}

/* ── Categorie: vere card con bordo, hover e freccia ─────────────────────── */
.bv-ebooks-categories__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.bv-ebooks-categories__item {
	display: flex; flex-direction: column; align-items: flex-start; gap: .5rem;
	text-decoration: none; color: inherit; position: relative;
	background: #fff; border: 1px solid var(--bv-res-border, #e5e7eb); border-radius: 18px;
	padding: 1.75rem 1.5rem; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.bv-ebooks-categories__item:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(0,0,0,.09); border-color: transparent; }
.bv-ebooks-categories__illustration {
	display: block; width: 100%; aspect-ratio: 4/3; border-radius: 14px; overflow: hidden;
	margin-bottom: .25rem; background: var(--bv-res-green-light, #EDF6F0);
}
.bv-ebooks-categories__illustration img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.bv-ebooks-categories__item:hover .bv-ebooks-categories__illustration img { transform: scale(1.06); }
.bv-ebooks-categories__icon {
	display: flex; align-items: center; justify-content: center;
	width: 56px; height: 56px; border-radius: 14px;
	background: var(--bv-res-green-light, #EDF6F0); color: var(--bv-res-green, #2d6a4f);
	margin-bottom: .25rem; transition: transform .25s ease;
}
.bv-ebooks-categories__item:hover .bv-ebooks-categories__icon { transform: scale(1.08); }
.bv-ebooks-categories__title { font-size: .9375rem; font-weight: 800; margin: 0; color: var(--bv-res-text, #1a1a2e); }
.bv-ebooks-categories__text { font-size: .8125rem; color: var(--bv-res-text-muted, #6b7280); line-height: 1.5; margin: 0; min-height: 2.6em; }
.bv-ebooks-categories__arrow {
	display: flex; align-items: center; justify-content: center; margin-top: .5rem;
	width: 28px; height: 28px; border-radius: 50%;
	background: var(--bv-res-green-light, #EDF6F0); color: var(--bv-res-green, #2d6a4f);
	transition: transform .25s ease, background .25s ease, color .25s ease;
}
.bv-ebooks-categories__item:hover .bv-ebooks-categories__arrow { background: var(--bv-res-green, #2d6a4f); color: #fff; transform: translateX(3px); }

@media (max-width: 1024px) { .bv-ebooks-categories__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .bv-ebooks-categories__grid { grid-template-columns: 1fr; } }

/* ── Cosa troverai negli ebook: contenitore chiaro, elementi in riga ──────── */
.bv-ebooks-whats-inside { background: var(--bv-res-green-light, #EDF6F0); border-radius: 24px; padding: 4.5rem 2.75rem; }
.bv-ebooks-whats-inside__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem 2.5rem; }
.bv-ebooks-whats-inside__item { display: flex; align-items: flex-start; gap: .75rem; max-width: 200px; }
.bv-ebooks-whats-inside__icon {
	display: flex; align-items: center; justify-content: center; flex-shrink: 0;
	width: 44px; height: 44px; border-radius: 12px;
	background: #fff; color: var(--bv-res-green, #2d6a4f);
	box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.bv-ebooks-whats-inside__text { display: flex; flex-direction: column; gap: .15rem; }
.bv-ebooks-whats-inside__text strong { font-size: .875rem; color: var(--bv-res-text, #1a1a2e); }
.bv-ebooks-whats-inside__text span { font-size: .75rem; color: var(--bv-res-text-muted, #6b7280); line-height: 1.4; }

@media (max-width: 700px) { .bv-ebooks-whats-inside { padding: 2rem 1.5rem; } }

/* ── Perché sono gratuiti ──────────────────────────────────────────────── */
.bv-ebooks-why-free__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
.bv-ebooks-why-free__grid--reversed { grid-template-columns: 1fr 1.15fr; }
.bv-ebooks-why-free__grid--reversed .bv-ebooks-why-free__media { order: 2; }
.bv-ebooks-why-free__media img { width: 100%; height: auto; border-radius: 20px; box-shadow: var(--bv-res-shadow, 0 20px 55px rgba(0,0,0,.09)); }

@media (max-width: 1024px) {
	.bv-ebooks-why-free__grid,
	.bv-ebooks-why-free__grid--reversed { grid-template-columns: 1fr; }
	.bv-ebooks-why-free__media { order: -1 !important; }
}

/* ── Testimonianze + FAQ affiancate ───────────────────────────────────────── */
.bv-ebooks-tf__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 2.5rem; align-items: start; }
.bv-ebooks-tf__grid--single { grid-template-columns: 1fr; max-width: 720px; margin: 0 auto; }
.bv-ebooks-tf__col .bv-res-testimonial {
	max-width: none; padding: 2.5rem; position: relative; min-height: 280px;
	box-shadow: 0 16px 40px rgba(0,0,0,.07);
}
.bv-ebooks-tf__col .bv-res-testimonial::before {
	content: '\201C'; position: absolute; top: 1rem; left: 1.75rem;
	font-size: 4.5rem; line-height: 1; font-family: Georgia, serif; font-style: normal;
	color: var(--bv-res-green-light, #EDF6F0); z-index: 0;
}
.bv-ebooks-tf__col .bv-res-testimonial__track { position: relative; z-index: 1; }
.bv-ebooks-tf__col .bv-res-testimonial__text { font-size: 1.125rem; line-height: 1.65; margin-bottom: 2rem; }
.bv-ebooks-tf__col .bv-res-testimonial__avatar { width: 56px; height: 56px; }
.bv-ebooks-tf__col .bv-res-testimonial__author strong { font-size: 1rem; }
.bv-ebooks-tf__col .bv-res-testimonial__author small { font-size: .8125rem; }
.bv-ebooks-tf__col .bv-res-testimonial__star svg { width: 18px; height: 18px; }
.bv-ebooks-tf__col .bv-res-testimonial__rating-num { font-size: .875rem; }
.bv-ebooks-tf__col .bv-res-testimonial__nav { display: none; } /* con 1 sola testimonianza i controlli non servono già da soli; qui li nascondiamo comunque per il layout compatto a due colonne */

/* FAQ qui è una lista singola colonna, senza barra di ricerca — stessa
   tecnica di scoping già usata per la pagina Contatti, applicata qui
   con id diverso. */
#bv-ebooks-faq .bv-res-faq__grid { grid-template-columns: 1fr; gap: .875rem; }
#bv-ebooks-faq .bv-res-faq__item {
	background: transparent; border: none; border-radius: 12px !important; overflow: hidden;
}
/* Default = verde chiaro brand; il pannello (Domande frequenti → Colori
   personalizzati) imposta --bv-faq-q-bg/--bv-faq-a-bg sull'item e qui
   vengono rispettati automaticamente, invece di essere forzati.
   Il border-radius è forzato esplicitamente (invece di ereditarlo) perché
   alcuni temi applicano un raggio molto arrotondato di serie ai bottoni,
   che altrimenti farebbe apparire la domanda come una "pillola" scollegata
   dalla risposta sottostante. */
#bv-ebooks-faq .bv-res-faq__question {
	background: var(--bv-faq-q-bg, var(--bv-res-green-light, #EDF6F0));
	padding: 1.125rem 1.25rem; border-radius: 12px 12px 0 0 !important;
}
#bv-ebooks-faq .bv-res-faq__item:not(.is-open) .bv-res-faq__question { border-radius: 12px !important; }
#bv-ebooks-faq .bv-res-faq__answer {
	background: var(--bv-faq-a-bg, var(--bv-res-green-light, #EDF6F0));
	border-radius: 0 0 12px 12px !important;
}
#bv-ebooks-faq .bv-res-faq__answer p { padding: .25rem 1.25rem 1.125rem; }

#bv-ebooks-faq__more,
.bv-ebooks-faq__more {
	display: inline-flex; align-items: center; gap: .4rem; margin-top: 1.25rem;
	font-size: .875rem; font-weight: 700; color: var(--bv-res-green, #2d6a4f); text-decoration: none;
}
.bv-ebooks-faq__more span { display: flex; transition: transform .2s ease; }
.bv-ebooks-faq__more:hover span { transform: translateX(3px); }

@media (max-width: 900px) {
	.bv-ebooks-tf__grid { grid-template-columns: 1fr; }
}

/* ── CTA finale: banner orizzontale ──────────────────────────────────────── */
.bv-ebooks-cta-final {
	position: relative; overflow: hidden; border-radius: 20px; padding: 2.75rem 3rem;
}
.bv-ebooks-cta-final--verde { background: var(--bv-res-green, #2d6a4f); color: #fff; }
.bv-ebooks-cta-final--bianco { background: #fff; border: 1px solid var(--bv-res-border, #e5e7eb); color: var(--bv-res-text, #1a1a2e); }
.bv-ebooks-cta-final--immagine { color: #fff; }
.bv-ebooks-cta-final__bg-image { position: absolute; inset: 0; z-index: 0; }
.bv-ebooks-cta-final__bg-image img { width: 100%; height: 100%; object-fit: cover; }
.bv-ebooks-cta-final--immagine::before { content: ''; position: absolute; inset: 0; background: rgba(24,44,34,.55); z-index: 0; }
.bv-ebooks-cta-final__inner {
	position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between;
	gap: 2rem; flex-wrap: wrap;
}
.bv-ebooks-cta-final__lead { display: flex; align-items: center; gap: 1.25rem; }
.bv-ebooks-cta-final__icon {
	flex-shrink: 0; display: flex; align-items: center; justify-content: center;
	width: 56px; height: 56px; border-radius: 50%; background: #fff; color: var(--bv-res-green, #2d6a4f);
}
.bv-ebooks-cta-final--bianco .bv-ebooks-cta-final__icon { background: var(--bv-res-green-light, #EDF6F0); }
.bv-ebooks-cta-final__copy h2 { font-size: 1.375rem; font-weight: 800; margin: 0 0 .25rem; }
.bv-ebooks-cta-final__copy p { font-size: .875rem; line-height: 1.5; margin: 0; opacity: .92; max-width: 46ch; }
.bv-ebooks-cta-final__stat { font-size: .8125rem !important; font-weight: 700; margin-top: .5rem !important; opacity: .95; }
.bv-ebooks-cta-final__btn {
	flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	background: #fff; color: var(--bv-res-green, #2d6a4f); text-decoration: none;
	border-radius: 999px; padding: .9rem 1.75rem; font-size: .8125rem; font-weight: 800; letter-spacing: .02em;
	transition: transform .2s;
}
.bv-ebooks-cta-final--bianco .bv-ebooks-cta-final__btn { background: var(--bv-res-green, #2d6a4f); color: #fff; }
.bv-ebooks-cta-final__btn-icon { display: flex; transition: transform .25s ease; }
.bv-ebooks-cta-final__btn:hover .bv-ebooks-cta-final__btn-icon { transform: translateX(4px); }
.bv-ebooks-cta-final__btn:hover { transform: scale(1.03); }

/* Blocco "ecosistema": continuazione naturale dopo la CTA principale. */
.bv-ebooks-cta-final__ecosystem {
	position: relative; z-index: 1; margin-top: 2rem; padding-top: 2rem;
	border-top: 1px solid rgba(255,255,255,.2);
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem;
}
.bv-ebooks-cta-final--bianco .bv-ebooks-cta-final__ecosystem { border-top-color: var(--bv-res-border, #e5e7eb); }
.bv-ebooks-cta-final__ecosystem strong { display: block; font-size: 1rem; margin-bottom: .2rem; }
.bv-ebooks-cta-final__ecosystem > span { font-size: .8125rem; opacity: .9; }
.bv-ebooks-cta-final__ecosystem-btns { display: flex; flex-wrap: wrap; gap: .625rem; }
.bv-ebooks-cta-final__ecosystem-btn {
	display: inline-flex; align-items: center; gap: .4rem;
	background: rgba(255,255,255,.15); color: inherit; text-decoration: none;
	border: 1px solid rgba(255,255,255,.3); border-radius: 999px;
	padding: .55rem 1.1rem; font-size: .8125rem; font-weight: 700;
	transition: background .2s ease, transform .2s ease;
}
.bv-ebooks-cta-final--bianco .bv-ebooks-cta-final__ecosystem-btn { background: var(--bv-res-green-light, #EDF6F0); border-color: transparent; }
.bv-ebooks-cta-final__ecosystem-btn:hover { background: rgba(255,255,255,.28); transform: translateY(-2px); }
.bv-ebooks-cta-final--bianco .bv-ebooks-cta-final__ecosystem-btn:hover { background: var(--bv-res-green, #2d6a4f); color: #fff; }

@media (max-width: 700px) {
	.bv-ebooks-cta-final__inner { flex-direction: column; align-items: flex-start; }
	.bv-ebooks-cta-final__btn { width: 100%; }
	.bv-ebooks-cta-final__ecosystem { flex-direction: column; align-items: flex-start; }
}
