---
// src/components/homelab/HeroSection.astro - Ultra minimal version
const { servicesCount } = Astro.props;
---

<section id="home" class="hero">
  <div class="container">
    <div class="hero-content">
      <div class="hero-text">
        <h1 class="hero-title">
          Enterprise-Grade <span class="highlight">Home Lab</span> Environment
        </h1>
        <p class="hero-description">
          A production-ready infrastructure platform for DevOps experimentation, distributed systems, and automating everything with code.
        </p>

        <!-- Simple stats display -->
        <div class="stats-box">
          <div class="stat-item">
            <div class="stat-label">Services:</div>
            <div class="stat-value">{servicesCount}+</div>
          </div>
          <div class="stat-item">
            <div class="stat-label">CPU Cores:</div>
            <div class="stat-value">32+</div>
          </div>
          <div class="stat-item">
            <div class="stat-label">Memory:</div>
            <div class="stat-value">64GB</div>
          </div>
          <div class="stat-item">
            <div class="stat-label">Storage:</div>
            <div class="stat-value">12TB</div>
          </div>
        </div>

        <div class="cta-buttons">
          <a href="/ansible-sandbox" class="btn btn-danger" id="ansible-sandbox-btn">
            <span class="btn-text">Try Ansible Sandbox</span>
            <span class="offline-badge">Offline</span>
          </a>
          <a href="#architecture" class="btn btn-outline">
            <span class="btn-text">Explore Architecture</span>
          </a>
        </div>
      </div>

      <!-- Simple status box instead of terminal -->
      <div class="status-box">
        <div class="status-header">
          <div class="status-title">System Status</div>
        </div>
        <div class="status-body">
          <div class="status-line">
            <span class="status-label">Nodes:</span>
            <span class="status-value">2 (Ready)</span>
          </div>
          <div class="status-line">
            <span class="status-label">Running Pods:</span>
            <span class="status-value">32</span>
          </div>
          <div class="status-line">
            <span class="status-label">Uptime:</span>
            <span class="status-value">154 days</span>
          </div>
          <div class="status-line">
            <span class="status-label">Load:</span> 
            <span class="status-value">0.22, 0.18, 0.15</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>

<style>
  .hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 6rem 0 4rem;
    background: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
  }

  .hero-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
  }

  .hero-text {
    flex: 1;
    min-width: 300px;
  }

  .hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .highlight {
    color: var(--primary, #3b82f6);
  }

  .hero-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
  }

  .stats-box {
    background-color: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }

  .stat-item {
    display: flex;
    flex-direction: column;
  }

  .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
  }

  .stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--success, #10b981);
  }

  .cta-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
  }

  .btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .btn-danger {
    background-color: var(--error, #ef4444);
    color: white;
  }

  .btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
  }

  .offline-badge {
    background-color: rgba(0, 0, 0, 0.2);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    margin-left: 0.5rem;
  }

  .status-box {
    background-color: rgba(15, 23, 42, 0.9);
    border-radius: 0.5rem;
    overflow: hidden;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  }

  .status-header {
    padding: 0.75rem 1rem;
    background-color: rgba(30, 41, 59, 0.8);
  }

  .status-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
  }

  .status-body {
    padding: 1rem;
  }

  .status-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
  }

  .status-label {
    color: var(--text-secondary);
  }

  .status-value {
    color: var(--success, #10b981);
  }

  @media (max-width: 768px) {
    .hero-content {
      flex-direction: column;
      align-items: flex-start;
    }

    .stats-box {
      grid-template-columns: repeat(2, 1fr);
    }

    .status-box {
      max-width: none;
      width: 100%;
    }
  }
</style>