/* Alterna News Feed — estilos del listado y del modal */

.anf-feed,
.anf-modal {
	--anf-accent: #c8102e;
	--anf-text: #1d2129;
	--anf-muted: #6b7280;
	--anf-border: rgba(0, 0, 0, .1);
	--anf-radius: 14px;
	--anf-surface: #fff;
	/* Tipografía: si no se define --anf-font-*, se hereda la del tema. */
	--anf-font-title: inherit;
	--anf-font-body: inherit;
	--anf-size-title: 19px;
	--anf-size-body: 15px;
	--anf-weight-title: 700;
	--anf-line-height: 1.55;
}

.anf-feed {
	font-family: var(--anf-font-body);
	font-size: var(--anf-size-body);
	line-height: var(--anf-line-height);
	color: var(--anf-text);
	max-width: 100%;
}

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

.anf-feed-title {
	margin: 0 0 1.25rem;
	font-family: var(--anf-font-title);
	font-size: calc(var(--anf-size-title) * 1.5);
	font-weight: var(--anf-weight-title);
	line-height: 1.2;
	color: var(--anf-text);
}

.anf-feed-empty {
	margin: 0;
	padding: 1.5rem;
	border: 1px dashed var(--anf-border);
	border-radius: var(--anf-radius);
	color: var(--anf-muted);
	text-align: center;
}

.anf-feed-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* --- Tarjeta --- */

.anf-card {
	display: flex;
	gap: 1.15rem;
	align-items: flex-start;
	width: 100%;
	margin: 0;
	padding: 1.05rem;
	border: 1px solid var(--anf-border);
	border-radius: var(--anf-radius);
	background: var(--anf-surface);
	text-align: left;
	color: inherit;
}

.anf-card--featured {
	border-left: 4px solid var(--anf-accent);
	background: linear-gradient(90deg, color-mix(in srgb, var(--anf-accent) 6%, transparent), transparent 40%);
}

.anf-card-media {
	position: relative;
	flex: 0 0 clamp(96px, 22%, 190px);
	overflow: hidden;
	border-radius: calc(var(--anf-radius) - 6px);
	background: rgba(0, 0, 0, .04);
	aspect-ratio: 4 / 3;
}

.anf-card-media .anf-item-image,
.anf-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.anf-card-body {
	flex: 1 1 auto;
	min-width: 0;
}

.anf-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	margin-bottom: .35rem;
	font-family: var(--anf-font-body);
	font-size: calc(var(--anf-size-body) * .78);
	letter-spacing: .04em;
	text-transform: uppercase;
}

.anf-card-date {
	color: var(--anf-accent);
	font-weight: 700;
}

.anf-card-tag {
	padding: .15em .6em;
	border-radius: 999px;
	background: rgba(0, 0, 0, .05); /* fallback si no hay color-mix */
	background: color-mix(in srgb, var(--anf-accent) 12%, transparent);
	color: var(--anf-accent);
	font-weight: 600;
	letter-spacing: .03em;
}

.anf-card-title {
	margin: 0 0 .4rem;
	font-family: var(--anf-font-title);
	font-size: var(--anf-size-title);
	font-weight: var(--anf-weight-title);
	line-height: 1.25;
	color: var(--anf-text);
}

.anf-card-excerpt {
	margin: 0;
	font-family: var(--anf-font-body);
	font-size: var(--anf-size-body);
	line-height: var(--anf-line-height);
	color: var(--anf-muted);
}

.anf-card-excerpt p {
	margin: 0 0 .4rem;
}

.anf-card-excerpt p:last-child {
	margin-bottom: 0;
}

/* El único elemento pulsable de la tarjeta. Es un <button> o un <a> de
 * verdad, así que se le quitan los estilos que trae el navegador. */
.anf-card-more {
	display: inline-flex;
	align-items: center;
	gap: .35em;
	margin-top: .7rem;
	padding: 0;
	border: 0;
	background: none;
	appearance: none;
	-webkit-appearance: none;
	font-family: var(--anf-font-body);
	font-size: calc(var(--anf-size-body) * .95);
	font-weight: 700;
	line-height: 1.4;
	color: var(--anf-accent);
	text-decoration: none;
	cursor: pointer;
	transition: gap .18s ease;
}

.anf-card-more:hover,
.anf-card-more:focus-visible {
	gap: .6em;
	text-decoration: underline;
	text-underline-offset: .22em;
	color: var(--anf-accent);
}

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

.anf-card-more .anf-arrow {
	display: inline-block;
	transition: transform .18s ease;
}

.anf-card-more:hover .anf-arrow {
	transform: translateX(2px);
}

/* --- Móvil --- */

@media (max-width: 600px) {
	.anf-card {
		flex-direction: column;
		gap: .85rem;
	}

	.anf-card-media {
		flex: 0 0 auto;
		width: 100%;
		aspect-ratio: 16 / 9;
	}
}

/* --- Modal con la noticia completa --- */

.anf-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(.75rem, 4vw, 2.5rem);
	background: rgba(15, 18, 24, .62);
	backdrop-filter: blur(3px);
	opacity: 0;
	font-family: var(--anf-font-body);
	transition: opacity .2s ease;
}

.anf-modal:not(.is-open) {
	pointer-events: none;
}

.anf-modal.is-open {
	opacity: 1;
	pointer-events: auto;
}

/* El navegador aplica el atributo hidden con "display: none", pero es una
 * regla suya y cualquier regla de la hoja del autor le gana: sin esta línea
 * la capa se queda encima de la página (invisible, con opacidad 0) y se traga
 * todos los clics, así que la web parece bloqueada al cerrar una noticia.
 *
 * Va la última A PROPÓSITO: por especificidad ya ganaría (clase + atributo
 * frente a clase), pero puesta aquí gana además por orden, y así no depende
 * de que quien lea esto recuerde las reglas de la cascada. */
.anf-modal[hidden] {
	display: none;
}

.anf-modal-dialog {
	position: relative;
	width: min(760px, 100%);
	max-height: 90vh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: clamp(1.25rem, 3vw, 2.25rem);
	border-radius: 16px;
	background: #fff;
	color: #1d2129;
	box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .6);
	transform: translateY(12px) scale(.985);
	transition: transform .22s ease;
}

.anf-modal.is-open .anf-modal-dialog {
	transform: none;
}

.anf-modal-close {
	position: sticky;
	top: 0;
	float: right;
	width: 38px;
	height: 38px;
	margin: -.35rem -.35rem 0 .5rem;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .06);
	color: #1d2129;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background .15s ease;
}

.anf-modal-close:hover {
	background: rgba(0, 0, 0, .13);
}

.anf-article-media {
	margin: 0 0 1.25rem;
	border-radius: 12px;
	overflow: hidden;
}

.anf-article-media img {
	display: block;
	width: 100%;
	height: auto;
}

.anf-article-meta {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	align-items: center;
	margin-bottom: .5rem;
	color: var(--anf-accent, #c8102e);
	font-family: var(--anf-font-body);
	font-size: calc(var(--anf-size-body) * .8);
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.anf-article-title {
	margin: 0 0 1rem;
	font-family: var(--anf-font-title);
	font-size: calc(var(--anf-size-title) * 1.45);
	font-weight: var(--anf-weight-title);
	line-height: 1.2;
}

.anf-article-content {
	font-family: var(--anf-font-body);
	font-size: calc(var(--anf-size-body) * 1.05);
	line-height: calc(var(--anf-line-height) + .1);
}

.anf-article-content p {
	margin: 0 0 1rem;
}

.anf-article-content img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}

.anf-article-content a {
	color: var(--anf-accent, #c8102e);
}

body.anf-modal-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.anf-card-more,
	.anf-card-more .anf-arrow,
	.anf-modal,
	.anf-modal-dialog {
		transition: none;
	}
}

/* -------------------------------------------------------------------------
 * Vídeo, galería y carrusel
 * ---------------------------------------------------------------------- */

/* Indicador de "play" sobre la portada del listado */

.anf-play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 44px;
	height: 44px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	transition: background .2s ease, transform .2s ease;
}

.anf-play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 52%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 8px 0 8px 13px;
	border-color: transparent transparent transparent #fff;
}



/* Contador de imágenes */

.anf-gallery-count {
	position: absolute;
	right: 8px;
	bottom: 8px;
	min-width: 26px;
	padding: .1em .45em;
	border-radius: 999px;
	background: rgba(0, 0, 0, .6);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.6;
	text-align: center;
}

.anf-gallery-count::before {
	content: "\2750\00a0";
	font-size: 10px;
}

/* Reproductor dentro del modal */

.anf-video {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	background: #000;
	aspect-ratio: 16 / 9;
}

/* Antes del texto: separa por debajo. Al final: separa por arriba. */
.anf-video--start {
	margin: 0 0 1.25rem;
}

.anf-video--end {
	margin: 1.75rem 0 0;
}

.anf-video iframe,
.anf-video video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

/* Lista de reproducción: un vídeo a la vista y botones para saltar */

.anf-playlist .anf-video[hidden] {
	display: none;
}

.anf-playlist-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem;
	margin-top: .6rem;
}

.anf-playlist-label {
	margin-right: .25rem;
	font-size: .8em;
	color: var(--anf-muted, #6b7280);
}

.anf-playlist-btn {
	min-width: 2rem;
	height: 2rem;
	padding: 0 .5rem;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: transparent;
	color: var(--anf-muted, #6b7280);
	font: inherit;
	font-size: .85em;
	line-height: 1;
	cursor: pointer;
}

.anf-playlist-btn:hover,
.anf-playlist-btn:focus-visible {
	color: var(--anf-accent, #c8102e);
}

.anf-playlist-btn.is-active {
	border-color: var(--anf-accent, #c8102e);
	background: var(--anf-accent, #c8102e);
	color: #fff;
}

/* Carrusel de imágenes del modal */

.anf-slider {
	position: relative;
	margin: 0 0 1.25rem;
	border-radius: 12px;
	overflow: hidden;
	background: rgba(0, 0, 0, .04);
}

.anf-slider-track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.anf-slider-track::-webkit-scrollbar {
	display: none;
}

.anf-slide {
	flex: 0 0 100%;
	margin: 0;
	scroll-snap-align: center;
	aspect-ratio: 16 / 10;
}

.anf-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.anf-slider-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	color: #1d2129;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
	transition: background .15s ease, opacity .15s ease;
}

.anf-slider-nav:hover {
	background: #fff;
}

.anf-slider-nav[disabled] {
	opacity: .35;
	cursor: default;
}

.anf-slider-prev {
	left: 10px;
}

.anf-slider-next {
	right: 10px;
}

.anf-slider-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10px;
	display: flex;
	justify-content: center;
	gap: 6px;
}

.anf-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .55);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
	cursor: pointer;
	transition: background .15s ease, transform .15s ease;
}

.anf-dot.is-active {
	background: #fff;
	transform: scale(1.25);
}

@media (max-width: 600px) {
	.anf-slider-nav {
		width: 32px;
		height: 32px;
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.anf-slider-track {
		scroll-behavior: auto;
	}

	.anf-play,
	.anf-slider-nav,
	.anf-dot {
		transition: none;
	}
}
/* Cuerpo de la noticia: titulares, entradilla, citas, listas, imágenes. */

.anf-article-content > *:first-child {
	margin-top: 0;
}

.anf-article-content > *:last-child {
	margin-bottom: 0;
}

.anf-article-content p {
	margin: 0 0 1.05em;
}

/* Entradilla: el párrafo de arranque, más grande */

.anf-article-content .anf-lead {
	margin-bottom: 1.2em;
	font-size: 1.16em;
	font-weight: 500;
	line-height: 1.5;
	color: var(--anf-text);
}

/* Lugar y fecha, al estilo de agencia: "CAROLINA, Puerto Rico — 28 sep 2026 —" */

.anf-article-content .anf-dateline {
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
	font-size: .92em;
	color: var(--anf-text);
}

/* Titulares dentro del cuerpo */

.anf-article-content h2,
.anf-article-content h3,
.anf-article-content h4 {
	margin: 1.7em 0 .5em;
	font-family: var(--anf-font-title);
	font-weight: var(--anf-weight-title);
	line-height: 1.25;
	color: var(--anf-text);
}

.anf-article-content h2 {
	font-size: 1.32em;
}

.anf-article-content h3 {
	font-size: 1.14em;
}

.anf-article-content h4 {
	font-size: 1em;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--anf-accent);
}

/* Frase destacada */

.anf-article-content blockquote {
	margin: 1.5em 0;
	padding: .1em 0 .1em 1.1em;
	border-left: 3px solid var(--anf-accent);
	color: var(--anf-text);
	font-style: italic;
}

.anf-article-content blockquote.anf-pull {
	padding: .2em 0 .2em 1.2em;
	font-size: 1.22em;
	font-style: normal;
	font-weight: 500;
	line-height: 1.4;
}

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

.anf-article-content cite {
	display: block;
	margin-top: .4em;
	font-size: .82em;
	font-style: normal;
	font-weight: 600;
	color: var(--anf-muted);
}

/* Ficha de datos */

.anf-article-content .anf-facts {
	margin: 1.5em 0;
	padding: 1.1em 1.25em;
	border-radius: 10px;
	border-left: 3px solid var(--anf-accent);
	background: rgba(0, 0, 0, .035);
	font-size: .95em;
}

.anf-article-content .anf-facts p:last-child,
.anf-article-content .anf-facts ul:last-child {
	margin-bottom: 0;
}

/* Listas */

.anf-article-content ul,
.anf-article-content ol {
	margin: 0 0 1.05em;
	padding-left: 1.35em;
}

.anf-article-content li {
	margin-bottom: .4em;
}

.anf-article-content ul li::marker {
	color: var(--anf-accent);
}

/* Imágenes insertadas en el texto */

.anf-article-content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.anf-article-content figure {
	margin: 1.5em 0;
}

.anf-article-content figcaption,
.anf-article-content .anf-caption {
	margin-top: .5em;
	font-size: .84em;
	line-height: 1.45;
	color: var(--anf-muted);
}

.anf-article-content .alignleft {
	float: left;
	margin: .3em 1.4em 1em 0;
	max-width: 50%;
}

.anf-article-content .alignright {
	float: right;
	margin: .3em 0 1em 1.4em;
	max-width: 50%;
}

.anf-article-content .aligncenter {
	display: block;
	margin: 1.5em auto;
}

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

.anf-article-content::after {
	content: "";
	display: block;
	clear: both;
}

@media (max-width: 520px) {
	.anf-article-content .alignleft,
	.anf-article-content .alignright {
		float: none;
		max-width: 100%;
		margin: 1.2em 0;
	}
}

/* Detalles */

.anf-article-content a {
	color: var(--anf-accent);
	text-decoration: underline;
	text-underline-offset: .15em;
}

.anf-article-content mark {
	padding: .05em .25em;
	border-radius: 3px;
	background: rgba(255, 224, 76, .55);
	color: inherit;
}

.anf-article-content small {
	font-size: .84em;
	color: var(--anf-muted);
}

.anf-article-content hr {
	margin: 2em 0;
	border: 0;
	border-top: 1px solid var(--anf-border);
}

.anf-article-content table {
	width: 100%;
	margin: 0 0 1.2em;
	border-collapse: collapse;
	font-size: .93em;
}

.anf-article-content th,
.anf-article-content td {
	padding: .55em .7em;
	border-bottom: 1px solid var(--anf-border);
	text-align: left;
}

.anf-article-content th {
	font-weight: 700;
}
