<?php
if (!isset($pageTitle)) $pageTitle = 'EnglishSpeak';
if (!isset($pageSubtitle)) $pageSubtitle = '';
if (!isset($showBack)) $showBack = false;
if (!isset($backUrl)) $backUrl = 'javascript:history.back()';
if (!isset($activeStudentNav)) $activeStudentNav = '';
if (!isset($hideStudentHeader)) $hideStudentHeader = false;
?>
<!doctype html>
<html lang="vi">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<style>
/* Prevent in-app browsers (e.g. Zalo WebView) from auto-enlarging text. */
html, body, .student-app {
    -webkit-text-size-adjust: none !important;
    text-size-adjust: none !important;
}
</style>
<title><?=htmlspecialchars($pageTitle,ENT_QUOTES,'UTF-8')?> - EnglishSpeak</title>
<link rel="stylesheet" href="/EnglishSpeak/assets/css/student-app.css">
</head>
<body>
<div class="student-app">
<?php if (!$hideStudentHeader): ?>
<header class="student-header">
    <?php if ($showBack): ?>
    <a class="student-back" href="<?=htmlspecialchars($backUrl,ENT_QUOTES,'UTF-8')?>" aria-label="Quay lại">←</a>
    <?php else: ?>
    <span class="student-back student-back--empty" aria-hidden="true"></span>
    <?php endif; ?>

    <div class="student-header__text">
        <h1><?=htmlspecialchars($pageTitle,ENT_QUOTES,'UTF-8')?></h1>
        <?php if ($pageSubtitle !== ''): ?>
        <p><?=htmlspecialchars($pageSubtitle,ENT_QUOTES,'UTF-8')?></p>
        <?php endif; ?>
    </div>

    <span class="student-header__spacer" aria-hidden="true"></span>
</header>
<?php endif; ?>

<main class="student-content">
