/* 图片显示优化样式 */

/* 协会动态图片区域修复 - 确保图片完整显示不被裁剪 */
.scroll-container {
    position: relative;
    height: 100%;
    max-height: 500px; /* 设置最大高度，防止容器过高 */
}

.scroll-content {
    height: 100%;
    display: flex;
    transition: transform 0.3s ease;
}

.scroll-item {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.scroll-item img {
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* 确保渐变叠加层不会影响图片显示 */
.scroll-item > a > div:last-child {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
    padding: 20px;
    color: white;
}

/* 新闻卡片图片 - 完整显示无裁切 */
.news-card img,
.carousel-item img,
.image-grid img,
[data-process="smart-crop"] {
    object-fit: contain !important;
    object-position: center !important;
    background-color: #f3f4f6 !important;
    width: 100% !important;
    height: 100% !important;
}

/* 图片容器样式优化 */
.news-card .relative,
.carousel-item,
.image-grid > div,
.image-container {
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 轮播图图片优化 */
.carousel-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* 新闻详情页图片优化 */
.image-grid img {
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* 响应式图片容器 */
.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
}

/* 加载状态 */
.image-loading {
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
}

/* 错误状态 */
.image-error {
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    font-size: 14px;
}