/**
 * Social Activities Grid Styles
 * 社会活动网格区块样式文件
 * 
 * @package Nenghui Energy Theme
 * @since 1.0.0
 */

/* 社会活动容器 */
.social-activities-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    background: #ffffff;
}

/* 标题样式 */
.social-activities-header {
    text-align: center;
    margin-bottom: 50px;
}

.social-activities-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin: 0;
    position: relative;
    display: inline-block;
}

.social-activities-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 2px;
}

/* 网格容器样式 */
.social-activities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* 查看更多按钮容器 */
.social-activities-footer {
    text-align: center;
    margin-top: 40px;
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 30px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    gap: 8px;
}

.view-more-btn:hover {
    background: #0056b3;
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* 文章卡片样式 */
.social-activity-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

.social-activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 图片容器 */
.activity-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.activity-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.social-activity-card:hover .activity-image img {
    transform: scale(1.05);
}

/* 无图片占位符 */
.placeholder-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    border: none;
}

.placeholder-image span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* 卡片内容 */
.activity-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.activity-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
    line-height: 1.5;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-shrink: 0;
}

.activity-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.activity-title a:hover {
    color: #007bff;
}

/* 文章摘要 */
.activity-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* 元信息 */
.activity-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    flex-shrink: 0;
}

.activity-date {
    font-size: 14px;
    color: #6c757d;
}

.activity-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #00bcd4;
    color: #fff;
    text-decoration: none;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.activity-link:hover {
    background: #00acc1;
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.3);
}



/* 无文章提示 */
.no-posts-message {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .social-activities-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .social-activities-container {
        padding: 40px 15px;
    }
    
    .social-activities-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .social-activities-header h2 {
        font-size: 28px;
    }
    
    .activity-content {
        padding: 20px;
    }
    
    .activity-title {
        font-size: 16px;
        min-height: auto;
    }
    
    .activity-image {
        height: 180px;
    }
    
    .view-more-btn {
        padding: 10px 25px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .social-activities-header h2 {
        font-size: 24px;
    }
    
    .social-activities-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .activity-content {
        padding: 15px;
    }
    
    .activity-link {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .activity-image {
        height: 160px;
    }
    
    .view-more-btn {
        padding: 8px 20px;
        font-size: 14px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.social-activities-container {
    animation: fadeInUp 0.6s ease-out;
}

.social-activity-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.social-activity-card:nth-child(1) { animation-delay: 0.1s; }
.social-activity-card:nth-child(2) { animation-delay: 0.2s; }
.social-activity-card:nth-child(3) { animation-delay: 0.3s; }