/* ============================================================
   InfoMundo Mejorado — hoja de estilos principal (único CSS)
   Sin frameworks, sin fuentes externas: pila del sistema.
   Identidad: azul #2471a3 · azul marino #0d2438 · rojo #cf2e2e
   ============================================================ */

:root {
	--im-accent: #2471a3;
	--im-accent-dark: #185a86;
	--im-navy: #0d2438;
	--im-navy-deep: #081a2a;
	--im-red: #cf2e2e;
	--im-red-bright: #e04848;
	--im-bg: #f2f6f9;
	--im-surface: #ffffff;
	--im-surface-2: #e9f1f6;
	--im-text: #181818;
	--im-muted: #5b6b78;
	--im-border: #dbe5ec;
	--im-radius: 14px;
	--im-shadow: 0 2px 12px rgba(13, 36, 56, 0.08);
	--im-shadow-lg: 0 10px 30px rgba(13, 36, 56, 0.16);
	--im-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
	--im-bg: #0a141f;
	--im-surface: #101e2b;
	--im-surface-2: #16293a;
	--im-text: #e9f1f7;
	--im-muted: #9db2c1;
	--im-border: #22384a;
	--im-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
	--im-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ---------- Base ---------- */

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--im-bg);
	color: var(--im-text);
	font-family: var(--im-font);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--im-accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

:focus-visible {
	outline: 3px solid var(--im-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

::selection {
	background: var(--im-accent);
	color: #fff;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 200;
	width: auto;
	height: auto;
	padding: 10px 16px;
	clip: auto;
	background: var(--im-navy);
	color: #fff;
	border-radius: 8px;
}

.im-container {
	max-width: 1220px;
	margin: 0 auto;
	padding: 0 18px;
}

.im-main {
	display: block;
	min-height: 55vh;
}

.im-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 330px;
	gap: 34px;
	padding: 26px 0 44px;
	align-items: start;
}

.im-btn {
	display: inline-block;
	background: var(--im-accent);
	color: #fff;
	font-weight: 700;
	padding: 11px 22px;
	border-radius: 10px;
	box-shadow: var(--im-shadow);
}

.im-btn:hover {
	background: var(--im-accent-dark);
	text-decoration: none;
}

/* ---------- Barra superior ---------- */

.im-topbar {
	background: var(--im-navy-deep);
	color: #c7d8e4;
	font-size: 0.82rem;
}

.im-topbar-in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 38px;
	padding-top: 5px;
	padding-bottom: 5px;
}

.im-date {
	margin: 0;
	text-transform: capitalize;
	letter-spacing: 0.01em;
}

.im-topbar-right {
	display: flex;
	align-items: center;
	gap: 16px;
}

.im-tagline {
	color: #8fb0c6;
}

.im-social {
	display: flex;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.im-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.im-social a:hover {
	background: var(--im-accent);
	text-decoration: none;
}

/* ---------- Cabecera principal (oscura) ---------- */

.im-masthead {
	background: var(--im-navy);
	color: #fff;
	border-bottom: 3px solid var(--im-accent);
}

.im-masthead-in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	padding-top: 20px;
	padding-bottom: 20px;
}

.im-brand {
	flex: 0 1 auto;
	min-width: 0;
}

.im-brand .custom-logo {
	display: block;
	width: auto;
	height: auto;
	max-width: 230px;
	max-height: 84px;
}

.im-brand a.custom-logo-link {
	display: inline-block;
	line-height: 0;
}

.im-textlogo {
	display: inline-block;
	font-size: 2.1rem;
	font-weight: 900;
	font-style: italic;
	letter-spacing: -0.02em;
	line-height: 1;
	color: #fff;
	text-transform: uppercase;
}

.im-textlogo:hover {
	text-decoration: none;
}

.im-textlogo-accent {
	color: #7db8dd;
}

.im-textlogo-rd {
	color: var(--im-red-bright);
}

.im-brand-tag {
	margin: 5px 0 0;
	font-size: 0.85rem;
	color: #a9c4d6;
}

.im-masthead-ad {
	flex: 0 1 728px;
	display: flex;
	justify-content: flex-end;
	color: #d7e5ee;
}

.im-masthead-ad .widget {
	margin: 0;
}

.im-ad {
	text-align: center;
}

.im-ad img,
.im-ad iframe,
.im-ad ins {
	max-width: 100%;
}

/* ---------- Navegación principal (fija) ---------- */

.im-navwrap {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--im-accent);
	box-shadow: 0 2px 10px rgba(13, 36, 56, 0.25);
}

.im-nav-in {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 52px;
}

.im-nav {
	flex: 1 1 auto;
	min-width: 0;
}

.im-menu {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

.im-menu > li {
	position: relative;
}

.im-menu a {
	display: block;
	padding: 14px 15px;
	color: #fff;
	font-weight: 600;
	font-size: 0.98rem;
	white-space: nowrap;
}

.im-menu a:hover,
.im-menu li:focus-within > a,
.im-menu .current-menu-item > a,
.im-menu .current_page_item > a {
	background: var(--im-accent-dark);
	text-decoration: none;
}

.im-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 110;
	display: none;
	min-width: 220px;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	background: var(--im-surface);
	border-radius: 0 0 10px 10px;
	box-shadow: var(--im-shadow-lg);
}

.im-menu li:hover > .sub-menu,
.im-menu li:focus-within > .sub-menu {
	display: block;
}

.im-menu .sub-menu a {
	color: var(--im-text);
	padding: 9px 16px;
	font-weight: 500;
}

.im-menu .sub-menu a:hover {
	background: var(--im-surface-2);
	color: var(--im-accent);
}

.im-nav-actions {
	display: flex;
	gap: 4px;
	margin-left: auto;
}

.im-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.im-icon-btn:hover {
	background: rgba(255, 255, 255, 0.18);
}

.im-theme-toggle .im-icon-sun {
	display: none;
}

[data-theme="dark"] .im-theme-toggle .im-icon-sun {
	display: block;
}

[data-theme="dark"] .im-theme-toggle .im-icon-moon {
	display: none;
}

.im-burger {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.im-burger:hover {
	background: rgba(255, 255, 255, 0.18);
}

.im-searchbar {
	background: var(--im-accent-dark);
	padding: 12px 0;
}

.im-searchbar .im-search-form {
	max-width: 640px;
	margin: 0 auto;
}

.im-mobile-panel {
	display: none;
	background: var(--im-navy);
	padding: 14px 18px 20px;
}

.im-mobile-panel[hidden] {
	display: none;
}

.im-mobile-menu {
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.im-mobile-menu a {
	display: block;
	padding: 11px 6px;
	color: #fff;
	font-weight: 600;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.im-mobile-menu a:hover {
	color: #7db8dd;
	text-decoration: none;
}

.im-mobile-menu .sub-menu {
	margin: 0;
	padding: 0 0 0 16px;
	list-style: none;
}

.im-mobile-menu .sub-menu a {
	font-weight: 500;
	border-bottom: 0;
	padding: 7px 6px;
}

/* ---------- Buscador ---------- */

.im-search-form {
	display: flex;
	gap: 0;
	background: #fff;
	border-radius: 999px;
	overflow: hidden;
	box-shadow: var(--im-shadow);
}

.im-search-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	padding: 12px 18px;
	font: inherit;
	font-size: 0.98rem;
	color: #181818;
	background: transparent;
}

.im-search-input:focus {
	outline: none;
}

.im-search-submit {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	border: 0;
	background: var(--im-red);
	color: #fff;
	cursor: pointer;
}

.im-search-submit:hover {
	background: #a92424;
}

/* ---------- Migas de pan ---------- */

.im-breadcrumbs {
	margin: 0 0 16px;
	font-size: 0.86rem;
	color: var(--im-muted);
}

.im-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.im-breadcrumbs li {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.im-breadcrumbs li + li::before {
	content: "›";
	color: var(--im-muted);
	margin-right: 2px;
}

.im-breadcrumbs a {
	color: var(--im-muted);
}

.im-breadcrumbs a:hover {
	color: var(--im-accent);
}

.im-breadcrumbs span {
	color: var(--im-text);
	font-weight: 600;
	/* Recorta títulos largos en las migas. */
	max-width: 420px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------- Destacada de portada ---------- */

.im-hero {
	background: var(--im-surface);
	border-radius: var(--im-radius);
	overflow: hidden;
	box-shadow: var(--im-shadow);
	margin-bottom: 26px;
}

.im-hero-media {
	display: block;
	aspect-ratio: 1200 / 675;
	background: var(--im-navy);
	overflow: hidden;
}

.im-hero-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.im-hero:hover .im-hero-media img {
	transform: scale(1.03);
}

.im-hero-body {
	padding: 22px 24px 24px;
}

.im-badge {
	display: inline-block;
	background: var(--im-red);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 999px;
}

a.im-badge:hover {
	background: #a92424;
	text-decoration: none;
}

.im-hero .im-badge {
	margin-bottom: 12px;
}

.im-hero-title {
	margin: 0 0 10px;
	font-size: 1.85rem;
	line-height: 1.22;
	letter-spacing: -0.01em;
}

.im-hero-title a {
	color: var(--im-text);
}

.im-hero-title a:hover {
	color: var(--im-accent);
	text-decoration: none;
}

.im-hero-excerpt {
	margin: 0 0 14px;
	color: var(--im-muted);
	font-size: 1.02rem;
}

.im-ads-home {
	margin: 0 0 26px;
}

.im-section-title {
	margin: 0 0 18px;
	font-size: 1.35rem;
	line-height: 1.25;
	padding-bottom: 10px;
	border-bottom: 3px solid var(--im-border);
	position: relative;
}

.im-section-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -3px;
	width: 74px;
	height: 3px;
	background: var(--im-red);
}

/* ---------- Rejilla y tarjetas ---------- */

.im-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
}

.im-grid-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.im-card {
	display: flex;
	flex-direction: column;
	background: var(--im-surface);
	border-radius: var(--im-radius);
	overflow: hidden;
	box-shadow: var(--im-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.im-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--im-shadow-lg);
}

.im-card-media {
	position: relative;
	display: block;
	aspect-ratio: 640 / 400;
	background: var(--im-navy);
	overflow: hidden;
}

.im-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.im-card-media .im-badge {
	position: absolute;
	left: 12px;
	bottom: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.im-card-nothumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 4.2rem;
	font-weight: 900;
	font-style: italic;
	color: rgba(255, 255, 255, 0.35);
	background: linear-gradient(135deg, var(--im-accent) 0%, var(--im-navy) 100%);
}

.im-hero-media .im-card-nothumb {
	font-size: 7rem;
}

.im-card-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 18px 18px;
	flex: 1 1 auto;
}

.im-card-title {
	margin: 0;
	font-size: 1.13rem;
	line-height: 1.32;
}

.im-card-title a {
	color: var(--im-text);
}

.im-card-title a:hover {
	color: var(--im-accent);
	text-decoration: none;
}

.im-card-excerpt {
	margin: 0;
	color: var(--im-muted);
	font-size: 0.94rem;
	line-height: 1.55;
}

.im-card-meta {
	margin: auto 0 0;
	padding-top: 6px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 0.82rem;
	color: var(--im-muted);
}

.im-card-meta a {
	color: var(--im-muted);
	font-weight: 600;
}

.im-card-meta a:hover {
	color: var(--im-accent);
}

.im-meta-sep {
	opacity: 0.6;
}

/* ---------- Paginación numerada ---------- */

.pagination {
	margin: 30px 0 6px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border-radius: 10px;
	background: var(--im-surface);
	color: var(--im-text);
	font-weight: 700;
	box-shadow: var(--im-shadow);
}

.page-numbers:hover {
	background: var(--im-accent);
	color: #fff;
	text-decoration: none;
}

.page-numbers.current {
	background: var(--im-accent);
	color: #fff;
}

.page-numbers.dots {
	background: transparent;
	box-shadow: none;
}

/* ---------- Artículo individual ---------- */

.im-single-head .im-badge {
	margin-bottom: 14px;
}

.im-single-title {
	margin: 0 0 12px;
	font-size: 2.25rem;
	line-height: 1.18;
	letter-spacing: -0.015em;
}

.im-single-standfirst {
	margin: 0 0 16px;
	font-size: 1.13rem;
	line-height: 1.55;
	color: var(--im-muted);
}

.im-single-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	padding: 12px 0;
	border-top: 1px solid var(--im-border);
	border-bottom: 1px solid var(--im-border);
	font-size: 0.88rem;
	color: var(--im-muted);
}

.im-meta-authorbox {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
}

.im-meta-authorbox img {
	border-radius: 50%;
}

.im-meta-authorbox a {
	color: var(--im-text);
}

.im-single-meta a {
	color: var(--im-muted);
}

.im-single-thumb {
	margin: 20px 0;
}

.im-single-thumb img {
	border-radius: var(--im-radius);
	display: block;
	width: 100%;
}

.im-single-thumb figcaption {
	margin-top: 8px;
	font-size: 0.85rem;
	color: var(--im-muted);
	text-align: center;
}

/* Compartir */

.im-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 16px 0;
}

.im-share-label {
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--im-muted);
	margin-right: 2px;
}

.im-share-btn {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 999px;
	color: #fff;
	font-size: 0.88rem;
	font-weight: 700;
}

.im-share-btn:hover {
	text-decoration: none;
	filter: brightness(1.12);
}

.im-share-fb { background: #1877f2; }
.im-share-x { background: #000; }
.im-share-wa { background: #25d366; color: #08340f; }
.im-share-tg { background: #229ed9; }

/* Contenido del artículo */

.entry-content {
	font-size: 1.06rem;
	line-height: 1.75;
	overflow-wrap: break-word;
}

.entry-content p {
	margin: 0 0 1.25em;
}

.entry-content h2 {
	font-size: 1.55rem;
	line-height: 1.3;
	margin: 1.5em 0 0.6em;
	padding-left: 12px;
	border-left: 5px solid var(--im-accent);
	scroll-margin-top: 76px;
}

.entry-content h3 {
	font-size: 1.28rem;
	margin: 1.4em 0 0.5em;
	scroll-margin-top: 76px;
}

.entry-content h4 {
	font-size: 1.1rem;
	margin: 1.3em 0 0.5em;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 1.25em;
	padding-left: 1.4em;
}

.entry-content li {
	margin-bottom: 0.4em;
}

.entry-content blockquote {
	margin: 1.4em 0;
	padding: 14px 20px;
	border-left: 5px solid var(--im-red);
	background: var(--im-surface);
	border-radius: 0 10px 10px 0;
	font-size: 1.08rem;
	font-style: italic;
	box-shadow: var(--im-shadow);
}

.entry-content blockquote p:last-child {
	margin-bottom: 0;
}

.entry-content img {
	border-radius: 10px;
}

.entry-content figure {
	margin: 1.4em 0;
}

.entry-content figcaption {
	font-size: 0.85rem;
	color: var(--im-muted);
	text-align: center;
	margin-top: 6px;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.4em 0;
	font-size: 0.95rem;
	display: block;
	overflow-x: auto;
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--im-border);
	padding: 9px 12px;
	text-align: left;
}

.entry-content th {
	background: var(--im-surface-2);
}

.entry-content pre {
	background: var(--im-navy);
	color: #e8f1f8;
	padding: 16px;
	border-radius: 10px;
	overflow-x: auto;
	font-size: 0.9rem;
}

.entry-content code {
	background: var(--im-surface-2);
	padding: 2px 6px;
	border-radius: 5px;
	font-size: 0.9em;
}

.entry-content pre code {
	background: transparent;
	padding: 0;
}

/* Bloques de Gutenberg (básicos) */

.wp-block-image img {
	border-radius: 10px;
}

.wp-block-quote {
	border-left: 5px solid var(--im-red);
	padding-left: 18px;
	font-style: italic;
}

.wp-block-button__link {
	background: var(--im-accent);
	border-radius: 10px;
	font-weight: 700;
}

.wp-block-embed iframe {
	max-width: 100%;
	border-radius: 10px;
}

.alignleft {
	float: left;
	margin: 0.4em 1.2em 1em 0;
}

.alignright {
	float: right;
	margin: 0.4em 0 1em 1.2em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.alignwide {
	max-width: 100%;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text {
	font-size: 0.85rem;
	color: var(--im-muted);
	text-align: center;
	margin-top: 6px;
}

/* Tabla de contenidos automática */

.im-toc {
	background: var(--im-surface);
	border: 1px solid var(--im-border);
	border-top: 4px solid var(--im-accent);
	border-radius: 12px;
	padding: 16px 20px 10px;
	margin: 1.4em 0;
	box-shadow: var(--im-shadow);
}

.im-toc-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.im-toc-title {
	font-weight: 800;
	font-size: 1.02rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.im-toc-toggle {
	border: 0;
	background: transparent;
	color: var(--im-accent);
	font: inherit;
	font-size: 0.85rem;
	font-weight: 700;
	cursor: pointer;
	padding: 4px 6px;
}

.im-toc-list {
	margin: 0 0 8px;
	padding-left: 1.3em;
}

.im-toc-list li {
	margin-bottom: 5px;
}

.im-toc-list a {
	color: var(--im-text);
}

.im-toc-list a:hover {
	color: var(--im-accent);
}

/* Etiquetas */

.im-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 26px 0 6px;
}

.im-tags-label {
	font-weight: 700;
	font-size: 0.9rem;
}

.im-tag {
	background: var(--im-surface-2);
	color: var(--im-text);
	padding: 5px 13px;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
}

.im-tag:hover {
	background: var(--im-accent);
	color: #fff;
	text-decoration: none;
}

/* Caja de autor */

.im-author-box {
	display: flex;
	gap: 18px;
	background: var(--im-surface);
	border-radius: var(--im-radius);
	box-shadow: var(--im-shadow);
	padding: 20px 22px;
	margin: 26px 0;
}

.im-author-avatar {
	border-radius: 50%;
	flex: 0 0 auto;
}

.im-author-kicker {
	margin: 0;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--im-red);
}

.im-author-name {
	margin: 2px 0 6px;
	font-size: 1.2rem;
	font-weight: 800;
}

.im-author-name a {
	color: var(--im-text);
}

.im-author-bio {
	margin: 0;
	color: var(--im-muted);
	font-size: 0.95rem;
}

/* Anterior / siguiente */

.post-navigation {
	margin: 26px 0;
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.post-navigation .nav-previous a,
.post-navigation .nav-next a {
	display: block;
	height: 100%;
	background: var(--im-surface);
	border-radius: var(--im-radius);
	box-shadow: var(--im-shadow);
	padding: 16px 18px;
	color: var(--im-text);
}

.post-navigation .nav-next {
	text-align: right;
}

.post-navigation a:hover {
	text-decoration: none;
	box-shadow: var(--im-shadow-lg);
}

.im-nav-kicker {
	display: block;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--im-accent);
	margin-bottom: 4px;
}

.im-nav-title {
	display: block;
	font-weight: 700;
	line-height: 1.35;
}

.im-page-links {
	margin: 20px 0;
	font-weight: 700;
}

/* Relacionados */

.im-related {
	margin-top: 34px;
}

/* ---------- Página estática y archivos ---------- */

.im-page-title,
.im-archive-title {
	margin: 0 0 14px;
	font-size: 2rem;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.im-archive-head {
	margin-bottom: 22px;
}

.im-archive-desc {
	color: var(--im-muted);
	max-width: 70ch;
}

.im-archive-head .im-search-form {
	max-width: 520px;
	margin-top: 16px;
	border: 1px solid var(--im-border);
}

.im-author-head {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	background: var(--im-surface);
	border-radius: var(--im-radius);
	box-shadow: var(--im-shadow);
	padding: 22px;
	margin-bottom: 24px;
}

.im-author-count {
	margin: 6px 0 0;
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--im-accent);
}

/* ---------- Comentarios ---------- */

.im-comments {
	margin-top: 38px;
	background: var(--im-surface);
	border-radius: var(--im-radius);
	box-shadow: var(--im-shadow);
	padding: 24px 26px;
}

.im-comments-title {
	margin: 0 0 18px;
	font-size: 1.3rem;
}

.im-comment-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.im-comment-list .children {
	margin: 0;
	padding-left: 30px;
	list-style: none;
}

.im-comment-list .comment-body {
	padding: 16px 0;
	border-bottom: 1px solid var(--im-border);
}

.im-comment-list .comment-author {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
}

.im-comment-list .comment-author img {
	border-radius: 50%;
}

.im-comment-list .comment-metadata {
	font-size: 0.8rem;
	color: var(--im-muted);
	margin: 2px 0 8px;
}

.im-comment-list .comment-metadata a {
	color: var(--im-muted);
}

.im-comment-list .reply {
	margin-top: 6px;
	font-size: 0.85rem;
	font-weight: 700;
}

.im-comment-notes,
.im-comments-closed {
	color: var(--im-muted);
	font-size: 0.9rem;
}

.comment-respond {
	margin-top: 22px;
}

.comment-reply-title {
	font-size: 1.2rem;
	margin: 0 0 10px;
}

.comment-form label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 5px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	border: 1px solid var(--im-border);
	border-radius: 10px;
	padding: 11px 13px;
	font: inherit;
	font-size: 0.98rem;
	background: var(--im-bg);
	color: var(--im-text);
}

.comment-form .submit {
	background: var(--im-accent);
	color: #fff;
	border: 0;
	border-radius: 10px;
	padding: 12px 24px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.comment-form .submit:hover {
	background: var(--im-accent-dark);
}

.comments-pagination {
	margin: 16px 0;
}

/* ---------- Barra lateral y widgets ---------- */

.im-sidebar {
	position: sticky;
	top: 74px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.widget {
	background: var(--im-surface);
	border-radius: var(--im-radius);
	box-shadow: var(--im-shadow);
	padding: 20px;
	font-size: 0.96rem;
}

.widget-title {
	margin: 0 0 14px;
	font-size: 1.02rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding-bottom: 9px;
	border-bottom: 3px solid var(--im-border);
	position: relative;
}

.widget-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -3px;
	width: 52px;
	height: 3px;
	background: var(--im-red);
}

.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget li {
	padding: 7px 0;
	border-bottom: 1px solid var(--im-border);
}

.widget li:last-child {
	border-bottom: 0;
}

.widget a {
	color: var(--im-text);
}

.widget a:hover {
	color: var(--im-accent);
}

.widget .post-date {
	display: block;
	font-size: 0.8rem;
	color: var(--im-muted);
}

.widget_tag_cloud a,
.tagcloud a {
	display: inline-block;
	background: var(--im-surface-2);
	color: var(--im-text);
	border-radius: 999px;
	padding: 4px 12px;
	margin: 0 5px 8px 0;
	font-size: 0.84rem !important;
	font-weight: 600;
}

.tagcloud a:hover {
	background: var(--im-accent);
	color: #fff;
	text-decoration: none;
}

.widget_search {
	padding: 14px;
}

.widget_search .im-search-form,
.widget form[role="search"] {
	border: 1px solid var(--im-border);
}

.widget_calendar table {
	width: 100%;
	border-collapse: collapse;
	text-align: center;
	font-size: 0.88rem;
}

.widget_calendar caption {
	font-weight: 700;
	margin-bottom: 8px;
}

.widget_calendar td,
.widget_calendar th {
	padding: 5px 2px;
}

.im-sidebar .im-ad,
.im-sidebar .widget_text img {
	margin: 0 auto;
}

/* ---------- 404 y sin resultados ---------- */

.im-404 {
	text-align: center;
	padding: 54px 0 30px;
}

.im-404-code {
	margin: 0;
	font-size: 6.5rem;
	font-weight: 900;
	font-style: italic;
	line-height: 1;
	color: var(--im-accent);
}

.im-404-title {
	margin: 8px 0 10px;
	font-size: 1.9rem;
}

.im-404-text {
	color: var(--im-muted);
	max-width: 56ch;
	margin: 0 auto 20px;
}

.im-404 .im-search-form {
	max-width: 520px;
	margin: 0 auto 20px;
	border: 1px solid var(--im-border);
}

.im-404-recent {
	padding-bottom: 44px;
}

.im-none {
	background: var(--im-surface);
	border-radius: var(--im-radius);
	box-shadow: var(--im-shadow);
	padding: 28px;
	text-align: center;
}

.im-none .im-search-form {
	max-width: 480px;
	margin: 16px auto;
	border: 1px solid var(--im-border);
}

/* ---------- Pie de página ---------- */

.im-footer {
	background: var(--im-navy);
	color: #c7d8e4;
	margin-top: 10px;
}

.im-footer-widgets {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
	padding-top: 40px;
	padding-bottom: 30px;
}

.im-footer .widget {
	background: transparent;
	box-shadow: none;
	padding: 0;
	border-radius: 0;
	color: #c7d8e4;
}

.im-footer .widget-title {
	color: #fff;
	border-bottom-color: rgba(255, 255, 255, 0.18);
}

.im-footer .widget li {
	border-bottom-color: rgba(255, 255, 255, 0.12);
}

.im-footer .widget a {
	color: #c7d8e4;
}

.im-footer .widget a:hover {
	color: #fff;
}

.im-footer .tagcloud a {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.im-footer-bottom {
	background: var(--im-navy-deep);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.im-footer-bottom-in {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 22px;
	padding-top: 16px;
	padding-bottom: 16px;
	font-size: 0.9rem;
}

.im-copy {
	margin: 0;
}

.im-copy a {
	color: #fff;
	font-weight: 700;
}

.im-footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.im-footer-menu a {
	color: #c7d8e4;
}

.im-footer-menu a:hover {
	color: #fff;
}

/* ---------- Volver arriba ---------- */

.im-to-top {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 120;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border: 0;
	border-radius: 50%;
	background: var(--im-red);
	color: #fff;
	box-shadow: var(--im-shadow-lg);
	cursor: pointer;
}

.im-to-top:hover {
	background: #a92424;
}

.im-to-top[hidden] {
	display: none;
}

/* ---------- Modo oscuro: ajustes finos ---------- */

[data-theme="dark"] .im-card-media,
[data-theme="dark"] .im-hero-media {
	background: #0d2438;
}

[data-theme="dark"] .entry-content img,
[data-theme="dark"] .im-card-media img,
[data-theme="dark"] .im-hero-media img {
	filter: brightness(0.94);
}

[data-theme="dark"] .im-search-form {
	background: #fff;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.im-grid-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.im-layout {
		grid-template-columns: minmax(0, 1fr) 290px;
		gap: 26px;
	}
}

@media (max-width: 880px) {
	.im-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.im-sidebar {
		position: static;
	}

	.im-nav {
		display: none;
	}

	.im-burger {
		display: inline-flex;
	}

	.im-mobile-panel {
		display: block;
		max-height: calc(100dvh - 60px);
		overflow-y: auto;
	}

	.im-mobile-panel[hidden] {
		display: none;
	}

	.im-masthead-in {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}

	.im-masthead-ad {
		justify-content: flex-start;
	}

	.im-tagline {
		display: none;
	}

	.im-single-title {
		font-size: 1.8rem;
	}

	.im-hero-title {
		font-size: 1.5rem;
	}

	.im-footer-widgets {
		grid-template-columns: 1fr;
		gap: 22px;
	}
}

@media (max-width: 600px) {
	body {
		font-size: 16px;
	}

	.im-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.im-grid-4 {
		grid-template-columns: minmax(0, 1fr);
	}

	.im-date {
		font-size: 0.78rem;
	}

	.im-brand .custom-logo {
		max-height: 64px;
	}

	.im-textlogo {
		font-size: 1.65rem;
	}

	.im-author-box {
		flex-direction: column;
		gap: 10px;
	}

	.post-navigation .nav-links {
		grid-template-columns: 1fr;
	}

	.im-comments {
		padding: 18px;
	}

	.im-breadcrumbs span {
		max-width: 210px;
	}

	.im-404-code {
		font-size: 4.4rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}

/* ---------- Portada estilo original: destacada + 4 al lado ---------- */

.im-home {
	padding: 26px 0 44px;
}

.im-hero-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
	gap: 26px;
	align-items: stretch;
	margin-bottom: 26px;
}

.im-hero-wrap .im-hero {
	margin-bottom: 0;
	height: 100%;
}

.im-hero-side {
	background: var(--im-surface);
	border-radius: var(--im-radius);
	box-shadow: var(--im-shadow);
	padding: 8px 20px;
	display: flex;
	flex-direction: column;
}

.im-mini {
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid var(--im-border);
	flex: 1;
}

.im-mini:last-child {
	border-bottom: 0;
}

.im-mini:hover {
	text-decoration: none;
}

.im-mini-title {
	flex: 1;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.35;
	color: var(--im-text);
}

.im-mini:hover .im-mini-title {
	color: var(--im-accent);
}

.im-mini-thumb {
	width: 112px;
	height: 84px;
	border-radius: 8px;
	overflow: hidden;
	flex: none;
	background: var(--im-navy);
	display: block;
}

.im-mini-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.im-grid-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 960px) {
	.im-hero-wrap {
		grid-template-columns: 1fr;
	}

	.im-grid-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 620px) {
	.im-grid-3 {
		grid-template-columns: 1fr;
	}

	.im-mini-thumb {
		width: 92px;
		height: 70px;
	}
}

/* ---------- Imágenes seguras: ni estiradas ni fuera del área ---------- */

/* Ningún elemento del artículo puede salirse de la columna del texto */
.im-single,
.im-page {
	overflow-x: clip;
}

/* Videos, mapas y otros incrustados: como máximo el ancho del artículo */
.entry-content iframe,
.entry-content embed,
.entry-content object {
	max-width: 100%;
}

.entry-content video {
	max-width: 100%;
	height: auto;
}

.entry-content pre {
	max-width: 100%;
	overflow-x: auto;
}

/* Imágenes flotantes: nunca aplastan el texto ni se salen del área */
.entry-content .alignleft,
.entry-content .alignright {
	max-width: 46%;
}

@media (max-width: 620px) {
	.entry-content .alignleft,
	.entry-content .alignright {
		float: none;
		max-width: 100%;
		margin: 1em auto;
	}
}

/* Imagen destacada del artículo: ancho completo sin deformarse
   y sin convertirse en una tira larguísima si es vertical */
.im-single-thumb img {
	max-height: 600px;
	object-fit: cover;
}

/* Miniaturas de widgets y listados: recorte limpio, jamás estiradas */
.widget img,
.im-related img {
	height: auto;
}

/* ---------- Cabecera centrada y buscador bajo el menú ---------- */

.im-masthead-in {
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 14px;
}

.im-brand {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.im-brand .custom-logo {
	margin: 0 auto;
}

.im-masthead-ad {
	display: flex;
	justify-content: center;
}

/* Franja del buscador: siempre visible, debajo del menú y antes del contenido */
.im-searchstrip {
	background: var(--im-surface);
	border-bottom: 1px solid var(--im-border);
	padding: 14px 0;
}

.im-searchstrip .im-search-form {
	max-width: 640px;
	margin: 0 auto;
	border: 1px solid var(--im-border);
}

/* ---------- Pie de página: pegado a los lados como la cabecera ---------- */

/* La banda del pie nunca puede empujar la página hacia los lados */
.im-footer {
	overflow-x: clip;
}

/* Ningún contenido de los widgets del pie se sale de su columna */
.im-footer-col {
	min-width: 0;
}

.im-footer .widget {
	min-width: 0;
	overflow-wrap: break-word;
}

.im-footer img,
.im-footer iframe,
.im-footer video,
.im-footer embed,
.im-footer object,
.im-footer table {
	max-width: 100%;
}

/* ================= ADAPTACIÓN TOTAL: PC, TABLET Y MÓVIL ================= */

/* ---------- Tablet (hasta 1024px) ---------- */
@media (max-width: 1024px) {
	/* Contenido y barra lateral se apilan: primero el artículo, luego la barra */
	.im-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.im-sidebar {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 22px;
		align-items: start;
	}

	.im-grid-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Las 4 noticias del héroe en dos columnas */
	.im-hero-side {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0 22px;
	}
}

/* ---------- Tablet vertical y móvil grande (hasta 880px) ---------- */
@media (max-width: 880px) {
	/* Botones y enlaces cómodos para el dedo */
	.im-burger,
	.im-icon-btn {
		width: 44px;
		height: 44px;
	}

	.im-mobile-menu a {
		display: block;
		padding: 12px 6px;
	}

	/* Barra superior compacta: fecha y redes, sin la frase larga */
	.im-tagline {
		display: none;
	}

	.im-topbar-in {
		justify-content: space-between;
	}
}

/* ---------- Móvil (hasta 640px) ---------- */
@media (max-width: 640px) {
	.im-container {
		padding: 0 14px;
	}

	/* Logo centrado y sin salirse nunca de la pantalla */
	.im-brand .custom-logo {
		max-width: 82vw;
		max-height: 58px;
		width: auto;
		height: auto;
	}

	.im-textlogo {
		font-size: 1.7rem;
	}

	/* Todo a una columna */
	.im-sidebar,
	.im-hero-side,
	.im-grid,
	.im-grid-3,
	.im-grid-4 {
		grid-template-columns: minmax(0, 1fr);
	}

	.im-sidebar {
		display: block;
	}

	.im-hero-title {
		font-size: 1.45rem;
	}

	.im-single-title {
		font-size: 1.65rem;
		line-height: 1.2;
	}

	.im-section-title {
		font-size: 1.2rem;
	}

	/* Buscador a ancho completo y cómodo */
	.im-searchstrip {
		padding: 12px 0;
	}

	.im-search-input {
		font-size: 16px; /* evita el zoom automático de iOS al escribir */
	}

	/* Pie: columnas apiladas y barra inferior centrada */
	.im-footer-widgets {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
		padding-top: 30px;
	}

	.im-footer-bottom-in {
		flex-direction: column;
		text-align: center;
		justify-content: center;
	}

	.im-footer-menu {
		justify-content: center;
	}

	/* Botón «volver arriba» sin tapar contenido */
	.im-to-top {
		right: 14px;
		bottom: 14px;
	}
}

/* ---------- PC grande (desde 1280px) ---------- */
@media (min-width: 1280px) {
	.im-container {
		max-width: 1240px;
	}
}

/* ================= MODERNIZACIÓN TOTAL v1.1.0 ================= */

:root {
	--im-radius: 16px;
	--im-shadow: 0 2px 14px rgba(13, 36, 56, 0.09);
	--im-shadow-lg: 0 16px 38px rgba(13, 36, 56, 0.18);
	--im-grad: linear-gradient(120deg, #185a86 0%, #2471a3 55%, #3f97cc 100%);
	--im-grad-soft: linear-gradient(135deg, var(--im-surface-2) 0%, var(--im-surface) 70%);
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

::selection {
	background: var(--im-accent);
	color: #fff;
}

:focus-visible {
	outline: 3px solid rgba(36, 113, 163, 0.55);
	outline-offset: 2px;
}

/* ---------- Cabecera y menú con degradados ---------- */

.im-masthead {
	background: linear-gradient(180deg, #11334f 0%, var(--im-navy) 70%);
	border-bottom: none;
	position: relative;
}

.im-masthead::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--im-accent) 0%, #57a8d8 55%, var(--im-red) 100%);
}

.im-navwrap {
	background: var(--im-grad);
	box-shadow: 0 6px 18px rgba(13, 36, 56, 0.25);
}

.im-menu a {
	border-radius: 8px;
	transition: background 0.2s ease, color 0.2s ease;
}

.im-menu a:hover {
	background: rgba(255, 255, 255, 0.16);
	text-decoration: none;
}

.im-menu .current-menu-item > a,
.im-menu .current-post-ancestor > a,
.im-menu .current-category-ancestor > a {
	background: rgba(255, 255, 255, 0.22);
	font-weight: 700;
}

/* ---------- Héroe moderno: titular sobre la foto ---------- */

@media (min-width: 641px) {
	.im-hero {
		position: relative;
	}

	.im-hero-body {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		padding: 52px 24px 20px;
		background: linear-gradient(180deg, rgba(8, 26, 42, 0) 0%, rgba(8, 26, 42, 0.78) 48%, rgba(8, 26, 42, 0.95) 100%);
		color: #fff;
	}

	.im-hero-title a {
		color: #fff;
	}

	.im-hero-title a:hover {
		color: #bfe0f5;
	}

	.im-hero-excerpt {
		color: rgba(255, 255, 255, 0.88);
	}

	.im-hero .im-card-meta {
		color: rgba(255, 255, 255, 0.78);
	}

	.im-hero .im-card-meta a {
		color: #fff;
	}
}

/* ---------- Tarjetas con vida ---------- */

.im-card {
	border: 1px solid var(--im-border);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.im-card-media img {
	transition: transform 0.45s ease;
}

.im-card:hover .im-card-media img {
	transform: scale(1.05);
}

.im-badge {
	box-shadow: 0 3px 10px rgba(207, 46, 46, 0.35);
}

/* ---------- Títulos de sección ---------- */

.im-section-title {
	font-weight: 800;
	letter-spacing: -0.01em;
	border-bottom-width: 2px;
}

.im-section-title::after {
	width: 92px;
	height: 4px;
	bottom: -2px;
	border-radius: 4px;
	background: linear-gradient(90deg, var(--im-accent), var(--im-red));
}

/* ---------- Buscador ---------- */

.im-search-form {
	transition: box-shadow 0.2s ease;
}

.im-search-form:focus-within {
	box-shadow: 0 0 0 4px rgba(36, 113, 163, 0.22), var(--im-shadow);
}

.im-search-submit {
	background: var(--im-grad);
}

/* ---------- Paginación en píldoras ---------- */

.page-numbers {
	border-radius: 999px;
	border: 1px solid var(--im-border);
	background: var(--im-surface);
	padding: 8px 15px;
	font-weight: 600;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.page-numbers:hover {
	transform: translateY(-2px);
	box-shadow: var(--im-shadow);
	text-decoration: none;
}

.page-numbers.current {
	background: var(--im-grad);
	border-color: transparent;
	color: #fff;
}

/* ---------- Artículo: compartir, contenido y autor ---------- */

.im-share-btn {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.im-share-btn:hover {
	transform: translateY(-2px);
	box-shadow: var(--im-shadow-lg);
}

.im-single-thumb img {
	box-shadow: var(--im-shadow);
}

.im-toc {
	border: 1px solid var(--im-border);
	border-left: 5px solid var(--im-accent);
	border-radius: var(--im-radius);
	box-shadow: var(--im-shadow);
}

.im-author-box {
	background: var(--im-grad-soft);
	border: 1px solid var(--im-border);
	border-radius: var(--im-radius);
	box-shadow: var(--im-shadow);
}

.im-author-box .avatar {
	border-radius: 50%;
	border: 3px solid #fff;
	box-shadow: var(--im-shadow);
}

/* ---------- Barra lateral ---------- */

.widget {
	border: 1px solid var(--im-border);
}

.widget-title {
	letter-spacing: 0.02em;
	font-weight: 800;
}

/* ---------- Pie moderno ---------- */

.im-footer {
	background: linear-gradient(180deg, var(--im-navy) 0%, var(--im-navy-deep) 100%);
	position: relative;
}

.im-footer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--im-accent) 0%, #57a8d8 55%, var(--im-red) 100%);
}

.im-to-top {
	background: var(--im-grad);
	border-radius: 50%;
	box-shadow: var(--im-shadow-lg);
	transition: transform 0.2s ease;
}

.im-to-top:hover {
	transform: translateY(-3px);
}

/* ============ CONTENCIÓN LATERAL TOTAL (v1.1.1) ============
   La página jamás puede ser más ancha que la pantalla: las bandas
   (cabecera, menú, buscador y pie) nunca se salen de los lados. */

html,
body {
	overflow-x: clip;
}

body {
	max-width: 100%;
}

.im-topbar,
.im-masthead,
.im-navwrap,
.im-searchstrip,
.im-footer {
	max-width: 100%;
}

/* Los hijos flexibles pueden encogerse: nada empuja desde dentro */
.im-topbar-in {
	flex-wrap: wrap;
}

.im-topbar-in > *,
.im-nav-in > *,
.im-masthead-in > *,
.im-footer-bottom-in > *,
.im-mini {
	min-width: 0;
}

.im-date,
.im-mini-title {
	overflow-wrap: break-word;
}

.im-hero-wrap,
.im-layout,
.im-grid {
	min-width: 0;
}

/* ---------- Fechas modernas, a juego con los autores (v1.1.2) ---------- */

.im-fecha {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	color: var(--im-muted);
	white-space: nowrap;
}

.im-fecha svg {
	color: var(--im-accent);
	flex: none;
}

.im-card-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 8px;
}

/* En la destacada (sobre la foto) la fecha va clara con el icono celeste */
.im-hero .im-fecha {
	color: rgba(255, 255, 255, 0.88);
}

.im-hero .im-fecha svg {
	color: #8fc7e8;
}

/* En el artículo, la fecha va en píldora suave junto al autor con foto */
.im-single-meta .im-fecha {
	background: var(--im-surface-2);
	padding: 5px 12px;
	border-radius: 999px;
}

[data-theme="dark"] .im-single-meta .im-fecha {
	background: rgba(255, 255, 255, 0.08);
}

/* ===== Bandas al mismo ancho que la portada + redes sociales (v1.1.3) ===== */

:root {
	--im-pad: 18px;
}

@media (max-width: 640px) {
	:root {
		--im-pad: 14px;
	}
}

/* Cabecera, menú, buscador y pie: exactamente el ancho de la columna de la portada */
.im-topbar,
.im-masthead,
.im-navwrap,
.im-searchstrip,
.im-footer {
	margin-left: max(var(--im-pad), calc((100% - 1220px) / 2 + var(--im-pad)));
	margin-right: max(var(--im-pad), calc((100% - 1220px) / 2 + var(--im-pad)));
}

/* Dentro de las bandas no se suma otro margen: el texto alinea con los artículos */
.im-topbar .im-container,
.im-masthead .im-container,
.im-navwrap .im-container,
.im-searchstrip .im-container,
.im-footer .im-container {
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

.im-mobile-panel {
	padding-left: 0;
	padding-right: 0;
}

/* Botones de compartir: iconos de verdad dentro de los círculos */
.im-share-btn {
	color: #fff;
	line-height: 0;
}

.im-share-wa {
	color: #fff;
}

/* Botones sociales de la barra superior: círculos limpios */
.im-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	transition: background 0.2s ease, transform 0.2s ease;
}

.im-social a:hover {
	background: var(--im-accent);
	transform: translateY(-1px);
	text-decoration: none;
}

/* ===== Aire en las bandas y buscador dentro del artículo (v1.1.4) ===== */

/* Las bandas ocupan el ancho del contenedor de la portada y su texto
   respira por dentro: nada pegado a las esquinas ni cortado */
.im-topbar,
.im-masthead,
.im-navwrap,
.im-searchstrip,
.im-footer {
	margin-left: max(0px, calc((100% - 1220px) / 2));
	margin-right: max(0px, calc((100% - 1220px) / 2));
}

.im-topbar .im-container,
.im-masthead .im-container,
.im-navwrap .im-container,
.im-searchstrip .im-container,
.im-footer .im-container {
	padding-left: var(--im-pad);
	padding-right: var(--im-pad);
}

.im-mobile-panel {
	padding-left: var(--im-pad);
	padding-right: var(--im-pad);
}

/* El menú va pegado a la cabecera, como una sola pieza:
   sin hueco blanco ni esquinas de bloque aparte */

.im-footer {
	border-radius: 14px 14px 0 0;
	overflow: clip;
}



/* ===== «También te puede interesar» estilo explorar (v1.1.5) =====
   Una destacada grande + lista de pequeñas, con los colores del tema */

.im-explore-wrap {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 22px;
	align-items: start;
}

.im-explore-media {
	position: relative;
	display: block;
	border-radius: var(--im-radius);
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: var(--im-surface);
	box-shadow: var(--im-shadow);
}

.im-explore-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.im-explore-main:hover .im-explore-media img {
	transform: scale(1.04);
}

.im-explore-main-title {
	margin: 14px 0 8px;
	font-size: 1.35rem;
	line-height: 1.3;
	font-weight: 800;
}

.im-explore-main-title a {
	color: var(--im-text);
	text-decoration: none;
}

.im-explore-main-title a:hover {
	color: var(--im-accent);
}

.im-explore-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.im-explore-item {
	display: flex;
	gap: 14px;
	align-items: stretch;
	background: var(--im-surface);
	border: 1px solid var(--im-border);
	border-radius: var(--im-radius);
	padding: 10px;
	box-shadow: var(--im-shadow);
}

.im-explore-thumb {
	flex: none;
	width: 112px;
	border-radius: 10px;
	overflow: hidden;
}

.im-explore-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.im-explore-info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
}

.im-explore-cat {
	margin: 0;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--im-accent);
}

.im-explore-item-title {
	margin: 0;
	font-size: 0.98rem;
	line-height: 1.35;
	font-weight: 700;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.im-explore-item-title a {
	color: var(--im-text);
	text-decoration: none;
}

.im-explore-item-title a:hover {
	color: var(--im-accent);
}

.im-explore-item .im-card-meta {
	margin: 0;
	font-size: 0.8rem;
}

@media (max-width: 760px) {
	.im-explore-wrap {
		grid-template-columns: 1fr;
	}

	.im-explore-main-title {
		font-size: 1.2rem;
	}
}

/* ===== Pulido final (v1.2.0) ===== */

.im-mini-thumb .im-card-nothumb {
	font-size: 2rem;
}

.im-updated {
	font-weight: 600;
}

/* ===== Premium (v1.3.0) ===== */

/* Cintillo «Última hora» */
.im-ticker {
	display: flex;
	align-items: stretch;
	background: var(--im-surface);
	border: 1px solid var(--im-border);
	border-radius: var(--im-radius);
	overflow: hidden;
	margin: 8px 0 22px;
	box-shadow: var(--im-shadow);
}

.im-ticker-label {
	flex: none;
	display: inline-flex;
	align-items: center;
	background: var(--im-red);
	color: #fff;
	font-weight: 800;
	font-size: 0.78rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 10px 14px;
}

.im-ticker-viewport {
	position: relative;
	flex: 1;
	min-width: 0;
}

.im-ticker-item {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	padding: 0 14px;
	color: var(--im-text);
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	opacity: 0;
	transition: opacity 0.45s ease;
	pointer-events: none;
	text-decoration: none;
}

.im-ticker-item.is-active {
	opacity: 1;
	pointer-events: auto;
}

.im-ticker-item:hover {
	color: var(--im-accent);
}

/* Barra de progreso de lectura */
.im-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	z-index: 300;
}

.im-progress-bar {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--im-accent), var(--im-accent-dark));
}

/* Secciones por categoría en la portada */
.im-home-section {
	margin-top: 34px;
}

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

.im-section-title a:hover {
	color: var(--im-accent);
}

/* Contador de lecturas en la meta */
.im-views {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

/* Widget «Lo más leído» */
.im-pop {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.im-pop-item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.im-pop-thumb {
	flex: none;
	width: 76px;
	height: 60px;
	border-radius: 10px;
	overflow: hidden;
	display: block;
}

.im-pop-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.im-pop-thumb .im-card-nothumb {
	font-size: 1.6rem;
}

.im-pop-info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.im-pop-title {
	font-weight: 700;
	line-height: 1.35;
	color: var(--im-text);
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.im-pop-title:hover {
	color: var(--im-accent);
}

.im-pop-meta {
	font-size: 0.78rem;
	color: var(--im-muted);
}

/* Widget «Síguenos» */
.im-socbox {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.im-socbtn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 10px;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.im-socbtn:hover {
	opacity: 0.9;
	text-decoration: none;
}

.im-socbtn-facebook {
	background: #1877f2;
}

.im-socbtn-x {
	background: #000000;
}

.im-socbtn-youtube {
	background: #e62117;
}

.im-socbtn-instagram {
	background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

@media (max-width: 640px) {
	.im-ticker-label {
		padding: 8px 10px;
		font-size: 0.7rem;
	}

	.im-ticker-item {
		font-size: 0.92rem;
	}
}

/* La barra de progreso se ve también con la barra de administración de WP */
body.admin-bar .im-progress {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .im-progress {
		top: 46px;
	}
}
