/**
 * Wordpresso — extra.css
 * Solo ciò che theme.json non copre: sticky bar, hover/scale card,
 * varianti bottone, form, micro-motion. Mobile-first.
 */

/* ------------------------------------------------------------- immagini --- */
/* Rete di sicurezza: nessuna immagine deve mai sfondare il suo contenitore. */
.wordpresso-header img,
main img,
.wordpresso-footer img {
	max-width: 100%;
	height: auto;
}

.wordpresso-img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 16px;
}

/* Hero: immagine base + video sovrapposto. La colonna immagine è stretch,
   quindi il media riempie in altezza fino ad allinearsi al blocco testo. */
.wordpresso-hero-media {
	position: relative;
	aspect-ratio: 5 / 6;   /* base: pannello verticale anche se lo stretch non regge */
	height: 100%;          /* se la colonna è stretch, riempie l'altezza del testo */
	min-height: 420px;
	border-radius: 16px;
	overflow: hidden;
	background-color: var(--wp--preset--color--espresso);
	box-shadow: 0 18px 40px rgba(43, 27, 18, 0.18);
}

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

.wordpresso-hero-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
}

.wordpresso-card-img {
	width: 100%;
	max-width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	margin-bottom: 1rem;
}

.wordpresso-avatar {
	width: 100%;
	max-width: 340px;
	border-radius: 20px;
	object-fit: cover;
	aspect-ratio: 4 / 5;
	box-shadow: 0 12px 30px rgba(43, 27, 18, 0.2);
}

/* ------------------------------------------------------- barra emergenza --- */
.wordpresso-emergency-bar {
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 4px 14px rgba(43, 27, 18, 0.18);
}

.wordpresso-emergency-inner {
	max-width: var(--wp--style--global--wide-size, 1180px);
	margin-inline: auto;
	text-align: center;
}

.wordpresso-emergency-bar p {
	margin: 0;
}

/* ---------------------------------------------------------------- header --- */
.wordpresso-header {
	position: relative;
	z-index: 200;
}

.wordpresso-brand-cup {
	margin: 0;
	line-height: 1;
}

.wordpresso-brand .wp-block-site-title a {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 700;
	text-decoration: none;
	color: var(--wp--preset--color--espresso);
}

/* --------------------------------------------------------- card problema --- */
.wordpresso-card {
	background: var(--wp--preset--color--latte);
	border-radius: 16px;
	padding: clamp(1.25rem, 3vw, 2rem);
	box-shadow: 0 10px 28px rgba(43, 27, 18, 0.08);
	height: 100%;
}

.wordpresso-card h3 {
	margin-top: 0.25rem;
}

/* ------------------------------------------------------------ come funziona */
.wordpresso-step {
	text-align: center;
}

.wordpresso-step-num {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 700;
	color: var(--wp--preset--color--caramello);
	line-height: 1;
	margin: 0 0 0.5rem;
}

/* ------------------------------------------------------------------ piani --- */
.wordpresso-plan {
	background: var(--wp--preset--color--latte);
	border: 1px solid #e6d8c7;
	border-radius: 16px;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	box-shadow: 0 10px 28px rgba(43, 27, 18, 0.08);
	height: 100%;
	position: relative;
}

.wordpresso-plan--featured {
	border: 2px solid var(--wp--preset--color--caramello);
	transform: scale(1.03);
	box-shadow: 0 18px 44px rgba(197, 123, 63, 0.28);
	z-index: 2;
}

.wordpresso-plan-badge {
	display: inline-block;
	background: var(--wp--preset--color--caramello);
	color: var(--wp--preset--color--latte);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 0.35em 1em;
	border-radius: 999px;
	position: absolute;
	top: -0.9rem;
	left: 50%;
	transform: translateX(-50%);
	margin: 0;
	white-space: nowrap;
}

.wordpresso-plan-cup {
	margin: 0 0 0.25rem;
	line-height: 1;
}

.wordpresso-plan-price {
	font-family: var(--wp--preset--font-family--fraunces);
	color: var(--wp--preset--color--espresso);
	margin: 0.5rem 0 0;
	line-height: 1;
}

.wordpresso-features {
	list-style: none;
	margin: 1.25rem 0;
	padding: 0;
	text-align: left;
}

.wordpresso-features li {
	position: relative;
	padding-left: 1.75rem;
	margin-bottom: 0.6rem;
	font-size: var(--wp--preset--font-size--s);
	line-height: 1.45;
}

.wordpresso-features li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	color: var(--wp--preset--color--verde-ok);
	font-weight: 700;
}

/* ----------------------------------------------------------------- rescue --- */
.wordpresso-rescue-card {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(245, 237, 227, 0.18);
	border-radius: 16px;
	padding: clamp(1.25rem, 3vw, 2rem);
	height: 100%;
}

.wordpresso-garanzia {
	color: var(--wp--preset--color--verde-ok);
	margin-bottom: 0.5rem;
}

/* -------------------------------------------------------- varianti bottone --- */
.wp-block-button.is-style-emergenza .wp-block-button__link {
	background-color: var(--wp--preset--color--emergenza);
	color: var(--wp--preset--color--latte);
	border: 2px solid var(--wp--preset--color--emergenza);
}

.wp-block-button.is-style-emergenza .wp-block-button__link:hover,
.wp-block-button.is-style-emergenza .wp-block-button__link:focus {
	background-color: #a5322a;
	border-color: #a5322a;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--caramello);
	border: 2px solid var(--wp--preset--color--caramello);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus {
	background-color: var(--wp--preset--color--caramello);
	color: var(--wp--preset--color--latte);
}

/* -------------------------------------------------------------------- FAQ --- */
.wordpresso-faq .wp-block-details {
	transition: box-shadow 150ms ease-out;
}

.wordpresso-faq .wp-block-details[open] {
	box-shadow: 0 8px 22px rgba(43, 27, 18, 0.08);
}

.wordpresso-faq .wp-block-details summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--m);
}

/* ------------------------------------------------------------------- form --- */
.wordpresso-form {
	max-width: 640px;
	margin: 2rem auto 0;
	display: grid;
	gap: 1rem;
}

.wordpresso-field {
	display: grid;
	gap: 0.35rem;
	font-size: var(--wp--preset--font-size--s);
	font-weight: 500;
}

.wordpresso-field input,
.wordpresso-field textarea {
	font: inherit;
	padding: 0.75em 0.9em;
	border: 1px solid #d9c7b2;
	border-radius: 8px;
	background: var(--wp--preset--color--latte);
	color: var(--wp--preset--color--espresso);
}

.wordpresso-field input:focus,
.wordpresso-field textarea:focus {
	outline: 2px solid var(--wp--preset--color--caramello);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--caramello);
}

.wordpresso-form-submit {
	justify-self: start;
	background: var(--wp--preset--color--caramello);
	color: var(--wp--preset--color--latte);
	border: none;
	border-radius: 8px;
	font-weight: 600;
	padding: 0.85em 1.6em;
	cursor: pointer;
	transition: background-color 150ms ease-out;
}

.wordpresso-form-submit:hover,
.wordpresso-form-submit:focus {
	background: var(--wp--preset--color--tostato);
}

.wordpresso-form-note {
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--tostato);
	margin: 0;
}

/* ------------------------------------------------------------------ footer --- */
.wordpresso-footer a {
	color: var(--wp--preset--color--crema);
	text-decoration: none;
}

.wordpresso-footer a:hover,
.wordpresso-footer a:focus {
	color: var(--wp--preset--color--caramello);
	text-decoration: underline;
}

.wordpresso-footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.5rem;
	font-size: var(--wp--preset--font-size--s);
}

/* -------------------------------------------------------------- micro-motion */
.wordpresso-fade-up {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 200ms ease-out, transform 200ms ease-out;
	will-change: opacity, transform;
}

.wordpresso-fade-up.is-visible {
	opacity: 1;
	transform: none;
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 781px) {
	.wordpresso-plan--featured {
		transform: none;
	}
	.wordpresso-hero-media {
		aspect-ratio: 16 / 9;
		height: auto;
		min-height: 0;
		margin-top: 1.5rem;
	}
}

/* ------------------------------------------------------ reduced motion --- */
@media (prefers-reduced-motion: reduce) {
	.wordpresso-fade-up {
		opacity: 1;
		transform: none;
		transition: none;
	}
	.wordpresso-hero-video {
		display: none;
	}
	* {
		scroll-behavior: auto !important;
	}
}
