/* Webnaa demos — shared base. Every rule is scoped under body.wd; each demo themes it through the
   --wd-* variables in its own stylesheet (assets/demos/{key}.css). */

.wd {
	--wd-bg: #fff;
	--wd-ink: #111;
	--wd-muted: rgba(17, 17, 17, .64);
	--wd-line: rgba(17, 17, 17, .12);
	--wd-accent: #446e7d;
	--wd-accent-ink: #fff;
	--wd-font: system-ui, sans-serif;
	--wd-display: var(--wd-font);
	--wd-radius: 12px;
	--wd-field-bg: #fff;
	--wd-field-line: #c3cacd;
	--wd-field-focus: var(--wd-accent);
	--wd-header-h: 76px;
	--wd-max: 1240px;
	--wd-gutter: clamp(20px, 4vw, 40px);
	--wd-ease: cubic-bezier(.22, .61, .36, 1);
	margin: 0;
	background: var(--wd-bg);
	color: var(--wd-ink);
	font-family: var(--wd-font);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}
html:has(body.wd) { scroll-behavior: smooth; scroll-padding-top: calc(var(--wd-header-h, 76px) + 12px); }
.wd *, .wd *::before, .wd *::after { box-sizing: border-box; }
.wd :where(h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd) { margin: 0; }
.wd :where(ul, ol) { padding: 0; list-style: none; }
.wd img { display: block; max-width: 100%; height: auto; }
.wd a { color: inherit; text-decoration: none; }
.wd button { font: inherit; color: inherit; }
.wd :focus-visible { outline: 2px solid var(--wd-accent); outline-offset: 3px; }
.wd .wd-ico { width: 1.25em; height: 1.25em; flex-shrink: 0; }
[dir="rtl"] .wd .wd-ico--dir, [dir="rtl"].wd .wd-ico--dir { transform: scaleX(-1); }
.wd-wrap { width: 100%; max-width: calc(var(--wd-max) + 2 * var(--wd-gutter)); margin-inline: auto; padding-inline: var(--wd-gutter); }
.wd-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wd-skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--wd-ink); color: var(--wd-bg); border-radius: 8px; }
.wd-skip:focus { top: 12px; }

/* ---------- Reveal on scroll (set by core.js; everything is visible without JS) ---------- */
.wd-js [data-r] { opacity: 0; transform: translate3d(0, 26px, 0); transition: opacity .8s var(--wd-ease), transform .9s var(--wd-ease); transition-delay: calc(var(--d, 0) * 90ms); }
.wd-js [data-r="fade"] { transform: none; }
.wd-js [data-r="left"] { transform: translate3d(-34px, 0, 0); }
.wd-js [data-r="right"] { transform: translate3d(34px, 0, 0); }
.wd-js [data-r="zoom"] { transform: scale(.96); }
.wd-js [data-r].is-in { opacity: 1; transform: none; }
.wd-js [data-r="img"] { opacity: 1; transform: none; }
.wd-js [data-r="img"] > img { clip-path: inset(0 0 100% 0); transform: scale(1.08); transition: clip-path 1.2s var(--wd-ease), transform 1.6s var(--wd-ease); }
.wd-js [data-r="img"].is-in > img { clip-path: inset(0 0 0 0); transform: none; }
@media (max-width: 767px) {
	.wd-js [data-r] { transform: translate3d(0, 16px, 0); transition-duration: .6s; }
	.wd-js [data-r="left"], .wd-js [data-r="right"] { transform: translate3d(0, 16px, 0); }
}

/* ---------- Mobile menu (open state toggled by core.js) ---------- */
.wd-menu-open { overflow: hidden; }

/* ---------- FAQ (native <details>) ---------- */
.wd details > summary { list-style: none; cursor: pointer; }
.wd details > summary::-webkit-details-marker { display: none; }
.wd details .wd-faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--wd-ease); }
.wd details[open] .wd-faq__a { grid-template-rows: 1fr; }
.wd details .wd-faq__a > div { overflow: hidden; }

/* ---------- Forms: base behavior; each demo styles the look ---------- */
.wd-form { position: relative; }
.wd-form__grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .wd-form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wd-field--wide { grid-column: 1 / -1; } }
.wd-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wd-field label { font-size: 14px; line-height: 20px; font-weight: 600; }
.wd-field label span { color: var(--wd-accent); }
.wd-field :is(input, select, textarea) {
	width: 100%; min-height: 52px; margin: 0; padding: 13px 16px; border: 2px solid var(--wd-field-line); border-radius: var(--wd-radius);
	background: var(--wd-field-bg); color: var(--wd-ink); font: inherit; font-size: 15px; line-height: 22px; outline: none;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: border-color .2s, box-shadow .2s, background-color .2s; appearance: none;
}
.wd-field textarea { min-height: 128px; resize: vertical; }
.wd-field select { padding-inline-end: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 18px; background-position: right 16px center; }
[dir="rtl"] .wd-field select { background-position: left 16px center; }
.wd-field ::placeholder { color: var(--wd-muted); opacity: .75; }
.wd-field :is(input, select, textarea):hover { border-color: color-mix(in srgb, var(--wd-field-line), var(--wd-ink) 18%); }
.wd-field :is(input, select, textarea):focus { border-color: var(--wd-field-focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--wd-field-focus) 16%, transparent); }
.wd-field.is-invalid :is(input, select, textarea) { border-color: #c2413b; }
.wd-field.is-invalid :is(input, select, textarea):focus { box-shadow: 0 0 0 4px rgba(194, 65, 59, .14); }
.wd-field__err { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 500; color: #b42318; }
.wd-field__err::before { content: "!"; display: inline-grid; place-items: center; flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%; background: #b42318; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.wd-field__err[hidden] { display: none; }
.wd-form__submit { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; margin-top: 24px; padding: 0 28px; border: 0; cursor: pointer; transition: background-color .25s, color .25s, transform .25s var(--wd-ease), box-shadow .25s; }
.wd-form__submit .wd-ico { transition: transform .3s var(--wd-ease); }
.wd-form__submit:hover .wd-ico { transform: translateX(4px); }
[dir="rtl"] .wd-form__submit:hover .wd-ico { transform: scaleX(-1) translateX(4px); }
.wd-form__submit[disabled] { cursor: progress; opacity: .75; }
.wd-form__submit.is-busy::after { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: wd-spin .7s linear infinite; }
.wd-form__submit.is-busy .wd-ico { display: none; }
@keyframes wd-spin { to { transform: rotate(360deg); } }
.wd-form__done { display: flex; gap: 16px; align-items: flex-start; margin-top: 20px; padding: 20px; border-radius: var(--wd-radius); background: color-mix(in srgb, var(--wd-accent) 10%, transparent); outline: none; animation: wd-pop .5s var(--wd-ease); }
.wd-form__done[hidden] { display: none; }
.wd-form__done-ico { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--wd-accent); color: var(--wd-accent-ink); }
.wd-form__done-title { font-weight: 700; font-size: 17px; }
.wd-form__done-text { margin-top: 4px !important; font-size: 14px; color: var(--wd-muted); }
@keyframes wd-pop { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Demo bar (floating, bottom) ---------- */
body.wd > footer { padding-bottom: 84px; }
.wd-bar {
	position: fixed; z-index: 90; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
	display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 24px); padding: 7px 7px 7px 10px;
	border-radius: 999px; background: linear-gradient(135deg, #4d7a8a 0%, #446e7d 55%, #3b6170 100%); color: #fff;
	box-shadow: 0 10px 30px -8px rgba(20, 45, 55, .55), 0 0 0 1px rgba(255, 255, 255, .12) inset;
	font-family: "IBM Plex Sans Arabic", "Readex Pro", system-ui, sans-serif; font-size: 14px; line-height: 20px; white-space: nowrap;
	animation: wd-bar-in .7s var(--wd-ease) .6s both;
}
[dir="rtl"] .wd-bar { padding: 7px 10px 7px 7px; }
@keyframes wd-bar-in { from { opacity: 0; transform: translate(-50%, 24px); } }
.wd-bar__brand { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; flex-shrink: 0; transition: transform .25s var(--wd-ease); }
.wd-bar__brand:hover { transform: scale(1.06); }
.wd-bar__brand img { width: 22px; height: 22px; }
.wd-bar__text { font-weight: 600; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; }
.wd-bar__back { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 999px; background: #fff; color: #2f5563 !important; font-weight: 600; transition: background-color .2s, transform .25s var(--wd-ease); }
.wd-bar__back:hover { background: #eef4f6; }
.wd-bar__back .wd-ico { width: 18px; height: 18px; transition: transform .25s var(--wd-ease); }
.wd-bar__back:hover .wd-ico { transform: translateX(-3px); }
[dir="rtl"] .wd-bar__back:hover .wd-ico { transform: scaleX(-1) translateX(-3px); }
@media (max-width: 480px) {
	.wd-bar { gap: 10px; font-size: 13px; }
	.wd-bar__back { padding: 0 12px; }
}
@media (max-width: 360px) { .wd-bar__back span { display: none; } }

/* ---------- Floating WhatsApp / call ---------- */
.wd-float { position: fixed; z-index: 89; inset-inline-end: 18px; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 66px); display: flex; flex-direction: column; gap: 12px; }
.wd-float__btn { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff !important; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .35); transition: transform .3s var(--wd-ease), box-shadow .3s; }
.wd-float__btn:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 14px 28px -8px rgba(0, 0, 0, .4); }
.wd-float__btn .wd-ico { width: 28px; height: 28px; }
.wd-float__btn--wa { background: #25d366; }
.wd-float__btn--wa .wd-ico { width: 30px; height: 30px; }
.wd-float__btn--call { background: var(--wd-accent); color: var(--wd-accent-ink) !important; }
.wd-float__btn--call .wd-ico { width: 24px; height: 24px; }
@media (max-width: 767px) {
	.wd-float { inset-inline-end: 14px; gap: 10px; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 62px); }
	.wd-float__btn { width: 48px; height: 48px; }
	.wd-float__btn .wd-ico { width: 24px; height: 24px; }
	.wd-float__btn--wa .wd-ico { width: 26px; height: 26px; }
}

/* ---------- Marquee ---------- */
.wd-marquee { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.wd-marquee__track { display: flex; flex-shrink: 0; min-width: 100%; justify-content: space-around; gap: 48px; padding-inline-end: 48px; animation: wd-marquee 38s linear infinite; }
[dir="rtl"] .wd-marquee__track { animation-name: wd-marquee-rtl; }
@keyframes wd-marquee { to { transform: translateX(-100%); } }
@keyframes wd-marquee-rtl { to { transform: translateX(100%); } }
.wd-marquee:hover .wd-marquee__track { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
	html:has(body.wd) { scroll-behavior: auto; }
	.wd *, .wd *::before, .wd *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.wd-js [data-r], .wd-js [data-r="img"] > img { opacity: 1; transform: none; clip-path: none; }
}
