/*
 * Installation description (post_content) and surroundings (installacio_entorn_decripcio)
 * written by the contents import (import.functions.php). Also used by its admin preview.
 */

.espai-desc,
.espai-entorn {
	--espai-accent: var(--e-global-color-primary, #1f6f5c);
	--espai-text: var(--e-global-color-text, #3a3a3a);
	--espai-soft: color-mix(in srgb, var(--espai-accent) 8%, #fff);
	--espai-line: #ececec;
}

/* ── Description ─────────────────────────────────────────────── */

.espai-desc {
	display: grid;
	gap: 28px;
	color: var(--espai-text);
}

/* "D'un cop d'ull": key points first */
.espai-desc__summary {
	padding: 18px 20px;
	background: var(--espai-soft);
	border-radius: 14px;
}
.espai-desc .espai-desc__summary-title {
	margin: 0 0 10px;
	color: var(--espai-accent);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.espai-desc .espai-desc__highlights {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.espai-desc .espai-desc__highlights li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 6px 12px;
	background: #fff;
	border: 1px solid color-mix(in srgb, var(--espai-accent) 25%, #fff);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}
.espai-desc .espai-desc__highlights li::before {
	content: "";
	flex: none;
	width: 14px;
	height: 14px;
	background: var(--espai-accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%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' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Blocks: Descripció / Equipaments */
.espai-desc .espai-desc__heading {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	color: var(--espai-accent);
	font-size: 22px;
	line-height: 1.25;
}
.espai-desc .espai-desc__heading::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--espai-line);
}

.espai-desc__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 14px;
}

.espai-desc__card {
	padding: 16px 18px;
	background: #fff;
	border: 1px solid var(--espai-line);
	border-radius: 14px;
}
.espai-desc .espai-desc__card-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
	color: var(--espai-text);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}
.espai-desc .espai-desc__card-title::before {
	content: "";
	flex: none;
	width: 30px;
	height: 30px;
	border-radius: 9px;
	background: var(--espai-soft) center / 18px no-repeat;
}
.espai-desc__card p {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
}
.espai-desc .espai-desc__list,
.espai-entorn .espai-entorn__list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.espai-desc .espai-desc__list li {
	position: relative;
	margin: 0;
	padding: 3px 0 3px 14px;
	font-size: 14px;
	line-height: 1.5;
}
.espai-desc .espai-desc__list li::before,
.espai-entorn .espai-entorn__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .8em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--espai-accent);
	opacity: .6;
}

/* Card icons (inline SVG, stroke colour = accent fallback) */
.espai-desc__card--estructura .espai-desc__card-title::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f6f5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5V21H3z'/%3E%3Cpath d='M9 21v-6h6v6'/%3E%3C/svg%3E");
}
.espai-desc__card--distribucio .espai-desc__card-title::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f6f5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 20V7M22 20v-5a3 3 0 0 0-3-3h-9v5M2 17h20'/%3E%3Ccircle cx='6' cy='13' r='2'/%3E%3C/svg%3E");
}
.espai-desc__card--accessibilitat .espai-desc__card-title::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f6f5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='4' r='2'/%3E%3Cpath d='M12 7v6h5l2 6M12 13H8a5 5 0 1 0 5.6 6.4'/%3E%3C/svg%3E");
}
.espai-desc__card--serveis .espai-desc__card-title::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f6f5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5a10 10 0 0 1 14 0M8.5 16a5 5 0 0 1 7 0'/%3E%3Ccircle cx='12' cy='19.5' r='1'/%3E%3Cpath d='M2 9a14 14 0 0 1 20 0'/%3E%3C/svg%3E");
}
.espai-desc__card--equipaments .espai-desc__card-title::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f6f5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c3 3.5 3 14.5 0 18M12 3c-3 3.5-3 14.5 0 18'/%3E%3C/svg%3E");
}
.espai-desc__card--equipaments-externs .espai-desc__card-title::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f6f5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 3 4 8 5-5 5 15H2L8 3z'/%3E%3C/svg%3E");
}

/* ── Surroundings (right column, small text) ───────────────────── */

.espai-entorn {
	display: grid;
	gap: 12px;
	color: var(--espai-text);
	font-size: 14px;
}
.espai-entorn p {
	margin: 0;
}
.espai-entorn .espai-entorn__heading {
	display: block;
	margin: 0;
	padding: 0;
	color: var(--espai-text);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}
.espai-entorn .espai-entorn__intro {
	line-height: 1.6;
}
.espai-entorn__group {
	padding-top: 10px;
	border-top: 1px solid var(--espai-line);
}
.espai-entorn .espai-entorn__title {
	margin: 0 0 6px;
	color: var(--espai-accent);
	font-size: 1em;
	font-weight: 700;
	letter-spacing: .03em;
	line-height: 1.3;
	text-transform: uppercase;
}
.espai-entorn .espai-entorn__list li {
	position: relative;
	margin: 0;
	padding: 2px 0 2px 12px;
	line-height: 1.3;
	font-size: 13px;
}
.espai-entorn .espai-entorn__list li::before {
	width: 5px;
	height: 5px;
}

@media (max-width: 600px) {
	.espai-desc {
		gap: 22px;
	}
	.espai-desc .espai-desc__heading {
		font-size: 19px;
	}
	.espai-desc__grid {
		grid-template-columns: 1fr;
	}
}
