<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Welcome to PyroSoft</title>
    <!-- Favicon -->
    <link rel="icon" href="/favicon.ico" type="image/x-icon">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Retro Font -->
    <link href="https://fonts.googleapis.com/css?family=Press+Start+2P&display=swap" rel="stylesheet">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="/styles/all.min.css">
    <!-- Main Styles -->
    <link rel="stylesheet" href="/styles/main.css?v=1753088453474">
    <!-- CookieConsent CSS -->
    <link rel="stylesheet" href="/styles/cookieconsent.css">
    <link rel="stylesheet" href="/styles/cookieconsent-custom.css">
    <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-EEW81JJHR3"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      window.gtag = function(){dataLayer.push(arguments);}
      gtag('js', new Date());

      // Default consent to denied until user accepts cookies
      const defaultConsent = {
        'analytics_storage': 'denied',
        'ad_storage': 'denied',
        'ad_user_data': 'denied',
        'ad_personalization': 'denied'
      };
      
      console.log('Setting default Google consent:', defaultConsent);
      gtag('consent', 'default', defaultConsent);
      
      // Check for existing consent and update immediately if found
      const cookieValue = document.cookie.split('; ').find(row => row.startsWith('cc_cookie='));
      if (cookieValue) {
          try {
              const ccData = JSON.parse(decodeURIComponent(cookieValue.split('=')[1]));
              const updateConsent = {};
              
              // Check if analytics was previously accepted
              if (ccData.categories?.includes('analytics')) {
                  updateConsent['analytics_storage'] = 'granted';
              }
              
              // Check if advertising was previously accepted
              if (ccData.categories?.includes('advertising')) {
                  updateConsent['ad_storage'] = 'granted';
                  updateConsent['ad_user_data'] = 'granted';
                  updateConsent['ad_personalization'] = 'granted';
              }
              
              // Update consent if any categories were accepted
              if (Object.keys(updateConsent).length > 0) {
                  console.log('Updating consent based on saved preferences:', updateConsent);
                  gtag('consent', 'update', updateConsent);
              }
          } catch (e) {
              console.log('Error parsing consent cookie:', e);
          }
      }

      gtag('config', 'G-EEW81JJHR3');
    </script>
</head>
<body>
    <header>
        <nav class="main-nav">
            <div class="nav-brand">
                <a href="/" class="home-link">PyroSoft</a>
            </div>
            <button class="nav-toggle" aria-label="toggle navigation">
                <span class="hamburger"></span>
            </button>
            <div class="nav-links">
                <a href="/" class="nav-link">Home</a>
                <div class="nav-dropdown">
                    <a href="/blog" class="nav-link dropdown-trigger">Blog ▾</a>
                    <div class="dropdown-content">
                        
                            <a href="/blog/category/amusement/">Amusement</a>
                        
                            <a href="/blog/category/apple/">Apple</a>
                        
                            <a href="/blog/category/asterisk/">Asterisk</a>
                        
                            <a href="/blog/category/blogging/">Blogging</a>
                        
                            <a href="/blog/category/business/">Business</a>
                        
                            <a href="/blog/category/cloud/">Cloud</a>
                        
                            <a href="/blog/category/connectivity/">Connectivity</a>
                        
                            <a href="/blog/category/current-affairs/">Current-affairs</a>
                        
                            <a href="/blog/category/domains/">Domains</a>
                        
                            <a href="/blog/category/economics/">Economics</a>
                        
                            <a href="/blog/category/environment/">Environment</a>
                        
                            <a href="/blog/category/gadgets/">Gadgets</a>
                        
                            <a href="/blog/category/google/">Google</a>
                        
                            <a href="/blog/category/investing/">Investing</a>
                        
                            <a href="/blog/category/linux/">Linux</a>
                        
                            <a href="/blog/category/maps/">Maps</a>
                        
                            <a href="/blog/category/mobiles/">Mobiles</a>
                        
                            <a href="/blog/category/money/">Money</a>
                        
                            <a href="/blog/category/motoring/">Motoring</a>
                        
                            <a href="/blog/category/mysql/">Mysql</a>
                        
                            <a href="/blog/category/one-liners/">One-liners</a>
                        
                            <a href="/blog/category/php/">Php</a>
                        
                            <a href="/blog/category/politics/">Politics</a>
                        
                            <a href="/blog/category/shopping/">Shopping</a>
                        
                            <a href="/blog/category/social-networks/">Social-networks</a>
                        
                            <a href="/blog/category/travel/">Travel</a>
                        
                            <a href="/blog/category/ubuntu/">Ubuntu</a>
                        
                    </div>
                </div>
            </div>
        </nav>
    </header>

    
        <div class="enter-page">
  <h1>Welcome to PyroSoft</h1>
  <p>A Retro-Fueled Blog Experience Awaits</p>
  <a href="/blog/" class="enter-button">
    <i class="fas fa-arrow-right"></i> Enter Site
  </a>
</div>

    

    <footer style="text-align: center; padding: 2rem; margin-top: 3rem; border-top: 2px solid #e0d674;">
        <a href="#" id="cookie-settings" style="color: #e0d674; text-decoration: underline; font-size: 10px;">
            Cookie Settings
        </a>
    </footer>

    <script>
        function initBurgerMenu() {
            const toggle = document.querySelector('.nav-toggle');
            const navLinks = document.querySelector('.nav-links');
            const dropdowns = document.querySelectorAll('.nav-dropdown');
            
            if (toggle && navLinks) {
                toggle.addEventListener('click', () => {
                    navLinks.classList.toggle('nav-active');
                    toggle.classList.toggle('nav-toggle-active');
                });
            }

            // Mobile dropdown toggles
            if (window.innerWidth <= 768) {
                dropdowns.forEach(dropdown => {
                    const trigger = dropdown.querySelector('.dropdown-trigger');
                    if (trigger) {
                        trigger.addEventListener('click', (e) => {
                            e.preventDefault();
                            dropdown.classList.toggle('active');
                        });
                    }
                });
            }
        }

        // Run on initial page load
        document.addEventListener('DOMContentLoaded', initBurgerMenu);
    </script>

    <!-- CookieConsent JS -->
    <script type="module">
        import 'https://cdn.jsdelivr.net/gh/orestbida/cookieconsent@3.1.0/dist/cookieconsent.umd.js';
        
        window.addEventListener('load', function(){
            // Check and log initial consent status
            const checkInitialConsent = () => {
                const cookieValue = document.cookie.split('; ').find(row => row.startsWith('cc_cookie='));
                if (cookieValue) {
                    try {
                        const ccData = JSON.parse(decodeURIComponent(cookieValue.split('=')[1]));
                        console.log('Initial consent status:', {
                            analytics: ccData.categories?.includes('analytics') || false,
                            advertising: ccData.categories?.includes('advertising') || false,
                            consentGiven: true
                        });
                    } catch (e) {
                        console.log('Initial consent status: No valid consent cookie found');
                    }
                } else {
                    console.log('Initial consent status: No consent given yet');
                }
            };
            
            checkInitialConsent();
            
            // Initialize the cookie consent
            window.CookieConsent.run({
                guiOptions: {
                    consentModal: {
                        layout: "box",
                        position: "bottom right",
                        equalWeightButtons: true,
                        flipButtons: false
                    },
                    preferencesModal: {
                        layout: "box",
                        position: "right",
                        equalWeightButtons: true,
                        flipButtons: false
                    }
                },
                categories: {
                    necessary: {
                        readOnly: true
                    },
                    analytics: {
                        autoClear: {
                            cookies: [
                                {
                                    name: /^_ga/,  // Google Analytics cookies
                                },
                                {
                                    name: '_gid',  // Google Analytics cookie
                                }
                            ]
                        }
                    },
                    advertising: {
                        autoClear: {
                            cookies: [
                                {
                                    name: /^_gcl_/,  // Google Ads conversion tracking
                                },
                                {
                                    name: 'IDE',  // DoubleClick cookie
                                }
                            ]
                        }
                    }
                },
                language: {
                    default: "en",
                    autoDetect: "browser",
                    translations: {
                        en: {
                            consentModal: {
                                title: "We use cookies!",
                                description: "This website uses cookies to ensure you get the best experience on our website.",
                                acceptAllBtn: "Accept all",
                                acceptNecessaryBtn: "Reject all",
                                showPreferencesBtn: "Manage preferences"
                            },
                            preferencesModal: {
                                title: "Consent Preferences Center",
                                acceptAllBtn: "Accept all",
                                acceptNecessaryBtn: "Reject all",
                                savePreferencesBtn: "Save preferences",
                                closeIconLabel: "Close modal",
                                serviceCounterLabel: "Service|Services",
                                sections: [
                                    {
                                        title: "Cookie Usage",
                                        description: "We use cookies to ensure basic functionality and enhance your experience."
                                    },
                                    {
                                        title: "Strictly Necessary cookies",
                                        description: "Essential for the website to function properly.",
                                        linkedCategory: "necessary"
                                    },
                                    {
                                        title: "Analytics cookies",
                                        description: "Help us measure traffic and improve our service.",
                                        linkedCategory: "analytics"
                                    },
                                    {
                                        title: "Advertising cookies",
                                        description: "Make ads more relevant and prevent repetitive displays.",
                                        linkedCategory: "advertising"
                                    },
                                    {
                                        title: "Reset consent",
                                        description: "<button type='button' onclick='window.CookieConsent.hidePreferences(); window.CookieConsent.reset(true); window.location.reload();' style='background: #000000; border: 2px solid #f0e674; color: #f0e674; padding: 10px 20px; font-size: 10px; cursor: pointer; text-transform: uppercase; font-family: \"Press Start 2P\", monospace;'>Reset all</button>"
                                    }
                                ],
                                acceptAllBtn: "Accept all",
                                acceptNecessaryBtn: "Reject all", 
                                savePreferencesBtn: "Save preferences"
                            }
                        }
                    }
                },
                
                onFirstConsent: function(){
                    console.log('First consent given');
                    // Update all consent states based on what was accepted
                    const consentUpdate = {};
                    
                    // Check analytics consent
                    if(window.CookieConsent.acceptedCategory('analytics')){
                        consentUpdate['analytics_storage'] = 'granted';
                    } else {
                        consentUpdate['analytics_storage'] = 'denied';
                    }
                    
                    // Check advertising consent
                    if(window.CookieConsent.acceptedCategory('advertising')){
                        consentUpdate['ad_storage'] = 'granted';
                        consentUpdate['ad_user_data'] = 'granted';
                        consentUpdate['ad_personalization'] = 'granted';
                    } else {
                        consentUpdate['ad_storage'] = 'denied';
                        consentUpdate['ad_user_data'] = 'denied';
                        consentUpdate['ad_personalization'] = 'denied';
                    }
                    
                    console.log('Sending consent update:', consentUpdate);
                    window.gtag('consent', 'update', consentUpdate);
                },
                
                onConsent: function(){
                    console.log('Consent given (including accept all)');
                    // This fires on any consent action including "Accept All"
                    const consentUpdate = {};
                    
                    // Always check current state for all categories
                    if(window.CookieConsent.acceptedCategory('analytics')){
                        consentUpdate['analytics_storage'] = 'granted';
                    } else {
                        consentUpdate['analytics_storage'] = 'denied';
                    }
                    
                    if(window.CookieConsent.acceptedCategory('advertising')){
                        consentUpdate['ad_storage'] = 'granted';
                        consentUpdate['ad_user_data'] = 'granted';
                        consentUpdate['ad_personalization'] = 'granted';
                    } else {
                        consentUpdate['ad_storage'] = 'denied';
                        consentUpdate['ad_user_data'] = 'denied';
                        consentUpdate['ad_personalization'] = 'denied';
                    }
                    
                    console.log('Sending consent update on consent:', consentUpdate);
                    window.gtag('consent', 'update', consentUpdate);
                },
                
                onChange: function({changedCategories, changedServices}){
                    console.log('Consent changed:', changedCategories);
                    // Update Google consent based on user choices
                    const consentUpdate = {};
                    
                    // Handle analytics consent
                    if(changedCategories.includes('analytics')){
                        if(window.CookieConsent.acceptedCategory('analytics')){
                            consentUpdate['analytics_storage'] = 'granted';
                        } else {
                            consentUpdate['analytics_storage'] = 'denied';
                        }
                    }
                    
                    // Handle advertising consent
                    if(changedCategories.includes('advertising')){
                        if(window.CookieConsent.acceptedCategory('advertising')){
                            consentUpdate['ad_storage'] = 'granted';
                            consentUpdate['ad_user_data'] = 'granted';
                            consentUpdate['ad_personalization'] = 'granted';
                        } else {
                            consentUpdate['ad_storage'] = 'denied';
                            consentUpdate['ad_user_data'] = 'denied';
                            consentUpdate['ad_personalization'] = 'denied';
                        }
                    }
                    
                    // Update consent if any changes were made
                    if(Object.keys(consentUpdate).length > 0){
                        console.log('Sending consent update:', consentUpdate);
                        window.gtag('consent', 'update', consentUpdate);
                    }
                }
            });
        });
        
        // Add click handler for cookie settings link
        document.getElementById('cookie-settings').addEventListener('click', function(e) {
            e.preventDefault();
            window.CookieConsent.showPreferences();
        });
    </script>
</body>
</html>
