/* =========================================================================
 * NavalHEAD — Footer (Astra Footer Builder)
 * ========================================================================= */


.site-footer {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	color: #fff;
	background: radial-gradient(
		ellipse 150% 200% at 90% 0%,
		#009FE3 0%,
		#006ec6 38%,
		#015cbb 80%,
		#0057B8 100%
	);
}

/* 	======== MOD SCURA =========
 *
 * background: radial-gradient(
 *		ellipse 100% 130% at 100% 0%,
 *		#009FE3 0%,
 *		#00698F 68%,
 *		#0a5269 100%
 *	);
 *
 */

/* Simbolo del logo in trasparenza, dietro i contenuti. */
.site-footer::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: url("../img/simbolo.png") no-repeat 22% 0 / auto 115%;
	opacity: 0.6;
	pointer-events: none;
}

/* Le righe del Footer Builder non devono avere sfondi o bordi propri. */
.site-footer .site-above-footer-wrap[data-section],
.site-footer .site-primary-footer-wrap[data-section],
.site-footer .site-below-footer-wrap[data-section] {
	background: none;
	border: 0;
}

/* ---- Spaziature delle righe ---- */

.site-footer .site-above-footer-wrap[data-section] {
	padding-top: clamp(2rem, 4vw, 4rem);
	padding-bottom: clamp(1.5rem, 3vw, 3rem);
}

.site-footer .site-primary-footer-wrap[data-section] {
	padding-top: 0;
	padding-bottom: clamp(1rem, 1vw, 3rem);
}

.site-footer .site-below-footer-wrap[data-section] {
	padding-top: 0;
	padding-bottom: clamp(1.25rem, 2.5vw, 2.125rem);
}

/* ---- Testi e link ---- */

.site-footer,
.site-footer p,
.site-footer a,
.site-footer .ast-footer-copyright {
	color: #fff;
}

.site-footer .ast-builder-html-element p {
	margin: 0 0 1.4em;
	font-size: clamp(.9rem, 1vw, 1rem);
	line-height: 1.6;
}

.site-footer .ast-builder-html-element p:last-child {
	margin-bottom: 0;
}

.site-footer .ast-builder-html-element strong {
	font-weight: 500;
}

/* Logo */
.site-footer .ast-footer-html-1 img {
	display: block;
	width: clamp(7.5rem, 14vw, 18.5rem);
	height: auto;
}

/* ---- Menu (Footer Menu di Astra + widget "Menu di navigazione") ---- */

.site-footer #astra-footer-menu,
.site-footer #menu-footer-2 {
	display: flex;
	flex-direction: column;
	gap: clamp(0.425rem, 0.85vw, 0.85rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer #astra-footer-menu .menu-item,
.site-footer #menu-footer-2 .menu-item {
	margin: 0;
	padding: 0;
	line-height: 1.3;
}

.site-footer #astra-footer-menu .menu-link,
.site-footer #menu-footer-2 .menu-link {
	padding: 0;
	font-size: clamp(.9rem, 1.1vw, 1.4rem);
	color: #fff;
	text-decoration: none;
	transition: color 0.2s ease;
}

.site-footer #astra-footer-menu .menu-link:hover,
.site-footer #menu-footer-2 .menu-link:hover,
.site-footer #astra-footer-menu .menu-link:focus-visible,
.site-footer #menu-footer-2 .menu-link:focus-visible, 
.site-primary-footer-wrap p a:hover{
	color: var(--nh-yellow);
}

/* Voce della pagina corrente: nessun colore diverso, solo il peso. */
.site-footer .current-menu-item > .menu-link {
	font-weight: 600;
}

/* ---- Social ---- */

.site-footer .footer-social-inner-wrap {
	display: flex;
	gap: clamp(0.45rem, 0.8vw, 0.7rem);
}

.site-footer .footer-social-item {
	margin: 0;
	padding: 0;
	background: none;
	line-height: 0;
	transition: opacity 0.2s ease;
}

.site-footer .footer-social-item svg {
	width: clamp(1.5rem, 2vw, 2.2rem);
	height: auto;
}

.site-footer .footer-social-item:hover {
	opacity: 0.75;
}

/* ---- Riga inferiore: linea gialla con pallino e cerchio, poi copyright ---- */

.site-footer .site-footer-below-section-2 {
	--nh-ring: 1.8rem;
	--nh-stroke: 2px;

	position: relative;
	padding-top: clamp(2.125rem, 3vw, 2.75rem);
}

/* Cerchio e pallino centrati sull'inizio della linea, allineati al testo. */
.site-footer .site-footer-below-section-2::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: var(--nh-ring);
	height: var(--nh-ring);
	border: var(--nh-stroke) solid var(--nh-yellow);
	border-radius: 50%;
	box-sizing: border-box;
	background: radial-gradient(
		circle,
		var(--nh-yellow) 0 calc(var(--nh-ring) / 7),
		transparent calc(var(--nh-ring) / 7 + 0.5px)
	);
	translate: -5% 0;
}

/* Linea: dal cerchio fino al bordo destro dello schermo (l'eccesso è tagliato dal footer). */
.site-footer .site-footer-below-section-2::after {
	content: "";
	position: absolute;
	top: calc(var(--nh-ring) / 2 - var(--nh-stroke) / 2);
	left: calc(var(--nh-ring) / 2);
	width: 100vw;
	height: var(--nh-stroke);
	background: var(--nh-yellow);
}

.site-footer .ast-footer-copyright,
.site-footer .ast-footer-copyright p {
	margin: 0 0 0 10px;
	font-size: clamp(0.875rem, 0.95vw, 1.175rem);
	line-height: 1.4;
}



/* ---- Tablet e mobile ---- */
 
@media (max-width: 921px) {
	.site-footer::before {
		background-position: 70% 0;
		background-size: auto 90%;
	}
 
	.site-footer .site-footer-section {
		margin-bottom: 2rem;
	}
 
	/* Su una colonna il cerchio non deve uscire a sinistra. */
	.site-footer .site-footer-below-section-2::before {
		translate: 0 0;
	}
 
	.site-footer .site-footer-below-section-2::after {
		left: var(--nh-ring);
	}
    .site-footer .footer-social-inner-wrap {
	margin-top: 1.1rem;
}
}
 
/* =========================================================================
 * Tablet e mobile: ordine di lettura
 * Ordine: logo → dati società → menu sito → menu legale → social → copyright.
 * ========================================================================= */
 
@media (max-width: 921px) {
	.site-footer {
		--nh-footer-gutter: 1.25rem; 
		display: flex;
		flex-direction: column;
		padding-top: clamp(2.5rem, 8vw, 3.5rem);
	}
 
	body .site-footer .site-above-footer-wrap,
	body .site-footer .site-primary-footer-wrap,
	body .site-footer .site-above-footer-wrap > .ast-builder-grid-row-container-inner,
	body .site-footer .site-primary-footer-wrap > .ast-builder-grid-row-container-inner,
	body .site-footer .site-above-footer-inner-wrap,
	body .site-footer .site-primary-footer-inner-wrap {
		display: contents !important;
        text-align: left !important;
	}
    

    .footer-widget-area[data-section="section-fb-html-2"] .ast-builder-html-element {
        text-align: left;
    }
    #colophon .footer-widget-area[data-section="section-footer-menu"] .astra-footer-tablet-vertical-menu .menu-item {
        align-items: left !important;
    }


 
	/* Senza i contenitori, il margine laterale va dato alle colonne stesse. */
	.site-footer .site-above-footer-wrap .site-footer-section,
	.site-footer .site-primary-footer-wrap .site-footer-section {
		padding-inline: var(--nh-footer-gutter);
	}
 
	/* Stesso margine per la riga del copyright, così tutto resta allineato. */
	.site-footer .site-below-footer-wrap > .ast-builder-grid-row-container-inner {
		padding-inline: var(--nh-footer-gutter);
	}
 
	.site-footer .site-above-footer-wrap .site-footer-section-1   { order: 1; } /* Logo */
	.site-footer .site-primary-footer-wrap .site-footer-section-1 { order: 2; } /* Dati società */
	.site-footer .site-above-footer-wrap .site-footer-section-2   { order: 3; } /* Menu sito */
	.site-footer .site-above-footer-wrap .site-footer-section-3   { order: 4; } /* Menu legale */
	.site-footer .site-primary-footer-wrap .site-footer-section-3 { order: 5; } /* Social */
	.site-footer .site-below-footer-wrap                          { order: 6; } /* Copyright */
    
    .site-footer .site-above-footer-wrap .site-footer-section-1   { margin: 0 0 25px 0 !important; } /* Logo */
   	.site-footer .site-primary-footer-wrap .site-footer-section-1 p { margin: 0 0 8px 0 !important; } /* Dati società */
	.site-footer .site-primary-footer-wrap .site-footer-section-3 { margin: 20px 0 28px 0 !important; } /* Social */
	.site-footer .site-below-footer-wrap p                         {     text-align: right !important;  } /* Copyright */
 
	/* Colonna centrale della riga principale: vuota, non deve occupare spazio. */
	.site-footer .site-primary-footer-wrap .site-footer-section-2 {
		display: none;
	}
    .site-footer #astra-footer-menu, .site-footer #menu-footer-2  {
    margin: 20px 0 5px 0 !important;
}
    .site-footer #astra-footer-menu, .site-footer #menu-footer-2 li  {
    text-align: left !important;
}
}

/* =========================================================================
 * Tablet (568–921 px): due colonne invece della colonna unica del mobile.
 * Sinistra: logo, dati società. Destra: menu sito, menu legale, social.
 * Sotto, a tutta larghezza: copyright.
 * Il blocco precedente resta la base (contenitori "display: contents", margini laterali);
 * qui il footer passa da colonna flessibile a griglia, con le colonne posizionate.
 * ========================================================================= */

@media (min-width: 568px) and (max-width: 921px) {
	.site-footer {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
	}

	.site-footer .site-above-footer-wrap .site-footer-section-1   { grid-column: 1; grid-row: 1; }        /* Logo */
	.site-footer .site-primary-footer-wrap .site-footer-section-1 { grid-column: 1; grid-row: 2 / span 2; } /* Dati società */
	.site-footer .site-above-footer-wrap .site-footer-section-2   { grid-column: 2; grid-row: 1; }        /* Menu sito */
	.site-footer .site-above-footer-wrap .site-footer-section-3   { grid-column: 2; grid-row: 2; }        /* Menu legale */
	.site-footer .site-primary-footer-wrap .site-footer-section-3 { grid-column: 2; grid-row: 3; }        /* Social */
	.site-footer .site-below-footer-wrap                          { grid-column: 1 / -1; grid-row: 4; }   /* Copyright */

	/* In colonna destra il primo menu parte allineato al logo; gli spazi li dà il margine delle sezioni. */
	.site-footer #astra-footer-menu,
	.site-footer #menu-footer-2 {
		margin-top: 0 !important;
	}

	.site-footer .site-primary-footer-wrap .site-footer-section-3 {
		margin-top: 0 !important;
	}
}

 


#astra-footer-menu .menu-item {
    -js-display: flex;
    display: flex;
    -webkit-box-pack: start !important;
    -webkit-justify-content: start  !important;
    -moz-box-pack: start;
    -ms-flex-pack: start;
    justify-content: start  !important;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -moz-box-orient: vertical;
    -moz-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: row;
}




@media (max-width: 568px) {
 
    
    .footer-bar-navigation, 
    .menu-footer-2-container, 
    .ast-footer-social-1-wrap {
		margin-left: 13px !important;
	}
    .ast-footer-html-2{
		margin-left: 13px !important;
	}
    
    
    
}

/* =========================================================================
 * Animazione di entrata (assets/js/footer.js aggiunge .nh-anim e poi .is-in)
 * Senza JavaScript, o con "riduci movimento", il footer è statico e visibile.
 * ========================================================================= */
 
@media (prefers-reduced-motion: no-preference) {
 
	/* Testi e blocchi: salgono leggermente e compaiono, colonna dopo colonna. */
	/* Stato iniziale senza transizione: il passaggio a "nascosto" è istantaneo. */
	.site-footer.nh-anim .site-footer-section > * {
		opacity: 0;
		translate: 0 0.75rem;
	}
 
	.site-footer.nh-anim.is-in .site-footer-section > * {
		opacity: 1;
		translate: 0 0;
		transition:
			opacity 0.9s ease,
			translate 0.9s cubic-bezier(0.22, 1, 0.36, 1);
	}
 
	.site-footer.nh-anim.is-in .site-above-footer-wrap .site-footer-section-1 > *   { transition-delay: 0s; }
	.site-footer.nh-anim.is-in .site-above-footer-wrap .site-footer-section-2 > *   { transition-delay: 0.08s; }
	.site-footer.nh-anim.is-in .site-above-footer-wrap .site-footer-section-3 > *   { transition-delay: 0.16s; }
	.site-footer.nh-anim.is-in .site-primary-footer-wrap .site-footer-section-1 > * { transition-delay: 0.24s; }
	.site-footer.nh-anim.is-in .site-primary-footer-wrap .site-footer-section-3 > * { transition-delay: 0.32s; }
	.site-footer.nh-anim.is-in .site-below-footer-wrap .site-footer-section > *     { transition-delay: 1.25s; }
 
	/* Su tablet e mobile la cascata segue il nuovo ordine di lettura. */
	@media (max-width: 921px) {
		.site-footer.nh-anim.is-in .site-primary-footer-wrap .site-footer-section-1 > * { transition-delay: 0.08s; }
		.site-footer.nh-anim.is-in .site-above-footer-wrap .site-footer-section-2 > *   { transition-delay: 0.16s; }
		.site-footer.nh-anim.is-in .site-above-footer-wrap .site-footer-section-3 > *   { transition-delay: 0.24s; }
	}
 
	/* Linea gialla: entra dal bordo destro e scorre fino al cerchio. */
	.site-footer.nh-anim .site-footer-below-section-2::after {
		translate: 100vw 0;
	}
 
	.site-footer.nh-anim.is-in .site-footer-below-section-2::after {
		translate: 0 0;
		transition: translate 1.2s cubic-bezier(0.65, 0, 0.35, 1) 0.3s;
	}
 
	/* Cerchio e pallino: si aprono quando la linea arriva. */
	.site-footer.nh-anim .site-footer-below-section-2::before {
		scale: 0;
		opacity: 0;
	}
 
	.site-footer.nh-anim.is-in .site-footer-below-section-2::before {
		scale: 1;
		opacity: 1;
		transition:
			scale 0.6s cubic-bezier(0.22, 1, 0.36, 1) 1.35s,
			opacity 0.3s ease 1.35s;
	}
}
 
@media (prefers-reduced-motion: reduce) {
	.site-footer .menu-link,
	.site-footer .footer-social-item {
		transition: none;
	}
}