<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ company.name }} - {% block title %}{% endblock %}</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap"
        rel="stylesheet">
</head>

<body>
    <header>
        <div class="container">
            <h1>
                <a href="{{ url_for('index') }}" class="logo">
                    <img src="{{ url_for('static', filename='images/logo_hk.svg') }}" alt="{{ t('company_name') }}"
                        class="logo-img">
                    <!-- {{ t('company_name') }} -->
                </a>
            </h1>
            <button class="mobile-menu-toggle" aria-label="Toggle menu">
                <span></span>
                <span></span>
                <span></span>
            </button>
            <nav class="nav-menu">
                <ul>
                    <li><a href="{{ url_for('index') }}">{{ t('home') }}</a></li>
                    <li><a href="{{ url_for('services') }}">{{ t('services') }}</a></li>
                    <li><a href="{{ url_for('pricing') }}">{{ t('pricing') if t('pricing') else '收费' }}</a></li>
                    <li><a href="{{ url_for('download') }}">{{ t('download') if t('download') else '下载' }}</a></li>
                    <li><a href="{{ url_for('help') }}">{{ t('help') if t('help') else '帮助' }}</a></li>
                    <li><a href="{{ url_for('contact') }}">{{ t('contact') }}</a></li>
                    <li><a href="{{ url_for('about') }}">{{ t('about') }}</a></li>
                    <li><a href="https://bayizhinengjf.vip.cpolar.cn/" target="_blank">{{ t('online') }}</a></li>
                </ul>
                <div class="language-switcher">
                    <select id="language-dropdown" onchange="changeLanguage(this.value)">
                        <option value="" disabled selected>{{ t('language') if t('language') else 'Language' }}</option>
                        {% for lang_code, lang_name in languages.items() %}
                        <option value="{{ lang_code }}" {% if lang==lang_code %}selected{% endif %}>{{ lang_name }}
                        </option>
                        {% endfor %}
                    </select>
                </div>
            </nav>
        </div>
    </header>

    <main>
        {% block content %}{% endblock %}
    </main>

    <footer>
        <div class="container">
            <div class="footer-brand">
                <h3>{{ t('company_name') }}</h3>
                <p>{{ t('slogan') }}</p>
            </div>
            <div class="footer-links">
                <h4>{{ t('quick_links') if t('quick_links') else '快速链接' }}</h4>
                <ul>
                    <li><a href="{{ url_for('index') }}">{{ t('home') }}</a></li>
                    <li><a href="{{ url_for('about') }}">{{ t('about') }}</a></li>
                    <li><a href="{{ url_for('services') }}">{{ t('services') }}</a></li>
                    <li><a href="{{ url_for('contact') }}">{{ t('contact') }}</a></li>
                    <li><a href="https://bayizhinengjf.vip.cpolar.cn/" target="_blank">{{ t('online') }}</a></li>
                </ul>
            </div>
            <div class="footer-links">
                <h4>{{ t('services') }}</h4>
                <ul>
                    {% for service in company.services %}
                    <li><a href="{{ url_for('services') }}">{{ service.name }}</a></li>
                    {% endfor %}
                </ul>
            </div>
            <div class="footer-links">
                <h4>{{ t('contact_us') if t('contact_us') else '联系我们' }}</h4>
                <ul>
                    <li>{{ company.contact.address }}</li>
                    <li>{{ t('tel') }}: {{ company.contact.Tel }}</li>
                    <li>{{ t('fax') }}: {{ company.contact.Fax }}</li>
                    <li>{{ t('email') }}: {{ company.contact.Email }}</li>
                </ul>
            </div>
            <div class="footer-bottom">
                <p>&copy; 2025 {{ company.name }}. {{ t('all_rights_reserved') }}</p>
                <div class="footer-links">
                    <a href="#">{{ t('privacy_policy') }}</a>
                    <a href="#">{{ t('terms_of_use') }}</a>
                </div>
            </div>
        </div>
    </footer>

    <script src="{{ url_for('static', filename='js/mobile-menu.js') }}"></script>
    <script src="{{ url_for('static', filename='js/tabs.js') }}"></script>
    <script src="{{ url_for('static', filename='js/market-ticker.js') }}"></script>
    <script src="{{ url_for('static', filename='js/help-navigation.js') }}"></script>
</body>

</html>