/* ==========================================================================
   Vídeos · estilos específicos (se carga tras rediseno.css)
   Páginas /videos/ y /en/videos/ y la franja app/partials/videos-teaser.php
   Prefijo propio: .vd-
   ========================================================================== */

.vd-page [hidden], .rs-vcard[hidden] { display: none !important; }

/* ---------- miniaturas de Shorts: el vídeo vertical ocupa justo 9:16 ---------- */
.rs-vcard.short .thumb { aspect-ratio: 9 / 16; }
.rs-vcard.short .thumb img { object-position: 50% 50%; }
.rs-vcard .rs-dur { right: 10px; bottom: 10px; }
.rs-vcard .body small + small { margin-top: 3px; color: var(--lime-2); opacity: .85; }
.rs-vcard h4 { font-family: var(--font-display); font-weight: 600; }

/* ---------- cabecera ---------- */
.vd-hero { padding: 170px 0 90px; }
.vd-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 26px; font-size: .86rem; color: rgba(233, 248, 210, .6); }
.vd-crumb a { color: rgba(233, 248, 210, .8); }
.vd-crumb a:hover { color: var(--lime-2); }
.vd-hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: end; margin-bottom: 64px; }
.vd-hero .rs-title { font-size: clamp(2.5rem, 1.3rem + 4.4vw, 4.9rem); margin-bottom: 22px; }
.vd-hero .lede { margin-bottom: 0; }
.vd-hero-side .rs-trust { margin-bottom: 28px; }
.vd-hero-side .rs-actions { margin-bottom: 0; }
.vd-hero .btn svg { flex: none; }
.vd-hero .btn-primary, .vd-band .btn-primary { display: inline-flex; align-items: center; gap: 10px; }

/* ---------- vídeo destacado ---------- */
.vd-feature { margin-bottom: 0; align-items: center; }
.vd-feature-title { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.3rem); line-height: 1.12; letter-spacing: -.02em; margin: 14px 0; color: #fff; }
.vd-feature p { color: rgba(233, 248, 210, .75); }
.vd-feature .vd-feature-meta { font-size: .9rem; color: var(--lime-2); margin-bottom: 22px; }
.vd-feature .btn { display: inline-flex; align-items: center; gap: 10px; }
.rs-play { text-decoration: none; }

/* ---------- biblioteca (sección clara) ---------- */
.vd-light { background: transparent; }
.vd-light .rs-vcard { background: #fff; border-color: rgba(20, 40, 20, .09); box-shadow: 0 14px 34px -24px rgba(6, 30, 10, .35); }
.vd-light .rs-vcard:hover { border-color: rgba(108, 183, 15, .5); box-shadow: var(--rs-shadow); }
.vd-light .rs-vcard h4 { color: var(--ink); }
.vd-light .rs-vcard small { color: rgba(23, 32, 24, .58); }
.vd-light .rs-vcard small + small { color: var(--accent-strong); opacity: 1; font-weight: 600; }

/* ---------- barra de filtros ---------- */
.vd-filters { display: grid; gap: 18px; margin: -8px 0 44px; padding: 20px; border-radius: 30px; background: #fff; border: 1px solid rgba(20, 40, 20, .08); box-shadow: 0 34px 70px -44px rgba(6, 30, 10, .5); }
.vd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.vd-search { flex: 1 1 320px; display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 14px 0 20px; border-radius: 100px; background: #f2f6ec; border: 1px solid transparent; color: var(--text-dim); cursor: text; transition: background .25s, border-color .25s, box-shadow .25s; }
.vd-search:focus-within { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(108, 183, 15, .18); color: var(--accent-strong); }
.vd-search svg { flex: none; }
.vd-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: 500 1rem var(--font-body); color: var(--ink); -webkit-appearance: none; appearance: none; }
.vd-search input::placeholder { color: rgba(23, 32, 24, .45); }
.vd-search input::-webkit-search-cancel-button { display: none; }
.vd-qx { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(20, 40, 20, .08); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; }
.vd-qx:hover { background: var(--ink); color: #fff; }

.vd-seg { position: relative; display: inline-flex; padding: 5px; border-radius: 100px; background: #f2f6ec; }
.vd-seg-thumb { position: absolute; left: 0; top: 5px; bottom: 5px; width: 0; border-radius: 100px; background: var(--ink); box-shadow: 0 10px 22px -10px rgba(6, 30, 10, .7); transition: transform .38s var(--ease), width .38s var(--ease); pointer-events: none; }
.vd-seg button { position: relative; z-index: 1; appearance: none; border: 0; background: transparent; cursor: pointer; height: 44px; padding: 0 20px; display: inline-flex; align-items: center; gap: 8px; border-radius: 100px; font: 600 .94rem var(--font-body); color: var(--text-dim); transition: color .25s; }
.vd-seg button i { font: 600 .74rem var(--font-body); font-style: normal; padding: 2px 8px; border-radius: 100px; background: rgba(20, 40, 20, .08); transition: background .25s, color .25s; }
.vd-seg button[aria-pressed="true"] { color: #fff; }
.vd-seg button[aria-pressed="true"] i { background: rgba(142, 224, 0, .22); color: var(--lime); }

.vd-topics { display: flex; flex-wrap: wrap; gap: 9px; }
.vd-chip { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 100px; border: 1px solid rgba(20, 40, 20, .12); background: #fff; color: var(--ink); font: 600 .9rem var(--font-body); transition: background .25s, border-color .25s, color .25s, transform .25s var(--ease), box-shadow .25s; }
.vd-chip i { font: 600 .74rem var(--font-body); font-style: normal; opacity: .55; }
.vd-chip:hover { border-color: var(--c, var(--accent)); transform: translateY(-1px); box-shadow: 0 10px 20px -14px rgba(6, 30, 10, .5); }
.vd-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 14px 26px -14px rgba(6, 30, 10, .7); }
.vd-chip[aria-pressed="true"] i { opacity: .8; color: var(--lime); }
.vd-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--accent)) 22%, transparent); }
.vd-chip[data-t="historias"] { --c: #6cb70f; }
.vd-chip[data-t="entrevistas"] { --c: #1fa89a; }
.vd-chip[data-t="recaidas"] { --c: #e0a020; }
.vd-chip[data-t="familia"] { --c: #e0734f; }
.vd-chip[data-t="emociones"] { --c: #8c6ae0; }
.vd-chip[data-t="claves"] { --c: #3b8fd9; }
.vd-chip:focus-visible, .vd-seg button:focus-visible, .vd-reset:focus-visible, .vd-sort select:focus-visible, .vd-qx:focus-visible, .vd-modal button:focus-visible, .vd-modal a:focus-visible, .rs-rail:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

.vd-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-top: 16px; border-top: 1px solid rgba(20, 40, 20, .08); }
.vd-status { margin: 0; font-size: .9rem; color: var(--text-faint); }
.vd-status b { color: var(--ink); font-weight: 700; }
.vd-meta-r { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.vd-reset { appearance: none; cursor: pointer; border: 0; background: none; padding: 6px 2px; font: 600 .88rem var(--font-body); color: var(--accent-strong); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(63, 110, 11, .35); }
.vd-reset:hover { text-decoration-color: currentColor; }
.vd-sort { display: inline-flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--text-faint); }
.vd-sort select { appearance: none; -webkit-appearance: none; cursor: pointer; padding: 9px 38px 9px 16px; border-radius: 100px; border: 1px solid rgba(20, 40, 20, .14); font: 600 .88rem var(--font-body); color: var(--ink); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23172018' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 15px center; }
.vd-sort select:hover { border-color: var(--accent); }

.vd-sub { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; font-size: 1.25rem; letter-spacing: -.02em; }
.vd-sub-n { padding: 3px 11px; border-radius: 100px; background: rgba(108, 183, 15, .14); color: var(--accent-strong); font: 700 .8rem var(--font-display); }
.vd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.vd-grid .rs-vcard { flex: none; }
.vd-empty { margin: 8px 0 0; padding: 26px; border-radius: 20px; background: rgba(108, 183, 15, .1); color: var(--accent-strong); font-weight: 600; text-align: center; }

/* ---------- shorts ---------- */
.vd-sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.vd-sgrid .rs-vcard.short { flex: none; }
.vd-more { display: flex; justify-content: center; margin-top: 34px; }
.vd-more .btn { min-width: 260px; justify-content: center; }

/* ---------- banda de canal y pódcast ---------- */
.vd-band-grid { max-width: 920px; margin-inline: auto; }
.vd-band .rs-card { display: flex; flex-direction: column; align-items: flex-start; }
.vd-band .rs-card img { width: 84px; height: 84px; }
.vd-band .rs-card p { margin-bottom: 22px; }
.vd-band .rs-card .btn { margin-top: auto; }

/* ---------- CTA ---------- */
.vd-cta { text-align: center; }
.vd-cta-actions { justify-content: center; margin-bottom: 0; }

/* ---------- reproductor emergente ---------- */
.vd-modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(3, 10, 5, .86); backdrop-filter: blur(8px); }
.vd-modal.is-open { display: flex; animation: vd-fade .25s ease; }
.vd-modal-box { position: relative; width: min(960px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 14px; }
.vd-modal.is-short .vd-modal-box { width: min(380px, 100%); }
.vd-modal-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9); border: 1px solid rgba(255, 255, 255, .12); }
.vd-modal.is-short .vd-modal-frame { aspect-ratio: 9 / 16; max-height: calc(100vh - 170px); margin-inline: auto; }
.vd-modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vd-modal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; color: #fff; }
.vd-modal-title { margin: 0; font: 600 1rem/1.3 var(--font-display); color: #fff; flex: 1 1 260px; }
.vd-modal-yt { color: var(--lime-2); font: 600 .9rem var(--font-display); white-space: nowrap; }
.vd-modal-yt:hover { text-decoration: underline; }
.vd-modal-close { position: absolute; right: 0; top: -54px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .25s, color .25s; }
.vd-modal-close:hover { background: var(--lime); color: var(--ink); }
.vd-modal.is-short .vd-modal-close { right: 0; }
@keyframes vd-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- franja para la portada (videos-teaser.php) ---------- */
.vd-teaser .rs-rail { margin-top: 8px; }
.vd-teaser-more { display: flex; justify-content: center; margin-top: 10px; }
.vd-teaser-more .btn { display: inline-flex; align-items: center; gap: 10px; }
.vd-teaser .vd-feature-title { color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .vd-hero { padding: 140px 0 70px; }
  .vd-hero-grid { grid-template-columns: 1fr; gap: 30px; margin-bottom: 44px; }
}
@media (max-width: 640px) {
  .vd-hero { padding: 120px 0 56px; }
  .vd-filters { padding: 14px; border-radius: 24px; gap: 14px; }
  .vd-search { flex-basis: 100%; height: 50px; }
  .vd-seg { display: flex; width: 100%; }
  .vd-seg button { flex: 1 1 0; justify-content: center; padding: 0 8px; gap: 6px; }
  .vd-seg button i { display: none; }
  .vd-topics { flex-wrap: nowrap; overflow-x: auto; margin-inline: -14px; padding: 2px 14px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .vd-topics::-webkit-scrollbar { display: none; }
  .vd-chip { flex: none; scroll-snap-align: start; }
  .vd-meta { flex-direction: column; align-items: stretch; }
  .vd-meta-r { justify-content: space-between; }
  .vd-grid { grid-template-columns: 1fr; }
  .vd-sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .vd-modal { padding: 14px; }
  .vd-modal-close { top: -50px; }
}

/* ---------- movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .vd-modal.is-open { animation: none; }
  .vd-chip, .vd-modal-close, .vd-seg-thumb { transition: none; }
  .vd-chip:hover { transform: none; }
}
