/* elegance main-body 美化样式 */
.elegance.main-body {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
}

.elegance .images {
    margin-bottom: 15px;
    flex-grow: 1;
    overflow: hidden; /* 确保内容不溢出 */
}

.elegance-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    width: 100%; /* 确保宽度100% */
    position: relative; /* 确保定位正确 */
    bottom: 0; /* 固定在底部 */
}

.elegance.main-body:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.elegance-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    position: relative;
    padding-left: 22px;
}

.elegance-title:before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    height: calc(100% - 5px);
    width: 4px;
    background: var(--color_12);
    border-radius: 2px;
}

.elegance-content {
    color: #666;
    font-size: 16px;  /* 字体稍微大一点 */
    line-height: 1.3;
    margin-bottom: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;  /* 从3行改为2行 */
    -webkit-box-orient: vertical;
}

.elegance-content span {
    color: var(--color_12);
    font-size: 14px;  /* 日期字体也相应调大 */
    margin-right: 8px;
    font-weight: 500;
}

.elegance .images {
    margin-bottom: 15px;
    flex-grow: 1;
}

.vitality-images {
    height: 120px;
    overflow: hidden;
    border-radius: 6px;
    position: relative;
}

.vitality-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.vitality-images:hover img {
    transform: scale(1.08);
}

.elegance-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}

/* 添加以下样式修复图标与文字的对齐问题 */
.elegance-info p {
    display: flex;
    align-items: center;
    margin: 0;
}

.elegance-info i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 3px;
    position: relative;
    top: 0px; /* 微调图标位置 */
    font-size: 16px;
}

.elegance-info span {
    margin: 0 5px;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .elegance.main-body {
        padding: 15px;
    }
    
    .elegance-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .elegance-content {
        font-size: 14px;  /* 移动端字体也调整 */
        -webkit-line-clamp: 2;
        margin-bottom: 10px;
    }
    
    .vitality-images {
        height: 100px;
    }
}

/* 轮播图样式优化 */
.elegance-swiper {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    overflow: hidden;
}

.elegance-swiper .swiper-slide {
    width: 100%;
    height: 100%;
}

.elegance-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.vitality-images {
    height: 120px;
    overflow: hidden;
    border-radius: 6px;
    position: relative;
}

.vitality-images .elegance-swiper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media screen and (max-width: 768px) {
    .vitality-images {
        height: 100px;
    }
}

.elegance-swiper .swiper-pagination {
    bottom: 8px;
}

.elegance-swiper .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.8;
}

.elegance-swiper .swiper-pagination-bullet-active {
    background: var(--color_12);
}

@media screen and (max-width: 768px) {
    .elegance-swiper {
        height: 150px;
    }
}

/* 导航按钮样式 */
.elegance-swiper .swiper-button-next,
.elegance-swiper .swiper-button-prev {
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    --swiper-navigation-size: 18px;
}

.elegance-swiper .swiper-button-next:hover,
.elegance-swiper .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* 分页器样式 */
.elegance-swiper .swiper-pagination {
    bottom: 8px;
}

.elegance-swiper .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.8;
}

.elegance-swiper .swiper-pagination-bullet-active {
    background: var(--color_12);
}

@media screen and (max-width: 768px) {
    .elegance-swiper {
        height: 150px;
    }
}

/* 保持原有的多图布局 */
.elegance .images .layui-row {
    display: flex;
    flex-wrap: wrap;
}

@media screen and (max-width: 768px) {
    .elegance-swiper .vitality-images {
        height: 100px;
    }
}

.gallery-img {
    transition: all 1.2s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-img.fade {
    opacity: 0.3;
    transform: scale(1.05);
}


/* 切角标签样式 */
.corner-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    width: 150px; /* 进一步增加宽度 */
    height: 32px; /* 增加高度 */
    line-height: 32px;
    text-align: center;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    transform: rotate(45deg) translate(42px, -30px); /* 调整位置 */
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 班级风采 - 马卡龙粉红色 */
.corner-ribbon-blue {
    background: linear-gradient(135deg, #FF9A9E, #FF6A88);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 作业展示 - 马卡龙蓝色 */
.corner-ribbon-green {
    background: linear-gradient(135deg, #81D4FA, #29B6F6);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 确保主体有相对定位，以便标签能正确定位 */
.elegance.main-body {
    position: relative;
    overflow: hidden;
}

/* 美化elegance-info左侧的图标和文字 */
.elegance-info .image-icon {
    color: #FF9A9E; /* 与班级风采标签颜色呼应 */
    margin-right: 0px;
}

.elegance-info .video-icon {
    color: #81D4FA; /* 与作业展示标签颜色呼应 */
    margin-right: 3px;
}

.elegance-info .count-text {
    color: #FF9A9E; /* 与图片图标颜色一致 */
    font-weight: 500;
    margin-right: 5px;
}

/* 视频计数文字颜色 */
.elegance-info .video-icon + .count-text {
    color: #81D4FA; /* 与视频图标颜色一致 */
}

.elegance-info .divider {
    color: #ddd;
    margin: 0 5px;
}

/* 右侧浏览量也美化一下 */
.elegance-info p:last-child {
    color: #9575CD; /* 紫色系 */
}

.elegance-info p:last-child i {
    color: #9575CD;
    margin-right: 2px;margin-top: 2px;font-size: 18px;
}

/* 内容页图片轮播样式 */
.elegance-gallery {
    margin: 20px 0;
}

.gallery-swiper {
    padding: 10px 0;
}

.gallery-swiper .swiper-slide {
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-swiper .swiper-slide:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gallery-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.gallery-swiper .swiper-button-next,
.gallery-swiper .swiper-button-prev {
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    --swiper-navigation-size: 18px;
}

.gallery-swiper .swiper-button-next:hover,
.gallery-swiper .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .gallery-swiper .swiper-slide {
        height: 150px;
    }
}

/* 内容页图片轮播容器样式 */
.elegance-body {
    overflow: hidden;
    padding: 0;

    margin: 20px 0;
    margin-bottom: 10px !important;
    position: relative; /* 添加相对定位 */
}

.elegance-gallery {
    margin: 0;
    margin-bottom: -20px;
    margin-top: 0px;
    width: 100%;
    height: auto;
    position: relative; /* 添加相对定位 */
}

.gallery-swiper {
    width: 100%;
    height: auto;
    padding-bottom: 30px; /* 为导航按钮留出空间 */
    position: relative; /* 确保按钮相对于轮播定位 */
}

/* 调整导航按钮位置 */
.gallery-swiper .swiper-button-next,
.gallery-swiper .swiper-button-prev {
    top: 50%; /* 垂直居中 */
    transform: translateY(-50%); /* 精确垂直居中 */
    color: #fff;
    background: rgba(0, 0, 0, 0.5); /* 增加背景透明度 */
    width: 30px;
    height: 30px;
    border-radius: 50%;
    --swiper-navigation-size: 18px;
    z-index: 10; /* 确保按钮在最上层 */
}

.gallery-swiper .swiper-button-next {
    right: 10px; /* 右侧按钮位置 */
}

.gallery-swiper .swiper-button-prev {
    left: 10px; /* 左侧按钮位置 */
}

.swiper-container {
    overflow: hidden;
    width: 100%;
}

.gallery-swiper .swiper-slide {
    height: 320px; /* 调整高度，使其更协调 */
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin: 5px; /* 添加边距，防止图片紧贴 */
}

.gallery-swiper .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .gallery-swiper .swiper-slide {
        height: 280px;
    }
}

/* 内容页标签样式 */
.corner-ribbon-content {
    display: inline-block;
    margin-top: 15px;
    margin-left: -20px;
    line-height: 40px;
    padding: 0px 15px;
    padding-top:18px;
    width: 140px;
    color: white;
    font-weight: bold;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 班级风采 - 马卡龙粉红色 */
.corner-ribbon-content.corner-ribbon-blue {
    background: linear-gradient(135deg, #FF9A9E, #FF6A88);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 作业展示 - 马卡龙蓝色 */
.corner-ribbon-content.corner-ribbon-green {
    background: linear-gradient(135deg, #81D4FA, #29B6F6);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}