/* ==========================================
   1. 移动端菜单文字颜色设定
   ========================================== */
@media (max-width: 991px) {
    .offcanvas-menu *,
    .bs-offcanvas *,
    .off-canvas-wrap *,
    [class*="offcanvas"] *,
    .navigation-section .navbar-collapse *,
    .navigation-section .navbar-header *,
    .offcanvas-menu a,
    .bs-offcanvas a,
    [class*="offcanvas"] a,
    .navigation-section a {
        color: #000000 !important;
    }
}

/* ==========================================
   2. 隐藏 Popular Tags 热门标签栏
   ========================================== */
.mg-popular-tags,
.popular-tags-wrapper,
.mg-posts-tags,
.popular-tags,
.bs-popular-tags,
.top-tags,
div[class*="popular-tag"] {
    display: none !important;
}

/* ==========================================
   3. 规范整站与 Main Banner 缩略图渲染
   ========================================== */
.mg-blog-post-box .mg-blog-thumb,
.mg-header-post .mg-blog-thumb,
.mg-blog-post-3 .mg-blog-thumb,
.double-tiles .mg-blog-thumb,
.mg-posts-sec .mg-blog-thumb {
    display: block !important;
    width: 100% !important;
    height: 180px !important;
    overflow: hidden !important;
}

.mg-blog-post-box .mg-blog-thumb img,
.mg-header-post .mg-blog-thumb img,
.mg-blog-post-3 .mg-blog-thumb img,
.double-tiles .mg-blog-thumb img,
.double-tiles img,
.mg-posts-sec .mg-blog-thumb img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* ==========================================
   4. HivePress 分类网格 5 列布局与卡片缩放设置
   ========================================== */
/* 强制 PC 桌面端分类网格显示为一行 5 个 */
@media (min-width: 992px) {
    .hp-listing-categories .hp-grid,
    div[class*="hp-listing-categories"] .hp-grid {
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    .hp-listing-categories .hp-grid__item,
    div[class*="hp-listing-categories"] .hp-grid__item {
        flex: 0 0 20% !important;
        max-width: 20% !important;
        width: 20% !important;
    }
}

/* 优化分类标题：缩小字号并强制中英文分两行展示 */
.hp-listing-category__name,
.hp-listing-category__title,
.hp-category__name {
    font-size: 13px !important;
    line-height: 1.3 !important;
    text-align: center !important;
    white-space: pre-line !important;
}

/* 将 HivePress 的信息/广告卡片整体缩小一半 */
.hp-listing {
    transform: scale(0.5);
    transform-origin: top left;
    margin-bottom: -50%;
}

/* 自定义“免费发布广告”按钮蓝色背景样式 */
.btn-blue-publish,
a.btn-blue-publish,
.wp-block-button__link.btn-blue-publish {
    background-color: #0056b3 !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    font-weight: bold !important;
    border: none !important;
    transition: background-color 0.2s ease-in-out;
}

.btn-blue-publish:hover,
a.btn-blue-publish:hover {
    background-color: #004085 !important;
    color: #ffffff !important;
}

/* ==========================================
   5. yrmus.com 报刊专刊全局复古 CSS 样式
   ========================================== */
html {
    scroll-behavior: smooth;
    background-color: #f7f5f0;
}

:target {
    scroll-margin-top: 100px;
}

/* 官方公告声明栏 */
.newspaper-notice-box {
    border: 2px solid #111;
    background: #eef1f5;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 20px;
}

/* 报纸风格豆腐块卡片 */
.page-slug-newspaper-ads .hp-listing,
.newspaper-card {
    border: 1px solid #111 !important;
    border-radius: 0px !important;
    box-shadow: none !important;
    background: #ffffff !important;
    padding: 10px !important;
    margin-bottom: 15px !important;
    transition: all 0.2s ease-in-out;
}

.newspaper-card:hover {
    border-color: #000 !important;
    background-color: #fafafa !important;
}

/* 各板块黑底白字标题 */
.newspaper-block-title {
    background-color: #111111;
    color: #ffffff !important;
    padding: 6px 14px;
    font-size: 16px;
    font-weight: bold;
    display: inline-block;
    margin: 20px 0 15px 0;
    letter-spacing: 1px;
}

/* 顶部分类导航按钮 */
.newspaper-nav-buttons .wp-block-button__link {
    border-radius: 0px !important;
    border: 1px solid #111 !important;
    background-color: #ffffff !important;
    color: #111111 !important;
    font-weight: bold !important;
    font-size: 14px !important;
    padding: 6px 12px !important;
    margin-bottom: 6px;
}

.newspaper-nav-buttons .wp-block-button__link:hover {
    background-color: #111111 !important;
    color: #ffffff !important;
}

/* ==========================================
   6. 精准短色块标题与限制宽度折行
   ========================================== */
/* 主分类标题：粉蓝色短色块 */
h2.newspaper-block-title,
.newspaper-block-title {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
    background-color: #5B9BD5 !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    margin-top: 25px !important;
    margin-bottom: 8px !important;
    margin-left: 0 !important;
    border-radius: 2px !important;
    clear: both !important;
}

/* 细分服务：最大宽度设为 380px，适应长标题并自然折行 */
p.newspaper-sub-services,
.newspaper-sub-services {
    display: block !important;
    width: 100% !important;
    max-width: 380px !important;
    color: #444444 !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    white-space: normal !important;
    word-break: break-word !important;
    margin-top: 4px !important;
    margin-bottom: 15px !important;
    margin-left: 0 !important;
    text-align: left !important;
}

/* ==========================================
   7. 终极强力隐藏“官方分类广告专刊”网格卡片及空白容器
   ========================================== */
.hp-listing-category--official-newspaper,
.hp-listing-category--official-ads,
.hp-grid__item:has(.hp-listing-category--official-newspaper),
.hp-grid__item:has(.hp-listing-category--official-ads),
.hp-grid__item:has(a[href*="official"]),
[class*="col-"]:has(a[href*="official"]),
.hp-listing-categories__item:has(a[href*="official"]),
div[class*="hp-listing-category"]:has(a[href*="official"]) {
    display: none !important;
}
/* 强制将所有系统/主题默认按钮设置为蓝色背景与白色文字 */
.wp-block-button__link,
.wp-element-button,
a.wp-block-button__link {
    background-color: #0056b3 !important;
    background: #0056b3 !important;
    color: #ffffff !important;
}

/* 鼠标悬停变深蓝色 */
.wp-block-button__link:hover,
.wp-element-button:hover,
a.wp-block-button__link:hover {
    background-color: #004085 !important;
    background: #004085 !important;
    color: #ffffff !important;
}