/* Noticias FarBioQ: tarjetas con imagen, fecha, título y extracto.
   Usa las variables de color del tema hijo (con valores de reserva). */
.fb-news {
	--fbn-primary: var(--fb-primary, #0a5a9a);
	--fbn-primary-dark: var(--fb-primary-dark, #08487b);
	--fbn-soft: var(--fb-primary-soft, #e8f1f8);
	--fbn-ink: var(--fb-ink, #132f4a);
	--fbn-text: var(--fb-text, #2a3a4a);
	--fbn-muted: var(--fb-muted, #5a6878);
	--fbn-line: var(--fb-line, #dde5ee);
	--fbn-head: var(--fb-font-head, inherit);
	width: 100%;
}

.fb-news--home {
	max-width: 1200px;
	margin: 56px auto 0;
	padding: 0 clamp(16px, 4vw, 32px);
	box-sizing: border-box;
}

.fb-news .fb-news__heading {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 22px;
	padding: 0;
	border: 0;
	font-family: var(--fbn-head);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase !important;
	color: var(--fbn-muted);
}

.fb-news .fb-news__heading::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--fbn-line);
}

.fb-news .fb-news__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 22px;
	margin: 0 !important; /* el tema añade sangría a las listas */
	padding: 0 !important;
	list-style: none;
}

.fb-news__item {
	margin: 0;
}

.fb-news__card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--fbn-line);
	border-radius: 16px;
	background: #ffffff;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.fb-news__card:hover,
.fb-news__card:focus-within {
	transform: translateY(-3px);
	border-color: var(--fbn-primary);
	box-shadow: 0 12px 28px rgba(19, 47, 74, 0.1);
}

.fb-news__media {
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, var(--fbn-soft), #d6e9f4);
}

.fb-news__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0 !important;
}

.fb-news__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 18px 20px 22px;
}

.fb-news .fb-news__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0 0 8px;
	font-size: 13.5px;
	line-height: 1.3;
	color: var(--fbn-muted);
}

.fb-news__cat {
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--fbn-soft);
	font-weight: 500;
	color: var(--fbn-primary-dark);
}

.fb-news .fb-news__title {
	margin: 0 0 8px;
	padding: 0;
	border: 0;
	font-family: var(--fbn-head);
	font-size: 19px;
	font-weight: 500;
	line-height: 1.3;
	text-transform: none;
	color: var(--fbn-ink);
}

.fb-news .fb-news__title a {
	text-decoration: none;
	color: inherit;
}

/* Toda la tarjeta es el enlace del título */
.fb-news .fb-news__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.fb-news .fb-news__title a:focus-visible {
	outline: none;
}

.fb-news__card:focus-within {
	outline: 2px solid var(--fbn-primary);
	outline-offset: 2px;
}

.fb-news .fb-news__excerpt {
	margin: 0;
	font-size: 15.5px;
	line-height: 1.55;
	color: var(--fbn-text);
}

.fb-news__pager,
.fb-news__all {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 28px 0 0;
}

.fb-news__empty {
	margin: 0;
	color: var(--fbn-muted);
}

@media (prefers-reduced-motion: reduce) {
	.fb-news__card {
		transition: none;
	}

	.fb-news__card:hover {
		transform: none;
	}
}

.fb-news .fb-btn-pill {
	display: inline-flex;
	padding: 9px 18px;
	border: 1px solid var(--fbn-line);
	border-radius: 999px;
	background: #ffffff;
	font-family: var(--fbn-head);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none !important;
	color: var(--fbn-primary) !important;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.fb-news .fb-btn-pill:hover {
	border-color: var(--fbn-primary);
}

.fb-news .fb-btn-pill--primary {
	border-color: var(--fbn-primary);
	background: var(--fbn-primary);
	color: #ffffff !important;
}

.fb-news .fb-btn-pill--primary:hover {
	border-color: var(--fbn-primary-dark);
	background: var(--fbn-primary-dark);
}

/* Franja de la portada: tarjetas que se desplazan de lado a lado (como las tarjetas de la portada) */
.fb-news--slider {
	max-width: 1200px;
	margin: 20px auto 0;
	padding: 0 clamp(16px, 4vw, 32px);
	box-sizing: border-box;
}

.fb-news__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 20px;
	margin: 0 0 16px;
}

.fb-news__top .fb-news__heading {
	flex: 1 1 240px;
	margin: 0;
}

.fb-news__controls {
	display: flex;
	align-items: center;
	gap: 8px;
}

.fb-news__all-link {
	margin-right: 6px;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none !important;
	color: var(--fbn-primary) !important;
}

.fb-news__all-link:hover,
.fb-news__all-link:focus-visible {
	text-decoration: underline !important;
}

.fb-news .fb-news__btn {
	position: relative;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--fbn-line);
	border-radius: 50%;
	background: #ffffff;
	cursor: pointer;
	color: var(--fbn-primary);
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.fb-news .fb-news__btn[hidden] {
	display: none;
}

.fb-news .fb-news__btn:hover {
	border-color: var(--fbn-primary);
}

.fb-news .fb-news__btn:focus-visible {
	outline: 2px solid var(--fbn-primary);
	outline-offset: 2px;
}

.fb-news .fb-news__btn::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 9px;
	height: 9px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
}

.fb-news .fb-news__btn--next::before {
	transform: translate(-65%, -50%) rotate(45deg);
}

.fb-news .fb-news__btn--prev::before {
	transform: translate(-35%, -50%) rotate(-135deg);
}

.fb-news .fb-news__btn--pause::before {
	width: 10px;
	height: 12px;
	border: 0;
	border-right: 3px solid currentColor;
	border-left: 3px solid currentColor;
	transform: translate(-50%, -50%);
}

.fb-news .fb-news__btn--pause.is-paused::before {
	width: 0;
	height: 0;
	border-top: 6px solid transparent;
	border-right: 0;
	border-bottom: 6px solid transparent;
	border-left: 10px solid currentColor;
	transform: translate(-40%, -50%);
}

.fb-news .fb-news__track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding-bottom: 4px !important;
}

.fb-news .fb-news__track::-webkit-scrollbar {
	display: none;
}

.fb-news .fb-news__track > .fb-news__item {
	flex: 0 0 calc((100% - 32px) / 3); /* tres a la vez */
	scroll-snap-align: start;
}

@media (max-width: 899px) {
	.fb-news .fb-news__track > .fb-news__item {
		flex-basis: calc((100% - 16px) / 2);
	}
}

@media (max-width: 559px) {
	.fb-news .fb-news__track > .fb-news__item {
		flex-basis: 100%;
	}
}

/* Tarjeta tipo portada: imagen a toda la tarjeta, título encima en blanco */
.fb-news__card--tile {
	justify-content: flex-end;
	aspect-ratio: 16 / 10;
	border: 0;
	background: var(--fbn-ink);
}

.fb-news__card--tile .fb-news__media {
	position: absolute;
	inset: 0;
	aspect-ratio: auto;
	background: linear-gradient(135deg, var(--fbn-primary), var(--fbn-ink));
}

.fb-news__card--tile .fb-news__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(10, 30, 50, 0.88) 0%, rgba(10, 30, 50, 0.35) 48%, rgba(10, 30, 50, 0) 72%);
}

.fb-news__card--tile .fb-news__body {
	position: relative;
	flex: none;
	padding: 14px 16px 16px;
}

.fb-news__card--tile .fb-news__meta,
.fb-news__card--tile .fb-news__meta time {
	color: rgba(255, 255, 255, 0.86);
}

.fb-news__card--tile .fb-news__cat {
	background: rgba(255, 255, 255, 0.18);
	color: #ffffff;
}

.fb-news .fb-news__card--tile .fb-news__title {
	margin: 0;
	font-size: 17px;
	color: #ffffff;
}

/* Menos aire entre la franja de noticias y las tarjetas de debajo */
.fb-news--slider + .wp-block-uagb-container {
	margin-top: 24px !important;
}

/* Encabezado sobre el título de la noticia */
.fb-post-kicker {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0 0 14px !important;
	font-family: var(--fbn-head);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--fbn-primary);
}

.fb-post-kicker::before {
	content: "";
	width: 22px;
	height: 2px;
	border-radius: 2px;
	background: var(--fb-accent, #0098b0);
}

.fb-post-kicker a {
	text-decoration: none !important;
	color: inherit !important;
}

.fb-post-kicker a:hover,
.fb-post-kicker a:focus-visible {
	text-decoration: underline !important;
}

.fb-post-kicker__cat {
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--fbn-soft);
	letter-spacing: 0.04em;
	text-transform: none;
	color: var(--fbn-primary-dark);
}
