<?php

/** @var yii\web\View $this */
/** @var int $code */
/** @var string $message */

use yii\helpers\Url;

$this->title = $code === 404 ? 'Page Not Found' : 'Error';
?>

<section style="padding:8rem 0;text-align:center">
    <div class="container">
        <div style="font-size:7rem;font-weight:700;color:var(--sj-green-light);line-height:1"><?= $code ?></div>
        <h2 class="section-title mb-3">
            <?= $code === 404 ? 'Page Not Found' : 'Something Went Wrong' ?>
        </h2>
        <p class="text-muted mb-5 mx-auto" style="max-width:440px">
            <?= $code === 404
                ? "The page you're looking for doesn't exist or has been moved."
                : htmlspecialchars($message) ?>
        </p>
        <a href="<?= Url::to(['/site/index']) ?>" class="btn btn-sj btn-lg">
            <i class="bi bi-house me-2"></i>Back to Home
        </a>
    </div>
</section>
