/* LaPrimicia CMS 1.5 — piezas comunes a todos los temas */
:root {
  --xp: var(--p, #d71920);
  --xtx: #1f2937;
  --xmu: #6b7280;
  --xbd: #e5e7eb;
  --xbg: #fff;
  --xsoft: #f6f7f9;
  --xr: 14px;
}
[data-theme="dark"] {
  --xtx: #e8e8ec;
  --xmu: #a1a4ad;
  --xbd: #3a3b40;
  --xbg: #26272b;
  --xsoft: #2e2f33;
}
.x-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.x-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--xp); color: #fff !important; border: 0; border-radius: 999px; padding: 11px 20px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none !important; line-height: 1.2; }
.x-btn:hover { filter: brightness(1.07); }
.x-btn.ghost { background: transparent; color: var(--xtx) !important; border: 1px solid var(--xbd); }
.x-btn.wa { background: #25d366; }

/* ---------- Cabecera de la noticia: en vivo, patrocinio, audio, resumen ---------- */
.x-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 22px; }
.x-livebadge { display: inline-flex; align-items: center; gap: 8px; background: #e11d48; color: #fff !important; font-weight: 800; font-size: 13px; letter-spacing: .04em; padding: 7px 13px; border-radius: 999px; text-decoration: none !important; }
.x-livebadge i, .x-live-h i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: xblink 1.1s infinite; display: inline-block; }
@keyframes xblink { 50% { opacity: .25; } }
.x-sponsor { font-size: 14px; color: var(--xmu); padding: 7px 13px; border: 1px dashed var(--xbd); border-radius: 999px; }
.x-sponsor span { font-weight: 800; color: #b45309; text-transform: uppercase; font-size: 12px; letter-spacing: .06em; }
.x-tts { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--xbd); background: var(--xbg); color: var(--xtx); border-radius: 999px; padding: 6px 16px 6px 6px; cursor: pointer; font: inherit; font-size: 14px; }
.x-tts b { font-weight: 700; }
.x-tts small { color: var(--xmu); }
.x-tts-i { width: 30px; height: 30px; border-radius: 50%; background: var(--xp); position: relative; flex: none; }
.x-tts-i::after { content: ""; position: absolute; left: 12px; top: 9px; border-left: 9px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.x-tts.on .x-tts-i::after { left: 10px; top: 9px; width: 3px; height: 12px; border: 0; background: #fff; box-shadow: 6px 0 0 #fff; }
.x-sum { flex-basis: 100%; background: var(--xsoft); border-left: 4px solid var(--xp); border-radius: 0 var(--xr) var(--xr) 0; padding: 14px 18px; }
.x-sum b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--xp); margin-bottom: 6px; }
.x-sum ul { margin: 0; padding-left: 18px; }
.x-sum li { margin: 4px 0; font-size: .93em; line-height: 1.45; }

/* ---------- Minuto a minuto ---------- */
.x-live { margin: 34px 0; border-top: 3px solid #e11d48; }
.x-live-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.x-live-h b { display: inline-flex; align-items: center; gap: 8px; color: #e11d48; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; }
.x-live-h span { color: var(--xmu); font-size: 14px; }
.x-live-new { display: block; width: 100%; margin: 0 0 12px; padding: 10px; border: 0; border-radius: 999px; background: #e11d48; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.x-le { display: grid; grid-template-columns: 74px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--xbd); }
.x-le.fresh { animation: xfresh 2.5s ease; }
@keyframes xfresh { from { background: rgba(225, 29, 72, .1); } }
.x-le time { display: flex; flex-direction: column; font-size: 14px; }
.x-le time b { color: #e11d48; }
.x-le time small { color: var(--xmu); }
.x-le-b h3 { margin: 0 0 6px; font-size: 1.1em; line-height: 1.25; }
.x-le-b .x-p { margin: 0 0 .7em; }
.x-le-b img { max-width: 100%; height: auto; border-radius: 10px; }
.x-le.pin { background: var(--xsoft); border-radius: var(--xr); padding: 16px; border: 0; margin-bottom: 8px; }
.x-le-pin { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; background: #e11d48; color: #fff; padding: 2px 8px; border-radius: 6px; margin-bottom: 6px; }

/* ---------- Encuesta ---------- */
.x-poll { margin: 28px 0; padding: 20px; border: 1px solid var(--xbd); border-radius: 18px; background: var(--xbg); }
.x-poll-k { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--xp); }
.x-poll-q { display: block; font-size: 1.15em; line-height: 1.3; margin: 6px 0 14px; color: var(--xtx); }
.x-poll-o { display: flex; flex-direction: column; gap: 8px; }
.x-poll-o button { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border: 1.5px solid var(--xbd); border-radius: 12px; background: var(--xbg); color: var(--xtx); font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
.x-poll-o button:hover:not([disabled]) { border-color: var(--xp); }
.x-poll-o button[disabled] { cursor: default; }
.x-poll-o .x-bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--xp) 16%, transparent); transition: width .6s ease; }
.x-poll-o .mine .x-bar { background: color-mix(in srgb, var(--xp) 30%, transparent); }
.x-poll-o .x-lbl, .x-poll-o .x-pct { position: relative; }
.x-poll-o .x-pct { font-weight: 800; }
.x-poll-n { display: block; margin-top: 10px; color: var(--xmu); font-size: 13px; }

/* ---------- Galería + visor ---------- */
.x-gal { display: grid; gap: 6px; margin: 26px 0 6px; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 130px; }
.x-gal .x-gi { position: relative; display: block; overflow: hidden; border-radius: 10px; }
.x-gal .x-gi:first-child { grid-column: span 2; grid-row: span 2; }
.x-gal.n1 { grid-template-columns: 1fr; grid-auto-rows: auto; }
.x-gal.n1 .x-gi:first-child { grid-column: auto; grid-row: auto; }
.x-gal.n2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 240px; }
.x-gal.n2 .x-gi:first-child { grid-column: auto; grid-row: auto; }
.x-gal.n3 { grid-template-columns: 2fr 1fr; grid-auto-rows: 150px; }
.x-gal.n3 .x-gi:first-child { grid-column: auto; }
.x-gal .x-gi.hid { display: none; }
.x-gal img { width: 100% !important; height: 100% !important; object-fit: cover; margin: 0 !important; border-radius: 0 !important; transition: transform .4s; }
.x-gal .x-gi:hover img { transform: scale(1.04); }
.x-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; font-size: 26px; font-weight: 800; }
.x-gal-cap { font-size: 13px; color: var(--xmu); margin-bottom: 24px; }
.x-lb { position: fixed; inset: 0; z-index: 9999; background: rgba(5, 6, 8, .96); display: flex; flex-direction: column; color: #fff; }
.x-lb-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: 14px; }
.x-lb-top button, .x-lb-nav { background: rgba(255, 255, 255, .12); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; cursor: pointer; }
.x-lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; min-height: 0; touch-action: pan-y; }
.x-lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.x-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.x-lb-nav.prev { left: 12px; }
.x-lb-nav.next { right: 12px; }
.x-lb-cap { padding: 12px 18px 20px; text-align: center; font-size: 15px; color: #d1d5db; min-height: 24px; }

/* ---------- Boletín ---------- */
.x-nl { margin: 34px 0; padding: 22px; border-radius: 18px; background: var(--xsoft); display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; }
.x-nl > div:first-child { flex: 1 1 260px; }
.x-nl b { display: block; font-size: 1.12em; color: var(--xtx); }
.x-nl span { color: var(--xmu); font-size: 15px; }
.x-nl-f { display: flex; gap: 8px; flex: 1 1 300px; }
.x-nl-f input[type=email] { flex: 1; min-width: 0; border: 1px solid var(--xbd); border-radius: 999px; padding: 11px 16px; font: inherit; font-size: 15px; background: var(--xbg); color: var(--xtx); }
.x-nl-f button { border: 0; border-radius: 999px; background: var(--xp); color: #fff; font: inherit; font-weight: 700; padding: 11px 18px; cursor: pointer; }
.x-nl-ok { flex-basis: 100%; font-weight: 700; color: #15803d; }
.x-nl-ok.err { color: #b91c1c; }

/* ---------- Comentarios ---------- */
.x-cm { margin: 40px 0 20px; }
.x-cm h2 { font-size: 1.4em; margin: 0 0 14px; }
.x-cm-empty { color: var(--xmu); padding: 10px 0 18px; }
.x-c { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--xbd); }
.x-c .x-av { width: 38px; height: 38px; border-radius: 50%; background: var(--xsoft); color: var(--xtx); display: grid; place-items: center; font-weight: 800; }
.x-c.staff .x-av { background: var(--xp); color: #fff; }
.x-c-h { font-size: 14px; color: var(--xmu); }
.x-c-h b { color: var(--xtx); margin-right: 6px; }
.x-c-h em { font-style: normal; background: var(--xp); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; margin-right: 6px; }
.x-c-t { margin: 4px 0 6px; white-space: pre-line; word-wrap: break-word; font-size: 16px; line-height: 1.5; }
.x-c-r { background: none; border: 0; color: var(--xp); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 0; }
.x-c .x-c { border: 0; padding-bottom: 0; }
.x-cm-f { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.x-cm-f textarea, .x-cm-f input { width: 100%; border: 1px solid var(--xbd); border-radius: 12px; padding: 11px 14px; font: inherit; font-size: 15px; background: var(--xbg); color: var(--xtx); box-sizing: border-box; }
.x-cm-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.x-cm-row button { border: 0; border-radius: 12px; background: var(--xp); color: #fff; font: inherit; font-weight: 700; padding: 0 20px; cursor: pointer; }
.x-cm-f small { color: var(--xmu); }
.x-cm-msg { font-weight: 700; color: #15803d; }
.x-cm-msg.err { color: #b91c1c; }
.x-cm-reply { font-size: 14px; color: var(--xmu); }
.x-cm-reply button { border: 0; background: none; color: var(--xp); cursor: pointer; font: inherit; }

/* ---------- Publicidad propia ---------- */
.x-ad { text-align: center; margin: 0 auto; }
.x-ad:empty { display: none; }
.x-ad .x-ad-l { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--xmu); margin-bottom: 4px; }
.x-ad img { max-width: 100%; height: auto; display: inline-block; border-radius: 6px; }

/* ---------- Barra de clima, dólar y alertas ---------- */
.x-alert { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 9px 44px 9px 16px; font-size: 14.5px; font-weight: 600; color: #fff; background: #2563eb; position: relative; text-align: center; line-height: 1.35; }
.x-alert.warn { background: #d97706; }
.x-alert.danger { background: #dc2626; }
.x-alert a { color: #fff !important; text-decoration: underline; }
.x-alert button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .2); border: 0; color: #fff; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; }
.x-wbar { background: #111318; color: #e5e7eb; font-size: 13px; }
.x-wbar-in { max-width: 1240px; margin: 0 auto; padding: 0 16px; height: 32px; display: flex; align-items: center; gap: 18px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.x-wbar-in::-webkit-scrollbar { display: none; }
.x-wbar b { color: #fff; }
.x-wbar span { opacity: .9; }

/* ---------- Aviso para notificaciones ---------- */
.x-pushask { position: fixed; z-index: 9990; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(440px, calc(100% - 24px)); background: var(--xbg); color: var(--xtx); border-radius: 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); padding: 16px 18px; display: grid; grid-template-columns: 42px 1fr; gap: 12px; animation: xup .35s ease; border: 1px solid var(--xbd); }
@keyframes xup { from { transform: translate(-50%, 30px); opacity: 0; } }
.x-pushask .x-bell { width: 42px; height: 42px; border-radius: 12px; background: var(--xp); display: grid; place-items: center; font-size: 20px; }
.x-pushask p { margin: 0 0 10px; font-size: 15px; line-height: 1.35; font-weight: 600; }
.x-pushask div div { display: flex; gap: 8px; justify-content: flex-end; }
.x-pushask button { border: 0; border-radius: 999px; padding: 9px 16px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.x-pushask .no { background: transparent; color: var(--xmu); }
.x-pushask .yes { background: var(--xp); color: #fff; }

/* ---------- Páginas: clasificados, negocios, shorts ---------- */
.x-page { font-size: 16px; }
.x-page p { margin: 0 0 1em; }
.x-lead { color: var(--xmu); font-size: 17px; }
.x-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.x-search { display: flex; gap: 6px; flex: 1 1 260px; }
.x-search input { flex: 1; min-width: 0; border: 1px solid var(--xbd); border-radius: 999px; padding: 10px 16px; font: inherit; background: var(--xbg); color: var(--xtx); }
.x-search button { border: 0; border-radius: 999px; background: var(--xtx); color: var(--xbg); padding: 0 16px; font: inherit; font-weight: 700; cursor: pointer; }
.x-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 20px; }
.x-chips a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--xbd); font-size: 14px; font-weight: 600; text-decoration: none !important; color: var(--xtx) !important; }
.x-chips a.on, .x-chips a:hover { background: var(--xp); border-color: var(--xp); color: #fff !important; }
.x-lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.x-li { display: flex; flex-direction: column; border: 1px solid var(--xbd); border-radius: 16px; overflow: hidden; text-decoration: none !important; color: var(--xtx) !important; background: var(--xbg); transition: transform .15s, box-shadow .15s; }
.x-li:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .08); }
.x-li.feat { border: 2px solid #f59e0b; }
.x-li-img { position: relative; aspect-ratio: 16/10; background: var(--xsoft); display: block; }
.x-li-img img { width: 100% !important; height: 100% !important; object-fit: cover; margin: 0 !important; border-radius: 0 !important; }
.x-li-img em { position: absolute; left: 10px; top: 10px; background: #f59e0b; color: #fff; font-style: normal; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; }
.x-li-ph { display: grid; place-items: center; height: 100%; font-size: 42px; font-weight: 800; color: var(--xmu); }
.x-li-b { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.x-li-b small { color: var(--xp); font-weight: 700; font-size: 12.5px; }
.x-li-b b { font-size: 16.5px; line-height: 1.25; }
.x-li-d { color: var(--xmu); font-size: 14px; line-height: 1.4; }
.x-li-price { font-weight: 800; color: #15803d; }
.x-li-price.big { font-size: 22px; }
.x-ld-img { width: 100%; border-radius: 16px; margin: 0 0 16px !important; }
.x-ld-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; color: var(--xmu); }
.x-tag { background: var(--xp); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.x-ld-desc { font-size: 17px; line-height: 1.6; margin-bottom: 18px; }
.x-ld-contact { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.x-ld-list { list-style: none; padding: 0; margin: 0 0 16px; }
.x-ld-list li { padding: 6px 0; border-bottom: 1px solid var(--xbd); }
.x-small { font-size: 13px; color: var(--xmu); }
.x-empty, .x-note { padding: 18px; background: var(--xsoft); border-radius: 14px; color: var(--xmu); text-align: center; }
.x-err { padding: 12px 16px; background: #fee2e2; color: #991b1b; border-radius: 12px; font-weight: 600; }
.x-pay { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; padding: 14px 16px; border-radius: 14px; margin: 12px 0 18px; line-height: 1.5; }
.x-pay b { display: block; margin-bottom: 4px; }
.x-done { text-align: center; padding: 26px 16px; }
.x-done b { font-size: 24px; display: block; margin-bottom: 6px; }
.x-form { display: flex; flex-direction: column; gap: 14px; }
.x-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 700; font-size: 14px; }
.x-form input, .x-form textarea, .x-form select { border: 1px solid var(--xbd); border-radius: 12px; padding: 11px 14px; font: inherit; font-weight: 400; font-size: 15px; background: var(--xbg); color: var(--xtx); }
.x-form .x-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.x-form .x-btn { align-self: flex-start; }
.x-shorts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.x-sh { position: relative; aspect-ratio: 9/16; border: 0; padding: 0; border-radius: 14px; overflow: hidden; background: #111; cursor: pointer; text-align: left; }
.x-sh img, .x-sh video { width: 100% !important; height: 100% !important; object-fit: cover; margin: 0 !important; border-radius: 0 !important; }
.x-sh::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); }
.x-sh b { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 1; color: #fff; font-size: 14px; line-height: 1.25; }
.x-sh-play { position: absolute; z-index: 1; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .5); }
.x-sh-play::after { content: ""; position: absolute; left: 12px; top: 9px; border-left: 9px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.x-sh-ph { display: block; height: 100%; background: linear-gradient(160deg, var(--xp), #111); }
.x-sv { position: fixed; inset: 0; z-index: 9999; background: #000; overflow-y: scroll; scroll-snap-type: y mandatory; overscroll-behavior: contain; }
.x-sv-i { height: 100vh; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; position: relative; }
.x-sv-i video, .x-sv-i iframe { height: 100%; max-width: 100%; aspect-ratio: 9/16; border: 0; background: #000; object-fit: contain; }
.x-sv-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 26px; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); color: #fff; pointer-events: none; max-width: 560px; margin: 0 auto; }
.x-sv-cap b { display: block; font-size: 17px; line-height: 1.3; }
.x-sv-cap a { pointer-events: auto; display: inline-block; margin-top: 8px; background: #fff; color: #000 !important; border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 14px; text-decoration: none !important; }
.x-sv-close { position: fixed; z-index: 10000; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-size: 22px; cursor: pointer; }

@media (max-width: 640px) {
  .x-cm-row { grid-template-columns: 1fr; }
  .x-cm-row button { padding: 12px; }
  .x-form .x-2 { grid-template-columns: 1fr; }
  .x-le { grid-template-columns: 1fr; gap: 6px; }
  .x-le time { flex-direction: row; gap: 8px; }
  .x-gal { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 110px; }
  .x-nl-f { flex-direction: column; }
  .x-lb-nav { display: none; }
}
@media print { .x-top .x-tts, .x-cm, .x-nl, .x-pushask, .x-wbar, .x-alert, .x-ad { display: none !important; } }

/* ---------- Campana fija y ayuda de notificaciones ---------- */
.x-bellbtn { position: fixed; z-index: 9980; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; background: var(--xp); color: #fff; font: inherit; font-size: 14px; font-weight: 700; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); cursor: pointer; }
.x-bellbtn span { display: inline; }
@media (max-width: 640px) { .x-bellbtn { padding: 10px 12px; } .x-bellbtn span { display: none; } }
.x-steps { margin: 0 0 10px; padding-left: 18px; font-size: 14px; line-height: 1.45; }
.x-steps li { margin: 3px 0; }
.x-toast { position: fixed; z-index: 9995; left: 50%; bottom: 20px; transform: translateX(-50%); background: #111; color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
