/* ═══════════════════════════════════════════════════════════════
 * VARIANTE B · BENTO
 *
 * Rejilla asimétrica de cajas. Cada bloque es una pieza autónoma con
 * su propio color y su propio dato. Se lee saltando, no en orden:
 * es como se consume información hoy.
 *
 * Carga DESPUÉS de main.css.
 * ═══════════════════════════════════════════════════════════════ */

body.v-bento {
	background: #0f0b1e;
	color: #ece9f5;
}

body.v-bento ::selection {
	background: var(--ri-yellow);
	color: #0f0b1e;
}

/* --- Cabecera --- */
.b-head {
	position: sticky;
	top: 0;
	z-index: 60;
	background: rgba(15, 11, 30, .72);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.b-head__inner {
	display: flex;
	align-items: center;
	gap: 22px;
	min-height: 66px;
}

.b-head__logo img {
	width: 210px;
	height: auto;
	display: block;
}

.b-nav {
	display: flex;
	gap: 20px;
	list-style: none;
	margin: 0 0 0 auto;
	padding: 0;
}

.b-nav a {
	font-family: var(--ri-font-ui);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .68);
	text-decoration: none;
	transition: color .2s ease;
}

.b-nav a:hover { color: #fff; }

/* --- Rejilla --- */
.bento {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	grid-auto-rows: 128px;
	gap: 16px;
	padding: 34px 0;
}

.cell {
	position: relative;
	overflow: hidden;
	border-radius: 22px;
	padding: 26px;
	background: #191233;
	border: 1px solid rgba(255, 255, 255, .07);
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	transition: border-color .3s ease;
}

/* Solo se esconde si hay JS que pueda volver a mostrarla */
.js .cell {
	opacity: 0;
	transform: translateY(30px) scale(.97);
	transition:
		opacity .55s ease,
		transform .55s cubic-bezier(.22, .61, .36, 1),
		border-color .3s ease;
	transition-delay: var(--d, 0ms);
}

.cell.is-in {
	opacity: 1;
	transform: none;
}

/* Foco que sigue al cursor: da profundidad sin cargar la página */
.cell::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(
		420px circle at var(--mx, 50%) var(--my, 50%),
		rgba(255, 255, 255, .09),
		transparent 42%
	);
	opacity: 0;
	transition: opacity .3s ease;
	pointer-events: none;
}

.cell:hover::before { opacity: 1; }

.cell:hover {
	border-color: rgba(255, 255, 255, .2);
}

/* Inclinación 3D suave, la calcula el JS */
.cell--tilt {
	transform-style: preserve-3d;
	will-change: transform;
}

/* --- Tamaños --- */
.cell--hero  { grid-column: span 7; grid-row: span 4; }
.cell--tall  { grid-column: span 5; grid-row: span 4; }
.cell--wide  { grid-column: span 8; grid-row: span 2; }
.cell--sq    { grid-column: span 4; grid-row: span 2; }
.cell--half  { grid-column: span 6; grid-row: span 2; }
.cell--third { grid-column: span 4; grid-row: span 3; }
.cell--strip { grid-column: span 12; grid-row: span 1; }

/* --- Colores de celda --- */
.cell--coral  { background: linear-gradient(150deg, #E94C3F, #c0342a); border-color: transparent; }
.cell--teal   { background: linear-gradient(150deg, #20A699, #16786f); border-color: transparent; }
.cell--orange { background: linear-gradient(150deg, #F39727, #cf7708); border-color: transparent; }
.cell--yellow { background: linear-gradient(150deg, #F1BB22, #c9970a); border-color: transparent; color: #201a10; }
.cell--brand  { background: linear-gradient(150deg, #4E2672, #372879); border-color: transparent; }

/* --- Contenido de celda --- */
.cell__tag {
	position: absolute;
	top: 22px;
	left: 26px;
	font-family: var(--ri-font-ui);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	opacity: .8;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.cell__title {
	font-family: var(--ri-font-display);
	font-size: 32px;
	line-height: .92;
	margin: 0 0 6px;
	position: relative;
}

.cell--hero .cell__title { font-size: clamp(42px, 4.6vw, 66px); }

.cell__text {
	font-size: 14px;
	opacity: .72;
	margin: 0;
	line-height: 1.45;
	position: relative;
}

.cell__num {
	font-family: var(--ri-font-display);
	font-size: clamp(56px, 7vw, 96px);
	line-height: .8;
	margin: 0;
	position: relative;
}

.cell__foot {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 12px;
	font-family: var(--ri-font-ui);
	font-size: 11px;
	letter-spacing: .05em;
	text-transform: uppercase;
	opacity: .72;
	position: relative;
}

/* Fondo decorativo de la celda hero */
.cell__bg {
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(
		135deg,
		rgba(255, 255, 255, .04) 0 2px,
		transparent 2px 14px
	);
}

.cell__bg--dots {
	background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
	background-size: 16px 16px;
}

.cell--hero .cell__media {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 30%, rgba(15, 11, 30, .92));
	z-index: 1;
}

.cell--hero .cell__title,
.cell--hero .cell__text,
.cell--hero .cell__tag,
.cell--hero .cell__foot { z-index: 2; }

/* --- Mini ranking dentro de celda --- */
.mini {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
	position: relative;
}

.mini li {
	display: grid;
	grid-template-columns: 20px 1fr auto;
	align-items: center;
	gap: 10px;
	font-family: var(--ri-font-ui);
	font-size: 13px;
}

.mini__pos {
	font-family: var(--ri-font-display);
	font-size: 22px;
	line-height: 1;
	opacity: .55;
}

.mini__val {
	font-family: var(--ri-font-display);
	font-size: 20px;
	line-height: 1;
}

/* --- Tira de categorías --- */
.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	position: relative;
}

.chip {
	padding: 8px 15px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, .18);
	font-family: var(--ri-font-ui);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .8);
	text-decoration: none;
	transition: background .2s ease, color .2s ease, transform .2s ease;
}

.chip:hover {
	background: #fff;
	color: #0f0b1e;
	transform: translateY(-2px);
}

/* --- Newsletter --- */
.b-nl {
	display: flex;
	gap: 10px;
	margin-top: 14px;
	position: relative;
}

.b-nl input {
	flex: 1;
	min-width: 0;
	padding: 12px 16px;
	border-radius: 999px;
	border: 0;
	background: rgba(0, 0, 0, .22);
	color: #fff;
	font-family: var(--ri-font-body);
	font-size: 14px;
}

.b-nl input::placeholder { color: rgba(255, 255, 255, .5); }

.b-nl button {
	padding: 12px 20px;
	border-radius: 999px;
	border: 0;
	background: #0f0b1e;
	color: #fff;
	font-family: var(--ri-font-ui);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform .2s ease;
}

.b-nl button:hover { transform: scale(1.05); }

/* --- Publicidad en bento --- */
.cell--ad {
	background: #131029;
	border-style: dashed;
	border-color: rgba(255, 255, 255, .16);
	align-items: center;
	justify-content: center;
	text-align: center;
}

.cell--ad .ad__label { color: rgba(255, 255, 255, .45); }

.cell--ad .ad__slot {
	background: none;
	border: 0;
	color: rgba(255, 255, 255, .35);
	width: auto;
	height: auto;
}

/* --- Pie --- */
.b-foot {
	border-top: 1px solid rgba(255, 255, 255, .08);
	padding: 34px 0;
	font-family: var(--ri-font-ui);
	font-size: 11px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .45);
}

.b-foot__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	align-items: center;
}

.b-foot a { color: rgba(255, 255, 255, .68); text-decoration: none; }
.b-foot a:hover { color: #fff; }

.b-foot__logo { width: 170px; height: auto; }

/* --- Responsive --- */
@media (max-width: 1024px) {
	.bento { grid-auto-rows: 116px; }

	.cell--hero  { grid-column: span 12; grid-row: span 4; }
	.cell--tall  { grid-column: span 6; grid-row: span 4; }
	.cell--wide  { grid-column: span 12; grid-row: span 2; }
	.cell--sq    { grid-column: span 6; grid-row: span 2; }
	.cell--half  { grid-column: span 6; grid-row: span 2; }
	.cell--third { grid-column: span 6; grid-row: span 3; }
}

@media (max-width: 782px) {
	.bento {
		grid-template-columns: 1fr;
		grid-auto-rows: auto;
		gap: 12px;
	}

	.cell {
		grid-column: auto !important;
		grid-row: auto !important;
		min-height: 190px;
		padding: 22px;
		border-radius: 18px;
	}

	.cell--hero { min-height: 320px; }

	.b-nav { display: none; }
	.b-nl { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════════
 * Bloques añadidos
 * ═══════════════════════════════════════════════════════════════ */

/* --- Título de bloque entre rejillas --- */
.b-sec {
	display: flex;
	align-items: baseline;
	gap: 16px;
	padding: 44px 0 4px;
	border-bottom: 1px solid rgba(255, 255, 255, .1);
	margin-bottom: 8px;
}

.b-sec__t {
	font-family: var(--ri-font-display);
	font-size: clamp(38px, 4.6vw, 60px);
	line-height: .9;
	margin: 0;
}

.b-sec__d {
	font-family: var(--ri-font-ui);
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .45);
	margin: 0 0 0 auto;
}

/* --- Tira de última hora dentro de la rejilla --- */
.cell--ticker {
	padding: 0;
	justify-content: center;
	background: linear-gradient(90deg, #E94C3F, #F39727);
	border-color: transparent;
	overflow: hidden;
}

.b-mq {
	display: flex;
	gap: 34px;
	white-space: nowrap;
	width: max-content;
	animation: b-mq 30s linear infinite;
	font-family: var(--ri-font-ui);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .05em;
	color: #fff;
}

.cell--ticker:hover .b-mq { animation-play-state: paused; }

@keyframes b-mq {
	to { transform: translateX(-50%); }
}

/* --- Celda con lista de titulares --- */
.cell__list {
	list-style: none;
	margin: 26px 0 0;
	padding: 0;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.cell__list li { border-bottom: 1px solid rgba(255, 255, 255, .09); }
.cell__list li:last-child { border-bottom: 0; }

.cell__list a {
	display: flex;
	align-items: baseline;
	gap: 12px;
	padding: 11px 0;
	font-family: var(--ri-font-display);
	font-size: 22px;
	line-height: .98;
	color: inherit;
	text-decoration: none;
	transition: color .18s ease, padding-left .18s ease;
}

.cell__list a:hover {
	color: var(--ri-yellow);
	padding-left: 6px;
	text-decoration: none;
}

.cell__list em {
	font-style: normal;
	font-family: var(--ri-font-ui);
	font-size: 10px;
	letter-spacing: .08em;
	text-transform: uppercase;
	opacity: .5;
	flex: 0 0 auto;
}

/* --- Numeración de lo más leído --- */
.cell__rank {
	counter-reset: b;
}

.cell__rank a::before {
	counter-increment: b;
	content: counter(b);
	font-size: 18px;
	opacity: .4;
	flex: 0 0 22px;
}

/* --- Firma de opinión --- */
.cell__author {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
	margin-bottom: 12px;
	position: relative;
}

.cell__av {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	border: 2px solid rgba(255, 255, 255, .3);
	flex: 0 0 auto;
}

.cell__author span {
	font-family: var(--ri-font-ui);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	opacity: .85;
}

/* --- Perfiles dentro de celda --- */
.cell__who {
	display: flex;
	gap: 10px;
	margin-top: 22px;
	overflow-x: auto;
	scrollbar-width: none;
	position: relative;
	padding-bottom: 4px;
}

.cell__who::-webkit-scrollbar { display: none; }

.wcard {
	flex: 0 0 auto;
	width: 108px;
	padding: 14px 10px;
	border-radius: 14px;
	background: rgba(255, 255, 255, .06);
	text-align: center;
	text-decoration: none;
	color: inherit;
	transition: background .2s ease, transform .2s ease;
}

.wcard:hover { background: rgba(255, 255, 255, .13); transform: translateY(-3px); }

.wcard__av {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	margin: 0 auto 8px;
	background: rgba(255, 255, 255, .12);
	border: 2px solid rgba(255, 255, 255, .25);
}

.wcard__n {
	display: block;
	font-family: var(--ri-font-ui);
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wcard__s {
	display: block;
	font-family: var(--ri-font-ui);
	font-size: 9px;
	opacity: .55;
}

/* --- Pie completo --- */
.b-foot--full {
	padding: 48px 0 26px;
	text-transform: none;
	letter-spacing: 0;
}

.b-foot__cols {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 26px;
	margin-bottom: 32px;
}

.b-foot h3 {
	font-family: var(--ri-font-ui);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ri-yellow);
	margin-bottom: 12px;
}

.b-foot ul { list-style: none; margin: 0; padding: 0; }
.b-foot li { padding: 4px 0; }
.b-foot__cols a { font-size: 14px; }

@media (max-width: 1024px) {
	.b-foot__cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 782px) {
	.b-foot__cols { grid-template-columns: 1fr; }
	.b-sec { padding-top: 30px; }
	.b-sec__d { display: none; }
	.cell--ticker { min-height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
	.cell {
		opacity: 1;
		transform: none !important;
	}

	.cell::before { display: none; }
	.b-mq { animation: none; }
}
