<section class="hero" style="background-image:url('<?php echo e($company['banner'] ?? ''); ?>')">
  <div class="hero-overlay"></div>
  <div class="container hero-box">
    <div class="hero-kicker"><?php echo ($theme ?? '') === 'school' ? 'Senior High School' : 'Enterprise Service'; ?></div>
    <h1><?php echo e($company['name'] ?? ''); ?></h1>
    <p><?php echo e($company['slogan'] ?? ''); ?></p>
    <div class="hero-actions">
      <a class="btn" href="/product/"><?php echo ($theme ?? '') === 'school' ? '了解课程建设' : '了解主营业务'; ?></a>
      <a class="btn btn-light" href="/contact/">联系咨询</a>
    </div>
  </div>
</section>

<section class="section">
  <div class="container">
    <h2><?php echo ($theme ?? '') === 'school' ? '课程建设' : '主营业务'; ?></h2>
    <div class="cards">
      <?php foreach(($products ?? array()) as $p): ?>
      <a class="card" href="/product/<?php echo intval($p['id'] ?? 0); ?>.html">
        <img src="<?php echo e($p['image'] ?? ''); ?>" alt="<?php echo e($p['title'] ?? ''); ?>">
        <h3><?php echo e($p['title'] ?? ''); ?></h3>
        <p><?php echo e($p['summary'] ?? ''); ?></p>
      </a>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<section class="section muted">
  <div class="container split">
    <div>
      <h2><?php echo ($theme ?? '') === 'school' ? '学校概况' : '企业简介'; ?></h2>
      <p><?php echo e(trim((string)($company['description'] ?? '')) !== '' ? $company['description'] : (($company['name'] ?? '') . '位于' . ($company['city'] ?? '') . '，长期专注' . ($company['industry'] ?? '') . '相关服务。我们重视真实需求、执行过程和长期维护，让信息展示和服务沟通保持清晰稳定。')); ?></p>
      <a href="/about/" class="more">查看详细介绍</a>
    </div>
    <img src="<?php echo e($company['about_image'] ?? ''); ?>" alt="<?php echo e($company['name'] ?? ''); ?>">
  </div>
</section>

<section class="section">
  <div class="container">
    <h2><?php echo ($theme ?? '') === 'school' ? '校园活动记录' : '客户案例'; ?></h2>
    <div class="cards">
      <?php foreach(($cases ?? array()) as $c): ?>
      <a class="card" href="/case/<?php echo intval($c['id'] ?? 0); ?>.html">
        <img src="<?php echo e($c['image'] ?? ''); ?>" alt="<?php echo e($c['title'] ?? ''); ?>">
        <h3><?php echo e($c['title'] ?? ''); ?></h3>
        <p><?php echo e($c['summary'] ?? ''); ?></p>
      </a>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<section class="section muted">
  <div class="container">
    <h2><?php echo ($theme ?? '') === 'school' ? '校园动态与通知' : '新闻资讯'; ?></h2>
    <div class="list">
      <?php foreach(array_merge($contentData['company_news'] ?? array(), $contentData['industry_news'] ?? array()) as $n): ?>
      <a class="list-item" href="/news/<?php echo intval($n['id'] ?? 0); ?>.html">
        <span><?php echo e($n['date'] ?? ''); ?> · <?php echo e($n['type'] ?? ''); ?></span>
        <h3><?php echo e($n['title'] ?? ''); ?></h3>
        <p><?php echo e($n['summary'] ?? ''); ?></p>
      </a>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<section class="section">
  <div class="container">
    <h2>常见问题</h2>
    <div class="faq-list">
      <?php foreach(array_slice(($faqs ?? array()), 0, 3) as $f): ?>
      <a href="/faq/<?php echo intval($f['id'] ?? 0); ?>.html">
        <strong><?php echo e($f['question'] ?? ''); ?></strong>
        <p><?php echo e($f['answer'] ?? ''); ?></p>
      </a>
      <?php endforeach; ?>
    </div>
  </div>
</section>
