/**
 * com_nbauthors - author overview and author profile styles.
 *
 * Picks up the Planet Zoo template design tokens (--pz-*) when present and
 * falls back to neutral values on any other template.
 */

.nbauthors {
	--nbauthors-gap: 1.25rem;
}

.nbauthors-heading {
	margin-bottom: 0.75rem;
}

.nbauthors-description {
	margin-bottom: 1.5rem;
	color: var(--pz-text-light, #6a6252);
}

.nbauthors-empty {
	margin: 1rem 0;
	color: var(--pz-text-light, #6a6252);
}

/* ── Author overview ────────────────────────────────────────────── */

.nbauthors-authors {
	display: grid;
	grid-template-columns: repeat(var(--nbauthors-cols, 3), minmax(0, 1fr));
	gap: var(--nbauthors-gap);
	margin: 0 0 2rem;
}

.nbauthors-author {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--pz-card, rgba(255, 255, 255, 0.9));
	border: 1px solid var(--pz-border, #ddd3bd);
	border-radius: var(--pz-radius, 8px);
	transition: transform var(--pz-tr, 0.25s ease), box-shadow var(--pz-tr, 0.25s ease);
}

.nbauthors-author:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.nbauthors-author__portrait {
	display: block;
	aspect-ratio: 16 / 10;
	background: var(--pz-earth, #faf4e6);
}

.nbauthors-author__portrait img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nbauthors-author__initials {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-family: var(--pz-font-serif, Georgia, serif);
	font-size: 3rem;
	color: var(--pz-forest-light, #8fa04b);
}

.nbauthors-author__body {
	padding: 1rem 1.1rem 1.25rem;
}

.nbauthors-author__name {
	margin: 0 0 0.25rem;
	font-size: 1.25rem;
}

.nbauthors-author__name a {
	color: var(--pz-text, #2e2a1f);
	text-decoration: none;
}

.nbauthors-author__position,
.nbauthors-author__stats {
	margin: 0 0 0.4rem;
	font-size: 0.875rem;
	color: var(--pz-text-light, #6a6252);
}

.nbauthors-author__bio {
	margin: 0 0 0.75rem;
}

.nbauthors-author__more a {
	font-weight: 600;
	color: var(--pz-forest-mid, #5a682c);
}

/* ── Profile header ─────────────────────────────────────────────── */

.nbauthors-profile {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	background: var(--pz-panel, rgba(253, 250, 242, 0.88));
	border: 1px solid var(--pz-border, #ddd3bd);
	border-radius: var(--pz-radius-lg, 16px);
}

.nbauthors-profile__portrait {
	flex: 0 0 200px;
}

.nbauthors-profile__portrait img {
	width: 200px;
	height: 200px;
	object-fit: cover;
	border-radius: 50%;
	border: 3px solid var(--pz-gold, #d9a441);
}

.nbauthors-profile__main {
	flex: 1 1 320px;
	min-width: 0;
}

.nbauthors-profile__name {
	margin: 0 0 0.25rem;
}

.nbauthors-profile__position {
	margin: 0 0 0.5rem;
	font-family: var(--pz-font-serif, Georgia, serif);
	font-style: italic;
	color: var(--pz-forest-mid, #5a682c);
}

.nbauthors-profile__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	color: var(--pz-text-light, #6a6252);
}

.nbauthors-profile__topics {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0 0 0.9rem;
	padding: 0;
	list-style: none;
}

.nbauthors-profile__topics li {
	padding: 0.15rem 0.6rem;
	font-size: 0.8125rem;
	background: var(--pz-earth, #faf4e6);
	border: 1px solid var(--pz-border, #ddd3bd);
	border-radius: 999px;
}

.nbauthors-profile__bio {
	margin-bottom: 0.9rem;
}

.nbauthors-profile__fields {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.25rem 0.75rem;
	margin: 0 0 0.9rem;
	font-size: 0.9375rem;
}

.nbauthors-profile__fields dt {
	font-weight: 600;
	color: var(--pz-text-light, #6a6252);
}

.nbauthors-profile__fields dd {
	margin: 0;
}

.nbauthors-profile__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nbauthors-profile__link a {
	display: inline-block;
	padding: 0.3rem 0.85rem;
	font-size: 0.875rem;
	text-decoration: none;
	color: var(--pz-white, #fff);
	background: var(--pz-forest-mid, #5a682c);
	border-radius: 999px;
	transition: background var(--pz-tr, 0.25s ease);
}

.nbauthors-profile__link a:hover {
	background: var(--pz-forest, #3c4a1f);
}

.nbauthors-profile__link--youtube a {
	background: #c4302b;
}

.nbauthors-profile__link--facebook a {
	background: #3b5998;
}

.nbauthors-profile__link--instagram a {
	background: #c13584;
}

/* ── Tabs and filters ───────────────────────────────────────────── */

.nbauthors-tabs ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
	border-bottom: 2px solid var(--pz-border, #ddd3bd);
}

.nbauthors-tabs__link {
	display: inline-block;
	padding: 0.55rem 1.1rem;
	color: var(--pz-text-light, #6a6252);
	text-decoration: none;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
}

.nbauthors-tabs__link.is-active {
	color: var(--pz-forest, #3c4a1f);
	font-weight: 600;
	border-bottom-color: var(--pz-gold, #d9a441);
}

.nbauthors-tabs__count {
	display: inline-block;
	margin-left: 0.35rem;
	padding: 0 0.4rem;
	font-size: 0.75rem;
	background: var(--pz-earth, #faf4e6);
	border-radius: 999px;
}

.nbauthors-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 1.25rem;
}

.nbauthors-filter__chip {
	padding: 0.25rem 0.75rem;
	font-size: 0.875rem;
	text-decoration: none;
	color: var(--pz-text, #2e2a1f);
	background: var(--pz-card, rgba(255, 255, 255, 0.9));
	border: 1px solid var(--pz-border, #ddd3bd);
	border-radius: 999px;
}

.nbauthors-filter__chip.is-active {
	color: var(--pz-white, #fff);
	background: var(--pz-forest-mid, #5a682c);
	border-color: var(--pz-forest-mid, #5a682c);
}

.nbauthors-filter__count {
	opacity: 0.7;
}

.nbauthors-section {
	margin-bottom: 2.5rem;
}

.nbauthors-section__title {
	margin-bottom: 1rem;
	font-size: 1.35rem;
}

.nbauthors-pagination {
	margin-top: 1.5rem;
}

/* ── Article and video cards ────────────────────────────────────── */

.nbauthors-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--nbauthors-gap);
}

.nbauthors-card,
.nbauthors-video {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--pz-card, rgba(255, 255, 255, 0.9));
	border: 1px solid var(--pz-border, #ddd3bd);
	border-radius: var(--pz-radius, 8px);
}

.nbauthors-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--pz-earth, #faf4e6);
}

.nbauthors-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nbauthors-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--pz-earth, #faf4e6), var(--pz-border, #ddd3bd));
}

.nbauthors-card__body,
.nbauthors-video__body {
	padding: 0.9rem 1rem 1.1rem;
}

.nbauthors-card__title,
.nbauthors-video__title {
	margin: 0 0 0.35rem;
	font-size: 1.0625rem;
	line-height: 1.35;
}

.nbauthors-card__title a,
.nbauthors-video__title a {
	color: var(--pz-text, #2e2a1f);
	text-decoration: none;
}

.nbauthors-card__title a:hover,
.nbauthors-video__title a:hover {
	color: var(--pz-forest-mid, #5a682c);
}

.nbauthors-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0 0 0.5rem;
	font-size: 0.8125rem;
	color: var(--pz-text-light, #6a6252);
}

.nbauthors-card__intro {
	margin: 0;
	font-size: 0.9375rem;
}

.nbauthors-video__links {
	margin: 0.6rem 0 0;
	font-size: 0.875rem;
}

/* ── Video facade ───────────────────────────────────────────────── */

.nbauthors-video__player {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
}

.nbauthors-video__poster {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

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

.nbauthors-video__play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
}

.nbauthors-video__play svg {
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
	transition: transform var(--pz-tr, 0.25s ease);
}

.nbauthors-video__play-bg {
	fill: #212121;
	fill-opacity: 0.8;
}

.nbauthors-video__play:hover svg {
	transform: scale(1.1);
}

.nbauthors-video__play:hover .nbauthors-video__play-bg {
	fill: #f00;
	fill-opacity: 1;
}

.nbauthors-video__play:focus-visible {
	outline: 3px solid var(--pz-gold, #d9a441);
	outline-offset: -3px;
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 991.98px) {
	.nbauthors-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nbauthors-authors {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 575.98px) {
	.nbauthors-grid,
	.nbauthors-authors {
		grid-template-columns: 1fr;
	}

	.nbauthors-profile {
		padding: 1.1rem;
	}

	.nbauthors-profile__portrait {
		flex-basis: 140px;
		margin-inline: auto;
	}

	.nbauthors-profile__portrait img {
		width: 140px;
		height: 140px;
	}
}
