/*
Theme Name: Ruyigroup
Theme URI: https://ruyigroupp.com/
Author: Ruyigroup
Author URI: https://ruyigroupp.com/
Description: A custom WordPress theme for Ruyigroup.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: ruyigroup
*/

:root {
	--header-height: 90px;
	--color-primary: #b72326;
	--font-heading: "Montserrat", Arial, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
}

html {
	min-height: 100%;
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
	background: #fff;
	color: #111;
	font-family: var(--font-heading);
}

html.menu-open {
	overflow: hidden;
	overscroll-behavior: none;
	scroll-behavior: auto;
}

body.menu-open {
	position: fixed;
	top: var(--menu-scroll-offset, 0px);
	left: 0;
	right: 0;
	width: 100%;
	overflow: hidden;
}

.site-main {
	flex: 1 0 auto;
}

.site-footer {
	margin-top: auto;
	color: #161616;
	background: #fff;
}

.site-footer__main {
	padding: clamp(42px, 5vw, 72px) 0 clamp(36px, 4vw, 60px);
}

.site-footer__inner {
	display: grid;
	grid-template-columns: minmax(180px, 1fr) minmax(220px, 280px) minmax(180px, 220px);
	align-items: start;
	column-gap: clamp(48px, 7vw, 130px);
}

.site-footer__logo {
	display: block;
	width: 180px;
}

.site-footer__logo img {
	width: 100%;
	height: auto;
}

.site-footer__heading {
	margin: 0 0 24px;
	color: #555;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	text-transform: uppercase;
}

.site-footer__content {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
}

.site-footer__bottom {
	padding: 34px 0;
	border-top: 1px solid #d6d6d6;
}

.site-copyright {
	margin: 0;
	color: #5b5b5b;
	font-size: 14px;
	line-height: 1.5;
}

img,
svg {
	display: block;
	max-width: 100%;
}

/* Vector arrows keep the same appearance without platform emoji substitution. */
.ruyi-arrow-icon {
	display: block;
	width: 1em;
	height: 1em;
	flex-shrink: 0;
}

/* Shared content wrapper. */
.container {
	width: 100%;
	max-width: 1800px;
	margin-right: auto;
	margin-left: auto;
	padding-right: clamp(32px, 6vw, 150px);
	padding-left: clamp(32px, 6vw, 150px);
}

/* Fixed navigation: transparent over the home hero, solid after scrolling. */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 20;
	width: 100%;
	min-height: var(--header-height);
	background: #fff;
	transition: transform .38s cubic-bezier(.22, 1, .36, 1), background-color .25s ease;
}
.home .site-header { background: transparent; }
body:not(.home) .site-main { padding-top: var(--header-height); }
html { scroll-padding-top: calc(var(--header-height) + 16px); }
.site-header.is-scrolled { background: #fff; }
.site-header.is-hidden { transform: translateY(-100%); pointer-events: none; }
.site-header:has(:focus-visible),
body.menu-open .site-header { transform: none; pointer-events: auto; }
body.menu-open .site-header { transition: none; }
.home .site-header.is-scrolled .site-logo__image--default { opacity: 1; }
.home .site-header.is-scrolled .site-logo__image--white { opacity: 0; }
.home .site-header.is-scrolled .site-navigation__list a { color: #252525; }
.home .site-header.is-scrolled .site-navigation__list > li:last-child > a { color: #fff; }
.home .site-header.is-scrolled .language-switcher { color: #252525; background: transparent; }
.home .site-header.is-scrolled .menu-toggle { color: #252525; }
@media (prefers-reduced-motion: reduce) {
	.site-header { transition: none; }
}

.site-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--header-height);
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: clamp(20px, 2vw, 36px);
}

.site-logo {
	position: relative;
	z-index: 3;
	display: block;
	flex: 0 0 auto;
	width: 180px;
}

.site-logo img {
	width: 100%;
	height: auto;
	transition: opacity 0.25s ease;
}

.site-logo__image--white {
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0;
}

.home .site-logo__image--default {
	opacity: 0;
}

.home .site-logo__image--white {
	opacity: 1;
}

.menu-toggle {
	display: none;
}

.site-navigation {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.site-navigation__list {
	display: flex;
	align-items: center;
	gap: clamp(24px, 2.6vw, 48px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-navigation__list a {
	display: block;
	color: #252525;
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-decoration: none;
}

.home .site-navigation__list a {
	color: #fff;
}

.site-navigation__list > li:last-child > a {
	padding: 11px 24px;
	border-radius: 999px;
	color: #fff;
	background: var(--color-primary);
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.site-navigation__list > li:last-child > a:hover,
.site-navigation__list > li:last-child > a:focus-visible {
	background: #991d20;
	transform: translateY(-1px);
}

.language-switcher {
	position: relative;
	z-index: 3;
	display: flex;
	align-items: center;
	padding: 3px 14px;
	border: 0;
	border-radius: 999px;
	color: #252525;
	background: rgba(255, 255, 255, 0.76);
	box-shadow: none;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.home .language-switcher {
	color: #fff;
	background: rgba(16, 25, 30, 0.38);
}

.language-switcher__list {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.language-switcher__list li {
	display: flex;
	align-items: center;
}

.language-switcher__list li + li::before {
	margin: 0 9px;
	color: currentColor;
	content: "/";
	opacity: 0.45;
}

.language-switcher__list a {
	position: relative;
	display: block;
	padding: 7px 0;
	color: currentColor;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
	transition: opacity 0.2s ease;
}

.language-switcher__list a::after {
	position: absolute;
	right: 0;
	bottom: 3px;
	left: 0;
	height: 1px;
	background: currentColor;
	content: "";
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.2s ease;
}

.language-switcher__list a:hover,
.language-switcher__list a:focus-visible {
	opacity: 0.55;
}

.language-switcher__list a:hover::after,
.language-switcher__list a:focus-visible::after,
.language-switcher__list a:active::after {
	transform: scaleX(1);
}

/* Minimal Swiper layout styles kept here so style.css remains the only CSS file. */
.swiper {
	position: relative;
	display: block;
	overflow: hidden;
	width: 100%;
	height: 100%;
}

.swiper-wrapper {
	position: relative;
	z-index: 1;
	display: flex;
	width: 100%;
	height: 100%;
	transition-property: transform;
	transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
}

.swiper-slide {
	position: relative;
	display: block;
	flex-shrink: 0;
	width: 100%;
	height: 100%;
	transition-property: transform;
}

.swiper-fade.swiper-free-mode .swiper-slide {
	transition-timing-function: ease-out;
}

.swiper-fade .swiper-slide {
	pointer-events: none;
	transition-property: opacity;
}

.swiper-fade .swiper-slide-active {
	pointer-events: auto;
}

/* Home: first view. */
.home-hero {
	position: relative;
	width: 100%;
	height: 100vh;
	height: 100svh;
	min-height: 560px;
	overflow: hidden;
	background: #111;
}

.home-hero::after {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	pointer-events: none;
	background: rgba(0, 0, 0, 0.1);
	content: "";
}

.home-hero__slider,
.home-hero__slide,
.home-hero__picture {
	width: 100%;
	height: 100%;
}

.home-hero__picture {
	display: block;
}

.home-hero__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.home-hero__overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 10;
	width: 100%;
	pointer-events: none;
	transform: translate(-50%, -50%);
}

.home-hero__overlay-inner {
	display: flex;
	justify-content: center;
}

.home-hero__overlay img {
	width: min(68vw, 960px);
	height: auto;
}

/* Home: works. */
.home-works {
	position: relative;
	overflow: hidden;
	padding-top: clamp(90px, 8vw, 130px);
	padding-bottom: clamp(100px, 10vw, 170px);
	background: #fff;
}

.home-works__background {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: auto;
	max-width: none;
	pointer-events: none;
}

.home-works__inner {
	position: relative;
	z-index: 1;
}

.home-works__header {
	max-width: 760px;
	margin: 0 auto clamp(50px, 5vw, 80px);
	text-align: center;
}

.home-works__label {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 34px;
	margin: 0 0 12px;
	color: #777c82;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.5em;
	line-height: 1.5;
	text-transform: uppercase;
}

.home-works__label::before,
.home-works__label::after {
	display: block;
	width: 62px;
	height: 1px;
	background: #9b9da0;
	content: "";
}

.home-works__title {
	margin: 0;
	color: #10191e;
	font-family: var(--font-heading);
	font-size: clamp(50px, 5vw, 76px);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.05;
}

.home-works__text {
	margin-top: 14px;
	color: #777c82;
	font-size: clamp(15px, 1.2vw, 19px);
	line-height: 1.45;
}

.home-works__text p {
	margin: 0;
}

.home-works__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-works__item {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 0 clamp(28px, 3vw, 42px);
	border-left: 1px solid #c4c5c5;
}

.home-works__item:first-child {
	padding-left: 0;
	border-left: 0;
}

.home-works__item:last-child {
	padding-right: 0;
}

.home-works__number {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 12px;
	color: #b52229;
	font-family: var(--font-heading);
	font-size: clamp(31px, 2.6vw, 40px);
	font-feature-settings: "lnum" 1, "tnum" 1;
	font-variant-numeric: lining-nums tabular-nums;
	font-weight: 500;
	line-height: 1;
}

.home-works__number::after {
	display: block;
	width: 60px;
	height: 1px;
	background: #929598;
	content: "";
}

.home-works__image-wrap {
	overflow: hidden;
	width: 100%;
	height: clamp(220px, 14vw, 400px);
	margin-bottom: 20px;
}

.home-works__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.home-works__item:hover .home-works__image {
	transform: scale(1.035);
}

.home-works__item-title {
	margin: 0 0 12px;
	color: #10191e;
	font-family: var(--font-heading);
	font-size: clamp(26px, 2.2vw, 34px);
	font-weight: 600;
	letter-spacing: -0.015em;
	line-height: 1.15;
}

.home-works__item-text {
	margin: 0 0 26px;
	color: #777c82;
	font-size: clamp(14px, 1.15vw, 18px);
	line-height: 1.45;
}

.home-works__link {
	display: flex;
	align-items: center;
	gap: 22px;
	width: fit-content;
	margin-top: auto;
	color: #10191e;
	font-family: var(--font-heading);
	font-size: 16px;
	line-height: 1;
	text-decoration: none;
}

.home-works__link::after {
	display: block;
	width: 60px;
	height: 1px;
	background: #777c82;
	content: "";
}

.home-works__link-arrow {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border: 1px solid #10191e;
	border-radius: 50%;
	transition: color 0.25s ease, background-color 0.25s ease;
}

.home-works__link-arrow::before {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 1px;
	background: currentColor;
	content: "";
	transform: translate(-50%, -50%);
}

.home-works__link-arrow::after {
	position: absolute;
	top: 50%;
	left: calc(50% + 4px);
	width: 6px;
	height: 6px;
	border-top: 1px solid currentColor;
	border-right: 1px solid currentColor;
	content: "";
	transform: translate(-50%, -50%) rotate(45deg);
}

.home-works__link:hover .home-works__link-arrow,
.home-works__link:focus-visible .home-works__link-arrow {
	color: #fff;
	background: #10191e;
}

@media (max-width: 1199px) {
	:root {
		--header-height: 80px;
	}

	.site-footer__inner {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 42px clamp(48px, 10vw, 90px);
	}

	.site-footer__logo {
		grid-column: 1 / -1;
	}

	.site-logo {
		width: 150px;
	}

	body.menu-open .site-logo__image--default {
		opacity: 1;
	}

	body.menu-open .site-logo__image--white {
		opacity: 0;
	}

	.site-header__actions {
		gap: 20px;
	}

	.menu-toggle {
		position: relative;
		z-index: 3;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		width: 32px;
		height: 22px;
		margin: 0;
		padding: 0;
		border: 0;
		color: #252525;
		background: transparent;
		cursor: pointer;
	}

	.home .menu-toggle {
		color: #fff;
	}

	.menu-toggle.is-active {
		color: #252525;
	}

	.menu-toggle span {
		display: block;
		width: 100%;
		height: 1px;
		background: currentColor;
		transition: transform 0.25s ease, opacity 0.25s ease;
	}

	.menu-toggle.is-active span:nth-child(1) {
		transform: translateY(10.5px) rotate(45deg);
	}

	.menu-toggle.is-active span:nth-child(2) {
		opacity: 0;
	}

	.menu-toggle.is-active span:nth-child(3) {
		transform: translateY(-10.5px) rotate(-45deg);
	}

	.site-navigation {
		position: fixed;
		z-index: 2;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		display: none;
		padding: var(--header-height) 48px 48px;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		background: #fff;
		transform: none;
	}

	.language-switcher {
		position: fixed;
		bottom: 48px;
		left: 50%;
		z-index: 3;
		color: #252525;
		background: rgba(255, 255, 255, 0.86);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transform: translate(-50%, 10px);
		transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
	}

	body.menu-open .language-switcher {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		color: #252525;
		background: rgba(255, 255, 255, 0.9);
		transform: translate(-50%, 0);
	}

	.site-navigation__list {
		justify-content: center;
		align-items: stretch;
		flex-direction: column;
		gap: 0;
		height: 100%;
		text-align: center;
	}

	.site-navigation__list li + li {
		border-top: 0;
	}

	.site-navigation__list li {
		opacity: 0;
		transform: translateY(16px);
	}

	.site-navigation.is-open .site-navigation__list li {
		animation: mobile-menu-item-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
	}

	.site-navigation.is-open .site-navigation__list li:nth-child(1) {
		animation-delay: 0.1s;
	}

	.site-navigation.is-open .site-navigation__list li:nth-child(2) {
		animation-delay: 0.16s;
	}

	.site-navigation.is-open .site-navigation__list li:nth-child(3) {
		animation-delay: 0.22s;
	}

	.site-navigation.is-open .site-navigation__list li:nth-child(4) {
		animation-delay: 0.28s;
	}

	.site-navigation.is-open .site-navigation__list li:nth-child(n+5) {
		animation-delay: 0.34s;
	}

	.site-navigation__list a,
	.home .site-navigation__list a {
		position: relative;
		padding: 15px 0;
		color: #252525;
		font-size: clamp(22px, 7vw, 30px);
		font-weight: 400;
		letter-spacing: 0.1em;
	}

	.site-navigation__list .current-menu-item > a::after,
	.site-navigation__list .current_page_item > a::after,
	.site-navigation__list .current-menu-ancestor > a::after,
	.site-navigation__list .current_page_ancestor > a::after {
		position: absolute;
		bottom: 8px;
		left: 50%;
		width: 34px;
		height: 1px;
		background: #fff;
		content: "";
		transform: translateX(-50%);
	}

	.site-navigation__list > li:last-child > a,
	.home .site-navigation__list > li:last-child > a {
		display: inline-block;
		padding: 12px 28px;
		border: 0;
		color: #252525;
		background: transparent;
	}

	.site-navigation .site-navigation__list > li.current-menu-item > a,
	.site-navigation .site-navigation__list > li.current_page_item > a,
	.site-navigation .site-navigation__list > li.current-menu-ancestor > a,
	.site-navigation .site-navigation__list > li.current_page_ancestor > a {
		display: inline-block;
		padding: 15px 0;
		border-radius: 0;
		color: var(--color-primary);
		background: transparent;
	}

	.site-navigation .site-navigation__list > li.current-menu-item > a::after,
	.site-navigation .site-navigation__list > li.current_page_item > a::after,
	.site-navigation .site-navigation__list > li.current-menu-ancestor > a::after,
	.site-navigation .site-navigation__list > li.current_page_ancestor > a::after {
		display: block;
		bottom: 7px;
		width: 42px;
		height: 2px;
		background: var(--color-primary);
	}

	.home-works__grid {
		grid-template-columns: 1fr;
	}

	.home-works__item,
	.home-works__item:first-child,
	.home-works__item:last-child {
		padding: 45px 0;
		border-top: 1px solid #c4c5c5;
		border-left: 0;
	}

	.home-works__item:first-child {
		padding-top: 0;
		border-top: 0;
	}

	.home-works__image-wrap {
		height: clamp(200px, 52vw, 400px);
		aspect-ratio: auto;
	}

}

@media (max-width: 767px) {
	:root {
		--header-height: 72px;
	}

	.site-footer__main {
		padding: 44px 0 38px;
	}

	.site-footer__inner {
		grid-template-columns: 1fr;
		gap: 34px;
	}

	.site-footer__logo {
		grid-column: auto;
		width: 150px;
	}

	.site-footer__heading {
		margin-bottom: 14px;
	}

	.site-footer__bottom {
		padding: 26px 0;
	}

	.site-logo {
		width: 140px;
	}

	.site-header__actions {
		gap: 14px;
	}

	.language-switcher {
		bottom: 32px;
	}

	.site-navigation {
		padding: var(--header-height) 32px 32px;
	}

	.home-hero {
		min-height: 480px;
	}

	.home-hero__overlay img {
		width: min(82vw, 520px);
	}

	.home-works {
		padding-top: 72px;
		padding-bottom: 90px;
	}

	.home-works__header {
		margin-bottom: 48px;
	}

	.home-works__label {
		gap: 18px;
		font-size: 11px;
		letter-spacing: 0.35em;
	}

	.home-works__label::before,
	.home-works__label::after {
		width: 34px;
	}

	.home-works__title {
		font-size: 46px;
	}

	.home-works__link {
		gap: 16px;
	}

	.home-works__link::after {
		width: 42px;
	}

}

@keyframes mobile-menu-item-in {
	from {
		opacity: 0;
		transform: translateY(16px);
	}

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

@media (prefers-reduced-motion: reduce) {
	.swiper-wrapper,
	.swiper-slide {
		transition-duration: 1ms !important;
	}

	.site-navigation.is-open .site-navigation__list li {
		opacity: 1;
		transform: none;
		animation: none;
	}
}

.site-footer__brand-description { max-width: 310px; margin: 22px 0 0; color: #606568; font-size: 13px; line-height: 1.8; }
@media (min-width: 1200px) {
 .site-navigation { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
 .site-navigation__list { gap: clamp(18px, 1.8vw, 32px); }
 .site-navigation__list a { font-size: 14px; letter-spacing: .025em; white-space: nowrap; }
}
@media (max-width: 1199px) { .site-footer__brand { grid-column: 1 / -1; } }
