<!Doctype html>
<html <?php language_attributes(); ?> class="no-js">
	<head>
		<meta charset="<?php bloginfo('charset'); ?>">
		<title>
			<?php
			$seo_title = get_post_meta(get_the_ID(), '_seo_title', true);
			if (!empty($seo_title)) {echo esc_html($seo_title);} else {wp_title('');}
			?>
		</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="description" content="<?php echo esc_html(get_post_meta(get_the_ID(), '_seo_description', true)); ?>">
		<meta name="keywords" content="<?php echo esc_html(get_post_meta(get_the_ID(), '_seo_keywords', true)); ?>">
		<!-- Open Graph and Twitter Card Meta Tags -->
        <meta property="og:title" content="<?php wp_title(''); ?>" />
        <meta property="og:description" content="<?php echo get_the_excerpt(); ?>" />
        <meta property="og:image" content="<?php echo get_the_post_thumbnail_url(); ?>" />
        <meta property="og:url" content="<?php the_permalink(); ?>" />
        <meta name="twitter:title" content="<?php wp_title(''); ?>" />
        <meta name="twitter:description" content="<?php echo get_the_excerpt(); ?>" />
        <meta name="twitter:image" content="<?php echo get_the_post_thumbnail_url(); ?>" />
        <meta name="twitter:url" content="<?php the_permalink(); ?>" />
		<link href="//www.google-analytics.com" rel="dns-prefetch">
        <link href="<?php echo get_template_directory_uri(); ?>/favicon.png" rel="shortcut icon">
        <link rel="preconnect" href="https://fonts.googleapis.com">
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Radio+Canada+Big:ital,wght@0,400..700;1,400..700&display=swap" rel="stylesheet">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.10.3/font/bootstrap-icons.min.css">
        
        <script>
  document.addEventListener('DOMContentLoaded', function() {
    // Define the breakpoint where "mobile" behavior starts
    const mobileBreakpoint = 992; // Example for Bootstrap's mobile breakpoint (depends on your design)

    // Select all dropdown elements
    var dropdowns = document.querySelectorAll('.dropdown');

    function handleDropdownHover() {
      dropdowns.forEach(function(dropdown) {
        dropdown.addEventListener('mouseenter', function() {
          var dropdownMenu = this.querySelector('.dropdown-menu');
          if (dropdownMenu) {
            dropdownMenu.classList.add('show');
          }
        });

        dropdown.addEventListener('mouseleave', function() {
          var dropdownMenu = this.querySelector('.dropdown-menu');
          if (dropdownMenu) {
            dropdownMenu.classList.remove('show');
          }
        });
      });
    }

    function handleDropdownClick() {
      dropdowns.forEach(function(dropdown) {
        dropdown.addEventListener('click', function(e) {
          e.stopPropagation(); // Stop the click event from bubbling up
          var dropdownMenu = this.querySelector('.dropdown-menu');
          if (dropdownMenu) {
            dropdownMenu.classList.toggle('show');
          }
        });
      });

      // Close the dropdown menu if clicked outside of it
      document.addEventListener('click', function(e) {
        dropdowns.forEach(function(dropdown) {
          var dropdownMenu = dropdown.querySelector('.dropdown-menu');
          if (dropdownMenu && !dropdown.contains(e.target)) {
            dropdownMenu.classList.remove('show');
          }
        });
      });
    }

    function handleResponsiveDropdowns() {
      if (window.innerWidth >= mobileBreakpoint) {
        // Desktop - hover behavior
        handleDropdownHover();
      } else {
        // Mobile - click behavior
        handleDropdownClick();
      }
    }

    // Initialize the correct behavior based on the screen size
    handleResponsiveDropdowns();

    // Add resize event listener to re-check screen size
    window.addEventListener('resize', function() {
      // Clear any active event listeners to avoid duplicates
      dropdowns.forEach(function(dropdown) {
        dropdown.replaceWith(dropdown.cloneNode(true)); // Removes all attached event listeners
      });

      // Reinitialize the behavior based on new screen size
      handleResponsiveDropdowns();
    });
  });
</script>
        <!-- Light Box -->
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/glightbox/dist/css/glightbox.min.css" />
        <script src="https://cdn.jsdelivr.net/gh/mcstudios/glightbox/dist/js/glightbox.min.js">
        </script>
		<?php wp_head(); ?>
	</head>
	<body <?php body_class(); ?>>
	