/* Restyling 2026 – homepage "Home 2026": classi db-* assegnate agli elementi del Layout Builder. */

#top.db-restyle .db-hero-section .container,
#top.db-restyle .db-cards-section .container,
#top.db-restyle .db-why-section .container,
#top.db-restyle .db-isc-section .container,
#top.db-restyle .db-news-section .container,
#top.db-restyle .db-gallery-section .container,
#top.db-restyle .db-contact-section .container,
#top.db-restyle .db-motto-section .container { max-width: 1120px; }

/* Sezioni della home: niente bordi/ombre di default di Enfold */
#top.db-restyle .avia-section[class*="db-"],
#top.db-restyle .avia-section[class*="db-"] .container,
#top.db-restyle .avia-section[class*="db-"] .content {
	border: 0;
	box-shadow: none;
}

/* Icone: emoji nel CSS (il database del sito non salva caratteri a 4 byte) */
#top.db-restyle [class*="db-ico-"]::before { font-style: normal; line-height: 1; }
#top.db-restyle .db-ico-teddy::before  { content: "\1F9F8"; }
#top.db-restyle .db-ico-pencil::before { content: "\270F\FE0F"; }
#top.db-restyle .db-ico-apple::before  { content: "\1F34E"; }
#top.db-restyle .db-ico-heart::before  { content: "\1F49A"; }
#top.db-restyle .db-ico-pin::before    { content: "\1F4CD"; }
#top.db-restyle .db-ico-tree::before   { content: "\1F333"; }
#top.db-restyle .db-ico-hands::before  { content: "\1F91D"; }
#top.db-restyle .db-ico-plate::before  { content: "\1F35D"; }
#top.db-restyle .db-ico-phone::before  { content: "\1F4DE"; }
#top.db-restyle .db-ico-mail::before   { content: "\2709\FE0F"; }
#top.db-restyle .db-ico-book::before   { content: "\1F4D8"; }
#top.db-restyle .db-ico-globe::before  { content: "\1F310"; }
#top.db-restyle .db-ico-doc::before    { content: "\1F4C4"; }
#top.db-restyle .db-ico-scale::before  { content: "\2696\FE0F"; }
#top.db-restyle .db-ico-cal::before    { content: "\1F4C5"; }
/* Icone in linea (liste e link): piccolo spazio dopo */
#top.db-restyle li[class*="db-ico-"]::before,
#top.db-restyle a[class*="db-ico-"]::before { margin-right: 8px; }

/* Etichetta sopra i titoli di sezione */
#top.db-restyle .db-kicker {
	font-family: var(--db-font-body);
	font-weight: 800;
	font-size: 13px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--db-green);
	margin: 0 0 6px;
}
#top.db-restyle .db-kicker--coral { color: #A64A1C; }
#top.db-restyle .db-section-head { margin-bottom: 26px; }
#top.db-restyle .db-section-head h2 { margin: 0; }
#top.db-restyle .avia_textblock.db-section-head--row {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 20px;
	flex-wrap: wrap;
}
#top.db-restyle .avia_textblock.db-section-head--row > p { margin: 0; }

/* Link a forma di pulsante (dentro i blocchi di testo) */
#top.db-restyle .avia_textblock a.db-link-btn {
	display: inline-block;
	background: var(--db-green);
	color: #fff;
	font-weight: 800;
	font-size: 15px;
	text-decoration: none;
	border-radius: var(--db-radius-pill);
	padding: 12px 22px;
	box-shadow: var(--db-shadow-btn);
}
#top.db-restyle .avia_textblock a.db-link-btn:hover { background: var(--db-green-dark); }

/* ---------- ② Hero ---------- */
#top.db-restyle .db-hero-section { padding: 36px 0 90px; overflow: visible; }
#top.db-restyle .db-hero-section .entry-content-wrapper { display: flex; align-items: center; }
#top.db-restyle #wrap_all .db-hero-title {
	font-size: clamp(38px, 4.6vw, 58px);
	line-height: 1.04;
	margin: 0 0 18px;
	color: var(--db-forest);
}
#top.db-restyle .db-hero-title em {
	font-style: normal;
	color: var(--db-green);
	background: linear-gradient(transparent 68%, var(--db-sun) 68% 92%, transparent 92%);
	padding: 0 2px;
}
#top.db-restyle .db-hero-lead {
	font-size: 19px;
	line-height: 1.55;
	max-width: 480px;
	margin: 0 0 26px;
}
#top.db-restyle .db-hero-buttons { text-align: left; margin-bottom: 22px; }
#top.db-restyle .db-hero-buttons .avia-button { margin: 0 12px 10px 0; }
#top.db-restyle #wrap_all .db-hero-buttons .avia-button + .avia-button {
	background: #fff;
	color: var(--db-green);
	box-shadow: inset 0 0 0 2.5px var(--db-green);
}
#top.db-restyle #wrap_all .db-hero-buttons .avia-button + .avia-button:hover {
	background: var(--db-tint-green);
	transform: none;
}
#top.db-restyle .db-trust {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
/* Punti di forza come etichette a pillola, solo testo */
#top.db-restyle .db-trust .db-chip {
	margin: 0;
	padding: 7px 15px;
	border-radius: var(--db-radius-pill);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
	color: var(--db-forest);
}
#top.db-restyle .db-chip--green { background: var(--db-tint-green); }
#top.db-restyle .db-chip--sun { background: var(--db-tint-sun); }
#top.db-restyle .db-chip--coral { background: var(--db-tint-coral); }

#top.db-restyle .db-hero-media { position: relative; }
#top.db-restyle .db-blob,
#top.db-restyle .db-blob .avia-image-overlay-wrap { border-radius: var(--db-blob); }
#top.db-restyle .db-blob img.avia_image {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: var(--db-blob);
	box-shadow: 16px 16px 0 var(--db-sun);
}
#top.db-restyle .db-hero-media::before,
#top.db-restyle .db-hero-media::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	z-index: 2;
}
#top.db-restyle .db-hero-media::before { width: 24px; height: 24px; right: -4px; top: 34px; background: var(--db-green-logo); }
#top.db-restyle .db-hero-media::after { width: 13px; height: 13px; right: 36px; top: 6px; background: var(--db-coral); }

#top.db-restyle .avia_textblock.db-sticker {
	position: absolute;
	left: -14px;
	bottom: 28px;
	z-index: 3;
	width: 118px;
	height: 118px;
	border-radius: 50%;
	background: var(--db-sun);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	transform: rotate(-10deg);
	box-shadow: 0 5px 0 rgba(0, 0, 0, .08);
}
#top.db-restyle .db-sticker p {
	margin: 0;
	font-family: var(--db-font-head);
	font-weight: 500;
	font-size: 14px;
	line-height: 1.15;
	color: var(--db-forest);
}
#top.db-restyle .db-sticker strong { font-weight: 600; font-size: 16px; }

/* ---------- ③ Card ---------- */
#top.db-restyle .db-cards-section { margin-top: -56px; position: relative; z-index: 4; background: transparent; }
#top.db-restyle .db-cards-section .container { background: transparent; }
#top.db-restyle .flex_column.db-card {
	background: #fff;
	border-radius: 26px;
	padding: 26px;
	box-shadow: var(--db-shadow-card);
}
#top.db-restyle .db-card h3 { margin: 4px 0 6px; font-size: 23px; }
#top.db-restyle .db-card p { font-size: 15px; line-height: 1.5; margin: 0 0 12px; }
#top.db-restyle .db-card p:last-child { margin: 0; }

#top.db-restyle .db-icon,
#top.db-restyle .db-dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 17px;
	font-size: 27px;
	line-height: 1;
	margin-bottom: 10px;
}
#top.db-restyle .db-dot { width: 48px; height: 48px; border-radius: 50%; font-size: 22px; }
#top.db-restyle .db-icon--green { background: var(--db-tint-green); }
#top.db-restyle .db-icon--sun { background: var(--db-tint-sun); }
#top.db-restyle .db-icon--coral { background: var(--db-tint-coral); }

#top.db-restyle .avia_textblock a.db-more {
	font-weight: 800;
	font-size: 15px;
	color: var(--db-green);
	text-decoration: none;
}
#top.db-restyle .avia_textblock a.db-more:hover { text-decoration: underline; }

/* ---------- ④ Perché sceglierci ---------- */
#top.db-restyle .db-why h4 { font-size: 19px; margin: 2px 0 4px; }
#top.db-restyle .db-why p { font-size: 15px; line-height: 1.5; margin: 0; }

/* ---------- ⑤ Motto ---------- */
#top.db-restyle .db-motto-section,
#top.db-restyle .db-motto-section .container { background-color: var(--db-green); }
#top.db-restyle .db-motto-section { position: relative; overflow: visible; margin: 56px 0; z-index: 1; }
#top.db-restyle .db-motto-section::before,
#top.db-restyle .db-motto-section::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 48px;
	/* Maschera: la forma viene dall'SVG, il colore dalla variabile, così coincide sempre con la fascia */
	--db-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath d='M0 48 C 200 0 400 0 600 24 S 1000 48 1200 10 V48 Z'/%3E%3C/svg%3E");
	background: var(--db-green);
	-webkit-mask: var(--db-wave) center / 100% 100% no-repeat;
	mask: var(--db-wave) center / 100% 100% no-repeat;
	pointer-events: none;
}
#top.db-restyle .db-motto-section::before { top: -47px; }
#top.db-restyle .db-motto-section::after { bottom: -47px; transform: rotate(180deg); }
#top.db-restyle #wrap_all .db-motto-section h2 { color: #fff; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; }
#top.db-restyle .db-motto-section p { color: rgba(255, 255, 255, .93); font-size: 17px; }
#top.db-restyle .db-sun-text { color: var(--db-sun); }
#top.db-restyle .db-tilted img.avia_image {
	border-radius: 28px;
	transform: rotate(-2deg);
	box-shadow: 12px 12px 0 var(--db-sun);
	aspect-ratio: 4 / 3;
	object-fit: cover;
	width: 100%;
}

/* ---------- ⑥ Iscrizioni ---------- */
#top.db-restyle .flex_column.db-isc-box {
	background: var(--db-tint-coral);
	border-radius: var(--db-radius-lg);
	padding: 46px;
}
#top.db-restyle .db-steps {
	list-style: none;
	margin: 26px 0 28px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}
#top.db-restyle .db-steps li {
	background: #fff;
	border-radius: var(--db-radius-card);
	padding: 24px;
	margin: 0;
	box-shadow: var(--db-shadow-card);
}
#top.db-restyle .db-steps b {
	display: block;
	font-family: var(--db-font-head);
	font-weight: 600;
	font-size: 36px;
	line-height: 1;
	color: var(--db-coral);
	margin-bottom: 8px;
}
#top.db-restyle .db-steps h4 { font-size: 19px; margin: 0 0 4px; }
#top.db-restyle .db-steps p { font-size: 15px; line-height: 1.5; margin: 0; }
#top.db-restyle .db-isc-box .avia-button-wrap { text-align: left; }

/* ---------- ⑦ Novità ---------- */
#top.db-restyle .flex_column.db-news-card {
	background: #fff;
	border-radius: 22px;
	overflow: hidden;
	box-shadow: var(--db-shadow-card);
	padding: 0;
}
#top.db-restyle .db-news-img,
#top.db-restyle .db-news-img .avia-image-container-inner,
#top.db-restyle .db-news-img .avia-image-overlay-wrap { margin: 0; display: block; width: 100%; }
#top.db-restyle .db-news-img img.avia_image { max-width: none; display: block; }
#top.db-restyle .db-news-img img.avia_image,
#top.db-restyle .db-news-img .avia-image-overlay-wrap {
	border-radius: 0;
	width: 100%;
	height: 170px;
	object-fit: cover;
}
#top.db-restyle .db-news-card .av_textblock_section { padding: 18px 22px 24px; }
#top.db-restyle .db-news-card h3 { font-size: 19px; line-height: 1.22; margin: 0 0 6px; }
#top.db-restyle .db-news-card .avia_textblock h3 a { color: var(--db-forest); text-decoration: none; }
#top.db-restyle .db-news-card h3 a:hover { color: var(--db-green); }
#top.db-restyle .db-news-card p { font-size: 14px; margin: 0; color: var(--db-text-soft); }
#top.db-restyle .db-tag {
	display: inline-block;
	font-size: 12px;
	font-weight: 800;
	border-radius: var(--db-radius-pill);
	padding: 3px 11px;
	margin-bottom: 10px;
}
#top.db-restyle .db-tag--coral { background: var(--db-tint-coral); color: #8A3B16; }
#top.db-restyle .db-tag--sun { background: var(--db-tint-sun); color: #6E5100; }
#top.db-restyle .db-tag--green { background: var(--db-tint-green); color: var(--db-forest); }

/* ---------- ⑧ Spazi ---------- */
#top.db-restyle .db-gallery .av-masonry-entry,
#top.db-restyle .db-gallery .av-masonry-outerimage-container,
#top.db-restyle .db-gallery .av-inner-masonry { border-radius: 22px; overflow: hidden; }
#top.db-restyle .db-gallery.av-masonry { background: transparent; }

/* ---------- ⑨ Contatti ---------- */
#top.db-restyle .db-contact-section { padding-bottom: 20px; }
#top.db-restyle .flex_column.db-contact-card {
	background: #fff;
	border-radius: 26px;
	padding: 32px;
	box-shadow: var(--db-shadow-card);
}
#top.db-restyle .db-contact-card h2 { font-size: 30px; margin: 0 0 14px; }
#top.db-restyle .db-contact-list { list-style: none; margin: 0; padding: 0; }
#top.db-restyle .db-contact-list li { margin: 0 0 12px; font-size: 15px; display: flex; gap: 10px; }
#top.db-restyle .db-contact-list a { word-break: break-word; }

#top.db-restyle .db-map-col .av_textblock_section,
#top.db-restyle .db-map-col .avia_textblock { height: 100%; }
#top.db-restyle .avia_textblock a.db-map {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 230px;
	height: 100%;
	border-radius: 26px;
	background:
		repeating-linear-gradient(45deg, transparent 0 18px, rgba(47, 138, 63, .07) 18px 36px),
		var(--db-tint-green);
	color: var(--db-forest);
	font-weight: 800;
	font-size: 18px;
	text-decoration: none;
	line-height: 1.3;
}
#top.db-restyle .db-map small { font-weight: 600; font-size: 13px; color: var(--db-text-soft); }
#top.db-restyle .db-map-pin {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	box-shadow: var(--db-shadow-soft);
}
#top.db-restyle .avia_textblock a.db-map:hover .db-map-label { text-decoration: underline; }

#top.db-restyle .db-quick { clear: both; padding-top: 22px; }
#top.db-restyle .db-quick-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}
#top.db-restyle .db-quick-links li { margin: 0; display: flex; }
#top.db-restyle .avia_textblock .db-quick-links a {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	line-height: 1.25;
	background: #fff;
	border-radius: var(--db-radius-pill);
	padding: 15px 18px;
	font-weight: 800;
	font-size: 15px;
	color: var(--db-forest);
	text-decoration: none;
	box-shadow: inset 0 0 0 2.5px var(--db-green), var(--db-shadow-soft);
	transition: background-color .15s ease, color .15s ease;
}
#top.db-restyle .avia_textblock .db-quick-links a:hover { background: var(--db-green); color: #fff; }
@media only screen and (max-width: 767px) {
	#top.db-restyle .db-quick-links { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ---------- Responsive ---------- */
@media only screen and (max-width: 989px) {
	#top.db-restyle .db-steps { grid-template-columns: 1fr; }
	#top.db-restyle .flex_column.db-isc-box { padding: 32px; }
}

@media only screen and (max-width: 767px) {
	#top.db-restyle .db-hero-section { padding: 18px 0 72px; }
	#top.db-restyle .db-hero-section .entry-content-wrapper { flex-direction: column-reverse; }
	#top.db-restyle .db-hero-media { margin-bottom: 26px; max-width: 360px; margin-left: auto; margin-right: auto; }
	#top.db-restyle .avia_textblock.db-sticker { left: -6px; bottom: 6px; width: 96px; height: 96px; }
	#top.db-restyle .db-sticker p { font-size: 12px; }
	#top.db-restyle .db-sticker strong { font-size: 13px; }
	#top.db-restyle .db-hero-lead { font-size: 17px; }
	#top.db-restyle .db-cards-section { margin-top: -40px; }
	#top.db-restyle .flex_column.db-card,
	#top.db-restyle .flex_column.db-news-card { margin-bottom: 16px; }
	#top.db-restyle .db-why { margin-bottom: 18px; }
	#top.db-restyle .db-motto-media { margin-bottom: 26px; }
	#top.db-restyle .flex_column.db-isc-box { padding: 24px; border-radius: 24px; }
	#top.db-restyle .flex_column.db-contact-card { padding: 24px; margin-bottom: 16px; }
}

/* Hover sulle immagini delle novità: velatura verde + simbolo del logo al posto dell'icona Enfold */
#top.db-restyle .db-news-img .image-overlay {
	background-color: rgba(31, 77, 43, .45);
}
#top.db-restyle .db-news-img .image-overlay .image-overlay-inside::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 88px;
	height: 88px;
	margin: -44px 0 0 -44px;
	border-radius: 50%;
	background: #fff url("../img/logo-mark.svg") center 55% / 64px auto no-repeat;
	box-shadow: 0 5px 0 rgba(0, 0, 0, .12);
	font-size: 0;
	line-height: 0;
	transform: scale(.85) rotate(-6deg);
	transition: transform .25s ease;
}
#top.db-restyle .db-news-img a:hover .image-overlay-inside::before {
	transform: scale(1) rotate(0);
}

/* ---------- Portali: Amministrazione trasparente, Registro elettronico, Web École (immagini originali) ---------- */
#top.db-restyle .db-portals-section { padding: 10px 0 34px; }
#top.db-restyle .db-portals-section .container { max-width: 1120px; }
#top.db-restyle .flex_column.db-portal {
	background: #fff;
	border-radius: 22px;
	padding: 18px 22px;
	box-shadow: var(--db-shadow-card);
	transition: transform .15s ease, box-shadow .15s ease;
}
#top.db-restyle .flex_column.db-portal:hover {
	transform: translateY(-3px);
	box-shadow: 0 9px 0 rgba(31, 77, 43, .08);
}
#top.db-restyle .db-portal-img,
#top.db-restyle .db-portal-img .avia-image-overlay-wrap { margin: 0; border-radius: 0; }
#top.db-restyle .db-portal-img img.avia_image {
	border-radius: 0;
	max-height: 120px;
	width: auto;
	margin: 0 auto;
	display: block;
}
#top.db-restyle .db-portal-img .image-overlay { display: none !important; }
@media only screen and (max-width: 767px) {
	#top.db-restyle .flex_column.db-portal { margin-bottom: 14px; }
}
