/* Robótica Aplicada › Aplicaciones en acción (docs/render-robotica-demos.cjs, td-robotica-demos.js). A compact editorial
   block at the end of the capability: one 16:9 player and a short list, separated by a hairline like the
   Ejecutar / Mover / Percibir row above. Same type scale and accents as the capability (digital-capabilities.css). */
.robot-demos{margin-top:34px;padding-top:28px;border-top:1px solid #ffffff10}
.robot-demos-label{margin:0 0 18px;font-size:.72rem;font-weight:500;letter-spacing:.06em;color:#00b0d1}
.robot-demos-body{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:28px;align-items:center}

/* Player */
.robot-demos-frame{position:relative;aspect-ratio:16/9;overflow:hidden;border:1px solid #ffffff14;border-radius:12px;background:#050816}
.robot-demos-poster,.robot-demos-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.robot-demos-poster{object-fit:cover}
.robot-demos-frame:not(.is-playing)::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#00010e14,#00010e59)}
.robot-demos-play{position:absolute;left:50%;top:50%;z-index:1;display:grid;place-items:center;width:58px;height:58px;margin:-29px 0 0 -29px;padding:0;border:1px solid rgba(255,255,255,.22);border-radius:50%;
  background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.05)),rgba(0,1,14,.35);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
  box-shadow:0 10px 28px #00010e80;color:#fff;cursor:pointer;transition:transform .25s ease,background .25s ease,border-color .25s ease}
.robot-demos-play svg{width:20px;height:20px;margin-left:3px;fill:currentColor}
.robot-demos-play:hover{transform:scale(1.06);border-color:rgba(255,255,255,.34);background:linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,.08)),rgba(0,1,14,.3)}
.robot-demos-play:focus-visible{outline:2px solid #00b0d1;outline-offset:4px}

/* List */
.robot-demos-list{display:grid;gap:6px;margin:0;padding:0;list-style:none}
/* Inactive items stay a step behind the active one (no frame, softer) but fully readable. */
.robot-demo{display:grid;grid-template-columns:112px minmax(0,1fr);gap:14px;align-items:center;padding:9px;border:1px solid transparent;border-radius:10px;color:inherit;text-decoration:none;opacity:.88;transition:opacity .25s ease,background .25s ease,border-color .25s ease}
.robot-demo:hover{opacity:1;background:rgba(255,255,255,.025)}
.robot-demo.is-active{opacity:1;border-color:rgba(255,255,255,.12);background:linear-gradient(135deg,rgba(255,255,255,.06),rgba(255,255,255,.015))}
.robot-demo:focus-visible{opacity:1;outline:2px solid #00b0d1;outline-offset:2px}
.robot-demo-thumb{position:relative;display:block;aspect-ratio:16/9;overflow:hidden;border-radius:6px;background:#0b1430}
.robot-demo-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.robot-demo.is-active .robot-demo-thumb::after{content:'';position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px #00b0d1aa}
.robot-demo-text{display:grid;gap:4px;min-width:0}
.robot-demo-cat{font-size:.58rem;font-weight:500;letter-spacing:.1em;line-height:1.4;color:#8db8cf}
.robot-demo-title{font-size:.84rem;font-weight:500;line-height:1.35;color:#e1ebf4}
.robot-demo-desc{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:.72rem;line-height:1.55;color:#a7b8ca}
.robot-demo.is-active .robot-demo-title{color:#fff}

/* Short laptop screens (e.g. 1366×768): the two columns share the width evenly, so the player is ~330px tall (≈47% of
   the visible height instead of 56%) and the list gets more room. */
@media (min-width:1001px) and (max-height:820px){
  .robot-demos-body{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}
}
/* Tablet: player on top, the three videos side by side below it. */
@media (max-width:1000px){
  .robot-demos-body{grid-template-columns:minmax(0,1fr);gap:16px}
  .robot-demos-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .robot-demo{grid-template-columns:minmax(0,1fr);gap:10px;align-items:start}
}
/* Mobile: one compact row per video. */
@media (max-width:600px){
  .robot-demos{margin-top:28px;padding-top:24px}
  .robot-demos-list{grid-template-columns:minmax(0,1fr);gap:4px}
  .robot-demo{grid-template-columns:96px minmax(0,1fr);gap:12px;align-items:center;padding:8px}
  .robot-demo-desc{display:none}
  .robot-demos-play{width:52px;height:52px;margin:-26px 0 0 -26px}
}
@media (prefers-reduced-motion:reduce){
  .robot-demo,.robot-demos-play{transition:none}
}
