/* Mapa de adopción: cabecera con globo animado, panel de reparto, filtros y tarjetas de país */
:root { --mp-tender:#8B5CF6; --mp-tender-t:#b79cff; --mp-legal:#00D084; --mp-friendly:#F7931A; --mp-restricted:#FF4444; --mp-restricted-t:#ff7b7b; }

/* ---------- Cabecera ---------- */
html body .page-hero.mp-hero { --g:min(600px,96vw); isolation:isolate; min-height:min(84vh,780px); padding:130px 24px 64px; overflow:visible; }
html body .page-hero.mp-hero > .mp-globe { position:absolute; left:50%; top:50%; width:var(--g); height:var(--g); margin:calc(var(--g) / -2) 0 0 calc(var(--g) / -2); z-index:-1; pointer-events:none; transform:none; opacity:.8; will-change:auto; -webkit-mask-image:radial-gradient(circle,#000 52%,transparent 71%); mask-image:radial-gradient(circle,#000 52%,transparent 71%); }
.mp-globe svg { width:100%; height:100%; display:block; overflow:visible; }
.mp-ring { transform-origin:300px 300px; transform-box:view-box; animation:mpSpin 120s linear infinite; }
.mp-ring-r { animation-duration:80s; animation-direction:reverse; }
.mp-mer { fill:none; stroke:rgba(247,147,26,.38); stroke-width:1; transform-box:fill-box; transform-origin:center; animation:mpMer 15s ease-in-out infinite; animation-delay:calc(var(--i) * -3s); }
.mp-par { fill:none; stroke:rgba(247,147,26,.26); stroke-width:1; }
.mp-ping { fill:none; stroke:var(--c); stroke-width:1.5; transform-box:fill-box; transform-origin:center; animation:mpPing 3.4s ease-out infinite; animation-delay:var(--d); opacity:0; }
.mp-dot { fill:var(--c); filter:drop-shadow(0 0 6px var(--c)); }
.mp-arc { fill:none; stroke:rgba(247,147,26,.55); stroke-width:1.2; stroke-dasharray:4 7; animation:mpDash 6s linear infinite; }
@keyframes mpSpin { to { transform:rotate(360deg); } }
@keyframes mpMer { 0%,100% { transform:scaleX(1); } 50% { transform:scaleX(.02); } }
@keyframes mpPing { 0% { transform:scale(.4); opacity:.9; } 100% { transform:scale(3.2); opacity:0; } }
@keyframes mpDash { to { stroke-dashoffset:-110; } }

html body .page-hero.mp-hero .mp-label { display:inline-flex; align-items:center; gap:8px; }
.mp-hero .mp-label::before { content:''; width:7px; height:7px; border-radius:50%; background:#F7931A; box-shadow:0 0 12px #F7931A; animation:mpBlink 2.2s ease-in-out infinite; }
@keyframes mpBlink { 50% { opacity:.35; } }
.page-hero h1 { background:linear-gradient(180deg,#fff 35%,#F7931A 140%); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.page-hero h1 span { -webkit-text-fill-color:#F7931A; }

.mp-pills { list-style:none; display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin:34px 0 0; padding:0; }
.mp-pill { --c:#fff; display:flex; align-items:center; gap:12px; padding:10px 18px 10px 14px; border-radius:16px; border:1px solid rgba(255,255,255,.1); background:rgba(0,0,0,.6); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); font:inherit; color:#f5f5f5; cursor:pointer; text-align:left; transition:transform .25s, border-color .25s, background .25s; }
.mp-pill:hover { transform:translateY(-3px); border-color:var(--c); background:rgba(20,20,20,.8); }
.mp-pill:focus-visible { outline:2px solid #F7931A; outline-offset:3px; }
.mp-pill b { font-family:'JetBrains Mono',monospace; font-weight:600; font-size:1.7rem; line-height:1; color:var(--c); min-width:1.2ch; }
.mp-pill span { font-size:.78rem; line-height:1.2; color:#c8c8c8; max-width:11ch; }

/* ---------- Cifras ---------- */
html body .stats-row { gap:14px; }
html body .stat-box { position:relative; overflow:hidden; padding:28px 18px 24px; border-radius:20px; background:linear-gradient(180deg,rgba(247,147,26,.09),rgba(247,147,26,0) 60%),#101010; transition:transform .3s, border-color .3s; }
html body .stat-box::before { content:''; position:absolute; left:50%; top:0; width:44px; height:3px; margin-left:-22px; background:#F7931A; border-radius:0 0 3px 3px; }
html body .stat-box:hover { transform:translateY(-4px); border-color:rgba(247,147,26,.4); }
html body .stat-box .num { font-size:clamp(1.8rem,3.2vw,2.5rem); }
html body .stat-box .lbl { color:#b0b0b0; font-size:.82rem; }

/* ---------- Panel de reparto + filtros ---------- */
.mp-panel { position:relative; z-index:1; margin:6px 0 26px; padding:22px; border-radius:24px; border:1px solid var(--border); background:radial-gradient(600px circle at 90% -20%,rgba(247,147,26,.10),transparent 60%),#0f0f0f; }
.mp-dist-h { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-bottom:12px; font-size:.72rem; font-weight:700; letter-spacing:.16em; text-transform:uppercase; color:#b0b0b0; }
.mp-dist-h em { font-style:normal; font-family:'JetBrains Mono',monospace; letter-spacing:0; color:#F7931A; text-transform:none; font-size:.8rem; }
.mp-dist { display:flex; height:14px; gap:3px; border-radius:999px; overflow:hidden; }
.mp-dist i { display:block; flex:var(--w,1) 1 0; min-width:6px; background:var(--c); border-radius:3px; transform-origin:left; transform:scaleX(0); animation:mpGrow .9s cubic-bezier(.2,.8,.2,1) forwards; animation-delay:calc(var(--k) * .12s); transition:opacity .3s; }
.mp-dist i:first-child { border-radius:999px 3px 3px 999px; } .mp-dist i:last-child { border-radius:3px 999px 999px 3px; }
.mp-dist.filtering i:not(.on) { opacity:.22; }
@keyframes mpGrow { to { transform:scaleX(1); } }
.mp-bar { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; margin-top:20px; }
html body .filter-row { margin:0; gap:8px; }
html body .filter-btn { display:inline-flex; align-items:center; gap:8px; padding:9px 16px 9px 14px; font-weight:600; color:#c0c0c0; background:rgba(255,255,255,.03); transition:background .25s, color .25s, border-color .25s, transform .2s; }
html body .filter-btn::before { content:''; width:9px; height:9px; border-radius:50%; background:var(--c,#fff); box-shadow:0 0 8px var(--c,transparent); }
html body .filter-btn[data-filter="all"] { --c:#f5f5f5; }
html body .filter-btn[data-filter="tender"] { --c:var(--mp-tender); }
html body .filter-btn[data-filter="legal"] { --c:var(--mp-legal); }
html body .filter-btn[data-filter="friendly"] { --c:var(--mp-friendly); }
html body .filter-btn[data-filter="restricted"] { --c:var(--mp-restricted); }
html body .filter-btn:hover { color:#fff; border-color:var(--c); }
html body .filter-btn:active { transform:scale(.96); }
html body .filter-btn:focus-visible, .mp-search:focus-visible { outline:2px solid #F7931A; outline-offset:2px; }
html body .filter-btn.active { background:#F7931A; border-color:#F7931A; color:#000; }
html body .filter-btn.active::before { background:#000; box-shadow:none; }
.mp-n { font-family:'JetBrains Mono',monospace; font-size:.72rem; font-weight:600; opacity:.75; }
.mp-search { flex:1 1 220px; max-width:320px; background:rgba(255,255,255,.04); border:1px solid var(--border); border-radius:999px; padding:11px 18px; color:#f5f5f5; font:inherit; font-size:.9rem; transition:border-color .25s, box-shadow .25s; }
.mp-search:focus { outline:none; border-color:#F7931A; box-shadow:0 0 0 3px rgba(247,147,26,.18); }
.mp-search::placeholder { color:#9a9a9a; }
.mp-count { font-size:.78rem; letter-spacing:1px; color:#b0b0b0; min-height:1.2em; margin-top:14px; }
.mp-empty { grid-column:1/-1; text-align:center; color:#b0b0b0; padding:40px 20px; }

/* ---------- Tarjetas de país ---------- */
html body .country-grid { grid-template-columns:repeat(auto-fill,minmax(310px,1fr)); gap:18px; margin-top:8px; }
html body .country-card { --mx:50%; --my:0%; --c:#fff; --ct:#fff; position:relative; display:flex; flex-direction:column; gap:12px; overflow:hidden; padding:24px 24px 20px; border-radius:22px; background:radial-gradient(340px circle at var(--mx) var(--my),color-mix(in srgb,var(--c) 16%,transparent),transparent 60%),linear-gradient(180deg,color-mix(in srgb,var(--c) 9%,transparent),transparent 110px),#141414; transition:border-color .3s, transform .3s, box-shadow .3s, opacity .6s ease-out; }
html body .country-card::before { content:''; position:absolute; left:0; top:22px; bottom:22px; width:3px; border-radius:0 3px 3px 0; background:var(--c); box-shadow:0 0 14px var(--c); }
html body .country-card:hover { transform:translateY(-5px); border-color:color-mix(in srgb,var(--c) 55%,transparent); box-shadow:0 22px 50px rgba(0,0,0,.55); }
.country-card.st-tender { --c:var(--mp-tender); --ct:var(--mp-tender-t); }
.country-card.st-legal { --c:var(--mp-legal); --ct:var(--mp-legal); }
.country-card.st-friendly { --c:var(--mp-friendly); --ct:var(--mp-friendly); }
.country-card.st-restricted { --c:var(--mp-restricted); --ct:var(--mp-restricted-t); }
html body .country-header { margin:0; gap:14px; flex-wrap:wrap; }
html body .country-flag { display:grid; place-items:center; width:58px; height:58px; font-size:2rem; line-height:1; border-radius:18px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.08); transition:transform .4s; }
html body .country-card:hover .country-flag { transform:scale(1.1) rotate(-4deg); }
.country-id { display:flex; flex-direction:column; align-items:flex-start; gap:6px; min-width:0; flex:1; }
html body .country-name { font-size:1.25rem; font-weight:700; letter-spacing:-.3px; }
html body .country-status { background:color-mix(in srgb,var(--c) 16%,transparent); color:var(--ct); border:1px solid color-mix(in srgb,var(--c) 40%,transparent); padding:3px 10px; font-size:.68rem; letter-spacing:.08em; }
html body .country-desc { font-size:.92rem; line-height:1.65; color:#bdbdbd; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.country-card.open .country-desc { display:block; overflow:visible; }
.country-foot { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:4px; }
html body .country-year { margin:0; color:#a8a8a8; font-size:.78rem; }
.country-more { background:none; border:0; padding:2px 0; font:inherit; font-size:.8rem; font-weight:600; color:#F7931A; cursor:pointer; }
.country-more:hover { text-decoration:underline; }
.country-more:focus-visible { outline:2px solid #F7931A; outline-offset:2px; border-radius:3px; }
.country-more .m-less, .country-more[aria-expanded="true"] .m-more { display:none; }
.country-more[aria-expanded="true"] .m-less { display:inline; }

/* Universo 3D */
#universe3d { border-radius:24px !important; box-shadow:0 30px 80px rgba(0,0,0,.5), inset 0 0 0 1px rgba(247,147,26,.12); }

@media (max-width:640px) {
    html body .page-hero.mp-hero { --g:150vw; padding:104px 18px 40px; min-height:0; overflow:hidden; }
    .mp-pills { gap:8px; } .mp-pill { padding:9px 12px; gap:9px; } .mp-pill b { font-size:1.35rem; } .mp-pill span { font-size:.72rem; }
    .mp-panel { padding:16px; border-radius:20px; }
    .mp-bar { display:grid; grid-template-columns:minmax(0,1fr); }
    html body .filter-row { flex-wrap:nowrap; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
    html body .filter-row::-webkit-scrollbar { display:none; }
    html body .filter-btn { flex:none; }
    .mp-search { max-width:none; }
    html body .country-grid { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce) {
    .mp-ring, .mp-mer, .mp-ping, .mp-arc, .mp-hero .mp-label::before { animation:none; }
    .mp-ping { opacity:.5; transform:scale(1.6); }
    .mp-dist i { animation:none; transform:none; }
    html body .country-card, html body .country-flag, html body .stat-box, .mp-pill { transition:none; }
    html body .country-card:hover, html body .country-card:hover .country-flag, html body .stat-box:hover, .mp-pill:hover { transform:none; }
}
