﻿/* ملف جديد: تنسيق فيديو مراحل الفحص بأول الرئيسية وورقة التقرير (Shared/ScrollShowcase.razor). منقول من النسخة المعتمدة متل ما هو،
   والتغييرات الوحيدة: خطوط الموقع، ارتفاع القسم تحت الهيدر، وحذف اللوغو بالزاوية وأداة المعاينة */

/* (from the approved preview) Layout: a dark loading screen lifts onto one white screen: the logo in the corner, one big stage title on top, the car in the middle, a scroll cue and the stage progress along the bottom; each scroll plays a whole stage (forward or back) and the car rests on a sharp still, then the printed-report sheet follows. Single light look: the footage itself is white. */
.khsc-host {
  --kh-green: #5BE11E;   /* --pr-color on the site */
  --kh-ink: #002221;     /* --sec-color on the site */
  --kh-text: #0F2524;
  --kh-muted: #4F6764;
  --kh-line: #DCE7E4;
  --kh-tint: #F0F8EB;
  --kh-paper: #FFFFFF;
  --kh-green-text: #3BA811;   /* the brand green darkened for words on white (3.1:1, large text) */
  --kh-night-muted: #9DB7B3;  /* secondary text on the dark loading screen */
  color: var(--kh-text);
  font-family: var(--kh-reg);
}
/* the page keeps its scrollbar room while it is locked, so nothing jumps sideways */
html:has(.khsc-host) { scrollbar-gutter: stable; }
/* the page stays on the showcase until the last stage has played */
html.kh-locked { overflow: hidden; overscroll-behavior: none; }
.khsc-host .kh-gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- scroll showcase: opens the page ---------- */
/* one screen tall: scrolling plays the stages instead of moving the page */
/* site: the header sits above the showcase, so the showcase is one screen minus the header (--khsc-top is measured in script).
   isolation keeps its layers under the header's mobile menu */
.khsc { position: relative; isolation: isolate; background: var(--kh-paper); height: calc(100vh - var(--khsc-top, 0px)); }
@supports (height: 100svh) { .khsc { height: calc(100svh - var(--khsc-top, 0px)); } }
.khsc-pin { height: 100%; overflow: hidden; }
.khsc-wrap { position: relative; box-sizing: border-box; width: min(1240px, 100%); height: 100%; margin-inline: auto; display: flex; flex-direction: column; padding-block: clamp(24px, 6vh, 64px) clamp(18px, 4vh, 40px); gap: clamp(10px, 2.5vh, 28px); }

/* one large title and one short line per stage, centred above the car */
.khsc-copy { flex: none; min-width: 0; }
.khsc-texts { display: grid; text-align: center; }
.khsc-text { grid-area: 1 / 1; min-width: 0; visibility: hidden; transition: visibility 0s linear .35s; }
.khsc-text.is-on { visibility: visible; transition: visibility 0s; }
.khsc-text h2 { margin: 0; font: 400 clamp(30px, 2.6vw + 16px, 60px)/1.2 var(--kh-bold); color: var(--kh-ink); text-wrap: balance; }
.khsc-text h2 em { font-style: normal; color: var(--kh-green-text); }
/* words rise out of a blur one after another (their order is set in script); on the way out they fade together */
.khsc-text .w { display: inline-block; opacity: 0; transform: translateY(.45em); filter: blur(8px); transition: opacity .25s ease, transform .3s ease, filter .25s ease; }
.khsc-text.is-on .w { opacity: 1; transform: none; filter: blur(0); transition: opacity .45s ease, transform .7s cubic-bezier(.2, .8, .2, 1), filter .5s ease; transition-delay: calc(.15s + var(--i) * 75ms); }
.khsc-text p { margin: 10px auto 0; font: 400 clamp(14px, .2vw + 13px, 16px)/1.7 var(--kh-reg); color: var(--kh-muted); max-width: 48ch; text-wrap: pretty; opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.khsc-text.is-on p { opacity: 1; transform: none; transition: opacity .5s ease, transform .6s ease; transition-delay: calc(.35s + var(--n, 3) * 75ms); }

/* the car takes all the room that is left; its size is fitted in script */
.khsc-film { flex: 1 1 auto; min-height: 0; position: relative; display: grid; place-items: center; }
.khsc-media { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--kh-paper); overflow: hidden; }
.khsc-cam { position: absolute; inset: 0; transform-origin: 50% 60%; }
/* two players take turns so the next clip is ready on the picture already showing */
.khsc-cam > video, .khsc-cam > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; opacity: 0; }
.khsc-cam > video { background: var(--kh-paper); }
.khsc-cam > .on { opacity: 1; }
/* a sharp still of the pose where the car stops fades in over the last video frame, and steps aside the moment the car moves again */
.khsc-cam > img { z-index: 1; transition: opacity .15s ease; }
.khsc-cam > img.on { transition: opacity .4s ease; }
.khsc-media.is-stills .khsc-cam > img { transition-duration: .45s; }

/* light motion while the car rests, one kind per stop. Every effect is screen-blended light, so the white around the car stays
   white and only the car itself catches it; all of it fades out the moment the car moves. */
.khsc-fx { position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity .2s ease; }
.khsc-fx::before { content: ""; position: absolute; }
.khsc-film[data-rest="1"] .fx-sheen, .khsc-film[data-rest="4"] .fx-sheen, .khsc-film[data-rest="3"] .fx-lamp { opacity: 1; transition: opacity .9s ease .7s; }
/* stops 1 and 4: a soft showroom reflection glides across the body every few seconds */
.fx-sheen { mix-blend-mode: overlay; }   /* a gloss: lifts the paint, leaves tyres and glass dark */
.fx-sheen::before { inset: -10% 0; background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, .7) 50%, transparent 60%); transform: translateX(70%); }
.khsc-film[data-rest="1"] .fx-sheen::before, .khsc-film[data-rest="4"] .fx-sheen::before { animation: khsheen 6.5s ease-in-out 1s infinite; }
@keyframes khsheen { 0% { transform: translateX(70%); } 30%, 100% { transform: translateX(-70%); } }
/* stop 3 (what the eye cannot see): an inspection lamp roams over the paint scan */
.fx-lamp::before { top: 22%; left: 0; width: 34%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(150, 255, 235, .6), rgba(70, 200, 255, .24) 55%, transparent); transform: translate(180%, 6%); }
.khsc-film[data-rest="3"] .fx-lamp::before { animation: khlamp 10s ease-in-out .6s infinite alternate; }
@keyframes khlamp { 0% { transform: translate(180%, 6%); } 50% { transform: translate(100%, -8%); } 100% { transform: translate(18%, 8%); } }
.khsc.is-away .khsc-fx::before, .khsc.is-away .khsc-intro::before { animation-play-state: paused; }

.kh-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* the corner logo of the preview is not used: the site header shows the logo */
.khload-logo svg { display: block; width: 100%; height: 100%; }

/* invitation shown before the visitor scrolls */
.khsc-intro { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 16px; text-align: center; pointer-events: none; transition: opacity .6s ease .15s, transform .6s ease .15s, visibility 0s; }
.khsc-intro.is-off { opacity: 0; transform: translateY(-18px); visibility: hidden; transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s; }
.khsc-intro h1 { margin: 0; display: grid; justify-items: center; gap: clamp(2px, 1vh, 10px); color: var(--kh-ink); }
.khsc-intro-pre { font: 400 clamp(18px, .9vw + 14px, 28px)/1.3 var(--kh-reg); color: var(--kh-muted); }
.khsc-intro-main { font: 400 clamp(44px, 4.6vw + 18px, 100px)/1.1 var(--kh-bold); }
.khsc-intro-main em { font-style: normal; color: var(--kh-green); }
.khsc-intro::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: min(1100px, 130%); aspect-ratio: 2; margin: calc(min(1100px, 130%) / -4) 0 0 calc(min(1100px, 130%) / -2); pointer-events: none; background: radial-gradient(closest-side at 45% 52%, rgba(91, 225, 30, .15), rgba(91, 225, 30, .07) 45%, rgba(91, 225, 30, .02) 75%, transparent); animation: khaura 13s ease-in-out infinite alternate; }
@keyframes khaura { from { transform: translateX(-5%) rotate(-3deg) scale(1); } to { transform: translateX(5%) rotate(3deg) scale(1.1); } }
.khsc-intro.is-off::before { animation-play-state: paused; }
.khsc-mouse { flex: none; box-sizing: content-box; width: 22px; height: 34px; color: var(--kh-ink); border: 2px solid currentColor; border-radius: 12px; position: relative; }
.khsc-mouse::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--kh-green); animation: khwheel 1.5s ease-in-out infinite; }
@keyframes khwheel { 60% { transform: translateY(9px); opacity: 0; } 61% { transform: none; opacity: 0; } }

/* scroll cue under the car: says what the next scroll does, shown whenever the car is at rest */
.khsc-cue { flex: none; align-self: center; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 40px; box-sizing: border-box; padding: 6px 18px; border-radius: 999px; background: var(--kh-tint); font: 400 clamp(14px, .2vw + 13px, 16px)/1.4 var(--kh-bold); color: var(--kh-ink); opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease; }
.khsc-cue.is-on { opacity: 1; transform: none; transition: opacity .5s ease .45s, transform .5s ease .45s; }
html.kh-loading .khsc-cue { opacity: 0; transition: none; }
.khsc-chev { flex: none; position: relative; width: 16px; height: 22px; }
.khsc-chev::before, .khsc-chev::after { content: ""; position: absolute; left: 3px; width: 9px; height: 9px; border-right: 2.5px solid var(--kh-green-text); border-bottom: 2.5px solid var(--kh-green-text); transform: rotate(45deg); animation: khchev 1.5s ease-in-out infinite; }
.khsc-chev::before { top: 0; }
.khsc-chev::after { top: 7px; animation-delay: .18s; }
@keyframes khchev { 0%, 100% { opacity: .15; translate: 0 -3px; } 50% { opacity: 1; translate: 0 3px; } }
@media (pointer: coarse) { .khsc-mouse { display: none; } }

/* scroll progress along the bottom of the section; the glowing head marks where the visitor is */
.khsc-bar { flex: none; position: relative; height: 3px; margin-inline: clamp(0px, 4vw, 40px); border-radius: 3px; background: rgba(91, 225, 30, .18); }
.khsc-bar::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(to left, var(--kh-green), #3FB80F); transform-origin: right center; transform: scaleX(var(--sp, 0)); }
.khsc-bar::after { content: ""; position: absolute; top: 50%; right: calc(var(--sp, 0) * 100%); width: 11px; height: 11px; margin: -5.5px -5.5px 0 0; border-radius: 50%; background: var(--kh-green); box-shadow: 0 0 0 3px rgba(91, 225, 30, .25), 0 0 14px rgba(91, 225, 30, .7); }

.khrep-cta a:focus-visible { outline: 3px solid var(--kh-ink); outline-offset: 3px; }
/* shown only when a clip is slow to arrive */
.khsc-spin { position: absolute; inset: 0; z-index: 2; margin: auto; box-sizing: content-box; width: 40px; height: 40px; border-radius: 50%; border: 3px solid #E4ECEA; border-top-color: var(--kh-green); animation: khspin .8s linear infinite; opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s linear .2s; }
.khsc-film.is-busy .khsc-spin { opacity: 1; visibility: visible; transition: opacity .2s ease .4s, visibility 0s linear .4s; }
@keyframes khspin { to { transform: rotate(360deg); } }

/* phones, and tablets held upright: title and car grouped in the middle, the car slightly enlarged edge to edge */
@media (max-width: 699.98px), (max-width: 1023.98px) and (orientation: portrait) {
  .khsc-copy { margin-top: auto; }
  .khsc-film { flex: none; overflow: hidden; margin-bottom: auto; margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px))); }
  .khsc-intro { padding-inline: 16px; }
  .khsc-bar { margin-inline: 0; }
}
/* phones on their side: smaller title so the car keeps its height */
@media (max-height: 560px) and (orientation: landscape) {
  .khsc-wrap { padding-block: 14px 12px; gap: 8px; }
  .khsc-text h2 { font-size: 24px; }
  .khsc-text p { font-size: 13px; margin-top: 4px; }
  .khsc-intro-main { font-size: 40px; }
  .khsc-cue { min-height: 30px; padding: 4px 14px; font-size: 13px; }
}

/* ---------- loading screen: holds the page until all the footage is in, so it plays smoothly from the first scroll ---------- */
html.kh-loading { overflow: hidden; }
.khload { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: var(--kh-ink); color: #fff; clip-path: inset(0 0 0 0); transition: clip-path .9s cubic-bezier(.76, 0, .24, 1), visibility 0s linear .9s; }
.khload.is-done { clip-path: inset(0 0 100% 0); visibility: hidden; }
.khload-in { display: grid; justify-items: center; gap: 18px; width: min(340px, 100%); text-align: center; transition: opacity .35s ease, transform .6s ease; }
.khload.is-done .khload-in { opacity: 0; transform: translateY(-30px); }
.khload-logo { width: clamp(150px, 6vw + 110px, 210px); aspect-ratio: 3; color: #fff; }
.khload-num { margin: 6px 0 0; direction: ltr; font: 400 clamp(72px, 5vw + 48px, 128px)/1 var(--kh-bold); color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.khload-num small { font-size: .38em; margin-left: .08em; color: var(--kh-green); }
.khload-line { width: 100%; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .12); position: relative; overflow: hidden; }
.khload-line::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, var(--kh-green), #3FB80F); transform-origin: right center; transform: scaleX(var(--p, 0)); }
.khload-note { margin: 0; font: 400 14px/1.6 var(--kh-reg); color: var(--kh-night-muted); }
/* the invitation rises in as the loading screen lifts */
.khsc-intro h1 > span { transition: opacity .7s ease .45s, transform .8s cubic-bezier(.2, .7, .2, 1) .45s; }
.khsc-intro-main { transition-delay: .6s; }
html.kh-loading .khsc-intro h1 > span { opacity: 0; transform: translateY(18px); transition: none; }

/* ---------- report ---------- */
.khrep { background: var(--kh-paper); }
.khrep-in { width: min(1240px, 100%); margin-inline: auto; padding-block: clamp(48px, 9vh, 104px); display: grid; gap: clamp(24px, 4vw, 40px); }
.khrep-head { display: grid; gap: 12px; max-width: 640px; }
.khrep-head .khsc-eyebrow { justify-self: start; }
.khrep-head h2 { margin: 0; font: 400 clamp(26px, 1.6vw + 18px, 44px)/1.2 var(--kh-bold); color: var(--kh-ink); text-wrap: balance; }
.khrep-head p { margin: 0; font: 400 17px/1.8 var(--kh-reg); color: var(--kh-muted); }

.khrep-sheet { border: 1px solid var(--kh-line); border-radius: 20px; overflow: hidden; background: var(--kh-paper); box-shadow: 0 24px 60px -32px rgba(0, 34, 33, .28); }
.khrep-top { background: var(--kh-ink); color: #fff; padding: clamp(18px, 3vw, 28px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.khrep-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.khrep-seal { flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--kh-green); display: grid; place-items: center; }
.khrep-brand b { display: block; font: 400 20px/1.3 var(--kh-bold); }
.khrep-brand span { display: block; font: 400 13px/1.4 var(--kh-reg); color: #9DB7B3; }
.khrep-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; padding: 0; list-style: none; font: 400 13px/1.4 var(--kh-reg); color: #9DB7B3; }
.khrep-meta li { display: flex; align-items: baseline; gap: 8px; }
.khrep-meta li::after { content: ""; width: 72px; border-bottom: 1px dashed #4C6D69; transform: translateY(-3px); }
.khrep-tag { font: 400 12px/1 var(--kh-bold); color: var(--kh-ink); background: var(--kh-green); border-radius: 999px; padding: 6px 10px; }

.khrep-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.khrep-item { padding: clamp(18px, 2.4vw, 28px); border-top: 1px solid var(--kh-line); border-left: 1px solid var(--kh-line); min-width: 0; }
.khrep-item:nth-child(3n) { border-left: 0; }
.khrep-item h3 { margin: 0 0 14px; display: flex; align-items: center; gap: 12px; font: 400 17px/1.3 var(--kh-bold); color: var(--kh-ink); }
.khrep-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--kh-tint); display: grid; place-items: center; color: var(--kh-ink); }
.khrep-item ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.khrep-item li { display: flex; align-items: flex-start; gap: 10px; font: 400 15px/1.5 var(--kh-reg); color: var(--kh-text); }
.khrep-item li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--kh-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%23002221' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.khrep-sheet.is-play .khrep-item li::before { animation: khtick .45s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--d, 0) * 70ms); }
@keyframes khtick { from { transform: scale(.3); opacity: 0; } }

.khrep-foot { border-top: 1px solid var(--kh-line); background: #F7FBF5; padding: clamp(18px, 3vw, 28px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.khrep-foot p { margin: 0; font: 400 15px/1.6 var(--kh-reg); color: var(--kh-ink); max-width: 56ch; }
.khrep-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.khrep-cta a { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 12px; font: 400 15px var(--kh-bold); text-decoration: none; }
.khrep-cta .pri { background: var(--kh-green); color: var(--kh-ink); }
.khrep-cta .sec { border: 1.5px solid var(--kh-ink); color: var(--kh-ink); }

@media (max-width: 900px) {
  .khrep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .khrep-item:nth-child(3n) { border-left: 1px solid var(--kh-line); }
  .khrep-item:nth-child(2n) { border-left: 0; }
}
@media (max-width: 599.98px) {
  .khrep-grid { grid-template-columns: minmax(0, 1fr); }
  .khrep-item, .khrep-item:nth-child(3n) { border-left: 0; }
  .khrep-cta, .khrep-cta a { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .khsc-mouse::after, .khsc-spin { animation: none; }
  .khsc-text, .khsc-intro, .khsc-intro.is-off { transform: none; }
  .khrep-sheet.is-play .khrep-item li::before { animation: none; }
  .khsc-intro h1 > span, html.kh-loading .khsc-intro h1 > span { transform: none; }
  .khsc-text .w, .khsc-text.is-on .w, .khsc-text p, .khsc-text.is-on p { transform: none; filter: none; }
  .khsc-chev::before, .khsc-chev::after { animation: none; opacity: 1; }
  .khload { transition: opacity .4s ease, visibility 0s linear .4s; }
  .khload.is-done { clip-path: none; opacity: 0; }
  .khsc-intro::before, .khsc-fx { display: none; }
}

/* ---------- site additions ---------- */
/* the loading screen of the preview showed from the first paint by an inline script; here it shows from the server-rendered HTML.
   If the script never starts (it failed to load, or the connection never came up) it lifts by itself, so the page is never stuck behind it */
.khsc-host:not(.is-live) .khload { animation: khload-failsafe .5s ease 20s forwards; }
@keyframes khload-failsafe { to { opacity: 0; visibility: hidden; } }
/* coming back to the home page in the same visit: the footage is already in memory, so no loading screen and no flash of it */
html.kh-sc-cached .khsc-host:not(.is-live) .khload, .khload.is-instant, .khload.is-instant .khload-in { transition: none; }
html.kh-sc-cached .khsc-host:not(.is-live) .khload { display: none; }
/* the report heading label (unstyled in the preview, where it took the paragraph look) */
.khrep-head .khsc-eyebrow { margin: 0; }

/* ---------- additions 23-10-2026 (user asked) ---------- */
/* loading screen: the line under the counter is bigger, so it reads even when the loading is quick (was 14px) */
.khload-note { font-size: clamp(17px, .4vw + 15px, 20px); line-height: 1.5; }
/* intro: a third line «السلسلة الأولى في سوريا لفحص السيارات» in the same look as «تعرف على», and the whole group sits a little higher */
.khsc-intro { padding-bottom: clamp(24px, 9vh, 110px); }
.khsc-intro-sub { margin: 0; font: 400 clamp(17px, .8vw + 13px, 26px)/1.4 var(--kh-reg); color: var(--kh-muted); text-wrap: balance; transition: opacity .7s ease .75s, transform .8s cubic-bezier(.2, .7, .2, 1) .75s; }
html.kh-loading .khsc-intro-sub { opacity: 0; transform: translateY(18px); transition: none; }
@media (max-height: 560px) and (orientation: landscape) {
  .khsc-intro { padding-bottom: 12px; }
  .khsc-intro-sub { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .khsc-intro-sub, html.kh-loading .khsc-intro-sub { transform: none; }
}

/* ---------- report: right-to-left text and the centred seal (site fix) ---------- */
/* normalize.css gives body text-align: left, which dir="rtl" does not undo; start follows the section's direction */
.khrep { text-align: start; }
/* .khrep-brand span (display: block) was overriding the seal's grid, so the tick sat in the corner */
.khrep-brand .khrep-seal { display: grid; place-items: center; }
.khrep-seal svg { display: block; }

/* ---------- phones: the car in the middle of the screen (site fix, 28-10-2026) ---------- */
/* On phones the footage is 10% wider than the screen. The section is right-to-left, so the grid lined it up with the right edge
   and the whole extra width hung off the left side, cutting the car there. Equal negative side margins (in vw, since a % margin is ignored when the grid sizes its column) let it centre:
   the overflow is now split between both sides and the car stays whole */
@media (max-width: 699.98px), (max-width: 1023.98px) and (orientation: portrait) {
  .khsc-media { justify-self: center; margin-inline: -10vw; }
}
