/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 1.0.1
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/*
    Add your custom styles here
*/

.elementor-widget-text-editor p:last-child {
	margin-bottom:0;
}

/* ==========================================================================
   Green Energy Day: immagini sagomate con onda colorata
   Classi sul widget Immagine:
   - immagine a destra:   ged-sagoma ged-sagoma-dx
   - immagine a sinistra: ged-sagoma ged-sagoma-sx

   La foto resta intera: si taglia solo il lato obliquo.
   L'onda e' l'SVG img/onda-ged.svg, che contiene anche il bianco sotto le onde
   colorate: copre la foto dove serve e si sposta insieme all'onda.

   Posizione dell'onda (da cambiare nei media query se serve):
   --ged-onda-width    larghezza, % del widget
   --ged-onda-left     spostamento orizzontale, % del widget
   --ged-onda-bottom   spostamento verticale rispetto al bordo basso della foto
                       (negativo = piu' in basso). Unita' cqw = % larghezza widget
   ========================================================================== */

.ged-sagoma {
	position: relative;
	container-type: inline-size;
}

/* L'immagine riempie sempre il widget (le misure dell'onda si basano su questo) */
.ged-sagoma img {
	width: 100% !important;
	object-fit: cover;
}

.ged-sagoma::after {
	content: "";
	position: absolute;
	z-index: 1;
	pointer-events: none;
	width: var(--ged-onda-width);
	left: var(--ged-onda-left);
	bottom: var(--ged-onda-bottom);
	aspect-ratio: 1327.513 / 146.38;
	background: url("img/onda-ged.svg") center / 100% 100% no-repeat;
}

/* Immagine a destra: lato sinistro obliquo */
.ged-sagoma-dx {
	--ged-onda-width: 159%;
	--ged-onda-left: -46.87%;
	--ged-onda-bottom: -2.32cqw;
}
.ged-sagoma-dx img {
	clip-path: polygon(5.41% 0, 100% 0, 100% 100%, 0 100%);
}

/* Immagine a sinistra: lato destro obliquo */
.ged-sagoma-sx {
	--ged-onda-width: 164.49%;
	--ged-onda-left: -14.52%;
	--ged-onda-bottom: -0.98cqw;
}
.ged-sagoma-sx img {
	clip-path: polygon(0 0, 94.59% 0, 100% 100%, 0 100%);
}

/* L'onda esce dai bordi: la taglio al bordo della sezione per evitare scroll orizzontale */
.e-parent:has(.ged-sagoma) {
	overflow-x: clip;
}

/* ==========================================================================
   Green Energy Day: carosello "Rivedi le edizioni passate"
   Widget Unlimited Elements "Flip Box Carousel"
   ========================================================================== */

/* Durante il flip la card si ingrandisce (prospettiva 3D) e Owl la taglia sopra e sotto:
   lascio spazio verticale dentro l'area clippata, compensato dal margine negativo */
.ue-flipbox-carousel .owl-stage-outer {
	padding: 60px 0;
	margin: -60px 0;
}

/* Immagine fronte a tutta card, sotto al titolo, con il gradiente scuro sopra la foto */
.ue-flipbox-carousel .ue-flip-box__panel--front .ue-flip-box__image {
	position: absolute;
	inset: 0;
}
.ue-flipbox-carousel .ue-flip-box__panel--front .ue-flip-box__image img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}
.ue-flipbox-carousel .ue-flip-box__panel--front .ue-flip-box__image img[src=""] {
	display: none;
}
.ue-flipbox-carousel .ue-flip-box__panel--front .ue-flip-box__image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 30%, var(--e-global-color-text, #000) 100%);
}
.ue-flipbox-carousel .ue-flip-box__panel--front .ue-flip-box__title {
	position: relative;
	z-index: 1;
}

/* ==========================================================================
   Header: icona freccia a destra delle voci del sottomenu (Edizioni > 2024, 2025, 2026...)
   Si applica da sola a ogni voce aggiunta nel menu; il colore segue quello del testo (hover compreso)
   ========================================================================== */
/* Tendina stretta: SmartMenus imposta min-width 10em inline, la tolgo cosi' la larghezza segue il contenuto */
.elementor-nav-menu--main .sub-menu {
	min-width: 0 !important;
}
/* gap = distanza tra testo e freccia */
.elementor-nav-menu .sub-menu .elementor-sub-item {
	justify-content: space-between;
	gap: 14px;
}
.elementor-nav-menu .sub-menu .elementor-sub-item::after {
	content: "";
	flex: none;
	width: .8em;
	height: .8em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8.5 3.5 17 12l-8.5 8.5' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8.5 3.5 17 12l-8.5 8.5' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ==========================================================================
   Rassegne stampa: allegati (file e link) sotto il titolo dell'edizione
   Markup generato da [ged_allegati] (functions.php).
   Icone: img/icona-scarica.svg (file) e img/icona-link.svg (link), nel colore del testo.
   Tutta la riga e' cliccabile (stretched link sul pulsante).
   Desktop: etichetta a sinistra, pulsante a destra. Mobile: pulsante sotto l'etichetta,
   voci separate da un filetto grigio.
   ========================================================================== */
.ged-allegati {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.ged-allegato {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin: 0;
}
.ged-allegato__etichetta {
	min-width: 0;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--e-global-color-4f84b0e, #292929);
}
/* prefisso .ged-allegati: batte la regola del kit ".elementor-kit-4 a" sul colore dei link */
.ged-allegati .ged-allegato__bottone {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 116px; /* stessa larghezza per tutti i pulsanti */
	padding: 6px 12px;
	border: 1px solid var(--e-global-color-10e7927, #1A5A9E);
	color: var(--e-global-color-10e7927, #1A5A9E);
	background-color: transparent;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .3s, color .3s;
}
.ged-allegato__bottone::before {
	content: "";
	position: absolute;
	inset: 0;
}
.ged-allegato__bottone::after {
	content: "";
	flex: none;
	width: 17px;
	height: 15px;
	margin-left: 9px;
	background: currentColor;
	-webkit-mask: url("img/icona-scarica.svg") center / contain no-repeat;
	mask: url("img/icona-scarica.svg") center / contain no-repeat;
}
.ged-allegato__bottone--link::after {
	width: 15px;
	-webkit-mask: url("img/icona-link.svg") center / contain no-repeat;
	mask: url("img/icona-link.svg") center / contain no-repeat;
}
.ged-allegati .ged-allegato__bottone:hover,
.ged-allegati .ged-allegato__bottone:focus-visible {
	background-color: var(--e-global-color-10e7927, #1A5A9E);
	color: var(--e-global-color-42b6721, #fff);
}
@media (max-width: 767px) {
	.ged-allegato {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	.ged-allegato + .ged-allegato {
		padding-top: 16px;
		border-top: 1px solid #D9D9D9;
	}
	.ged-allegato__etichetta {
		font-size: 16px;
	}
}

/* ==========================================================================
   Swiper: paginazione a quadrati (tutti gli swiper del sito)
   Attivo pieno blu, altri vuoti con bordo blu. !important per battere le
   regole per-widget di Elementor.
   ========================================================================== */
.swiper-pagination-bullet {
	width: 16px !important;
	height: 16px !important;
	margin-left: 6px !important;
	margin-right: 6px !important;
	border: 1px solid var(--e-global-color-10e7927, #1A5A9E) !important;
	border-radius: 0 !important;
	background-color: transparent !important;
	opacity: 1 !important;
	box-sizing: border-box;
	transition: background-color 300ms ease !important;
}
.swiper-pagination-bullet.swiper-pagination-bullet-active,
.swiper-pagination-bullet:hover {
	background-color: var(--e-global-color-10e7927, #1A5A9E) !important;
}
