/*
 * La Voz Libre — base global.
 * Solo lo que theme.json no puede expresar. Fuente: handoff Open Design, assets/css/lvl.css.
 * Los componentes van en sus patterns/bloques, no aquí.
 */

html {
	scroll-padding-top: 168px; /* cabecera fija */
}

/* El cromo (.site-top sticky, drawer, footer) va directo en la página, como en el diseño:
   el wrapper de la parte de plantilla no debe crear caja (rompería el sticky). */
.wp-site-blocks > .wp-block-template-part {
	display: contents;
}

/* Los márgenes y gutters los pone .container del diseño, no el flujo de bloques de WP. */
.wp-site-blocks > * {
	margin-block: 0;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

h1, h2, h3, h4 {
	text-wrap: balance;
}

::selection {
	background: #FFC466;
	color: var(--wp--preset--color--contrast-strong);
}

/* Foco visible: 3px naranja, offset 2px. */
:focus-visible {
	outline: 3px solid var(--wp--custom--focus);
	outline-offset: 2px;
	border-radius: var(--wp--custom--radius--focus);
}

/* «Saltar al contenido» */
.skip-link.screen-reader-text:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	z-index: 100000;
	left: 16px;
	top: 16px;
	padding: 12px 16px;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--contrast);
	font-weight: 700;
}

/* Eyebrow: micro-caps condensadas sobre los títulos de sección. */
.lvl-eyebrow {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--custom--font-size--eyebrow);
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing--eyebrow);
	text-transform: uppercase;
	color: var(--wp--preset--color--primary-dark);
}

/* Botones: alto mínimo táctil 44px. Variantes del diseño: rojo (default), naranja, línea. */
.wp-element-button,
.wp-block-button__link {
	min-height: var(--wp--custom--layout--control-min);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: background-color var(--wp--custom--duration--fast) var(--wp--custom--ease--out),
		color var(--wp--custom--duration--fast) var(--wp--custom--ease--out),
		border-color var(--wp--custom--duration--fast) var(--wp--custom--ease--out);
}

.wp-block-button.is-style-orange > .wp-block-button__link {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--contrast);
}
.wp-block-button.is-style-orange > .wp-block-button__link:hover {
	background: var(--wp--preset--color--base);
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border: 1px solid var(--wp--preset--color--border);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--contrast);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0ms !important;
	}
}

/* Cajón móvil: barra de scroll del menú sobre el fondo oscuro (sin carril blanco). */
.drawer__nav { scrollbar-width: thin; scrollbar-color: var(--on-dark-line) transparent; }
.drawer__nav::-webkit-scrollbar { width: 6px; }
.drawer__nav::-webkit-scrollbar-track { background: transparent; }
.drawer__nav::-webkit-scrollbar-thumb { background: var(--on-dark-line); border-radius: 999px; }

/* Cabecera móvil: «Iniciar sesión» se oculta por debajo de 1024 px (lvl.css); en su lugar,
   un icono de usuario junto a la lupa. Con sesión, lvl.js lo quita y queda el avatar. */
.masthead__login-icon { display: none; }
@media (max-width: 1023px) {
	.masthead__login-icon { display: inline-flex; }
}

/* ---------- Riel de secciones: flechas y degradado cuando hay más secciones (pedido del cliente, 5-nov) ----------
   lvl.js pone .can-prev / .can-next en .navbar__wrap según el scroll del riel. */
.navbar__wrap {
	position: relative;
	max-width: var(--container);
	margin: 0 auto;
}
.navbar__wrap::before,
.navbar__wrap::after {
	content: "";
	position: absolute;
	inset-block: 0;
	width: 56px;
	pointer-events: none;
	opacity: 0;
	transition: opacity var(--t-fast);
	z-index: 1;
}
.navbar__wrap::before { left: 0; background: linear-gradient(to right, var(--ink) 25%, transparent); }
.navbar__wrap::after { right: 0; background: linear-gradient(to left, var(--ink) 25%, transparent); }
.navbar__wrap.can-prev::before,
.navbar__wrap.can-next::after { opacity: 1; }
.navbar__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 50%;
	background: var(--ink);
	color: var(--on-dark);
	cursor: pointer;
	transform: translateY(-50%);
	transition: border-color var(--t-fast), color var(--t-fast);
}
.navbar__arrow--prev { left: 8px; }
.navbar__arrow--next { right: 8px; }
.navbar__arrow .icon { width: 18px; height: 18px; }
@media (hover: hover) {
	.navbar__arrow:hover { border-color: var(--orange); color: var(--orange); }
}
/* Las flechas solo en escritorio; en táctil basta el degradado y el deslizamiento. */
@media (min-width: 1024px) and (hover: hover) {
	.navbar__wrap.can-prev .navbar__arrow--prev,
	.navbar__wrap.can-next .navbar__arrow--next { display: inline-flex; }
}

/* ---------- Pie: aviso legal a la izquierda y selector de idiomas a la derecha (5-nov) ---------- */
.footer__legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--s-3) var(--s-6);
}
/* Cajón móvil: el pie (idiomas) queda fijo bajo el menú, separado por una línea. */
.drawer__foot { border-top: 1px solid var(--on-dark-line); }

/* ---------- Textos sin espacios (11-nov): una línea de «______» o una URL larga pegada en una
   noticia ensanchaba la página en el móvil. Se parten solo cuando no caben. ---------- */
.main :is(p, h1, h2, h3, h4, li, blockquote, figcaption, td, th, dd, dt),
.art__dek, .art__title, .feature__dek, .story__dek { overflow-wrap: anywhere; }
.main :is(table, pre) { max-width: 100%; overflow-x: auto; }

/* ---------- Responsive (barrido del 12-nov con Codex) ---------- */
/* Suscríbete → «Suscríbete a nuestros canales»: dentro de la columna oscura, logo + texto + «Pronto»
   + flecha en una fila dejaban el texto de Google News en 6-7 líneas. «Pronto» baja bajo el texto. */
@media (max-width: 767px) {
  .benefits .sample { padding: 12px; }
  .benefits .follow { display: grid; grid-template-columns: 32px minmax(0, 1fr) 36px; gap: 4px 10px; }
  .benefits .follow__logo { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
  .benefits .follow__txt { grid-column: 2; grid-row: 1; }
  .benefits .follow__go { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .benefits .follow__soon { grid-column: 2; grid-row: 2; justify-self: start; }
}
/* Noticia → «Comparte esta noticia»: a 320-360 px «Copiar enlace» no cabía en su botón. */
@media (max-width: 380px) {
  .share-btn { gap: 8px; padding: 8px; white-space: normal; line-height: 1.15; text-align: left; }
  .share-btn .brand, .share-btn .icon { width: 22px; height: 22px; flex: none; }
  .share-btn > span { min-width: 0; }
}
