/* NavalHEAD — Call to action in fondo alle pagine (inc/cta.php) */

.nh-cta {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: clamp(5rem, 12vw, 9rem) clamp(1.25rem, 5vw, 4.5rem);
	background-color: #fff;
	text-align: center;
}

/* Foto di sfondo su un livello proprio: si anima senza muovere il testo. */
.nh-cta::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: var(--nh-cta-image, none);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	transform-origin: 50% 50%;
	animation: nh-cta-kenburns 24s ease-in-out infinite alternate;
	animation-play-state: paused;
	will-change: transform;
}

/* Il movimento parte quando la CTA è visibile (classe aggiunta da cta.js). */
.nh-cta.is-inview::before {
	animation-play-state: running;
}

@keyframes nh-cta-kenburns {
	from {
		transform: scale(1) translate3d(0, 0, 0);
	}
	to {
		transform: scale(1.3) translate3d(-1.8%, -2%, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.nh-cta::before {
		animation: none;
	}
}

.nh-cta--project {
	--nh-cta-image: url("../img/cta-project.jpg");
}

.nh-cta--marketing {
	--nh-cta-image: url("../img/cta-marketing.jpg");
}

.nh-cta::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--nh-cta-veil);
}

.nh-cta--marketing .nh-cta__inner {
    max-width: 40rem;
    margin: 0 40% 0 0%;
}

.nh-cta__inner {
    max-width: 42rem;
    margin: 0px auto;
}

.nh-cta__title {
    max-width: 16ch;
    margin: 0px auto;
    color: var(--nh-blue);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.1;
    text-wrap: balance;
    text-shadow: rgba(7, 55, 78, 0.59) 0px 0px 50px;
}

.nh-cta__button {
    display: inline-block;
    margin-top: clamp(1.5rem, 3vw, 2.25rem);
    padding: 0.75em 2.25em;
    border-radius: 4px;
    background: var(--nh-blue);
    color: rgb(255, 255, 255);
    font-weight: 700;
    text-decoration: none;
    transition: box-shadow 0.2s ease-in-out;
    box-shadow: rgba(7, 55, 78, 0.59) 0px 0px 50px;
}

.nh-cta__button:hover, .nh-cta__button:focus-visible {
    background: linear-gradient(45deg, rgb(0 109 227) 0%, rgb(30 50 227) 20%, var(--nh-blue) 80%, rgb(0 109 227) 100%);
    color: rgb(255, 255, 255);
    box-shadow: rgba(2, 25, 36, 0.59) 0px 0px 80px;
}
