/* ==========================================================================
   mejoras.css — capa estética sobre la plantilla (se carga después de custom.css)
   Secciones: variables · cinta de noticias · slide · tarjetas de noticias ·
              listas laterales · contador de visitas · accesibilidad
   ========================================================================== */

:root {
	--fm-accent: #dc3545;
	--fm-accent-dark: #b02a37;
	--fm-accent-soft: rgba(220, 53, 69, .1);
	--fm-ink: #1c2330;
	--fm-muted: #6b7280;
	--fm-live: #16a34a;
	--fm-radius: 14px;
	--fm-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px -4px rgba(16, 24, 40, .12);
	--fm-shadow-hover: 0 22px 44px -16px rgba(16, 24, 40, .38);
	--fm-ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------------------------------------------------------------- Cinta "Últimas noticias" */
.fm-ticker {
	background: #fff;
	border-top: 1px solid #eef0f3;
	border-bottom: 1px solid #eef0f3;
	box-shadow: 0 6px 16px -14px rgba(16, 24, 40, .4);
}

.fm-ticker .badge {
	position: relative;
	padding: .55rem .9rem .55rem 1.5rem;
	border-radius: 999px;
	font-size: .72rem;
	letter-spacing: .09em;
	background: var(--fm-accent) !important;
}

.fm-ticker .badge::before {
	content: "";
	position: absolute;
	left: .65rem;
	top: 50%;
	width: 7px;
	height: 7px;
	margin-top: -3.5px;
	border-radius: 50%;
	background: #fff;
	animation: fm-pulse 1.8s infinite;
}

.fm-ticker .slide a {
	color: var(--fm-ink);
	font-size: .95rem;
}

.fm-ticker .slide a:hover .fm-tk-title {
	color: var(--fm-accent);
}

.fm-tk-cat {
	color: var(--fm-accent);
	font-weight: 700;
	text-transform: uppercase;
	font-size: .78rem;
	letter-spacing: .05em;
}

.fm-tk-date {
	color: var(--fm-muted);
	font-weight: 500;
}

.fm-tk-title {
	color: var(--fm-ink);
	font-weight: 700;
	transition: color .25s;
}

.fm-tk-sep {
	color: #c7ccd4;
	margin: 0 .35rem;
}

/* ---------------------------------------------------------------- Slide (carrusel desktop + slider móvil) */
.news-carousel .oc-item {
	overflow: hidden;
	background: #0b0e14;
}

.news-carousel .oc-item img,
#div-mobile .slide img {
	transition: transform 1.4s var(--fm-ease), filter .5s;
}

.news-carousel .oc-item:hover img,
#div-mobile .slide:hover img {
	transform: scale(1.07);
	filter: saturate(1.08);
}

/* degradado más largo y oscuro: el texto blanco siempre tiene contraste suficiente */
.news-carousel .text-overlay-mask,
#div-mobile .text-overlay-mask {
	opacity: 1;
	padding: 120px 28px 26px;
	background: linear-gradient(to top, rgba(7, 9, 14, .94) 0%, rgba(7, 9, 14, .78) 34%, rgba(7, 9, 14, .35) 68%, rgba(7, 9, 14, 0) 100%);
	filter: none;
}

#div-mobile .text-overlay-mask {
	padding: 90px 18px 18px;
}

.news-carousel .badge {
	padding: .45rem .75rem;
	border-radius: 999px;
	font-size: .7rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}

.news-carousel .portfolio-desc h3,
#div-mobile .portfolio-desc h3 {
	margin: .6rem 0 .35rem !important;
	color: #fff;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.25;
	text-shadow: 0 2px 14px rgba(0, 0, 0, .7);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

#div-mobile .portfolio-desc h3 {
	font-size: 1.2rem;
}

.news-carousel .portfolio-desc span,
#div-mobile .portfolio-desc span {
	display: block;
	margin-bottom: .75rem;
	color: rgba(255, 255, 255, .88);
	font-size: .85rem;
	font-weight: 500;
	letter-spacing: .02em;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .7);
}

.news-carousel .btn-outline-light {
	padding: .45rem 1.1rem;
	border-width: 2px;
	border-radius: 999px;
	font-weight: 600;
	transition: background .25s, color .25s, transform .25s var(--fm-ease);
}

.news-carousel .btn-outline-light:hover {
	background: #fff;
	color: var(--fm-ink);
	transform: translateX(4px);
}

/* contador de vistas del slide: disco oscuro, texto siempre legible sobre cualquier foto */
.news-carousel .rounded-skill {
	top: 22px;
	right: 22px;
	border-radius: 50%;
	background: rgba(7, 9, 14, .62);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
	text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
}

/* número arriba y "vistas" dentro del aro, pegado debajo del número */
.news-carousel .rounded-skill {
	line-height: 62px !important;
}

.news-carousel .rounded-skill .fm-vistas {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 17px;
	font-size: .6rem;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .85);
}

/* flechas y puntos del slider móvil */
#div-mobile .flex-direction-nav a {
	background: rgba(7, 9, 14, .55);
	border-radius: 50%;
	color: #fff;
}

/* ---------------------------------------------------------------- Tarjetas de noticias */
/* nota destacada (ancho completo): la tarjeta es el propio .entry */
.fm-card.entry:not([class*="col-"]),
/* grilla (columnas de Bootstrap): la tarjeta es el contenedor interno, así se conserva el espacio entre columnas */
.fm-card.entry[class*="col-"] > .grid-inner {
	position: relative;
	background: #fff;
	border: 0;
	border-radius: var(--fm-radius);
	overflow: hidden;
	box-shadow: var(--fm-shadow);
	transition: transform .4s var(--fm-ease), box-shadow .4s var(--fm-ease);
}

.fm-card.entry:not([class*="col-"]) {
	margin: 0 0 32px;
	padding: 0;
}

.fm-card.entry[class*="col-"] {
	margin-bottom: 28px;
	border: 0;
}

.fm-card.entry:not([class*="col-"]):hover,
.fm-card.entry:not([class*="col-"]):focus-within,
.fm-card.entry[class*="col-"]:hover > .grid-inner,
.fm-card.entry[class*="col-"]:focus-within > .grid-inner {
	transform: translateY(-6px);
	box-shadow: var(--fm-shadow-hover);
}

.fm-card .grid-inner {
	height: 100%;
}

.fm-card .entry-image {
	margin: 0;
}

.fm-img {
	position: relative;
	overflow: hidden;
}

.fm-img img {
	transition: transform .9s var(--fm-ease);
}

.fm-card:hover .fm-img img {
	transform: scale(1.07);
}

/* velo oscuro suave al pasar el mouse: da profundidad y resalta la tarjeta activa */
.fm-img::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(7, 9, 14, .45), rgba(7, 9, 14, 0) 55%);
	opacity: 0;
	transition: opacity .45s;
	pointer-events: none;
}

.fm-card:hover .fm-img::after {
	opacity: 1;
}

.fm-card .entry-title,
.fm-card .entry-meta,
.fm-card .entry-content {
	padding-left: 20px;
	padding-right: 20px;
}

.fm-card .entry-title {
	margin-top: 18px;
}

.fm-card .entry-title h3,
.fm-card .entry-title h2 {
	margin-bottom: 0;
	font-weight: 700;
	line-height: 1.3;
}

.fm-card .entry-title a {
	color: var(--fm-ink);
	background-image: linear-gradient(var(--fm-accent), var(--fm-accent));
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 2px;
	padding-bottom: 2px;
	transition: background-size .45s var(--fm-ease), color .25s;
}

.fm-card:hover .entry-title a {
	color: var(--fm-accent-dark);
	background-size: 100% 2px;
}

.fm-card .entry-meta {
	margin-top: 10px;
}

.fm-card .entry-meta ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	margin: 0;
}

.fm-card .entry-meta li {
	margin: 0;
	color: var(--fm-muted);
	font-size: .82rem;
}

.fm-card .entry-meta li::before {
	display: none;
}

/* la primera etiqueta es la categoría: se muestra como "pastilla" */
.fm-card .entry-meta li:first-child {
	padding: 3px 11px;
	border-radius: 999px;
	background: var(--fm-accent-soft);
	color: var(--fm-accent-dark);
	font-weight: 700;
	text-transform: uppercase;
	font-size: .7rem;
	letter-spacing: .06em;
}

.fm-card .entry-meta a {
	color: inherit;
}

.fm-card .entry-content {
	margin-top: 12px;
	padding-bottom: 20px;
	color: #4b5563;
	line-height: 1.65;
}

.fm-card .entry-content p {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.fm-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
	color: var(--fm-accent);
	font-weight: 700;
	font-size: .85rem;
	letter-spacing: .02em;
}

.fm-more::after {
	content: "→";
	transition: transform .3s var(--fm-ease);
}

.fm-card:hover .fm-more::after {
	transform: translateX(6px);
}

/* ---- Grilla de notas: legibilidad y alturas parejas ---- */
.fm-card.entry[class*="col-"] > .grid-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.fm-card[class*="col-"] .entry-title {
	margin-top: 16px;
}

/* fecha como línea aparte (antes iba pegada al título con una barra) */
.fm-date {
	display: block;
	margin-bottom: 6px;
	color: #4b5563;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: none;
}

.fm-date i {
	margin-right: 4px;
	color: var(--fm-accent);
}

.fm-card[class*="col-"] .entry-title h3,
.fm-card[class*="col-"] .entry-title h2 {
	font-size: 1.02rem;
	font-weight: 600;
	line-height: 1.38;
	letter-spacing: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.fm-card .entry-title a {
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* meta siempre al pie de la tarjeta, con aire debajo y texto legible */
.fm-card[class*="col-"] .entry-meta {
	margin-top: auto;
	padding-top: 14px;
	padding-bottom: 18px;
}

.fm-card .entry-meta li {
	color: #4b5563;
	font-size: .8rem;
	font-weight: 500;
}

.fm-card .entry-meta li:first-child i {
	display: none;
}

.fm-card .entry-meta li:not(:first-child) i {
	color: var(--fm-accent);
	opacity: .85;
}

/* ---------------------------------------------------------------- Listas laterales (+ visto, pie) */
.posts-sm .entry {
	transition: transform .3s var(--fm-ease);
}

.posts-sm .entry:hover {
	transform: translateX(4px);
}

.posts-sm .entry-image {
	overflow: hidden;
	border-radius: 8px;
}

.posts-sm .entry-image img {
	transition: transform .6s var(--fm-ease);
}

.posts-sm .entry:hover .entry-image img {
	transform: scale(1.1);
}

.posts-sm .entry-title a {
	transition: color .25s;
}

.posts-sm .entry:hover .entry-title a {
	color: var(--fm-accent);
}

/* ---------------------------------------------------------------- Contador de visitas (menú) */
.fm-visits > .menu-link {
	pointer-events: none;
	cursor: default;
}

.fm-visits > .menu-link > div {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 6px 8px 6px 14px;
	border: 1px solid #e5e8ee;
	border-radius: 999px;
	background: linear-gradient(180deg, #fff, #f6f7f9);
	box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
	line-height: 1;
	white-space: nowrap;
}

.fm-visits-total {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--fm-muted);
	font-size: .8rem;
	font-weight: 500;
}

.fm-visits-total i {
	color: var(--fm-accent);
	font-size: .95rem;
}

.fm-visits-total strong {
	color: var(--fm-ink);
	font-size: .95rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.fm-visits-today {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(22, 163, 74, .12);
	color: #166534;
	font-size: .75rem;
	font-weight: 600;
}

.fm-visits-today strong {
	font-variant-numeric: tabular-nums;
}

.fm-visits-today::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--fm-live);
	animation: fm-pulse-green 1.8s infinite;
}

/* ---------------------------------------------------------------- Página de la nota */
.fm-article-head {
	padding: 38px 0 34px;
	background: linear-gradient(135deg, #0f1622 0%, #1d2736 60%, #2a1f27 100%) !important;
	color: #fff;
}

.fm-article-head .container {
	max-width: 1140px;
}

.fm-crumbs {
	margin-bottom: 14px;
	font-size: .8rem;
	color: rgba(255, 255, 255, .6);
}

.fm-crumbs a {
	color: rgba(255, 255, 255, .85);
}

.fm-crumbs a:hover {
	color: #fff;
	text-decoration: underline;
}

.fm-crumbs span {
	margin: 0 8px;
}

.fm-cat-pill {
	display: inline-block;
	margin-bottom: 12px;
	padding: 5px 13px;
	border-radius: 999px;
	background: var(--fm-accent);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
}

.fm-article-head h1 {
	max-width: 920px;
	margin: 0 0 16px;
	color: #fff;
	font-size: clamp(1.55rem, 3.2vw, 2.35rem);
	font-weight: 700;
	line-height: 1.22;
	text-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

.fm-article-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	color: rgba(255, 255, 255, .85);
	font-size: .88rem;
}

.fm-article-meta i {
	margin-right: 6px;
	color: #ff8a93;
}

.fm-views {
	padding: 3px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .12);
}

.fm-views strong {
	color: #fff;
	font-variant-numeric: tabular-nums;
}

.fm-article {
	max-width: 780px;
}

.fm-hero {
	margin: 0 0 26px;
	border-radius: var(--fm-radius);
	overflow: hidden;
	box-shadow: var(--fm-shadow);
	background: #eef0f3;
}

.fm-hero img {
	display: block;
	width: 100%;
	max-height: 520px;
	object-fit: cover;
}

.fm-video {
	position: relative;
	margin: 0 0 26px;
	padding-top: 56.25%;
	border-radius: var(--fm-radius);
	overflow: hidden;
	background: #000;
	box-shadow: var(--fm-shadow);
}

.fm-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.fm-lead {
	margin: 0 0 22px;
	padding-left: 18px;
	border-left: 4px solid var(--fm-accent);
	color: var(--fm-ink);
	font-size: 1.2rem;
	font-weight: 500;
	line-height: 1.6;
}

.fm-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 28px;
	padding: 12px 0;
	border-top: 1px solid #eceef2;
	border-bottom: 1px solid #eceef2;
}

.fm-share-label {
	margin-right: 4px;
	color: var(--fm-muted);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.fm-share-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border: 0;
	border-radius: 999px;
	color: #fff;
	font-size: .82rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: transform .25s var(--fm-ease), box-shadow .25s, filter .25s;
}

.fm-share-btn:hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .5);
	filter: brightness(1.08);
}

.fm-wa { background: #25d366; }
.fm-fb { background: #1877f2; }
.fm-tw { background: #111; }
.fm-copy { background: #6b7280; }

/* cuerpo del texto: tamaño y ancho de línea pensados para leer cómodo */
.fm-body {
	color: #2b3340;
	font-size: 1.08rem;
	line-height: 1.85;
	overflow-wrap: anywhere;
}

.fm-body p {
	margin-bottom: 1.25em;
}

.fm-body img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 1.5em auto;
	border-radius: 10px;
}

.fm-body h2,
.fm-body h3,
.fm-body h4 {
	margin: 1.6em 0 .6em;
	color: var(--fm-ink);
	font-weight: 700;
	line-height: 1.3;
}

.fm-body a {
	color: var(--fm-accent-dark);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.fm-body blockquote {
	margin: 1.6em 0;
	padding: 14px 20px;
	border-left: 4px solid var(--fm-accent);
	border-radius: 0 10px 10px 0;
	background: var(--fm-accent-soft);
	color: var(--fm-ink);
	font-style: italic;
}

.fm-body table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

.fm-article-foot {
	margin-top: 34px;
	padding-top: 20px;
	border-top: 1px solid #eceef2;
}

.fm-back {
	color: var(--fm-accent);
	font-weight: 700;
	transition: letter-spacing .25s;
}

.fm-back:hover {
	color: var(--fm-accent-dark);
	letter-spacing: .03em;
}

.fm-related {
	margin-top: 46px;
}

.fm-related > h3 {
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid #eceef2;
	font-size: 1.2rem;
	font-weight: 700;
}

.fm-related .fm-card .entry-title {
	margin-top: 12px;
}

/* La plantilla da estilo a "#page-title span/h1/a" con más fuerza: se repite con el id para ganar */
#page-title.fm-article-head {
	text-align: left;
	border: 0;
}

#page-title.fm-article-head .fm-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	margin: 0 0 14px;
	font-size: .82rem;
}

#page-title.fm-article-head .fm-crumbs a,
#page-title.fm-article-head .fm-crumbs span {
	display: inline;
	margin: 0;
	padding: 0;
	color: rgba(255, 255, 255, .85);
	font-size: inherit;
	font-weight: 500;
	line-height: 1.4;
	opacity: 1;
}

#page-title.fm-article-head .fm-crumbs span {
	margin: 0 8px;
	color: rgba(255, 255, 255, .5);
}

#page-title.fm-article-head .fm-cat-pill {
	display: inline-block;
	width: auto;
	margin: 0 0 12px;
	padding: 5px 13px;
	border-radius: 999px;
	background: var(--fm-accent);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .09em;
	text-transform: uppercase;
	opacity: 1;
}

#page-title.fm-article-head h1 {
	max-width: 920px;
	margin: 0 0 16px;
	color: #fff;
	font-size: clamp(1.55rem, 3.2vw, 2.35rem);
	font-weight: 700;
	line-height: 1.22;
	letter-spacing: 0;
	text-transform: none;
	text-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

#page-title.fm-article-head .fm-article-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 22px;
}

#page-title.fm-article-head .fm-article-meta > span {
	display: inline-flex;
	align-items: center;
	margin: 0;
	color: rgba(255, 255, 255, .92);
	font-size: .9rem;
	font-weight: 500;
	line-height: 1.3;
	opacity: 1;
}

#page-title.fm-article-head .fm-article-meta i {
	margin: 0 7px 0 0;
	color: #ff8a93;
	font-size: 1rem;
}

#page-title.fm-article-head .fm-views {
	padding: 4px 13px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .14);
}

#page-title.fm-article-head .fm-views strong {
	margin-right: 4px;
	color: #fff;
	font-weight: 700;
}

/* "+ Visto": numeración en las listas laterales */
#popular-post-list-sidebar {
	counter-reset: fm-rank;
}

#popular-post-list-sidebar .entry {
	position: relative;
	counter-increment: fm-rank;
}

#popular-post-list-sidebar .entry-image::before {
	content: counter(fm-rank);
	position: absolute;
	z-index: 2;
	top: 4px;
	left: 4px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--fm-accent);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	line-height: 22px;
	text-align: center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

#popular-post-list-sidebar .entry-image {
	position: relative;
}

@media (max-width: 767.98px) {
	.fm-article-head {
		padding: 26px 0 24px;
	}

	.fm-lead {
		font-size: 1.08rem;
	}

	.fm-body {
		font-size: 1.02rem;
	}

	.fm-share-label {
		width: 100%;
	}
}

/* ---------------------------------------------------------------- Animaciones y accesibilidad */
@keyframes fm-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); }
	70%  { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
	100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

@keyframes fm-pulse-green {
	0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, .6); }
	70%  { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
	100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.fm-card a:focus-visible,
.news-carousel a:focus-visible {
	outline: 3px solid var(--fm-accent);
	outline-offset: 3px;
	border-radius: 4px;
}

@media (max-width: 767.98px) {
	.news-carousel .portfolio-desc h3 {
		font-size: 1.2rem;
	}

	.fm-card .entry-title,
	.fm-card .entry-meta,
	.fm-card .entry-content {
		padding-left: 16px;
		padding-right: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fm-card.entry,
	.fm-card.entry > .grid-inner,
	.fm-img img,
	.news-carousel .oc-item img,
	#div-mobile .slide img,
	.posts-sm .entry,
	.posts-sm .entry-image img,
	.fm-more::after {
		transition: none !important;
	}

	.fm-card.entry:hover,
	.fm-card.entry:hover > .grid-inner,
	.fm-card:hover .fm-img img,
	.news-carousel .oc-item:hover img {
		transform: none;
	}

	.fm-ticker .badge::before,
	.fm-visits-today::before {
		animation: none;
	}
}
