/* هيدرو ماستر — قبل وبعد + الفيديوهات | 💻 أحمد أدهم · ahmedadham */

/* ═══ قبل وبعد: خط موية بيفصل الصورتين ═══ */
.hy-ba{max-width:980px;margin-inline:auto}
.hy-ba-stage{position:relative;margin:0;aspect-ratio:16/10;border-radius:var(--r2);overflow:hidden;background:var(--soft);box-shadow:var(--sh2);user-select:none;-webkit-user-select:none;touch-action:pan-y}
.hy-ba-stage img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none}
.hy-ba-b{position:absolute;inset:0;clip-path:inset(0 0 0 var(--p));will-change:clip-path}
.hy-ba-b img{filter:saturate(.92)}
.hy-ba-wave{position:absolute;top:0;bottom:0;left:var(--p);width:34px;transform:translateX(-50%);pointer-events:none;z-index:2}
.hy-ba-wave>i{position:absolute;inset:0 12px;background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='40' viewBox='0 0 10 40'%3E%3Cpath d='M5 0 C9 10 1 10 5 20 C9 30 1 30 5 40' fill='none' stroke='white' stroke-width='3'/%3E%3C/svg%3E") center/10px 40px repeat-y;
  filter:drop-shadow(0 0 6px rgba(2,132,199,.8));animation:hyBaFlow 1.6s linear infinite}
@keyframes hyBaFlow{to{background-position:center 40px}}
.hy-ba-drop{position:absolute;top:50%;left:50%;width:54px;height:54px;transform:translate(-50%,-50%);border-radius:50% 50% 50% 50%/58% 58% 42% 42%;background:radial-gradient(circle at 35% 30%,#fff 0 12%,var(--acc2) 13% 100%);color:#fff;display:grid;place-items:center;box-shadow:0 10px 24px -8px rgba(2,132,199,.8),inset 0 -6px 10px rgba(3,105,161,.35);transition:transform .2s var(--ease)}
.hy-ba-drop svg{width:26px;height:26px}
.hy-ba-stage.drag .hy-ba-drop{transform:translate(-50%,-50%) scale(1.12)}
.hy-ba-lb{position:absolute;top:14px;z-index:3;padding:5px 14px;border-radius:999px;font-weight:800;font-size:14px;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);transition:opacity .25s}
.hy-ba-lb-b{right:14px;background:rgba(15,23,42,.62);color:#fff}
.hy-ba-lb-a{left:14px;background:rgba(255,255,255,.88);color:var(--deep)}
.hy-ba-stage{cursor:ew-resize}
.hy-ba-stage .hy-ba-rng{position:absolute;left:0;right:0;bottom:0;width:100%;height:2px;margin:0;opacity:0;pointer-events:none;z-index:4}
.hy-ba-stage:focus-within{outline:3px solid var(--acc2);outline-offset:3px}
.hy-ba-stage figcaption{position:absolute;right:0;left:0;bottom:0;z-index:3;padding:40px 18px 14px;background:linear-gradient(transparent,rgba(15,23,42,.72));color:#fff;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;pointer-events:none}
.hy-ba-stage figcaption b{font-size:18px}
.hy-ba-stage figcaption span{font-size:14.5px;opacity:.9}
.hy-ba-stage figcaption span:empty{display:none}
.hy-ba-stage.swap img{animation:hyBaIn .45s var(--ease)}
@keyframes hyBaIn{from{opacity:.25;transform:scale(1.03)}}
/* بلاط الأعمال: كل بلاطة نصها قبل ونصها بعد */
.hy-ba-tiles{list-style:none;margin:16px 0 0;padding:4px 2px 10px;display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:thin}
.hy-ba-tiles li{flex:0 0 auto;scroll-snap-align:start}
.hy-ba-tiles button{position:relative;display:block;width:112px;aspect-ratio:4/3;border:3px solid transparent;border-radius:14px;padding:0;overflow:hidden;background:var(--soft);transition:border-color .2s,transform .2s var(--ease)}
.hy-ba-tiles img,.hy-ba-tiles i{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.hy-ba-tiles i{background:center/cover;clip-path:polygon(50% 0,100% 0,100% 100%,50% 100%);transition:clip-path .35s var(--ease)}
.hy-ba-tiles button:hover i{clip-path:polygon(100% 0,100% 0,100% 100%,100% 100%)}
.hy-ba-tiles button[aria-current=true]{border-color:var(--acc);transform:translateY(-3px)}
.hy-ba-cta{justify-content:center;margin-top:22px}
@media (max-width:700px){
  .hy-ba-stage{aspect-ratio:4/3.4;border-radius:20px}
  .hy-ba-drop{width:46px;height:46px}
  .hy-ba-tiles button{width:92px}
  .hy-ba-stage figcaption b{font-size:16px}
}

/* ═══ الفيديوهات: شريط مقاطع بارتفاع ثابت ═══ */
.hy-vids{position:relative}
.hy-vids-rail{list-style:none;margin:0;padding:6px 4px 16px;display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;scrollbar-width:none;overscroll-behavior-x:contain}
.hy-vids-rail::-webkit-scrollbar{display:none}
.hy-vids-rail li{flex:0 0 auto;height:440px;scroll-snap-align:start}
.hy-vids-rail li.v{aspect-ratio:9/16}
.hy-vids-rail li.h{aspect-ratio:16/9;max-width:calc(100vw - 48px)}
.hy-vc{position:relative;display:block;width:100%;height:100%;border:0;padding:0;border-radius:22px;overflow:hidden;background:linear-gradient(160deg,var(--acc2),var(--deep));box-shadow:var(--sh);color:#fff;text-align:right}
.hy-vc img,.hy-vc video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .5s var(--ease)}
.hy-vc:hover img,.hy-vc:hover video{transform:scale(1.04)}
.hy-vc .ph{position:absolute;inset:0;display:grid;place-items:center;font-weight:800;font-size:22px;opacity:.55}
.hy-vc::after{content:'';position:absolute;inset:0;background:linear-gradient(transparent 55%,rgba(15,23,42,.75))}
.hy-vc .pl{position:absolute;top:50%;left:50%;z-index:2;width:66px;height:66px;margin:-33px 0 0 -33px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.28);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);border:2px solid rgba(255,255,255,.8);transition:transform .25s var(--ease),background .25s}
.hy-vc .pl::before{content:'';position:absolute;inset:-8px;border-radius:50%;border:2px solid rgba(255,255,255,.5);animation:hyVring 2.4s ease-out infinite}
@keyframes hyVring{from{transform:scale(.85);opacity:1}to{transform:scale(1.35);opacity:0}}
.hy-vc .pl svg{width:30px;height:30px;margin-left:4px}
.hy-vc:hover .pl{transform:scale(1.1);background:var(--acc)}
.hy-vc .tt{position:absolute;right:14px;left:14px;bottom:14px;z-index:2;font-weight:700;font-size:15.5px;line-height:1.45}
.hy-vids .nv{position:absolute;top:calc(50% - 32px);z-index:3;width:46px;height:46px;border-radius:50%;border:0;background:#fff;color:var(--deep);font-size:28px;line-height:1;box-shadow:var(--sh2);display:grid;place-items:center}
.hy-vids .nv-p{right:-10px}
.hy-vids .nv-n{left:-10px}
.hy-vids .nv[disabled]{opacity:0;pointer-events:none}
@media (max-width:700px){.hy-vids-rail li{height:380px}.hy-vids .nv{display:none}}
@media (prefers-reduced-motion:reduce){.hy-ba-wave>i,.hy-vc .pl::before{animation:none}}

/* المشغّل */
.hy-vdlg{border:0;padding:0;background:transparent;max-width:none;max-height:none;overflow:visible}
.hy-vdlg::backdrop{background:rgba(3,25,45,.82);backdrop-filter:blur(4px)}
.hy-vdlg .bd{width:min(92vw,1000px);aspect-ratio:16/9;border-radius:18px;overflow:hidden;background:#000}
.hy-vdlg.v .bd{width:auto;height:min(86vh,780px);aspect-ratio:9/16;max-width:92vw}
.hy-vdlg iframe,.hy-vdlg video{display:block;width:100%;height:100%;border:0}
.hy-vdlg .x{position:absolute;top:-16px;left:-16px;z-index:2;width:44px;height:44px;border-radius:50%;border:0;background:#fff;color:var(--ink);font-size:18px;box-shadow:var(--sh2)}
@media (max-width:700px){.hy-vdlg .x{top:-54px;left:0}}

/* مربع الأدمن لما القسم فاضي */
.hy-me-box{max-width:720px;margin:0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:16px;text-align:center;padding:30px 24px;border:2px dashed var(--acc2);border-radius:var(--r2);background:var(--soft)}
.hy-me-box>span{font-size:44px;line-height:1}
.hy-me-box p{margin:0;color:var(--mut);font-size:16px;flex:1 1 320px}
.hy-me-box b{color:var(--ink)}

/* ═══ 🖼️ معرض الصور: جدار بلاط موزاييك ═══ */
.hy-gal{list-style:none;margin:0;padding:0;columns:4 220px;column-gap:12px}
.hy-gal li{break-inside:avoid;margin:0 0 12px}
.hy-gal button{position:relative;display:block;width:100%;border:0;padding:0;border-radius:16px;overflow:hidden;background:var(--soft);cursor:zoom-in}
.hy-gal img{width:100%;height:auto;display:block;transition:transform .6s var(--ease),filter .4s}
.hy-gal button::before{content:'';position:absolute;inset:0;z-index:1;background:linear-gradient(115deg,transparent 30%,rgba(255,255,255,.45) 45%,transparent 60%) no-repeat;background-size:250% 100%;background-position:120% 0;transition:background-position .9s var(--ease);pointer-events:none}
.hy-gal button:hover::before{background-position:-40% 0}
.hy-gal button:hover img{transform:scale(1.06)}
.hy-gal span{position:absolute;right:0;left:0;bottom:0;z-index:2;padding:26px 12px 10px;background:linear-gradient(transparent,rgba(15,23,42,.7));color:#fff;font-size:14px;font-weight:700;text-align:right;transform:translateY(100%);transition:transform .3s var(--ease)}
.hy-gal button:hover span,.hy-gal button:focus-visible span{transform:none}
.hy-gal li{animation:hyGalIn .6s var(--ease) backwards;animation-delay:calc(var(--i) * 60ms)}
@keyframes hyGalIn{from{opacity:0;transform:translateY(14px) scale(.97)}}
@media (max-width:700px){.hy-gal{columns:2;column-gap:8px}.hy-gal li{margin-bottom:8px}.hy-gal span{transform:none;font-size:12.5px;padding:18px 8px 6px}}
@media (prefers-reduced-motion:reduce){.hy-gal li{animation:none}}
.hy-gdlg{border:0;padding:0;background:transparent;max-width:none;max-height:none;width:100vw;height:100dvh;overflow:hidden}
.hy-gdlg::backdrop{background:rgba(3,25,45,.92)}
.hy-gdlg[open]{display:flex;align-items:center;justify-content:center}
.hy-gdlg figure{margin:0;display:flex;flex-direction:column;align-items:center;max-width:92vw;touch-action:pan-y}
.hy-gdlg img{max-width:92vw;max-height:80dvh;width:auto;height:auto;border-radius:14px;box-shadow:0 30px 60px -20px #000;transition:opacity .2s,transform .25s var(--ease)}
.hy-gdlg img.out{opacity:0;transform:scale(.96)}
.hy-gdlg figcaption{color:#fff;margin-top:12px;display:flex;gap:14px;align-items:baseline;font-weight:700}
.hy-gdlg figcaption small{opacity:.7;font-weight:400;direction:ltr}
.hy-gdlg .x{position:fixed;top:16px;left:16px;width:46px;height:46px;border-radius:50%;border:0;background:#fff;color:var(--ink);font-size:18px;z-index:3}
.hy-gdlg .nv{position:fixed;top:50%;margin-top:-26px;width:52px;height:52px;border-radius:50%;border:0;background:rgba(255,255,255,.18);color:#fff;font-size:34px;line-height:1;z-index:3}
.hy-gdlg .nv:hover{background:var(--acc)}
.hy-gdlg .nv-p{right:16px}
.hy-gdlg .nv-n{left:16px}
@media (max-width:700px){.hy-gdlg .nv{top:auto;bottom:22px;margin:0}}
