<?php
if (!isset($service) || !is_array($service)) {
    http_response_code(404);
    exit;
}
$baseUrl = 'https://msmanuf.com/wp/servicios/';
$canonical = $baseUrl . $service['slug'] . '.php';
$schema = [
    '@context' => 'https://schema.org',
    '@type' => 'Service',
    'name' => $service['title'],
    'description' => $service['meta'],
    'provider' => [
        '@type' => 'Organization',
        'name' => 'MS Manufacturing Solutions',
        'url' => 'https://msmanuf.com/wp/'
    ],
    'areaServed' => ['Argentina', 'Latin America']
];
?>
<!DOCTYPE html>
<html lang="es">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="<?php echo htmlspecialchars($service['meta'], ENT_QUOTES, 'UTF-8'); ?>">
  <meta name="robots" content="index, follow, max-image-preview:large">
  <title><?php echo htmlspecialchars($service['title'], ENT_QUOTES, 'UTF-8'); ?> | MS</title>
  <link rel="canonical" href="<?php echo $canonical; ?>">
  <meta property="og:type" content="website">
  <meta property="og:locale" content="es_AR">
  <meta property="og:title" content="<?php echo htmlspecialchars($service['title'], ENT_QUOTES, 'UTF-8'); ?> | MS">
  <meta property="og:description" content="<?php echo htmlspecialchars($service['meta'], ENT_QUOTES, 'UTF-8'); ?>">
  <meta property="og:url" content="<?php echo $canonical; ?>">
  <meta property="og:image" content="https://msmanuf.com/wp/img/og-ms-solutions.png">
  <meta name="twitter:card" content="summary_large_image">
  <script type="application/ld+json"><?php echo json_encode($schema, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); ?></script>
  <link rel="icon" href="../img/ms-fav-blue.png" sizes="192x192">
  <link href="../vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link href="../css/agency.min.css" rel="stylesheet">
  <link href="../css/seo.css" rel="stylesheet">
</head>
<body class="service-page">
  <nav class="navbar navbar-dark fixed-top" id="mainNav">
    <div class="container">
      <a class="navbar-brand" href="../index-es.php"><img src="../img/logos/logoMS.png" alt="MS Manufacturing Solutions"></a>
      <a class="btn btn-outline-light" href="../index-es.php#portfolio">Todos los servicios</a>
    </div>
  </nav>
  <header class="service-header">
    <div class="container">
      <p class="text-uppercase mb-3">MS Manufacturing Solutions</p>
      <h1><?php echo htmlspecialchars($service['title'], ENT_QUOTES, 'UTF-8'); ?></h1>
      <p class="lead mt-4"><?php echo htmlspecialchars($service['lead'], ENT_QUOTES, 'UTF-8'); ?></p>
    </div>
  </header>
  <main class="service-content">
    <div class="container">
      <div class="row">
        <article class="col-lg-8">
          <?php foreach ($service['sections'] as $section): ?>
            <section>
              <h2><?php echo htmlspecialchars($section['title'], ENT_QUOTES, 'UTF-8'); ?></h2>
              <?php foreach ($section['paragraphs'] as $paragraph): ?>
                <p><?php echo htmlspecialchars($paragraph, ENT_QUOTES, 'UTF-8'); ?></p>
              <?php endforeach; ?>
              <?php if (!empty($section['items'])): ?><ul>
                <?php foreach ($section['items'] as $item): ?><li><?php echo htmlspecialchars($item, ENT_QUOTES, 'UTF-8'); ?></li><?php endforeach; ?>
              </ul><?php endif; ?>
            </section>
          <?php endforeach; ?>
        </article>
        <aside class="col-lg-4 mt-4 mt-lg-0">
          <div class="service-cta">
            <h2 class="text-white mt-0">Hablemos de su proyecto</h2>
            <p>Cuéntenos qué necesita mejorar. Nuestro equipo puede ayudarlo desde el análisis hasta la implementación.</p>
            <a class="btn btn-primary btn-xl" href="../index-es.php#contact">Solicitar una consulta</a>
          </div>
          <div class="service-list mt-4">
            <h2>Otros servicios</h2>
            <ul>
              <li><a href="desarrollo-software-medida.php">Desarrollo a medida</a></li>
              <li><a href="aplicaciones-web.php">Aplicaciones web</a></li>
              <li><a href="aplicaciones-moviles.php">Aplicaciones móviles</a></li>
              <li><a href="integracion-sistemas.php">Integración de sistemas</a></li>
              <li><a href="consultoria-tecnologica.php">Consultoría tecnológica</a></li>
              <li><a href="gestion-documental.php">Gestión documental</a></li>
              <li><a href="software-retail.php">Software para retail</a></li>
            </ul>
          </div>
        </aside>
      </div>
    </div>
  </main>
  <footer><div class="container"><p>© MS Manufacturing Solutions · <a href="mailto:info@msmanuf.com">info@msmanuf.com</a></p></div></footer>
</body>
</html>
