/*
======================================================================
  全局样式：只要设置了：dir="rtl"，就会遵循该规则
  Arabic / RTL text support
======================================================================
*/
.rtl-text {
  direction: rtl;
  unicode-bidi: isolate;
}

/*
======================================================================
  EMBED 模块样式
  包含：视频嵌入内容块样式
======================================================================
*/

/* 嵌入视频内容块样式 */
.embed-block-wrapper {
  width: 100%;                     /* 宽度占满容器 */
  max-width: 100%;                 /* 最大宽度为100%，防止溢出 */
  margin: 1rem 0;                  /* 上下边距1rem，与其他内容保持间距 */
}

/* 响应式嵌入容器 */
.embed-responsive {
  position: relative;              /* 相对定位，为子元素绝对定位提供参考 */
  display: block;                  /* 块级元素显示 */
  height: 0;                       /* 高度设为0，通过padding-bottom控制实际高度 */
  padding: 0;                      /* 内边距为0 */
  overflow: hidden;                /* 隐藏溢出内容 */
}

/* 嵌入内容项通用样式 */
.embed-responsive .embed-responsive-item,
.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object,
.embed-responsive video {
  position: absolute;              /* 绝对定位 */
  top: 0;                          /* 顶部对齐 */
  bottom: 0;                       /* 底部对齐 */
  left: 0;                         /* 左侧对齐 */
  width: 100%;                     /* 宽度占满容器 */
  height: 100%;                    /* 高度占满容器 */
  border: 0;                       /* 无边框 */
}

/* 16:9宽高比设置 */
.embed-responsive-16by9 {
  padding-bottom: 56.25%;          /* 16:9比例计算：9/16 = 56.25% */
}

/* 段落中嵌入内容的响应式样式 */
.block-paragraph_block div[data-embed] .embed-responsive {
  margin: 1rem 0;                  /* 上下边距1rem */
  width: 100%;                     /* 宽度占满容器 */
  max-width: 100%;                 /* 最大宽度100% */
}

/*
======================================================================
  WECHAT 模块样式
  包含：微信二维码悬停展示样式
======================================================================
*/

/* 微信容器 */
.footer__icon.wechat-container {
  position: relative;                /* 相对定位 */
  display: inline-block;             /* 行内块显示 */
}

/* 微信二维码悬停显示样式 */
.footer__icon.wechat-container {
  position: relative;                /* 相对定位 */
  display: inline-block;             /* 行内块显示 */
}

/* 微信二维码弹窗 */
.footer__icon.wechat-container .wechat-qr-popup {
  position: absolute;                /* 绝对定位 */
  bottom: 100%;                      /* 距离底部100%，即显示在图标上方 */
  left: 50%;                         /* 距离左侧50% */
  transform: translateX(-50%);       /* 水平居中 */
  width: 200px;                      /* 宽度200px */
  padding: 10px;                     /* 内边距 */
  background-color: #fff;            /* 背景色 */
  border: 1px solid #ddd;            /* 边框 */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 阴影 */
  z-index: 1000;                     /* 层级 */
  display: none;                     /* 默认隐藏 */
  margin-bottom: 10px;               /* 与下方图标的间距 */
}

/* 微信二维码悬停显示 */
.footer__icon.wechat-container:hover .wechat-qr-popup {
  display: block;                    /* 显示 */
}

/* 微信二维码弹窗箭头 */
.footer__icon.wechat-container .wechat-qr-popup::before {
  content: "";                       /* 内容为空 */
  position: absolute;                /* 绝对定位 */
  top: 100%;                         /* 距离顶部100%，即箭头指向下方 */
  left: 50%;                         /* 距离左侧50% */
  transform: translateX(-50%);       /* 水平居中 */
  border: 5px solid transparent;     /* 透明边框 */
  border-bottom-color: #ddd;         /* 底部边框颜色，指向图标 */
}

/* 微信二维码弹窗箭头内部 */
.footer__icon.wechat-container .wechat-qr-popup::after {
  content: "";                       /* 内容为空 */
  position: absolute;                /* 绝对定位 */
  top: 100%;                         /* 距离顶部100% */
  left: 50%;                         /* 距离左侧50% */
  transform: translateX(-50%);       /* 水平居中 */
  border: 5px solid transparent;     /* 透明边框 */
  border-bottom-color: #fff;         /* 底部边框颜色，指向图标 */
  margin-top: -1px;                  /* 微调位置，确保箭头显示正确 */
  z-index: 1001;                     /* 层级 */
}


/*
======================================================================
  TABLE BLOCK 模块样式
  包含：动态表格样式（支持任意行列数）
======================================================================
*/

.table-block {
    margin: 1.5rem 0;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

/* 横向滚动容器 */
.table-block__scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.table-block__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background-color: #ffffff;
    min-width: 800px;
    margin: 0;
    border-spacing: 0;
    display: table;
}

.table-block__head {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.table-block__head .table-block__row {
    border-bottom: 2px solid #e5e7eb;
}

.table-block__body .table-block__row {
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s ease;
}

.table-block__body .table-block__row:hover {
    background-color: #f9fafb;
}

/* 偶数行背景色 */
.table-block__body .table-block__row:nth-child(even) {
    background-color: #fafbfc;
}

.table-block__body .table-block__row:nth-child(even):hover {
    background-color: #f3f4f6;
}

/* 表头单元格 */
.table-block__head .table-block__header-cell {
    padding: 12px 1rem;
    vertical-align: middle;
    text-align: left;
    border-right: 1px solid #e5e7eb;
    font-weight: 600;
    font-size: 0.8rem;
    color: #374151;
    white-space: nowrap;
    background-color: #f9fafb;
    height: 48px;
}

.table-block__head .table-block__header-cell:last-child {
    border-right: none;
}

/* 表格内容单元格 */
.table-block__body .table-block__cell {
    padding: 12px 1rem;
    vertical-align: middle;
    text-align: left;
    border-right: 1px solid #f3f4f6;
    color: #4b5563;
    font-size: 0.875rem;
    height: 48px;
    white-space: nowrap;
}

.table-block__body .table-block__cell:last-child {
    border-right: none;
}

/* 重置单元格内 p 标签的默认样式 - 解决垂直居中问题 */
.table-block__header-cell p,
.table-block__cell p {
    margin: 0;
    line-height: inherit;
    color: inherit;
}

/* 响应式表格 */
@media (max-width: 767px) {
    .table-block {
        margin: 1rem 0;
        border-radius: 6px;
    }

    .table-block__scroll-wrapper {
        border-radius: 6px;
    }

    .table-block__head .table-block__header-cell,
    .table-block__body .table-block__cell {
        padding: 10px 0.75rem;
        font-size: 0.8rem;
        height: 44px;
    }
}

/* 滚动条美化（Webkit 浏览器） */
.table-block__scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-block__scroll-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-block__scroll-wrapper::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
    transition: background 0.2s;
}

.table-block__scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Firefox 滚动条样式 */
.table-block__scroll-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #f1f5f9;
}


/*
======================================================================
  FLEXIBLE GRID 模块样式
  包含：灵活网格布局（支持2/3/4列自适应）
======================================================================
*/

.flexible-grid {
    display: grid;
    gap: var(--gap-size);
    margin-bottom: 2rem;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.gap-small {
    --gap-size: 1rem;
}

.gap-medium {
    --gap-size: 1.5rem;
}

.gap-large {
    --gap-size: 2.5rem;
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .grid-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 手机端：2列布局改为单列显示 */
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}


/*
======================================================================
  其他辅助样式
======================================================================
*/

/* Critical CSS for above-the-fold content */
.critical {
    /* Add any critical styles here that are needed for immediate rendering */
}

/* 添加视频区域背景 */
.vs-video-section-bg {
    background-image: url("../img/video/video-bg-2.f8e269df963e.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}
