/* Videos: bloque de la home y archivo */
.video-poster { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.video-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, opacity .25s ease; }
.video-play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; background: var(--green-ui); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 10px 28px rgba(0,0,0,.45); transform: translate(-50%, -50%); transition: transform .2s ease, background .2s ease; }
.video-play::after { content: ""; position: absolute; left: 54%; top: 50%; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff; transform: translate(-50%, -50%); }
.video-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; margin: 0; font-size: 13px; font-weight: 600; }
.video-cat { padding: 5px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; color: var(--green-dark); background: #e4f1e7; }
.video-stage { aspect-ratio: 16 / 9; background: #000; }
.video-stage iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Home: el video ocupa todo el ancho del bloque sin pasar del alto de la ventana. */
.home-videos { position: relative; padding: 104px 9% 112px; overflow: hidden; background: radial-gradient(circle at 88% 6%, rgba(0,74,173,.55), transparent 42%), var(--navy); }
.home-videos::before { content: ""; position: absolute; width: 460px; height: 460px; left: -270px; bottom: -250px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; box-shadow: 0 0 0 30px rgba(255,255,255,.03), 0 0 0 64px rgba(255,255,255,.02); }
.video-shell { position: relative; width: min(100%, max(640px, calc((100vh - 130px) * 16 / 9))); margin: 0 auto; }
.video-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 40px; }
.video-heading .eyebrow { margin-bottom: 18px; color: #bcd2f5; }
.video-heading h2 { margin: 0; color: #fff; font-family: var(--serif); font-size: clamp(40px, 4.6vw, 66px); line-height: 1; letter-spacing: -.065em; }
.video-heading h2 em { color: #f0b17b; font-style: italic; }
.video-all { padding-bottom: 5px; color: #fff; border-bottom: 2px solid #f0b17b; font-size: 16px; font-weight: 700; white-space: nowrap; }
.video-all span { margin-left: 7px; font-size: 20px; }
.video-feature { overflow: hidden; background: #fff; border-radius: 8px 40px 8px 8px; box-shadow: 0 40px 70px -30px rgba(0,0,0,.75); }
.video-feature .video-play { width: 92px; height: 92px; }
.video-feature .video-play::after { border-width: 16px 0 16px 26px; }
.video-feature-play:hover .video-play { background: var(--green-dark); transform: translate(-50%, -50%) scale(1.07); }
.video-feature-play:focus-visible { outline: 4px solid #ffd7b8; outline-offset: -6px; box-shadow: none; }
.video-feature-info { display: flex; align-items: center; justify-content: space-between; gap: 18px 30px; padding: 24px 32px 28px; color: #4c5d54; }
.video-feature h3 { margin: 12px 0 0; color: var(--ink); font-family: var(--serif); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.15; letter-spacing: -.035em; }
.video-yt { flex-shrink: 0; color: var(--green-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.home-videos .video-all:focus-visible { outline-color: #ffd7b8; box-shadow: none; }

/* Archivo */
.video-figure svg { width: 108px; height: 108px; margin-left: 14px; fill: rgba(240,177,123,.25); stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }
.archive-result-count { margin: 0; }
.videos-page .archive-toolbar { scroll-margin-top: 20px; }
.videos-page .filter-pill b { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 5px; color: var(--ink); background: #e9f1eb; border-radius: 99px; font-size: 11px; line-height: 18px; text-align: center; }
.video-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; margin: 30px 0 0; padding: 0; list-style: none; }
.video-grid[hidden] { display: none; }
.video-card { position: relative; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #dfe8e1; border-radius: 6px 24px 6px 6px; box-shadow: 0 16px 32px -24px rgba(16,38,29,.55); transition: transform .25s ease, box-shadow .25s ease; }
.video-card:hover { transform: translateY(-5px); box-shadow: 0 24px 40px -24px rgba(16,38,29,.6); }
.video-card:hover .video-poster img { transform: scale(1.04); }
.video-card:hover .video-play { background: var(--green-dark); transform: translate(-50%, -50%) scale(1.08); }
.video-card .video-play { width: 52px; height: 52px; }
.video-card .video-play::after { border-width: 9px 0 9px 14px; }
.video-card-body { display: flex; flex: 1; flex-direction: column; gap: 11px; padding: 16px 18px 20px; border-top: 4px solid var(--green); }
.video-card .video-meta { color: #55665c; }
.video-card h3 { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.3; letter-spacing: -.015em; }
.video-card h3 a { display: -webkit-box; overflow: hidden; color: var(--ink); -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
/* Enlace estirado: un solo enlace por tarjeta y toda ella es clicable. */
.video-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
.video-card h3 a::before { content: ""; position: absolute; inset: 0; z-index: 1; }
.video-card:focus-within::after { box-shadow: inset 0 0 0 3px var(--blue); }
.video-card a:focus-visible { outline: none; box-shadow: none; }

/* Ventana del video */
.video-dialog { box-sizing: border-box; width: min(1080px, 94vw, calc((100vh - 260px) * 16 / 9)); min-width: min(560px, 94vw); max-width: 94vw; max-height: 94vh; padding: 0; overflow: auto; color: var(--ink); background: #fff; border: 0; border-radius: 8px 30px 8px 8px; box-shadow: 0 40px 90px rgba(0,0,0,.6); }
.video-dialog::backdrop { background: rgba(5,14,28,.86); }
html:has(.video-dialog[open]) { overflow: hidden; }
.video-dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px 12px 22px; color: #55665c; }
.video-close { flex-shrink: 0; width: 42px; height: 42px; color: var(--ink); background: #eef4f0; border: 0; border-radius: 50%; cursor: pointer; font: 700 18px var(--sans); }
.video-close:hover { color: #fff; background: var(--green-ui); }
.video-dialog-body { padding: 18px 22px 22px; }
.video-dialog-body h2 { margin: 0 0 14px; font-family: var(--serif); font-size: clamp(19px, 2vw, 25px); line-height: 1.2; letter-spacing: -.025em; }
.video-dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.video-copy { padding: 9px 16px; color: #fff; background: var(--green-ui); border: 0; border-radius: 8px; cursor: pointer; font: 700 14px var(--sans); }
.video-copied { color: var(--green-dark); font-size: 14px; font-weight: 700; }

@media (max-width: 1150px) { .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-videos { padding: 84px 7% 92px; }
}
@media (max-width: 640px) {
  .video-shell { width: 100%; }
  .home-videos { padding: 68px 5% 76px; }
  .video-heading { display: block; margin-bottom: 30px; }
  .video-all { display: inline-block; margin-top: 22px; }
  .video-feature { border-radius: 6px 22px 6px 6px; }
  .video-feature .video-play { width: 64px; height: 64px; }
  .video-feature .video-play::after { border-width: 11px 0 11px 18px; }
  .video-feature-info { display: block; padding: 18px 18px 22px; }
  .video-feature-info .video-yt { display: inline-block; margin-top: 14px; }
}
@media (max-width: 680px) { .videos-page .filter-selects { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .video-grid { grid-template-columns: 1fr; } }
