/* ===== ALERTA — última hora, oscuro, imagen primero (mobile-first) ===== */
:root {
    --bg-body: #0b0b0c; --surface: #151517; --surface-subtle: #1b1b1e; --surface-hover: #222226;
    --border: #2c2c31; --border-subtle: #232327;
    --text-primary: #f6f6f7; --text-main: #f6f6f7; --text-headline: #ffffff; --text-body: #d4d4d8; --text-muted: #9a9aa3; --text-light: #6f6f78;
    --font-serif: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-sans: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-headline: 'Barlow Condensed', 'Arial Narrow', Impact, sans-serif; --font-body: 'Barlow', system-ui, sans-serif;
    --radius-sm: 4px; --radius-md: 6px; --radius-lg: 8px; --radius-full: 999px;
    --shadow-card: 0 2px 12px rgba(0,0,0,.5); --transition: all .15s ease;
    --accent-orange: var(--accent); --primary-dark: var(--accent);
}
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body.al { background: var(--bg-body); color: var(--text-body); font-family: var(--font-body); font-size: 17px; line-height: 1.55; margin: 0; padding-bottom: env(safe-area-inset-bottom); }
:where(body.al) a { color: inherit; text-decoration: none; }
:where(body.al) img { max-width: 100%; height: auto; display: block; }
.al-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 14px; box-sizing: border-box; }

/* Barra superior */
.al-bar { position: sticky; top: 0; z-index: 60; background: var(--bar-bg, #000); border-bottom: 3px solid var(--accent); }
.al-bar .al-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 54px; gap: 10px; }
.al-brand { font: 800 1.45rem/1 var(--font-headline); letter-spacing: .01em; text-transform: uppercase; color: #fff; display: flex; align-items: center; gap: 8px; }
.al-brand img { max-height: 34px; }
.al-brand--logo img { max-height: 42px; width: auto; border-radius: 50%; }
.al-brand::before { content: ""; width: 10px; height: 26px; background: var(--accent); transform: skewX(-18deg); flex: 0 0 auto; }
.al-brand--logo::before { display: none; }
.al-live { display: inline-flex; align-items: center; gap: 6px; font: 800 .72rem/1 var(--font-headline); letter-spacing: .1em; color: #fff; text-transform: uppercase; }
.al-live::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: alPulse 1.4s infinite; }
@keyframes alPulse { 0% { box-shadow: 0 0 0 0 rgba(225,29,72,.7); } 70% { box-shadow: 0 0 0 9px rgba(225,29,72,0); } 100% { box-shadow: 0 0 0 0 rgba(225,29,72,0); } }
.al-search { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; }

/* Cintillo */
.al-ticker { background: var(--highlight); color: var(--on-hl, #111); display: flex; align-items: stretch; overflow: hidden; border-bottom: 1px solid var(--bar-bg, #000); }
.al-ticker__label { flex: 0 0 auto; background: var(--bar-bg, #000); color: var(--highlight); font: 800 .8rem/1 var(--font-headline); letter-spacing: .08em; text-transform: uppercase; padding: 0 12px; display: flex; align-items: center; z-index: 1; }
.al-ticker__track { flex: 1; overflow: hidden; white-space: nowrap; position: relative; }
.al-ticker__inner { display: inline-flex; gap: 38px; padding: 10px 0 10px 18px; animation: alTicker 60s linear infinite; will-change: transform; }
.al-ticker__inner a { font: 700 .95rem/1 var(--font-body); color: #111; }
.al-ticker__inner a::before { content: "▸ "; }
@keyframes alTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .al-ticker__inner { animation: none; } .al-ticker__track { overflow-x: auto; } }

/* Chips de secciones */
.al-chips { background: var(--surface); border-bottom: 1px solid var(--border); }
.al-chips .al-wrap { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.al-chips .al-wrap::-webkit-scrollbar { display: none; }
.al-chip { flex: 0 0 auto; min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; background: var(--surface-subtle); border: 1px solid var(--border); font: 700 .8rem/1 var(--font-body); color: var(--text-body); text-transform: uppercase; letter-spacing: .03em; }
.al-chip.is-active, .al-chip:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Tarjetas "tile": imagen con titular encima */
.al-tile { position: relative; display: block; overflow: hidden; border-radius: var(--radius-md); background: var(--surface); aspect-ratio: 16/11; isolation: isolate; }
.al-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .35s; }
.al-tile:hover img { transform: scale(1.04); }
.al-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.96) 0%, rgba(0,0,0,.72) 42%, rgba(0,0,0,.15) 72%, rgba(0,0,0,0) 100%); z-index: -1; }
.al-tile--noimg { background: linear-gradient(135deg, #1b1b1e, #111); border: 1px solid var(--border); }
.al-tile__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px 13px; }
.al-tag { display: inline-block; background: var(--accent); color: #fff; font: 800 .68rem/1 var(--font-headline); letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px; border-radius: 2px; margin: 0 4px 6px 0; }
.al-tag--alt { background: var(--highlight); color: #111; }
.al-tile h3 { margin: 0 0 5px; font: 800 1.38rem/1.1 var(--font-headline); letter-spacing: .005em; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.al-time { font: 700 .78rem/1 var(--font-body); color: var(--highlight); }
.al-hero { aspect-ratio: 4/5; }
.al-hero h3 { font-size: 1.95rem; text-transform: uppercase; line-height: 1.04; }
.al-play { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .95rem; border: 2px solid #fff; }

/* Rejilla */
.al-main { padding-top: 14px; }
.al-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.al-grid .nn-ad { grid-column: 1 / -1; margin: 4px 0; }
.al-sec { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; }
.al-sec h2 { margin: 0; font: 800 1.35rem/1 var(--font-headline); text-transform: uppercase; letter-spacing: .02em; color: #fff; }
.al-sec::after { content: ""; flex: 1; height: 3px; background: linear-gradient(to right, var(--accent), transparent); }
.al-list a { display: grid; grid-template-columns: 1fr 92px; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); align-items: center; }
.al-list h4 { margin: 0 0 4px; font: 700 1.04rem/1.2 var(--font-body); color: var(--text-primary); }
.al-list img { width: 92px; height: 70px; object-fit: cover; border-radius: 4px; }

/* Paginación */
.nn-pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 24px 0 8px; }
.nn-page { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--border); border-radius: 4px; font-weight: 800; font-size: .9rem; background: var(--surface); color: var(--text-body); box-sizing: border-box; }
.nn-page--current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Publicidad */
.nn-ad { margin: 14px 0; text-align: center; overflow: hidden; }
.nn-ad__label { display: block; font: 700 .62rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--text-light); margin-bottom: 4px; }
.nn-ad--empty { border: 1px dashed var(--highlight); color: var(--highlight); font: 700 .75rem/1.3 var(--font-body); padding: 14px 10px; background: rgba(250,204,21,.05); border-radius: 6px; }
.nn-sticky-ad { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--bar-bg, #000); border-top: 2px solid var(--accent); padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); text-align: center; }
.nn-sticky-ad .nn-ad { margin: 0; }
.nn-sticky-ad__close { position: absolute; top: -28px; right: 8px; width: 28px; height: 28px; border: 0; background: var(--accent); color: #fff; border-radius: 6px 6px 0 0; font-size: .75rem; cursor: pointer; }

/* Botón de denuncia */
.al-tip { position: fixed; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 80; display: inline-flex; align-items: center; gap: 8px; background: #25d366; color: #052e16 !important; font: 800 .9rem/1 var(--font-body); padding: 13px 16px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.5); min-height: 44px; box-sizing: border-box; }
body.al.has-sticky .al-tip { bottom: calc(86px + env(safe-area-inset-bottom)); }

/* Pie */
.al-footer { margin-top: 36px; background: var(--bar-bg, #000); border-top: 3px solid var(--accent); color: #a1a1aa; padding: 26px 0 90px; }
.al-footer h4 { margin: 0 0 6px; font: 800 1.5rem/1 var(--font-headline); text-transform: uppercase; color: #fff; }
.al-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0; font-weight: 700; font-size: .88rem; }
.al-footer a:hover { color: var(--highlight); }
.al-footer small { display: block; line-height: 1.5; color: #71717a; }

@media (min-width: 640px) {
    .al-grid { grid-template-columns: repeat(2, 1fr); }
    .al-hero { grid-column: 1 / -1; aspect-ratio: 16/9; }
    .al-hero h3 { font-size: 2.6rem; }
    .al-tile h3 { font-size: 1.45rem; }
}
@media (min-width: 1024px) {
    .al-wrap { padding: 0 22px; }
    .al-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
    .al-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
    .nn-sticky-ad { display: none; }
    .al-hero { aspect-ratio: 21/9; }
}

/* Notas sin foto: no reservar una pantalla vacía */
.al-tile--noimg { aspect-ratio: auto; min-height: 150px; }
.al-tile--noimg .al-tile__body { position: relative; padding-top: 70px; }
.al-hero.al-tile--noimg { min-height: 240px; }

/* ===== Pulido estético v2 ===== */
/* Titulares de tarjeta en oración (más legibles); solo la nota principal va en mayúsculas */
.al-sec h2 { padding-left: 10px; border-left: 5px solid var(--accent); }
.al-tag { box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.al-time::before { content: "● "; font-size: .6rem; vertical-align: 1px; color: var(--accent); }
.al-tile { box-shadow: 0 6px 20px -8px rgba(0,0,0,.9); transition: transform .2s, box-shadow .2s; }
.al-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -8px rgba(225,29,72,.35); }
/* Nota sin foto: tarjeta tipográfica con franja de color (no un hueco negro) */
.al-tile--noimg { background: linear-gradient(160deg, #1d1d21 0%, #121214 100%); border: 1px solid var(--border); border-left: 5px solid var(--accent); }
.al-tile--noimg::after { display: none; }
.al-tile--noimg .al-tile__body { padding-top: 16px; }
.al-tile--noimg h3 { font-size: 1.45rem; }

/* Móvil: las dos primeras notas van grandes y el resto como lista con miniatura (se lee y se recorre más rápido) */
@media (max-width: 639px) {
    .al-feed { gap: 0; }
    .al-feed > .al-tile:nth-of-type(-n+2) { margin-bottom: 12px; }
    .al-feed > .al-tile:nth-of-type(n+3) { aspect-ratio: auto; display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 12px; align-items: start; border-radius: 0; background: none; border: 0; border-bottom: 1px solid var(--border); box-shadow: none; padding: 13px 0; overflow: visible; isolation: auto; transform: none; }
    .al-feed > .al-tile:nth-of-type(n+3)::after { display: none; }
    .al-feed > .al-tile:nth-of-type(n+3) img { position: static; z-index: auto; width: 118px; height: 88px; border-radius: 5px; grid-column: 1; grid-row: 1; transition: none; }
    .al-feed > .al-tile:nth-of-type(n+3):hover img { transform: none; }
    .al-feed > .al-tile:nth-of-type(n+3) .al-tile__body { position: static; padding: 0; grid-column: 2; grid-row: 1; min-width: 0; }
    .al-feed > .al-tile:nth-of-type(n+3) h3 { font-size: 1.12rem; line-height: 1.16; margin: 2px 0 6px; text-shadow: none; }
    .al-feed > .al-tile:nth-of-type(n+3) .al-tag { font-size: .6rem; padding: 3px 5px; margin-bottom: 4px; }
    .al-feed > .al-tile:nth-of-type(n+3) .al-play { top: 6px; left: 6px; right: auto; width: 28px; height: 28px; font-size: .65rem; }
    .al-feed > .al-tile--noimg:nth-of-type(n+3) { grid-template-columns: 1fr; border-left: 4px solid var(--accent); padding-left: 12px; min-height: 0; }
    .al-feed > .al-tile--noimg:nth-of-type(n+3) .al-tile__body { grid-column: 1; }
}

/* Pantallas medianas y grandes: la tarjeta crece con su titular (antes el texto largo se salía por arriba) */
@media (min-width: 640px) {
    .al-tile:not(.al-hero) { aspect-ratio: auto; min-height: 270px; display: flex; align-items: flex-end; }
    .al-tile:not(.al-hero) .al-tile__body { position: relative; width: 100%; box-sizing: border-box; }
    .al-tile:not(.al-hero) h3 { font-size: 1.22rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
    .al-tile--noimg:not(.al-hero) { min-height: 200px; }
}

/* La cara de la nota principal no se corta en el recuadro ancho */
.al-hero img { object-position: center 22%; }
