/* PDV Hero Dinamica — stile allineato a paroledivita.org
   I selettori partono da .pdv-heroes per battere gli stili globali
   del tema/kit Elementor (colori link, margini dei p, ecc.). */

.pdv-heroes { position: relative; }
.pdv-heroes[data-active="none"] { display: none; }

.pdv-heroes .pdv-hero {
	position: relative;
	display: none; /* visibile solo quella scelta (regole inline del widget) */
	grid-template-columns: minmax(0, 1fr);
	place-items: center;
	min-height: 650px;
	overflow: hidden;
	isolation: isolate;
	color: #fff;
	font-family: "Inter", sans-serif;
}

/* Senza JavaScript: la prima. Nell'editor: tutte, impilate. */
.pdv-heroes:not([data-active]) > .pdv-hero:first-of-type,
.pdv-heroes.pdv-heroes--editor > .pdv-hero { display: grid; }
.pdv-heroes--editor > .pdv-hero + .pdv-hero { border-top: 4px dashed #1e86cc; }

/* Media */
.pdv-hero__media,
.pdv-hero__overlay { position: absolute; inset: 0; }
.pdv-hero__media { z-index: -2; background: #2b2724; }
.pdv-heroes .pdv-hero__poster,
.pdv-heroes .pdv-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
}
.pdv-hero__video { opacity: 0; transition: opacity .6s ease; }
.pdv-hero.is-playing .pdv-hero__video { opacity: 1; }

.pdv-hero__overlay {
	z-index: -1;
	background-color: #000;
	opacity: var(--pdv-overlay, .5);
}

/* Contenuto: sottotitolo → titolo → pulsante (spaziatura con gap, niente margini) */
.pdv-heroes .pdv-hero__content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .75rem;
	width: 100%;
	max-width: 730px;
	padding: 50px 30px 0;
	text-align: center;
}

.pdv-heroes .pdv-hero__subtitle,
.pdv-heroes .pdv-hero__title,
.pdv-heroes a.pdv-hero__btn {
	font-family: "Inter", sans-serif;
}

.pdv-heroes .pdv-hero__subtitle,
.pdv-heroes .pdv-hero__title {
	margin: 0;
	padding: 0;
	color: #fff;
}

.pdv-heroes .pdv-hero__subtitle {
	font-size: 20px;
	font-weight: 400;
	line-height: 1.4;
}

.pdv-heroes .pdv-hero__title {
	font-size: 54px;
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -.01em;
	text-wrap: balance;
}

/* Posizione (dall'API) — desktop e tablet */
.pdv-heroes .pdv-hero--h-left  { justify-items: start; }
.pdv-heroes .pdv-hero--h-right { justify-items: end; }
.pdv-heroes .pdv-hero--v-top    { align-items: start; }
.pdv-heroes .pdv-hero--v-bottom { align-items: end; }
.pdv-heroes .pdv-hero--h-left  .pdv-hero__content { align-items: flex-start; text-align: left; }
.pdv-heroes .pdv-hero--h-right .pdv-hero__content { align-items: flex-end;   text-align: right; }

/* Pulsanti — stessa forma di "Dona ora" nell'header */
.pdv-heroes .pdv-hero__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	justify-content: inherit;
	margin: 1.25rem 0 0;
}

.pdv-heroes a.pdv-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	min-height: 44px;
	margin: 0;
	padding: .75em 2.75em;
	border: 2px solid transparent;
	border-radius: 999px;
	box-shadow: none;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.pdv-heroes a.pdv-hero__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Primario: testo sempre bianco, anche hover/focus/visited */
.pdv-heroes a.pdv-hero__btn--primary,
.pdv-heroes a.pdv-hero__btn--primary:visited {
	background: var(--pdv-btn-bg, #1e86cc);
	color: var(--pdv-btn-fg, #fff);
}
.pdv-heroes a.pdv-hero__btn--primary:hover,
.pdv-heroes a.pdv-hero__btn--primary:focus,
.pdv-heroes a.pdv-hero__btn--primary:active {
	background: var(--pdv-btn-bg-hover, #1873b0);
	color: var(--pdv-btn-fg, #fff);
}

.pdv-heroes a.pdv-hero__btn--secondary,
.pdv-heroes a.pdv-hero__btn--secondary:visited { background: #fff; color: #1d5b8f; }
.pdv-heroes a.pdv-hero__btn--secondary:hover,
.pdv-heroes a.pdv-hero__btn--secondary:focus { background: #e8f2fa; color: #1d5b8f; }

.pdv-heroes a.pdv-hero__btn--outline,
.pdv-heroes a.pdv-hero__btn--outline:visited { border-color: #fff; background: transparent; color: #fff; }
.pdv-heroes a.pdv-hero__btn--outline:hover,
.pdv-heroes a.pdv-hero__btn--outline:focus { background: #fff; color: #1d5b8f; }

.pdv-heroes a.pdv-hero__btn--link,
.pdv-heroes a.pdv-hero__btn--link:visited,
.pdv-heroes a.pdv-hero__btn--link:hover { padding-inline: 0; background: transparent; color: #fff; text-decoration: underline; text-underline-offset: .25em; }

.pdv-hero__btn i,
.pdv-hero__btn span { color: inherit; }

/* ---------- Mobile: testo a sinistra, centrato verticalmente ---------- */
@media (max-width: 767px) {
	.pdv-heroes .pdv-hero {
		min-height: 460px;
		justify-items: start;
		align-items: center;
	}

	.pdv-heroes .pdv-hero .pdv-hero__content {
		align-items: flex-start;
		gap: .5rem;
		max-width: 100%;
		padding: 0 30px;
		text-align: left;
	}

	.pdv-heroes .pdv-hero__title {
		font-size: 34px;
		line-height: 1.15;
		text-wrap: pretty;
	}

	.pdv-heroes .pdv-hero__buttons {
		justify-content: flex-start;
		margin-top: 1rem;
	}

	.pdv-heroes a.pdv-hero__btn {
		min-height: 40px;
		padding: .65em 2em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pdv-hero__video { display: none; }
	.pdv-heroes a.pdv-hero__btn { transition: none; }
}

.pdv-heroes-empty {
	padding: 24px;
	border: 2px dashed #ccc;
	font: 14px/1.4 sans-serif;
	color: #666;
	text-align: center;
}
