/* Custom styles for Bootstrap 4 Horizontal Theme */

/* Adjust card height in grid */
.card {
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-img-top {
    width: 100%;
    object-fit: cover;
    max-height: 227px;
    height: 227px;
}
.wp-block-image{
 display: grid;
}
/* Sticky sidebar on single posts */
@media (min-width: 992px) {
    .sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 20px;
    }
}

/* Pagination styles */
/* 分页容器样式 */
.navigation.pagination {
    margin: 30px 0;
    text-align: center;
}

/* 隐藏屏幕阅读器文本 */
.screen-reader-text {
    position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* 分页链接容器 */
.nav-links {
    display: inline-flex;
    gap: 5px;
}

/* 通用页码样式 */
.page-numbers {
    display: inline-block;
    padding: 6px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    font-size: 16px;
    line-height: 1.5;
    margin: 0 .125rem;
}

/* 当前页样式 */
.page-numbers.current {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
    font-weight: bold;
}

/* 上一页/下一页样式 */
.page-numbers.prev,
.page-numbers.next {
    padding: 8px 20px;
}

/* 悬停效果 */
.page-numbers:not(.current):hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

/* 移动端响应式 */
@media (max-width: 576px) {
    .page-numbers {
        padding: 6px 10px;
        font-size: 14px;
    }
    .page-numbers.prev,
    .page-numbers.next {
        padding: 6px 12px;
    }
}
.item-body{padding: 3rem}
.rounded-4{border-radius: .9rem}

@media screen and (max-width: 768px) {
    .item-body{padding: 1rem}

  }
  

.content{
    line-height: 2.4;
}

.content img {
	max-width:500px;
}
.menu-item {margin-right: 1.6em;}



/* Related Posts Grid Styles */
.related-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.related-post-item {
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    overflow: hidden;
}

.related-post-thumbnail {
    display: block;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 比例 */
    position: relative;
    background-color: #f8f9fa;
}

.related-post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-content {
    padding: 10px 0;
}

.related-post-title {
    margin: 0 0 5px 0;
    font-size: 0.95rem;
    line-height: 1.3;
}

.related-post-title a {
    color: #333;
    text-decoration: none;
}

.related-post-date {
    display: block;
    color: #6c757d;
    font-size: 0.75rem;
}

/* 响应式调整 */
@media (min-width: 576px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}