/*
Theme Name: Eurasian Global B2B
Theme URI: https://eurasian-global.com/
Author: Eurasian Global
Description: Lightweight, editable WordPress block theme for an industrial B2B sourcing and inquiry website.
Version: 0.3.4
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 7.4
Text Domain: eurasia-global-b2b
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: block-patterns, full-site-editing, wide-blocks, translation-ready
*/

/* Small, theme-wide safeguards for native blocks. Page content remains fully
 * editable Gutenberg markup; these rules only normalize responsive behavior. */
html,
body {
	overflow-x: clip;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Display typography is tuned by language. English needs enough vertical air
 * for multi-line Latin capitals; Chinese uses a native CJK stack and calmer
 * tracking instead of inheriting the condensed Latin display face. */
html:lang(en-US) .wp-block-heading.has-display-font-size,
html:lang(en) .wp-block-heading.has-display-font-size {
	letter-spacing: -0.018em;
	line-height: 1.1 !important;
}

html:lang(zh-CN) .wp-block-heading,
html:lang(zh) .wp-block-heading {
	font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Segoe UI", sans-serif;
	letter-spacing: -0.01em;
	line-height: 1.18;
	text-wrap: balance;
}

html:lang(zh-CN) .wp-block-heading.has-display-font-size,
html:lang(zh) .wp-block-heading.has-display-font-size {
	font-weight: 650;
	letter-spacing: -0.018em;
	line-height: 1.16 !important;
}

main {
	min-height: 40vh;
}

/* A single dark editorial language across overview, category and detail heroes. */
main.has-steel-wash-gradient-background {
	background: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--surface);
}

main.has-steel-wash-gradient-background h1,
main.has-primary-background-color h1 {
	color: var(--wp--preset--color--surface);
}

main.has-steel-wash-gradient-background .has-muted-color,
main.has-primary-background-color .has-muted-color {
	color: var(--wp--preset--color--steel) !important;
}

::selection {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--surface);
}

img,
svg {
	max-width: 100%;
	height: auto;
}

header > .wp-block-group.alignwide {
	column-gap: clamp(1rem, 2vw, 2rem);
	row-gap: 0.85rem;
}

header {
	box-shadow: 0 1px 0 rgba(10, 28, 41, 0.06);
	z-index: 100;
}

header > .wp-block-group.alignwide > .eg-site-brand {
	flex: 0 0 auto;
	margin: 0;
	min-width: 0;
}

header .eg-brand-mark-v1 {
	position: relative;
	flex: 0 0 60px;
	width: 60px;
	height: 34px;
	overflow: hidden;
	line-height: 0;
	margin: 0;
	border-radius: 0;
}

header .eg-brand-mark-v1 img {
	position: absolute;
	top: -27px;
	left: -14px;
	display: block;
	width: 267px !important;
	max-width: none !important;
	height: auto !important;
	border-radius: 0 !important;
}

header .eg-brand-name {
	margin: 0;
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.04rem;
	font-weight: 800;
	letter-spacing: 0.035em;
	line-height: 1;
	white-space: nowrap;
}

header .wp-block-navigation-item__content {
	letter-spacing: 0.015em;
}

header .wp-block-navigation__submenu-container {
	border: 0 !important;
	box-shadow: 0 20px 50px rgba(10, 28, 41, 0.16);
	min-width: 230px !important;
	padding: 0.55rem !important;
}

header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.7rem 0.8rem !important;
}

.wp-block-cover .wp-block-cover__inner-container {
	width: 100%;
}

.wp-block-image img,
.wp-block-cover__image-background {
	transition: transform 420ms ease;
}

.wp-block-image a {
	display: block;
	overflow: hidden;
}

.wp-block-image a:hover img {
	transform: scale(1.018);
}

.wp-block-button__link {
	transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.wp-block-button__link:hover {
	transform: translateY(-1px);
}

.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--steel);
	padding: 1rem 0;
}

.wp-block-details summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
}

header .eg-brand-name a {
	color: inherit;
}

header > .wp-block-group.alignwide > .wp-block-navigation {
	flex: 1 1 auto;
}

header > .wp-block-group.alignwide > .eg-header-actions {
	flex: 0 0 auto;
}

footer .wp-block-list {
	list-style: none;
	margin-left: 0;
	padding-left: 0;
}

footer .wp-block-list a {
	color: var(--wp--preset--color--steel);
}

footer .wp-block-list a:hover,
footer .wp-block-list a:focus-visible {
	color: var(--wp--preset--color--accent);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}

@media (max-width: 781px) {
	header > .wp-block-group.alignwide {
		flex-wrap: wrap;
	}

	.wp-block-columns:not(.is-not-stacked-on-mobile) {
		width: 100%;
	}

	.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
		flex-basis: 100% !important;
		min-width: 0;
		max-width: 100%;
	}

	.wp-block-column,
	.wp-block-group,
	.wp-block-group.is-layout-flex > * {
		min-width: 0;
	}

	.wp-block-heading,
	.wp-block-paragraph,
	.wp-block-list,
	.wp-block-button__link {
		overflow-wrap: anywhere;
	}

	header > .wp-block-group.alignwide > .wp-block-navigation {
		order: 2;
		margin-left: auto;
	}

	header > .wp-block-group.alignwide > .wp-block-navigation .wp-block-navigation__responsive-container-open {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		color: var(--wp--preset--color--primary);
	}

	header > .wp-block-group.alignwide > .eg-header-actions {
		order: 3;
		flex-basis: 100%;
		justify-content: flex-start;
	}
}

@media (max-width: 430px) {
	header .eg-site-brand {
		gap: 0.5rem;
	}

	header .eg-brand-mark-v1 {
		flex-basis: 51px;
		width: 51px;
		height: 30px;
	}

	header .eg-brand-mark-v1 img {
		top: -23px;
		left: -12px;
		width: 225px !important;
	}

	header .eg-brand-name {
		font-size: 0.92rem;
	}

	.wp-block-buttons {
		gap: 0.75rem;
	}
}
