/*
 * YAQIVENT cross-language design refinements.
 * Loaded after the theme and Customizer stylesheet.
 */

:root {
	--yq-brand: #cc1939;
	--yq-brand-deep: #a31430;
	--yq-ink: #111827;
	--yq-muted: #475569;
	--yq-surface: #fff9f7;
}

/* Homepage hero: tighter display type and a clear next step. */
body.home .entry-content .has-image-background h1 {
	line-height: 1.12 !important;
	letter-spacing: -0.025em !important;
	text-wrap: balance;
}

.yq-hero-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: 12px;
	width: 100%;
	max-width: 520px;
	margin: 4px auto 0;
	position: relative;
	z-index: 5;
	direction: inherit;
}

.yq-hero-actions .yq-hero-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 168px;
	min-width: 0;
	min-height: 50px;
	padding: 12px 22px;
	border-radius: 999px;
	border: 1px solid transparent;
	color: #fff !important;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	box-sizing: border-box;
	transition:
		transform 180ms ease,
		box-shadow 180ms ease,
		background-color 180ms ease,
		border-color 180ms ease;
}

.yq-hero-actions .yq-hero-btn--primary {
	background: var(--yq-brand) !important;
	border-color: var(--yq-brand) !important;
	box-shadow: 0 10px 26px rgba(88, 7, 24, 0.28);
}

.yq-hero-actions .yq-hero-btn--secondary {
	background: rgba(11, 27, 48, 0.42) !important;
	border-color: rgba(255, 255, 255, 0.78) !important;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.yq-hero-actions .yq-hero-btn:hover {
	transform: translateY(-2px);
}

.yq-hero-actions .yq-hero-btn--primary:hover {
	background: #b01632 !important;
	border-color: #b01632 !important;
	box-shadow: 0 14px 30px rgba(88, 7, 24, 0.36);
}

.yq-hero-actions .yq-hero-btn--secondary:hover {
	background: rgba(255, 255, 255, 0.18) !important;
	border-color: #fff !important;
}

/* Keep primary navigation icons visually subordinate. */
.main-header-menu .dropdown-menu-toggle {
	margin-inline-start: 5px;
	opacity: 0.72;
}

.main-header-menu .dropdown-menu-toggle .ast-icon svg {
	width: 10px !important;
	height: 7px !important;
}

/* Make the quote strip align with the rest of the page instead of bleeding
   against both desktop edges. */
[data-spectra-id="af5df69f"] {
	box-sizing: border-box;
	width: 100% !important;
	padding: clamp(26px, 4vw, 48px) clamp(24px, 6vw, 88px) !important;
	margin-inline: 0 !important;
	gap: 18px 32px !important;
}

[data-spectra-id="af5df69f"] [data-spectra-id="spectra-d83192c0-title"] {
	min-width: 0;
	max-width: 820px;
	margin: 0;
	padding-bottom: 0 !important;
	line-height: 1.4 !important;
	text-wrap: balance;
}

[data-spectra-id="af5df69f"] [data-spectra-id="spectra-d83192c0-buttons"] {
	flex: 0 0 auto;
}

@media (min-width: 900px) {
	[data-spectra-id="af5df69f"] {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
	}
}

/* Restore the missing red background on the localized mobile Contact cards. */
body:is(
		.page-id-1669,
		.page-id-3257,
		.page-id-3273,
		.page-id-3262,
		.page-id-4330,
		.page-id-4331
	)
	.spectra-hide-desktop.spectra-hide-tablet
	> .spectra-background-color {
	background-color: var(--yq-brand) !important;
	background-image: linear-gradient(135deg, var(--yq-brand) 0%, var(--yq-brand-deep) 100%) !important;
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
	box-shadow: 0 12px 30px rgba(93, 12, 28, 0.18) !important;
}

body:is(
		.page-id-1669,
		.page-id-3257,
		.page-id-3273,
		.page-id-3262,
		.page-id-4330,
		.page-id-4331
	)
	.spectra-hide-desktop.spectra-hide-tablet
	> .spectra-background-color,
body:is(
		.page-id-1669,
		.page-id-3257,
		.page-id-3273,
		.page-id-3262,
		.page-id-4330,
		.page-id-4331
	)
	.spectra-hide-desktop.spectra-hide-tablet
	> .spectra-background-color
	* {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
}

/* Keep the correct contrast for links inside the Contact cards. */
body:is(
		.page-id-1669,
		.page-id-3257,
		.page-id-3273,
		.page-id-3262,
		.page-id-4330,
		.page-id-4331
	)
	.spectra-hide-desktop.spectra-hide-tablet
	> .spectra-background-color
	a:hover,
body:is(
		.page-id-1669,
		.page-id-3257,
		.page-id-3273,
		.page-id-3262,
		.page-id-4330,
		.page-id-4331
	)
	.spectra-hide-desktop.spectra-hide-tablet
	> .spectra-background-color
	a:hover
	* {
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	text-decoration: underline !important;
}

/* News category tabs must show their complete localized labels. */
@media (max-width: 768px) {
	body #content [data-spectra-id="spectra-4405554a"] {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 6px !important;
		padding: 0 12px !important;
		box-sizing: border-box;
	}

	body
		#content
		[data-spectra-id="spectra-4405554a"]
		> .wp-block-spectra-container {
		flex: 1 1 0 !important;
		width: auto !important;
		min-width: 0 !important;
		padding: 4px 0 !important;
	}

	body
		#content
		[data-spectra-id="spectra-4405554a"]
		> .wp-block-spectra-container:nth-child(3) {
		grid-column: 1 / -1;
	}

	body
		#content
		[data-spectra-id="spectra-4405554a"]
		.wp-block-spectra-buttons,
	body
		#content
		[data-spectra-id="spectra-4405554a"]
		.wp-block-spectra-button {
		width: 100% !important;
		min-width: 0 !important;
	}

	body
		#content
		[data-spectra-id="spectra-4405554a"]
		.wp-block-spectra-button {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		min-height: 48px !important;
		padding: 8px 10px !important;
		font-size: 12.5px !important;
		line-height: 1.2 !important;
		white-space: normal !important;
		overflow: visible !important;
		text-overflow: clip !important;
		text-align: center !important;
		box-sizing: border-box;
	}

	body
		#content
		[data-spectra-id="spectra-4405554a"]
		.wp-block-spectra-button
		span,
	body
		#content
		[data-spectra-id="spectra-4405554a"]
		.wp-block-spectra-button
		strong {
		display: block !important;
		width: 100% !important;
		white-space: normal !important;
		overflow: visible !important;
		overflow-wrap: anywhere;
		word-break: normal;
	}
}

@media (max-width: 420px) {
	body
		#content
		[data-spectra-id="spectra-4405554a"]
		.wp-block-spectra-button {
		font-size: 11.5px !important;
		padding-inline: 4px !important;
	}
}

/* Shorten the mobile news listing without removing any content from the DOM. */
@media (max-width: 768px) {
	body:is(
			.page-id-3346,
			.page-id-3363,
			.page-id-3445,
			.page-id-3469,
			.page-id-4312,
			.page-id-4313
		)
		.gb-text-e0f9c4b5 {
		display: -webkit-box !important;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
		overflow: hidden !important;
	}
}

/* Comfortable touch targets across the site. */
button.menu-toggle {
	width: 46px !important;
	height: 46px !important;
	min-width: 46px !important;
	min-height: 46px !important;
	padding: 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.main-header-menu .menu-link,
.wpb_category_n_menu_accordion .menu-link {
	min-height: 44px;
}

.wp-block-spectra-button,
.wp-block-button__link,
.ast-button,
.btn {
	min-height: 44px;
}

.wp-block-spectra-button,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

.wpb_category_n_menu_accordion .wpb-submenu-indicator {
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	min-height: 36px !important;
	align-items: center;
	justify-content: center;
}

.site-footer .ast-builder-social-element,
.site-footer a[class*="yq-"],
.site-footer .yq-social a,
.site-footer a[href*="wa.me"],
.site-footer a[href*="facebook.com"],
.site-footer a[href*="vk."],
.site-footer a[href*="wechat"] {
	min-width: 44px;
	min-height: 44px;
	width: 44px !important;
	height: 44px !important;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Keep social icons visible on their hover background. */
.site-footer .ast-builder-social-element:hover,
.site-footer a[class*="yq-"]:hover,
.site-footer .yq-social a:hover,
.site-footer a[href*="wa.me"]:hover,
.site-footer a[href*="facebook.com"]:hover,
.site-footer a[href*="vk."]:hover,
.site-footer a[href*="wechat"]:hover {
	background: var(--yq-brand) !important;
	color: #fff !important;
	transform: translateY(-2px);
}

.site-footer .ast-builder-social-element:hover svg,
.site-footer a[class*="yq-"]:hover svg,
.site-footer .yq-social a:hover svg,
.site-footer a[href*="wa.me"]:hover svg {
	fill: #fff !important;
}

.site-footer .menu-link {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

/* Clear keyboard focus in both light and dark regions. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
	outline: 3px solid #fff !important;
	outline-offset: 3px !important;
	box-shadow: 0 0 0 6px rgba(204, 25, 57, 0.94) !important;
}

/* Compact two-column consent controls on phones. */
@media (max-width: 767px) {
	.surecookie-public-banner.surecookie-container-mobile {
		left: 12px !important;
		right: 12px !important;
		bottom: 12px !important;
		width: auto !important;
		max-width: calc(100vw - 24px) !important;
		padding: 14px !important;
		border-radius: 16px !important;
		box-sizing: border-box;
	}

	.surecookie-public-banner .surecookie-content-mobile {
		gap: 9px !important;
	}

	.surecookie-public-banner .surecookie-banner-text-wrapper,
	.surecookie-public-banner .surecookie-banner-text-wrapper p {
		font-size: 12px !important;
		line-height: 1.45 !important;
	}

	.surecookie-public-banner .surecookie-branding-mobile {
		margin: 0 !important;
		font-size: 10px !important;
		line-height: 1.3 !important;
	}

	.surecookie-public-banner .surecookie-buttons-mobile {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 8px !important;
		width: 100% !important;
	}

	.surecookie-public-banner .surecookie-buttons-mobile button {
		width: 100% !important;
		min-width: 0 !important;
		min-height: 44px !important;
		padding: 9px 8px !important;
		font-size: 13px !important;
		line-height: 1.2 !important;
	}
}

/* Give very narrow phones their headline and actions before secondary copy. */
@media (max-width: 380px) {
	body.home .entry-content .has-image-background {
		padding-top: 92px !important;
		gap: 17px !important;
	}

	body.home .entry-content .has-image-background [data-spectra-id="spectra-3b7e0e21-prefix"] {
		display: none !important;
	}

	body.home .entry-content .has-image-background h1 {
		font-size: 29px !important;
		line-height: 1.1 !important;
	}

	.yq-hero-actions {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 9px;
		max-width: 330px;
		align-items: stretch;
	}

	.yq-hero-actions .yq-hero-btn {
		font-size: 13px;
		padding-inline: 10px;
	}
}

@media (max-width: 520px) {
	body.home .entry-content .has-image-background [data-spectra-id="spectra-3b7e0e21-prefix"] {
		font-size: 14px !important;
		line-height: 1.5 !important;
	}

	[data-spectra-id="af5df69f"] {
		padding: 24px 20px !important;
	}

	[data-spectra-id="af5df69f"] [data-spectra-id="spectra-d83192c0-title"] {
		text-align: center;
	}

	[data-spectra-id="af5df69f"] [data-spectra-id="spectra-d83192c0-buttons"] {
		width: 100% !important;
	}

	[data-spectra-id="af5df69f"] [data-spectra-id="spectra-d83192c0-buttons"] .wp-block-spectra-button {
		width: 100% !important;
	}
}

html[dir="rtl"] body.home .yq-brand-tagline-en,
.yq-brand-tagline-en {
	display: inline-block;
	direction: ltr !important;
	unicode-bidi: isolate !important;
}

@media (prefers-reduced-motion: reduce) {
	.yq-hero-actions .yq-hero-btn,
	.site-footer .ast-builder-social-element,
	.site-footer a[class*="yq-"] {
		transition: none !important;
	}
}
