/* 容器样式 */
.honors-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* 标题样式 */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

/* 证书网格布局 */
.certificate-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    justify-items: center;
}

/* 证书项样式 */
.certificate-item {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.certificate-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}

/* 证书缩略图容器 */
.certificate-thumbnail {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}

.cert-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.certificate-item:hover .cert-thumb-img {
    transform: scale(1.05);
}

/* 悬停覆盖层 */
.certificate-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.certificate-item:hover .certificate-overlay {
    opacity: 1;
}

/* 操作按钮 */
.certificate-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 80%;
}

.preview-btn,
.download-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s ease;
}

.preview-btn {
    background-color: #3498db;
}

.download-btn {
    background-color: #2ecc71;
}

.preview-btn:hover,
.download-btn:hover {
    transform: translateY(-3px);
}

/* 证书名称 */
.certificate-name {
    padding: 15px;
    text-align: center;
    font-size: 16px;
    color: #333;
    background: #f9f9f9;
}

/* 预览模态框 */
.preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    width: 80%;
    max-width: 1200px;
}

.preview-img {
    width: 100%;
    height: auto;
    border: 5px solid white;
    border-radius: 4px;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #ccc;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .certificate-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    .modal-content {
        width: 95%;
        margin: 15% auto;
    }
    .certificate-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 1200px) {
    .certificate-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .certificate-grid {
        grid-template-columns: 1fr;
    }
}
