/* ==========================================================================
   Notixnews · base: tokens, estructura, cabecera, botones 3D, cinta, pie.
   ========================================================================== */

:root {
	--bg: #F4F7FC;
	--s1: #FFFFFF;
	--s2: #EAF1FB;
	--line: #D6E0EF;
	--tx: #0B1B3A;
	--mu: #4F5F80;
	--blue: #1F6FE0;
	--blue-d: #0F3F8A;
	--blue-dd: #0A3478;
	--cyan: #0277A8;
	--glow: #4FD4FF;
	--hot: #D93B17;
	--edge: #C3CEE2;
	--key: #CBD5E6;
	--ease: cubic-bezier(.2, .8, .2, 1);
	--press: cubic-bezier(.3, .7, .4, 1);
	--f-display: 'Unbounded', system-ui, sans-serif;
	--f-body: 'Manrope', system-ui, sans-serif;
	--f-mono: 'JetBrains Mono', ui-monospace, monospace;
	--radius: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--tx);
	font-family: var(--f-body);
	font-size: 17px;
	line-height: 1.6;
	position: relative;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; }
a { color: var(--blue-d); }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 6px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
	word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none;
	width: auto; height: auto;
	top: 12px; left: 12px; z-index: 100;
	padding: 12px 18px;
	background: #fff; color: var(--tx);
	border-radius: 12px;
	box-shadow: 0 6px 0 var(--edge);
}

/* Ambiente: resplandores y cuadrícula técnica */
.amb, .gridbg { position: absolute; inset: 0 0 auto 0; height: 900px; pointer-events: none; z-index: 0; }
.amb {
	background:
		radial-gradient(640px 420px at 88% 0%, rgba(46, 139, 255, .20), transparent 70%),
		radial-gradient(520px 320px at 8% 18%, rgba(79, 212, 255, .16), transparent 70%);
}
.gridbg {
	background-image:
		linear-gradient(rgba(31, 111, 224, .07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(31, 111, 224, .07) 1px, transparent 1px);
	background-size: 56px 56px;
	-webkit-mask-image: linear-gradient(#000, transparent);
	mask-image: linear-gradient(#000, transparent);
}

.wrap { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.site-main { position: relative; z-index: 1; }

/* Tipografía común */
.h2 { font: 700 30px/1.1 var(--f-display); letter-spacing: -.02em; margin: 0; }
.h-sm { font: 700 16px/1.3 var(--f-display); margin: 0; }
.kicker { font: 700 12px var(--f-mono); letter-spacing: .12em; color: var(--blue); text-transform: uppercase; margin: 0 0 10px; }
.meta { font: 500 12px/1.6 var(--f-mono); color: var(--mu); }
.meta a { color: inherit; }
.bajada { font: 500 18px/1.55 var(--f-body); color: var(--mu); margin: 0; max-width: 62ch; }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.menu { list-style: none; margin: 0; padding: 0; }

/* Barra superior */
.top {
	display: flex; justify-content: space-between; gap: 16px;
	font: 500 12px var(--f-mono); color: var(--mu);
	padding: 12px 0; border-bottom: 1px solid var(--line);
}
.top .menu { display: flex; gap: 20px; }
.top a { color: var(--mu); text-decoration: none; transition: color .2s; }
.top a:hover { color: var(--blue); }

/* Cabecera */
.hdr { position: relative; display: flex; align-items: center; gap: 24px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tx); flex-shrink: 0; }
.brand:hover { color: var(--tx); }
.mark { display: block; width: 64px; height: 48px; flex-shrink: 0; filter: drop-shadow(0 6px 12px rgba(31, 111, 224, .3)); transition: transform .5s var(--ease); }
.mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand:hover .mark { transform: rotate(-6deg) scale(1.06); }
.wordmark { font: 800 22px/1 var(--f-display); letter-spacing: -.01em; color: var(--tx); margin: 0; }
.wordmark > span:first-child { color: var(--blue); }
.custom-logo-link img { max-height: 56px; width: auto; }

.nav { flex: 1; min-width: 0; }
.nav .menu { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav .menu::-webkit-scrollbar { display: none; }
.tab {
	position: relative; display: inline-flex; align-items: center;
	min-height: 44px; padding: 0 14px;
	border: 1px solid transparent; border-radius: 10px;
	color: var(--mu); font: 600 14px var(--f-body); text-decoration: none; white-space: nowrap;
	transition: color .2s, background .2s, border-color .2s;
}
.tab::after {
	content: ""; position: absolute; left: 14px; right: 14px; bottom: 7px; height: 2px;
	border-radius: 2px; background: var(--blue);
	transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.tab:hover { color: var(--tx); }
.tab:hover::after, .tab.on::after { transform: scaleX(1); }
.tab.on { color: var(--blue-d); background: rgba(31, 111, 224, .09); border-color: rgba(31, 111, 224, .25); }

/* Botón ícono 3D */
.ibtn {
	appearance: none; flex-shrink: 0;
	display: grid; place-items: center;
	width: 44px; height: 44px; cursor: pointer;
	color: var(--tx); background: linear-gradient(180deg, #FFFFFF, #F1F5FB);
	border: 1px solid var(--key); border-radius: 12px;
	box-shadow: 0 4px 0 var(--edge), 0 8px 16px -8px rgba(11, 27, 58, .25);
	transition: transform .14s, box-shadow .14s, color .2s;
}
.ibtn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--edge), 0 0 22px rgba(79, 212, 255, .45); color: var(--blue); }
.ibtn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--edge); }
.nav-toggle { display: none; }

/* Botón 3D principal y variantes */
.b3d, .comment-form .submit {
	appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 0 22px; border: 0; border-radius: 14px; cursor: pointer;
	font: 800 15px var(--f-body); color: #fff; text-decoration: none; white-space: nowrap;
	background: linear-gradient(180deg, #4BA3FF, #1F6FE0);
	box-shadow: 0 6px 0 var(--blue-d), 0 14px 28px -6px rgba(46, 139, 255, .5), inset 0 1px 0 rgba(255, 255, 255, .45);
	transform: translateY(0);
	transition: transform .14s var(--press), box-shadow .14s, filter .2s;
}
.b3d:hover, .comment-form .submit:hover {
	color: #fff; transform: translateY(-2px); filter: brightness(1.06);
	box-shadow: 0 8px 0 var(--blue-d), 0 20px 36px -6px rgba(46, 139, 255, .65), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.b3d:active, .comment-form .submit:active {
	transform: translateY(6px);
	box-shadow: 0 0 0 var(--blue-d), 0 4px 10px -4px rgba(46, 139, 255, .5), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.b3d .ico { transition: transform .3s var(--ease); }
.b3d:hover .ico { transform: translateX(4px); }
.b3d.ghost {
	color: var(--tx); background: linear-gradient(180deg, #FFFFFF, #EAF0F9); border: 1px solid var(--key);
	box-shadow: 0 6px 0 var(--edge), 0 14px 26px -10px rgba(11, 27, 58, .35), inset 0 1px 0 #fff;
}
.b3d.ghost:hover { color: var(--blue); box-shadow: 0 8px 0 var(--edge), 0 0 30px rgba(79, 212, 255, .45), inset 0 1px 0 #fff; }
.b3d.ghost:active { box-shadow: 0 0 0 var(--edge); }
.b3d.ghost:hover .ico, .listen:hover .ico { transform: none; }
.b3d.white {
	color: var(--blue-d); background: linear-gradient(180deg, #FFFFFF, #E3ECFA);
	box-shadow: 0 6px 0 var(--blue-dd), 0 14px 28px -8px rgba(0, 0, 0, .35), inset 0 1px 0 #fff;
}
.b3d.white:hover { color: var(--blue-d); box-shadow: 0 8px 0 var(--blue-dd), 0 20px 34px -8px rgba(0, 0, 0, .4), inset 0 1px 0 #fff; }
.b3d.white:active { box-shadow: 0 0 0 var(--blue-dd); }

/* Tecla chica (compartir, etiquetas) */
.key {
	appearance: none; display: inline-flex; align-items: center; gap: 8px;
	min-height: 40px; padding: 0 14px; cursor: pointer;
	font: 700 13px var(--f-body); color: var(--tx); text-decoration: none;
	background: linear-gradient(180deg, #FFFFFF, #F2F5FB);
	border: 1px solid var(--key); border-radius: 10px;
	box-shadow: 0 4px 0 var(--edge), 0 8px 14px -8px rgba(11, 27, 58, .2);
	transition: transform .12s var(--press), box-shadow .12s, color .2s;
}
.key:hover { color: var(--blue); transform: translateY(-2px); box-shadow: 0 6px 0 var(--edge), 0 0 18px rgba(79, 212, 255, .35); }
.key:active { transform: translateY(4px); box-shadow: 0 0 0 var(--edge); }

/* Chip de categoría */
.chip {
	display: inline-flex; align-self: flex-start; padding: 6px 12px; border-radius: 999px;
	font: 700 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
	background: #E3EDFD; color: var(--blue-d); border: 1px solid #C3D7F7;
}
a.chip:hover { background: #D4E4FC; color: var(--blue-d); }

/* Buscador desplegable */
.search-panel { padding: 4px 0 18px; animation: drop .35s var(--ease); }
.search-form { display: flex; gap: 12px; flex-wrap: wrap; }
.search-field-wrap {
	flex: 1 1 260px; display: flex; align-items: center; gap: 10px;
	height: 52px; padding: 0 16px; color: var(--mu);
	background: #fff; border: 1px solid var(--key); border-radius: 14px;
	box-shadow: inset 0 2px 4px rgba(11, 27, 58, .06);
	transition: border-color .2s, box-shadow .2s;
}
.search-field-wrap:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 111, 224, .15); }
.search-field { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: 500 16px var(--f-body); color: var(--tx); }

/* Cinta de último momento */
.tick {
	display: flex; align-items: center; height: 48px; overflow: hidden;
	background: #fff; border: 1px solid var(--line); border-radius: 14px;
	box-shadow: 0 10px 24px -18px rgba(11, 27, 58, .35);
}
.tick-pill {
	flex-shrink: 0; display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 16px;
	background: var(--hot); color: #fff; font: 700 12px var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
}
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.4s ease-in-out infinite; }
.tick-view { flex: 1; overflow: hidden; }
.tick-track { display: flex; gap: 48px; width: max-content; padding-left: 24px; white-space: nowrap; }
.tick-track.is-moving { animation: marq var(--tick-dur, 45s) linear infinite; }
.tick:hover .tick-track, .tick:focus-within .tick-track { animation-play-state: paused; }
.tick-item { font: 600 14px var(--f-body); color: var(--tx); text-decoration: none; }
.tick-item b { color: var(--blue); font: 700 12px var(--f-mono); margin-right: 10px; }
.tick-item:hover { color: var(--blue); }

/* Espacios publicitarios */
.ad-slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 28px auto 0; width: 100%; text-align: center; }
.ad-slot img { display: block; margin: 0 auto; border-radius: 12px; }
.ad-tag { font: 700 10px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mu); }
.ad-header { max-width: 970px; }
.ad-home_1, .ad-home_2 { max-width: 970px; margin-top: 72px; }
.ad-sidebar { max-width: 300px; margin-top: 20px; }
.ad-article { max-width: 728px; margin: 32px auto; }
.ad-empty {
	justify-content: center; min-height: 90px; padding: 16px;
	border: 1.5px dashed #B7C6DE; border-radius: 16px; color: var(--mu);
	background: repeating-linear-gradient(135deg, rgba(31, 111, 224, .04) 0 12px, transparent 12px 24px), #F9FBFE;
}
.ad-empty b { font: 700 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.ad-empty span, .ad-empty a { font: 500 12px var(--f-mono); }
.ad-home_1.ad-empty, .ad-home_2.ad-empty { min-height: 250px; }
.ad-sidebar.ad-empty { min-height: 250px; }

/* Pie */
.foot { position: relative; z-index: 1; margin-top: 96px; border-top: 1px solid var(--line); padding: 48px 0 40px; }
.foot-g { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot-brand { display: flex; flex-direction: column; gap: 14px; }
.foot-brand .bajada { font-size: 15px; max-width: 36ch; }
.foot-h { font: 700 12px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mu); margin: 0 0 14px; }
.foot .menu { display: flex; flex-direction: column; gap: 10px; }
.foot .menu a { color: var(--tx); text-decoration: none; font: 500 15px var(--f-body); transition: color .2s; }
.foot .menu a:hover { color: var(--blue); }
.legal {
	margin: 40px 0 0; padding: 26px;
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 32px;
	background: var(--s2); border: 1px solid var(--line); border-radius: 20px;
}
.legal dt { font: 700 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mu); margin: 0 0 6px; }
.legal dd { margin: 0; font: 600 15px/1.4 var(--f-body); color: var(--tx); overflow-wrap: anywhere; }
.legal dd a { color: var(--blue-d); text-decoration: none; }
.legal dd a:hover { text-decoration: underline; }
.badge {
	display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 8px;
	background: #fff; border: 1px solid var(--key); box-shadow: 0 3px 0 var(--edge);
	font: 700 14px var(--f-mono);
}
.copy { margin: 28px 0 0; }

/* Aparición al hacer scroll (main.js agrega .in) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* Animaciones */
@keyframes marq { to { transform: translateX(-50%); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@keyframes ripple { 0% { transform: scale(.3); opacity: 0; } 15% { opacity: 1; } 100% { transform: scale(1.05); opacity: 0; } }
@keyframes float { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(-4deg) translateY(-10px); } }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
@keyframes roll { from { opacity: 0; transform: translateY(-14px) rotateX(80deg); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

body.still *, body.still *::before, body.still *::after { animation: none !important; transition: none !important; }
body.still .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.js .reveal { opacity: 1; transform: none; }
}

/* Responsive: cabecera, pie */
@media (max-width: 1000px) {
	.nav-toggle { display: grid; margin-left: auto; }
	.nav {
		display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
		padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 18px;
		box-shadow: 0 30px 60px -30px rgba(11, 27, 58, .45);
	}
	.nav.open { display: block; animation: drop .3s var(--ease); }
	.nav .menu { flex-direction: column; overflow: visible; }
	.tab { width: 100%; }
	.foot-g { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.legal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	body { font-size: 16px; }
	.wrap { padding: 0 16px; }
	.hide-sm { display: none; }
	.hdr { gap: 12px; }
	.hdr-cta { display: none; }
	.wordmark { font-size: 18px; }
	.mark { width: 48px; height: 36px; }
	.foot-g, .legal { grid-template-columns: minmax(0, 1fr); }
}

.admin-bar .nav { top: 100%; }
