/* 引入Swiper样式 */
@import url('https://unpkg.com/swiper/swiper-bundle.min.css');

/* 防止页面水平滚动 */
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* 容器限制宽度 */
.layui-container {
    width: 100%;
    padding: 0;
    overflow: hidden;
}

/* Banner样式优化 */
.m-banner {
    width: 100%;
    margin-top: -60px;
    position: relative;
    z-index: 1;
    overflow: hidden; /* 确保内容不溢出 */
}

/* 移除固定高度，使用padding-bottom实现等比例缩放 */
.m-banner-item {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.m-banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 通用section样式 */
.m-section {
    padding: 20px 0;
    width: 100%;
    overflow: hidden;
}

.m-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 15px;
}

.m-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.m-section-title {
    font-size: 18px;
    color: #333;
    margin: 0;
    position: relative;
    padding-left: 10px;
}

.m-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: #b60608;
}

.m-subtitle {
    color: #b60608;
    font-size: 12px;
}

/* 滑块容器样式 */
.m-swiper-container {
    padding: 0 15px;
    overflow: hidden;
    width: 100%;
}

/* 壁纸样式 */
.m-wallpaper-item {
    aspect-ratio: 9/16;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.m-wallpaper-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 知识库样式优化 */
.m-knowledge-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 20px;
    padding: 20px 15px;
}

.m-knowledge-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.m-knowledge-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden; /* 确保图片不超出圆角范围 */
}

.m-knowledge-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* 移除图片底部间隙 */
}

.m-knowledge-name {
    font-size: 15px;
    color: #333;
    line-height: 1.2;
    margin-top: 5px;
}

/* 视频卡片样式 */
.video-swiper {
    padding: 0;
    overflow: visible;
}

.video-swiper .swiper-slide {
    width: 85%;
}

.m-video-item {
    margin: 0 8px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.m-video-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 400/570;
}

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

.m-video-type {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.m-video-info {
    padding: 8px;
}

.m-video-title {
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-video-desc {
    font-size: 12px;
    line-height: 1.3;
    height: 32px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 广告区域 */
.m-ad-banner {
    margin-top: 20px;
}

.m-ad-banner img {
    width: 100%;
    display: block;
}

/* 按钮样式 */
.m-btn {
    display: inline-block;
    height: 34px;
    line-height: 34px;
    padding: 0 20px;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
}

.m-btn-primary {
    background: #b60608;
    color: #fff;
}

.m-btn-primary:hover {
    background: #940507;
    color: #fff;
}

/* 统一所有查看更多按钮样式 */
.m-more-link {
    display: block;
    text-align: center;
    margin: 15px auto 0;
    color: #fff;
    font-size: 12px;
    text-decoration: none;
    background: #b60608;
    width: 80px;
    padding: 6px 0;
    border-radius: 15px;
}

/* 菜单蒙层 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

/* 菜单容器 */
.menu-container {
    position: fixed;
    top: 0;
    right: -80%;
    width: 80%;
    height: 100%;
    background: #fff;
    z-index: 999;
    transition: transform 0.3s ease-out;
    overflow-y: auto;
}

.menu-container.active {
    transform: translateX(-100%);
}

/* 头部导航栏 */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 997;
    transition: background-color 0.3s;
    background-color: transparent;
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 15px;
}

.header-nav.scrolled {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 菜单按钮样式 */
.menu-btn {
    width: 24px;
    height: 24px;
    padding: 4px;
    cursor: pointer;
    z-index: 1000;
}

/* 轮播图容器样式 */
.layui-carousel,
.layui-carousel > [carousel-item] {
    height: 200px !important;
}

.layui-carousel > [carousel-item] > * {
    height: 100% !important;
}

/* 隐藏轮播图指示点 */
.layui-carousel-ind {
    display: none !important;
}

/* 移除多余的padding-bottom */
.m-banner-item {
    padding-bottom: 0;
}

/* 隐藏 Swiper 分页器 */
.swiper-pagination {
    display: none !important;
}

/* 或者更具体地指定 */
.swiper-pagination-bullets,
.swiper-pagination-horizontal {
    display: none !important;
}

/* 隐藏视频滑块的分页器 */
.video-swiper .swiper-pagination {
    display: none !important;
}

/* 知识库标题样式修改 */
.knowledge-section .m-section-title {
    text-align: center;
    margin-bottom: 10px;
}

/* 调整section header中的查看更多按钮位置 */
.m-section-header .m-more-link {
    margin: 0;  /* 重置顶部margin */
} 