/*
Theme Name: Hello Elementor Child
Theme URI: https://elementor.com/hello-theme/?utm_source=wp-themes&utm_campaign=theme-uri&utm_medium=wp-dash
Template: hello-elementor
Author: Elementor Team
Author URI: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash
Description: Hello Elementor is a lightweight and minimalist WordPress theme that works seamlessly with Elementor.
Tags: accessibility-ready,flexible-header,custom-colors,custom-menu,custom-logo,featured-images,rtl-language-support,threaded-comments,translation-ready
Version: 3.3.0.1756517024
Updated: 2025-08-30 09:23:44
*/

/* 重置 body 避免默认 margin/padding 影响 */
body, html {
    margin: 0;
    padding: 0;
}

/* -------------------- 仿评论区 Q&A 样式 -------------------- */
.qadiv {
   position: relative;box-sizing: border-box;width: 100%;padding: 40px 10px 20px 10px;margin: 25px 0 0 0;border: 1px solid #898888;border-radius: 8px;
    background: #f0f0f0;
    overflow: hidden;
    height: auto;
}

.qadiv::before {
  content: "";
  display: block;          /* 强制是块级元素，有宽高 */
  position: absolute;
  top: 0;
  left: 30px;
  width: 120px;
  height: 80px;            /* 测试先给40px */
  background: url("https://www.bestpelletplant.com/static/images/qa_03.jpg") no-repeat left top;
  background-size: contain;         
  z-index: 10;             /* 确保在内容上层 */
}


.qadiv .qabgimg {
    background: url("https://www.bestpelletplant.com/static/images/qa_01.jpg") no-repeat right bottom;
    padding-bottom: 30px;
}

.qadiv .qabgimg ul .q {
    border-bottom: 1px solid #ccd1d5;
    color: #18457C;
    font-size: 14px;
    font-style: italic;
    padding: 10px 10px 5px 5px;
    position: relative;
    margin-bottom: 15px;
}

.qadiv .qabgimg ul .q::before {
    content:"\f059";   /* Font Awesome 问号图标 */
    font-family:"Font Awesome 5 Free";  
    font-weight:900;   
    font-size:20px;
    color:#7E9DA1;     /* 图标颜色 */
    opacity:0.9;
    display:inline-block;   /* 让图标紧挨文字 */
    margin-right:5px;       /* 图标与文字间距，可调整 */
    position:static;        /* 不再绝对定位 */
    transform:none;          /* 去掉垂直居中偏移 */
}


.qadiv .qabgimg ul .a {
    padding: 14px 0 20px 30px;
    position: relative;
    margin-bottom: 20px;
    background: #f0f0f0;
    border-radius: 6px;
    margin-left: 20px;
    color: #484848 !important;
}

.qadiv .qabgimg ul .a::before {
    content: "\f500";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 20px;
    color: #7E9DA1;

    display: inline-block;   /* 图标与文字在同一行 */
    margin-right: 5px;       /* 图标与文字间距 */

    position: relative;      /* 取消绝对定位影响 */
    top: 0;                  /* 避免错位 */
    left: 0;
}

.qadiv .qabgimg ul .q:first-child {
    margin-top: -20px; /* 调整图片底部到 li 顶部为 10px */
}


@media (max-width:768px) {
    .qadiv {
        padding: 100px 15px 15px;
    }
    .qadiv::before {
        height: 80px;
    }
    .qadiv .qabgimg ul .q {
        padding-left: 35px;
    }
    .qadiv .qabgimg ul .a {
        padding-left: 50px;
        margin-left: 10px;
    }
    .qadiv .qabgimg ul .a::before {
        left: 15px;
        font-size: 20px;
    }
}

/* -------------------- Main Contents 样式 -------------------- */
.main_contents p {
    margin-top: 0;
    margin-bottom: 2px;
    padding: 5px 0;
}

.main_contents h2 {
    background: #f2f2f2;
    color: #18457c;
    font-size: 20px;
    border-left: 6px solid #db3d3c;
    padding: 10px 15px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.main_contents h3{
    color: #18457c;
    font-size: 16px;
    font-weight: bold;
    font-family: Verdana;
    line-height: 25px;
    margin-top: 15px}

.main_contents h3::before {
    content: "\f085";
    font-family: FontAwesome;
    color: #979797;
    margin-right: 10px;
    font-weight: normal;
}

.main_contents h4 {
    padding: 0;
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    line-height: 25px;
}

.main_contents ul {
    list-style: none;
    padding: 5px 10px 10px 10px;
}

.main_contents ul li {
    color: #18457C;
    padding-left: 10px;
    border-bottom: 1px dashed #ddd;
    padding-top: 5px;
    padding-bottom: 5px;
    margin: 8px 0;
    position: relative;
}

.main_contents ul li::before {
    position: absolute;
    font-family: FontAwesome;
    content: "\f0da";
    font-size: 17px;
    margin-left: 10px !important;
    color: #7E9DA1;
}

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

.main_contents table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    text-align: center;
    border-color: #dadada;
    background-color: transparent;
}

.main_contents thead th {
    background: #18457c;
    color: #fff;
    font-weight: bold;
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    padding: 10px;
}

.main_contents td,
.main_contents th {
    padding: 10px;
    vertical-align: middle;
    border: 1px solid #dee2e6;
}

.main_contents tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,0.05);
}

.main_contents tbody tr:nth-of-type(even) {
    background-color: #ffffff;
}

.main_contents tbody tr:hover {
    background-color: rgba(0,0,0,0.075);
    transition: background 0.3s ease-in-out;
}

.main_contents a.wp-block-button__link.wp-element-button {
    background-color: white;
    font-weight: 500;
    color: #18457c;
    font-style: italic;
    padding: 10px 50px;
    margin: 10px 0;
}

/* ========== 通用按钮样式（桌面端为主） ========== */
.main_contents a.wp-block-button__link.wp-element-button {
    background-color: white;
    font-weight: 500;
    color: #18457c;
    font-style: italic;
    padding: 10px 50px;
    margin: 10px 0;
    text-align: center;
    transition: all 0.3s ease;
}

.main_contents a.wp-block-button__link.wp-element-button:hover {
    background-color: #C63738;
    color: #fff;
}

/* 按钮右侧箭头效果 */
.main_contents .wp-block-button__link::after {
    content: "🡺";
    font-size: 1em;
    margin-left: 0.5em;
    transition: transform 0.3s ease;
}

.main_contents .wp-block-button__link:hover::after {
    transform: translateX(3px);
}
/* 强制同行核心样式（穿透Elementor默认样式） */
.main_contents .wp-block-buttons,
.main_contents .wp-block-buttons .wp-block-buttons { /* 处理嵌套的按钮组 */
    display: flex !important;
    flex-direction: row !important; /* 强制水平排列 */
    flex-wrap: nowrap !important;
    width: 100% !important;
    min-width: 100% !important;
    justify-content: center !important; /* 居中排列 */
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 单个按钮容器样式 */
.main_contents .wp-block-button {
    display: inline-block !important;
    width: auto !important;
    min-width: auto !important;
    margin: 0 8px !important; /* 仅保留左右间距，取消上下间距 */
    flex: 0 0 auto !important;
}

/* 手机端强制压缩按钮尺寸 */
@media (max-width: 768px) {
    .main_contents a.wp-block-button__link.wp-element-button {
        padding: 8px 20px !important; /* 大幅减小内边距 */
        font-size: 0.85em !important; /* 缩小字体 */
    }
    .main_contents .wp-block-button {
        margin: 0 5px !important; /* 减小按钮间距 */
    }
}


  /* 表格在移动端的排版优化 */
  .main_contents table {
    font-size: 14px;
  }

  .main_contents thead th,
  .main_contents td {
    padding: 8px;
  }
}


.main .table th, .main .table th, .content .table th, .meright .table th {
    background: #5394d6 none repeat scroll 0 0;
    color: #fff;
    text-align: center;}
.main .col-md-9 table th {
    background: #828282;
    color: #fff;
    text-align: center;
    vertical-align: middle;}
/* -------------------- 视频容器样式 -------------------- */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 30px;
    height: 0;
    overflow: hidden;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* -------------------- 主题专题页面样式 -------------------- */
.topic_page .msize { padding-left: 15px; padding-right: 15px; }
.topic_page .asize { padding-left: 1px !important; padding-right: 1px !important; }
.topic_page .row { color:#4b4948; font-size:14px; line-height:25px; margin-left:0; margin-right:0; }
.topic_page img { max-width:100%; }
.topic_page .topic_center { text-align:center; font-style:italic; }
.topic_page p.topic_p { color:#4b4948; font-size:14px; line-height:25px; }
.topic_page .margin-b { margin:25px 0; }

/* H2 / H3 标题样式 */
.topic_page h2 {
    background: #f2f2f2;
    color: #18457c;
    font-size: 20px;
    border-left: 6px solid #db3d3c;
    padding: 20px 15px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.topic_page h3 {
    color: #18457c;
    font-size: 16px;
    font-weight: bold;
    font-family: Verdana, sans-serif;
    line-height: 35px;
    margin-top: 20px;
    position: relative;
}

.topic_page h3::before {
    content: "\f085";
    font-family: "FontAwesome";
    color: #979797;
    margin-right: 10px;
    font-weight: normal;
    display: inline-block;
}

/* 列表样式 */
.topic_page ul {
    padding-left: 0; /* 移除 ul 默认缩进 */
}

.topic_page ul li {
    color: #18457C;
    padding-top: 5px;
    padding-bottom: 5px;
    margin: 8px 0;
    list-style: none; /* 去掉默认圆点 */
    position: relative;
    padding-left: 15px ; /* 给 ::before 留出空间 */
    border-bottom: 1px dashed #ddd;
}

.topic_page ul li::before {
    position: absolute;
    left: 0px !important; /* 放在 li 左边 */
    top: 50%;
    transform: translateY(-50%); /* 垂直居中 */
    font-family: "FontAwesome";
    content: "\f0da";
    font-size: 17px;
    color: #7E9DA1;
}


/* Clearfix */
.clearfix:after, .clearfix:before { display: table; content: " "; }
.clearfix:after { clear: both; }

/* 响应式 */
@media (max-width:991px){ .topic_page .appul{ margin-top:10px; } }
@media (min-width:616px){ .topic_page .appul li{ width:50%; float:left; } }

/* -------------------- 列表默认图标自动替换 -------------------- */



/* 当 li 内存在任何 Font Awesome 图标时，自动去掉默认箭头 */
.main_contents ul li:has(i.fa)::before,
.topic_page ul li:has(i.fa)::before {
    content: none !important;
}
/* -------------------- 文章内容链接统一颜色且始终下划线 -------------------- */
.main_contents a,
.topic_page a {
    color: #004182 !important;
    text-decoration: underline !important; /* 始终显示下划线 */
}

.main_contents a:hover,
.topic_page a:hover {
    color: #004182 !important;
    text-decoration: underline !important; /* 悬停也保持下划线 */
}


.main_contents a:hover,
.topic_page a:hover {
    color: #004182 !important;
}

/* -------------------- 专题文章内图片间距 -------------------- */
.topic_page img {
    margin-top: 10px;
    margin-bottom: 10px;
}
/* -------------------- 专题文章内图片间距 -------------------- */
.topic_page img {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* -------------------- 专题文章内段落样式 -------------------- */
.topic_page p {
    margin-top: 10px;
    margin-bottom: 10px;
    line-height: 25px;
}
		// 取消rank math SEO自动添加的facebook twitter meta
		add_filter('rank_math/opengraph/twitter', '__return_false');
		add_filter('rank_math/opengraph/twitter_card', '__return_false');
		add_action( 'rank_math/head', function() {
			remove_all_actions( 'rank_math/opengraph/facebook' );
			remove_all_actions( 'rank_math/opengraph/twitter' );
		});
		// 取消permalink的自动小写
		add_filter('permalink_manager_force_lowercase_uris', '__return_false');
		add_filter('redirect_canonical', 'disable_case_redirects', 10, 2);
		
		function disable_case_redirects($redirect_url, $requested_url) {
		    if (strcasecmp($redirect_url, $requested_url) !== 0 && urldecode($redirect_url) !== urldecode($requested_url)) {
		        // 如果仅大小写不同，阻止跳转
		        if (strtolower($redirect_url) === strtolower($requested_url)) {
		            return false; // 禁用大小写重定向
		        }
		    }
		    return $redirect_url;
		}
/* 仅作用于页面和专题页的表格 */
.page table,
.topic_page table {
    width: 100% !important;
    border-collapse: collapse !important;
    border: 1px solid #ccc !important;
    font-family: Arial, sans-serif !important;
}

/* 表头通用样式 */
.page table th,
.topic_page table th {
    color: #fff !important;
    text-align: center !important;
    vertical-align: middle !important;
    padding: 8px !important;
    border: 1px solid #ccc !important;
}

/* --- 新增：让 topic_page 的表格表头改成深蓝色 --- */
.topic_page table th {
    background-color: #003b71 !important; /* 深蓝色 */
}

/* --- 保留：普通页面仍使用原来的灰色表头 --- */
.page table th {
    background-color: #828282 !important;
}

/* 表格单元格通用样式 */
.page table td,
.topic_page table td {
    border: 1px solid #ccc !important;
    padding: 8px !important;
    line-height: 1.42857 !important;
    vertical-align: middle !important;
    text-align: center !important;
}

/* 若使用 WP 默认 table（wp-block-table），确保标题行也变成蓝色 */
.wp-block-table table tr:first-child {
    background-color: #003b71 !important;
    color: #ffffff !important;
    font-weight: 400 !important;
    text-align: center !important;
}


/* 调整单元格间距，让表格更整齐 */
.wp-block-table td {
    padding: 10px 15px;
    border: 1px solid #ddd; /* 可选：让表格有边框 */
}

.feed-section {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start; /* ✅ 从 space-between 改成 flex-start */
  gap: 20px; /* ✅ 可调节间距，例如 20px 或 16px */
  margin: 40px 0;
  flex-wrap: nowrap;
  box-sizing: border-box;
}

.feed-section .img_col {
  flex: 0 0 50%;
  text-align: center;
}

.feed-section .img_col img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin-bottom: 10px;
}

.feed-section .text_col {
  flex: 0 0 48%;
  background-color: #eff0f1;
  padding: 28px 50px 28px 35px;
  border-radius: 10px;
  box-sizing: border-box;
}

.feed-section .text_col p {
  text-align: justify;
  line-height: 1.8em;
  margin-bottom: 18px;
}

/* 响应式：平板和手机端自动单栏 */
@media (max-width: 992px) {
  .feed-section {
    flex-direction: column;
  }
  .feed-section .img_col,
  .feed-section .text_col {
    flex: 1 1 100%;
  }
  .feed-section .text_col {
    padding: 20px;
  }
}


