/* R-Build – fixes on the pages built in Impreza's page builder (client meeting of 30 Oct 2026). */

/* ---------- Paragraphs are justified across the site ----------
   Body-size paragraphs only (marked by rb-tweaks.js): headlines set as paragraphs in the page builder
   would open wide gaps between words. */
.l-main p.rb-justify { text-align: justify; text-justify: inter-word; -webkit-hyphens: auto; hyphens: auto; }

/* ---------- Header on phones, logged in ----------
   Below 601px WordPress's toolbar scrolls away with the page, but Impreza keeps the fixed header 46px down: a gap
   opened above it once you scrolled. Visitors have no toolbar, so they never saw this. */
@media (max-width: 600px) {
	.admin-bar .l-header.pos_fixed.sticky { top: 0 !important; }
}

/* ---------- Home hero ---------- */
/* Its navy diagonal ran past the bottom edge and covered the numbers below on shorter screens. */
.home .l-main > .l-section:first-child { overflow: hidden; }
/* Less space between the header and the hero (the builder's spacer is 200px). */
.home .l-main > .l-section:first-child .w-separator.size_custom.hide_on_tablets { height: 136px !important; }
/* The builder made the hero a full-screen section, which left a tall empty band under the photo on large
   screens and tablets: the hero now ends a section's spacing below its photo. */
.home .l-main > .l-section.full_height:first-child { min-height: 0 !important; }
/* The second selector outranks Impreza's own rule that sets no padding under a transparent header. */
.home .l-main > .l-section:first-child > .l-section-h,
.home .l-header.bg_transparent ~ .l-main > .l-section.width_full.height_auto:first-child > .l-section-h { padding-bottom: var(--rb-hero-after, 64px) !important; }
/* The client's photo of the showroom (inc/rb-home-footer.php), in the frame of the render it replaces. */
.rb-home-photo { display: block; width: 100%; height: auto; aspect-ratio: 1.6; object-fit: cover; }
/* "ONE STOP, All Solutions": two lines, the first in the heaviest weight. */
.rb-home-title { margin: 0; padding: 0; font-family: inherit; font-size: clamp(38px, calc(20px + 2.4vw), 58px); font-weight: 900; line-height: 1.06; letter-spacing: 0; text-transform: none; color: inherit; }
.rb-home-title span { display: block; }
.rb-home-title span + span { font-weight: 400; }

/* Full-width rows reach 24px past the screen edge (the builder's column margins), so the page scrolled sideways on
   computers. clip, unlike hidden, keeps the sticky header working. */
.home .l-main > .l-section.width_full { overflow-x: clip; }

/* ---------- Home: Our Brands, within the content width ---------- */
/* Above the section's decorative grey triangle, which is positioned and would otherwise cover the logos. */
.rb-home-brands { position: relative; z-index: 1; max-width: 1140px; margin: 0 auto; }

/* ---------- Footer: "PART OF" above the Al-Rashed Holdings logo ---------- */
.rb-part-of { margin: 0 0 4px !important; font-size: 12.8px; font-weight: 700; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
/* The Company and Solutions columns had different line spacing in the builder (0.5rem and 1rem). */
.l-footer .w-menu.for_simple_menu.layout_ver { --main-gap: .6rem !important; }

@media (max-width: 1024px) {
	.home { --rb-hero-after: 48px; }
}
@media (max-width: 600px) {
	.home { --rb-hero-after: 40px; }
}

/* ---------- Client and brand logos: not links, a gentle zoom on hover ---------- */
.w-grid .w-post-elm.post_image a[href*="/portfolio/"] { pointer-events: none; }
.w-grid .w-post-elm.post_image:has(> a[href*="/portfolio/"], > a:not([href])) img { transition: transform .3s ease; }
.w-grid .w-post-elm.post_image:has(> a[href*="/portfolio/"], > a:not([href])):hover img { transform: scale(1.1); }
.w-grid .w-post-elm.post_image > a:not([href]) { cursor: default; }

@media (prefers-reduced-motion: reduce) {
	.w-grid .w-post-elm.post_image img { transition: none !important; }
}
