/* Equipo FarBioQ: filtro por líneas y secciones con tres tamaños de tarjeta.
   Usa las variables de color del tema hijo (con valores de reserva). */
.fb-team {
	--fbt-primary: var(--fb-primary, #0a5a9a);
	--fbt-primary-dark: var(--fb-primary-dark, #08487b);
	--fbt-soft: var(--fb-primary-soft, #e8f1f8);
	--fbt-ink: var(--fb-ink, #132f4a);
	--fbt-muted: var(--fb-muted, #5a6878);
	--fbt-line: var(--fb-line, #dde5ee);
	--fbt-surface: var(--fb-surface, #ffffff);
	--fbt-head: var(--fb-font-head, inherit);
	width: 100%;
}

/* Botones de línea */
.fb-team__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 10px;
}

.fb-team .fb-chip {
	padding: 10px 18px;
	border: 1px solid var(--fbt-line);
	border-radius: 999px;
	background: var(--fbt-surface);
	font-family: var(--fbt-head);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	text-transform: none;
	color: var(--fbt-ink);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.fb-team .fb-chip:hover {
	border-color: var(--fbt-primary);
	color: var(--fbt-primary);
}

.fb-team .fb-chip[aria-pressed="true"] {
	border-color: var(--fbt-primary);
	background: var(--fbt-primary);
	color: #ffffff;
}

.fb-team .fb-chip:focus-visible {
	outline: 2px solid var(--fbt-primary);
	outline-offset: 2px;
}

.fb-team__status {
	min-height: 1.5em;
	margin: 0 0 22px;
	font-size: 15px;
	color: var(--fbt-muted);
}

/* Secciones */
.fb-section {
	margin: 0 0 44px;
}

.fb-section[hidden] {
	display: none !important;
}

.fb-team .fb-section__title {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 18px;
	padding: 0;
	border: 0;
	font-family: var(--fbt-head);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase !important;
	color: var(--fbt-muted);
}

.fb-team .fb-section__title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--fbt-line);
}

.fb-team .fb-section__grid {
	display: grid;
	gap: 20px;
	margin: 0 !important; /* el tema añade sangría a las listas */
	padding: 0 !important;
	list-style: none;
}

.fb-section--grande .fb-section__grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fb-section--medio .fb-section__grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fb-team .fb-section--compacto .fb-section__grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

/* Persona */
.fb-member {
	display: flex;
	align-items: center;
	gap: 20px;
	margin: 0;
	border: 1px solid var(--fbt-line);
	background: var(--fbt-surface);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fb-member[hidden] {
	display: none !important;
}

.fb-member:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(19, 47, 74, 0.09);
}

.fb-member.fb-in {
	animation: fb-pop 0.35s ease both;
}

@keyframes fb-pop {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.98);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.fb-member__photo {
	flex: none;
}

.fb-member__photo img,
.fb-member .fb-avatar {
	display: block;
	border-radius: 50%;
	object-fit: cover;
}

.fb-member .fb-avatar {
	display: grid;
	place-items: center;
	background: linear-gradient(135deg, var(--fbt-soft), #d6e9f4);
	font-family: var(--fbt-head);
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--fbt-primary);
}

.fb-member__text {
	min-width: 0;
}

.fb-member .fb-member__name {
	margin: 0 0 4px;
	padding: 0;
	border: 0;
	font-family: var(--fbt-head);
	font-weight: 500;
	line-height: 1.25;
	text-transform: none;
	color: var(--fbt-ink);
}

.fb-member p {
	margin: 0;
}

.fb-member__role {
	font-weight: 600;
	line-height: 1.4;
	color: var(--fbt-primary);
}

.fb-member__detail {
	margin-top: 2px !important;
	line-height: 1.45;
	color: var(--fbt-muted);
}

.fb-team .fb-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 12px 0 0 !important;
	padding: 0 !important;
	list-style: none;
}

.fb-tag {
	margin: 0;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--fbt-soft);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--fbt-primary-dark);
}

/* Grande */
.fb-section--grande .fb-member {
	padding: 28px;
	border-radius: 18px;
	background: linear-gradient(135deg, var(--fbt-soft) 0%, #ffffff 75%);
}

.fb-section--grande .fb-member__photo img,
.fb-section--grande .fb-avatar {
	width: 124px;
	height: 124px;
	box-shadow: 0 0 0 4px #ffffff, 0 8px 20px rgba(19, 47, 74, 0.15);
}

.fb-section--grande .fb-avatar {
	font-size: 42px;
}

.fb-section--grande .fb-member__name {
	font-size: 23px;
}

.fb-section--grande .fb-member__role {
	font-size: 17px;
}

.fb-section--grande .fb-member__detail {
	font-size: 15px;
}

/* Medio */
.fb-section--medio .fb-member {
	padding: 18px;
	border-radius: 12px;
	align-items: flex-start;
}

.fb-section--medio .fb-member__photo img,
.fb-section--medio .fb-avatar {
	width: 80px;
	height: 80px;
}

.fb-section--medio .fb-avatar {
	font-size: 27px;
}

.fb-section--medio .fb-member__name {
	font-size: 18px;
}

.fb-section--medio .fb-member__role {
	font-size: 15.5px;
}

.fb-section--medio .fb-member__detail {
	font-size: 14.5px;
}

/* Compacto */
.fb-section--compacto .fb-member {
	gap: 12px;
	padding: 12px 16px 12px 12px;
	border-radius: 999px;
}

.fb-section--compacto .fb-member__photo img,
.fb-section--compacto .fb-avatar {
	width: 52px;
	height: 52px;
}

.fb-section--compacto .fb-avatar {
	font-size: 18px;
}

.fb-section--compacto .fb-member__name {
	margin: 0;
	font-size: 16px;
}

.fb-section--compacto .fb-member__role {
	font-size: 14px;
}

.fb-section--compacto .fb-member__detail {
	display: none;
}

@media (max-width: 1100px) {
	.fb-section--medio .fb-section__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.fb-section--compacto .fb-section__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	.fb-section--grande .fb-section__grid,
	.fb-section--medio .fb-section__grid {
		grid-template-columns: 1fr;
	}

	.fb-section--compacto .fb-section__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.fb-section--grande .fb-member {
		flex-direction: column;
		padding: 24px 20px;
		text-align: center;
	}

	.fb-section--grande .fb-tags {
		justify-content: center;
	}

	.fb-section--compacto .fb-section__grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fb-member,
	.fb-team .fb-chip {
		transition: none;
	}

	.fb-member:hover {
		transform: none;
	}

	.fb-member.fb-in {
		animation: none;
	}
}
