<?php
		require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/session_bootstrap.php';
		if (!empty($_SESSION['logged_in'])) {
			require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/account_suspension.php';
			try {
				$pdo = og_session_get_pdo();
				if ($pdo instanceof PDO) {
					$suspension = og_is_current_user_suspended($pdo);
					if (!empty($suspension['is_suspended'])) {
						header('Location: /account/profile/?error=' . urlencode('Twoje konto jest zawieszone. Wchodzenie do gier jest zablokowane.'));
						exit();
					}
				}
			} catch (Throwable $e) {
				// Fail open: nie blokuj strony przy problemie z odczytem stanu.
			}
		}
?>
<!DOCTYPE html>
<html>
<head>
	<title>Mecze | kontakt: wspolpraca@togethere.cloud</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta charset="utf-8">
	<meta name="keywords" content="projekty przyszłości"/>
	<link rel="stylesheet" href="/css/header.css" type="text/css" media="all"/>
	<link rel="stylesheet" href="/css/footer.css" type="text/css" media="all"/>
	<link href="//fonts.googleapis.com/css?family=Lato:400,500,600,700,800,900" rel="stylesheet">
	<style>
		nav.navigation { margin-top: 0 !important; }
		body { background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%); min-height: 100vh; }
		.public-wrap { max-width: 980px; margin: 0 auto 36px; padding: 0 16px; }
		.public-card { background: #fff; border: 1px solid #dbe3ec; border-radius: 12px; box-shadow: 0 10px 22px rgba(0,0,0,0.08); padding: 20px; }
		.public-card h1 { margin: 0 0 12px 0; color: #111; }
		.public-card p { margin: 0 0 10px 0; color: #475569; line-height: 1.5; }
		@media (max-width: 768px) {
			.public-wrap { padding: 0 10px; }
		}
	</style>
</head>
<body>
	<?php
		if (!empty($_SESSION['logged_in'])) {
			include $_SERVER['DOCUMENT_ROOT'].'/global/navLogined.php';
		} else {
			include $_SERVER['DOCUMENT_ROOT'].'/global/navNoLogined.php';
		}
	?>
	<main>
		<section class="public-wrap">
			<div class="public-card">
				<h1>⚽ Mecze (publiczne)</h1>
				<p>Funkcjonalność w przygotowaniu.</p>
				<p>Ta sekcja publiczna będzie rozwijana w kolejnych etapach.</p>
			</div>
		</section>
	</main>
	<?php
		if (!empty($_SESSION['logged_in'])) {
			include $_SERVER['DOCUMENT_ROOT'].'/global/footerLogined.php';
		} else {
			include $_SERVER['DOCUMENT_ROOT'].'/global/footerNoLogined.php';
		}
	?>
</body>
</html>