/* Youtube 视频嵌入 */
.embed-block .embed-video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
}
.embed-block .embed-video-frame.is-4-3 {
    padding-top: 75%; /* 4:3 */
}
.embed-block .embed-video-frame.is-21-9 {
    padding-top: 42.857%; /* 21:9 */
}
.embed-block .embed-video-frame iframe {
    position: absolute !important;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

/* 表格块（templates/blocks/table_block.html）：单元格垂直居中修正
   cell_text 是 RichTextBlock，Wagtail 富文本会输出 <p>…</p>；
   Bootstrap 的 p{margin-bottom:1rem} 让单元格内容盒底部多出 1rem 空白，
   文字因此整体偏上、无法垂直居中（表头是 CharBlock 纯文本，所以表头正常、数据行错位）。
   这里只清掉单元格内最后一个子元素的下边距，段与段之间的行距保留。 */
.table td,
.table th {
    vertical-align: middle;
}
.table td > :last-child,
.table th > :last-child,
.table td p:last-child,
.table th p:last-child {
    margin-bottom: 0;
}
