/* R9A-54: desktop-only adaptation of Demo V5 using approved WordPress content. */
@media (min-width: 851px) {
	body.rp-pricing-page {
		--r9a54-page-width: 1220px;
		--r9a54-gutter: clamp(24px, 4vw, 52px);
	}
	body.rp-homepage {
		--r9a54-page-width: 1220px;
		--r9a54-gutter: clamp(24px, 4vw, 52px);
		background: #f7fafc;
	}

	body.rp-homepage .page-frame {
		width: min(var(--r9a54-page-width), calc(100% - 2 * var(--r9a54-gutter)));
		max-width: var(--r9a54-page-width);
	}

	/* Keep the real image logo, navigation, regional selector and URLs. */
	body.rp-homepage .site-header,
	body.rp-homepage.rp-us-market .site-header,
	body.rp-homepage.rp-us-market .site-header.is-scrolled {
		position: relative;
		inset: auto;
		z-index: 80;
		min-height: 86px;
		margin: 0;
		padding: 10px max(24px, calc((100vw - var(--r9a54-page-width)) / 2));
		gap: 20px;
		border: 0;
		border-bottom: 1px solid #dce7ee;
		background: #fff;
		color: #17385e;
		box-shadow: 0 3px 16px rgb(22 55 92 / 5%);
	}
	body.rp-homepage .brand { flex-shrink: 0; }
	body.rp-homepage .brand__complete-logo { width: clamp(190px, 20vw, 245px); }
	body.rp-homepage .rp-mobile-country-switcher { display: none !important; }
	body.rp-homepage .primary-nav {
		position: static;
		display: flex;
		flex: 1 1 auto;
		align-items: center;
		justify-content: flex-end;
		gap: clamp(10px, 1.45vw, 22px);
		min-width: 0;
		padding: 0;
		border: 0;
		background: transparent;
		box-shadow: none;
	}
	body.rp-homepage .primary-nav > a:not(.button) {
		min-height: 44px;
		color: #17385e;
		font-size: clamp(11px, .92vw, 13px);
		font-weight: 600;
	}
	body.rp-homepage .primary-nav .market-select-label { display: block; flex: 0 0 auto; }
	body.rp-homepage .primary-nav .market-select-label select {
		min-width: 126px;
		min-height: 42px;
		border-color: #c8d8e6;
		background: #fff;
		color: #17385e;
		font-size: 12px;
	}
	body.rp-homepage .primary-nav .button--nav {
		min-height: 43px;
		padding-inline: clamp(10px, 1vw, 15px);
		font-size: 12px;
		white-space: nowrap;
	}
	body.rp-homepage .menu-toggle { display: none; }

	/* Hero keeps the real desktop image, localized copy and real CTA destinations. */
	body.rp-homepage .hero {
		min-height: clamp(500px, 43vw, 565px);
		height: auto;
		max-height: none;
		align-items: center;
		background: #17385e;
	}
	body.rp-homepage .hero picture,
	body.rp-homepage .hero__image {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center 48%;
	}
	body.rp-homepage .hero__veil {
		background: linear-gradient(90deg, rgb(11 42 70 / 94%) 0%, rgb(18 62 99 / 80%) 48%, rgb(16 64 105 / 30%) 100%);
		opacity: 1;
	}
	body.rp-homepage .hero::before { display: none; }
	body.rp-homepage .hero__content {
		width: min(var(--r9a54-page-width), calc(100% - 2 * var(--r9a54-gutter)));
		margin-inline: auto;
		padding: 76px 0 88px;
	}
	body.rp-homepage .hero .eyebrow {
		max-width: 700px;
		margin-bottom: 17px;
		color: #dceaf5;
		font-size: 11px;
	}
	body.rp-homepage .hero h1 {
		max-width: 760px;
		margin: 0 0 18px;
		color: #fff;
		font-size: clamp(44px, 5vw, 68px);
		line-height: 1.08;
		letter-spacing: -.045em;
	}
	body.rp-homepage .hero h1 span { color: #fff; font: inherit; }
	body.rp-homepage .hero__promise {
		max-width: 620px;
		margin: 0 0 12px;
		color: #f0f6fb;
		font: 500 clamp(19px, 1.8vw, 24px)/1.5 var(--font-sans);
	}
	body.rp-homepage .hero__description {
		max-width: 580px;
		margin: 0;
		color: #e4eef6;
		font-size: 15px;
		line-height: 1.7;
	}
	body.rp-homepage .hero__actions { max-width: 720px; margin-top: 23px; gap: 12px; }
	body.rp-homepage .hero__actions .button { min-height: 48px; padding-inline: 20px; font-size: 14px; }
	body.rp-homepage .hero__actions .hero__secondary:not(.button) {
		flex-basis: auto;
		min-height: 48px;
		margin: 0 0 0 4px;
		color: #fff;
		text-shadow: none;
	}
	body.rp-homepage .hero__foot { bottom: 19px; color: #fff; }
	body.rp-homepage .hero__index { display: none !important; }
	body.rp-homepage .hero__image-note { top: auto; right: var(--r9a54-gutter); bottom: 48px; writing-mode: horizontal-tb; }

	/* Six genuine regional category cards, in the Demo V5 three-by-two grid. */
	body.rp-homepage .us-renovation-section,
	body.rp-homepage .us-style-section,
	body.rp-homepage .opportunities,
	body.rp-homepage .partner-value { padding-block: clamp(58px, 6.2vw, 78px); }
	body.rp-homepage .us-renovation-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
	body.rp-homepage .us-renovation-card {
		border: 1px solid #dce7ee;
		border-radius: 16px;
		background: #fff;
		box-shadow: 0 6px 20px rgb(22 54 83 / 4%);
	}
	body.rp-homepage .us-renovation-card__figure { aspect-ratio: 1.55; }
	body.rp-homepage .us-renovation-card__label { padding: 15px 18px 18px; }
	body.rp-homepage .us-renovation-card__label h3 { font-size: 18px; }

	/* Five real style cards; keep the existing arrows, keyboard support and snap. */
	body.rp-homepage .us-style-section { padding-block: clamp(58px, 6.2vw, 78px); }
	body.rp-homepage .us-style-gallery {
		max-width: 100%;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-ms-overflow-style: none;
		touch-action: pan-x pan-y;
	}
	body.rp-homepage .us-style-gallery::-webkit-scrollbar { display: none; }
	body.rp-homepage .us-style-track {
		display: flex;
		width: max-content;
		gap: 16px;
		padding: 3px 1px 10px;
	}
	body.rp-homepage .us-style-card {
		flex: 0 0 calc((min(100vw, var(--r9a54-page-width)) - 2 * var(--r9a54-gutter) - 48px) / 3.45);
		min-width: 0;
		aspect-ratio: 5 / 4;
		border: 1px solid #dce7ee;
		border-radius: 16px;
		scroll-snap-align: start;
	}
	body.rp-homepage .us-style-track.is-desktop-dragging {
		cursor: grabbing;
		scroll-snap-type: none;
		user-select: none;
		-webkit-user-select: none;
	}
	body.rp-homepage .us-style-gallery:not(.is-desktop-dragging) { cursor: grab; }
	body.rp-homepage .us-style-gallery img { -webkit-user-drag: none; }

	/* V5's left-image/right-copy showcase uses the existing dynamic project data. */
	body.rp-homepage .opportunity-stage {
		grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr);
		align-items: stretch;
		gap: clamp(28px, 4vw, 54px);
	}
	body.rp-homepage .opportunity-feature { min-height: clamp(390px, 38vw, 500px); }
	body.rp-homepage .opportunity-feature__figure { inset: 0; border-radius: 16px; }
	body.rp-homepage .opportunity-rail { justify-content: center; padding: 0; }
	body.rp-homepage .opportunity-context {
		padding: 12px 0;
		border-top: 0;
		border-bottom: 0;
	}
	body.rp-homepage .opportunity-context h4 { font-size: clamp(25px, 2.3vw, 32px); }
	body.rp-homepage .opportunity-feature__metrics { margin-top: 16px; }
	body.rp-homepage .sample-project-controls {
		min-height: 48px;
		margin-top: 22px;
		gap: 12px;
	}
	body.rp-homepage .sample-project-control {
		width: 44px;
		min-width: 44px;
		height: 44px;
		min-height: 44px;
		padding: 0;
		border: 1px solid #a9c0d3;
		border-radius: 50%;
		background: #fff;
		color: transparent;
		font-size: 0;
	}
	body.rp-homepage #sample-project-previous::before { content: "←"; color: #17385e; font-size: 19px; }
	body.rp-homepage #sample-project-next::before { content: "→"; color: #17385e; font-size: 19px; }
	body.rp-homepage .sample-project-control:hover { border-color: #17385e; background: #f1f6fa; }
	body.rp-homepage .sample-project-position { color: #17385e; font-weight: 700; }
	body.rp-homepage .desktop-project-progress {
		position: relative;
		display: inline-block;
		width: clamp(60px, 8vw, 100px);
		height: 2px;
		overflow: hidden;
		background: #d9e3eb;
		vertical-align: middle;
	}
	body.rp-homepage .desktop-project-progress > i {
		display: block;
		width: 0;
		height: 100%;
		background: #f47537;
		transition: width .2s ease;
	}

	/* Retain all current three-step process and human-review copy. */
	body.rp-homepage #partner-invitation {
		padding-block: clamp(46px, 5.5vw, 68px);
		border: 0;
		background: linear-gradient(115deg, #0e3b64, #155c9e);
		color: #fff;
	}
	body.rp-homepage .us-partner-cta__inner { align-items: center; gap: 34px; }
	body.rp-homepage .us-partner-cta__copy { max-width: 760px; }
	body.rp-homepage .us-partner-cta__copy .eyebrow,
	body.rp-homepage .us-partner-cta__copy h2,
	body.rp-homepage .us-partner-cta__copy > p:not(.eyebrow),
	body.rp-homepage .us-partner-cta__copy small { color: #fff; }
	body.rp-homepage .us-partner-cta__copy > p:not(.eyebrow) { color: #d6e5ef; }
	body.rp-homepage .us-partner-cta__copy small { opacity: .85; }
	body.rp-homepage .rp-partner-shortcuts { flex: 0 0 auto; gap: 10px; }
	body.rp-homepage .workflow { padding-block: clamp(58px, 6.2vw, 78px); }
	body.rp-homepage .network { padding-block: clamp(58px, 6.2vw, 78px); }
	body.rp-homepage .network__layout { grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); gap: clamp(34px, 5vw, 70px); }
	body.rp-homepage .partner-value__layout { grid-template-columns: minmax(290px, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 5vw, 76px); }
	body.rp-homepage .closing { min-height: 520px; }
	body.rp-homepage .closing__content { padding-block: 80px; }
	body.rp-homepage .site-footer {
		min-height: 112px;
		padding: 24px max(24px, calc((100vw - var(--r9a54-page-width)) / 2));
		gap: 24px;
		background: #edf4fa;
		color: #17385e;
	}
	body.rp-homepage .site-footer > p,
	body.rp-homepage .site-footer a,
	body.rp-homepage .site-footer .footer__copyright { color: #17385e; }
	body.rp-homepage .site-footer > p { max-width: 450px; margin: 0 auto 0 0; font-size: 12px; }
	body.rp-homepage .site-footer .footer-top { flex: 0 0 auto; }
	body.rp-homepage .wotoboom-contact { right: 25px; bottom: 25px; }

	/* Real production pricing content, never the Demo's placeholder prices. */
	body.rp-pricing-page .pricing-cards {
		width: min(var(--r9a54-page-width), calc(100% - 2 * var(--r9a54-gutter)));
		margin-inline: auto;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		align-items: stretch;
		gap: clamp(16px, 2vw, 24px);
	}
	body.rp-pricing-page .pricing-card {
		min-width: 0;
		border-radius: 16px;
		box-shadow: 0 8px 26px rgb(22 54 83 / 7%);
	}
	body.rp-pricing-page .pricing-mobile-unified { display: none; }
}

@media (min-width: 851px) and (max-width: 1190px) {
	body.rp-homepage .site-header { gap: 14px; }
	body.rp-homepage .brand__complete-logo { width: 205px; }
	body.rp-homepage .menu-toggle {
		width: 44px;
		height: 44px;
		min-height: 44px;
		flex: 0 0 44px;
		display: grid;
		place-items: center;
		border: 1px solid #c8d8e6;
		border-radius: 10px;
		background: #fff;
		color: #17385e;
	}
	body.rp-homepage .menu-toggle__icon,
	body.rp-homepage .menu-toggle__icon::before,
	body.rp-homepage .menu-toggle__icon::after { background: #17385e; }
	body.rp-homepage .primary-nav {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		z-index: 100;
		display: none;
		align-items: stretch;
		flex-direction: column;
		gap: 0;
		padding: 12px max(24px, calc((100vw - var(--r9a54-page-width)) / 2)) 20px;
		border-bottom: 1px solid #dce7ee;
		background: #fff;
		box-shadow: 0 12px 22px rgb(18 45 71 / 10%);
	}
	body.rp-homepage .primary-nav.is-open { display: flex; }
	body.rp-homepage .primary-nav > a:not(.button) { min-height: 44px; border-bottom: 1px solid #e7eef4; font-size: 14px; }
	body.rp-homepage .primary-nav .market-select-label { padding-block: 10px; }
	body.rp-homepage .primary-nav .market-select-label select { width: 100%; min-height: 44px; }
	body.rp-homepage .primary-nav .button--nav { width: 100%; margin-top: 8px; }
	body.rp-homepage .hero { min-height: 520px; }
	body.rp-homepage .hero h1 { max-width: 650px; font-size: clamp(42px, 5vw, 56px); }
	body.rp-homepage .us-style-card { flex-basis: clamp(250px, 38vw, 350px); }
	body.rp-homepage .opportunity-stage { grid-template-columns: minmax(0, 1fr) minmax(290px, .9fr); gap: 28px; }
	body.rp-homepage .opportunity-feature { min-height: 410px; }
	body.rp-homepage .network__layout,
	body.rp-homepage .partner-value__layout { gap: 30px; }
	body.rp-homepage .site-footer { flex-wrap: wrap; }
	body.rp-pricing-page .pricing-card { padding: 22px; }
	body.rp-pricing-page .pricing-card .button { min-width: 0; }
}

/* R9A-57: restore the R9A-49 desktop homepage Hero only. Mobile V4 remains frozen. */
@media (min-width: 851px) {
  body.rp-homepage .hero { min-height: 760px; height: 100svh; max-height: none; isolation: isolate; overflow: hidden; background: #e9f4fb; display: block; }
  body.rp-homepage .hero picture,
  body.rp-homepage .hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center center; }
  body.rp-homepage .hero__veil,
  body.rp-homepage.rp-us-market.rp-hktw-hk .hero__veil,
  body.rp-homepage.rp-us-market.rp-hktw-tw .hero__veil { background: linear-gradient(90deg, rgba(255,255,255,.23), transparent 60%); opacity: 1; }
  body.rp-homepage .hero::before { content: ""; position: absolute; z-index: 2; top: 0; left: 0; width: 116px; height: 7px; background: linear-gradient(120deg,#1c5b90 0 68%,#f47537 68%); transform: skew(-35deg); pointer-events: none; }
  body.rp-homepage .hero::after { content: none; }
  body.rp-homepage .hero__content { position: relative; inset: auto; z-index: 3; padding-top: clamp(148px,17vh,210px); padding-bottom: 160px; margin: 0 auto; width: 100%; }
  body.rp-homepage .hero .eyebrow { font-size: 11px; letter-spacing: .12em; color: #285378; margin-bottom: 22px; max-width: 580px; }
  body.rp-homepage .hero h1 { font-size: clamp(38px,4.1vw,66px); line-height: 1.08; font-weight: 700; letter-spacing: -.045em; max-width: 670px; color: #153658; margin: 0 0 23px; }
  body.rp-homepage .hero h1 span { color: inherit; font: inherit; }
  body.rp-homepage .hero__promise { font-size: clamp(18px,1.6vw,24px); line-height: 1.4; color: #234a6d; max-width: 540px; margin: 0 0 14px; font-family: var(--font-sans); font-weight: 500; }
  body.rp-homepage .hero__description { max-width: 485px; color: #264967; font-size: 15px; line-height: 1.65; margin: 0 0 25px; }
  body.rp-homepage .hero__actions { display: flex; gap: 12px; flex-wrap: wrap; max-width: 620px; align-items: center; margin-top: 0; }
  body.rp-homepage .hero__actions .button { font-size: 14px; min-height: 48px; padding-inline: 21px; }
  body.rp-homepage .hero__secondary:not(.button) { color: #16375c; font-size: 13px; }
  body.rp-homepage .rp-hero-pricing { background: #ffffffc7 !important; color: #16375c !important; border: 1px solid #9bb5cc !important; }
  body.rp-homepage .hero__foot { position: absolute; bottom: 22px; left: 0; right: 0; color: white; font-size: 11px; text-shadow: 0 1px 5px #132d46; }
  body.rp-homepage .hero__image-note { color: #fff; background: #17385eb3; padding: 5px 8px; font-size: 9px; bottom: 65px; top: auto; height: auto; writing-mode: horizontal-tb; letter-spacing: .08em; right: 24px; line-height: 1.4; }
  body.rp-homepage .hero__index { display: none !important; }
}
@media (min-width: 851px) and (max-width: 1200px) {
  body.rp-homepage .hero h1 { max-width: 570px; font-size: 48px; }
  body.rp-homepage .hero__content { padding-top: 150px; }
}
