<title>BrújulaVirtual</title>
<link rel="icon" type="image/x-icon" href="assets/images/favicon.ico">
<meta charset="utf-8">
<meta name="theme-color" content="#00fcff">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="assets/js/googleAnalytics.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
      integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
        crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css"
      integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous"/>
<link href="assets/css/whatsapp.css" rel="stylesheet"><?php
// ── Assets visuales dinámicos — Sprint 12B ─────────────────────────────────
if (!isset($datosHead)) {
    require_once __DIR__ . '/app/models/datos.php';
    try { $datosHead = (new \app\models\datos())->obtenerDatos(); } catch(Exception $e) { $datosHead = null; }
}
$_logo       = $datosHead->logo       ?? 'assets/images/logo.png';
$_bg_desktop = $datosHead->bg_desktop ?? 'assets/images/2.jpg';
$_bg_mobile  = $datosHead->bg_mobile  ?? 'assets/images/2a.jpg';
$_logo_v     = file_exists($_logo)       ? filemtime($_logo)       : 1;
$_bgd_v      = file_exists($_bg_desktop) ? filemtime($_bg_desktop) : 1;
$_bgm_v      = file_exists($_bg_mobile)  ? filemtime($_bg_mobile)  : 1;
?>
<style>
/* Assets visuales dinámicos — Sprint 12B */
@media (min-width: 768px) {
    body.bg-dinamico { background-color: #1a3a6e;
        background: url("<?= htmlspecialchars($_bg_desktop) ?>?v=<?= $_bgd_v ?>") center/cover no-repeat scroll;
    }
}
@media (max-width: 767px) {
    body.bg-dinamico { background-color: #1a3a6e;
        background: url("<?= htmlspecialchars($_bg_mobile) ?>?v=<?= $_bgm_v ?>") center/cover no-repeat scroll;
    }
}
.logo-entidad { max-height: 55px; }
</style>
