/* 画廊基础样式 */
/* 文章图片画廊样式优化 - 增强视觉效果和用户体验 */

/* 画廊容器 */
.article_gallery_container {
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 20px 0;
}

/* 标题样式 */
.article_gallery_container h2 {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #3498db;
    text-align: center;
}

/* 主画廊容器 */
.article-gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 0 15px;
    box-sizing: border-box;
}

/* 画廊项目卡片 */
.article-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: #ffffff;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 悬停效果 */
.article-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #d0d0d0;
}

/* 图片容器 */
.article-gallery-item a.gallery-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* 图片包装器 - 用于添加叠加层效果 */
.gallery-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

/* 图片悬停叠加层 */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* 叠加层内容 */
.gallery-overlay-content {
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.article-gallery-item:hover .gallery-overlay-content {
    transform: translateY(0);
}

/* 查看图标 */
.gallery-view-icon {
    font-size: 32px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.article-gallery-item:hover .gallery-view-icon {
    transform: scale(1.2);
}

/* 默认图片样式增强 */
.default-image {
    border: 2px dashed #ddd;
    font-weight: 500;
    font-size: 14px;
}

/* 空状态样式 */
.gallery-empty-state {
    text-align: center;
    padding: 60px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 15px 0;
}

.gallery-empty-state p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* 图片样式 */
.article-gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
    border-radius: 8px 8px 0 0;
}

.article-gallery-item:hover .article-gallery-image {
    transform: scale(1.08);
}

/* 信息容器 - 改为始终显示 */
.article-gallery-info {
    padding: 16px;
    background-color: #ffffff;
    color: #333;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* 标题样式 */
.article-gallery-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 描述样式 */
.article-gallery-description {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* 来源信息 */
.article-gallery-article-source {
    margin: 0;
    font-size: 12px;
    color: #999;
    font-style: italic;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

/* 分页样式优化 */
.article_gallery_container .pagination {
    text-align: center;
    margin: 30px 0 10px;
}

.article_gallery_container .pagination a,
.article_gallery_container .pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border-radius: 4px;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #666;
    transition: all 0.2s ease;
}

.article_gallery_container .pagination a:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.article_gallery_container .pagination span.current {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* 响应式布局优化 */
@media (max-width: 1200px) {
    .article-gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 18px;
    }
}

@media (max-width: 992px) {
    .article-gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }
    
    .article-gallery-image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .article-gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 14px;
    }
    
    .article_gallery_container h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .article-gallery-container {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 10px;
    }
    
    .article-gallery-image {
        height: 190px;
    }
    
    .article_gallery_container {
        padding: 15px 0;
    }
}

/* 网格布局样式 */
.gallery-grid .article-gallery-container {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

/* 瀑布流布局样式 */
.gallery-masonry .article-gallery-container {
    column-count: 4;
    column-gap: 20px;
}

.gallery-masonry .article-gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    width: 100%;
}

/* 瀑布流响应式 */
@media (max-width: 1200px) {
    .gallery-masonry .article-gallery-container {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .gallery-masonry .article-gallery-container {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .gallery-masonry .article-gallery-container {
        column-count: 1;
    }
}