<?php
/**
 * 2026企业CMS - 默认模板团队成员页面
 */
$pageDescription = '团队成员 - ' . SITE_NAME;
$breadcrumbItems = [['title' => '团队成员']];
?>
<?php echo breadcrumb($breadcrumbItems); ?>

<div class="main-content">
    <div class="container">
        <h2 class="section-title">团队成员</h2>
        <p style="text-align:center;color:#666;margin-bottom:40px;">
            我们拥有一支专业、高效、富有创造力的团队
        </p>
        
        <?php if (empty($teamMembers)): ?>
        <div style="text-align:center;padding:60px;color:#999;">暂无团队成员信息</div>
        <?php else: ?>
        <div class="grid" style="grid-template-columns:repeat(4,1fr);">
            <?php foreach ($teamMembers as $m): ?>
            <div class="card" style="text-align:center;padding:30px;">
                <div style="width:120px;height:120px;border-radius:50%;overflow:hidden;margin:0 auto 20px;background:#eee;border:4px solid #2c82e0;">
                    <?php if ($m['avatar']): ?>
                    <img src="<?php echo $m['avatar']; ?>" alt="<?php echo xss_clean($m['name']); ?>" style="width:100%;height:100%;object-fit:cover;">
                    <?php else: ?>
                    <div style="width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:36px;color:#ccc;">👤</div>
                    <?php endif; ?>
                </div>
                <h3 style="font-size:18px;margin-bottom:5px;color:#333;"><?php echo xss_clean($m['name']); ?></h3>
                <p style="color:#2c82e0;font-size:14px;margin-bottom:15px;"><?php echo xss_clean($m['position']); ?></p>
                <?php if ($m['bio']): ?>
                <p style="color:#666;font-size:13px;line-height:1.6;"><?php echo xss_clean($m['bio']); ?></p>
                <?php endif; ?>
                <?php if ($m['content']): ?>
                <div style="margin-top:15px;">
                    <a href="javascript:void(0);" onclick="this.nextElementSibling.classList.toggle('show');" style="color:#2c82e0;font-size:13px;">查看详情</a>
                    <div style="display:none;margin-top:10px;color:#666;font-size:13px;line-height:1.6;text-align:left;"><?php echo $m['content']; ?></div>
                </div>
                <?php endif; ?>
                <div style="display:flex;justify-content:center;gap:15px;margin-top:15px;">
                    <?php if ($m['email']): ?><a href="mailto:<?php echo $m['email']; ?>" style="color:#666;font-size:18px;">📧</a><?php endif; ?>
                    <?php if ($m['wechat']): ?><span style="color:#666;font-size:18px;cursor:pointer;" title="<?php echo xss_clean($m['wechat']); ?>">💬</span><?php endif; ?>
                </div>
            </div>
            <?php endforeach; ?>
        </div>
        <?php endif; ?>
        
        <!-- 加入我们 -->
        <div style="text-align:center;margin-top:60px;padding:40px;background:linear-gradient(135deg,#2c82e0,#1a6bc4);border-radius:8px;color:#fff;">
            <h3 style="font-size:24px;margin-bottom:15px;">加入我们</h3>
            <p style="margin-bottom:30px;opacity:0.9;">如果你有才华、有激情，欢迎加入我们的团队</p>
            <a href="<?php echo cms_url('contact'); ?>" style="display:inline-block;padding:12px 40px;background:#fff;color:#2c82e0;border-radius:4px;font-weight:bold;">联系我们</a>
        </div>
    </div>
</div>
