/* Marcador electoral – identidad Nuestro Mundo Eco Río (azul institucional, verde, celeste) */
.nme {
	--nme-navy: #031b6e;
	--nme-blue: #1b3a8f;
	--nme-green: #008d0d;
	--nme-sky: #2bb3e6;
	--nme-ink: #1d2433;
	--nme-muted: #5a6378;
	--nme-card: #ffffff;
	--nme-track: #e8ebf2;
	font-family: "Mont", "Montserrat", system-ui, sans-serif;
	color: var(--nme-ink);
	max-width: 1140px;
	margin: 0 auto;
	padding: 40px 20px;
	position: relative;
	box-sizing: border-box;
}
.nme *, .nme *::before, .nme *::after { box-sizing: border-box; }

/* Encabezado */
.nme-head {
	text-align: center;
	background: linear-gradient(135deg, var(--nme-navy), var(--nme-blue) 55%, #0f5fa8);
	color: #fff;
	border-radius: 28px;
	padding: 40px 20px 72px;
	position: relative;
	overflow: hidden;
}
.nme-head::before, .nme-head::after {
	content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.nme-head::before { width: 260px; height: 260px; right: -70px; top: -90px; background: radial-gradient(circle, rgba(43,179,230,.45), transparent 70%); }
.nme-head::after { width: 220px; height: 220px; left: -60px; bottom: -110px; background: radial-gradient(circle, rgba(67,196,99,.4), transparent 70%); }
.nme-kicker {
	display: inline-flex; align-items: center; gap: 8px;
	background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
	padding: 6px 14px; border-radius: 40px; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
}
.nme-dot { width: 9px; height: 9px; border-radius: 50%; background: #9aa3b5; position: relative; }
.nme.is-live .nme-dot { background: #43c463; }
.nme.is-live .nme-dot::after {
	content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #43c463; animation: nme-ping 1.6s ease-out infinite;
}
.nme.is-closed .nme-dot { background: #ffcc33; }
@keyframes nme-ping { from { transform: scale(1); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
.nme-title {
	color: #fff !important; font-size: clamp(24px, 4.4vw, 44px) !important; line-height: 1.1 !important;
	font-weight: 900 !important; margin: 16px 0 8px !important; letter-spacing: .5px;
}
.nme-nowrap { white-space: nowrap; }
.nme-title { text-wrap: balance; }
.nme-sub { margin: 0; font-size: clamp(16px, 2.2vw, 22px); font-weight: 700; color: #bfe9ff; }

.nme-body { margin-top: -44px; position: relative; z-index: 1; }
.nme-loading, .nme-empty, .nme-info {
	background: #fff; border-radius: 18px; padding: 22px; text-align: center; color: var(--nme-muted);
	box-shadow: 0 10px 30px rgba(3,27,110,.08); margin: 0 0 18px;
}
.nme-info { color: var(--nme-navy); font-weight: 700; }

/* Tarjetas */
.nme-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; }
.nme-vs {
	align-self: center; width: 58px; height: 58px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: #fff; color: var(--nme-navy); font-weight: 900; font-size: 18px;
	box-shadow: 0 10px 25px rgba(3,27,110,.18);
}
.nme-card {
	--nme-c: var(--nme-blue);
	background: var(--nme-card); border-radius: 22px; overflow: hidden;
	box-shadow: 0 10px 30px rgba(3,27,110,.10);
	border-top: 6px solid var(--nme-c);
	display: flex; flex-direction: column;
	transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s;
	animation: nme-in .7s cubic-bezier(.2,.8,.2,1) both;
}
.nme-grid .nme-card:last-child { animation-delay: .12s; }
.nme-card:hover { transform: translateY(-6px); box-shadow: 0 22px 45px rgba(3,27,110,.18); }
.nme-card.is-leader { box-shadow: 0 0 0 3px var(--nme-c), 0 18px 40px rgba(3,27,110,.18); }
@keyframes nme-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.nme-photo { position: relative; aspect-ratio: 4 / 5; background: linear-gradient(135deg, var(--nme-c), #2bb3e6); overflow: hidden; }
.nme-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.nme-card:hover .nme-photo img { transform: scale(1.06); }
.nme-photo-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 28px; }
.nme-badge {
	position: absolute; top: 12px; left: 12px; background: #ffcc33; color: #3a2b00;
	font-size: 12px; font-weight: 800; padding: 6px 12px; border-radius: 30px; text-transform: uppercase; letter-spacing: .8px;
	box-shadow: 0 6px 16px rgba(0,0,0,.2);
}
.nme-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.nme-name { margin: 0 !important; color: var(--nme-c) !important; font-size: 24px !important; font-weight: 900 !important; line-height: 1.15 !important; }
.nme-members { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--nme-muted); line-height: 1.6; }
.nme-stats { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; margin-top: auto; }
.nme-likes { font-size: clamp(34px, 5vw, 48px); font-weight: 900; color: var(--nme-ink); line-height: 1; font-variant-numeric: tabular-nums; }
.nme-likes-label { font-size: 14px; color: var(--nme-muted); font-weight: 600; }
.nme-pct { margin-left: auto; background: var(--nme-c); color: #fff; font-weight: 800; padding: 6px 12px; border-radius: 30px; font-size: 15px; }
.nme-pct:empty { display: none; }
.nme-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 18px; border-radius: 40px; text-decoration: none !important;
	background: linear-gradient(90deg, #833ab4, #e1306c 55%, #f77737); color: #fff !important;
	font-weight: 700; font-size: 14px; transition: transform .25s, box-shadow .25s;
}
.nme-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(225,48,108,.35); }
.nme-btn:focus-visible { outline: 3px solid var(--nme-sky); outline-offset: 2px; }

/* Panel de gráficos */
.nme-panel {
	margin-top: 22px; background: #fff; border-radius: 22px; padding: 24px;
	box-shadow: 0 10px 30px rgba(3,27,110,.08);
	display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: center;
}
.nme-panel > .nme-empty { grid-column: 1 / -1; box-shadow: none; margin: 0; }
.nme-h4 { margin: 0 0 12px !important; font-size: 15px !important; color: var(--nme-navy) !important; font-weight: 800 !important; text-transform: uppercase; letter-spacing: 1px; }
.nme-bar-row { margin-bottom: 16px; }
.nme-bar-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 6px; }
.nme-bar { height: 16px; border-radius: 10px; background: var(--nme-track); overflow: hidden; }
.nme-bar-fill { display: block; height: 100%; border-radius: 10px; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.nme-split { display: flex; height: 22px; border-radius: 12px; overflow: hidden; gap: 3px; }
.nme-split span { display: block; flex-basis: 0; transition: flex-grow 1.1s cubic-bezier(.2,.8,.2,1); }
.nme-pie { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.nme-donut { width: 100%; max-width: 220px; height: auto; }
.nme-donut circle { transition: stroke-dasharray 1s ease; }
.nme-donut-n { font-size: 20px; font-weight: 900; fill: var(--nme-ink); font-family: inherit; }
.nme-donut-l { font-size: 9px; font-weight: 700; fill: var(--nme-muted); letter-spacing: 2px; font-family: inherit; }
.nme-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; font-size: 14px; font-weight: 600; }
.nme-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Pie */
.nme-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; margin-top: 18px; font-size: 13px; color: var(--nme-muted); }
.nme-tag { background: #e7f6ea; color: var(--nme-green); padding: 3px 10px; border-radius: 20px; font-weight: 700; }
.nme-warn { background: #fff4d6; color: #8a5a00; }
.nme.is-offline .nme-meta::before { content: "Sin conexión: reintentando…"; color: #8a5a00; font-weight: 700; }
.nme-note {
	margin: 18px auto 0; max-width: 820px; font-size: 12.5px; line-height: 1.6; color: var(--nme-muted);
	text-align: center; border-top: 1px solid #e3e6ee; padding-top: 14px;
}

/* Responsive */
@media (max-width: 900px) {
	.nme-panel { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
	.nme { padding: 24px 16px; }
	.nme-head { border-radius: 22px; padding: 30px 16px 64px; }
	.nme-grid { grid-template-columns: 1fr; }
	.nme-vs { justify-self: center; margin: -6px 0; width: 50px; height: 50px; font-size: 16px; }
	.nme-panel { padding: 18px; }
	.nme-name { font-size: 21px !important; }
}
@media (prefers-reduced-motion: reduce) {
	.nme *, .nme *::before, .nme *::after { animation: none !important; transition: none !important; }
}
