<?php
declare(strict_types=1);
$pageTitle = 'Gotalist Dashboard';
require_once __DIR__ . '/includes/header.php';
?>
  <main>
    <section class="hero">
      <div class="container hero-grid">
        <div class="panel">
          <span class="eyebrow">Members Dashboard</span>
          <h1>Welcome to Gotalist</h1>
          <p class="lead">
This training platform will guide you step-by-step through building and growing your list. 
Start with Module 1 and follow the lessons in order.
</p>
          <div class="btn-row">
            <a class="btn btn-primary" href="module-1.php">Start Module 1</a>
            <a class="btn btn-secondary" href="#upload-guide">View Getting Started Guide</a>
          </div>
          <div class="progress"><span></span></div>
          <p class="small">Suggested starting progress: 25%</p>
        </div>

        <aside class="panel">
          <h2><h2>Your Learning Path</h2></h2>
          <div class="badge-grid">
            <div class="badge"><small class="muted">Members Area</small><b>Member Access Enabled</b></div>
            <div class="badge"><small class="muted">Media Types</small><b>Video, Audio, Guides</b></div>
            <div class="badge"><small class="muted">Future Use</small><b>Structured Training System</b></div>
            <div class="badge"><small class="muted">Next Step</small><b>Start with Module 1</b></div>
          </div>
        </aside>
      </div>
    </section>
<?php if (($_SESSION['role'] ?? 'member') === 'admin'): ?>
  <div class="panel" style="margin-top:1rem;">
    <h2>Admin Area</h2>
    <p class="muted">You are logged in as admin. This section can hold user management, content controls, and product settings.</p>
  </div>
<?php endif; ?>
    <section class="section">
      <div class="container">
        <h2>Training Modules</h2>
        <p class="muted">Each module builds on the previous one. Follow them in order for best results.</p>
        <div class="grid-4">
          <article class="card">
            <div class="module-number">01</div>
            <div class="kicker">Start Here</div>
            <h3>Foundations of List Building</h3>
            <p>Intro training, first lessons, beginner PDF, and audio overview.</p>
            <div class="btn-row"><a class="btn btn-primary" href="module-1.php">Open Module</a></div>
          </article>
          <article class="card">
            <div class="module-number">02</div>
            <div class="kicker">Traffic</div>
            <h3>Lead Generation</h3>
            <p>Traffic methods, opt-in tactics, and getting qualified people into your funnel.</p>
            <div class="btn-row"><a class="btn btn-secondary" href="module-2.php">Open Module</a></div>
          </article>
          <article class="card">
            <div class="module-number">03</div>
            <div class="kicker">Follow-Up</div>
            <h3>Email Strategy</h3>
            <p>What to send, how to follow up, and how to turn subscribers into responsive readers.</p>
            <div class="btn-row"><a class="btn btn-secondary" href="module-3.php">Open Module</a></div>
          </article>
          <article class="card">
            <div class="module-number">04</div>
            <div class="kicker">Offers</div>
            <h3>Monetization</h3>
            <p>Present your offers, build conversions, and turn your list into a business asset.</p>
            <div class="btn-row"><a class="btn btn-secondary" href="module-4.php">Open Module</a></div>
          </article>
        </div>
      </div>
    </section>
<?php if (($_SESSION['role'] ?? 'member') === 'admin'): ?>
    <section class="section" id="upload-guide">
      <div class="container">
        <div class="panel">
            
          <h2>Easy Upload Guide</h2>
          <p class="muted">Upload your media files into these folders, then change the file names in the module pages.</p>
          <table class="module-table">
            <tr>
              <td><strong>Video folder</strong></td>
              <td><code class="inline">assets/videos/</code></td>
              <td>Upload MP4 files here</td>
            </tr>
            <tr>
              <td><strong>Audio folder</strong></td>
              <td><code class="inline">assets/audio/</code></td>
              <td>Upload MP3 files here</td>
            </tr>
            <tr>
              <td><strong>PDF folder</strong></td>
              <td><code class="inline">assets/pdfs/</code></td>
              <td>Upload PDF files here</td>
            </tr>
          </table>
          <div class="callout" style="margin-top:1rem;">
            Example: upload <strong>intro-video.mp4</strong>, <strong>intro-audio.mp3</strong>, and <strong>intro-guide.pdf</strong>, then edit Module 1 to point to those files.
          </div>
        </div>
      </div>
    </section>
    <?php endif; ?>
  </main>
<?php require_once __DIR__ . '/includes/footer.php'; ?>
