/* المحاماة — صفحة «شاهد الفيديو» */
:root { --navy: #13233A; --deep: #0C1626; --gold: #D9A62E; --cream: #F5E6C2; --acc: #D9A62E; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--deep); color: #fff; font-family: 'IBM Plex Sans Arabic', Cairo, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
body { overflow: hidden; overscroll-behavior: none; }
button { font: inherit; cursor: pointer; }
.wv { position: fixed; inset: 0; height: 100dvh; }
.wv > section { position: absolute; inset: 0; transition: opacity .5s ease, visibility .5s; }
.wv-player, .wv-end { opacity: 0; visibility: hidden; }
body.is-playing .wv-cover, body.is-end .wv-cover { opacity: 0; visibility: hidden; }
body.is-playing .wv-player, body.is-end .wv-player { opacity: 1; visibility: visible; }
body.is-end .wv-end { opacity: 1; visibility: visible; }

/* brand */
.wv-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--cream); padding: 6px 16px 6px 6px; border: 1px solid rgba(245, 230, 194, .35); border-radius: 99px; background: rgba(12, 22, 38, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.wv-logo { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-weight: 800; }

/* ---------- cover ---------- */
.wv-cover { display: grid; place-items: center; overflow: hidden; }
.wv-bg, .wv-pbg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(28px) brightness(.55); transform: scale(1.1); }
.wv-teaser { position: absolute; top: 0; left: 50%; height: 100%; width: auto; min-width: 100%; transform: translateX(-50%); object-fit: cover; }
@media (min-aspect-ratio: 3/4) { .wv-teaser { min-width: 0; height: 100%; aspect-ratio: 9 / 16; border-radius: 0; box-shadow: 0 0 120px rgba(0, 0, 0, .6); } }
.wv-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 22, 38, .55) 0%, rgba(12, 22, 38, .15) 35%, rgba(12, 22, 38, .35) 60%, rgba(12, 22, 38, .92) 100%); }
.wv-cover-in { position: relative; z-index: 2; text-align: center; padding: 24px 22px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: space-between; height: 100%; max-width: 640px; }
.wv-cover h1 { font-size: clamp(2rem, 8.5vw, 3.6rem); line-height: 1.22; margin: auto 0 10px; text-shadow: 0 6px 30px rgba(0, 0, 0, .6); animation: wv-up .8s .1s both cubic-bezier(.2, .8, .2, 1); }
.wv-cover h1 em, .wv-end h2 em { font-style: normal; color: var(--cream); }
.wv-cover p { margin: 0 0 26px; font-size: clamp(1rem, 4vw, 1.25rem); color: #DCE6F3; text-shadow: 0 2px 14px rgba(0, 0, 0, .6); animation: wv-up .8s .25s both cubic-bezier(.2, .8, .2, 1); }
@keyframes wv-up { from { opacity: 0; transform: translateY(18px); } }

.wv-play { position: relative; width: 104px; height: 104px; border-radius: 50%; border: 0; background: #fff; display: grid; place-items: center; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); animation: wv-pop .7s .45s both cubic-bezier(.2, .9, .3, 1.3); }
.wv-play:active { transform: scale(.94); }
.wv-play-ic { width: 0; height: 0; border-left: 34px solid var(--navy); border-top: 21px solid transparent; border-bottom: 21px solid transparent; margin-left: 9px; }
[dir=rtl] .wv-play-ic { margin-left: 9px; }
.wv-play-ring { position: absolute; inset: -10px; border-radius: 50%; border: 3px solid var(--acc); animation: wv-ring 1.8s ease-out infinite; }
@keyframes wv-ring { 0% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes wv-pop { from { opacity: 0; transform: scale(.6); } }
.wv-meta { margin-top: 16px; font-size: .9rem; color: #B9C6D8; }

/* ---------- player ---------- */
.wv-player { background: #000; display: grid; place-items: center; }
.wv-video { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; background: transparent; }
@media (max-aspect-ratio: 10/16) { .wv-video { object-fit: cover; } }
.wv-top { position: absolute; z-index: 4; top: 0; left: 0; right: 0; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; display: flex; align-items: center; gap: 12px; background: linear-gradient(180deg, rgba(0, 0, 0, .45), transparent); pointer-events: none; }
.wv-bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.wv-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cream), var(--gold)); transition: width .25s linear; }
[dir=rtl] .wv-bar i { margin-inline-start: 0; }
.wv-tools { pointer-events: auto; }
.wv-mute { border: 0; background: rgba(0, 0, 0, .45); color: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 16px; }
.wv-tap { position: absolute; inset: 0; z-index: 3; }
.wv-paused { position: absolute; z-index: 5; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transition: .25s; pointer-events: none; }
.wv-paused span { width: 92px; height: 92px; border-radius: 50%; background: rgba(255, 255, 255, .92); position: relative; }
.wv-paused span::after { content: ""; position: absolute; left: 34px; top: 26px; border-left: 30px solid var(--navy); border-top: 20px solid transparent; border-bottom: 20px solid transparent; }
body.is-paused .wv-paused { opacity: 1; visibility: visible; }
.wv-sound { position: absolute; z-index: 5; bottom: calc(26px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, .7); padding: 10px 18px; border-radius: 99px; font-weight: 700; display: none; }
body.needs-sound .wv-sound { display: block; animation: wv-pop .4s both; }

/* ---------- end / CTA ---------- */
.wv-end { z-index: 6; display: grid; place-items: end center; background: linear-gradient(180deg, rgba(12, 22, 38, .2) 0%, rgba(12, 22, 38, .82) 38%, rgba(12, 22, 38, .97) 100%); }
.wv-end-in { width: 100%; max-width: 520px; padding: 26px 22px calc(26px + env(safe-area-inset-bottom)); text-align: center; display: flex; flex-direction: column; align-items: center; transform: translateY(40px); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
body.is-end .wv-end-in { transform: none; }
.wv-end h2 { font-size: clamp(1.8rem, 7.5vw, 2.7rem); line-height: 1.25; margin: 18px 0 8px; }
.wv-end p { color: #C9D6E8; line-height: 1.8; margin: 0 0 22px; font-size: 1.02rem; }
.wv-cta { width: 100%; display: flex; justify-content: center; align-items: center; gap: 10px; background: var(--acc); color: #fff; text-decoration: none; font-weight: 800; font-size: 1.3rem; padding: 18px 20px; border-radius: 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); animation: wv-cta 1.6s ease-in-out infinite; }
.wv-cta span { font-size: 1.1em; }
@keyframes wv-cta { 50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, .12), 0 16px 40px rgba(0, 0, 0, .35); } }
.wv-cta2 { margin-top: 12px; width: 100%; display: block; text-decoration: none; color: #fff; font-weight: 700; padding: 14px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); }
.wv-trust { list-style: none; padding: 0; margin: 18px 0 6px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; color: #9FB3CF; font-size: .86rem; }
.wv-end-tools { margin-top: 10px; display: flex; gap: 10px; }
.wv-end-tools button { border: 0; background: none; color: #C9D6E8; font-weight: 700; padding: 8px 10px; }
.wv-end-tools button:hover { color: #fff; }

@media (min-width: 900px) {
    .wv-end { place-items: center; background: rgba(12, 22, 38, .86); }
    .wv-end-in { max-width: 560px; }
}
@media (prefers-reduced-motion: reduce) {
    .wv-play-ring, .wv-cta { animation: none; }
}
