<?php
header('Content-Type: application/xml; charset=utf-8');
$currentHost = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';
$currentScheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
$base = $currentScheme . '://' . $currentHost;
$today = date('Y-m-d');
$urls = ['/', '/brand-life/', '/stories/', '/healing-video/', '/ai-inspiration/', '/creators/', '/contact/', '/slow-life/', '/healing-gallery/', '/inspiration-workshop/', '/emotional-treehole/', '/quality-life/'];
echo '<?xml version="1.0" encoding="UTF-8"?>' . "
";
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?php foreach ($urls as $u): ?>
  <url><loc><?php echo htmlspecialchars($base . $u, ENT_XML1, 'UTF-8'); ?></loc><lastmod><?php echo $today; ?></lastmod><changefreq>daily</changefreq><priority><?php echo $u === '/' ? '1.0' : '0.8'; ?></priority></url>
<?php endforeach; ?>
</urlset>
