/**
 * Ranking de enlaces más visitados — columna hero.
 */

.jursoc-home-ranking {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.jursoc-home-ranking__panel {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: clamp(0.75rem, 1.4vw, 1rem);
	border-radius: 16px;
	background:
		radial-gradient(ellipse 80% 40% at 100% 0%, color-mix(in srgb, #c9a227 14%, transparent), transparent 65%),
		linear-gradient(180deg, #f8fafc 0%, #fff 50%, #f1f5f9 100%);
	border: 1px solid rgba(15, 39, 68, 0.08);
	box-shadow: 0 12px 36px rgba(15, 39, 68, 0.08);
}

.jursoc-home-ranking__head {
	margin-bottom: 0.55rem;
	flex-shrink: 0;
}

.jursoc-home-ranking__title {
	margin: 0 0 0.2rem;
	font-size: clamp(0.82rem, 0.75rem + 0.35vw, 0.95rem);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #0f2744;
	line-height: 1.2;
}

.jursoc-home-ranking__lead {
	margin: 0;
	font-size: 0.68rem;
	line-height: 1.35;
	color: #64748b;
}

.jursoc-home-ranking__list {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	counter-reset: jursoc-rank;
}

.jursoc-home-ranking__item {
	display: grid;
	grid-template-columns: 1.65rem minmax(0, 1fr);
	align-items: center;
	gap: 0.35rem;
	padding: 0.28rem 0;
	border-bottom: 1px solid #e8eef4;
}

.jursoc-home-ranking__item:last-child {
	border-bottom: none;
}

.jursoc-home-ranking__pos {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.45rem;
	height: 1.45rem;
	border-radius: 50%;
	font-size: 0.68rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	color: #64748b;
	background: #fff;
	border: 1px solid #e2e8f0;
}

.jursoc-home-ranking__item--top .jursoc-home-ranking__pos {
	color: #fff;
	background: var(--rank-color, #003366);
	border-color: color-mix(in srgb, var(--rank-color, #003366) 80%, #000);
}

.jursoc-home-ranking__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.35rem;
	min-width: 0;
	padding: 0.15rem 0;
	text-decoration: none;
	color: #1e293b;
	background: transparent;
	border: none;
	font: inherit;
	cursor: pointer;
	text-align: left;
	width: 100%;
	border-radius: 6px;
	transition: color 0.2s, background 0.2s;
}

.jursoc-home-ranking__link:hover,
.jursoc-home-ranking__link:focus-visible {
	color: var(--rank-color, #003366);
	background: rgba(255, 255, 255, 0.7);
	outline: none;
}

.jursoc-home-ranking__name {
	flex: 1;
	min-width: 0;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.jursoc-home-ranking__count {
	flex-shrink: 0;
	font-size: 0.62rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: #94a3b8;
	padding: 0.1rem 0.35rem;
	border-radius: 999px;
	background: #f1f5f9;
}

.jursoc-home-ranking__item--top .jursoc-home-ranking__count {
	color: var(--rank-color, #003366);
	background: color-mix(in srgb, var(--rank-color, #003366) 12%, #fff);
}

@media (max-width: 1100px) {
	.jursoc-home-ranking__panel {
		max-height: min(320px, 42vh);
	}
}
