/* Rutba widgets — shared base. Scoped to .rtw*, uses logical properties (RTL/LTR native). */

body.rutba-page { background: var(--rt-bg); color: var(--rt-text); font-family: var(--rt-font-ar); margin: 0; }
html[lang^="en"] body.rutba-page { font-family: var(--rt-font-en); }
body.rutba-page .elementor-widget-container { min-inline-size: 0; }
.rtw-section { background: var(--rt-bg); }
.rtw-section--alt { background: var(--rt-surface-solid); }

.rtw { font-family: var(--rt-font-ar); color: var(--rt-text); line-height: 1.7; box-sizing: border-box; padding-block: clamp(48px, 8vw, 104px); padding-inline: var(--rt-space-4); position: relative; }
html[lang^="en"] .rtw { font-family: var(--rt-font-en); }
.rtw *, .rtw *::before, .rtw *::after { box-sizing: border-box; }
.rtw > * { max-inline-size: 1200px; margin-inline: auto; }
.rtw a { color: inherit; }
.rtw :focus-visible { outline: 2px solid var(--rt-primary); outline-offset: 3px; border-radius: 6px; }
.rtw .screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); inline-size: 1px; block-size: 1px; overflow: hidden; white-space: nowrap; }
[dir="rtl"] .rtw-icon--flip { transform: scaleX(-1); }
.rtw-icon { inline-size: 1.25em; block-size: 1.25em; flex: none; }
.rtw-sample-note { margin-block-start: var(--rt-space-4); text-align: center; font-size: .8rem; color: var(--rt-muted); }
.rtw-empty { text-align: center; color: var(--rt-muted); }

/* Section heading */
.rtw-head { margin-block-end: clamp(28px, 5vw, 56px); max-inline-size: 760px; }
.rtw-head--center { text-align: center; margin-inline: auto; }
.rtw-head__title { font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.25; font-weight: 700; margin: 0 0 var(--rt-space-3); letter-spacing: -.01em; }
.rtw-head__title em, .rtw-hero__title em { font-style: normal; background: linear-gradient(120deg, var(--rt-primary), var(--rt-primary-hover, var(--rt-primary))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rtw-head__text { margin: 0; color: var(--rt-muted); font-size: 1.1rem; }
.rtw-eyebrow { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 var(--rt-space-3); font-size: .85rem; font-weight: 600; letter-spacing: .04em; color: var(--rt-primary); }
.rtw-eyebrow--pill { padding: .35rem .9rem; border: 1px solid var(--rt-border); border-radius: var(--rt-radius-pill); background: var(--rt-surface); }

/* Buttons & links */
.rtw-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.4rem; border-radius: var(--rt-radius-md); font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform var(--rt-motion-fast) var(--rt-motion-ease), box-shadow var(--rt-motion-base) var(--rt-motion-ease), border-color var(--rt-motion-base); }
.rtw-btn--primary { background: var(--rt-primary); color: var(--rt-on-primary) !important; }
.rtw-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px var(--rt-glow); }
.rtw-btn--ghost { background: var(--rt-surface); border-color: var(--rt-border); color: var(--rt-text); }
.rtw-btn--ghost:hover { border-color: var(--rt-primary); }
.rtw-btn--block { inline-size: 100%; }
.rtw-btn.is-disabled { opacity: .6; cursor: default; pointer-events: none; }
.rtw-link { display: inline-flex; align-items: center; gap: .35rem; color: var(--rt-primary) !important; font-weight: 600; text-decoration: none; }
.rtw-link:hover { text-decoration: underline; }
.rtw-iconbtn { display: inline-flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; border-radius: var(--rt-radius-md); border: 1px solid var(--rt-border); background: var(--rt-surface); color: var(--rt-text); cursor: pointer; padding: 0; }
.rtw-iconbtn:hover { border-color: var(--rt-primary); }

/* Cards */
.rtw-card, .rtw-feature, .rtw-plan, .rtw-case, .rtw-review, .rtw-result, .rtw-stat, .rtw-sub__card, .rtw-auth__card, .rtw-meter { background: var(--rt-surface); border: 1px solid var(--rt-border); border-radius: var(--rt-radius-lg); box-shadow: var(--rt-shadow-card); backdrop-filter: blur(10px); }

/* Reveal on scroll: only below-the-fold elements start hidden (no flash for visible ones). */
[data-rtw-reveal].is-pending { opacity: 0; transform: translateY(16px); }
[data-rtw-reveal] { transition: opacity .6s var(--rt-motion-ease), transform .6s var(--rt-motion-ease); transition-delay: calc(var(--rtw-i, 0) * 70ms); }
@media (prefers-reduced-motion: reduce) {
	[data-rtw-reveal], [data-rtw-reveal].is-pending { opacity: 1; transform: none; transition: none; }
}

/* Long-form text (legal pages, blog, case studies) */
.rtw-legal, .rtw-prose { color: var(--rt-text); line-height: 1.9; font-size: 1.05rem; }
.rtw-legal h1, .rtw-prose h1 { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.2; margin-block: 0 var(--rt-space-6); }
.rtw-legal h2, .rtw-prose h2 { font-size: 1.5rem; margin-block: var(--rt-space-8) var(--rt-space-3); }
.rtw-legal p, .rtw-legal li, .rtw-prose p, .rtw-prose li { color: var(--rt-muted); }
.rtw-legal a, .rtw-prose a { color: var(--rt-primary); }
.rtw-legal .rtw-draft-note { padding: var(--rt-space-4); border: 1px dashed var(--rt-warning); border-radius: var(--rt-radius-md); color: var(--rt-warning); }
.rtw-main { background: var(--rt-bg); color: var(--rt-text); font-family: var(--rt-font-ar); min-block-size: 60vh; padding: clamp(40px, 7vw, 96px) var(--rt-space-4); }
html[lang^="en"] .rtw-main { font-family: var(--rt-font-en); }
.rtw-main__in { max-inline-size: 820px; margin-inline: auto; }
.rtw-main__in--wide { max-inline-size: 1100px; }
.rtw-main img { max-inline-size: 100%; block-size: auto; border-radius: var(--rt-radius-lg); }
.rtw-postlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--rt-space-4); list-style: none; padding: 0; margin: var(--rt-space-8) 0 0; }
.rtw-postlist article { background: var(--rt-surface); border: 1px solid var(--rt-border); border-radius: var(--rt-radius-lg); padding: var(--rt-space-6); }
.rtw-postlist h2 { font-size: 1.15rem; margin: 0 0 .5rem; } .rtw-postlist a { text-decoration: none; color: var(--rt-text); }
.rtw-postlist p { color: var(--rt-muted); margin: 0; }

/* Forms (shared by auth widget) */
.rtw-field { display: grid; gap: .35rem; margin-block-end: var(--rt-space-4); }
.rtw-field label { font-weight: 600; font-size: .92rem; }
.rtw-field input[type="text"], .rtw-field input[type="email"], .rtw-field input[type="password"], .rtw-field input[type="url"] { inline-size: 100%; padding: .8rem 1rem; border-radius: var(--rt-radius-md); border: 1px solid var(--rt-border); background: var(--rt-bg); color: var(--rt-text); font: inherit; }
.rtw-field input:focus { border-color: var(--rt-primary); outline: none; box-shadow: 0 0 0 3px var(--rt-glow); }
.rtw-field small { color: var(--rt-muted); }
.rtw-field--row { display: flex; align-items: center; justify-content: space-between; gap: var(--rt-space-3); }
.rtw-check { display: flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 400 !important; min-height: 44px; } /* 44px: a comfortable tap target on phones */
.rtw-check input[type="checkbox"] { flex: none; width: 1.3rem; height: 1.3rem; accent-color: var(--rt-primary); }
.rtw-form__error { color: var(--rt-danger); margin: 0 0 var(--rt-space-3); font-size: .92rem; }
.rtw-form__ok { color: var(--rt-success); margin: 0 0 var(--rt-space-3); font-size: .92rem; }
