/**
 * 子比主题相关文章扩展插件样式
 */

/* 通用样式 */
.relates {
    margin-bottom: 15px;
}

.title-theme {
    position: relative;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* 列表样式 */
.relates ul.no-thumb {
    margin: 0;
    padding: 0;
    list-style: none;
}

.relates ul.no-thumb li {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #f1f1f1;
}

.relates ul.no-thumb li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.relates ul.no-thumb a {
    display: block;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    color: #555;
}

.relates ul.no-thumb a:hover {
    color: #3ca5f6;
}

.relates ul.no-thumb a.icon-circle::before {
    content: "⚬";
    margin-right: 8px;
    color: #3ca5f6;
}

/* 图文卡片样式 */
.relates-thumb .swiper-container.swiper-scroll {
    padding: 0;
    overflow: hidden;
    position: relative;
}

/* 不覆盖主题的 swiper-slide 宽度计算，让 swiper-scroll-eq-X 类自行控制 */
.relates-thumb .swiper-slide {
    height: auto;
    box-sizing: border-box;
}

/* 修正 graphic 卡片容器，确保比例正常不被压扁 */
.relates-thumb .graphic {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    width: 100%;
    display: block;
}

/* 确保 graphic 内的图片正确填充 */
.relates-thumb .graphic img.fit-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 修正文字覆盖层定位 */
.relates-thumb .graphic .graphic-text {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 10px;
    z-index: 2;
}

/* 导航按钮样式完全交给子比主题控制，插件不覆盖 */

/* 基本卡片样式（无主题函数时的 fallback）- 用 transform 代替 box-shadow 过渡 */
.relates-thumb .card {
    overflow: hidden;
    border-radius: 6px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform .2s ease-out;
    will-change: transform;
}

.relates-thumb .card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.relates-thumb .card img {
    width: 100%;
    height: 0;
    padding-bottom: 70%;
    object-fit: cover;
}

.relates-thumb .card-body {
    padding: 10px;
}

.relates-thumb .card-title {
    font-size: 14px;
    margin: 0 0 5px;
    height: 40px;
    overflow: hidden;
    line-height: 1.4;
}

.relates-thumb .card-title a {
    color: #333;
}

.relates-thumb .card-title a:hover {
    color: #3ca5f6;
}

.relates-thumb .card-text {
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: space-between;
}

/* 导航样式 */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
}

.navigation-item {
    flex: 1;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: border-color .15s ease-out, background-color .15s ease-out;
}

.navigation-item:hover {
    border-color: #ddd;
    background-color: #f9f9f9;
}

.navigation-item a {
    display: block;
    color: #666;
}

.prev-item {
    margin-right: 5px;
    text-align: left;
}

.next-item {
    margin-left: 5px;
    text-align: right;
}

.nav-direction {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.nav-content {
    display: flex;
    align-items: center;
}

.prev-item .nav-content {
    flex-direction: row;
}

.next-item .nav-content {
    flex-direction: row-reverse;
}

.nav-img {
    width: 60px;
    height: 45px;
    overflow: hidden;
    border-radius: 3px;
    flex-shrink: 0;
}

.nav-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-title {
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0 10px;
    flex: 1;
}

