/**
 * Modern Homepage Styles - I-Málaga 2026
 * Diseño renovado para portada con cards, efectos y mejor UX
 */

/* ============================================================
   VARIABLES Y BASE
   ============================================================ */

:root {
	/* --- Portal tech: tinta casi negra + gris neblina + verde señal --- */

	/* Neutros fríos: fondo tipo portal de noticias, no papel. */
	--ink: #12151a;
	--ink-soft: #1c2128;
	--paper: #f2f4f6;
	--paper-warm: #e7eaed;

	/* Verde señal: el único acento, inspirado en portales tech. */
	--brass: #2f8f3d;
	--brass-bright: #57c95f;

	/* Alias semánticos (los mantengo para no romper 700 líneas de CSS). */
	--primary-color: var(--brass);
	--primary-dark: #1f6b2a;
	--accent-color: var(--brass);
	--accent-warm: var(--brass-bright);
	--text-dark: #12151a;
	--text-light: #666e77;
	--bg-light: var(--paper);
	--border-color: #dde1e5;

	/* Tipografía tipo portal: sans grotesk fuerte para titulares. */
	--font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
	--font-body: "Karla", "Helvetica Neue", Arial, sans-serif;

	/* El tema base fija html{font-size:10px}: 1rem = 10px, no 16px. */
	--step-0: 16px;
	--step-1: 19px;

	/* Sombras cálidas, no grises: encajan sobre papel. */
	--shadow-sm: 0 1px 2px rgba(20, 23, 28, 0.06);
	--shadow-md: 0 4px 20px rgba(20, 23, 28, 0.08);
	--shadow-lg: 0 18px 50px rgba(20, 23, 28, 0.13);

	--transition: all 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
	--ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ==========================================================================
   Aparición al hacer scroll (mejora progresiva)
   El estado por defecto es VISIBLE: si el JS no corre (o en el editor de
   bloques), todo se ve igualmente. El JS añade .koke-reveal para ocultar
   y luego .is-visible al entrar en pantalla.
   ========================================================================== */

.koke-reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.koke-reveal.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.koke-reveal,
	.koke-reveal.is-visible {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.koke-no-sidebar .newspaper-x-image img,
	.koke-no-sidebar .site-main article:hover .newspaper-x-image img {
		transition: none;
		transform: none;
	}
}

/* ==========================================================================
   Sistema tipográfico editorial
   ========================================================================== */

body {
	font-family: var(--font-body);
	background-color: var(--paper);
	color: var(--text-dark);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Titulares en Fraunces, óptica ajustada y kerning cerrado. */
h1, h2, h3, h4, h5, h6,
.entry-title,
.entry-title a,
.widget-title,
.site-title,
.wp-block-heading {
	font-family: var(--font-display);
	font-optical-sizing: auto;
	letter-spacing: -0.018em;
	text-wrap: balance;
}

/* Titular de artículo: escala fluida, sin saltos entre breakpoints.
   El tema base fija color:#001936 aquí (style.css:2156), hay que
   recuperar la tinta del sistema para que combine con el modo oscuro. */
.single-post .entry-title,
.page .entry-title {
	font-size: clamp(34px, 20px + 3.2vw, 62px);
	line-height: 1.06;
	font-weight: 700;
	letter-spacing: -0.028em;
	color: var(--ink);
}

/* Cuerpo de lectura: medida corta y ritmo generoso.
   OJO: el tema base fija html { font-size: 10px }, así que 1rem = 10px.
   Por eso los tamaños de este fichero van en px o em, nunca en rem. */
.single-post .entry-content,
.page .entry-content {
	font-size: 19px;
	line-height: 1.72;
	letter-spacing: 0.003em;
}

/* El tema base fija color:#001936 en el primer párrafo (style.css:2163),
   que en modo oscuro queda casi invisible sobre el fondo de tinta. */
.single-post .entry-content p:first-of-type,
.page .entry-content p:first-of-type {
	color: var(--ink);
	border-bottom-color: var(--border-color);
}

.single-post .entry-content > p,
.page .entry-content > p {
	max-width: 34em;
}

/* --- Página de artículo: papel continuo, no una tarjeta blanca --- */

.single-post .site-main > article,
.page .site-main > article,
.single-post .newspaper-x-content,
.page .newspaper-x-content {
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

/* Medida de lectura centrada: 40em son unos 66 caracteres. */
.single-post .site-main > article,
.page .site-main > article {
	max-width: 40em;
	margin-inline: auto;
}

.single-post .entry-header,
.page .entry-header {
	margin: 0 0 28px;
}

/* Imagen destacada: recorte panorámico dentro de la columna de lectura.
   El tema base le pone width:100% pero sin recorte, y salía cuadrada. */
.single-post .entry-header .newspaper-x-image,
.single-post .entry-header > img {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	margin: 0 0 26px;
	background: var(--paper-warm);
}

.single-post .entry-header img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	margin: 0;
}

/* Rótulo "Leave a reply" y zona de comentarios sobre papel.
   La medida de lectura se aplica al .container interior, no al .comments-area:
   limitar el contenedor externo dejaba el .container de Bootstrap con
   margin-right:-410px y el formulario se salía por la derecha. */
.single-post #comments,
.single-post #respond,
.single-post .comments-area {
	background: none;
}

.single-post .comments-area .container,
.single-post .comments-form .container {
	width: 100%;
	max-width: 42em;
	margin-inline: auto;
	padding-inline: 0;
}

.single-post .comments-form .col-md-12 {
	width: 100%;
	padding-inline: 0;
}

#reply-title,
.comment-reply-title {
	font-family: var(--font-display);
	color: var(--ink);
}

/* Sin capitular: en un portal tech el cuerpo va directo, sin adorno editorial. */

/* El widget de posts "layout b" fija line-height:0 en el título h3
   (style.css:1820), lo que colapsa la caja del titular y lo hace
   solaparse con la fecha/autor de justo debajo. */
.newspaper_x_widgets .newspaper-x-layout-b-row .newspaper-x-title h3 {
	line-height: 1.3;
	margin-top: 0;
	margin-bottom: 8px;
}

/* Títulos de las tarjetas de los widgets de portada (layout a/b/c): el
   tema base los fija en azul marino #001936, igual de invisible sobre
   fondos oscuros que el resto de azules heredados. El h3 de "layout-b"
   no fija color propio y hereda el azul genérico `a { color: #0a396d }`
   del tema base (style.css:73), así que necesita el mismo tratamiento. */
.newspaper_x_widgets .newspaper-x-blog-post-layout-a .newspaper-x-title h4 > a,
.newspaper_x_widgets .newspaper-x-blog-post-layout-b .newspaper-x-title h4 > a,
.newspaper_x_widgets .newspaper-x-blog-post-layout-c .newspaper-x-title h4 > a,
.newspaper_x_widgets .newspaper-x-layout-b-row .newspaper-x-title h3 a,
.newspaper-x-after-content-sidebar .newspaper-x-title h3 a {
	color: var(--ink);
}

.newspaper_x_widgets .newspaper-x-blog-post-layout-a .newspaper-x-title h4 > a:hover,
.newspaper_x_widgets .newspaper-x-blog-post-layout-a .newspaper-x-title h4 > a:focus,
.newspaper_x_widgets .newspaper-x-blog-post-layout-b .newspaper-x-title h4 > a:hover,
.newspaper_x_widgets .newspaper-x-blog-post-layout-b .newspaper-x-title h4 > a:focus,
.newspaper_x_widgets .newspaper-x-blog-post-layout-c .newspaper-x-title h4 > a:hover,
.newspaper_x_widgets .newspaper-x-blog-post-layout-c .newspaper-x-title h4 > a:focus,
.newspaper_x_widgets .newspaper-x-layout-b-row .newspaper-x-title h3 a:hover,
.newspaper_x_widgets .newspaper-x-layout-b-row .newspaper-x-title h3 a:focus,
.newspaper_x_widgets .newspaper-x-blog-post-layout-a .newspaper-x-title h3 > a:hover,
.newspaper_x_widgets .newspaper-x-blog-post-layout-a .newspaper-x-title h3 > a:focus,
.newspaper-x-after-content-sidebar .newspaper-x-title h3 a:hover,
.newspaper-x-after-content-sidebar .newspaper-x-title h3 a:focus {
	color: var(--brass);
}

/* Widget "Entradas recientes" del sidebar/pie: título fijo en gris #333. */
.newspaper-x-recent-post-widget .newspaper-x-title h3 {
	color: var(--ink);
}

/* El autor ("kokenet") no debe mostrarse en estas tarjetas de portada. */
.newspaper_x_widgets .newspaper-x-author {
	display: none;
}

/* El selector de categorías del widget "Categories" del pie: el tema base
   solo pone max-width:100% dentro de .newspaper-x-blog-sidebar, no en el
   footer, así que el <select> se sale del ancho de su columna. */
.widget_categories select,
.widget_archive select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* Título de "Entradas relacionadas" en el pie de artículo: el tema base
   lo fija en gris oscuro #333, invisible sobre fondo de tinta oscuro. */
.newspaper-x-related-posts .newspaper-x-related-post-title > a {
	color: var(--ink);
}

.newspaper-x-related-posts .newspaper-x-related-post-title > a:hover,
.newspaper-x-related-posts .newspaper-x-related-post-title > a:focus {
	color: var(--brass);
}

/* Etiquetas del artículo ("ETIQUETAS: ..."): el tema base las fija en
   azul marino fijo (#001936 el rótulo, borde azul en los enlaces). */
.newspaper-x-tags strong {
	color: var(--ink);
}

.newspaper-x-tags a {
	color: var(--ink);
	border-color: var(--border-color);
}

.newspaper-x-tags a:hover,
.newspaper-x-tags a:focus {
	background: var(--brass);
	border-color: var(--brass);
	color: #fff;
}

/* Navegación entre entradas: el tema base la pinta en azul marino fijo
   (#0a396d), invisible sobre el fondo de tinta del modo oscuro. */
.nav-links a {
	color: var(--ink);
	transition: color 0.25s var(--ease-out);
}

.nav-links a:hover {
	color: var(--brass);
}

/* Números y fechas con cifras tabulares: columnas que cuadran. */
.entry-meta,
.posted-on,
.comment-metadata {
	font-family: var(--font-body);
	font-variant-numeric: tabular-nums;
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-light);
}

/* ==========================================================================
   Cabecera: bloque de tinta a sangre, la nota espectacular
   ========================================================================== */

.site-header {
	background-color: var(--ink);
	color: var(--paper);
	position: relative;
	padding: 38px 0 34px;
}

/* Filete de latón que cierra la cabecera contra el papel. */
.site-header::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 3px;
	background: linear-gradient(90deg, var(--brass) 0%, var(--brass-bright) 45%, transparent 100%);
}

.site-branding .header-logo .site-title,
.site-header .site-title {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: clamp(30px, 18px + 2.4vw, 50px);
	line-height: 1.02;
	letter-spacing: -0.03em;
	color: var(--paper);
	text-transform: none;
}

.site-branding .header-logo .site-title:hover,
.site-branding .header-logo .site-title:focus {
	color: var(--brass-bright);
}

.site-header .site-description {
	font-family: var(--font-body);
	font-size: 12px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: rgba(247, 244, 238, 0.62);
	margin-top: 8px;
}

/* ==========================================================================
   Rótulos de sección y botones: latón en vez del azul heredado
   ========================================================================== */

/* El tema base pinta un traño azul a la izquierda de cada rótulo. Los
   widgets de portada ("Festival de Málaga", "Semana Santa Málaga"...) usan
   .widget-title dentro de .widget.newspaper_x_widgets, que no quedaba
   cubierto por los selectores de abajo y se colaba en azul marino. */
.section-title,
.page-title,
#comments > h3:first-of-type,
#reply-title,
.newspaper-x-related-posts .newspaper-x-related-posts-title > h3,
.widget.newspaper_x_widgets .widget-title {
	font-family: var(--font-display);
	color: var(--ink);
	border-color: var(--brass);
}

/* El <span> no es una etiqueta: lleva fondo opaco para TAPAR el filete que
   cruza el rótulo por detrás. Debe ir del color del papel, no invertido. */
.section-title > span,
.page-title > span,
#comments > h3:first-of-type > span,
#reply-title > span,
.comments-area .comments-form #reply-title span,
.newspaper-x-related-posts .newspaper-x-related-posts-title > h3 > span,
.widget.newspaper_x_widgets .widget-title > span {
	background-color: var(--paper);
	color: var(--ink);
	font-family: var(--font-display);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.02em;
	text-transform: none;
}

.section-title::after,
.page-title::after,
#comments > h3:first-of-type::after,
#reply-title::after,
.newspaper-x-related-posts .newspaper-x-related-posts-title > h3::after,
.widget.newspaper_x_widgets .widget-title::after {
	background-color: var(--border-color);
}

/* Botones: bloque de tinta, no azul de plantilla. */
.form-submit .submit,
.comment-form .submit,
button,
input[type="button"],
input[type="submit"],
.newspaper-x-button {
	/* El tema usa el shorthand `background: #0a396d`, que gana a
	   background-color: hay que responder también con shorthand. */
	background: var(--ink);
	border: 0;
	border-radius: 0;
	color: var(--paper);
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	padding: 14px 30px;
	transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.form-submit .submit:hover,
.form-submit .submit:focus,
button:hover,
input[type="submit"]:hover,
input[type="submit"]:focus {
	background: var(--brass);
	color: var(--ink);
	border: 0;
}

/* --- Entradas relacionadas: retícula propia --- */

.newspaper-x-related-posts .newspaper-x-related-posts-title {
	width: 100%;
	max-width: 100%;
	float: none;
	margin-bottom: 22px;
}

/* Owl Carousel SÍ se inicializa (añade .owl-loaded) y fija anchos inline al
   cargar. Con una sola entrada relacionada calcula 173px y la miniatura queda
   diminuta, así que se recupera el ancho por CSS sin tocar su JS. */
.newspaper-x-related-posts .owl-stage {
	width: 100% !important;
	display: flex;
	gap: 24px;
	transform: none !important;
}

.newspaper-x-related-posts .owl-item {
	width: auto !important;
	flex: 1 1 0;
	margin-right: 0 !important;
	max-width: 300px;
}

.newspaper-x-related-posts img {
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	margin-bottom: 11px;
}

.newspaper-x-related-posts .entry-title {
	font-family: var(--font-display);
	font-size: 15px;
	line-height: 1.28;
	text-transform: none;
	letter-spacing: -0.01em;
}

.newspaper-x-related-posts .entry-title a {
	color: var(--ink);
	font-size: inherit;
	text-transform: none;
}

.newspaper-x-related-posts .entry-title a:hover {
	color: var(--brass);
}

/* Enlaces del cuerpo: subrayado de latón. */
.single-post .entry-content a,
.page .entry-content a {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--brass);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.25s var(--ease-out);
}

.single-post .entry-content a:hover,
.page .entry-content a:hover {
	color: var(--brass);
}

/* ==========================================================================
   Barra superior y pie: bloques de tinta que enmarcan el papel
   ========================================================================== */

.top-header {
	background-color: var(--ink);
	border-bottom: 1px solid rgba(247, 244, 238, 0.1);
}

.top-header,
.top-header a,
.top-header .newspaper-x-module-title {
	color: var(--paper);
}

/* El rótulo "Latest News" en latón, no en azul. */
.top-header .newspaper-x-module-title {
	background-color: var(--brass);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* El tema pinta el pie en azul marino #001228; se lleva a tinta neutra. */
.site-footer,
.site-footer .widgets-area,
.site-footer .site-info,
.newspaper-x-footer-widgets {
	background-color: var(--ink);
	color: rgba(247, 244, 238, 0.78);
}

/* Franja del menú: el borde gris claro cortaba la cabecera de tinta. */
.main-navigation {
	background-color: var(--ink);
	border-top: 1px solid rgba(247, 244, 238, 0.12);
	border-bottom: 0;
}

.main-navigation a {
	color: rgba(247, 244, 238, 0.82);
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	transition: color 0.3s var(--ease-out);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
	color: var(--brass-bright);
}

/* Formulario de comentarios: papel cálido, no el gris #f8f8f8 del tema
   (definido en .comments-area .comments-form, style.css:3039). */
.comments-area .comments-form,
.comments-form,
.comments-area {
	background: none;
	background-color: transparent;
}

/* Franja "Go Up": el tema la deja en azul marino #001d3e. */
.back-to-top-area {
	background-color: var(--ink);
}

#back-to-top {
	background-color: var(--brass);
	color: var(--ink);
	border-radius: 0;
	transition: background-color 0.3s var(--ease-out);
}

#back-to-top:hover {
	background-color: var(--brass-bright);
}

/* Barra inferior del pie: el tema la deja en azul marino #000f20. */
.site-info {
	background-color: var(--ink);
	border-top: 1px solid rgba(247, 244, 238, 0.1);
}

.site-info *,
.site-info a {
	font-family: var(--font-body);
	font-size: 13px;
	color: rgba(247, 244, 238, 0.7);
}

.site-info a:hover {
	color: var(--brass-bright);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	background-color: #fffdf9;
	border: 1px solid var(--border-color);
	border-radius: 0;
	font-family: var(--font-body);
	padding: 12px 14px;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--brass);
	outline: 2px solid rgba(168, 118, 58, 0.18);
	outline-offset: 1px;
}

.site-footer .widget-title,
.newspaper-x-footer-widgets .widget-title {
	color: var(--paper);
	border-bottom-color: rgba(168, 118, 58, 0.55);
}

.site-footer a,
.newspaper-x-footer-widgets a {
	color: rgba(247, 244, 238, 0.72);
	transition: color 0.3s var(--ease-out);
}

.site-footer a:hover,
.site-footer a:focus,
.newspaper-x-footer-widgets a:hover {
	color: var(--brass-bright);
}

/* Listas del pie: filetes finos en vez de viñetas. */
.newspaper-x-footer-widgets .widget li {
	border-bottom: 1px solid rgba(247, 244, 238, 0.09);
	padding: 9px 0;
	list-style: none;
}

.newspaper-x-footer-widgets .widget li:last-child {
	border-bottom: 0;
}

/* ==========================================================================
   Recupera el ancho cuando la barra lateral está vacía
   ========================================================================== */

.koke-no-sidebar .newspaper-x-content.col-lg-8,
.koke-no-sidebar .newspaper-x-content.col-md-8,
.koke-no-sidebar .content-area.col-md-8 {
	width: 100%;
	flex: 0 0 100%;
	max-width: 100%;
}

/* En el artículo, la columna ocupa todo el ancho y la medida de lectura se
   centra dentro: así el texto no queda arrinconado a la izquierda. */
.koke-no-sidebar.single-post .content-area,
.koke-no-sidebar.page .content-area {
	float: none;
	margin-inline: auto;
}

/* El tema emite un .row por cada PAREJA de entradas, así que el grid debe ser
   de 2 columnas: con 3 quedarían huecos en cada fila. */
@media (min-width: 992px) {
	.koke-no-sidebar .site-main > .row {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 52px 44px;
		margin-right: 0;
		margin-left: 0;
		align-items: start;
	}

	/* Bootstrap añade un clearfix con .row:before/:after. En un contenedor
	   display:grid esos pseudo-elementos se convierten en celdas reales y
	   desplazan las tarjetas una posición. Hay que anularlos. */
	.koke-no-sidebar .site-main > .row::before,
	.koke-no-sidebar .site-main > .row::after {
		display: none;
	}

	.koke-no-sidebar .site-main > .row > .col-md-6 {
		width: 100%;
		max-width: 100%;
		flex: none;
		padding: 0;
	}

	/* Última fila impar: la entrada suelta ocupa el ancho completo con la
	   imagen en formato panorámico, en vez de dejar media retícula vacía.
	   (Sin display:contents, que rompía el orden de imagen y titular.) */
	.koke-no-sidebar .site-main > .row > .col-md-6:only-child {
		grid-column: 1 / -1;
	}

	.koke-no-sidebar .site-main > .row > .col-md-6:only-child .newspaper-x-image img {
		aspect-ratio: 21 / 8;
	}

	.koke-no-sidebar .site-main > .row > .col-md-6:only-child .entry-title {
		font-size: 32px;
	}

	/* El banner intercalado ocupa la fila completa. */
	.koke-no-sidebar .site-main > .row > .row,
	.koke-no-sidebar .site-main > .row > .col-xs-12 {
		grid-column: 1 / -1;
		width: 100%;
		max-width: 100%;
		margin: 0;
		padding: 0;
	}
}

/* ==========================================================================
   Distintivo de categoría: letra versal sobre latón, sin cápsula azul
   ========================================================================== */

.newspaper-x-category,
.newspaper-x-category a {
	font-family: var(--font-body);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

/* Iguala la especificidad del tema base (style.css:2179 y :2203), que pinta
   la cápsula azul sobre .newspaper-x-post-meta .newspaper-x-category. */
.newspaper-x-archive-page .newspaper-x-post-meta .newspaper-x-category,
.newspaper-x-archive-first-posts .newspaper-x-post-meta .newspaper-x-category,
.single-post .newspaper-x-post-meta .newspaper-x-category,
.newspaper-x-post-meta .newspaper-x-category,
.newspaper-x-category {
	background: none;
	background-color: transparent;
	padding: 0;
	border-radius: 0;
}

.newspaper-x-archive-page .newspaper-x-post-meta .newspaper-x-category a,
.newspaper-x-archive-first-posts .newspaper-x-post-meta .newspaper-x-category a,
.single-post .newspaper-x-post-meta .newspaper-x-category a,
.newspaper-x-post-meta .newspaper-x-category a,
.newspaper-x-category a {
	display: inline-block;
	background: none;
	background-color: transparent;
	color: var(--brass);
	padding: 0 0 4px 0;
	border-bottom: 2px solid var(--brass);
	border-radius: 0;
	transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.newspaper-x-archive-page .newspaper-x-post-meta .newspaper-x-category:hover,
.newspaper-x-archive-page .newspaper-x-post-meta .newspaper-x-category:focus-within,
.single-post .newspaper-x-post-meta .newspaper-x-category:hover {
	background: none;
	background-color: transparent;
}

.newspaper-x-post-meta .newspaper-x-category a:hover,
.newspaper-x-post-meta .newspaper-x-category a:focus,
.newspaper-x-category a:hover,
.newspaper-x-category a:focus {
	color: var(--ink);
	border-bottom-color: var(--ink);
	background: none;
}

/* ==========================================================================
   Tarjetas: recorte editorial, sin caja. El papel es el fondo.
   ========================================================================== */

.koke-no-sidebar .site-main > .row > .col-md-6 > article {
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
	position: relative;
}

/* Filete superior de latón: marca el inicio de cada pieza. */
.koke-no-sidebar .site-main > .row > .col-md-6 > article::before {
	content: "";
	display: block;
	width: 100%;
	height: 1px;
	background: var(--border-color);
	margin-bottom: 22px;
}

/* Imagen: recorte 3:2 constante para que la retícula no baile. */
.koke-no-sidebar .newspaper-x-image {
	overflow: hidden;
	margin-bottom: 19px;
	background: var(--paper-warm);
}

.koke-no-sidebar .newspaper-x-image img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	transition: transform 0.75s var(--ease-out), filter 0.5s var(--ease-out);
}

.koke-no-sidebar .site-main article:hover .newspaper-x-image img {
	transform: scale(1.045);
}

/* Titular de tarjeta: Fraunces, caja alta suave, no versalita apretada. */
.koke-no-sidebar .site-main article .entry-title {
	margin: 0 0 10px;
	font-size: 25px;
	line-height: 1.16;
	font-weight: 700;
	text-transform: none;
	letter-spacing: -0.02em;
}

.koke-no-sidebar .site-main article .entry-title a {
	font-size: inherit;
	text-transform: none;
	letter-spacing: inherit;
	color: var(--ink);
	background-image: linear-gradient(var(--brass), var(--brass));
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 1px;
	transition: background-size 0.45s var(--ease-out), color 0.3s var(--ease-out);
}

.koke-no-sidebar .site-main article .entry-title a:hover,
.koke-no-sidebar .site-main article .entry-title a:focus {
	color: var(--brass);
	background-size: 100% 1px;
}

/* Entradilla: gris tinta, medida corta.
   El tema base le mete padding lateral de 15px y un max-width heredado que
   la estrangulaba a 222px; aquí se devuelve al ancho de la tarjeta. */
.koke-no-sidebar .site-main article .entry-content,
.koke-no-sidebar .site-main article .entry-summary {
	font-size: 15px;
	line-height: 1.65;
	color: var(--text-light);
	width: 100%;
	max-width: 46ch;
	padding: 0;
	margin-top: 0;
}

/* Orden vertical: categoría y fecha por encima del titular. */
.koke-no-sidebar .site-main article .entry-header {
	display: flex;
	flex-direction: column;
}

.koke-no-sidebar .site-main article .newspaper-x-image {
	order: -2;
}

.koke-no-sidebar .site-main article .newspaper-x-post-meta {
	order: -1;
	margin-bottom: 12px;
}

/* ============================================================
   HOMEPAGE GENERAL
   ============================================================ */

.newspaper-x-modern-homepage {
	background: #ffffff;
}

.modern-header-widget-section {
	background: linear-gradient(135deg, rgba(0, 102, 204, 0.95) 0%, rgba(0, 61, 153, 0.95) 100%);
	padding: 0;
	position: relative;
	overflow: hidden;
}

.modern-header-widget-section::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,50 Q300,0 600,50 T1200,50 L1200,120 L0,120 Z" fill="%23ffffff" opacity="0.05"/></svg>');
	background-size: 600px 120px;
	background-repeat: repeat-x;
	animation: wave 20s linear infinite;
}

@keyframes wave {
	0% { transform: translateX(0); }
	100% { transform: translateX(600px); }
}

.modern-header-widget-section > * {
	position: relative;
	z-index: 2;
}

/* ============================================================
   SITE CONTENT
   ============================================================ */

.modern-site-content {
	display: flex;
	gap: 2rem;
	padding: 2rem 0;
}

.modern-content-area {
	flex: 1;
	min-width: 0;
}

.modern-blog-sidebar {
	width: 100%;
	flex: 0 0 auto;
	min-width: 300px;
}

/* ============================================================
   WIDGETS CONTAINER & WRAPPER
   ============================================================ */

.modern-widgets-wrapper {
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

.modern-sidebar-wrapper {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

/* ============================================================
   WIDGET STYLING - POSTS/NOTICIAS
   ============================================================ */

.widget {
	background: none;
	border: 0;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
}

.widget:hover {
	box-shadow: none;
}

/* Título de widget: versalita con filete de latón, sin cápsula. */
.widget-title {
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--text-dark);
	margin: 0 0 18px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--brass);
	display: block;
}

/* Sin la barrita decorativa: dejaba un traño suelto en títulos vacíos. */
.widget-title::before {
	content: none;
}

/* ============================================================
   POST GRIDS - LAYOUT MODERNO
   ============================================================ */

.newspaper-x-posts-a,
.newspaper-x-posts-b,
.newspaper-x-posts-c,
.newspaper-x-posts-d {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Posts A & B - 3 columnas */
.newspaper-x-posts-a,
.newspaper-x-posts-b {
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Posts C - 2 columnas */
.newspaper-x-posts-c {
	grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

/* Posts D - Grid flexible */
.newspaper-x-posts-d {
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* ============================================================
   ARTICLE CARD STYLING
   ============================================================ */

article {
	background: #ffffff;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: var(--transition);
	border: 1px solid var(--border-color);
	display: flex;
	flex-direction: column;
	/* La altura la define el contenido. Dentro de las columnas Bootstrap
	   del tema (.col-md-6) un height:100% se resolvería contra la fila
	   completa y estiraría la tarjeta cientos de píxeles. */
	height: auto;
}

/* Igualar alturas solo cuando el contenedor es una retícula o un flex,
   que es donde esa igualación tiene sentido. */
.modern-site-content article,
.modern-posts-grid article {
	height: 100%;
}

article:hover {
	transform: translateY(-6px);
	box-shadow: var(--shadow-lg);
}

/* Article Image */
.post-thumbnail {
	position: relative;
	overflow: hidden;
	background: #f0f0f0;
	aspect-ratio: 16 / 9;
	display: block;
}

.post-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

article:hover .post-thumbnail img {
	transform: scale(1.08);
}

/* Category Badge */
.cat-links,
.posted-on {
	display: inline-block;
	margin: 0;
}

.cat-links a,
.tax-category {
	background: var(--primary-color);
	color: #ffffff !important;
	padding: 0.4rem 0.75rem;
	border-radius: 2px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	text-decoration: none;
	transition: var(--transition);
	display: inline-block;
}

.cat-links a:hover {
	background: var(--primary-dark);
	box-shadow: var(--shadow-sm);
}

/* Article Content */
.entry-content,
.entry-summary {
	padding: 1.5rem;
}

/* El flex:1 solo debe empujar el contenido cuando las tarjetas igualan
   altura; si no, infla el bloque de texto de forma desproporcionada. */
.modern-site-content .entry-content,
.modern-site-content .entry-summary,
.modern-posts-grid .entry-content,
.modern-posts-grid .entry-summary {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.entry-header {
	margin-bottom: 1rem;
}

.entry-title {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.4;
	color: var(--text-dark);
	margin: 0.5rem 0;
	transition: color 0.3s ease;
}

.entry-title a {
	color: inherit;
	text-decoration: none;
}

.entry-title a:hover {
	color: var(--primary-color);
}

/* Post Meta */
.entry-meta {
	font-size: 0.875rem;
	color: var(--text-light);
	margin-bottom: 1rem;
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	align-items: center;
}

.entry-meta a {
	color: var(--text-light);
	text-decoration: none;
	transition: color 0.3s ease;
}

.entry-meta a:hover {
	color: var(--primary-color);
}

.posted-on::before {
	content: '📅 ';
	margin-right: 0.25rem;
}

.author::before {
	content: '✍️ ';
	margin-right: 0.25rem;
}

/* Post Excerpt */
.post-excerpt,
.entry-summary {
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--text-light);
	margin-bottom: 1rem;
	flex-grow: 1;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Read More Link */
.read-more-link,
.more-link {
	color: var(--primary-color);
	font-weight: 600;
	text-decoration: none;
	transition: var(--transition);
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	align-self: flex-start;
	margin-top: auto;
}

.read-more-link:hover,
.more-link:hover {
	color: var(--accent-color);
	transform: translateX(4px);
}

.read-more-link::after,
.more-link::after {
	content: '→';
	transition: transform 0.3s ease;
}

.read-more-link:hover::after,
.more-link:hover::after {
	transform: translateX(4px);
}

/* ============================================================
   FEATURED/HERO POST
   ============================================================ */

/* Hero tipo portal: la imagen manda, el color viene del degradado negro que
   sube desde abajo — igual que un poster de portada de noticias. */
.featured-post,
.sticky {
	background: var(--ink);
	color: #ffffff;
	position: relative;
	overflow: hidden;
	min-height: 440px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	border-radius: 4px;
}

.featured-post::before,
.sticky::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(180deg, rgba(9, 12, 15, 0) 35%, rgba(9, 12, 15, 0.92) 100%);
	z-index: 1;
}

.featured-post .post-thumbnail {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
}

.featured-post .post-thumbnail img,
.sticky .post-thumbnail img {
	filter: brightness(0.6) contrast(1.1);
}

.featured-post .entry-content,
.sticky .entry-content {
	position: relative;
	z-index: 2;
	color: #ffffff;
	padding: 2rem;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.featured-post .entry-title,
.sticky .entry-title {
	color: #ffffff;
	font-size: 2rem;
	margin-bottom: 1rem;
}

.featured-post .entry-title a,
.sticky .entry-title a {
	color: #ffffff;
}

.featured-post .entry-meta,
.sticky .entry-meta {
	color: rgba(255, 255, 255, 0.8);
}

.featured-post .cat-links a,
.sticky .cat-links a {
	background: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(10px);
}

/* ============================================================
   AFTER CONTENT SECTION
   ============================================================ */

.modern-after-content {
	background: linear-gradient(180deg, var(--bg-light) 0%, #ffffff 100%);
	padding: 3rem 0;
	margin-top: 3rem;
	border-top: 1px solid var(--border-color);
}

.modern-after-content .widget {
	background: #ffffff;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

@media (max-width: 768px) {
	.modern-site-content {
		flex-direction: column;
		gap: 1.5rem;
		padding: 1rem 0;
	}

	.modern-blog-sidebar {
		width: 100%;
		min-width: 100%;
	}

	.widget {
		padding: 1.5rem;
	}

	.widget-title {
		font-size: 1.5rem;
		margin-bottom: 1rem;
	}

	.newspaper-x-posts-a,
	.newspaper-x-posts-b,
	.newspaper-x-posts-c,
	.newspaper-x-posts-d {
		grid-template-columns: 1fr;
	}

	article {
		flex-direction: row;
	}

	.post-thumbnail {
		width: 120px;
		min-width: 120px;
		aspect-ratio: auto;
		height: 100px;
	}

	.entry-content,
	.entry-summary {
		padding: 1rem;
	}

	.featured-post,
	.sticky {
		min-height: 300px;
	}

	.featured-post .entry-content,
	.sticky .entry-content {
		padding: 1.5rem;
	}

	.featured-post .entry-title,
	.sticky .entry-title {
		font-size: 1.5rem;
	}
}

@media (max-width: 480px) {
	.modern-widgets-wrapper {
		gap: 2rem;
	}

	.widget {
		padding: 1rem;
	}

	.widget-title {
		font-size: 1.25rem;
	}

	.entry-title {
		font-size: 1.1rem;
	}

	article {
		flex-direction: column;
	}

	.post-thumbnail {
		width: 100%;
		min-width: auto;
		aspect-ratio: 16 / 9;
		height: auto;
	}

	.featured-post,
	.sticky {
		min-height: 250px;
	}
}

/* ============================================================
   ACCESSIBILITY & INTERACTIVE
   ============================================================ */

article:focus-within {
	outline: 2px solid var(--primary-color);
	outline-offset: 2px;
}

.entry-title a:focus,
.read-more-link:focus,
.cat-links a:focus {
	outline: 2px solid var(--primary-color);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Print styles */
@media print {
	.modern-header-widget-section,
	.modern-after-content {
		background: white;
	}

	article {
		page-break-inside: avoid;
		box-shadow: none;
		border: 1px solid #ddd;
	}
}

/* Dark mode support (opcional) */
@media (prefers-color-scheme: dark) {
	:root {
		/* Verdes nocturnos de la misma familia que la paleta clara. */
		--primary-color: #57c95f;
		--primary-dark: #2f8f3d;
		--accent-color: #57c95f;
		--accent-warm: #7fe087;
		--bg-light: #12181d;
		--border-color: #2a3339;
		--text-dark: #e8eef3;
		--text-light: #9bb0bf;
	}

	body,
	.site-content,
	.content-area {
		background: #0c141b;
	}

	.widget,
	article {
		background: #16232e;
	}

	/* Contenedor raíz de la portada: fondo blanco fijo sin cubrir. */
	.newspaper-x-modern-homepage {
		background: #0c141b;
	}

	/* El CSS base del tema fija colores de texto oscuros que sobre fondo
	   nocturno resultan ilegibles; se recuperan aquí. */
	article,
	.entry-content,
	.entry-summary,
	.entry-content p,
	.site-main,
	.comment-form,
	.comment-respond {
		color: var(--text-dark);
	}

	.entry-title,
	.entry-title a,
	.widget-title,
	.comment-reply-title,
	#reply-title,
	h1, h2, h3, h4, h5, h6,
	.wp-block-heading {
		color: var(--text-dark);
	}

	/* El single post fija color:var(--ink) directamente (mayor especificidad
	   que .entry-title en claro); en oscuro hay que igualar esa especificidad. */
	.single-post .entry-title,
	.page .entry-title,
	.single-post .entry-content p:first-of-type,
	.page .entry-content p:first-of-type {
		color: var(--text-dark);
	}

	/* El <span> que tapa el filete tras los rótulos usa var(--paper), fondo
	   de papel claro fijo: en oscuro hay que taparlo con el fondo real. */
	.section-title > span,
	.page-title > span,
	#comments > h3:first-of-type > span,
	#reply-title > span,
	.comments-area .comments-form #reply-title span,
	.newspaper-x-related-posts .newspaper-x-related-posts-title > h3 > span,
	.widget.newspaper_x_widgets .widget-title > span {
		background-color: #0c141b;
		color: var(--text-dark);
	}

	/* El rótulo de sección de los widgets de portada ("Festival de Málaga"...)
	   usa var(--ink) fijo en claro; en oscuro hay que usar el texto claro. */
	.widget.newspaper_x_widgets .widget-title {
		color: var(--text-dark);
	}

	/* Títulos de las tarjetas de noticias en los widgets de portada. */
	.newspaper_x_widgets .newspaper-x-blog-post-layout-a .newspaper-x-title h4 > a,
	.newspaper_x_widgets .newspaper-x-blog-post-layout-b .newspaper-x-title h4 > a,
	.newspaper_x_widgets .newspaper-x-blog-post-layout-c .newspaper-x-title h4 > a,
	.newspaper_x_widgets .newspaper-x-layout-b-row .newspaper-x-title h3 a,
	.newspaper-x-after-content-sidebar .newspaper-x-title h3 a {
		color: var(--text-dark);
	}

	/* Widget "Entradas recientes" del sidebar/pie. */
	.newspaper-x-recent-post-widget .newspaper-x-title h3 {
		color: var(--text-dark);
	}

	/* La sección "after content" ("Editorial", "Tecnología"...) degrada a
	   #ffffff fijo en claro; en oscuro el degradado debe ir a tinta, si no
	   el texto claro queda sobre blanco e ilegible. */
	.modern-after-content {
		background: linear-gradient(180deg, var(--bg-light) 0%, #0c141b 100%);
	}

	.modern-after-content .widget {
		background: #16232e;
	}

	/* Etiquetas del artículo ("ETIQUETAS: ..."). */
	.newspaper-x-tags strong,
	.newspaper-x-tags a {
		color: var(--text-dark);
	}

	/* Títulos de "Entradas relacionadas". */
	.newspaper-x-related-posts .newspaper-x-related-post-title > a {
		color: var(--text-dark);
	}

	/* El tema base colorea el enlace interior del título con una regla propia
	   más específica que la del h4, así que hay que apuntar al <a>. */
	/* Iguala la especificidad de
	   .newspaper-x-archive-page .post .entry-title a  (style.css:2326) */
	.newspaper-x-archive-page .post .entry-title a,
	.newspaper-x-archive-page .page .entry-title a,
	.newspaper-x-archive-first-posts .entry-title a,
	article .entry-title a,
	.entry-header .entry-title a,
	.site-title,
	.site-title a,
	.site-description,
	.widget .entry-title a,
	.newspaper-x-related-posts .entry-title,
	.newspaper-x-related-posts .entry-title a,
	.newspaper-x-recent-posts .entry-title,
	.newspaper-x-recent-posts .entry-title a,
	.newspaper-x-posts-list .entry-title a,
	.koke-no-sidebar .site-main article .entry-title a {
		color: var(--text-dark);
	}

	.newspaper-x-archive-page .post .entry-title a:hover,
	.newspaper-x-archive-page .post .entry-title a:focus-within,
	.newspaper-x-archive-page .page .entry-title a:hover,
	article .entry-title a:hover,
	.widget .entry-title a:hover,
	.koke-no-sidebar .site-main article .entry-title a:hover,
	.koke-no-sidebar .site-main article .entry-title a:focus {
		color: var(--primary-color);
	}

	/* La sección de comentarios arrastra un fondo claro fijo. */
	#comments,
	.comments-area,
	.comment-respond {
		background: #0c141b;
	}

	.entry-title a:hover,
	a:hover {
		color: var(--primary-color);
	}

	.entry-meta,
	.posted-on,
	.byline,
	.comment-metadata {
		color: var(--text-light);
	}

	.nav-links a {
		color: var(--text-dark);
	}

	.nav-links a:hover {
		color: var(--primary-color);
	}

	/* Campos de formulario legibles en oscuro. */
	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="search"],
	textarea,
	.comment-form input[type="text"],
	.comment-form input[type="email"],
	.comment-form input[type="url"],
	.comment-form textarea {
		background-color: #16232e;
		border-color: var(--border-color);
		color: var(--text-dark);
	}

	input::placeholder,
	textarea::placeholder {
		color: var(--text-light);
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	@keyframes wave {
		0%, 100% { transform: translateX(0); }
	}
}
