<footer>
    © <?php echo date("Y"); ?> Colegio Químico Farmacéutico Departamental de Lima. Todos los derechos reservados.
</footer>

<!-- ===== CHATBOT (igual que antes) ===== -->
<div id="chatbot-icon">
    <a href="javascript:void(0);" onclick="openChatbotPopup();">
        <div class="icon-container">
            <img src="https://cqfdlima.org/wp-content/uploads/2025/10/Kymito-Chat-Bot.gif" alt="Chatbot Kymito" />
        </div>
    </a>
</div>
<div id="chatbot-message">
    <p id="message-text">Hola, soy Kymito tu asistente en línea</p>
</div>
<style>
    #chatbot-icon {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 9999;
        cursor: pointer;
    }
    #chatbot-icon .icon-container {
        width: 80px;
        height: 80px;
        background-color: #003366;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        border: 3px solid white;
    }
    #chatbot-icon:hover .icon-container {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }
    #chatbot-icon img {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        object-fit: cover;
    }
    #chatbot-message {
        position: fixed;
        bottom: 120px;
        right: 20px;
        background: #003366;
        color: white;
        padding: 12px 15px;
        border-radius: 15px;
        border: 2px solid white;
        z-index: 9998;
        font-size: 14px;
        font-family: 'Inter', sans-serif;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        max-width: 250px;
        animation: fadeIn 0.5s ease;
    }
    #chatbot-message::after {
        content: '';
        position: absolute;
        bottom: -10px;
        right: 20px;
        border-width: 10px 10px 0;
        border-style: solid;
        border-color: #003366 transparent transparent;
    }
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }
</style>
<script>
    let messages = ["¡Haz tus consultas aquí!", "¿Necesitas ayuda con algo? ¡Haz clic!", "Hola, soy Kymito tu asistente en línea"];
    let currentMessage = 0;
    let messageInterval;
    function startMessages() {
        messageInterval = setInterval(function() {
            document.getElementById('message-text').innerText = messages[currentMessage];
            currentMessage = (currentMessage + 1) % messages.length;
        }, 3000);
    }
    startMessages();
    function openChatbotPopup() {
        const width = 600;
        const height = 1000;
        const left = window.innerWidth - width - 20;
        const top = 20;
        window.open('http://intranet.tescanet.com/asistente/', 'chatbotPopup', `width=${width},height=${height},top=${top},left=${left},resizable=yes,scrollbars=yes`);
    }
</script>
</body>
</html>