/* Gallery + Blog listing — Biohacker taupe palette */
.bio-list-page {
	--bio-taupe: #a19389;
	--bio-charcoal: #5e5752;
	--bio-cream: #f7f3f0;
	--bio-ink: #2a2426;
	--bio-muted: #6d6560;
	background: #fff;
}

.bio-list-page .bio-cat-wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 1.25rem 1.25rem 0.5rem;
}

.bio-list-page .bio-cat-tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.55rem 0.65rem;
	padding: 0.35rem;
	margin: 0;
	list-style: none;
}

.bio-list-page .bio-cat-tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.55rem;
	padding: 0.55rem 1.25rem;
	border-radius: 999px;
	border: 1px solid rgba(94, 87, 82, 0.22);
	background: #fff;
	color: var(--bio-charcoal);
	font-family: "Montserrat", system-ui, sans-serif;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none !important;
	line-height: 1.2;
	white-space: nowrap;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.bio-list-page .bio-cat-tab:hover {
	background: rgba(161, 147, 137, 0.12);
	border-color: rgba(94, 87, 82, 0.35);
	color: var(--bio-ink);
}

.bio-list-page .bio-cat-tab.is-active {
	background: linear-gradient(90deg, var(--bio-taupe) 0%, var(--bio-charcoal) 100%);
	border-color: transparent;
	color: #fff !important;
	box-shadow: 0 4px 14px rgba(94, 87, 82, 0.28);
}

/* —— Gallery grid —— */
.bio-list-page .bio-gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.15rem;
	max-width: 1180px;
	margin: 0 auto;
	padding: 1.5rem 1.25rem 3rem;
}

.bio-list-page .bio-gallery-card {
	position: relative;
	display: block;
	border-radius: 14px;
	overflow: hidden;
	background: var(--bio-cream);
	aspect-ratio: 4 / 3;
	box-shadow: 0 6px 20px rgba(42, 36, 38, 0.08);
	cursor: zoom-in;
	text-decoration: none !important;
	color: inherit;
	border: 0 !important;
	padding: 0 !important;
	margin: 0;
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	text-align: left;
}

.bio-list-page .bio-gallery-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.bio-list-page .bio-gallery-card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 45%, rgba(26, 22, 24, 0.55) 100%);
	opacity: 0.85;
	pointer-events: none;
}

.bio-list-page .bio-gallery-card:hover img {
	transform: scale(1.04);
}

.bio-list-page .bio-gallery-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	padding: 0.85rem 1rem;
	margin: 0;
	font-family: "Montserrat", system-ui, sans-serif;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: #fff;
	text-align: left;
}

.bio-list-page .bio-gallery-empty {
	max-width: 720px;
	margin: 1rem auto 3rem;
	padding: 2.5rem 1.5rem;
	text-align: center;
	color: var(--bio-muted);
	font-family: "Montserrat", system-ui, sans-serif;
	font-size: 0.95rem;
	background: var(--bio-cream);
	border-radius: 14px;
}

/* —— Blog cards —— */
.bio-list-page .bio-blog-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	max-width: 1180px;
	margin: 0 auto;
	padding: 1.5rem 1.25rem 3rem;
}

.bio-list-page .bio-blog-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid rgba(94, 87, 82, 0.14);
	box-shadow: 0 8px 24px rgba(42, 36, 38, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	height: 100%;
}

.bio-list-page .bio-blog-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 32px rgba(42, 36, 38, 0.1);
}

.bio-list-page .bio-blog-card .bio-blog-media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--bio-cream);
}

.bio-list-page .bio-blog-card .bio-blog-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.bio-list-page .bio-blog-card:hover .bio-blog-media img {
	transform: scale(1.03);
}

.bio-list-page .bio-blog-card .bio-blog-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.15rem 1.25rem 1.35rem;
	gap: 0.65rem;
}

.bio-list-page .bio-blog-card h3 {
	margin: 0;
	font-family: "Montserrat", system-ui, sans-serif;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--bio-ink);
}

.bio-list-page .bio-blog-card h3 a {
	color: inherit;
	text-decoration: none !important;
}

.bio-list-page .bio-blog-card h3 a:hover {
	color: var(--bio-charcoal);
}

.bio-list-page .bio-blog-card .bio-blog-excerpt {
	margin: 0;
	flex: 1;
	font-family: "Montserrat", system-ui, sans-serif;
	font-size: 0.88rem;
	line-height: 1.55;
	color: var(--bio-muted);
}

.bio-list-page .bio-blog-card .bio-blog-excerpt a {
	color: inherit;
	text-decoration: none !important;
}

.bio-list-page .bio-blog-card .bio-read-more {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	margin-top: 0.35rem;
	padding: 0.55rem 1.15rem;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--bio-taupe) 0%, var(--bio-charcoal) 100%);
	color: #fff !important;
	font-family: "Montserrat", system-ui, sans-serif;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none !important;
}

.bio-list-page .bio-blog-card .bio-read-more:hover {
	filter: brightness(1.05);
	color: #fff !important;
}

/* —— Lightbox —— */
.bio-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(18, 16, 17, 0.9);
	padding: 1.5rem;
	box-sizing: border-box;
}

.bio-lightbox.is-open {
	display: flex;
}

.bio-lightbox__inner {
	position: relative;
	max-width: min(960px, 100%);
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
}

.bio-lightbox__img {
	max-width: 100%;
	max-height: min(78vh, 820px);
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
	background: #1a1618;
}

.bio-lightbox__caption {
	margin: 0;
	color: #f4efec;
	font-family: "Montserrat", system-ui, sans-serif;
	font-size: 0.85rem;
	letter-spacing: 0.04em;
	text-align: center;
	max-width: 36rem;
}

.bio-lightbox__count {
	color: rgba(244, 239, 236, 0.7);
	font-family: "Montserrat", system-ui, sans-serif;
	font-size: 0.75rem;
}

.bio-lightbox__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(6px);
	transition: background 0.15s ease;
}

.bio-lightbox__btn:hover {
	background: rgba(255, 255, 255, 0.22);
}

.bio-lightbox__prev {
	left: max(0.5rem, env(safe-area-inset-left));
}

.bio-lightbox__next {
	right: max(0.5rem, env(safe-area-inset-right));
}

.bio-lightbox__close {
	position: fixed;
	top: max(0.85rem, env(safe-area-inset-top));
	right: max(0.85rem, env(safe-area-inset-right));
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 1.35rem;
	cursor: pointer;
	z-index: 10051;
}

.bio-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.22);
}

@media screen and (max-width: 991.98px) {
	.bio-list-page .bio-gallery-grid,
	.bio-list-page .bio-blog-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.9rem;
		padding: 1.15rem 1rem 2.5rem;
	}

	.bio-lightbox__prev,
	.bio-lightbox__next {
		top: auto;
		bottom: 1.25rem;
		transform: none;
	}

	.bio-lightbox__prev {
		left: calc(50% - 3.5rem);
	}

	.bio-lightbox__next {
		right: calc(50% - 3.5rem);
	}
}

@media screen and (max-width: 575.98px) {
	.bio-list-page .bio-gallery-grid {
		grid-template-columns: 1fr;
	}

	.bio-list-page .bio-blog-grid {
		grid-template-columns: 1fr;
	}

	.bio-list-page .bio-cat-tab {
		font-size: 0.7rem;
		padding: 0.5rem 1rem;
		min-height: 2.35rem;
	}
}
