/*
 * EML Enti Patrocinatori: stili front-end.
 * Misure riprese dalle pagine Divi esistenti di eml.fm (font del tema, righe 1080px).
 */

/* ==========================================================================
   Griglia [eml_enti]
   ========================================================================== */

.eml-enti {
	--eml-colonne: 4;
	--eml-colonne-tablet: 3;
	--eml-colonne-mobile: 2;
	--eml-altezza-logo: 116px;
	--eml-spazio-colonne: 5.5%;
	--eml-spazio-righe: 54px;
	--eml-spazio-gruppi: 110px;
	--eml-colore-testo: #000;
	width: 100%;
	margin: 0 auto;
}

.eml-enti__gruppo + .eml-enti__gruppo {
	margin-top: var(--eml-spazio-gruppi);
}

/* Linea azzurra tra i gruppi, come nella pagina originale. */
.eml-enti--linee .eml-enti__gruppo + .eml-enti__gruppo {
	margin-top: 58px;
	padding-top: 50px;
	border-top: 1px solid #2ea3f2;
}

.eml-enti p.eml-enti__titolo {
	margin: 0 0 54px;
	padding: 0;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.19;
	color: var(--eml-colore-testo);
	text-align: center;
}

.eml-enti__griglia {
	display: grid;
	grid-template-columns: repeat(var(--eml-colonne), minmax(0, 1fr));
	column-gap: var(--eml-spazio-colonne);
	row-gap: var(--eml-spazio-righe);
	align-items: start;
}

.eml-enti__item {
	min-width: 0;
	text-align: center;
}

.eml-enti a.eml-enti__link {
	display: block;
	color: inherit;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.eml-enti a.eml-enti__link:hover,
.eml-enti a.eml-enti__link:focus {
	opacity: 0.8;
	color: inherit;
}

.eml-enti__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	height: var(--eml-altezza-logo);
}

.eml-enti .eml-enti__logo img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: var(--eml-altezza-logo);
	margin: 0 auto;
	object-fit: contain;
}

.eml-enti__nome {
	display: block;
	margin-top: 30px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.7;
	color: var(--eml-colore-testo);
	text-align: center;
	overflow-wrap: break-word;
}

.eml-enti__gruppo--maiuscolo .eml-enti__nome {
	text-transform: uppercase;
}

@media (max-width: 980px) {
	.eml-enti__griglia {
		grid-template-columns: repeat(var(--eml-colonne-tablet), minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.eml-enti {
		--eml-spazio-colonne: 8%;
		--eml-spazio-righe: 40px;
		--eml-spazio-gruppi: 70px;
	}

	.eml-enti__griglia {
		grid-template-columns: repeat(var(--eml-colonne-mobile), minmax(0, 1fr));
	}

	.eml-enti .eml-enti__logo {
		height: calc(var(--eml-altezza-logo) * 0.8);
	}

	.eml-enti .eml-enti__logo img {
		max-height: calc(var(--eml-altezza-logo) * 0.8);
	}

	.eml-enti__nome {
		margin-top: 18px;
	}

	.eml-enti--linee .eml-enti__gruppo + .eml-enti__gruppo {
		margin-top: 40px;
		padding-top: 36px;
	}
}

/* ==========================================================================
   Pagina ente
   ========================================================================== */

.eml-ente-pagina {
	background-color: #fff;
}

.eml-ente-contenitore {
	width: 80%;
	max-width: 1080px;
	margin: 0 auto;
	padding: 54px 0;
}

.eml-ente {
	--eml-blu: #012d8c;
	--eml-linea: #2ea3f2;
	color: #000;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.7;
}

.eml-ente__intestazione {
	padding: 27px 0 16px;
}

.eml-ente h1.eml-ente__titolo {
	margin: 0;
	padding: 0 0 10px;
	font-size: 30px;
	font-weight: 500;
	line-height: 1;
	color: #000;
	text-align: left;
}

.eml-ente__riga {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 5.5%;
	align-items: start;
	padding: 27px 0 16px;
}

.eml-ente__colonna {
	min-width: 0;
}

.eml-ente .eml-ente__logo {
	display: block;
	width: auto;
	height: auto;
	max-width: 90%;
}

.eml-ente__colonna--logo a {
	display: inline-block;
}

.eml-ente__colonna--testo p {
	margin: 0;
	padding: 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.7;
	color: #000;
	overflow-wrap: anywhere;
}

.eml-ente__colonna--testo a {
	color: var(--eml-blu);
	text-decoration: none;
}

.eml-ente__colonna--testo a:hover,
.eml-ente__colonna--testo a:focus {
	text-decoration: underline;
}

.eml-ente a.eml-ente__bottone {
	position: relative;
	display: inline-block;
	padding: 6px 20px;
	border: 2px solid var(--eml-blu);
	border-radius: 3px;
	background-color: transparent;
	color: var(--eml-blu);
	font-size: 20px;
	font-weight: 500;
	line-height: 1.7;
	text-decoration: none;
	transition: all 0.3s ease;
}

.eml-ente a.eml-ente__bottone::after {
	content: "\2192";
	position: absolute;
	top: 50%;
	right: 0.5em;
	font-size: 1em;
	line-height: 1;
	opacity: 0;
	transform: translate(-6px, -50%);
	transition: all 0.3s ease;
}

.eml-ente a.eml-ente__bottone:hover,
.eml-ente a.eml-ente__bottone:focus {
	padding-right: 2em;
	padding-left: 0.7em;
	background-color: rgba(0, 0, 0, 0.05);
	border-color: transparent;
	color: var(--eml-blu);
}

.eml-ente a.eml-ente__bottone:hover::after,
.eml-ente a.eml-ente__bottone:focus::after {
	opacity: 1;
	transform: translate(0, -50%);
}

.eml-ente__divisore {
	margin: 27px 0;
	border-top: 1px solid var(--eml-linea);
}

.eml-ente__contenuto {
	padding-top: 10px;
}

@media (max-width: 980px) {
	.eml-ente__riga {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 30px;
	}

	.eml-ente .eml-ente__logo {
		max-width: min(100%, 300px);
	}
}

@media (max-width: 767px) {
	.eml-ente-contenitore {
		padding: 30px 0;
	}

	.eml-ente h1.eml-ente__titolo {
		font-size: 26px;
		line-height: 1.2;
	}

	.eml-ente a.eml-ente__bottone {
		font-size: 18px;
	}
}
