.elementor-kit-8{--e-global-color-primary:#4CAF50;--e-global-color-primary_hover:#00DDA6A1;--e-global-color-text:#464646;--e-global-color-text_light:#888888;--e-global-color-accent:#141414;--e-global-color-light:#F4F4F4;--e-global-color-border:#E8E8E8;--e-global-typography-heading_title-font-family:"Nutritix Heading";--e-global-typography-heading_title-font-size:36px;--e-global-typography-heading_title-font-weight:700;--e-global-typography-heading_title-text-transform:uppercase;--e-global-typography-heading_title-line-height:36px;--e-global-typography-heading_footer-font-family:"Plus Jakarta Sans";--e-global-typography-heading_footer-font-size:14px;--e-global-typography-heading_footer-font-weight:700;--e-global-typography-heading_footer-text-transform:none;--e-global-typography-heading_footer-line-height:22px;}.elementor-section.elementor-section-boxed > .elementor-container{max-width:1290px;}.e-con{--container-max-width:1290px;}.elementor-widget:not(:last-child){margin-block-end:20px;}.elementor-element{--widgets-spacing:20px 20px;--widgets-spacing-row:20px;--widgets-spacing-column:20px;}{}h1.entry-title{display:var(--page-title-display);}@media(max-width:1024px){.elementor-section.elementor-section-boxed > .elementor-container{max-width:1024px;}.e-con{--container-max-width:1024px;}}@media(max-width:767px){.elementor-kit-8{--e-global-typography-heading_title-font-size:30px;--e-global-typography-heading_title-line-height:30px;}.elementor-section.elementor-section-boxed > .elementor-container{max-width:767px;}.e-con{--container-max-width:767px;}}/* Start custom CSS for page-settings */document.addEventListener("DOMContentLoaded", function() {
  // Check browser's preferred language (get the first two characters to ignore region)
  const language = navigator.language.substring(0,2);

  // Your mapping of languages to quiz IDs
  const quizMapping = {
    'en': 'PMHJBJA',
    'fr': 'dfg456',
    'es': '6OH3gxG'
  };

  // Default language (fallback to English if not found)
  const defaultQuizId = quizMapping[language] || quizMapping['en'];

  // Find all quiz links and update the href
  const quizLinks = document.querySelectorAll('a[href^="#quiz-"]');
  quizLinks.forEach(link => {
    link.setAttribute('href', '#quiz-' + defaultQuizId);
  });

  // Find all iframes with quiz URLs and update the src attribute and the data-url attribute of the parent div
  const quizIframes = document.querySelectorAll('iframe[src^="https://admin.revenuehunt.com/public/quiz/"]');
  quizIframes.forEach(iframe => {
    const newSrc = iframe.src.replace(/quiz\/\w+/, 'quiz/' + defaultQuizId);
    iframe.src = newSrc;

    // If the parent div has the data-url attribute, update it as well
    const parentDiv = iframe.parentElement;
    if (parentDiv && parentDiv.hasAttribute('data-url')) {
      const newDataUrl = parentDiv.getAttribute('data-url').replace(/quiz\/\w+/, 'quiz/' + defaultQuizId);
      parentDiv.setAttribute('data-url', newDataUrl);
    }
  });
});/* End custom CSS */