/**
 * Home — listado de noticias limpio (sin imagen de fondo).
 */

.jursoc-cards-grid--clean {
	display: grid;
	gap: clamp(0.85rem, 1.5vw, 1rem);
	grid-template-columns: 1fr;
	grid-auto-rows: 1fr;
	align-items: stretch;
	align-content: start;
}

@media (min-width: 768px) {
	.jursoc-cards-grid--clean {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.jursoc-card--clean {
	background:
		radial-gradient(
			ellipse 130% 75% at 8% 0%,
			rgba(0, 51, 102, 0.01) 0%,
			transparent 65%
		),
		linear-gradient(180deg, #ffffff 0%, #fbfdff 60%, #f6f9fe 100%);
	border: 1px solid var(--jursoc-border, #e2e8f0);
	border-radius: var(--jursoc-radius, 8px);
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.05),
		0 4px 12px rgba(0, 51, 102, 0.06);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
	animation: jursoc-card-in 0.35s ease backwards;
	transition:
		transform var(--jursoc-transition, 0.18s ease),
		border-color var(--jursoc-transition, 0.18s ease),
		box-shadow var(--jursoc-transition, 0.18s ease);
}

.jursoc-card--clean:hover,
.jursoc-card--clean:focus-within {
	transform: translateY(-3px);
	box-shadow:
		0 2px 6px rgba(15, 23, 42, 0.06),
		0 8px 22px rgba(0, 51, 102, 0.10);
	border-color: color-mix(in srgb, var(--jursoc-primary, #003366) 16%, var(--jursoc-border, #e2e8f0));
}

.jursoc-card--clean .jursoc-card__link {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	position: relative;
	aspect-ratio: unset;
	min-height: 0;
	height: 100%;
	background: transparent;
	color: #1e293b;
	text-decoration: none;
	overflow: hidden;
}

.jursoc-card--clean a.jursoc-card__link,
.jursoc-card--clean a.jursoc-card__link:hover,
.jursoc-card--clean a.jursoc-card__link:focus,
.jursoc-card--clean a.jursoc-card__link:visited {
	color: #1e293b;
	text-decoration: none;
}

.jursoc-card--clean .jursoc-card__body {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	height: 100%;
	gap: 0.45rem;
	padding: clamp(1rem, 2vw, 1.2rem);
}

/* Marca de agua sutil con el ícono de la categoría/secretaría */
.jursoc-card--clean .jursoc-card__watermark {
	position: absolute;
	top: 0.9rem;
	right: 0.9rem;
	bottom: auto;
	z-index: 0;
	opacity: 0.16;
	line-height: 0;
	pointer-events: none;
	transform: rotate(-4deg);
	transition:
		opacity 0.28s ease,
		transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.jursoc-card--clean .jursoc-card__watermark svg {
	width: clamp(40px, 16%, 56px);
	height: auto;
	color: var(--cat-color, #003366);
	stroke-width: 1.25;
}

.jursoc-card--clean:hover .jursoc-card__watermark,
.jursoc-card--clean:focus-within .jursoc-card__watermark {
	opacity: 0.24;
	transform: rotate(-1deg) scale(1.08);
}

.jursoc-card--clean .jursoc-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem;
	flex-wrap: wrap;
}

.jursoc-card--clean .jursoc-card__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-family: var(--font-body, system-ui, sans-serif);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.28rem 0.62rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--cat-color, #003366) 10%, #fff);
	color: var(--cat-color, #003366);
	border: 1px solid color-mix(in srgb, var(--cat-color, #003366) 20%, transparent);
	box-shadow: none;
}

.jursoc-card--clean .jursoc-card__badge-icon {
	display: flex;
	opacity: 0.9;
}

.jursoc-card--clean .jursoc-card__date {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--jursoc-text-subtle, #475569);
	text-shadow: none;
	max-height: none;
	opacity: 1;
	margin-left: 0;
	white-space: nowrap;
}

.jursoc-card--clean .jursoc-card__title {
	margin: 0;
	font-family: var(--font-heading, "Bitter", serif);
	font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
	font-weight: 400 !important;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: #1e293b;
	text-shadow: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	min-height: calc(1.25em * 2);
	transition: color 0.18s ease;
}

/* Bajada y CTA siempre visibles */
.jursoc-card--clean .jursoc-card__reveal {
	position: static;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	align-items: flex-start;
	gap: 0.45rem;
	max-height: none;
	opacity: 1;
	overflow: visible;
	margin: 0;
	margin-top: 0.15rem;
	padding: 0;
	background: none;
	border: none;
	transform: none;
	pointer-events: auto;
}

.jursoc-card--clean .jursoc-card__excerpt {
	margin: 0;
	font-family: var(--font-body, system-ui, sans-serif);
	font-size: 1rem;
	line-height: 1.55;
	color: var(--jursoc-text-subtle, #475569);
	text-shadow: none;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.jursoc-card--clean .jursoc-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.28rem;
	margin-top: auto;
	font-size: 1rem;
	font-weight: 700;
	text-transform: none;
	letter-spacing: 0.01em;
	color: var(--cat-color, #003366);
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0;
	align-self: flex-start;
}

.jursoc-card--clean .jursoc-card__cta svg {
	flex-shrink: 0;
	fill: currentColor;
	transition: transform 0.18s ease;
}

.jursoc-card--clean .jursoc-card__link:focus-visible {
	outline: 2px solid var(--cat-color, #003366);
	outline-offset: 2px;
	border-radius: 5px;
}

/* Sin media / overlay del estilo imagen */
.jursoc-card--clean .jursoc-card__media,
.jursoc-card--clean .jursoc-card__overlay {
	display: none;
}

.jursoc-layout--balanced .jursoc-card--clean {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.jursoc-layout--balanced .jursoc-card--clean .jursoc-card__link {
	flex: 1 1 auto;
	height: 100%;
	min-height: 0;
	aspect-ratio: unset;
}

/* Hover útil: mantener info visible (anula el efecto de dashboard.css que
   ocultaba la fecha y reducía el título a 1 línea) y reforzar la llamada a la acción. */
.jursoc-card--clean:hover .jursoc-card__date,
.jursoc-card--clean:focus-within .jursoc-card__date {
	max-height: none;
	opacity: 1;
	margin-top: 0;
}

.jursoc-card--clean:hover .jursoc-card__title,
.jursoc-card--clean:focus-within .jursoc-card__title {
	-webkit-line-clamp: 2;
	line-clamp: 2;
	color: var(--cat-color, #003366);
}

.jursoc-card--clean:hover .jursoc-card__cta svg,
.jursoc-card--clean:focus-within .jursoc-card__cta svg {
	transform: translateX(3px);
}

/* Anular estilos globales del estilo imagen (dashboard.css) */
body.home .entry-content .jursoc-card--clean .jursoc-card__title,
body.home .jursoc-card--clean .jursoc-card__title,
.jursoc-card--clean .jursoc-card__title {
	color: #1e293b;
	text-shadow: none;
}

body.home .entry-content .jursoc-card--clean .jursoc-card__date,
body.home .jursoc-card--clean .jursoc-card__date,
.jursoc-card--clean .jursoc-card__date {
	color: var(--jursoc-text-subtle, #475569);
	text-shadow: none;
}

body.home .entry-content .jursoc-card--clean .jursoc-card__excerpt,
.jursoc-card--clean .jursoc-card__excerpt {
	color: var(--jursoc-text-subtle, #475569);
	text-shadow: none;
}

body.home .entry-content .jursoc-card--clean .jursoc-card__cta,
.jursoc-card--clean .jursoc-card__cta {
	color: var(--cat-color, #003366);
	background: transparent;
}

body.home .entry-content .jursoc-card--clean a.jursoc-card__link,
body.home .jursoc-card--clean a.jursoc-card__link {
	color: #1e293b;
}

body.home .jursoc-card--clean:hover .jursoc-card__title,
body.home .jursoc-card--clean:focus-within .jursoc-card__title {
	color: var(--cat-color, #003366);
}

@media (prefers-reduced-motion: reduce) {
	.jursoc-card--clean {
		animation: none;
	}

	.jursoc-card--clean:hover,
	.jursoc-card--clean:focus-within {
		transform: none;
	}
}
