/* Subvenciones recibidas: pestañas por año y lista compacta. Tipografía Questrial (la carga el tema). */
.csr-subvenciones,
.csr-subvenciones * {
	font-family: "Questrial", sans-serif;
}

.csr-subvenciones {
	--csr-borde: #d9e0da;
	--csr-fondo: #f4f6f4;
	--csr-acento: #157208;
	--csr-acento-fondo: #eaf5e7;
	--csr-texto-suave: #4e5a52;
	margin: 0 0 30px;
}

.csr-subvenciones [hidden] {
	display: none !important;
}

/* Pestañas de año */
.csr-pestanas {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.csr-pestana {
	min-height: 40px;
	padding: 4px 18px;
	border: 1px solid #7d8a81;
	border-radius: 999px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.csr-pestana:hover {
	border-color: var(--csr-acento);
	color: var(--csr-acento);
}

.csr-pestana[aria-selected="true"] {
	border-color: var(--csr-acento);
	background: var(--csr-acento);
	color: #fff;
}

.csr-pestana:focus-visible {
	outline: 3px solid var(--csr-acento);
	outline-offset: 2px;
}

/* Años */
.csr-anio {
	margin-bottom: 24px;
}

.csr-anio-titulo {
	margin: 0 0 8px;
	font-size: 1.3em;
}

.csr-anio-num {
	font-size: 0.7em;
	font-weight: 400;
	color: var(--csr-texto-suave);
}

/* Con pestañas, el año ya se lee en la pestaña: el título queda solo para lectores de pantalla. */
.csr-js .csr-anio[role="tabpanel"] .csr-anio-titulo {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Lista compacta */
.csr-lista {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--csr-borde);
}

.csr-item {
	margin: 0;
	border-bottom: 1px solid var(--csr-borde);
}

.csr-subvencion > summary {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	column-gap: 12px;
	padding: 9px 8px 9px 30px;
	position: relative;
	cursor: pointer;
	list-style: none;
	line-height: 1.35;
}

.csr-subvencion > summary::-webkit-details-marker {
	display: none;
}

.csr-subvencion > summary::before {
	content: "";
	position: absolute;
	left: 10px;
	top: 17px;
	width: 7px;
	height: 7px;
	border-right: 2px solid var(--csr-acento);
	border-bottom: 2px solid var(--csr-acento);
	transform: rotate(-45deg);
	transition: transform 0.15s;
}

.csr-subvencion[open] > summary::before {
	transform: rotate(45deg);
}

.csr-subvencion > summary:hover,
.csr-subvencion[open] > summary {
	background: var(--csr-fondo);
}

.csr-subvencion > summary:focus-visible {
	outline: 3px solid var(--csr-acento);
	outline-offset: -3px;
}

/* Título del acordeón (h4): se anulan márgenes y estilos de encabezado del tema para mantener la fila compacta. */
.csr-subvenciones .csr-titulo {
	grid-column: 1;
	min-width: 0;
	margin: 0;
	padding: 0;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: normal;
	text-transform: none;
	color: inherit;
}

.csr-resumen-organismos {
	grid-column: 1;
	margin-top: 2px;
	font-size: 0.82em;
	color: var(--csr-texto-suave);
}

.csr-marca-pdf {
	grid-column: 2;
	grid-row: 1 / span 2;
	padding: 0 6px;
	font-size: 0.72em;
	font-weight: 700;
	line-height: 1.7;
	color: #fff;
	background: #b3261e;
	border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.csr-subvencion > summary::before {
		transition: none;
	}
}

/* Detalle: todos los textos del acordeón a 14px. */
.csr-detalle {
	padding: 4px 8px 18px 30px;
	font-size: 14px;
}

.csr-detalle :is(p, li, a, span, strong, em, td, th) {
	font-size: 14px;
}

.csr-descripcion > :last-child {
	margin-bottom: 0;
}

.csr-descripcion img {
	max-width: 100%;
	height: auto;
}

.csr-enlaces {
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

.csr-enlaces a {
	color: var(--csr-acento);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.csr-pdf a::before {
	content: "PDF";
	display: inline-block;
	margin-right: 6px;
	padding: 0 5px;
	font-size: 0.75em;
	font-weight: 700;
	line-height: 1.6;
	color: #fff;
	background: #b3261e;
	border-radius: 3px;
	text-decoration: none;
}

.csr-formato {
	opacity: 0.75;
}

.csr-organismos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px dashed var(--csr-borde);
}

.csr-organismos-titulo {
	color: var(--csr-texto-suave);
}

.csr-organismos ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.csr-organismos .csr-logo {
	display: block;
	width: auto;
	max-width: 180px;
	height: auto;
	max-height: 56px;
}

.csr-organismo-nombre {
	display: inline-block;
	padding: 2px 10px;
	border: 1px solid var(--csr-borde);
	border-radius: 999px;
}


@media (max-width: 600px) {
	.csr-subvencion > summary {
		padding-left: 26px;
	}
	.csr-subvencion > summary::before {
		left: 8px;
	}
	.csr-detalle {
		padding-left: 12px;
	}
}

/* Texto solo para lectores de pantalla (por si el tema no define la clase). */
.csr-subvenciones .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;
}
