<!DOCTYPE html>
<html lang="en" style="width: 100%;height: 100%;padding: 0px;margin: 0px;">
    <head>
        <!-- this page should never be indexed -->
        <title>dubia.cc — traditional Catholic faith, in 17 languages</title>
        <meta name="description" content="dubia is a multilingual collection of articles, prayers and documents on the traditional Catholic faith. Did the Church really teach…? Answers to errors and questions, prayers, and more." />
        <meta name="robots" content="noindex,follow" />

        <meta property="og:type" content="website" />
        <meta property="og:site_name" content="dubia.cc" />
        <meta property="og:url" content="https://dubia.cc/" />
        <meta property="og:title" content="dubia.cc — traditional Catholic faith, in 17 languages" />
        <meta property="og:description" content="A multilingual collection of articles, prayers and documents on the traditional Catholic faith." />
        <meta property="og:image" content="https://dubia.cc/static/img/og-default.png" />
        <meta property="og:image:alt" content="dubia.cc" />
        <meta property="og:image:width" content="1200" />
        <meta property="og:image:height" content="630" />
        <meta property="og:image:type" content="image/png" />
        <meta name="twitter:card" content="summary_large_image" />
        <meta name="twitter:title" content="dubia.cc — traditional Catholic faith, in 17 languages" />
        <meta name="twitter:description" content="A multilingual collection of articles, prayers and documents on the traditional Catholic faith." />
        <meta name="twitter:image" content="https://dubia.cc/static/img/og-default.png" />

        <link rel="alternate" hreflang="en" href="https://dubia.cc/en" />
        <link rel="alternate" hreflang="de" href="https://dubia.cc/de" />
        <link rel="alternate" hreflang="fr" href="https://dubia.cc/fr" />
        <link rel="alternate" hreflang="it" href="https://dubia.cc/it" />
        <link rel="alternate" hreflang="es" href="https://dubia.cc/es" />
        <link rel="alternate" hreflang="pt" href="https://dubia.cc/pt" />
        <link rel="alternate" hreflang="pt-br" href="https://dubia.cc/br" />
        <link rel="alternate" hreflang="pl" href="https://dubia.cc/pl" />
        <link rel="alternate" hreflang="ro" href="https://dubia.cc/ro" />
        <link rel="alternate" hreflang="ru" href="https://dubia.cc/ru" />
        <link rel="alternate" hreflang="tr" href="https://dubia.cc/tr" />
        <link rel="alternate" hreflang="el" href="https://dubia.cc/el" />
        <link rel="alternate" hreflang="ar" href="https://dubia.cc/ar" />
        <link rel="alternate" hreflang="tl" href="https://dubia.cc/tl" />
        <link rel="alternate" hreflang="zh" href="https://dubia.cc/zh" />
        <link rel="alternate" hreflang="ko" href="https://dubia.cc/ko" />
        <link rel="alternate" hreflang="ja" href="https://dubia.cc/ja" />
        <link rel="alternate" hreflang="x-default" href="https://dubia.cc" />

        <link id="favicon" rel="icon" type="image/png" href="https://dubia.cc/static/img/logo/logo-sm-32.avif">
        <link id="favicon-dark" rel="icon" type="image/png" href="https://dubia.cc/static/img/logo/logo-sm-32.avif" media="not all">
        <link id="favicon-apple-touch" rel="apple-touch-icon" type="image/png" href="https://dubia.cc/static/img/logo/logo-sm-192.avif">
        <link id="favicon-apple-touch-dark" rel="apple-touch-icon" type="image/png" href="https://dubia.cc/static/img/logo/logo-sm-dark-192.avif" media="not all">
        <style>
            body {
                width: 100%;
                height: 100%;
                padding: 0px;
                margin: 0px;
                background: #131313;
                color: white;
                font-family: Arial, sans-serif;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
            }
            .language-select {
                margin-top: 20px;
                font-size: 1.2em;
                padding: 10px;
                border-radius: 5px;
                border: 1px solid white;
                background-color: #333;
                color: white;
                cursor: pointer;
                width: 200px;
            }
            .language-list {
                list-style-type: none;
                margin: 0px;
                padding: 0px;
                margin-top: 20px;
                max-width: 500px;
                width: 90%;
            }
            .language-list li {
                margin: 10px;
                border: 1px solid white;
                border-radius: 5px;
                text-align: center;
            }
            .language-list a {
                color: white !important;
                font-size: 1.5em;
                width: 100%;
                height: 100%;
                padding: 20px 0px;
                font-weight: bold;
                display: block;
                text-decoration: none;
            }
            .language-list a:hover {
                background-color: rgba(255, 255, 255, 0.1);
            }
            h1 {
                font-size: 2.5em;
                margin-bottom: 20px;
            }
        </style>
    </head>
    <body style="width: 100%;height: 100%;padding: 0px;margin: 0px;background:#131313;">
        <noscript>
            <div style="width:100%;height:100%;">
                <ul style="list-style-type:none;margin:0px;padding:0px;margin-top:20px;">
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/en"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >English</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/de"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >Deutsch</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/fr"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >Français</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/it"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >Italiano</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/es"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >Español</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/pt"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >Português (Portugal)</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/br"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >Português (Brasil)</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/pl"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >Polski</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/ro"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >Română</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/ru"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >Русский</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/tr"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >Türkçe</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/el"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >Ελληνικά</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/ar"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >العربية</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/tl"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >Filipino</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/zh"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >中文</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/ko"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >한국어</div></a></li>
                    <li style="margin:20px;border: 1px solid white;border-radius:5px;text-align: center;"><a href="/ja"><div style="color:white !important;font-size:2em;width:100%;height:100%;padding:50px 0px;font-weight: bold;" >日本語</div></a></li>
                </ul>
            </div>
        </noscript>
        <script>
            "use strict";
            document.addEventListener('DOMContentLoaded', function() {
                const body = document.body;
                
                // Create title
                const title = document.createElement('h1');
                title.textContent = 'dubia.cc';
                body.appendChild(title);
                
                // Create language select
                const languageSelect = document.createElement('select');
                languageSelect.className = 'language-select';
                languageSelect.id = 'language-select';
                
                // Language options
                const languages = [
                    { code: 'en', name: 'English' },
                    { code: 'de', name: 'Deutsch' },
                    { code: 'fr', name: 'Français' },
                    { code: 'it', name: 'Italiano' },
                    { code: 'es', name: 'Español' },
                    { code: 'pt', name: 'Português (Portugal)' },
                    { code: 'br', name: 'Português (Brasil)' },
                    { code: 'pl', name: 'Polski' },
                    { code: 'ro', name: 'Română' },
                    { code: 'ru', name: 'Русский' },
                    { code: 'tr', name: 'Türkçe' },
                    { code: 'el', name: 'Ελληνικά' },
                    { code: 'ar', name: 'العربية' },
                    { code: 'tl', name: 'Filipino' },
                    { code: 'zh', name: '中文' },
                    { code: 'ko', name: '한국어' },
                    { code: 'ja', name: '日本語' }
                ];
                
                // Add option to select language
                const defaultOption = document.createElement('option');
                defaultOption.value = '';
                defaultOption.textContent = 'Select Language';
                defaultOption.selected = true;
                languageSelect.appendChild(defaultOption);
                
                // Add language options
                languages.forEach(lang => {
                    const option = document.createElement('option');
                    option.value = lang.code;
                    option.textContent = lang.name;
                    languageSelect.appendChild(option);
                });
                
                // Add change event
                languageSelect.addEventListener('change', function() {
                    if (this.value) {
                        window.location.href = '/' + this.value;
                    }
                });
                
                body.appendChild(languageSelect);
                
                // Create language list with ALL languages
                const languageList = document.createElement('ul');
                languageList.className = 'language-list';
                
                // Add ALL languages as direct links
                languages.forEach(lang => {
                    const li = document.createElement('li');
                    const a = document.createElement('a');
                    a.href = '/' + lang.code;
                    a.textContent = lang.name;
                    li.appendChild(a);
                    languageList.appendChild(li);
                });
                
                body.appendChild(languageList);
                
                // Auto-redirect based on browser language
                var userLang = window.navigator.language || window.navigator.userLanguage;
                userLang = userLang.toLowerCase().split('-')[0]; // Get primary language code
                
                // Special handling for Portuguese
                if (userLang === 'pt') {
                    const fullLang = window.navigator.language || window.navigator.userLanguage;
                    if (fullLang.toLowerCase().includes('br')) {
                        userLang = 'br'; // Brazilian Portuguese
                    }
                }
                
                // Check if language is supported
                if (languages.some(lang => lang.code === userLang)) {
                    window.location.href = '/' + userLang;
                } else {
                    window.location.href = '/en'; // Default to English
                }
            });
        </script>
    </body>
</html>