110 lines
5.1 KiB
PHP
110 lines
5.1 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
require_once __DIR__ . '/includes/app.php';
|
|
|
|
$slug = trim((string) ($_GET['slug'] ?? ''));
|
|
$service = service_by_slug($slug);
|
|
$activePage = 'services';
|
|
$pageRobots = '';
|
|
|
|
if (!$service) {
|
|
http_response_code(404);
|
|
$pageTitle = 'Service Not Found';
|
|
$pageDescription = 'The requested package could not be found.';
|
|
} else {
|
|
$pageTitle = $service['category'];
|
|
$pageDescription = $service['summary'];
|
|
}
|
|
|
|
$relatedServices = array_filter(service_catalog(), static fn (array $item): bool => $service ? $item['slug'] !== $service['slug'] : true);
|
|
$relatedServices = array_slice(array_values($relatedServices), 0, 3);
|
|
|
|
require __DIR__ . '/includes/header.php';
|
|
?>
|
|
<section class="page-section pt-4 pt-lg-5">
|
|
<div class="container">
|
|
<?php if (!$service): ?>
|
|
<div class="empty-panel">
|
|
<span class="signal-chip signal-chip--gold mb-3">404</span>
|
|
<h1 class="page-title">Package detail unavailable</h1>
|
|
<p class="empty-copy">Return to the service catalog to continue browsing the current package programs.</p>
|
|
<a class="btn btn-brand mt-3" href="services.php">Back to services</a>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="hero-shell">
|
|
<div class="row g-4 align-items-start">
|
|
<div class="col-lg-7">
|
|
<span class="section-kicker">Package detail</span>
|
|
<h1 class="page-title"><?= h($service['category']) ?></h1>
|
|
<p class="lead-copy"><?= h($service['headline']) ?></p>
|
|
<p class="section-copy mb-4"><?= h($service['summary']) ?></p>
|
|
<div class="d-flex flex-wrap gap-2 inline-actions">
|
|
<a class="btn btn-brand" href="<?= h(page_url('partnership.php', ['interest' => $service['category'], 'route' => 'Package Customization'])) ?>">Customize Experience</a>
|
|
<a class="btn btn-outline-brand" href="services.php">Back to services</a>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-5">
|
|
<div class="surface-card hero-panel h-100">
|
|
<span class="signal-chip signal-chip--primary mb-3">Program snapshot</span>
|
|
<div class="meta-stack mb-3">
|
|
<span class="meta-label">Audience</span>
|
|
<strong><?= h($service['audience']) ?></strong>
|
|
</div>
|
|
<div class="meta-stack mb-3">
|
|
<span class="meta-label">Duration</span>
|
|
<strong><?= h($service['duration']) ?></strong>
|
|
</div>
|
|
<div class="meta-stack">
|
|
<span class="meta-label">Outcome</span>
|
|
<p class="card-copy mb-0"><?= h($service['outcome']) ?></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row g-4 mt-1">
|
|
<div class="col-lg-7">
|
|
<div class="surface-card h-100">
|
|
<span class="section-kicker">Included modules</span>
|
|
<h2 class="section-title">A thin but complete package outline.</h2>
|
|
<ul class="service-points mt-3">
|
|
<?php foreach ($service['includes'] as $point): ?>
|
|
<li><?= h($point) ?></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-5">
|
|
<div class="surface-card h-100">
|
|
<span class="section-kicker">Why it matters</span>
|
|
<p class="card-copy mb-3">This detail page shows how a visitor can understand the package logic before moving into a structured conversation.</p>
|
|
<p class="card-copy mb-0">It also keeps the site from feeling like a single landing page by providing a usable browse → detail → inquiry journey.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<section class="page-section pb-0 anchor-offset">
|
|
<div class="section-head">
|
|
<span class="section-kicker">Related packages</span>
|
|
<h2 class="section-title">More programs in the ecosystem.</h2>
|
|
</div>
|
|
<div class="preview-grid">
|
|
<?php foreach ($relatedServices as $related): ?>
|
|
<article class="surface-card service-card">
|
|
<span class="signal-chip signal-chip--accent mb-2"><?= h($related['track']) ?></span>
|
|
<h3 class="card-title"><?= h($related['category']) ?></h3>
|
|
<p class="card-copy mb-0"><?= h($related['summary']) ?></p>
|
|
<div class="mt-auto">
|
|
<a class="button-link" href="<?= h(page_url('service.php', ['slug' => $related['slug']])) ?>">Open package detail</a>
|
|
</div>
|
|
</article>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</section>
|
|
<?php endif; ?>
|
|
</div>
|
|
</section>
|
|
<?php require __DIR__ . '/includes/footer.php'; ?>
|