/* Ecosistema Imprese – frontend. Personalizzabile tramite le variabili qui sotto. */
.eco-root {
	--eco-primary: #0397B2;
	--eco-text: #1d2327;
	--eco-muted: #5f6b76;
	--eco-border: #e2e6ea;
	--eco-bg: #ffffff;
	--eco-soft: #f5f7f9;
	--eco-radius: 12px;
	--eco-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
	color: var(--eco-text);
	box-sizing: border-box;
}
.eco-root *, .eco-root *::before, .eco-root *::after { box-sizing: inherit; }
.eco-root [hidden] { display: none !important; }
.eco-root .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* Temi a blocchi: il catalogo e la scheda usano la larghezza "wide" invece di quella del testo. */
.is-layout-constrained > .eco-catalogo,
.is-layout-constrained > .eco-profilo,
.entry-content > .eco-catalogo { max-width: var(--wp--style--global--wide-size, 1200px); margin-left: auto !important; margin-right: auto !important; }
.eco-root .eco-h { font-size: 1.15rem; margin: 0; line-height: 1.3; }
.eco-icon { flex: none; vertical-align: -3px; margin-right: 6px; }

/* ------------------------------ Layout catalogo ------------------------------ */
.eco-catalogo {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 32px;
	align-items: start;
	margin: 24px 0;
}
.eco-filtri {
	position: sticky;
	top: 24px;
	max-height: calc(100vh - 48px);
	overflow: auto;
	background: var(--eco-bg);
	border: 1px solid var(--eco-border);
	border-radius: var(--eco-radius);
	padding: 18px;
}
.eco-filtri-head { display: flex; align-items: center; margin-bottom: 12px; }
.eco-reset {
	background: none; border: 0; padding: 4px 0; cursor: pointer;
	color: var(--eco-primary); font: inherit; font-size: .9rem; text-decoration: underline;
}
.eco-search input {
	width: 100%; padding: 10px 12px; font: inherit; font-size: .95rem;
	border: 1px solid var(--eco-border); border-radius: 8px; background: var(--eco-soft);
	margin-bottom: 8px;
}
.eco-search input:focus { outline: 2px solid var(--eco-primary); outline-offset: 1px; background: #fff; }
.eco-filtro { border-top: 1px solid var(--eco-border); }
.eco-filtro summary {
	list-style: none; cursor: pointer; padding: 12px 0;
	font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	display: flex; align-items: center; gap: 8px;
}
.eco-filtro summary::-webkit-details-marker { display: none; }
.eco-filtro summary::after {
	content: ""; margin-left: auto; width: 8px; height: 8px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(45deg); transition: transform .15s;
}
.eco-filtro[open] summary::after { transform: rotate(-135deg); }
.eco-count {
	background: var(--eco-primary); color: #fff; border-radius: 99px;
	font-size: .7rem; min-width: 20px; height: 20px; padding: 0 6px;
	display: inline-flex; align-items: center; justify-content: center; letter-spacing: 0;
}
.eco-opzioni { padding: 0 0 12px; display: grid; gap: 2px; }
.eco-regione { margin: 8px 0 2px; font-size: .75rem; color: var(--eco-muted); font-weight: 600; }
.eco-check {
	display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
	padding: 5px 6px; border-radius: 6px; font-size: .9rem; line-height: 1.35;
}
.eco-check:hover { background: var(--eco-soft); }
.eco-check input { margin: 2px 0 0; accent-color: var(--eco-primary); width: 16px; height: 16px; flex: none; }
.eco-filtri .eco-apply-mobile { display: none; }
.eco-close-filters { display: none; background: none; border: 0; font-size: 1.8rem; line-height: 1; padding: 0 4px; cursor: pointer; color: var(--eco-text); }
.eco-filtri-head { gap: 12px; }
.eco-filtri-head .eco-h { margin-right: auto; }
.eco-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 99999; }
html.eco-no-scroll, html.eco-no-scroll body { overflow: hidden; }
.eco-filtri:focus { outline: none; }

/* --------------------------------- Risultati --------------------------------- */
.eco-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.eco-bar .eco-h { flex: 1; }
.eco-bar .eco-open-filters { display: none; }
.eco-view { display: inline-flex; border: 1px solid var(--eco-border); border-radius: 8px; overflow: hidden; }
.eco-view button {
	background: #fff; border: 0; padding: 8px 14px; font: inherit; font-size: .9rem; cursor: pointer; color: var(--eco-text);
}
.eco-view button[aria-pressed="true"] { background: var(--eco-primary); color: #fff; }
.eco-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.eco-chip {
	display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
	border: 1px solid var(--eco-primary); color: var(--eco-primary); background: #fff;
	border-radius: 99px; padding: 4px 10px 4px 12px; font: inherit; font-size: .8rem; font-weight: 600;
	text-transform: uppercase; letter-spacing: .03em;
}
.eco-chip span { font-size: 1.1em; line-height: 1; }
.eco-chip:hover { background: var(--eco-primary); color: #fff; }

.eco-griglia {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 20px;
	transition: opacity .15s;
}
.eco-loading .eco-griglia { opacity: .45; pointer-events: none; }
.eco-card {
	display: flex; flex-direction: column;
	background: var(--eco-bg); border: 1px solid var(--eco-border); border-radius: var(--eco-radius);
	overflow: hidden; transition: box-shadow .15s, transform .15s;
}
.eco-card:hover { box-shadow: var(--eco-shadow); transform: translateY(-2px); }
.eco-card-logo {
	text-decoration: none;
	display: flex; align-items: center; justify-content: center;
	height: 130px; padding: 20px; background: var(--eco-soft); border-bottom: 1px solid var(--eco-border);
}
.eco-card-logo img { max-height: 90px; max-width: 80%; width: auto; height: auto; object-fit: contain; }
.eco-initials {
	width: 72px; height: 72px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--eco-primary); color: #fff; font-weight: 700; font-size: 1.5rem; letter-spacing: .02em;
}
.eco-card-body { padding: 16px 18px 8px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.eco-card-title { font-size: 1.05rem; margin: 0; line-height: 1.3; }
.eco-card-title a { color: inherit; text-decoration: none; }
.eco-card-title a:hover { color: var(--eco-primary); }
.eco-card-sub { margin: 0; font-size: .88rem; color: var(--eco-muted); line-height: 1.45; }
.eco-card-loc { margin: auto 0 0; font-size: .82rem; color: var(--eco-muted); display: flex; align-items: center; }
.eco-card-cta {
	margin: 8px 18px 18px; align-self: flex-start;
	font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
	color: var(--eco-primary); text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 2px;
}
.eco-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.eco-badge {
	--eco-badge: var(--eco-primary);
	display: inline-block; padding: 3px 9px; border-radius: 99px;
	font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
	color: var(--eco-badge); background: color-mix(in srgb, var(--eco-badge) 12%, #fff);
	border: 1px solid color-mix(in srgb, var(--eco-badge) 35%, #fff);
}
.eco-empty, .eco-error { padding: 32px; text-align: center; color: var(--eco-muted); background: var(--eco-soft); border-radius: var(--eco-radius); }
.eco-more-wrap { text-align: center; margin-top: 24px; }
.eco-btn {
	display: inline-block; cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem;
	padding: 10px 22px; border-radius: 8px; border: 1px solid var(--eco-primary);
	background: var(--eco-primary); color: #fff;
}
.eco-btn:disabled { opacity: .6; cursor: wait; }
.eco-btn-ghost { background: #fff; color: var(--eco-primary); }

/* ----------------------------------- Mappa ----------------------------------- */
.eco-mappa { height: 560px; border-radius: var(--eco-radius); border: 1px solid var(--eco-border); position: relative; z-index: 0; }
.eco-mappa-sola { border-radius: var(--eco-radius); border: 1px solid var(--eco-border); z-index: 0; }
.eco-map-empty {
	position: absolute; z-index: 500; left: 50%; top: 16px; transform: translateX(-50%);
	background: #fff; padding: 8px 14px; border-radius: 8px; box-shadow: var(--eco-shadow); font-size: .9rem; margin: 0;
}
.eco-pop { display: grid; gap: 3px; min-width: 160px; }
.eco-pop-logo { max-width: 110px; max-height: 44px; object-fit: contain; margin-bottom: 4px; }
.eco-pop-tip { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #5f6b76; }
.eco-pop a { margin-top: 4px; font-weight: 600; }

/* ---------------------------------- Profilo ---------------------------------- */
.eco-profilo {
	--eco-heading: #0f2a4a;
	--eco-label: #8a9bb0;
	margin: 0 0 32px;
}
.eco-wrap { max-width: var(--wp--style--global--wide-size, 1200px); margin: 0 auto; padding: 0 24px; }
.eco-pf-topbar { background: color-mix(in srgb, var(--eco-heading) 38%, #fff); padding: 18px 0; }
.eco-back {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
	text-decoration: none; color: var(--eco-heading);
}
.eco-back:hover { text-decoration: underline; }

.eco-pf-hero { background: color-mix(in srgb, var(--eco-heading) 6%, #fff); padding: 48px 0; }
.eco-pf-hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(160px, auto);
	gap: 40px;
	align-items: start;
}
.eco-pf-id { display: flex; gap: 28px; align-items: flex-start; min-width: 0; }
.eco-pf-logo {
	flex: none; width: 120px; height: 120px; border-radius: 50%; background: #fff;
	display: flex; align-items: center; justify-content: center; overflow: hidden;
	box-shadow: 0 1px 3px rgba(16, 24, 40, .1); padding: 14px;
}
.eco-pf-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.eco-pf-logo .eco-initials { width: 100%; height: 100%; font-size: 2rem; }
.eco-pf-id-text { min-width: 0; padding-top: 6px; }
.eco-root .eco-pf-title {
	font-size: clamp(1.8rem, 3.2vw, 2.75rem); font-weight: 800; line-height: 1.1;
	color: var(--eco-heading); margin: 0 0 8px; letter-spacing: -.01em;
}
.eco-pf-sub { font-size: clamp(1.1rem, 1.6vw, 1.4rem); color: var(--eco-label); margin: 0 0 20px; line-height: 1.35; }
.eco-pf-web { font-size: .92rem; color: var(--eco-muted); text-decoration: none; overflow-wrap: anywhere; }
.eco-pf-web:hover { color: var(--eco-primary); text-decoration: underline; }

.eco-pf-facts { margin: 0; display: grid; gap: 22px; min-width: 0; }
.eco-pf-facts dt, .eco-pf-label {
	font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
	color: var(--eco-label); margin: 0 0 8px;
}
.eco-pf-facts dd { margin: 0; font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.eco-badges--stack { flex-direction: column; align-items: flex-start; }
.eco-badge--solid { color: #fff; background: var(--eco-badge); border-color: var(--eco-badge); }

.eco-pf-contacts { min-width: 0; }
.eco-pf-contacts .eco-pf-label:not(:first-child) { margin-top: 22px; }
.eco-pf-social { display: flex; flex-wrap: wrap; gap: 10px; }
.eco-pf-social a { color: var(--eco-heading); display: inline-flex; transition: color .15s, transform .15s; }
.eco-pf-social a:hover { color: var(--eco-primary); transform: translateY(-1px); }
.eco-pf-contact { display: flex; align-items: center; font-size: .92rem; margin: 4px 0; color: var(--eco-text); overflow-wrap: anywhere; }

.eco-pf-body { padding: 48px 0 16px; }
.eco-pf-body-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.eco-pf-main { min-width: 0; font-size: 1.05rem; line-height: 1.7; }
.eco-abstract {
	font-size: 1.15rem; line-height: 1.6; font-weight: 500; color: var(--eco-heading);
	padding-left: 16px; border-left: 4px solid var(--eco-primary); margin: 0 0 24px;
}
.eco-descrizione > :first-child { margin-top: 0; }
.eco-descrizione img { max-width: 100%; height: auto; }
.eco-root .eco-pf-h2 { font-size: 1.3rem; color: var(--eco-heading); margin: 40px 0 12px; }
.eco-mini-mappa { height: 320px; border-radius: var(--eco-radius); border: 1px solid var(--eco-border); z-index: 0; }

.eco-pf-card {
	position: sticky; top: 24px;
	background: #fff; border-radius: var(--eco-radius); padding: 18px 18px 20px;
	box-shadow: 0 2px 6px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .08);
}
.eco-pf-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.eco-pf-card-logo {
	flex: none; width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--eco-border);
	display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 8px; background: #fff;
}
.eco-pf-card-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.eco-pf-card-logo .eco-initials { width: 100%; height: 100%; font-size: 1.2rem; }
.eco-pf-card-title { font-size: 1.35rem; font-weight: 700; color: var(--eco-heading); margin: 0; line-height: 1.2; overflow-wrap: anywhere; }
.eco-pf-card-sub { font-size: .95rem; margin: 0 0 18px; color: var(--eco-text); }
.eco-pf-card .eco-pf-label { margin-top: 16px; }
.eco-pf-cta { border-top: 2px solid var(--eco-border); margin-top: 20px; padding-top: 16px; }
.eco-pf-cta p { margin: 0 0 12px; color: var(--eco-muted); font-size: .95rem; }
.eco-btn-block { display: block; width: 100%; text-align: center; text-decoration: none; text-transform: uppercase; letter-spacing: .04em; }
.eco-btn-block:hover { filter: brightness(1.08); color: #fff; }

/* Template a tutta pagina: niente margini del tema attorno alla scheda. */
.eco-full-template .eco-profilo--full { margin-top: 0; }
.eco-full-template .wp-block-post-content > .eco-profilo--full,
.eco-full-template .eco-single > .eco-profilo--full { max-width: none; }

@media (max-width: 1024px) {
	.eco-pf-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
	.eco-pf-id { grid-column: 1 / -1; }
	.eco-pf-body-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; }
}
@media (max-width: 782px) {
	.eco-pf-hero { padding: 32px 0; }
	.eco-pf-hero-grid { grid-template-columns: 1fr; gap: 24px; }
	.eco-pf-logo { width: 96px; height: 96px; }
	.eco-pf-body { padding-top: 32px; }
	.eco-pf-body-grid { grid-template-columns: 1fr; }
	.eco-pf-card { position: static; }
	.eco-mini-mappa { height: 260px; }
}
@media (max-width: 480px) {
	.eco-wrap { padding: 0 16px; }
	.eco-pf-id { flex-direction: column; gap: 16px; }
	.eco-pf-logo { width: 84px; height: 84px; padding: 10px; }
	.eco-pf-id-text { padding-top: 0; }
	.eco-pf-sub { margin-bottom: 12px; }
}

/* -------------------------------- Responsive -------------------------------- */
@media (max-width: 1100px) {
	.eco-catalogo { grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }
	.eco-griglia { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
}
@media (max-width: 900px) {
	.eco-catalogo { grid-template-columns: 1fr; gap: 0; }
	.eco-bar .eco-open-filters { display: inline-block; order: 1; }
	.eco-bar .eco-h { order: 0; flex-basis: 100%; }
	.eco-bar .eco-view { order: 2; margin-left: auto; }
	.eco-close-filters { display: block; }
	.eco-filtri {
		position: fixed; inset: 0 auto 0 0; z-index: 100000; width: min(88vw, 360px);
		max-height: none; border-radius: 0; border: 0; transform: translateX(-105%);
		box-shadow: 0 0 40px rgba(0, 0, 0, .25); visibility: hidden; transition: transform .2s, visibility .2s;
		padding-bottom: 0;
	}
	.eco-filters-open .eco-filtri { transform: none; visibility: visible; }
	.eco-filtri .eco-apply-mobile {
		display: block; width: 100%; position: sticky; bottom: 0; margin: 16px 0 0;
		box-shadow: 0 -12px 16px #fff;
	}
	.eco-mappa { height: 420px; }
	.eco-check { padding: 8px 6px; }
}
@media (max-width: 560px) {
	.eco-griglia { grid-template-columns: 1fr; }
	.eco-card-logo { height: 110px; }
	.eco-mappa { height: 360px; }
	.eco-view button { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.eco-card, .eco-filtri, .eco-griglia { transition: none; }
}

/* Specificità extra sui link: alcuni temi (es. Divi, ".et_color_scheme_* a") colorano tutti i link. */
.eco-root a.eco-back { color: var(--eco-heading); }
.eco-root a.eco-btn, .eco-root a.eco-btn:hover, .eco-root a.eco-btn:focus { color: #fff; }
.eco-root a.eco-pf-web { color: var(--eco-muted); }
.eco-root a.eco-pf-web:hover { color: var(--eco-primary); }
.eco-root .eco-card-title a { color: inherit; }
.eco-root .eco-card-title a:hover, .eco-root a.eco-card-cta { color: var(--eco-primary); }
.eco-root .eco-pf-social a { color: var(--eco-heading); }
.eco-root .eco-pf-social a:hover { color: var(--eco-primary); }
.eco-root a.eco-pf-contact { color: var(--eco-text); }
.eco-root a.eco-social { color: var(--eco-text); }
.eco-root .eco-pop a { color: var(--eco-primary); }

/* Legenda mappa */
.eco-legend {
	background: #fff; border-radius: 8px; padding: 10px 12px; box-shadow: 0 1px 4px rgba(16, 24, 40, .2);
	font-size: 12px; line-height: 1.4; color: #1d2327; max-width: 240px;
}
.eco-legend-title { margin: 0 0 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 11px; color: #5f6b76; }
.eco-legend ul { list-style: none; margin: 0; padding: 0; }
.eco-legend li { display: flex; align-items: center; gap: 8px; margin: 3px 0; padding: 0; }
.eco-legend-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); flex: none; }
.eco-legend-n { margin-left: auto; color: #5f6b76; font-variant-numeric: tabular-nums; padding-left: 8px; }
@media (max-width: 560px) { .eco-legend { max-width: 180px; font-size: 11px; padding: 8px 10px; } }

/* Casi d'uso nella scheda */
.eco-casi-sec { margin-top: 40px; }
.eco-casi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.eco-root a.eco-caso {
	display: flex; flex-direction: column; text-decoration: none; color: var(--eco-text);
	background: #fff; border: 1px solid var(--eco-border); border-radius: var(--eco-radius); overflow: hidden;
	transition: box-shadow .15s, transform .15s;
}
.eco-root a.eco-caso:hover { box-shadow: var(--eco-shadow); transform: translateY(-2px); color: var(--eco-text); }
.eco-caso-img { display: block; aspect-ratio: 16 / 9; background: var(--eco-soft); overflow: hidden; }
.eco-caso-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eco-caso-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.eco-caso-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--eco-muted); }
.eco-caso-title { font-weight: 700; font-size: 1rem; line-height: 1.35; color: var(--eco-heading, var(--eco-text)); }
.eco-caso-excerpt { font-size: .88rem; line-height: 1.5; color: var(--eco-muted); }
.eco-caso-more { margin-top: auto; padding-top: 6px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--eco-primary); }
.eco-collegate { margin: 24px 0; }
.eco-collegate .eco-griglia { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
