<?php
$base_url = $global_config['base_url'] ?? 'https://masllamadas.es';
$pages = [
    ['/', 'weekly', 1.0],
    ['/servicios', 'monthly', 0.8],
    ['/sectores', 'monthly', 0.8],
    ['/sectores/reformas', 'monthly', 0.9],
    ['/sectores/fontaneros', 'monthly', 0.9],
    ['/sectores/electricistas', 'monthly', 0.9],
    ['/sectores/climatizacion', 'monthly', 0.9],
    ['/sectores/cerrajeros', 'monthly', 0.9],
    ['/sectores/limpieza', 'monthly', 0.9],
    ['/precios', 'monthly', 0.8],
    ['/blog', 'weekly', 0.8],
    ['/proceso', 'monthly', 0.7],
    ['/faq', 'monthly', 0.7],
    ['/demos', 'monthly', 0.7],
    ['/contacto', 'yearly', 0.6],
    ['/legal/aviso-legal', 'yearly', 0.5],
    ['/legal/privacidad', 'yearly', 0.5],
    ['/legal/cookies', 'yearly', 0.5],
];
header('Content-Type: application/xml; charset=utf-8');
?>
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <?php foreach ($pages as $page): ?>
    <url>
        <loc><?= htmlspecialchars($base_url . $page[0]) ?></loc>
        <changefreq><?= $page[1] ?></changefreq>
        <priority><?= $page[2] ?></priority>
    </url>
    <?php endforeach; ?>
</urlset>
