/* Elígeme.click — Hoja de estilos compartida (v6: rediseño teal/índigo, Nunito, header flotante) */
:root {
    --bg: #F7F7FB;
    --surface: #FFFFFF;
    --surface-2: #EFEFF5;
    --border: #E7E7EF;
    --border-hi: #D8D8E4;
    --accent: #12B8A6;
    --accent-2: #6C5CE7;
    --accent-dim: rgba(18,184,166,0.08);
    --amber: #FFB020;
    --gold: #FFB800;
    --silver: #A8A8B8;
    --bronze: #E08A4D;
    --text: #15151F;
    --text-muted: #6B6B80;
    --text-dim: #B4B4C4;
    --header-bg: #101018;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- barra superior: transparente, flotante, logo con marca ---- */
.topbar-wrap { padding: 22px 24px 0; max-width: 1100px; margin: 0 auto; width: 100%; }
header.site-header {
    background: transparent;
    border-bottom: none;
    padding: 0;
    height: auto;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    row-gap: 10px;
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
    width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 3px; padding-left: 8px;
}
.logo-mark i { display: block; height: 3px; border-radius: 2px; background: #fff; }
.logo-mark i:nth-child(1) { width: 15px; }
.logo-mark i:nth-child(2) { width: 11px; }
.logo-mark i:nth-child(3) { width: 7px; }
.logo-text { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 19px; color: var(--text); }
.logo-text span { color: var(--accent); }

.menu-toggle { display: none; }

.nav-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 14px; }
.nav-links a.btn { color: #fff; }

.icon-btn {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text-muted);
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

.votes-pill {
    background: var(--amber); color: #fff;
    border: none;
    border-radius: 999px; padding: 8px 16px; font-size: 12.5px; font-weight: 700;
    display: flex; align-items: center; gap: 7px; white-space: nowrap;
}
.votes-pill .dot {
    width: 6px; height: 6px; border-radius: 50%; background: #fff; flex-shrink: 0;
    animation: pulso-punto 1.6s ease-in-out infinite;
}
@keyframes pulso-punto {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .35; transform: scale(1.5); }
}

.btn {
    background: linear-gradient(120deg, var(--accent), #0EA396); color: #fff; border: none;
    padding: 9px 20px; border-radius: 10px;
    font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700;
    cursor: pointer; text-decoration: none; display: inline-block;
    box-shadow: 0 6px 14px rgba(18,184,166,.34), 0 1px 0 rgba(255,255,255,.25) inset;
    transition: opacity .15s;
}
.btn:hover { opacity: .85; }
.btn-outline {
    background: transparent; color: var(--text);
    border: 1px solid var(--border-hi);
}

main.content {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    width: 100%;
}

h1 {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    margin-bottom: 24px;
}

h2 {
    font-family: 'Nunito', sans-serif;
    font-size: 20px; font-weight: 700;
    margin: 32px 0 12px;
}

p { margin-bottom: 12px; color: var(--text); }
p.muted { color: var(--text-muted); font-size: 14px; }

a { color: var(--accent); }

ul { margin: 0 0 16px 20px; }
li { margin-bottom: 6px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(20,20,40,.04);
}

.paquetes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin: 24px 0;
}

/* tarjeta de paquete — fila horizontal: ícono | nombre+votos | precio+comprar */
.paquete-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    text-align: left;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 1px 3px rgba(20,20,40,.04);
}
/* al pasar el mouse, se eleva con sombra — mismo color, sin resaltar el borde */
.paquete-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15,15,31,.20), 0 6px 14px rgba(15,15,31,.14);
}
.paquete-card img { width: 46px; height: 46px; flex-shrink: 0; }

.paquete-info { flex: 1; min-width: 0; }
.paquete-nombre {
    font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 14.5px;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px;
    margin-bottom: 3px;
}
.paquete-votos { color: var(--accent); font-size: 13px; font-weight: 600; }

.paquete-precio-wrap {
    display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
    flex-shrink: 0;
}
.paquete-precio {
    font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 22px;
    color: var(--text); white-space: nowrap;
}
.paquete-card .btn { border-radius: 999px; padding: 8px 18px; font-size: 12.5px; white-space: nowrap; }

form input[type=text], form input[type=email], form input[type=tel], form select, form textarea {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border-hi);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font-family: inherit; font-size: 14px;
    margin-bottom: 14px;
}
form label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
textarea { resize: vertical; min-height: 90px; }

.alert-success {
    background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.3);
    color: #0E9E6E; padding: 14px 18px; border-radius: 8px; margin-bottom: 20px;
}
.alert-error {
    background: var(--accent-dim); border: 1px solid rgba(18,184,166,.3);
    color: #0F6E63; padding: 14px 18px; border-radius: 8px; margin-bottom: 20px;
}

footer.site-footer {
    text-align: center; padding: 22px;
    font-size: 11px; color: var(--text-muted);
    border-top: 1px solid var(--border);
}
footer.site-footer a { color: var(--text-muted); text-decoration: none; }
footer.site-footer a:hover { color: var(--text); }

/* ---- Portada / ranking (hero, categorías, ítems) ---- */

.hero-eligeme { padding: 20px 0 8px; text-align: center; }

/* barra de categorías: el ícono de inicio y el de "todas" quedan fijos a
   los costados — solo la franja del medio (.cats-tabs-scroll) se desliza,
   con el dedo (nativo) o arrastrando con el mouse (ver habilitarArrastreScroll
   en includes/header.php). */
.cats-tabs-bar {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--surface-2);
    border-radius: 14px;
    padding: 5px;
    margin: 0 auto 26px;
    max-width: 100%;
    text-align: left;
}
.cats-tabs-scroll {
    display: flex; align-items: center; gap: 4px;
    overflow-x: auto; white-space: nowrap;
    scrollbar-width: none;
    min-width: 0;
    cursor: grab;
}
.cats-tabs-scroll::-webkit-scrollbar { display: none; }
.cats-tabs-scroll.arrastrando { cursor: grabbing; user-select: none; }
.cat-tab {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 15px; border-radius: 10px;
    font-size: 13px; font-weight: 600;
    background: transparent; border: none; text-decoration: none;
    color: var(--text-muted);
}
.cat-tab.active {
    background: var(--surface); color: var(--accent); font-weight: 700;
    box-shadow: 0 4px 10px rgba(15,15,31,.10);
}
.cat-tab.icon-only { padding: 9px 11px; }
.cat-tab svg { width: 15px; height: 15px; flex-shrink: 0; }
.cat-tab:hover:not(.active) { background: var(--surface); color: var(--text); }

/* ícono de "todas las categorías" integrado al final de la barra de pestañas */
.cat-tab-todas {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 33px; height: 33px; border-radius: 10px; color: var(--text-muted);
    background: transparent; text-decoration: none; margin-left: 2px;
}
.cat-tab-todas svg { width: 15px; height: 15px; }
.cat-tab-todas:hover { background: var(--surface); color: var(--text); }

.hero-title {
    position: relative;
    font-family: 'Nunito', sans-serif; font-weight: 800;
    font-size: clamp(38px, 5.6vw, 58px); line-height: 1.1;
    color: var(--text); margin: 0 auto 10px; max-width: 700px;
}
.hero-title .accent {
    color: var(--accent); /* respaldo si el navegador no soporta el degradado en texto */
    background: linear-gradient(100deg, var(--accent), var(--accent-2) 90%);
    -webkit-background-clip: text; background-clip: text;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
    .hero-title .accent { color: transparent; }
}
.hero-title .accent-wrap { position: relative; display: inline-block; }
.hero-title .swoosh {
    position: absolute; left: -4%; right: -4%; bottom: -6px; width: 108%; height: 12px;
    pointer-events: none;
}
.hero-title .swoosh path {
    fill: none; stroke: url(#swooshGrad); stroke-width: 5; stroke-linecap: round;
    stroke-dasharray: 220; stroke-dashoffset: 220;
    animation: trazo-subrayado 1.1s .3s ease-out forwards;
}
@keyframes trazo-subrayado { to { stroke-dashoffset: 0; } }
.hero-title-sparks { position: absolute; inset: 0; pointer-events: none; }
.hero-title-sparks .spark {
    position: absolute; border-radius: 50%; filter: blur(1px);
    background: radial-gradient(circle, rgba(18,184,166,.5), transparent 70%);
    animation: flotar-spark 5s ease-in-out infinite;
}
.hero-title-sparks .s1 { width: 8px; height: 8px; top: -8px; left: 6%; }
.hero-title-sparks .s2 {
    width: 6px; height: 6px; top: 10px; right: 8%; animation-delay: 1.4s;
    background: radial-gradient(circle, rgba(108,92,231,.55), transparent 70%);
}
@keyframes flotar-spark {
    0%, 100% { transform: translateY(0); opacity: .7; }
    50% { transform: translateY(-9px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-title .swoosh path { animation: none; stroke-dashoffset: 0; }
    .hero-title-sparks .spark { animation: none; }
}
.hero-eligeme p.muted { max-width: 480px; margin: 0 auto 24px; font-size: 14.5px; }

.stats-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }

/* pastilla de votos totales — reutiliza .votes-pill fuera del header, pero en índigo (la ámbar queda solo para los Credivotos del header) */
.hero-eligeme .votes-pill {
    background: var(--accent-2);
    display: inline-flex; margin: 0 auto 8px; padding: 11px 24px 11px 18px; font-size: 14px;
}
.hero-eligeme .votes-pill strong { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 16px; }

/* brillo que recorre la pastilla cada cierto tiempo */
.votes-pill.brillo { position: relative; overflow: hidden; }
.votes-pill.brillo::after {
    content: '';
    position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.6), transparent);
    transform: skewX(-20deg);
    animation: brillo-pill 3s ease-in-out infinite;
}
@keyframes brillo-pill {
    0%   { left: -60%; }
    35%  { left: 130%; }
    100% { left: 130%; }
}

/* pastilla de Credivotos del header: misma altura que los icon-btn de al lado */
.nav-links .votes-pill { height: 38px; padding: 0 16px; box-sizing: border-box; }

.categorias-label {
    font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted); font-weight: 700; margin-bottom: 14px;
}

.home-layout {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 22px;
    align-items: start;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 34px; margin-bottom: 30px;
}
.cat-card { scroll-margin-top: 100px; }
.cat-card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; gap: 10px; }
.cat-card-head h3 { font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 19px; color: var(--text); text-align: left; }
.cat-participantes { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* ---- fila de ítem: cápsula plana, sin borde, poco redondeada ---- */
.item-row {
    position: relative;
    display: flex; align-items: center; gap: 14px;
    background: rgba(18,184,166,.08);
    border-radius: 8px;
    padding: 13px 14px;
    box-shadow: 0 8px 20px rgba(18,184,166,.14), 0 2px 6px rgba(15,15,31,.05);
    transition: transform .15s ease, box-shadow .15s ease;
}
.item-row + .item-row { margin-top: 9px; }

/* ---- efecto "sobresalir": el ítem sobre el que se pasa el mouse o se
   tiene el tooltip de compra abierto (toque en móvil) ---- */
.item-row:hover, .item-row.tooltip-abierto {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 16px 32px rgba(15,15,31,.20), 0 6px 14px rgba(15,15,31,.14);
    z-index: 20;
}

/* ---- tooltip de compra: burbuja de chat flotante al pasar el mouse o
   tocar cada ítem (mensaje + paquete de Credivotos más cercano) ---- */
.tooltip-cta {
    position: absolute;
    bottom: calc(100% + 16px);
    left: 50%;
    width: 262px;
    max-width: calc(100vw - 32px);
    transform: translateX(-50%) translateY(4px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(0,0,0,.22), 0 2px 8px rgba(0,0,0,.08);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
    z-index: 30;
    text-align: center;
}
.tooltip-cta-cola {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    width: 18px; height: 18px;
    background: #fff;
    transform: translateX(-50%) translateY(4px) rotate(45deg);
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
    z-index: 29;
}
.item-row:hover .tooltip-cta, .item-row.tooltip-abierto .tooltip-cta {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.item-row:hover .tooltip-cta-cola, .item-row.tooltip-abierto .tooltip-cta-cola {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) rotate(45deg);
}
.tooltip-cta-msg {
    background: var(--header-bg);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    padding: 12px 16px;
}
.tooltip-cta-buy {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    text-align: left;
}
.tooltip-cta-valor { line-height: 1.2; }
.tooltip-cta-valor strong {
    display: block; font-family: 'Nunito', sans-serif; font-weight: 800;
    font-size: 14.5px; color: var(--text);
}
.tooltip-cta-valor small {
    display: block; font-family: 'Inter', sans-serif; font-weight: 600;
    font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px;
}
.tooltip-cta-btn {
    background: var(--accent); color: #fff; border: none; border-radius: 999px;
    padding: 8px 16px; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 12px;
    white-space: nowrap; flex-shrink: 0; text-decoration: none; display: inline-block;
}
.tooltip-cta-precio-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.tooltip-cta-precio {
    font-family: 'Inter', sans-serif; font-weight: 700; font-size: 10px;
    color: var(--text-muted); white-space: nowrap;
}
.tooltip-cta-precio strong { color: var(--accent); font-size: 11.5px; }

.item-rank {
    font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 22px;
    width: 28px; text-align: left; flex-shrink: 0; line-height: 1;
}
.item-rank.m1 { color: var(--accent); }
.item-rank.m2 { color: #3FCBBB; }
.item-rank.m3 { color: #7ADBCF; }
.item-rank.mN { color: #C9EEE8; font-size: 18px; }

.item-mid { flex: 1; min-width: 0; text-align: left; }
.item-nombre {
    font-weight: 600; font-size: 15.5px; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.item-fecha { font-size: 10px; color: #B4B4C2; margin: 2px 0 6px; }
.item-progress { height: 3px; background: rgba(18,184,166,.16); border-radius: 2px; margin-top: 7px; overflow: hidden; }
.item-progress-fill { height: 100%; border-radius: 2px; background: var(--accent); }
.item-progress-fill.gold { background: var(--accent); }

.item-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.item-votes-block { text-align: right; line-height: 1.2; }
.item-votes-block strong { display: block; font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 14px; color: var(--accent); }
.item-votes-block span { font-size: 9.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
/* fallback: item-votos usado como texto único en algunas vistas */
.item-votos { font-size: 12px; color: var(--accent); font-weight: 600; }

.btn-votar-mini {
    width: 34px; height: 34px; border-radius: 999px;
    border: none; background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; font-size: 14px; line-height: 1;
    box-shadow: 0 6px 14px rgba(18,184,166,.4), 0 1px 0 rgba(255,255,255,.3) inset;
}
.btn-votar-mini svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-votar-mini:hover { opacity: .85; }
.btn-votar-mini:disabled { opacity: .5; cursor: default; }
.btn-votar-mini.btn-icon-secondary {
    background: var(--surface-2); color: var(--text-muted);
    box-shadow: none;
}

/* segunda columna de la grilla: acento índigo, para variar el color */
.cat-card:nth-of-type(2n) .item-row {
    background: rgba(108,92,231,.09);
    box-shadow: 0 8px 20px rgba(108,92,231,.16), 0 2px 6px rgba(15,15,31,.05);
}
.cat-card:nth-of-type(2n) .btn-votar-mini:not(.btn-icon-secondary) {
    box-shadow: 0 6px 14px rgba(108,92,231,.4), 0 1px 0 rgba(255,255,255,.3) inset;
}
.cat-card:nth-of-type(2n) .item-rank.m1 { color: var(--accent-2); }
.cat-card:nth-of-type(2n) .item-rank.m2 { color: #8579EE; }
.cat-card:nth-of-type(2n) .item-rank.m3 { color: #A79DF2; }
.cat-card:nth-of-type(2n) .item-rank.mN { color: #C7C0F5; }
.cat-card:nth-of-type(2n) .item-progress { background: rgba(108,92,231,.18); }
.cat-card:nth-of-type(2n) .item-progress-fill { background: var(--accent-2); }
.cat-card:nth-of-type(2n) .item-votes-block strong,
.cat-card:nth-of-type(2n) .item-votos { color: var(--accent-2); }
.cat-card:nth-of-type(2n) .btn-votar-mini:not(.btn-icon-secondary) { background: var(--accent-2); }

.cat-card-footer { margin-top: 14px; padding-top: 0; border-top: none; }
.cat-card-footer a {
    font-size: 13px; font-weight: 700; text-decoration: none;
    display: inline-flex; align-items: center; gap: 4px;
}
.cat-card-footer a svg { width: 13px; height: 13px; flex-shrink: 0; }

.ranking-vacio { color: var(--text-muted); font-size: 14px; padding: 8px 0; }

/* ---- páginas de error (404.php, 500.php) ---- */
.error-pagina { text-align: center; padding: 60px 0; }
.error-pagina-codigo {
    font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 64px;
    line-height: 1; margin-bottom: 8px; color: var(--accent-2);
}
.error-pagina h1 { font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 22px; color: var(--text); margin-bottom: 10px; }
.error-pagina .muted { max-width: 420px; margin: 0 auto 26px; }
.error-pagina-acciones { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- sidebar de la portada: "Top global" + "% por categoría" ----
   Deliberadamente pequeña y sin fondo/borde de card, solo una línea
   divisoria a la izquierda — no debe competir visualmente con las
   categorías principales. */
.home-sidebar { min-width: 0; }
.global-ranking {
    padding: 2px 0 0 14px;
    border-left: 1px solid var(--border);
}
.global-ranking h3, .cat-share h3 {
    font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 12px;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px;
    margin-bottom: 10px;
}
.global-row { display: flex; align-items: baseline; gap: 7px; padding: 5px 0; }
.global-rank { font-weight: 700; font-size: 11px; color: var(--text-muted); width: 13px; flex-shrink: 0; }
.global-mid { flex: 1; min-width: 0; }
.global-nombre {
    font-weight: 700; font-size: 11.5px; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.global-cat {
    font-size: 9.5px; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.global-total { font-weight: 700; font-size: 10.5px; color: var(--text-muted); text-align: right; flex-shrink: 0; }

.cat-share { margin-top: 22px; padding-left: 14px; border-left: 1px solid var(--border); }
.cat-share-row { padding: 5px 0; }
.cat-share-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 3px; }
.cat-share-nombre {
    font-weight: 700; font-size: 11px; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cat-share-pct { font-weight: 700; font-size: 10.5px; color: var(--text-muted); flex-shrink: 0; }
.cat-share-bar { height: 3px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.cat-share-bar-fill { height: 100%; border-radius: 2px; background: var(--accent-2); }

/* ---- Todas las categorías (categorias.php) ---- */
.categorias-todas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 24px;
}
@media (max-width: 640px) {
    .categorias-todas-grid { grid-template-columns: 1fr; }
}
.categoria-mini-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    text-decoration: none;
    display: block;
    box-shadow: 0 8px 18px rgba(15,15,31,.06), 0 2px 5px rgba(15,15,31,.05);
    transition: background .15s, transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.categoria-mini-card:hover {
    border-color: var(--border-hi);
    transform: translateY(-5px) scale(1.015);
    box-shadow: 0 16px 32px rgba(15,15,31,.20), 0 6px 14px rgba(15,15,31,.14);
    z-index: 5;
}
.categoria-mini-card.cat-mini-lider { border-color: rgba(255,184,0,.35); }
.categoria-mini-card.cat-mini-lider::before {
    content: ''; position: absolute; top: 0; left: 16px; right: 16px; height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, var(--gold), #FFD866);
}
.cat-mini-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.categoria-mini-card h3 {
    font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 16px;
    color: var(--text); margin-bottom: 4px;
}
.categoria-mini-card p { margin: 0; font-size: 12.5px; }

.badge-lider {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 9.5px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase;
    color: var(--gold); background: rgba(255,184,0,.14);
    border-radius: 999px; padding: 3px 9px 3px 7px; white-space: nowrap; flex-shrink: 0;
}
.badge-lider-dot {
    width: 5px; height: 5px; border-radius: 50%; background: var(--gold); flex-shrink: 0;
    animation: pulso-punto 1.6s ease-in-out infinite;
}

.categoria-mini-top3 {
    list-style: none; margin: 12px 0 0; padding-top: 12px;
    border-top: 1px solid var(--border);
}
.categoria-mini-top3 li { display: block; margin-bottom: 8px; }
.categoria-mini-top3 li:last-child { margin-bottom: 0; }
.categoria-mini-top3 .top3-fila {
    display: flex; align-items: baseline; gap: 8px;
    font-size: 13px; color: var(--text); margin-bottom: 3px;
}
.categoria-mini-top3 .top3-fila span:first-child {
    font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 12px;
    color: var(--accent); width: 14px; flex-shrink: 0;
}
.categoria-mini-top3 .top3-nombre {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.categoria-mini-top3 .top3-votos {
    font-weight: 700; font-size: 11px; color: var(--text-muted); flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.categoria-mini-card.cat-mini-lider .categoria-mini-top3 li:first-child .top3-votos { color: var(--gold); }
.categoria-mini-card.cat-mini-lider .categoria-mini-top3 li:first-child .top3-barra-fill {
    background: linear-gradient(90deg, var(--gold), #FFD866);
}
.categoria-mini-top3 .top3-barra {
    height: 3px; background: rgba(18,184,166,.16); border-radius: 2px;
    margin-left: 22px; overflow: hidden;
}
.categoria-mini-top3 .top3-barra-fill { height: 100%; border-radius: 2px; background: var(--accent); }

.cta-banner {
    position: relative; overflow: hidden;
    background:
        radial-gradient(560px 200px at 88% -30%, rgba(108,92,231,.16), transparent 60%),
        radial-gradient(420px 200px at 6% 130%, rgba(18,184,166,.14), transparent 60%),
        var(--surface);
    border: 1px solid var(--border-hi);
    border-radius: 16px; padding: 28px 32px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    box-shadow: 0 18px 40px rgba(15,15,31,.10), 0 4px 10px rgba(15,15,31,.06);
}
.cta-banner::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.cta-banner h3 { font-family: 'Nunito', sans-serif; font-size: 19px; margin-bottom: 6px; color: var(--text); }
.cta-banner p { color: var(--text-muted); font-size: 14px; margin-bottom: 0; max-width: 460px; }
.cta-banner-copy { display: flex; gap: 16px; align-items: flex-start; flex: 1; min-width: 240px; }
.cta-banner-icon {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex; align-items: center; justify-content: center; color: #fff;
    box-shadow: 0 8px 16px rgba(18,184,166,.28);
}
.cta-banner-icon svg { width: 20px; height: 20px; }

@media (max-width: 760px) {
    .topbar-wrap { padding: 16px 16px 0; }
    main.content { padding: 28px 16px 40px; }
    .cta-banner { padding: 22px; }
    header.site-header { justify-content: center; }
    .nav-links { justify-content: center; width: 100%; }

    /* la sidebar de "Top global" / "% por categoría" pasa a ir debajo de
       las categorías principales en vez de al costado */
    .home-layout { grid-template-columns: 1fr; }
    .global-ranking, .cat-share { margin-top: 26px; padding-left: 0; border-left: none; border-top: 1px solid var(--border); padding-top: 14px; }
}

/* ---- barra "glass" flotante y fija arriba, aparece al desplazar hacia
   abajo en cualquier página (ver includes/header.php) ---- */
.glass-topbar-wrap {
    position: fixed; top: 14px; left: 0; right: 0;
    z-index: 500;
    padding: 0 16px;
    display: flex; justify-content: center;
}
.glass-topbar-wrap[hidden] { display: none; }
.glass-topbar {
    display: flex; align-items: center; gap: 10px;
    width: 100%; max-width: none;
    padding: 13px 16px;
    background: rgba(255,255,255,.72);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15,15,31,.14);
}
.glass-logo-mark {
    width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 3px; padding-left: 7px; text-decoration: none;
}
.glass-logo-mark i { display: block; height: 2.5px; border-radius: 2px; background: #fff; }
.glass-logo-mark i:nth-child(1) { width: 13px; }
.glass-logo-mark i:nth-child(2) { width: 10px; }
.glass-logo-mark i:nth-child(3) { width: 6px; }

.glass-cats {
    display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none;
    background: rgba(239,239,245,.75); border-radius: 12px; padding: 4px; flex: 1; min-width: 0;
    cursor: grab;
}
.glass-cats::-webkit-scrollbar { display: none; }
.glass-cats.arrastrando { cursor: grabbing; user-select: none; }
/* dentro de la barra glass, la .cats-tabs-scroll clonada se deja sin su
   propio scroll — el que se desliza ahí es .glass-cats (el contenedor) */
.glass-cats .cats-tabs-scroll {
    display: flex; overflow: visible; cursor: default;
}
.glass-cats .cat-tab { padding: 7px 11px; font-size: 12px; }
.glass-cats .cat-tab span, .glass-cats .cat-tab-todas { flex-shrink: 0; }

.glass-hamburger-btn {
    width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border);
    background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    flex-shrink: 0; cursor: pointer;
}
.glass-hamburger-btn i { display: block; width: 15px; height: 2px; border-radius: 2px; background: var(--text); }

.glass-hamburger-menu {
    display: none;
    position: fixed; top: 68px; right: 16px; width: 220px;
    background: #fff; border-radius: 14px; box-shadow: 0 16px 32px rgba(15,15,31,.18);
    padding: 8px; text-align: left; z-index: 501;
}
.glass-hamburger-menu.abierto { display: block; }
.glass-hamburger-menu a {
    display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 9px;
    color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 600;
}
.glass-hamburger-menu a:hover { background: var(--surface-2); }
.glass-hamburger-menu a svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }

/* fila de Credivotos dentro del menú hamburguesa — mismo ámbar del pill del
   header, con su desglose que se abre/cierra en línea (no es un popover) */
.glass-menu-credivotos {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 11px 12px; border-radius: 9px; border: none; background: transparent;
    font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--amber);
    text-align: left; cursor: pointer;
}
.glass-menu-credivotos:hover { background: var(--surface-2); }
.glass-menu-credivotos svg { width: 16px; height: 16px; color: var(--amber); flex-shrink: 0; }
.glass-menu-credivotos-total { margin-left: auto; }
.glass-menu-desglose { display: none; padding: 2px 12px 10px; }
.glass-menu-desglose.abierto { display: block; }

@media (max-width: 760px) {
    .glass-topbar-wrap { top: 10px; padding: 0 10px; }
}