<footer class="bg-white border-t border-gray-200 mt-auto">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4">
        <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2">

            <!-- Nombre + tagline -->
            <div class="flex items-center gap-3">
                <div class="w-7 h-7 bg-indigo-600 rounded-md flex items-center justify-center flex-shrink-0">
                    <svg class="w-4 h-4 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                              d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
                    </svg>
                </div>
                <div>
                    <span class="text-sm font-semibold text-gray-800"><?= htmlspecialchars(COMPANY_NAME) ?></span>
                    <span class="hidden sm:inline text-gray-300 mx-2">—</span>
                    <span class="hidden sm:inline text-xs text-gray-400"><?= htmlspecialchars(COMPANY_TAGLINE) ?></span>
                </div>
            </div>

            <!-- Datos de contacto (según switches) -->
            <div class="flex flex-wrap items-center gap-x-4 gap-y-1">

                <?php if (COMPANY_SHOW_PHONE): ?>
                <a href="tel:<?= preg_replace('/\s+/', '', COMPANY_PHONE) ?>"
                   class="flex items-center gap-1 text-xs text-gray-500 hover:text-indigo-600 transition-colors">
                    <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                              d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"/>
                    </svg>
                    <?= htmlspecialchars(COMPANY_PHONE) ?>
                </a>
                <?php endif; ?>

                <?php if (COMPANY_SHOW_EMAIL): ?>
                <a href="mailto:<?= htmlspecialchars(COMPANY_EMAIL) ?>"
                   class="flex items-center gap-1 text-xs text-gray-500 hover:text-indigo-600 transition-colors">
                    <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                              d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/>
                    </svg>
                    <?= htmlspecialchars(COMPANY_EMAIL) ?>
                </a>
                <?php endif; ?>

                <?php if (COMPANY_SHOW_NIT): ?>
                <span class="text-xs text-gray-400">
                    NIT <?= htmlspecialchars(COMPANY_NIT) ?>
                </span>
                <?php endif; ?>

                <?php if (COMPANY_SHOW_WEBSITE): ?>
                <span class="text-xs text-gray-400"><?= htmlspecialchars(COMPANY_WEBSITE) ?></span>
                <?php endif; ?>

                <?php if (COMPANY_SHOW_ADDRESS): ?>
                <span class="text-xs text-gray-400"><?= htmlspecialchars(COMPANY_ADDRESS) ?></span>
                <?php endif; ?>

                <span class="text-xs text-gray-300">|</span>
                <span class="text-xs text-gray-400">&copy; <?= date('Y') ?> Todos los derechos reservados</span>
            </div>

        </div>
    </div>
</footer>
