/* ==========================================================================
   FB Vision – componenti condivisi tra più template
   ========================================================================== */

/* ---------- Pagine costruite a sezioni (ex WPBakery) ----------
   Sotto i 1500px tutti i paragrafi diventano 16px/1.3 con 20px di margine,
   esattamente come la regola del tema originale. */
.vc-content p { margin: 1rem 0; max-width: 100%; }
@media (max-width: 1500px) {
	.vc-content p { font-size: 16px !important; line-height: 1.3 !important; margin-bottom: 20px !important; }
}
@media (max-width: 575px) {
	.vc-content .btn-default { margin-top: 0; }
}

/* Contenitore standard delle pagine a sezioni: padding del tema + 15px colonne */
.boxed-vc { padding-left: var(--fbv-gutter-l); padding-right: var(--fbv-gutter-r); }

/* ---------- Immagine di sfondo come <img> (niente style inline) ---------- */
.has-cover { position: relative; overflow: hidden; }
.cover-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
}
.has-cover > :not(.cover-bg) { position: relative; z-index: 1; }

/* ---------- Banda colorata sotto i box (bg-band.jpg) ---------- */
.band-bottom {
	border-bottom: 5px solid;
	border-image: url("../img/bg-band.jpg") 30 / 1 / 0 stretch;
}

/* ---------- Titolo con linea a banda (es. "Prodotti ———") ---------- */
.title-band { display: flex; align-items: flex-end; margin-bottom: 50px; }
.title-band__text {
	margin: 0;
	padding-right: 50px;
	background: #fff;
	color: var(--fbv-text);
	font-size: 40px;
	font-weight: 700;
	line-height: 1.1em;
}
.title-band__line { flex-grow: 9; border-bottom: 5px solid; border-image: url("../img/bg-band.jpg") 30 / 1 / 0 stretch; }
@media (max-width: 1500px) {
	.title-band__text { padding-right: 30px; font-size: 30px; }
}

/* ---------- Sezione a due metà (testo colorato + immagine) ---------- */
.duo { display: flex; flex-wrap: wrap; align-items: stretch; }
.duo__text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	flex: 0 0 100%;
	max-width: 100%;
	padding: 70px 30px 70px 45px;
}
.duo--blue .duo__text { background-color: var(--fbv-blue); }
.duo--green .duo__text { background-color: var(--fbv-green); }
.duo__text .h-box { margin-bottom: 16px; }
.duo__text .t-sect { margin: 0; }
.duo__text .t-box2 { margin: 16px 0 20px; }
.duo__text .duo__cta { margin-bottom: 35px !important; }
.duo--blue .duo__text .t-sect { margin-bottom: 35px; }
.duo__text .btn-blu, .duo__text .btn-white { margin-top: 20px; margin-bottom: 0; line-height: 1.3; }
.duo__text .btn-blu { border-color: #1e73be; }
.duo__img { position: relative; flex: 0 0 100%; max-width: 100%; min-height: calc(80vh + 35px); }
.duo__img--desktop { display: none; }
@media (min-width: 992px) {
	.duo__text, .duo__img { flex-basis: 50%; max-width: 50%; }
	.duo__img--desktop { display: block; }
	.duo__img--mobile { display: none; }
}
@media (max-width: 992px) {
	.duo--green .duo__text, .duo--green .duo__text * { text-align: center; }
}
@media (max-width: 767px) {
	.duo--blue .duo__text, .duo--blue .duo__text * { text-align: center; }
	.duo--blue .h-box { font-size: 30px; }
}
@media (max-width: 575px) {
	.duo--blue .h-box { font-size: 22px; }
	.duo--blue .duo__text .t-sect { margin-bottom: 10px; }
	.duo__text .duo__cta { margin-bottom: 10px !important; }
	.duo--green .h-box { font-size: 30px; }
	.duo__text .btn-white { margin-top: 0; }
}

/* ---------- Card evento ---------- */
.ev-grid { display: flex; flex-wrap: wrap; justify-content: space-between; }
.ev-grid__item { width: 100%; padding: 0 25px 25px 0; }
@media (max-width: 991px) { .ev-grid__item { padding-right: 0; } }
@media (min-width: 992px) { .ev-grid__item { width: 50%; } .ev-grid { justify-content: flex-start; } }
@media (min-width: 1200px) { .ev-grid__item { width: 24%; padding-right: 0; } .ev-grid { justify-content: space-between; } }
@media (max-width: 767px) { .ev-grid__item { padding: 0 0 48px; } }

.ev-card { display: flex; flex-direction: column; height: 100%; padding: 0 5px; }
.ev-card__media { position: relative; display: block; }
.ev-card__media img { width: 100%; }
.ev-card__badge { position: absolute; right: 0; bottom: 0; display: flex; justify-content: flex-end; width: 100%; }
.ev-card__badge-text {
	display: flex;
	align-items: center;
	margin-right: -1px;
	padding: 0 10px 0 20px;
	color: #fff;
	font-size: 15px;
	font-style: italic;
	transform-origin: right center;
	transform: scaleX(0);
	transition: .3s ease-in-out;
}
.ev-card:hover .ev-card__badge-text { transform: scaleX(1); }
.ev-card__badge-icon { display: block; width: 50px; height: 50px; background: no-repeat center / cover; }
.ev-card__badge--read .ev-card__badge-text { background-color: var(--fbv-green); }
.ev-card__badge--read .ev-card__badge-icon { background-image: url("../img/read.jpg"); }
.ev-card__badge--video .ev-card__badge-text { background-color: var(--fbv-orange); }
.ev-card__badge--video .ev-card__badge-icon { background-image: url("../img/play.jpg"); }
.ev-card__badge--lock .ev-card__badge-text { background-color: var(--fbv-pink); }
.ev-card__badge--lock .ev-card__badge-icon { background-image: url("../img/lock.jpg"); }

.ev-card__body {
	display: flex;
	flex-direction: column;
	flex-grow: 9;
	padding: 37px 20px 10px;
	border: 1px solid #e5dcdc;
	border-top: 0;
}
.ev-card__title {
	display: -webkit-box;
	margin: 0 0 31px;
	overflow: hidden;
	color: var(--fbv-heading);
	font-size: 24px;
	font-weight: 600;
	line-height: 30px;
	text-align: left;
	text-overflow: ellipsis;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}
.ev-card__date { margin-bottom: 10px; color: var(--fbv-text); font-size: 20px; font-weight: 500; }
.ev-card__excerpt { flex-grow: 9; margin-bottom: 15px; color: var(--fbv-text); font-size: 20px; font-weight: 300; line-height: 1.3em; }
.ev-card__excerpt p {
	display: -webkit-box;
	margin: 0 !important;
	overflow: hidden;
	text-overflow: ellipsis;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}
.ev-card__btn { margin-bottom: 10px; }
.ev-card__btn .btn-default { margin-top: 20px; }
@media (max-width: 1500px) {
	.ev-card__body { padding-top: 20px; }
	.ev-card__date { font-size: 16px; }
	.ev-card__excerpt { font-size: 16px; }
	.ev-card__excerpt p { margin-bottom: 20px !important; }
	.ev-card__btn .btn-default { margin-top: 0; }
}
@media (max-width: 991px) {
	.ev-card__btn .btn-default { font-size: 14px; }
}
@media (max-width: 575px) {
	.ev-card__body { padding: 20px 25px 10px; }
	.ev-card__title { margin-bottom: 16px; }
	.ev-card__excerpt { margin-bottom: 0; }
}

/* ---------- Card categoria prodotto (immagine + titolo + testo + pulsante) ---------- */
.cat-card__img { display: block; width: 100%; margin-bottom: 35px; }
.cat-card__title { margin: 0 0 16px; color: var(--fbv-heading); font-size: 28px; font-weight: 700; line-height: 1.2; }
.cat-card .cat-card__text { margin: 16px 0 35px !important; }

/* ---------- Avvisi moduli ---------- */
.login-error { margin: 0 0 1rem; padding: .5rem 1rem; border-left: 4px solid #dc3232; background: #fff; color: #dc3232; font-size: 14px; }
.ev-card__media img { aspect-ratio: 16 / 9; object-fit: cover; }
