/* Hereta els colors globals d'Elementor si existeixen. */
.lx-graella,
.lx-videos {
	--lx-accent: var(--e-global-color-primary, #cd2c2b);
	--lx-text: var(--e-global-color-text, #222);
	--lx-suau: #6b6b6b;
	--lx-fons: #f5f4f1;
	--lx-radi: 6px;
	--lx-ratio: 1 / 1; /* format de la imatge de les targetes (cartells quadrats) */
	display: grid;
	gap: 28px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Punts de tall d'Elementor: tauleta ≤1024px, mòbil ≤767px */
@media (max-width: 1024px) {
	.lx-graella,
	.lx-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
}
@media (max-width: 767px) {
	.lx-graella,
	.lx-videos { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Targetes ---------- */
.lx-card {
	display: flex;
	flex-direction: column;
	background: var(--lx-fons);
	border-radius: var(--lx-radi);
	overflow: hidden;
}
.lx-card__media {
	position: relative;
	display: block;
	aspect-ratio: var(--lx-ratio);
	overflow: hidden;
	background: #ddd;
}
.lx-card .lx-card__img,
.lx-card .lx-card__placeholder {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}
.lx-card__badge {
	position: absolute;
	left: 10px;
	bottom: 10px;
	background: rgba(0, 0, 0, .75);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 8px;
	border-radius: 3px;
}
.lx-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 20px 20px;
}
.lx-card__data {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--lx-accent);
}
.lx-card__titol {
	margin: 0 0 8px;
	font-size: 1.2em;
	line-height: 1.25;
}
.lx-card .lx-card__titol a {
	color: var(--lx-text);
	text-decoration: none;
}
.lx-card .lx-card__titol a:hover { text-decoration: underline; }
.lx-card__lloc {
	margin: 0 0 8px;
	font-size: 14px;
	color: var(--lx-suau);
}
.lx-card__extracte {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.5;
}
.lx-card__accions {
	margin: auto 0 0;
}

/* Arxiu: més compacte i en escala de grisos fins al hover */
.lx-card.lx-card--passada .lx-card__img { filter: grayscale(.35); transition: filter .2s; }
.lx-card.lx-card--passada:hover .lx-card__img { filter: none; }
.lx-card--passada .lx-card__titol { font-size: 1.05em; }

/* ---------- Botons ---------- */
.lx-card .lx-boto,
.lx-canal .lx-boto {
	display: inline-block;
	padding: 9px 16px;
	border-radius: 3px;
	background: var(--lx-accent, #cd2c2b);
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
}
.lx-boto:hover { opacity: .88; }
.lx-card .lx-boto--secundari {
	background: transparent;
	color: var(--lx-accent, #cd2c2b) !important;
	box-shadow: inset 0 0 0 2px var(--lx-accent, #cd2c2b);
}

/* ---------- Vídeos ---------- */
.lx-video { margin: 0; }
.lx-video__play,
.lx-video__iframe {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	padding: 0;
	border-radius: var(--lx-radi, 6px);
	overflow: hidden;
	background: #000;
	cursor: pointer;
}
.lx-video .lx-video__play img {
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	opacity: .9;
	transition: opacity .2s;
}
.lx-video .lx-video__play:hover img { opacity: 1; }
.lx-video__icona {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 68px;
	height: 48px;
	transform: translate(-50%, -50%);
	background: rgba(0, 0, 0, .7);
	border-radius: 12px;
	transition: background .2s;
}
.lx-video__icona::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 10px 0 10px 18px;
	border-color: transparent transparent transparent #fff;
}
.lx-video__play:hover .lx-video__icona,
.lx-video__play:focus-visible .lx-video__icona { background: #f00; }
.lx-video figcaption {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-top: 10px;
	font-size: 15px;
	line-height: 1.35;
}
.lx-video figcaption a,
.lx-video figcaption a:visited { color: inherit; font-weight: 600; text-decoration: none; }
.lx-video figcaption a:hover { text-decoration: underline; }
.lx-video figcaption span { font-size: 13px; color: #6b6b6b; }

.lx-canal { margin-top: 28px; text-align: center; }
.lx-fitxa-video { margin: 40px 0; }

/* ---------- Altres ---------- */
.lx-buit { font-style: italic; color: #6b6b6b; }
.lx-paginacio {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-top: 32px;
}
.lx-paginacio .page-numbers {
	padding: 6px 12px;
	border-radius: 3px;
	text-decoration: none;
	background: #f0efec;
	color: inherit;
}
.lx-paginacio .current { background: var(--e-global-color-primary, #cd2c2b); color: #fff; }

/* ---------- Arxiu per anys ---------- */
.lx-anys {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 8px;
}
.lx-anys a,
.lx-anys a:visited {
	padding: 6px 14px;
	border-radius: 999px;
	background: #f0efec;
	color: inherit;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
}
.lx-anys a:hover { background: var(--e-global-color-primary, #cd2c2b); color: #fff; }
.lx-any { scroll-margin-top: 120px; }
.lx-any + .lx-any { margin-top: 12px; }
.lx-arxiu .lx-any__titol {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 36px 0 18px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--e-global-color-primary, #cd2c2b);
	font-size: 1.6em;
	line-height: 1.1;
}
.lx-any__titol span {
	font-size: 14px;
	font-weight: 400;
	color: #6b6b6b;
}
