/**
 * Breadcrumb Navigation Styles
 *
 * Modern, elegant breadcrumb navigation with smooth animations
 * and responsive design.
 *
 * @package Zhangbangbang
 * @since 1.0.0
 */

/* ==========================================================================
   Breadcrumb Container - 在 Hero 内部显示
   ========================================================================== */

.zbb-breadcrumb {
	position: absolute;
	top: 130px;
	/* 桌面端 header 高度 + 间距 */
	left: 0;
	right: 0;
	z-index: 100;
	padding: 0.875rem 0;
	background: transparent;
}

/* 移除左侧装饰条 */
.zbb-breadcrumb::before {
	display: none;
}

/* ==========================================================================
   Breadcrumb List
   ========================================================================== */

.zbb-breadcrumb-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	line-height: 1.5;
}

/* ==========================================================================
   Breadcrumb Items - 深色背景上的浅色文字
   ========================================================================== */

.zbb-breadcrumb-item {
	display: inline-flex;
	align-items: center;
	color: rgba(255, 255, 255, 0.7);
	transition: color 0.2s ease;
}

.zbb-breadcrumb-item a {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	padding: 0.25rem 0.5rem;
	border-radius: 0.375rem;
	transition: all 0.2s ease;
	position: relative;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.zbb-breadcrumb-item a:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.15);
}

.zbb-breadcrumb-item a:focus {
	outline: 2px solid rgba(255, 255, 255, 0.5);
	outline-offset: 2px;
}

/* Home icon styling */
.zbb-breadcrumb-item:first-child a i {
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.9);
	transition: transform 0.2s ease;
}

.zbb-breadcrumb-item:first-child a:hover i {
	transform: scale(1.1);
}

/* Current item (last item) */
.zbb-breadcrumb-item-current {
	color: #fff;
	font-weight: 500;
}

.zbb-breadcrumb-item-current span[itemprop="item"] {
	padding: 0.25rem 0.625rem;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 0.375rem;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Separator
   ========================================================================== */

.zbb-breadcrumb-separator {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 0.25rem;
	color: rgba(255, 255, 255, 0.4);
	font-size: 0.625rem;
}

.zbb-breadcrumb-separator i {
	transition: transform 0.2s ease;
}

/* ==========================================================================
   Light Background Style (for non-hero pages like archive, 404)
   ========================================================================== */

.zbb-breadcrumb-light {
	position: relative;
	top: 0;
	margin-top: 0;
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* 确保面包屑紧挨英雄区域 - 移除任何可能的间距 */
.zbb-page-hero-modern+.zbb-breadcrumb-light,
.zbb-hero+.zbb-breadcrumb-light {
	margin-top: 0;
}

.zbb-breadcrumb-light::before {
	content: '';
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	width: 4px;
	height: 100%;
	background: linear-gradient(180deg,
			var(--zbb-primary, #2563eb) 0%,
			var(--zbb-secondary, #3b82f6) 100%);
	opacity: 0.8;
}

.zbb-breadcrumb-light .zbb-breadcrumb-item {
	color: #64748b;
}

.zbb-breadcrumb-light .zbb-breadcrumb-item a {
	color: #475569;
	text-shadow: none;
}

.zbb-breadcrumb-light .zbb-breadcrumb-item a:hover {
	color: var(--zbb-primary, #2563eb);
	background: rgba(37, 99, 235, 0.08);
}

.zbb-breadcrumb-light .zbb-breadcrumb-item:first-child a i {
	color: var(--zbb-primary, #2563eb);
}

.zbb-breadcrumb-light .zbb-breadcrumb-item-current {
	color: #1e293b;
}

.zbb-breadcrumb-light .zbb-breadcrumb-item-current span[itemprop="item"] {
	background: rgba(37, 99, 235, 0.1);
	color: var(--zbb-primary, #2563eb);
	text-shadow: none;
}

.zbb-breadcrumb-light .zbb-breadcrumb-separator {
	color: #cbd5e1;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 991px) {
	.zbb-breadcrumb {
		top: 75px;
		padding: 0.75rem 0;
	}

	/* 浅色面包屑重置 top 值 */
	.zbb-breadcrumb-light {
		top: 0;
	}
}

@media (max-width: 768px) {
	.zbb-breadcrumb {
		top: 70px;
		padding: 0.625rem 0;
	}

	/* 浅色面包屑重置 top 值，紧挨英雄区域 */
	.zbb-breadcrumb-light {
		top: 0;
		margin-top: 0;
	}

	.zbb-breadcrumb-list {
		font-size: 0.75rem;
	}

	.zbb-breadcrumb-item a {
		padding: 0.25rem 0.375rem;
		gap: 0.25rem;
	}

	/* 移动端面包屑项文字截断 - 不再隐藏中间项 */
	.zbb-breadcrumb-item span[itemprop="name"] {
		max-width: 120px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.zbb-breadcrumb-separator {
		padding: 0 0.125rem;
	}

	/* Current item text truncation */
	.zbb-breadcrumb-item-current span[itemprop="name"] {
		max-width: 150px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	/* Light style adjustments */
	.zbb-breadcrumb-light {
		padding: 0.625rem 0;
	}
}

@media (max-width: 480px) {
	.zbb-breadcrumb {
		top: 68px;
		padding: 0.5rem 0;
	}

	/* 浅色面包屑重置 top 值 */
	.zbb-breadcrumb-light {
		top: 0;
	}

	.zbb-breadcrumb-list {
		font-size: 0.6875rem;
	}

	.zbb-breadcrumb-item-current span[itemprop="name"] {
		max-width: 100px;
	}

	/* 超小屏幕面包屑项文字截断 - 不再隐藏中间项 */
	.zbb-breadcrumb-item span[itemprop="name"] {
		max-width: 80px;
	}
}

/* ==========================================================================
   Animation
   ========================================================================== */

.zbb-breadcrumb-item {
	animation: breadcrumbFadeIn 0.3s ease forwards;
	opacity: 0;
}

.zbb-breadcrumb-item:nth-child(1) {
	animation-delay: 0.05s;
}

.zbb-breadcrumb-item:nth-child(2) {
	animation-delay: 0.1s;
}

.zbb-breadcrumb-item:nth-child(3) {
	animation-delay: 0.15s;
}

.zbb-breadcrumb-item:nth-child(4) {
	animation-delay: 0.2s;
}

.zbb-breadcrumb-item:nth-child(5) {
	animation-delay: 0.25s;
}

@keyframes breadcrumbFadeIn {
	from {
		opacity: 0;
		transform: translateX(-8px);
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
	.zbb-breadcrumb-item {
		animation: none;
		opacity: 1;
	}

	.zbb-breadcrumb-item a,
	.zbb-breadcrumb-separator i,
	.zbb-breadcrumb-item:first-child a i {
		transition: none;
	}
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
	.zbb-breadcrumb {
		background: none;
		border-bottom: 1px solid #ccc;
		padding: 0.5rem 0;
	}

	.zbb-breadcrumb::before {
		display: none;
	}

	.zbb-breadcrumb-item a {
		color: #000;
	}

	.zbb-breadcrumb-separator i::before {
		content: '>';
		font-family: inherit;
	}
}