/* ==========================================================================
   Content Styles - 文章/页面内容区样式
   ========================================================================== */

/* 限制文章摘要的显示行数 */
.wp-block-greenshift-blocks-container .ct-dynamic-data {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 内容区图片居中 */
.entry-content p img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 5px;
}

/* 仅针对文章和页面的正文区域内图片最大宽度 */
.single-post .entry-content img,
.single-page .entry-content img,
.single-page .single-tool_block img {
    max-width: 768px; 
}

/* 内容区列表样式重置 */
.entry-content ul {
    padding-left:0;
}

.entry-content ul li {
    list-style: none;
}

/* Websager 文章推荐标题 */
.entry-content .pdp-section-title {
    font-weight: 500;
}

/* Interlinks Manager 内链样式 */
.entry-content a[data-ail] {
  color: #555;
  text-decoration: none;
  border-bottom: 1px dashed #999;
  font-weight: normal;
  transition: all 0.2s ease-in-out;
}

.entry-content a[data-ail]:hover {
  color: #0056b3;
  border-bottom-color: #0056b3;
  border-bottom-style: solid;
}

/* [websager短代码] 推荐链接专属样式 (文本模式) */
.ws-post-rec-link {
    color: #0056b3;
    font-weight: 400;
    text-decoration: none;
    border-bottom: 1px dotted #0056b3;
    margin:1.5em 0.5em;
}

.ws-post-rec-link:hover {
    color: #007bff;
    border-bottom-style: solid;
}

.entry-content > .ws-post-rec-link {
    display: block;
    max-width: 720px;
    width: fit-content;
}

/* [websager短代码] 推荐链接专属样式 (卡片模式) */
.entry-content > .ws-post-rec-card,
.entry-content > .ws-post-rec-image-card {
    max-width: 720px;
    margin: 1.5em auto;
}

/* [websager短代码] 文章页面推荐商品样式 */
.ws-product-default {
  display: block;
  margin: 15px 0;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
.ws-product-default a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.ws-product-image {
  flex: 0 0 auto;
  margin-right: 15px;
}
.ws-product-default .ws-product-image img {
  width: auto;
  max-width: 120px;
  height: auto;
  max-height: 120px;
  object-fit: contain;
  border-radius: 6px;
}
.ws-product-info {
  flex: 1 1 auto;
}
.ws-product-default .ws-title {
  font-weight: bold;
  font-size: 1.1em;
  display: block;
  transition: color 0.2s ease-in-out;
}
.ws-product-default .ws-title:hover {
  color: #ce5a45;
}
.ws-product-price {
  flex: 0 0 auto;
  margin-left: 15px;
  display: flex;
  align-items: center;
}
.ws-product-default .ws-price {
  font-weight: bold;
  color: #e63946;
  white-space: nowrap;
}

/* 内容区表格样式 */
.type-post .entry-content table,
.type-post .post-content table,
.type-post .wp-block-table table,
.ba-table {
    border-collapse: collapse;
    margin: 2em 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border: 1px solid #ddd;
}

.type-post .entry-content table thead th,
.type-post .post-content table thead th,
.type-post .wp-block-table table thead th,.ba-table thead th {
    background-color: #2c3e50;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px;
    text-align: left;
    border: 1px solid #0f1a25;
}

.type-post .entry-content table td,
.type-post .post-content table td,
.type-post .wp-block-table table td,.ba-table td {
    padding: 12px 16px;
    border: 1px solid #ddd;
    color: #333;
    transition: background-color 0.2s ease;
}

.type-post .entry-content table tbody tr:nth-child(even),
.type-post .post-content table tbody tr:nth-child(even),
.type-post .wp-block-table table tbody tr:nth-child(even),
.ba-table tbody tr:nth-child(even) {
    background-color: #f0f2f5;
}

.type-post .entry-content table tbody tr:hover,
.type-post .post-content table tbody tr:hover,
.type-post .wp-block-table table tbody tr:hover,
.ba-table tbody tr:hover {
    background-color: #e6f0ff;
}

/* 自定义YouTube短代码的响应式样式 */
.custom-youtube-container {
    margin:0 auto;
    text-align: center;
}

/* 表格响应式处理 */
@media screen and (max-width: 999.98px) {
    .type-post .entry-content table,
    .type-post .post-content table,
    .type-post .wp-block-table table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    .type-post .entry-content table thead th,
    .type-post .post-content table thead th,
    .type-post .wp-block-table table thead th {
        padding: 12px;
        font-size: 13px;
        border: 1px solid #0f1a25;
    }
    .type-post .entry-content table td,
    .type-post .post-content table td,
    .type-post .wp-block-table table td {
        padding: 10px 12px;
        font-size: 13px;
        border: 1px solid #ddd;
    }
}

/* 响应式调整 */
@media (max-width: 999.98px) {
  .ws-product-default a {
    flex-direction: column;
    align-items: stretch;
  }
  .ws-product-image {
    margin-right: 0;
    margin-bottom: 10px;
    width: 100%;
    text-align: center;
  }
  .ws-product-default .ws-product-image img {
    max-width: 100%; 
    max-height:500px;
    height: auto;
  }
  .ws-product-info {
    width: 100%;
    text-align: center;
  }
  .ws-product-price {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
    justify-content: center;
  }
}