/* ==========================================================
   遂宁中学课程资源库 — 界面美化样式
   ----------------------------------------------------------
   说明:本文件集中存放自定义美化样式,想恢复模板默认外观时
   清空本文件即可(不影响任何数据和功能)。
   主色调:青蓝 #17a2b8(与现有模板保持一致)
   ========================================================== */

/* ========== 一、顶部横幅(首页 / 列表页) ========== */
.kc-hero {
    position: relative;
    overflow: hidden;
    padding: 54px 0 46px;
    margin-bottom: 2rem;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #17a2b8 0%, #1781bd 60%, #1a6fc4 100%);
}
/* 横幅上的两个装饰圆圈 */
.kc-hero::before,
.kc-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
}
.kc-hero::before { width: 340px; height: 340px; right: -90px; top: -120px; }
.kc-hero::after  { width: 220px; height: 220px; left: -70px; bottom: -110px; }
.kc-hero h1 {
    position: relative;
    z-index: 1;
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: .6rem;
}
.kc-hero p {
    position: relative;
    z-index: 1;
    font-size: 1rem;
    opacity: .88;
    margin-bottom: 1.6rem;
}
/* 横幅里的搜索框 */
.kc-hero-search {
    position: relative;
    z-index: 1;
    display: flex;
    max-width: 560px;
    margin: 0 auto;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .18);
}
.kc-hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    padding: .78rem 1.3rem;
    font-size: .95rem;
    color: #333;
}
.kc-hero-search button {
    border: 0;
    cursor: pointer;
    padding: 0 1.6rem;
    font-size: .95rem;
    font-weight: 600;
    color: #117a8b;
    background: #fff;
    transition: background .2s;
}
.kc-hero-search button:hover { background: #e9f2f4; } /* 悬浮时微微泛青,提示可点击 */
/* 手机端横幅变小、更紧凑 */
@media (max-width: 575.98px) {
    .kc-hero { padding: 34px 0 30px; margin-bottom: 1.2rem; }
    .kc-hero h1 { font-size: 1.45rem; }
    .kc-hero p { font-size: .85rem; margin-bottom: 1.1rem; }
    .kc-hero-search button { padding: 0 1.1rem; }
}

/* ========== 二、筛选区(胶囊按钮) ========== */
.kc-filter-title {
    font-weight: 600;
    color: #495057;
    padding-top: .42rem; /* 与右侧按钮行垂直对齐 */
}
.kc-chip {
    border-radius: 999px !important;
    padding: .3rem 1.05rem !important;
    font-size: .875rem !important;
    border: 1px solid #e4e9ee !important;
    transition: all .18s ease;
}
.kc-chip.btn-light {
    background: #fff;
    color: #55606b;
}
.kc-chip.btn-light:hover {
    background: #e9f7f9;
    color: #17a2b8;
    border-color: #bce6ec !important;
}
.kc-chip.btn-info {
    background: #17a2b8;
    border-color: #17a2b8 !important;
}
/* 不刷新筛选:加载中整块变淡并暂时不可点,防止连点 */
#kc-filter-area { transition: opacity .2s ease; }
#kc-filter-area.kc-loading { opacity: .45; pointer-events: none; }
/* 手机/平板(小于768px):标题和按钮排同一行,按钮横向滑动,不再换行堆成按钮墙 */
@media (max-width: 768px) {
    .kc-filter-row { flex-wrap: nowrap; margin-bottom: .75rem; } /* 标题+按钮不换行;下方间距给到行 */
    .kc-filter-row > .kc-filter-title {
        flex: 0 0 auto; /* 标题只占自己那么宽 */
        width: auto;
        max-width: none;
        align-self: center; /* 与按钮垂直居中对齐 */
        padding-top: 0;
        padding-right: .5rem;
        white-space: nowrap;
    }
    .kc-filter-row > .kc-filter-chips {
        flex: 1 1 0%; /* 按钮区占掉剩余宽度 */
        min-width: 0; /* 关键:不然横向滑动不生效 */
        max-width: none;
        padding-left: 0;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto; /* 超出宽度的按钮可以左右滑 */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* 隐藏滚动条(Firefox) */
        align-self: center; /* 在父行里垂直居中 */
    }
    .kc-filter-chips .kc-chip {
        flex: 0 0 auto; /* 按钮不压缩、不换行 */
        margin-right: .45rem; /* flex 下按钮间没有空格了,补个间距 */
        margin-bottom: 0 !important; /* 去掉按钮自带下边距,按钮才能垂直居中 */
        white-space: nowrap;
    }
    .kc-filter-chips::-webkit-scrollbar { display: none; } /* 隐藏滚动条(Chrome/Edge/手机浏览器) */
}

/* ========== 三、课程卡片 ========== */
.kc-course-card {
    height: 100%;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(20, 40, 80, .07);
}
/* 2026-09:取消鼠标悬浮效果,卡片不再上浮/变阴影 */
/* 封面图区域(16:9 自适应) */
.kc-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    background: #eef1f4;
}
.kc-thumb > a {
    display: block;
    width: 100%;
    height: 100%;
}
.kc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* 角标(置顶 / 推荐 / 优秀)移到图片左上角 */
.kc-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.kc-badges .badge {
    border-radius: 999px;
    padding: .38em .85em;
    margin-bottom: 5px;
    font-size: .72rem;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
/* 没有封面图时:直接显示默认占位图 /static/images/nopic.png(不再做纯色+首字处理) */
/* 卡片正文(适度紧凑) */
.kc-course-card .card-body { padding: .7rem .85rem 0em; }
.kc-course-card .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: .35rem;
}
.kc-course-card .card-title a { color: #212529; }
.kc-course-card .card-title a:hover { color: #212529; text-decoration: none; } /* 悬浮与普通状态一致:无任何变化 */
/* 年级 / 学科 小标签 */
.kc-meta { margin-bottom: .3rem; }
.kc-tag {
    display: inline-block;
    padding: .16em .62em;
    margin-right: .35rem;
    border-radius: 4px;
    font-size: .76rem;
    line-height: 1.5;
}
.kc-tag-nianji { background: #e9f7f9; color: #117a8b; }
.kc-tag-xueke  { background: #edf2ff; color: #3d6cd8; }
/* 课程标签(tags) */
.kc-tags { margin-bottom: 0; }
.kc-tags .badge {
    border-radius: 999px;
    font-weight: 400;
    margin-right: .3rem;
}
/* 卡片底部信息行:左侧姓名、右侧浏览量,分列两端 */
.kc-course-card .kc-tags {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .82rem;
    color: #98a0a8;
}
.kc-course-card .kc-tags .kc-tags-author {
    color: #666;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.kc-course-card .kc-tags .kc-tags-visits {
    white-space: nowrap;
    margin-left: .5rem;
}

/* ========== 四、课程详情页 ========== */
/* 视频 + 附件的白色卡片 */
.kc-detail-card {
    padding: 16px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(20, 40, 80, .08);
}
.kc-detail-card video {
    display: block;
    border-radius: 8px;
    background: #000;
}
/* ArtPlayer 播放器容器 */
#artplayer {
    border-radius: 8px;
    overflow: hidden;
}
/* 附件下载:PPT / 教学设计 */
.kc-attach-list {
    margin-bottom: 1rem;
}
.kc-attach-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 12px 16px;
    margin-bottom: 10px;
    background: #f8fbfd;
    border: 1px solid #e3edf3;
    border-radius: 8px;
}
.kc-attach-name {
    font-weight: 600;
    color: #333;
}
.kc-attach-name i {
    margin-right: 8px;
    font-size: 1.3rem;
    color: #e67e22;
}
.kc-attach-name i.fa-file-word-o { color: #2b579a; }
.kc-attach-name i.fa-file-pdf-o { color: #d64541; }
.kc-attach-actions {
    display: flex;
}
.kc-attach-btn {
    display: inline-block;
    padding: 6px 14px;
    margin-left: 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #17a2b8;
    border: 1px solid #17a2b8;
    text-decoration: none;
    transition: all .2s;
}
.kc-attach-btn:hover {
    background: #17a2b8;
    color: #fff;
    text-decoration: none;
}
.kc-attach-btn i { margin-right: 4px; }
.kc-attach-btn.kc-attach-download {
    background: #17a2b8;
    color: #fff;
}
.kc-attach-btn.kc-attach-download:hover {
    background: #117a8b;
    border-color: #117a8b;
}
.kc-detail-card h5 {
    font-size: 1rem;
    font-weight: 600;
}
/* 视频卡片不受原产品轮播样式(.view)最大宽度限制 */
.view.kc-detail-card { max-width: none; }
.kc-attachment-title i {
    margin-right: .25rem;
    color: #17a2b8;
}
/* 视频无法播放时的友好提示 */
.kc-video-tip {
    display: none;
    margin-top: 12px;
    padding: .55rem 1rem;
    border: 1px solid #faebcc;
    border-radius: 8px;
    font-size: .88rem;
    color: #8a6d3b;
    background: #fcf8e3;
}
/* 右侧信息行 */
.kc-info-row i {
    width: 1.25em;
    color: #17a2b8;
}
/* 详情页标题下的短装饰线 */
.kc-detail-title { position: relative; }
.kc-detail-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 64px;
    height: 3px;
    border-radius: 3px;
    background: #17a2b8;
}

/* ========== 五、导航 / 分页 / 页脚 细节 ========== */
/* 导航悬停与选中主题色 */
.navbar-light .navbar-nav .nav-link {
    color: #3d4650;
    font-weight: 500;
}
.navbar-light .navbar-nav .nav-link:hover { color: #17a2b8; }
.navbar-light .navbar-nav .nav-item.active .nav-link {
    position: relative;
    color: #17a2b8;
}
.navbar-light .navbar-nav .nav-item.active .nav-link::after {
    content: "";
    position: absolute;
    left: .55rem;
    right: .55rem;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: #17a2b8;
}
/* 手机/平板(小于992px)也显示顶部菜单:原来整个菜单被折叠隐藏,只剩logo */
@media (max-width: 991.98px) {
    .navbar .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }
    .navbar .navbar-nav {
        flex-direction: row;
        align-items: center;
    }
    .navbar .navbar-nav .nav-link {
        padding-right: .55rem;
        padding-left: .55rem;
    }
    .navbar-text {
        padding: .5rem .35rem;
    }
}
/* 分页按钮圆角 */
.pagination a.page-link {
    margin: 0 3px;
    border-radius: 6px !important;
}
.pagination a.page-link:hover {
    color: #17a2b8;
    background: #e9f7f9;
}
/* 页脚标题微调 */
.footer h5 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 1rem;
}
.footer .lh-2 li { margin-bottom: .15rem; }
/* 手机端页脚6行版权信息:缩小字号、收紧行距、加左右留白,避免撑得太开 */
@media (max-width: 768px) {
    .footer .copyright {
        font-size: .75rem;
        line-height: 1.85;
        padding: .7rem .6rem 1rem;
    }
}
/* 搜索关键词高亮 */
mark {
    padding: 0 2px;
    border-radius: 2px;
    color: #117a8b;
    background: #d7f2f6;
}
/* 空搜索时的抖动提醒 */
@keyframes kcShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
.kc-shake { animation: kcShake .35s ease 2; }

/* ========== 六、原有样式(保留) ========== */
.slideshow {
    height: 400px;
    object-fit: cover;
}
