<!-- Replace your entire header.php file with this updated version -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Shubank - A Trusted Space for Market Players</title>
    <meta property="og:title" content="Shubank - A Trusted Space for Market Players" />
<meta property="og:description" content="Play and track results for Disawar, Delhi Bazaar, Shree Ganesh, Faridabad, Ghaziabad, Radhey-Radhey, and Gali. Enjoy a seamless, secure, and rewarding numerology experience with Shubank." />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://shubank.co/" />
<meta property="og:image" content="images/shubank-play-online-bg.png" />
<meta property="og:site_name" content="Shubank" />
<meta property="og:locale" content="en_US" />
    <link rel="stylesheet" href="style.css">
    <script src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</head>
<body>
    <!-- Header -->
    <header class="header">
        <div class="container header-inner">
            <a class="logo" href="index.php">
                Shubank
            </a>
            <button class="menu-btn" data-menu-btn>&#9776;</button>
            <nav class="nav" data-nav>
                <a href="index.php">Home</a>
                <a href="about.php">About</a>
                <a href="rate-timing.php">Rate & Timing</a>
                <a href="results.php">Results</a>
                <a href="contact.php">Contact</a>
            </nav>
            <div style="display:flex;align-items:center;gap:10px;">
                <!-- Language Translator Dropdown -->
                <div class="language-dropdown">
                    <button class="language-btn" onclick="toggleLanguageMenu()">
                        <span class="lang-icon">🌐</span>
                        <span class="lang-text" id="currentLang">English</span>
                        <span class="lang-arrow">▼</span>
                    </button>
                    <div class="language-menu" id="languageMenu">
                        <div class="lang-search">
                            <input type="text" placeholder="Search language..." id="langSearch" onkeyup="filterLanguages()">
                        </div>
                        <div class="lang-options" id="langOptions">
                            <div class="lang-option" onclick="selectLanguage('en', 'English')">🇬🇧 English</div>
                            <div class="lang-option" onclick="selectLanguage('hi', 'हिंदी')">🇮🇳 हिंदी (Hindi)</div>
                            <div class="lang-option" onclick="selectLanguage('bn', 'বাংলা')">🇧🇩 বাংলা (Bengali)</div>
                            <div class="lang-option" onclick="selectLanguage('te', 'తెలుగు')">🏛️ తెలుగు (Telugu)</div>
                            <div class="lang-option" onclick="selectLanguage('mr', 'मराठी')">🏛️ मराठी (Marathi)</div>
                            <div class="lang-option" onclick="selectLanguage('ta', 'தமிழ்')">🏛️ தமிழ் (Tamil)</div>
                            <div class="lang-option" onclick="selectLanguage('ur', 'اردو')">🏛️ اردو (Urdu)</div>
                            <div class="lang-option" onclick="selectLanguage('gu', 'ગુજરાતી')">🏛️ ગુજરાતી (Gujarati)</div>
                            <div class="lang-option" onclick="selectLanguage('kn', 'ಕನ್ನಡ')">🏛️ ಕನ್ನಡ (Kannada)</div>
                            <div class="lang-option" onclick="selectLanguage('or', 'ଓଡ଼ିଆ')">🏛️ ଓଡ଼ିଆ (Odia)</div>
                            <div class="lang-option" onclick="selectLanguage('pa', 'ਪੰਜਾਬੀ')">🏛️ ਪੰਜਾਬੀ (Punjabi)</div>
                            <div class="lang-option" onclick="selectLanguage('ml', 'മലയാളം')">🏛️ മലയാളം (Malayalam)</div>
                            <div class="lang-option" onclick="selectLanguage('as', 'অসমীয়া')">🏛️ অসমীয়া (Assamese)</div>
                            <div class="lang-option" onclick="selectLanguage('ne', 'नेपाली')">🏛️ नेपाली (Nepali)</div>
                            <div class="lang-option" onclick="selectLanguage('si', 'සිංහල')">🏛️ සිංහල (Sinhala)</div>
                            <div class="lang-option" onclick="selectLanguage('sa', 'संस्कृत')">🏛️ संस्कृत (Sanskrit)</div>
                        </div>
                        <!-- Language Translator Dropdown -->
    <div class="language-dropdown">
        <!-- ...existing language dropdown code... -->
    </div>
    <div id="google_translate_element"></div>
    <a href="login.php" class="cta-btn">👉 Login</a>
</div>
                    </div>
                </div>
                <div style="display:flex;align-items:center;gap:10px;">
    
                <a href="login.php" class="cta-btn">👉 Login</a>
            </div>
        </div>
    </header>
    <!-- End Header -->

    <!-- Google Translate Widget (Visible Method) -->
    <div id="google_translate_element"></div>

    <!-- JavaScript for Menu Toggle and Language Functions -->
    <script>
        // Menu Toggle
        document.addEventListener('DOMContentLoaded', function() {
            var btn = document.querySelector('[data-menu-btn]');
            var nav = document.querySelector('[data-nav]');
            if(btn && nav) {
                btn.onclick = function() {
                    nav.classList.toggle('active');
                };
            }
        });

        // Language Translator Functions
        function toggleLanguageMenu() {
            const menu = document.getElementById('languageMenu');
            menu.classList.toggle('show');
        }

        function selectLanguage(code, name) {
            document.getElementById('currentLang').textContent = name;
            document.getElementById('languageMenu').classList.remove('show');
            
            // Store selected language
            localStorage.setItem('selectedLanguage', code);
            localStorage.setItem('selectedLanguageName', name);
            
            // Trigger Google Translate
            if (code === 'en') {
                window.location.reload();
            } else {
                setTimeout(() => {
                    triggerTranslation(code);
                }, 500);
            }
        }

        function triggerTranslation(langCode) {
            const frames = document.getElementsByTagName('iframe');
            for (let frame of frames) {
                try {
                    if (frame.contentDocument) {
                        const select = frame.contentDocument.querySelector('select');
                        if (select) {
                            select.value = langCode;
                            select.dispatchEvent(new Event('change'));
                            return;
                        }
                    }
                } catch(e) {}
            }
            const select = document.querySelector('.goog-te-combo');
            if (select) {
                select.value = langCode;
                select.dispatchEvent(new Event('change'));
                return;
            }
            if (window.google && window.google.translate) {
                const translateElement = new google.translate.TranslateElement();
                translateElement.showBanner(false);
            }
        }

        function filterLanguages() {
            const searchTerm = document.getElementById('langSearch').value.toLowerCase();
            const options = document.querySelectorAll('.lang-option');
            options.forEach(option => {
                const text = option.textContent.toLowerCase();
                option.style.display = text.includes(searchTerm) ? 'block' : 'none';
            });
        }

        document.addEventListener('click', function(e) {
            const dropdown = document.querySelector('.language-dropdown');
            if (!dropdown.contains(e.target)) {
                document.getElementById('languageMenu').classList.remove('show');
            }
        });

        function googleTranslateElementInit() {
            new google.translate.TranslateElement({
                pageLanguage: 'en',
                includedLanguages: 'hi,bn,te,mr,ta,ur,gu,kn,or,pa,ml,as,ne,si,sa',
                layout: google.translate.TranslateElement.InlineLayout.SIMPLE
            }, 'google_translate_element');
            const savedLang = localStorage.getItem('selectedLanguage');
            const savedLangName = localStorage.getItem('selectedLanguageName');
            if (savedLang && savedLangName && savedLang !== 'en') {
                document.getElementById('currentLang').textContent = savedLangName;
                setTimeout(() => {
                    triggerTranslation(savedLang);
                }, 2000);
            }
        }
    </script>
    <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</body>
</html>
