/*
 * Ruwaaq Group — premium design layer (loaded after main.css).
 * Editorial typography, cinematic heroes, image-led cards, and the styles that make the Customizer options real.
 * Logical properties only (RTL-safe). Prefix: rg-
 */

/* ---------- Tokens driven by Customizer (see inc/design-options.php) ---------- */
:root {
	--rg-hscale: 1; --rg-hweight: 800; --rg-htrack: -0.01em; --rg-lh: 1.65; --rg-section-k: 1;
	--rg-page-bg: #fff; --rg-text: var(--rg-slate); --rg-nav-fs: 0.9375rem; --rg-hero-dim: 0.55;
	--rg-header-bg: #fff; --rg-footer-bg: var(--rg-navy);
}
body.rg-site { background: var(--rg-page-bg); color: var(--rg-text); line-height: var(--rg-lh); }
.rg-site h1, .rg-site h2, .rg-site h3, .rg-site h4 { font-weight: var(--rg-hweight); letter-spacing: var(--rg-htrack); }
.rg-site h1 { font-size: calc(clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem) * var(--rg-hscale)); }
.rg-site h2 { font-size: calc(clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem) * var(--rg-hscale)); }
.rg-site h3 { font-size: calc(clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem) * var(--rg-hscale)); }
.rg-section { padding-block: calc(var(--rg-section-y) * var(--rg-section-k)); }
.rg-section--alt { background: var(--rg-offwhite); }

/* Boxed layout */
@media (min-width: 1500px) {
	body.rg-layout--boxed { background: #e9edf5; }
	body.rg-layout--boxed #rg-main, body.rg-layout--boxed .rg-header, body.rg-layout--boxed .rg-footer { max-width: 1440px; margin-inline: auto; }
	body.rg-layout--boxed #rg-main { background: var(--rg-page-bg); box-shadow: var(--rg-shadow-lg); }
	body.rg-layout--boxed.rg-has-overlay-header .rg-header { inset-inline: 0; max-width: 1440px; margin-inline: auto; }
}

/* ---------- Buttons ---------- */
.rg-btn, .wp-block-button__link { font-weight: 700; letter-spacing: 0.01em; }
.wp-block-button.is-style-rg-primary .wp-block-button__link, .rg-btn--primary { box-shadow: 0 6px 18px color-mix(in srgb, var(--rg-primary) 35%, transparent); }
body.rg-btnhover--fill .rg-btn:hover, body.rg-btnhover--fill .wp-block-button__link:hover,
body.rg-btnhover--none .rg-btn:hover, body.rg-btnhover--none .wp-block-button__link:hover { transform: none; box-shadow: none; }
body.rg-btnhover--none .rg-btn, body.rg-btnhover--none .wp-block-button__link { transition: none; }
.rg-eyebrow--pill { display: inline-flex; padding: 7px 14px; border: 1px solid rgb(255 255 255 / 0.22); border-radius: 999px; background: rgb(255 255 255 / 0.08); color: var(--rg-accent-text) !important; margin-block-end: 20px !important; }

/* ---------- Header: layouts, height, menu, colours, dropdowns, mobile ---------- */
.rg-header__inner { min-height: var(--rg-header-h); }
@media (min-width: 1024px) {
	.rg-nav__list > li > a { font-size: var(--rg-nav-fs); }
	body.rg-nav--upper .rg-nav__list > li > a { text-transform: uppercase; letter-spacing: 0.06em; font-size: calc(var(--rg-nav-fs) - 0.0625rem); }
	body.rg-hl--centered .rg-header__inner { flex-wrap: wrap; justify-content: center; padding-block: 12px; }
	body.rg-hl--centered .rg-header__brand { flex: 0 0 100%; display: flex; justify-content: center; }
	body.rg-hl--centered .rg-panel { flex: 0 0 100%; }
	body.rg-hl--stacked .rg-header__inner { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand tools" "nav nav"; row-gap: 0; padding-block-start: 12px; }
	body.rg-hl--stacked .rg-header__brand { grid-area: brand; }
	body.rg-hl--stacked .rg-panel { display: contents; }
	body.rg-hl--stacked .rg-nav { grid-area: nav; justify-content: flex-start; border-block-start: 1px solid var(--rg-border); margin-block-start: 8px; }
	body.rg-hl--stacked .rg-header__tools { grid-area: tools; justify-self: end; }
}
body.rg-header-custom .rg-header::before { background: var(--rg-header-bg) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
body.rg-header-dark .rg-logo__name, body.rg-header-dark .rg-nav__list > li > a, body.rg-header-dark .rg-burger, body.rg-header-dark .rg-lang a, body.rg-header-dark .rg-nav__toggle { color: #fff; }
body.rg-header-dark .rg-header { border-color: rgb(255 255 255 / 0.12); }
@media (min-width: 1024px) {
	body.rg-dd--solid .rg-nav__sub { background: #fff !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
	body.rg-dd--dark .rg-nav__sub { background: var(--rg-navy) !important; border-color: rgb(255 255 255 / 0.14); -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
	body.rg-dd--dark .rg-nav__sub a { color: #fff; }
	body.rg-dd--dark .rg-nav__sub a:hover { background: rgb(255 255 255 / 0.1); color: var(--rg-accent-text); }
}
body.rg-mm--fullscreen .rg-panel { width: 100vw; }
@media (min-width: 1024px) { body.rg-mm--fullscreen .rg-panel { width: auto; } }
.rg-social--header { margin: 0; }
.rg-header .rg-social__link { border-color: var(--rg-border); color: var(--rg-navy); width: 40px; height: 40px; }
.rg-header .rg-social__link:hover { background: rgb(40 100 232 / 0.08); }
body.rg-header-dark .rg-header .rg-social__link { color: #fff; border-color: rgb(255 255 255 / 0.3); }
body.rg-has-overlay-header .rg-header:not(.is-scrolled) .rg-social__link { color: #fff; border-color: rgb(255 255 255 / 0.35); }

/* ---------- Hero (home: Cover block; divisions: image element) ---------- */
.rg-hero { padding-block: 0; }
.wp-block-cover.rg-hero { min-height: 0; padding: 0; align-items: stretch; }
.rg-hero--cover .wp-block-cover__inner-container { width: 100%; padding: 0; }
.rg-hero--cover .wp-block-cover__background { background: linear-gradient(90deg, rgb(5 11 22 / var(--rg-hero-dim)), rgb(5 11 22 / 0.15)) !important; opacity: 1 !important; }
.rg-hero--cover .wp-block-cover__image-background { object-fit: cover; }
.rg-hero__inner { padding-block: calc(var(--rg-header-h) + 56px) 72px; min-height: 80vh; align-content: center; }
body.rg-herosize--medium .rg-hero__inner { min-height: 0; }
body:not(.rg-has-overlay-header) .rg-hero__inner { padding-block-start: 72px; }
@media (min-width: 1024px) { .rg-hero__inner { padding-block-end: 112px; min-height: min(86vh, 860px); } body.rg-herosize--medium .rg-hero__inner { min-height: 0; } }
.rg-hero__title { font-size: calc(clamp(2.6rem, 1.5rem + 4.6vw, 5.25rem) * var(--rg-hscale)) !important; line-height: 1.04 !important; letter-spacing: -0.03em !important; max-width: 18ch; text-shadow: 0 2px 30px rgb(0 0 0 / 0.25); }
html[dir="rtl"] .rg-hero__title { letter-spacing: 0 !important; line-height: 1.3 !important; }
.rg-hero__title--sm { font-size: calc(clamp(2.25rem, 1.4rem + 3.4vw, 4rem) * var(--rg-hscale)) !important; max-width: 20ch; }
.rg-hero__lead { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); max-width: 52ch; color: #dbe5f3; }
.rg-hero__panel { align-self: center; max-width: 440px; justify-self: end; width: 100%; }
.rg-hero--division { position: relative; isolation: isolate; overflow: hidden; background: var(--rg-navy); }
.rg-hero--division::after { display: none; }
.rg-hero--division::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(5 11 22 / calc(var(--rg-hero-dim) + 0.15)), rgb(5 11 22 / 0.1)); opacity: 1; -webkit-mask-image: none; mask-image: none; }
.rg-hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.rg-hero--division .rg-hero__inner { min-height: min(70vh, 640px); }
.rg-hero--cover.rg-hero--dark::before, .rg-hero--cover.rg-hero--dark::after { display: none; }
.rg-panel__list a:hover { padding-inline-start: 6px; }

/* ---------- Sections ---------- */
.rg-section__head { max-width: 760px; }
.rg-section__head--spaced { margin-block: var(--rg-space-8) var(--rg-space-5); }
.rg-eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.rg-eyebrow:not(.rg-eyebrow--pill)::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; opacity: 0.8; }
.rg-hero .rg-eyebrow:not(.rg-eyebrow--pill)::before { display: none; }
.rg-about__grid { display: grid; gap: var(--rg-space-7); align-items: center; }
@media (min-width: 900px) { .rg-about__grid { grid-template-columns: 1.05fr 1fr; gap: var(--rg-space-8); } }
.rg-about__media, .rg-synergy__media { margin: 0; border-radius: var(--rg-r-xl); overflow: hidden; box-shadow: var(--rg-shadow-lg); aspect-ratio: 4 / 3; background: var(--rg-navy); }
.rg-about__media img, .rg-synergy__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rg-synergy__grid { display: grid; gap: var(--rg-space-7); align-items: center; }
@media (min-width: 900px) { .rg-synergy__grid { grid-template-columns: 0.95fr 1.05fr; gap: var(--rg-space-8); } }
.rg-points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: rgp; }
.rg-points li { counter-increment: rgp; position: relative; padding-block: 16px; padding-inline: 64px 18px; background: #fff; border: 1px solid var(--rg-border); border-radius: var(--rg-r-md); }
.rg-points li::before { content: counter(rgp, decimal-leading-zero); position: absolute; inset-inline-start: 16px; inset-block-start: 16px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--rg-navy); color: var(--rg-accent-text); font: 700 0.8125rem var(--rg-font-heading); }
.rg-points strong { display: block; color: var(--rg-navy); }
.rg-h3 { margin: 0; }
.rg-feature-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--rg-space-5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .rg-feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .rg-feature-grid { grid-template-columns: repeat(4, 1fr); } }
.rg-feature-grid li { display: flex; flex-direction: column; gap: 8px; padding: 26px; border-radius: var(--rg-r-lg); background: var(--rg-offwhite); border: 1px solid var(--rg-border); }
.rg-feature-grid strong { color: var(--rg-navy); font: 700 1.125rem var(--rg-font-heading); }
.rg-feature-grid li > span:last-child { color: var(--rg-muted); }
.rg-feature-grid__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, var(--rg-primary), color-mix(in srgb, var(--rg-primary) 55%, var(--rg-cyan))); color: var(--rg-on-primary); }
.rg-steps--dark li { color: var(--rg-muted-dark); }
.rg-steps--dark strong { color: #fff; }
.rg-steps--dark li::before { background: rgb(255 255 255 / 0.08); color: var(--rg-accent-text); border-color: rgb(255 255 255 / 0.2); }
.rg-contact-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.rg-contact-title { margin-block-start: 1.6em; }

/* ---------- Cards ---------- */
.rg-card { border-radius: calc(var(--rg-r-lg) + 4px); box-shadow: var(--rg-shadow-sm); }
.rg-card__body { padding: 28px; }
.rg-card__icon { width: 60px; height: 60px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--rg-primary) 14%, #fff), color-mix(in srgb, var(--rg-cyan) 18%, #fff)); }
.rg-card__title { font-size: 1.3125rem; }
body.rg-cardhover--lift .rg-card:hover, body.rg-cardhover--lift .rg-card:focus-within { transform: translateY(-6px); }
body.rg-cardhover--glow .rg-card:hover, body.rg-cardhover--glow .rg-card:focus-within { transform: none; box-shadow: 0 0 0 1px var(--rg-primary), 0 12px 40px color-mix(in srgb, var(--rg-primary) 30%, transparent); }
body.rg-cardhover--border .rg-card:hover, body.rg-cardhover--border .rg-card:focus-within { transform: none; box-shadow: none; border-color: var(--rg-primary); }
body.rg-cardhover--none .rg-card:hover, body.rg-cardhover--none .rg-card:focus-within { transform: none; box-shadow: var(--rg-shadow-sm); border-color: var(--rg-border); }
body.rg-imghover--none .rg-card:hover .rg-media img { transform: none; }
.rg-card--division { background: linear-gradient(180deg, #fff, var(--rg-offwhite)); }
.rg-card--division::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: 0; height: 4px; background: linear-gradient(90deg, var(--rg-primary), var(--rg-cyan)); transform: scaleX(0.25); transform-origin: left; transition: transform var(--rg-dur) var(--rg-ease); }
html[dir="rtl"] .rg-card--division::before { transform-origin: right; }
.rg-card--division:hover::before { transform: scaleX(1); }
.rg-card--project .rg-media { aspect-ratio: 4 / 3; position: relative; }
.rg-card--project .rg-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(5 11 22 / 0.7)); opacity: 0; transition: opacity var(--rg-dur) var(--rg-ease); }
.rg-card--project:hover .rg-media::after, .rg-card--project:focus-within .rg-media::after { opacity: 1; }
@media (min-width: 1024px) { body.rg-portfolio--2 .ruwaaq-block .rg-grid--3 { grid-template-columns: repeat(2, 1fr); } }
.rg-empty { background: linear-gradient(135deg, #fff, var(--rg-offwhite)); border-style: solid; border-radius: var(--rg-r-xl); padding: 56px 28px; }
.rg-filter { gap: 10px; flex-wrap: wrap; overflow: visible; }
.rg-chip { padding: 11px 20px; }
.rg-chip[aria-current="true"], .rg-chip.is-current { box-shadow: var(--rg-shadow-md); }

/* ---------- Dark sections ---------- */
.rg-section--dark { background: radial-gradient(800px 400px at 90% 0%, rgb(40 100 232 / 0.35), transparent 60%), var(--rg-navy); position: relative; }

/* ---------- Contact CTA band ---------- */
.rg-cta { position: relative; overflow: hidden; padding-block: 88px; isolation: isolate; }
.rg-cta::before { content: ""; position: absolute; inset-inline-end: -8%; inset-block: -40%; width: 52%; z-index: -1; background: conic-gradient(from 200deg at 30% 50%, rgb(66 191 209 / 0.35), rgb(40 100 232 / 0.1), transparent 60%); transform: skewX(-14deg); }
.rg-cta__title { font-size: clamp(2rem, 1.4rem + 2vw, 3rem) !important; max-width: 20ch; }
body.rg-cta--dark .rg-cta { background: var(--rg-navy); }
body.rg-cta--light .rg-cta { background: var(--rg-offwhite); color: var(--rg-navy); border-block: 1px solid var(--rg-border); }
body.rg-cta--light .rg-cta__title { color: var(--rg-navy) !important; }
body.rg-cta--light .rg-cta__text { color: var(--rg-muted); }
body.rg-cta--light .rg-cta .rg-eyebrow { color: var(--rg-link); }
body.rg-cta--light .rg-cta .rg-btn--light { background: var(--rg-primary); color: var(--rg-on-primary); }

/* ---------- Footer ---------- */
.rg-footer { background: var(--rg-footer-bg); position: relative; }
body.rg-footer--light .rg-footer { color: var(--rg-muted); border-block-start: 1px solid var(--rg-border); }
body.rg-footer--light .rg-footer a, body.rg-footer--light .rg-footer .rg-logo, body.rg-footer--light .rg-footer .rg-logo__name { color: var(--rg-navy); }
body.rg-footer--light .rg-footer__title { color: var(--rg-navy) !important; }
body.rg-footer--light .rg-footer a:hover { color: var(--rg-link); }
body.rg-footer--light .rg-footer__bar, body.rg-footer--light .rg-social__link { border-color: var(--rg-border); }
body.rg-footer--light .rg-footer .rg-footer__contact .rg-icon { color: var(--rg-link); }
@media (min-width: 1024px) {
	.rg-footer__cols { grid-template-columns: 1.5fr repeat(auto-fit, minmax(160px, 1fr)); }
	body.rg-fl--centered .rg-footer__cols { grid-template-columns: 1fr; text-align: center; justify-items: center; }
	body.rg-fl--centered .rg-footer__about { margin-inline: auto; }
	body.rg-fl--centered .rg-social, body.rg-fl--centered .rg-footer__list { justify-content: center; }
	body.rg-fl--centered .rg-footer__bar { justify-content: center; text-align: center; }
	body.rg-fl--minimal .rg-footer__cols { grid-template-columns: 1fr; padding-block-end: 24px; }
}
body.rg-fl--minimal .rg-footer { padding-block-start: 48px; }
.rg-footer__news input[type="email"], .rg-footer__news input[type="text"] { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--rg-r-sm); border: 1px solid rgb(255 255 255 / 0.25); background: rgb(255 255 255 / 0.08); color: #fff; }
.rg-footer__news input[type="submit"], .rg-footer__news button { min-height: 48px; margin-block-start: 10px; padding-inline: 20px; border: 0; border-radius: var(--rg-r-btn); background: var(--rg-primary); color: var(--rg-on-primary); font-weight: 700; cursor: pointer; }

/* ---------- Page title bar, layout options ---------- */
.rg-pagehead { background: linear-gradient(180deg, var(--rg-offwhite), #fff); padding-block: 56px; }
.rg-pagehead__title { font-size: calc(clamp(2.25rem, 1.5rem + 3vw, 3.75rem) * var(--rg-hscale)); }
body.rg-pagetitle--hidden .rg-pagehead, .rg-pagehead--plain { background: transparent; border-block-end: 0; padding-block: 40px 0; }
body.rg-single--wide { --rg-narrow: 960px; }
.rg-with-sidebar { display: grid; gap: var(--rg-space-7); }
@media (min-width: 1024px) { .rg-with-sidebar { grid-template-columns: minmax(0, 1fr) 320px; } }
.rg-sidebar { display: grid; gap: var(--rg-space-5); align-content: start; }
.rg-widget { padding: 24px; border: 1px solid var(--rg-border); border-radius: var(--rg-r-lg); background: #fff; }
.rg-widget__title { font: 700 1.125rem var(--rg-font-heading); margin: 0 0 12px; }
body.rg-blog--list .rg-grid--3 { grid-template-columns: 1fr; }
body.rg-blog--list .rg-card { flex-direction: row; }
body.rg-blog--list .rg-card .rg-media { flex: 0 0 38%; aspect-ratio: auto; }
@media (max-width: 639.98px) { body.rg-blog--list .rg-card { flex-direction: column; } body.rg-blog--list .rg-card .rg-media { flex-basis: auto; aspect-ratio: 16 / 10; } }

/* ---------- Accessibility and performance switches ---------- */
body.rg-a11y-focus :focus-visible { outline: 4px solid var(--rg-focus); outline-offset: 3px; box-shadow: 0 0 0 7px #fff; }
body.rg-a11y-underline .entry-content a:not(.wp-block-button__link), body.rg-a11y-underline .rg-prose a:not(.wp-block-button__link) { text-decoration: underline; }
body.rg-no-reveal .rg-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
body:not(.rg-woo-styled) .rg-woo .price, body:not(.rg-woo-styled) .rg-woo .woocommerce-Price-amount { color: inherit; }

/* Testimonials (logical properties: identical in LTR and RTL). */
.rg-testimonial { margin: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; padding: 28px; }
.rg-testimonial__quote { margin: 0; padding: 0; border: 0; font-size: 1.0625rem; line-height: 1.65; color: var(--rg-navy); }
.rg-testimonial__quote p { margin: 0; }
.rg-testimonial__quote p::before { content: "\201C"; }
.rg-testimonial__quote p::after { content: "\201D"; }
.rg-testimonial__who { display: flex; align-items: center; gap: 14px; }
.rg-testimonial__photo { inline-size: 52px; block-size: 52px; border-radius: 50%; object-fit: cover; flex: none; }
.rg-testimonial__text { display: flex; flex-direction: column; gap: 2px; }
.rg-testimonial__name { color: var(--rg-navy); }
.rg-testimonial__role { color: var(--rg-muted); font-size: 0.9375rem; }
