/**
 * Xaqani Service - Saytın Ön Üzü üçün Ümumi Skriptlər
 */
    .exo-regular {
  font-family: "Exo 2", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.exo-bold {
  font-family: "Exo 2", sans-serif;
  font-weight: 700;
  font-style: normal;
}
body {
  font-family: "Exo 2", sans-serif;
}


    // 1. Mobil Menyu Funksionallığı
    const mobileMenuButton = document.getElementById('mobile-menu-button');
    const mobileMenu = document.getElementById('mobile-menu');

    if (mobileMenuButton && mobileMenu) {
        mobileMenuButton.addEventListener('click', () => {
            mobileMenu.classList.toggle('hidden');
        });
    }

    // 2. Aktiv Menyu Linkini Təyin Etmək
    const currentPath = window.location.pathname.split("/").pop() || 'index.php';
    const navLinks = document.querySelectorAll('header nav a');

    navLinks.forEach(link => {
        const linkPath = link.getAttribute('href').split("/").pop() || 'index.php';
        
        if (currentPath === linkPath) {
            link.classList.add('active');
        }
    });

// 3. Yuxarı Qayıt (Scroll to Top) Düyməsi
const scrollTopButton = document.createElement('button');
scrollTopButton.innerHTML = '<i class="fas fa-arrow-up"></i>';
scrollTopButton.className = 'fixed bottom-5 left-5 bg-blue-600 text-white w-12 h-12 rounded-full shadow-lg hover:bg-blue-700 focus:outline-none transition-all duration-300 transform scale-0 opacity-0 z-40';
document.body.appendChild(scrollTopButton);

window.addEventListener('scroll', () => {
    if (window.scrollY > 300) {
        scrollTopButton.classList.remove('scale-0', 'opacity-0');
    } else {
        scrollTopButton.classList.add('scale-0', 'opacity-0');
    }
});

scrollTopButton.addEventListener('click', () => {
    window.scrollTo({
        top: 0,
        behavior: 'smooth'
    });
});


    // 4. Qaranlıq Rejim Keçid Düyməsinin Məntiqi
    var themeToggleDarkIcon = document.getElementById('theme-toggle-dark-icon');
    var themeToggleLightIcon = document.getElementById('theme-toggle-light-icon');
    var themeToggleBtn = document.getElementById('theme-toggle');

    // Səhifə yüklənərkən ikonu düzgün vəziyyətə gətiririk
    if (localStorage.getItem('color-theme') === 'dark' || (!('color-theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
        themeToggleLightIcon.classList.remove('hidden');
        themeToggleDarkIcon.classList.add('hidden');
    } else {
        themeToggleLightIcon.classList.add('hidden');
        themeToggleDarkIcon.classList.remove('hidden');
    }

    themeToggleBtn.addEventListener('click', function() {
        // İkonları dəyişdiririk
        themeToggleDarkIcon.classList.toggle('hidden');
        themeToggleLightIcon.classList.toggle('hidden');

        // Əgər seçim yaddaşda varsa...
        if (localStorage.getItem('color-theme')) {
            if (localStorage.getItem('color-theme') === 'light') {
                document.documentElement.classList.add('dark');
                localStorage.setItem('color-theme', 'dark');
            } else {
                document.documentElement.classList.remove('dark');
                localStorage.setItem('color-theme', 'light');
            }
        // Əgər yaddaşda yoxdursa...
        } else {
            if (document.documentElement.classList.contains('dark')) {
                document.documentElement.classList.remove('dark');
                localStorage.setItem('color-theme', 'light');
            } else {
                document.documentElement.classList.add('dark');
                localStorage.setItem('color-theme', 'dark');
            }
        }
    });
});
/* gemini-chat.js üçün Təkmil Typing Indicator stilləri */
.typing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}
.typing-indicator span {
    height: 8px;
    width: 8px;
    margin: 0 2px;
    background-color: #9ca3af; /* Açıq rejim üçün rəng */
    border-radius: 50%;
    display: inline-block;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}
.dark .typing-indicator span {
    background-color: #6b7280; /* Qaranlıq rejim üçün rəng */
}
.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}
.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}
@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1.0);
    }
}