/* =====================================================================
   NEWSMATIC CHILD — REDISEÑO MODERNO 2026 · ideaspara.me
   Overhaul visual completo por CSS sobre los selectores reales del
   tema padre Newsmatic 1.3.18. Paleta cálida "ideas": ámbar → coral.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. DESIGN TOKENS
   --------------------------------------------------------------------- */
:root {
	/* Paleta de acento cálida */
	--ip-amber: #FFB347;
	--ip-coral: #FF6B6B;
	--ip-coral-deep: #E8474B;      /* coral oscurecido: AA sobre blanco */
	--ip-accent-grad: linear-gradient(135deg, var(--ip-amber) 0%, var(--ip-coral) 100%);

	/* Neutros cálidos */
	--ip-bg: #FAFAF7;
	--ip-surface: #FFFFFF;
	--ip-surface-2: #F3F1EC;
	--ip-text: #1F1F1D;
	--ip-text-soft: #57534E;
	--ip-text-faint: #79716B;
	--ip-hairline: rgba(31, 31, 29, 0.08);

	/* Radios generosos */
	--ip-radius-sm: 10px;
	--ip-radius: 14px;
	--ip-radius-lg: 18px;
	--ip-radius-pill: 999px;

	/* Sombras en capas suaves */
	--ip-shadow-sm: 0 1px 2px rgba(31, 31, 29, 0.05), 0 2px 6px rgba(31, 31, 29, 0.04);
	--ip-shadow: 0 1px 2px rgba(31, 31, 29, 0.05), 0 4px 12px rgba(31, 31, 29, 0.06), 0 12px 28px rgba(31, 31, 29, 0.07);
	--ip-shadow-lg: 0 2px 4px rgba(31, 31, 29, 0.06), 0 10px 24px rgba(31, 31, 29, 0.09), 0 24px 48px rgba(255, 107, 107, 0.10);

	/* Tipografía de sistema moderna */
	--ip-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

	/* Movimiento */
	--ip-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--ip-speed: 0.35s;
}

/* Re-mapeo de las variables del tema padre: propaga el rediseño a todos
   los componentes internos de Newsmatic sin reescribir cada regla.
   body.* gana en especificidad al inline CSS del customizer (.newsmatic_font_typography). */
body.newsmatic_main_body,
body.newsmatic_font_typography {
	--theme-color-red: var(--ip-coral-deep);
	--site-bk-color: var(--ip-bg);
	--inner-container-bk: var(--ip-surface);
	--single-content-bk-color: var(--ip-surface);
	--noimg-bk-color: var(--ip-surface-2);
	--post-title-color: var(--ip-text);
	--meta-text-color: var(--ip-text-faint);
	--main-content-text-color: var(--ip-text-soft);
	--menu-color: var(--ip-text);
	--border-bottom-color: var(--ip-hairline);
	--dark-bk-color: #17171a;
	--shadow-color: rgba(31, 31, 29, 0.08);

	--site-title-family: var(--ip-font);
	--site-tagline-family: var(--ip-font);
	--post-title-family: var(--ip-font);
	--content-family: var(--ip-font);
	--meta-family: var(--ip-font);
	--menu-family: var(--ip-font);
	--block-title-family: var(--ip-font);
	--single-meta-family: var(--ip-font);

	--sidebar-toggle-color-hover: var(--ip-coral-deep);
	--search-color-hover: var(--ip-coral-deep);
	--move-to-top-background-color: var(--ip-coral-deep);
	--move-to-top-background-color-hover: var(--ip-coral);

	/* Tipografía del single: el padre la pinta con estas variables desde
	   main.css/responsive.css — remapearlas evita perder la cascada. */
	--single-content-lineheight: 1.7;
	--single-content-lineheight-tab: 1.7;
	--single-content-lineheight-mobile: 1.65;
	--single-title-weight: 800;
}

/* ---------------------------------------------------------------------
   2. BASE Y TIPOGRAFÍA
   --------------------------------------------------------------------- */
body.newsmatic_main_body {
	background-color: var(--ip-bg);
	color: var(--ip-text);
	font-family: var(--ip-font);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Jerarquía fluida con clamp() y tracking ajustado en headings */
.site-main h1, .site-main h2, .site-main h3, .site-main h4,
.entry-title, .post-title, .widget-title, .newsmatic-block-title {
	font-family: var(--ip-font);
	letter-spacing: -0.02em;
	line-height: 1.25;
	text-wrap: balance;
}

h1.entry-title,
.single h1.entry-title { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); font-weight: 800; }
.post-title    { font-weight: 700; }

/* Selección de texto con la marca */
::selection { background: var(--ip-amber); color: var(--ip-text); }

/* Foco visible accesible y coherente en todo el sitio */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--ip-coral);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Enlaces del contenido: subrayado fino con color de acento */
.entry-content a {
	color: var(--ip-coral-deep);
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
	text-decoration-color: color-mix(in srgb, var(--ip-coral-deep) 40%, transparent);
	transition: text-decoration-color 0.2s var(--ip-ease);
}
.entry-content a:hover { text-decoration-color: var(--ip-coral-deep); }

/* Imágenes con radio en todo el sitio (sin tocar dimensiones = CLS 0) */
.entry-content img,
.entry-content picture img,
.post-thumb-wrap img,
figure.post-thumb img {
	border-radius: var(--ip-radius-sm);
}

/* ---------------------------------------------------------------------
   3. HEADER · NAV · TICKER
   --------------------------------------------------------------------- */
/* Newsmatic 1.5.0: recolorea la franja de acento (verde viejo #1b8415)
   que el tema pinta en .row-wrap / .top-header con el gradiente de marca. */
.top-header .row-wrap,
#masthead .row-wrap,
.newsmatic-ticker-wrap {
	background: var(--ip-accent-grad);
}
/* Franja superior (fecha + ticker) discreta */
#masthead .top-header {
	background: var(--ip-surface-2);
	border-bottom: 1px solid var(--ip-hairline);
	font-size: 0.8125rem;
}
#masthead .top-date-time .date,
#masthead .top-date-time .time { color: var(--ip-text-faint); }

/* Cabecera principal limpia */
#masthead.site-header {
	background: var(--ip-surface);
	border-bottom: 1px solid var(--ip-hairline);
}
#masthead .site-title a {
	background: var(--ip-accent-grad);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: var(--ip-coral-deep); /* fallback si background-clip:text no existe */
	letter-spacing: -0.03em;
	font-weight: 800;
	transition: filter 0.25s var(--ip-ease);
}
#masthead .site-title a:hover { filter: brightness(1.08); }
#masthead .site-description { color: var(--ip-text-faint); }

/* Iconos sociales como chips suaves */
#masthead .social-icons .social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: var(--ip-radius-pill);
	background: var(--ip-surface-2);
	color: var(--ip-text-soft);
	transition: background var(--ip-speed) var(--ip-ease), color var(--ip-speed) var(--ip-ease), transform var(--ip-speed) var(--ip-ease);
}
#masthead .social-icons .social-icon:hover {
	background: var(--ip-accent-grad);
	color: #fff;
	transform: translateY(-2px);
}

/* Barra de menú sticky sutil con blur y hairline inferior */
#masthead .menu-section {
	position: sticky;
	top: 0;
	z-index: 999;
	background: rgba(255, 255, 255, 0.82);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
	border-bottom: 1px solid var(--ip-hairline);
	box-shadow: 0 1px 0 rgba(31, 31, 29, 0.02);
}

/* Links de navegación con subrayado animado (solo transform: CLS 0) */
.main-navigation .menu > li > a {
	position: relative;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--ip-text);
	transition: color 0.25s var(--ip-ease);
}
.main-navigation .menu > li > a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 2px;
	height: 2px;
	border-radius: 2px;
	background: var(--ip-accent-grad);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.3s var(--ip-ease);
}
.main-navigation .menu > li > a:hover,
.main-navigation .menu > li.current-menu-item > a,
.main-navigation .menu > li.current_page_item > a { color: var(--ip-coral-deep); }
.main-navigation .menu > li > a:hover::after,
.main-navigation .menu > li.current-menu-item > a::after,
.main-navigation .menu > li.current_page_item > a::after { transform: scaleX(1); }

/* Submenús como tarjetas flotantes */
.main-navigation .menu .sub-menu {
	background: var(--ip-surface);
	border: 1px solid var(--ip-hairline);
	border-radius: var(--ip-radius);
	box-shadow: var(--ip-shadow);
	overflow: hidden;
	padding: 6px;
}
.main-navigation .menu .sub-menu li a {
	border-radius: var(--ip-radius-sm);
	transition: background 0.2s var(--ip-ease), color 0.2s var(--ip-ease);
}
.main-navigation .menu .sub-menu li a:hover {
	background: var(--ip-surface-2);
	color: var(--ip-coral-deep);
}
.main-navigation .menu .sub-menu .menu-item-description { color: var(--ip-text-faint); }

/* Toggle de menú móvil y disparador de búsqueda */
button.menu-toggle,
.search-wrap .search-trigger {
	border-radius: var(--ip-radius-sm);
	transition: color 0.2s var(--ip-ease), background 0.2s var(--ip-ease);
}
button.menu-toggle:hover,
.search-wrap .search-trigger:hover { color: var(--ip-coral-deep); }

/* Desplegable de búsqueda como tarjeta */
.search-form-wrap {
	border-radius: var(--ip-radius);
	box-shadow: var(--ip-shadow-lg);
	overflow: hidden;
}
.search-form .search-field {
	background: var(--ip-surface);
	border: 1px solid var(--ip-hairline);
	border-radius: var(--ip-radius-sm) 0 0 var(--ip-radius-sm);
	color: var(--ip-text);
	transition: border-color 0.2s var(--ip-ease), box-shadow 0.2s var(--ip-ease);
}
.search-form .search-field:focus {
	border-color: var(--ip-coral);
	box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.18);
	outline: none;
}

/* Ticker de titulares: etiqueta como pill con gradiente */
.after-header .ticker_label_title,
.top-ticker-news .ticker_label_title {
	background: var(--ip-accent-grad);
	color: #fff;
	border-radius: var(--ip-radius-pill);
	padding: 4px 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
}
.ticker-item .post-title a { transition: color 0.2s var(--ip-ease); }
.ticker-item .post-title a:hover { color: var(--ip-coral-deep); }

/* ---------------------------------------------------------------------
   4. HERO / BANNER PRINCIPAL
   --------------------------------------------------------------------- */
#main-banner-section .main-banner-slider figure.post-thumb,
#main-banner-section .main-banner-slider .post-element,
#main-banner-section .banner-trailing-posts figure.post-thumb,
#main-banner-section .banner-trailing-posts .post-element {
	border-radius: var(--ip-radius-lg); /* pisa el 0px inline del customizer */
	overflow: hidden;
}
#main-banner-section .slide-item,
#main-banner-section .carousel-item { border-radius: var(--ip-radius-lg); overflow: hidden; }

/* Scrim de legibilidad + zoom suave de la imagen del slide */
#main-banner-section figure.post-thumb img {
	transition: transform 0.6s var(--ip-ease);
	will-change: transform;
}
#main-banner-section .slide-item:hover figure.post-thumb img,
#main-banner-section .carousel-item:hover figure.post-thumb img { transform: scale(1.04); }

#main-banner-section .post-title a { color: inherit; }
#main-banner-section .post-title a:hover { color: var(--ip-amber); }

/* ---------------------------------------------------------------------
   5. CARDS DE POSTS (grid del home, carrusel y listado del blog)
   --------------------------------------------------------------------- */
/* Card base: superficie elevada con radio y sombra en capas */
main.site-main .primary-content article.post,
.news-carousel article.post-item,
.banner-trailing-posts article.post-item,
.single-related-posts-wrap article.post {
	background: var(--ip-surface);
	border: 1px solid var(--ip-hairline);
	border-radius: var(--ip-radius-lg);
	box-shadow: var(--ip-shadow-sm);
	overflow: hidden;
	transition: transform var(--ip-speed) var(--ip-ease), box-shadow var(--ip-speed) var(--ip-ease), border-color var(--ip-speed) var(--ip-ease);
}

/* Hover: elevación con transform (nunca cambia layout → CLS 0) */
main.site-main .primary-content article.post:hover,
.news-carousel article.post-item:hover,
.banner-trailing-posts article.post-item:hover,
.single-related-posts-wrap article.post:hover {
	transform: translateY(-4px);
	box-shadow: var(--ip-shadow-lg);
	border-color: rgba(255, 107, 107, 0.25);
}

/* Imagen destacada: zoom sutil con overflow contenido */
article.post figure.post-thumb-wrap,
article.post-item figure.post-thumb,
article.post-item figure.post-thumb-wrap {
	overflow: hidden;
	border-radius: var(--ip-radius-lg) var(--ip-radius-lg) 0 0;
	margin-bottom: 0;
}
article.post figure.post-thumb-wrap img,
article.post-item figure.post-thumb img,
article.post-item figure.post-thumb-wrap img {
	border-radius: 0;
	transition: transform 0.6s var(--ip-ease);
	will-change: transform;
}
main.site-main .primary-content article.post:hover figure.post-thumb-wrap img,
article.post-item:hover figure.post-thumb img,
article.post-item:hover figure.post-thumb-wrap img { transform: scale(1.04); }

/* Cuerpo de la card con aire */
main.site-main .primary-content article.post .post-element { padding: 22px 24px 26px; }

/* Título de card: subrayado de acento al pasar */
.post-element .post-title a,
.title-wrap .post-title a {
	color: var(--ip-text);
	background-image: linear-gradient(var(--ip-coral-deep), var(--ip-coral-deep));
	background-repeat: no-repeat;
	background-size: 0% 2px;
	background-position: 0 96%;
	transition: color 0.25s var(--ip-ease), background-size 0.35s var(--ip-ease);
}
.post-element .post-title a:hover,
.title-wrap .post-title a:hover {
	color: var(--ip-coral-deep);
	background-size: 100% 2px;
}

/* Categoría como pill con gradiente ámbar-coral */
.post-categories .cat-item a {
	display: inline-block;
	background: var(--ip-accent-grad);
	color: #fff;
	border-radius: var(--ip-radius-pill);
	padding: 3px 12px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.6;
	box-shadow: 0 2px 8px rgba(255, 107, 107, 0.28);
	transition: transform 0.25s var(--ip-ease), box-shadow 0.25s var(--ip-ease), filter 0.25s var(--ip-ease);
}
.post-categories .cat-item a:hover {
	transform: translateY(-1px);
	filter: saturate(1.15);
	box-shadow: 0 4px 12px rgba(255, 107, 107, 0.38);
	color: #fff;
}

/* Metadatos: discretos y ordenados */
.post-meta,
.post-meta .byline,
.post-meta .posted-on,
.post-meta .post-comment,
.post-meta .read-time,
.post-element .post-date {
	color: var(--ip-text-faint);
	font-size: 0.8125rem;
}
.post-meta .author_name a { color: var(--ip-text-soft); font-weight: 600; }
.post-meta .author_name a:hover { color: var(--ip-coral-deep); }
.post-meta .read-time {
	background: var(--ip-surface-2);
	border-radius: var(--ip-radius-pill);
	padding: 2px 10px;
}

/* Extracto legible */
.post-excerpt,
.post-excerpt p {
	color: var(--ip-text-soft);
	line-height: 1.65;
}

/* Botón "Read More" como CTA fantasma → gradiente al hover */
a.post-link-button {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--ip-coral-deep);
	font-weight: 700;
	border-radius: var(--ip-radius-pill);
	padding: 7px 16px;
	border: 1.5px solid rgba(232, 71, 75, 0.35);
	background: transparent;
	transition: background var(--ip-speed) var(--ip-ease), color var(--ip-speed) var(--ip-ease), border-color var(--ip-speed) var(--ip-ease), box-shadow var(--ip-speed) var(--ip-ease), transform var(--ip-speed) var(--ip-ease);
}
.post-element a.post-link-button:hover,
.post-element a.post-link-button:hover i {
	color: #fff;
}
a.post-link-button:hover {
	background: var(--ip-accent-grad);
	border-color: transparent;
	box-shadow: 0 6px 16px rgba(255, 107, 107, 0.35);
	transform: translateY(-1px);
}
a.post-link-button:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3); }

/* Títulos de sección/bloque con barra de acento */
.newsmatic-block-title,
.widget-title {
	position: relative;
	font-weight: 800;
	letter-spacing: -0.01em;
}
.newsmatic-block-title::before,
.widget-title::before {
	content: "";
	display: inline-block;
	width: 26px;
	height: 4px;
	border-radius: 4px;
	margin-right: 10px;
	vertical-align: middle;
	background: var(--ip-accent-grad);
}

/* ---------------------------------------------------------------------
   6. SIDEBAR / WIDGETS
   --------------------------------------------------------------------- */
.secondary-sidebar .widget,
.widget-area .widget {
	background: var(--ip-surface);
	border: 1px solid var(--ip-hairline);
	border-radius: var(--ip-radius-lg);
	box-shadow: var(--ip-shadow-sm);
	padding: 22px 24px;
}
.widget ul li { border-color: var(--ip-hairline); }
.widget ul li a {
	color: var(--ip-text-soft);
	transition: color 0.2s var(--ip-ease), padding-left 0.25s var(--ip-ease);
}
.widget ul li a:hover { color: var(--ip-coral-deep); }
.widget.widget_search .search-submit { border-radius: 0 var(--ip-radius-sm) var(--ip-radius-sm) 0; }

/* ---------------------------------------------------------------------
   7. PAGINACIÓN
   --------------------------------------------------------------------- */
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border-radius: var(--ip-radius-sm);
	background: var(--ip-surface);
	border: 1px solid var(--ip-hairline);
	color: var(--ip-text-soft);
	font-weight: 600;
	transition: background var(--ip-speed) var(--ip-ease), color var(--ip-speed) var(--ip-ease), transform var(--ip-speed) var(--ip-ease), box-shadow var(--ip-speed) var(--ip-ease);
}
.pagination a.page-numbers:hover {
	color: #fff;
	background: var(--ip-accent-grad);
	border-color: transparent;
	transform: translateY(-2px);
	box-shadow: 0 6px 14px rgba(255, 107, 107, 0.3);
}
.pagination .page-numbers.current {
	color: #fff;
	background: var(--ip-accent-grad);
	border-color: transparent;
	box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}
.pagination .page-numbers.dots { border: none; background: transparent; }

/* ---------------------------------------------------------------------
   8. SINGLE POST · LECTURA
   --------------------------------------------------------------------- */
/* Migas de pan discretas */
.newsmatic-breadcrumb-wrap { border-bottom: 1px solid var(--ip-hairline); }
.breadcrumb-trail .trail-items .trail-item a { color: var(--ip-text-faint); transition: color 0.2s var(--ip-ease); }
.breadcrumb-trail .trail-items .trail-item a:hover { color: var(--ip-coral-deep); }
.breadcrumb-trail .trail-items .trail-end { color: var(--ip-text); font-weight: 600; }

/* Contenedor del artículo como superficie de lectura */
.single .post-inner,
.single .post-inner-wrapper {
	background: var(--ip-surface);
	border-radius: var(--ip-radius-lg);
}

/* Cabecera del artículo */
.single .entry-header .entry-title { color: var(--ip-text); }
.single .entry-meta,
.single .entry-meta a { color: var(--ip-text-faint); }
.single .entry-meta a:hover { color: var(--ip-coral-deep); }

/* Cuerpo: ancho de lectura ~70ch y tipografía placentera.
   .post-inner en el selector: iguala la especificidad (0-3-0) de las reglas
   de main.css/responsive.css del padre, que si no ganarían la cascada. */
.single .post-inner .entry-content,
.single .entry-content {
	max-width: 70ch;
	margin-left: auto;
	margin-right: auto;
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
	line-height: 1.7;
	color: var(--ip-text-soft);
}
.single .entry-content p { margin-bottom: 1.4em; }
.single .entry-content h2,
.single .entry-content h3,
.single .entry-content h4 {
	color: var(--ip-text);
	margin-top: 1.8em;
	margin-bottom: 0.6em;
}
.single .entry-content h2 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); }
.single .entry-content h3 { font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.4rem); }

.single .entry-content hr {
	border: none;
	height: 3px;
	width: 88px;
	margin: 2.2em auto;
	border-radius: 3px;
	background: var(--ip-accent-grad);
}

.single .entry-content img { box-shadow: var(--ip-shadow-sm); }
.single .entry-content .alignleft { margin: 0.4em 1.6em 1em 0; }
.single .entry-content .alignright { margin: 0.4em 0 1em 1.6em; }

/* Blockquotes restilizados */
.single .entry-content blockquote {
	position: relative;
	background: var(--ip-surface-2);
	border-left: 4px solid transparent;
	border-image: linear-gradient(180deg, var(--ip-amber), var(--ip-coral)) 1;
	border-radius: 0 var(--ip-radius) var(--ip-radius) 0;
	padding: 1.2em 1.6em;
	margin: 1.8em 0;
	font-style: italic;
	color: var(--ip-text);
	box-shadow: var(--ip-shadow-sm);
}
.single .entry-content blockquote p:last-child { margin-bottom: 0; }

/* TOC (plugin Table of Contents Plus, #toc_container generado por JS) */
.single #toc_container {
	background: var(--ip-surface-2);
	border: 1px solid var(--ip-hairline);
	border-radius: var(--ip-radius);
	box-shadow: var(--ip-shadow-sm);
	padding: 18px 22px;
	margin: 1.5em 0 2em;
	width: auto;
	font-size: 0.95em;
}
.single #toc_container .toc_title {
	font-family: var(--ip-font);
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--ip-text);
	margin-bottom: 0.5em;
}
.single #toc_container .toc_toggle,
.single #toc_container .toc_toggle a { color: var(--ip-coral-deep); font-weight: 500; }
.single #toc_container ul.toc_list { margin-top: 0.6em; }
.single #toc_container ul.toc_list li { margin: 0.35em 0; }
.single #toc_container ul.toc_list a {
	color: var(--ip-text-soft);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color 0.2s var(--ip-ease), border-color 0.2s var(--ip-ease);
}
.single #toc_container ul.toc_list a:hover {
	color: var(--ip-coral-deep);
	border-bottom-color: rgba(232, 71, 75, 0.4);
}

/* Navegación anterior/siguiente como tarjetas */
.post-navigation .nav-links .nav-previous,
.post-navigation .nav-links .nav-next {
	background: var(--ip-surface);
	border: 1px solid var(--ip-hairline);
	border-radius: var(--ip-radius);
	box-shadow: var(--ip-shadow-sm);
	transition: transform var(--ip-speed) var(--ip-ease), box-shadow var(--ip-speed) var(--ip-ease);
}
.post-navigation .nav-links .nav-previous:hover,
.post-navigation .nav-links .nav-next:hover {
	transform: translateY(-3px);
	box-shadow: var(--ip-shadow);
}
.post-navigation .nav-subtitle { color: var(--ip-text-faint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.post-navigation .nav-title { color: var(--ip-text); font-weight: 700; }
.post-navigation a:hover .nav-title { color: var(--ip-coral-deep); }

/* Posts relacionados */
.single-related-posts-section .single-related-posts-section-wrap {
	background: var(--ip-surface);
	border-radius: var(--ip-radius-lg);
}
.single-related-posts-wrap .post-title a:hover { color: var(--ip-coral-deep); }
.single-related-posts-wrap figure.feature_image,
.single-related-posts-wrap figure.post-thumb-wrap { border-radius: var(--ip-radius-sm); overflow: hidden; }

/* ---------------------------------------------------------------------
   9. COMENTARIOS Y FORMULARIOS
   --------------------------------------------------------------------- */
.comments-area .comment-respond {
	background: var(--ip-surface);
	border: 1px solid var(--ip-hairline);
	border-radius: var(--ip-radius-lg);
	box-shadow: var(--ip-shadow-sm);
	padding: 26px 28px;
}
.comment-respond .comment-reply-title { letter-spacing: -0.01em; font-weight: 800; }
.comment-form .comment-form-comment textarea,
.comment-form .comment-form-author input,
.comment-form .comment-form-email input,
.comment-form .comment-form-url input {
	background: var(--ip-bg);
	border: 1px solid var(--ip-hairline);
	border-radius: var(--ip-radius-sm);
	color: var(--ip-text);
	padding: 12px 14px;
	transition: border-color 0.2s var(--ip-ease), box-shadow 0.2s var(--ip-ease);
}
.comment-form .comment-form-comment textarea:focus,
.comment-form .comment-form-author input:focus,
.comment-form .comment-form-email input:focus,
.comment-form .comment-form-url input:focus {
	border-color: var(--ip-coral);
	box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.16);
	outline: none;
}
.comment-form .comment-notes,
.comment-form .required-field-message { color: var(--ip-text-faint); }

/* ---------------------------------------------------------------------
   10. BOTONES / CTA GLOBALES (gradiente ámbar-coral)
   --------------------------------------------------------------------- */
.comment-form .form-submit .submit,
.search-form .search-submit,
.newsletter-element a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--ip-accent-grad);
	color: #fff;
	border: none;
	border-radius: var(--ip-radius-pill);
	padding: 12px 26px;
	font-family: var(--ip-font);
	font-weight: 700;
	letter-spacing: 0.01em;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
	transition: transform var(--ip-speed) var(--ip-ease), box-shadow var(--ip-speed) var(--ip-ease), filter var(--ip-speed) var(--ip-ease);
}
.comment-form .form-submit .submit:hover,
.search-form .search-submit:hover,
.newsletter-element a:hover {
	transform: translateY(-2px);
	filter: saturate(1.12) brightness(1.03);
	box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
	color: #fff;
}
.comment-form .form-submit .submit:active,
.search-form .search-submit:active,
.newsletter-element a:active {
	transform: translateY(0);
	box-shadow: 0 3px 8px rgba(255, 107, 107, 0.32);
}
.newsletter-element a .title-text { color: #fff; }

/* Botón subir arriba */
#newsmatic-scroll-to-top .icon-holder {
	background: var(--ip-accent-grad);
	border-radius: var(--ip-radius-pill);
	box-shadow: var(--ip-shadow);
	transition: transform var(--ip-speed) var(--ip-ease), box-shadow var(--ip-speed) var(--ip-ease);
}
#newsmatic-scroll-to-top:hover .icon-holder {
	transform: translateY(-3px);
	box-shadow: var(--ip-shadow-lg);
}

/* ---------------------------------------------------------------------
   11. FOOTER MODERNO (oscuro cálido)
   --------------------------------------------------------------------- */
footer.site-footer.dark_bk {
	background: linear-gradient(180deg, #201d1a 0%, #171513 100%);
	border-top: 1px solid rgba(255, 179, 71, 0.14);
	color: #d6d0c8;
}
footer.site-footer .widget,
footer.site-footer.dark_bk .widget {
	background: transparent;
	border: none;
	box-shadow: none;
}
footer.site-footer .widget-title { color: #f5efe6; }
footer.site-footer a { color: #d6d0c8; transition: color 0.2s var(--ip-ease); }
footer.site-footer a:hover { color: var(--ip-amber); }
footer.site-footer .bottom-footer { border-top: 1px solid rgba(255, 255, 255, 0.06); }
footer.site-footer .site-info { color: #a39c92; font-size: 0.875rem; }
footer.site-footer .site-info a { color: var(--ip-amber); }
footer.site-footer .site-info a:hover { color: var(--ip-coral); }

/* ---------------------------------------------------------------------
   12. MODO OSCURO PROPIO DE NEWSMATIC (body.newsmatic_dark_mode)
   --------------------------------------------------------------------- */
body.newsmatic_dark_mode {
	/* Tokens invertidos: neutros oscuros cálidos */
	--ip-bg: #17171a;
	--ip-surface: #1f1f23;
	--ip-surface-2: #26262b;
	--ip-text: #f2efe9;
	--ip-text-soft: #c9c4bc;
	--ip-text-faint: #98928a;
	--ip-hairline: rgba(255, 255, 255, 0.09);
	--ip-coral-deep: #FF8A8A; /* acento aclarado: AA sobre fondo oscuro */

	--ip-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.3);
	--ip-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.35), 0 12px 28px rgba(0, 0, 0, 0.35);
	--ip-shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.45), 0 10px 24px rgba(0, 0, 0, 0.4), 0 24px 48px rgba(255, 107, 107, 0.12);

	background-color: var(--ip-bg);
	color: var(--ip-text);
}

/* Newsmatic 1.5.0 pinta el fondo en #page (layout boxed) y no en body.
   Cubrimos todas las superficies de contenedor para que el modo oscuro
   sea real sea cual sea el layout (boxed o full-width). Alta especificidad
   (html body.clase) para ganar a las reglas del padre sin !important. */
/* Fondo de página oscuro. !important justificado: el tema/customizer fija el
   background del body con reglas que no ceden a especificidad normal; es el
   único modo de garantizar el modo oscuro sin editar el tema padre. Solo la
   propiedad background-color lo lleva, no toda la regla. */
html body.newsmatic_dark_mode {
	background-color: #17171a !important;
	color: var(--ip-text);
}
html body.newsmatic_dark_mode #page,
html body.newsmatic_dark_mode .site,
html body.newsmatic_dark_mode #content,
html body.newsmatic_dark_mode .site-content-wrap,
html body.newsmatic_dark_mode .newsmatic-container,
html body.newsmatic_dark_mode #primary,
html body.newsmatic_dark_mode .site-main {
	background-color: transparent;
	color: var(--ip-text);
}
/* Superficies elevadas (post, sidebar, single) en oscuro */
html body.newsmatic_dark_mode .post-inner-wrapper,
html body.newsmatic_dark_mode article.post,
html body.newsmatic_dark_mode article.post-item,
html body.newsmatic_dark_mode .single .post-inner,
html body.newsmatic_dark_mode #secondary .widget {
	background-color: var(--ip-surface);
	color: var(--ip-text-soft);
}

/* Superficies del header en oscuro */
body.newsmatic_dark_mode #masthead.site-header,
body.newsmatic_dark_mode #masthead .top-header {
	background: var(--ip-surface);
	border-color: var(--ip-hairline);
}
body.newsmatic_dark_mode #masthead .menu-section {
	background: rgba(23, 23, 26, 0.82);
	border-bottom-color: var(--ip-hairline);
}
body.newsmatic_dark_mode .main-navigation .menu li a { color: var(--ip-text); }
body.newsmatic_dark_mode .main-navigation .menu > li > a:hover { color: var(--ip-amber); }
body.newsmatic_dark_mode #masthead .social-icons .social-icon {
	background: var(--ip-surface-2);
	color: var(--ip-text-soft);
}

/* Cards y widgets en oscuro heredan tokens; refuerzos puntuales */
body.newsmatic_dark_mode .post-element .post-title a,
body.newsmatic_dark_mode .title-wrap .post-title a { color: var(--ip-text); }
body.newsmatic_dark_mode .post-element .post-title a:hover,
body.newsmatic_dark_mode .title-wrap .post-title a:hover { color: var(--ip-coral); }
body.newsmatic_dark_mode .widget,
body.newsmatic_dark_mode .dark_bk .widget { background: var(--ip-surface); }
body.newsmatic_dark_mode ::selection { background: var(--ip-coral); color: #17171a; }

/* Formularios en oscuro */
body.newsmatic_dark_mode .search-form .search-field,
body.newsmatic_dark_mode .comment-form .comment-form-comment textarea,
body.newsmatic_dark_mode form.comment-form p input {
	background: var(--ip-surface-2);
	border-color: var(--ip-hairline);
	color: var(--ip-text);
}

/* ---------------------------------------------------------------------
   13. REVELADO PROGRESIVO (reveal.js)
   El estado oculto SOLO se aplica cuando el JS marcó html.js-reveal-ready:
   si el JS falla, todo el contenido queda visible (progressive enhancement).
   --------------------------------------------------------------------- */
html.js-reveal-ready .js-reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.6s var(--ip-ease), transform 0.6s var(--ip-ease);
	will-change: opacity, transform;
}
html.js-reveal-ready .js-reveal.is-visible {
	opacity: 1;
	transform: none;
	will-change: auto;
}

/* ---------------------------------------------------------------------
   14. ACCESIBILIDAD · MOVIMIENTO REDUCIDO
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms;
		animation-iteration-count: 1;
		transition-duration: 0.01ms;
		scroll-behavior: auto;
	}
	html.js-reveal-ready .js-reveal {
		opacity: 1;
		transform: none;
	}
	article.post:hover,
	article.post-item:hover,
	.pagination a.page-numbers:hover,
	a.post-link-button:hover {
		transform: none;
	}
	article.post:hover img,
	article.post-item:hover img {
		transform: none;
	}
}

/* ============================================================
   15. Logo SVG nuevo — intercambio claro/oscuro
   ============================================================ */
.ipm-logo-link { display: inline-flex; align-items: center; }
.ipm-logo-link .custom-logo { max-height: 60px; width: auto; }
.ipm-logo-dark { display: none; }
body.newsmatic_dark_mode .ipm-logo-light { display: none; }
body.newsmatic_dark_mode .ipm-logo-dark { display: inline-block; }
