/**
 * AMAFI Core — feed de contenido (YouTube, Spotify y canales).
 *
 * COLOR DEL TEXTO
 * El hero de la portada tiene fondo burdeos, así que los títulos no pueden ir con
 * el color por defecto del tema (negro: no se leían). Se usa la variable
 * --amafi-color, que cada shortcode puede fijar con el atributo color="...".
 * Por defecto hereda del contenedor.
 */

.amafi-feed,
.amafi-canales {
	--amafi-color: inherit;
	--amafi-tarjeta-fondo: rgba(0, 0, 0, .28);
	color: var(--amafi-color);
}

.amafi-feed__titulo,
.amafi-canales .amafi-feed__titulo {
	margin: 0 0 .7em;
	color: var(--amafi-color);
}

/* -------------------------------------------------------------------------
 * Tarjeta: un solo contenido destacado, al estilo del reproductor de Spotify
 * ---------------------------------------------------------------------- */

.amafi-feed__tarjeta {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	padding: 1rem;
	border-radius: 12px;
	background: var(--amafi-tarjeta-fondo);
	text-decoration: none;
	color: var(--amafi-color);
	transition: background .2s ease;
}

.amafi-feed__tarjeta:hover,
.amafi-feed__tarjeta:focus-visible {
	background: rgba(0, 0, 0, .42);
}

.amafi-feed__tarjeta-imagen {
	flex: 0 0 auto;
	width: 9.5rem;
	height: 9.5rem;
	border-radius: 8px;
	object-fit: cover;
	display: block;
}

.amafi-feed__tarjeta-datos {
	flex: 1 1 auto;
	min-width: 0;
}

.amafi-feed__tarjeta-titulo {
	display: block;
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: .35em;
}

.amafi-feed__tarjeta-meta {
	display: block;
	font-size: .95rem;
	opacity: .78;
	margin-bottom: .9em;
}

.amafi-feed__tarjeta-accion {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	font-size: .95rem;
	font-weight: 600;
}

.amafi-feed__tarjeta-accion svg {
	width: 1.35em;
	height: 1.35em;
	fill: currentColor;
	flex: 0 0 auto;
}

/* La marca de YouTube en su color, como el logo de Spotify en su tarjeta. */
.amafi-feed--youtube .amafi-feed__tarjeta-accion svg {
	fill: #ff0000;
}

@media (max-width: 640px) {

	.amafi-feed__tarjeta {
		flex-direction: column;
		align-items: flex-start;
		text-align: left;
	}

	.amafi-feed__tarjeta-imagen {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
	}

	.amafi-feed__tarjeta-titulo {
		font-size: 1.3rem;
	}
}

/* -------------------------------------------------------------------------
 * Rejilla: varios contenidos
 * ---------------------------------------------------------------------- */

.amafi-feed__lista {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.amafi-feed__enlace {
	display: block;
	text-decoration: none;
	color: var(--amafi-color);
}

.amafi-feed__imagen {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 6px;
	margin-bottom: .6em;
}

.amafi-feed__nombre {
	display: block;
	font-weight: 600;
	line-height: 1.35;
}

.amafi-feed__fecha {
	display: block;
	margin-top: .25em;
	font-size: .85em;
	opacity: .75;
}

.amafi-feed__spotify {
	width: 100%;
	border: 0;
	border-radius: 12px;
}

/* -------------------------------------------------------------------------
 * Canales oficiales — mismo formato que los iconos que ya había:
 * cuadrado redondeado, color de cada marca y glifo en blanco.
 * ---------------------------------------------------------------------- */

.amafi-canales__lista {
	display: flex;
	flex-wrap: wrap;
	gap: .7rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.amafi-canales__enlace {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.9rem;
	height: 2.9rem;
	border-radius: 8px;
	text-decoration: none;
	transition: transform .15s ease, filter .15s ease;
}

.amafi-canales__enlace:hover,
.amafi-canales__enlace:focus-visible {
	transform: translateY(-2px);
	filter: brightness(1.12);
}

.amafi-canales__enlace svg {
	width: 1.45rem;
	height: 1.45rem;
	fill: #ffffff;
	display: block;
}

.amafi-canales__enlace--youtube {
	background: #ff0000;
}

.amafi-canales__enlace--spotify {
	background: #1db954;
}

.amafi-canales__enlace--whatsapp {
	background: #25d366;
}

/* Cuando no se reconoce la marca, se mantiene legible sobre cualquier fondo. */
.amafi-canales__enlace--otro {
	background: rgba(255, 255, 255, .18);
}

/* -------------------------------------------------------------------------
 * Destacado del canal de WhatsApp
 *
 * No es un shortcode: es un widget de imagen de Elementor con su pie de foto,
 * porque el texto del tema de la semana lo cambia la gestora desde el editor
 * visual. Aquí solo se le da el mismo aspecto de tarjeta que al podcast y al
 * vídeo. Se activa poniéndole al widget la clase «amafi-wa-destacado».
 * ---------------------------------------------------------------------- */

.amafi-wa-destacado {
	--amafi-tarjeta-fondo: rgba(0, 0, 0, .28);
	margin-top: 1.4rem;
}

.amafi-wa-destacado figure,
.amafi-wa-destacado .wp-caption {
	position: relative;
	display: flex;
	align-items: center;
	gap: 1.25rem;
	margin: 0;
	padding: 1rem;
	border-radius: 12px;
	background: var(--amafi-tarjeta-fondo);
	transition: background .2s ease;
}

.amafi-wa-destacado figure:hover,
.amafi-wa-destacado figure:focus-within {
	background: rgba(0, 0, 0, .42);
}

.amafi-wa-destacado a {
	flex: 0 0 auto;
	display: block;
	line-height: 0;
}

/* Toda la tarjeta lleva al canal, no solo el icono. */
.amafi-wa-destacado a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 12px;
}

.amafi-wa-destacado img {
	width: 5rem;
	height: 5rem;
	object-fit: contain;
	display: block;
}

.amafi-wa-destacado figcaption {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	text-align: left;
	font-size: .95rem;
	font-style: normal;
	line-height: 1.45;
	/* El tema pone los pies de foto en cursiva y en gris: aquí van como el
	   resto de las tarjetas del hero, en blanco y sin cursiva. */
	color: #fff;
}

/* Rótulo fijo de la tarjeta, al estilo del título de las otras dos. */
.amafi-wa-destacado figcaption::before {
	content: "Canal de WhatsApp";
	display: block;
	margin-bottom: .3em;
	font-size: 1.35rem;
	font-style: normal;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
}

/* Y la llamada a la acción, como el «Ver en YouTube» de la tarjeta del vídeo. */
.amafi-wa-destacado figcaption::after {
	content: "Unirse al canal";
	display: block;
	margin-top: .7em;
	font-size: .95rem;
	font-weight: 600;
	color: #25d366;
}

@media (max-width: 640px) {

	.amafi-wa-destacado figure,
	.amafi-wa-destacado .wp-caption {
		gap: .9rem;
		padding: .85rem;
	}

	.amafi-wa-destacado img {
		width: 3.6rem;
		height: 3.6rem;
	}

	.amafi-wa-destacado figcaption::before {
		font-size: 1.15rem;
	}
}
