/* =========================================================
   public/themes/modern-white/assets/css/media-resource.css
   Video (YouTube / File) — único sistema responsivo 16:9
   ========================================================= */

.cp-video{
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

/* Reserva el alto 16:9 */
.cp-video::before{
  content:"";
  display:block;
  padding-top: 56.25%; /* 16:9 */
}

/* Capa absoluta que ocupa todo el contenedor */
.cp-video-iframe,
.cp-video-tag{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

/* Para <video> */
.cp-video-tag{
  object-fit: contain; /* o "cover" si prefieres recorte */
  background: #000;
}

/* Si quieres que el iframe tenga bordes internos (opcional) */
/* .cp-video-iframe{ } */

/* Botón de abrir en modal (si lo implementas) */
.cp-video-actions{
  position:absolute;
  right:10px;
  top:10px;
  display:flex;
  gap:8px;
  z-index: 2;
}

.cp-video-action{
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.45);
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.cp-video-action:hover{
  background: rgba(0,0,0,.65);
}

/* =========================================================
   Image resource — ajusta al contenedor + "hint" + modal hook
   ========================================================= */

.cp-figure{ margin: 0; }

.cp-img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fff;
}

/* Botón transparente para abrir modal */
.cp-imgbtn{
  all: unset;
  display: block;
  width: 100%;
  cursor: zoom-in;
  position: relative;
}
.cp-imgbtn:focus-visible{
  outline: 2px solid rgba(37,99,235,.45);
  outline-offset: 4px;
  border-radius: var(--radius-md);
}

/* Hint “Ver” */
.cp-imgbtn__hint{
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
}

.cp-figure{ margin: 0; }
.cp-img{
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fff;
}
.cp-img-link{ display:block; }
.cp-caption{
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}
.cp-caption-link{ text-decoration: underline; }

/* =========================================================
   File resource (descargas)
   ========================================================= */

.cp-resource-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px;
  border:1px solid var(--border, #e7e7e7);
  border-radius:12px;
  background: var(--card, #fff);
}

.cp-resource-row__title{
  font-weight:800;
}

.cp-resource-row__hint{
  margin-top:4px;
  font-size:13px;
}

.cp-resource-row__actions{
  flex:0 0 auto;
}
