@charset "utf-8";
/* ==========================================================================
   学术交流列表 —— 电子书书墙
   Target : //m.wshien.com/xsjl/
   方案   : 书墙网格 + 混色书封（3:4 竖版、书脊、书口厚度、抽取式悬停）

   作用域 : 只影响 .xueshu（中间内容区）。页头 / 导航 / 面包屑 / "加载更多" /
            页脚一条规则都没引用，站点其他页面不受影响。
   依赖   : 无。纯 CSS 也有渐变书封；配 ebook-list.js 才有书名与配色。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计变量
   -------------------------------------------------------------------------- */
.xueshu {
    --eb-brand: #004bb9;
    --eb-ink: #33415c;
    --eb-gray: #8792a2;
    --eb-gap-v: 38px;
    --eb-gap-h: 26px;
}

/* --------------------------------------------------------------------------
   2. 书架：一行四本，书直接立在页面水印背景上
   -------------------------------------------------------------------------- */
.xueshu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: var(--eb-gap-v) var(--eb-gap-h);
    padding-top: 4px;
    padding-bottom: 40px;
}

/* 原列表的虚线分隔改由"书"本身承担 */
.xueshu .item::after {
    content: none;
    border: 0;
    background: none;
}

/* 卡片退成书架格子：去掉白底、圆角、描边，让书立起来 */
.xueshu .item {
    position: relative;
    display: block;
    min-height: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    z-index: 10;
}

.xueshu .item:focus-visible {
    outline: 2px solid var(--eb-brand);
    outline-offset: 4px;
    border-radius: 4px;
}

/* --------------------------------------------------------------------------
   3. 书封
      ::before 是纯 CSS 兜底书封（脚本没跑时也有形）；
      .eb-cover 由 ebook-list.js 注入，带分类标签 / 书名 / 落款。
   -------------------------------------------------------------------------- */
.xueshu .item::before,
.eb-cover {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    margin-bottom: 22px;
    padding: 24px 18px 16px 26px;
    border-radius: 3px 9px 9px 3px;
    background: linear-gradient(150deg, #1a6ecb 0%, #04408f 52%, #04224c 100%);
    /* 右侧 2/4/6px 三片实色 = 叠着的书口；后两条 = 落地投影 */
    box-shadow:
        2px 0 0 0 #e9eff8,
        4px 0 0 0 #dde5f1,
        6px 0 0 0 #d2dbe9,
        0 16px 26px -14px rgba(8, 36, 84, .50),
        0 4px 9px -6px rgba(8, 36, 84, .24);
    transition: transform .3s ease, box-shadow .3s ease;
}

.xueshu .item::before {
    content: '';
}

.xueshu .item:has(.eb-cover)::before {
    content: none;
}

.eb-cover {
    position: relative;
    display: flex;
    flex-direction: column;
    color: #fff;
    overflow: hidden;
}

/* 书脊：左侧压痕 + 一道高光线 */
.eb-cover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 14px;
    background: linear-gradient(90deg, rgba(0, 0, 0, .44) 0%, rgba(0, 0, 0, .16) 55%, rgba(255, 255, 255, .26) 100%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .32);
}

/* 右上高光，克制一点，否则整本书发灰发浑 */
.eb-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(85% 45% at 100% 0%, rgba(255, 255, 255, .13), rgba(255, 255, 255, 0) 65%);
}

/* --------------------------------------------------------------------------
   4. 封面上的字：分类标签 → 装订线 → 书名 → 落款
   -------------------------------------------------------------------------- */
.eb-cover-tag {
    position: relative;
    flex: 0 0 auto;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: .12em;
    color: rgba(255, 255, 255, .90);
}

/* 标签下的一道短装订线 */
.eb-cover-tag::after {
    content: '';
    display: block;
    width: 26px;
    height: 2px;
    margin-top: 12px;
    background: rgba(255, 255, 255, .45);
}

.eb-cover-title {
    position: relative;
    flex: 0 1 auto;
    min-height: 0;
    margin-top: 44px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.55;
    max-height: 6.2em;      /* 4 行封顶：clamp 出省略号，max-height 兜住溢出 */
    letter-spacing: .01em;
    color: #fff;
    overflow: hidden;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.eb-cover-brand {
    position: relative;
    flex: 0 0 auto;
    margin-top: auto;
    padding-top: 6px;
    font-size: 10px;
    line-height: 1.35;
    color: rgba(255, 255, 255, .86);
}

/* 落款上方的通栏细线 */
.eb-cover-brand::before {
    content: '';
    display: block;
    height: 1px;
    margin-bottom: 9px;
    background: rgba(255, 255, 255, .18);
}

/* --------------------------------------------------------------------------
   5. 书下方的标签条：书名 + 日期（弱化，不抢书的注意力）
   -------------------------------------------------------------------------- */
.xueshu .item .tit {
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.55;
    color: var(--eb-ink);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color .25s ease;
}

.xueshu .item:hover .tit {
    color: var(--eb-brand);
}

.xueshu .item .des {
    display: none;
}

.xueshu .item .date {
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--eb-gray);
    font-variant-numeric: tabular-nums;
}

/* 箭头：书封右上角的圆形按钮，悬停才出现 */
.xueshu .item .arrow {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 30px;
    height: 30px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .92);
    color: #4a5f7a;
    opacity: 0;
    transition: opacity .25s ease;
}

.xueshu .item .arrow::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 1.5px;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.xueshu .item .arrow::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 5px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: translate(-62%, -50%) rotate(45deg);
}

.xueshu .item:hover .arrow {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   6. 悬停：像从书架上抽出半寸
   -------------------------------------------------------------------------- */
.xueshu .item:hover .eb-cover {
    transform: translateY(-9px) rotate(-.7deg);
    box-shadow:
        2px 0 0 0 #e9eff8,
        4px 0 0 0 #dde5f1,
        6px 0 0 0 #d2dbe9,
        0 24px 36px -16px rgba(8, 36, 84, .58),
        0 7px 14px -8px rgba(8, 36, 84, .30);
}

/* --------------------------------------------------------------------------
   7. 响应式：书随容器变窄而变小，不改变页面其他部分
   -------------------------------------------------------------------------- */
@media screen and (max-width: 991px) {
    .xueshu {
        --eb-gap-v: 30px;
        --eb-gap-h: 20px;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .xueshu .item::before,
    .eb-cover {
        padding: 18px 14px 13px 20px;
        margin-bottom: 18px;
    }

    .eb-cover-title {
        margin-top: 32px;
        font-size: 15px;
        line-height: 1.5;
        max-height: 6em;
    }

    .eb-cover-tag {
        font-size: 10px;
    }

    .xueshu .item .tit {
        font-size: 13.5px;
    }
}

@media screen and (max-width: 767px) {
    .xueshu {
        --eb-gap-v: 22px;
        --eb-gap-h: 14px;
        grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    }

    .xueshu .item::before,
    .eb-cover {
        padding: 14px 11px 10px 16px;
        margin-bottom: 14px;
        border-radius: 2px 7px 7px 2px;
    }

    .eb-cover-title {
        margin-top: 22px;
        font-size: 12.5px;
        line-height: 1.45;
        max-height: 5.8em;
    }

    .eb-cover-tag::after {
        margin-top: 8px;
        width: 18px;
    }

    .eb-cover-brand {
        display: none;
    }

    .xueshu .item .tit {
        font-size: 12.5px;
    }

    .xueshu .item .date {
        font-size: 11px;
    }

    .xueshu .item .arrow {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   8. 动效降级 / 打印
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .xueshu .item .tit,
    .xueshu .item .arrow,
    .eb-cover {
        transition: none;
    }

    .xueshu .item:hover .eb-cover {
        transform: none;
    }
}

@media print {
    .xueshu {
        display: block;
    }

    .xueshu .item {
        break-inside: avoid;
        margin-bottom: 24px;
    }

    .xueshu .item .arrow {
        display: none;
    }

    .xueshu .item::before,
    .eb-cover {
        box-shadow: none;
    }
}

