/* ===================================================================
 * component.css — Atom site reusable component styles
 *
 * DESIGN.md tokens reference:
 *   button-primary: tertiary bg, white text, 8px radius, 12px 24px
 *   button-secondary: transparent, text color, border, 8px radius
 *   card: surface bg, md radius (12px), 24px padding, shadow
 *   tag: tertiary-15 bg, tertiary text, full radius
 * =================================================================== */

/* ------------------------------------------------------------------
 * Button system
 * ------------------------------------------------------------------ */
.a-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.5rem;
	border-radius: var(--atom-radius-sm);
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
	line-height: 1.5;
}
.a-btn:hover {
	box-shadow: var(--atom-shadow-lg);
}

a.a-btn.primary,
button.a-btn.primary {
	color: var(--atom-white);
	background: var(--atom-primary);
	box-shadow: var(--atom-shadow);
}
a.a-btn.primary:hover,
button.a-btn.primary:hover {
	background: var(--atom-primary-dark);
	/* color: var(--atom-primary); */
}

a.a-btn.secondary,
button.a-btn.secondary {
	color: var(--atom-text);
	background: var(--atom-surface);
	border: 1px solid var(--atom-border);
}
a.a-btn.secondary:hover,
button.a-btn.secondary:hover {
	border-color: var(--atom-text);
}

.a-btn.light {
	color: var(--atom-text);
	background: var(--atom-surface);
}

button {
	border: 0;
	background: none;
	cursor: pointer;
}

/* ------------------------------------------------------------------
 * Text link
 * ------------------------------------------------------------------ */
.text-link {
	color: var(--atom-primary);
	font-size: 0.88rem;
	font-weight: 700;
	text-decoration: none;
}

/* ------------------------------------------------------------------
 * Eyebrow label (section intro tag)
 * ------------------------------------------------------------------ */
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--atom-text-soft);
}

/* ------------------------------------------------------------------
 * Card system
 * ------------------------------------------------------------------ */
.card,
.rich-card,
.contact-panel,
.process-card,
.cta-box {
	border: 1px solid var(--atom-border);
	border-radius: var(--atom-radius-md);
	background: var(--atom-surface);
	box-shadow: var(--atom-shadow);
	padding: 1.5rem;
}

.card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.8rem;
	height: 2.8rem;
	margin-bottom: 1rem;
	border-radius: var(--atom-radius-md);
	background: var(--atom-primary-soft);
	color: var(--atom-primary);
}
.card-icon.soft {
	background: var(--atom-surface-soft);
	color: #59647f;
}

/* ------------------------------------------------------------------
 * Tag / Pill
 * ------------------------------------------------------------------ */
.pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.34rem 0.65rem;
	border-radius: 4px;
	background: var(--atom-primary-soft);
	color: var(--atom-primary-dark);
	font-size: 0.72rem;
	font-weight: 700;
}
.pill.light {
	background: #eef1f8;
	color: #525d78;
}

/* ------------------------------------------------------------------
 * Mini bullet list
 * ------------------------------------------------------------------ */
.mini-list {
	display: grid;
	gap: 0.55rem;
	margin-top: 0.9rem;
	list-style: none;
	padding: 0;
	margin: 0;
}
.mini-list li {
	position: relative;
	padding-left: 1rem;
	color: var(--atom-text-soft);
	font-size: 0.92rem;
}
.mini-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.7rem;
	width: 0.35rem;
	height: 0.35rem;
	border-radius: var(--atom-radius-full);
	background: var(--atom-primary);
}

/* ------------------------------------------------------------------
 * Pagination
 * ------------------------------------------------------------------ */
.pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	justify-content: center;
	margin-top: 2rem;
}

.pagination-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--atom-border);
	border-radius: 4px;
	background: var(--atom-surface);
	font-size: 0.84rem;
	font-weight: 700;
	text-decoration: none;
}
.pagination-link.is-current {
	background: var(--atom-primary);
	border-color: var(--atom-primary);
	color: var(--atom-white);
}

/* ------------------------------------------------------------------
 * Inline meta (index + tag row inside cards)
 * ------------------------------------------------------------------ */
.library-inline-meta {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	margin-bottom: 0.8rem;
}
.library-inline-meta strong {
	font-size: 1.6rem;
	font-weight: 800;
	color: rgba(0, 0, 0, 0.06);
	line-height: 1;
}


/* Article Style */
/* ── 3-column article layout ── */
.article-layout {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) 260px;
	gap: 2rem;
	align-items: start;
}

/* ── LEFT: Floating action bar ── */
.article-left {
	position: sticky;
	top: calc(4rem + 20px);
	z-index: 5;
}

.article-action-bar {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	border: 1px solid var(--atom-border);
	border-radius: var(--atom-radius-md);
	background: var(--atom-surface);
	padding: 0.6rem 0.3rem;
	box-shadow: var(--atom-shadow);
}

.article-action-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.2rem;
	width: 46px;
	padding: 0.5rem 0;
	border: none;
	border-radius: var(--atom-radius-sm);
	background: transparent;
	color: var(--atom-text-soft);
	font-size: 0.62rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: color 0.2s ease, background 0.2s ease;
}

.article-action-btn:hover {
	color: var(--atom-primary);
	background: var(--atom-primary-soft);
}

.article-action-btn i {
	font-size: 1.15rem;
	line-height: 1;
}

.article-action-btn.is-liked {
	color: var(--atom-primary);
}

.article-action-label {
	display: block;
	line-height: 1.2;
}

/* ── CENTER: Main article ── */
.article-main {
	max-width: 100%;
	padding: 2rem;
}

.article-featured {
	margin: -2rem -2rem 1.5rem;
	border-radius: var(--atom-radius-md) var(--atom-radius-md) 0 0;
	overflow: hidden;
	max-height: 460px;
}

.article-featured-img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

.article-content {
	color: var(--atom-text);
	line-height: 1.8;
	font-size: 1rem;
}

.article-content p {
	margin: 0 0 1.25rem;
}

.article-content a {
	color: var(--atom-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.article-content a:hover {
	color: var(--atom-primary-dark);
}

.article-content h2,
.article-content h3 {
	margin: 1.8rem 0 0.8rem;
	color: var(--atom-text);
}

.article-content h2 {
	font-size: 1.5rem;
	font-weight: 700;
}

.article-content h3 {
	font-size: 1.2rem;
	font-weight: 600;
}

.article-content img,
.article-content iframe,
.article-content video {
	max-width: 100%;
	border-radius: var(--atom-radius-sm);
}

.article-content ul,
.article-content ol {
	padding-left: 1.25rem;
	margin: 0 0 1.25rem;
}

.article-content blockquote {
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
	border-left: 3px solid var(--atom-primary);
	background: var(--atom-surface-soft);
	border-radius: 0 var(--atom-radius-sm) var(--atom-radius-sm) 0;
	color: var(--atom-text-soft);
	font-style: italic;
}

.article-content .wp-block-code,
.article-content pre {
	background: #f0f2f7;
	border-radius: var(--atom-radius-sm);
	padding: 1rem;
	overflow-x: auto;
	font-size: 0.88rem;
	line-height: 1.6;
}

.article-page-links {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--atom-border);
}

.article-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--atom-border);
}

.article-tags-label {
	font-size: 0.82rem;
	color: var(--atom-text-soft);
	margin-right: 0.3rem;
}

/* ── RIGHT: Sidebar ── */
.article-right {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.article-side-widget {
	border: 1px solid var(--atom-border);
	border-radius: var(--atom-radius-md);
	background: var(--atom-surface);
	padding: 1.25rem;
	box-shadow: var(--atom-shadow);
}

.article-side-title {
	margin: 0 0 1rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--atom-text);
	padding-bottom: 0.6rem;
	border-bottom: 2px solid var(--atom-primary);
}

.article-side-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.article-side-list li {
	font-size: 0.88rem;
	line-height: 1.4;
}

.article-side-list a {
	color: var(--atom-text-soft);
	text-decoration: none;
	transition: color 0.2s ease;
	display: block;
	padding: 0.25rem 0;
}

.article-side-list a:hover {
	color: var(--atom-primary);
}

.article-side-list.numbered li {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
}

.article-side-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	border-radius: var(--atom-radius-full);
	background: var(--atom-primary-soft);
	color: var(--atom-primary);
	font-size: 0.72rem;
	font-weight: 700;
	flex-shrink: 0;
}

/* ── Toast ── */
.article-toast {
	position: fixed;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%) translateY(10px);
	background: var(--atom-text);
	color: var(--atom-white);
	padding: 0.6rem 1.25rem;
	border-radius: var(--atom-radius-sm);
	font-size: 0.84rem;
	font-weight: 500;
	opacity: 0;
	transition: opacity 0.3s ease, transform 0.3s ease;
	z-index: 100;
	pointer-events: none;
}

.article-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}


/* ── Breadcrumb ── */
.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin-bottom: 0.75rem;
}

.breadcrumb a {
	color: var(--atom-text-soft);
	text-decoration: underline;
	transition: color 0.2s ease;
}

.breadcrumb.should-white a,
.breadcrumb.should-white span {
	color: var(--atom-white);
}

.breadcrumb a:hover {
	color: var(--atom-primary);
}

.breadcrumb-sep {
	color: var(--atom-border);
	font-size: 0.75rem;
	user-select: none;
}

.breadcrumb-current {
	color: var(--atom-text);
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 24ch;
}

/* ── Article mobile ── */
@media (max-width: 1024px) {
	.article-layout {
		grid-template-columns: 1fr;
	}

	/* LEFT: fixed to top on mobile */
	.article-left {
		position: fixed;
		top: auto;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 50;
	}

	.article-action-bar {
		flex-direction: row;
		justify-content: center;
		border-radius: 0;
		border: none;
		border-top: 1px solid var(--atom-border);
		padding: 0.4rem 0.5rem;
		background: rgba(255, 255, 255, 0.96);
		backdrop-filter: blur(12px);
		gap: 0.2rem;
	}

	.article-action-btn {
		flex-direction: row;
		width: auto;
		gap: 0.35rem;
		padding: 0.4rem 0.7rem;
		font-size: 0.72rem;
	}

	.article-action-btn i {
		font-size: 0.95rem;
	}

	/* RIGHT: moves to bottom */
	.article-right {
		margin-top: 1rem;
	}

	.article-side-list {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 0.4rem;
	}

	.article-side-list li {
		flex: 1 1 calc(50% - 0.4rem);
		min-width: 0;
	}

	.article-side-list.numbered li {
		flex: 1 1 calc(50% - 0.4rem);
	}

	/* breadcrumb truncate adjust */
	.breadcrumb-current {
		max-width: 16ch;
	}
}

/* Article Style END */

/* Language Switcher */
	/* 语言切换器容器 */
.language-switcher {
    position: relative;
    display: inline-block;
}

/* 当前语言链接 */
.language-switcher .current-language {
    text-decoration: none;
    display: flex;
    align-items: center;
    cursor: pointer;
		color: var(--atom-text);
}

/* 下拉菜单图标 */
.language-switcher .current-language .dropdown-icon {
    display: inline-block;
    margin-left: 5px;
    width: 0.35rem;
    height: 0.35rem;
    border-left: 2px solid var(--atom-text-soft);
    border-bottom: 2px solid var(--atom-text-soft);
    transform: rotate(-45deg);
    transition: transform 0.3s ease;
}

/* 鼠标移入时旋转图标 */
.language-switcher:hover .current-language .dropdown-icon {
    transform: rotate(135deg);
		color: inherit;
}

/* 语言菜单 */
.language-switcher .language-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    min-width: 120px;
}

/* 鼠标移入时显示菜单 */
.language-switcher:hover .language-menu {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 语言菜单项 */
.language-switcher .language-menu li {
    padding: 0;
}

/* 语言菜单链接 */
.language-switcher .language-menu li a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s ease;
}

/* 鼠标移入菜单项 */
.language-switcher .language-menu li a:hover {
    background: #f5f5f5;
    color: var(--atom-primary);
}

/* 动画效果：淡入 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}/*end-lang*/

/* Call-to-Action 按钮样式 */
.call-to-action .free-diagnosis-button {
    display: inline-block;
    background-color: #014dff;
    color: #ffffff;
    font-size: 16px;
    padding: 7px 14px;
    border-radius: 3px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin-top: -10px;
}

/* 鼠标悬停效果 */
.call-to-action .free-diagnosis-button:hover {
    background-color: #003bcc; 
}


/* Language Switcher END */