/* Homepage second section only. */

.rt-ai-agents-v1.dex-home-videos { position: relative; overflow: hidden; padding: 68px 24px !important; background: radial-gradient(circle at 85% 80%,rgba(251,191,36,.10),transparent 45%),linear-gradient(135deg,#1748b8,#1e40af 65%,#17378e) !important; }
.dex-home-videos::before { content:""; position:absolute; inset:0; pointer-events:none; background:radial-gradient(circle,rgba(255,255,255,.12) 1px,transparent 1.4px) 0 0/28px 28px !important; }
.dex-home-videos::after { content:""; position:absolute; width:440px; height:480px; right:-150px; top:40px; background:url('/assets/dex-icon-blue.svg') center/contain no-repeat; opacity:.035; pointer-events:none; }
.dex-home-videos-shell { position:relative; z-index:1; max-width:1240px; margin:auto; }
.dex-home-videos-heading { text-align:center; max-width:780px; margin:0 auto 32px; }
.dex-home-videos-heading > p:first-child { color:#dbeafe; font:600 15px/1.5 "Manrope",sans-serif; margin:0 0 14px; }
.dex-home-videos-heading h2 { color:#fff; font:500 clamp(32px,4vw,48px)/1.12 "Inter Tight",sans-serif; margin:0 0 18px; letter-spacing:-.03em; }
.dex-home-videos-heading h2 span { background:linear-gradient(100deg,#93c5fd 0%,#60a5fa 55%,#fbbf24 100%); background-clip:text; -webkit-background-clip:text; color:transparent; }
.dex-home-videos-heading > p:last-child { color:#e2eaff; font:400 18px/1.6 "DM Sans",sans-serif; margin:0; }
.dex-home-video-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.dex-home-video-card { display:block; width:100%; padding:0; text-align:left; border:1px solid rgba(37,99,235,.17); border-radius:18px; background:#fff; color:#0f172a; overflow:hidden; cursor:pointer; box-shadow:0 10px 30px rgba(37,99,235,.05); transition:border-color .2s,box-shadow .2s; }
.dex-home-video-card:hover { border-color:#b88912; box-shadow:0 12px 34px rgba(37,99,235,.12); }
.dex-home-video-card:focus-visible,.dex-home-video-close:focus-visible { outline:3px solid #2563eb; outline-offset:4px; }
.dex-home-video-poster { display:block; position:relative; aspect-ratio:16/9; overflow:hidden; }
.dex-home-video-poster > img { display:block; width:100%; height:100%; object-fit:cover; }
.dex-home-video-play { position:absolute; right:16px; bottom:16px; display:grid; place-items:center; width:54px; height:54px; border-radius:50%; color:#fff; background:#2563eb; border:2px solid #fff; box-shadow:0 6px 24px rgba(30,64,175,.24); }
.dex-home-video-play svg { width:26px; height:26px; }
.dex-home-video-dialog { padding:0; width:min(1000px,calc(100vw - 32px)); max-width:1000px; max-height:calc(100dvh - 32px); border:1px solid rgba(37,99,235,.2); border-radius:18px; background:#fff; color:#0f172a; overflow:auto; }
.dex-home-video-dialog::backdrop { background:rgba(15,23,42,.76); }
.dex-home-video-dialog-bar { display:flex; align-items:center; justify-content:space-between; padding:12px 18px; gap:12px; }
.dex-home-video-dialog-bar h3 { margin:0; font:600 22px/1.3 "Inter Tight",sans-serif; }
.dex-home-video-close { display:grid; place-items:center; flex-shrink:0; width:44px; height:44px; padding:10px; border:1px solid #dbe5f4; border-radius:10px; background:white; color:#1e40af; cursor:pointer; }
.dex-home-video-close svg { width:24px; height:24px; }
.dex-home-video-dialog video { display:block; width:100%; aspect-ratio:16/9; max-height:70dvh; background:#0f172a; }
.dex-home-video-status { margin:0; padding:12px 18px; font:400 15px/1.5 "DM Sans",sans-serif; }
.dex-home-video-status:empty { display:none; }
body:has(.dex-home-video-dialog[open]) { overflow:hidden; }
@media(max-width:900px) { .dex-home-video-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; } }
@media(max-width:600px) { .rt-ai-agents-v1.dex-home-videos { padding:52px 20px !important; } .dex-home-videos-heading { margin-bottom:28px; } .dex-home-videos-heading > p:last-child { font-size:16px; } .dex-home-video-grid { grid-template-columns:minmax(0,1fr); gap:20px; } }
@media(prefers-reduced-motion:reduce) { .dex-home-video-card { transition:none; } }

.dex-home-video-retry { margin:0 18px 18px; padding:12px 20px; min-height:44px; background:#2563eb; color:#fff; border:0; border-radius:8px; cursor:pointer; font:600 15px/1.4 "Manrope",sans-serif; }
.dex-home-video-retry[hidden] { display:none; }

/* The modal inherits the existing bottom-page DeX player and its controls. */
.dex-home-video-modal-player.dex-home-video { padding:0 !important; margin:0 !important; background:none !important; overflow:visible; isolation:auto; }
.dex-home-video-modal-player.dex-home-video::before, .dex-home-video-modal-player.dex-home-video::after { display:none !important; }
.dex-home-video-dialog .dex-home-video-modal-player dex-video-player { border:0; border-radius:0; }
.dex-home-video-dialog .dex-emulator-viewport { aspect-ratio:16/9; height:auto; max-height:70dvh; }
.dex-home-video-dialog video { max-height:none; }

/* Video-only playback window, matching the bottom homepage player. */
.dex-home-video-dialog { background:transparent; border:0; border-radius:0; overflow:visible; padding-top:48px; max-height:calc(100dvh - 24px); }
.dex-home-video-dialog-bar { position:absolute; inset:0 0 auto; padding:0; height:44px; justify-content:flex-end; }
.dex-home-video-dialog-bar h3 { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.dex-home-video-dialog .dex-home-video-close { color:white; background:rgba(15,23,42,.75); border-color:rgba(255,255,255,.4); border-radius:50%; }
.dex-home-video-dialog .dex-home-video-modal-player dex-video-player { border:1px solid #ffffff33; border-radius:6px; }
.dex-home-video-dialog .dex-home-video-status { color:#fff; background:rgba(15,23,42,.9); }
.dex-home-video-dialog .dex-home-video-retry { margin-top:12px; }
