.elementor-4055 .elementor-element.elementor-element-ef8e9c3{--display:flex;--min-height:1440px;}.elementor-4055 .elementor-element.elementor-element-0ff564a{--spacer-size:50px;}/* Start custom CSS for html, class: .elementor-element-3f9a75a */<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Font Override for Elementor</title>
    <link href="https://fonts.googleapis.com/css2?family=Anaheim:wght@400;700&family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
    <style>
        /* Base font styles */
        body {
            font-family: 'Roboto', sans-serif !important;
        }
        
        /* Header styles */
        h1, h2, h3, h4, h5, h6, 
        .elementor-heading-title,
        .elementor-widget-heading .elementor-heading-title,
        [class*="elementor-size-"] {
            font-family: 'Anaheim', sans-serif !important;
        }
        
        /* Additional Elementor-specific .elementor-4055 .elementor-element.elementor-element-3f9a75as for maximum coverage */
        .elementor-widget-container, 
        .elementor-text-editor, 
        .elementor-button, 
        .elementor-tab-title,
        .elementor-accordion-title,
        .elementor-icon-box-description,
        .elementor-testimonial-content,
        .elementor-post-excerpt {
            font-family: 'Roboto', sans-serif !important;
        }
        
        /* Demo styles */
        .demo-container {
            max-width: 1000px;
            margin: 0 auto;
            padding: 20px;
        }
        
        .font-demo {
            background: white;
            border-radius: 10px;
            padding: 30px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            margin-bottom: 30px;
        }
        
        .font-sample {
            margin: 15px 0;
            padding: 15px;
            border-left: 4px solid #4a90e2;
            background: #f9f9f9;
        }
        
        .code-block {
            background: #2d3748;
            color: #e2e8f0;
            padding: 20px;
            border-radius: 5px;
            overflow-x: auto;
            margin: 20px 0;
            font-family: 'Courier New', monospace !important;
        }
        
        .instructions {
            background: #f0f7ff;
            padding: 20px;
            border-radius: 10px;
            margin: 20px 0;
        }
        
        .note {
            background: #fff8f0;
            padding: 15px;
            border-left: 4px solid #ed8936;
            margin: 15px 0;
        }
    </style>
</head>
<body>
    <div class="demo-container">
        <h1>Font Override for Elementor</h1>
        <p>This code will help you override Elementor's font settings to use Roboto for all text and Anaheim for headers.</p>
        
        <div class="instructions">
            <h2>Implementation Instructions</h2>
            <p>To use this font override on your Elementor-based website:</p>
            <ol>
                <li>Add the Google Fonts link in your HTML head section</li>
                <li>Add the CSS rules to your theme's Custom CSS area or in a custom CSS plugin</li>
                <li>For maximum effectiveness, also add the JavaScript code to your site</li>
            </ol>
        </div>
        
        <div class="font-demo">
            <h2>Font Demonstration</h2>
            
            <div class="font-sample" style="font-family: 'Anaheim', sans-serif">
                <h1>Anaheim Header Font (H1)</h1>
                <h2>Anaheim Header Font (H2)</h2>
                <h3>Anaheim Header Font (H3)</h3>
            </div>
            
            <div class="font-sample" style="font-family: 'Roboto', sans-serif">
                <p>Roboto Body Font - Regular</p>
                <p><strong>Roboto Body Font - Bold</strong></p>
                <p><em>Roboto Body Font - Italic</em></p>
            </div>
        </div>
        
        <div class="code-block">
            <h3>CSS Code for Font Override</h3>
            <pre><code>
/* Add Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Anaheim:wght@400;700&family=Roboto:wght@300;400;500;700&display=swap');

/* Base font styles */
body {
    font-family: 'Roboto', sans-serif !important;
}

/* Header styles */
h1, h2, h3, h4, h5, h6, 
.elementor-heading-title,
.elementor-widget-heading .elementor-heading-title,
[class*="elementor-size-"] {
    font-family: 'Anaheim', sans-serif !important;
}

/* Additional Elementor-specific .elementor-4055 .elementor-element.elementor-element-3f9a75as */
.elementor-widget-container, 
.elementor-text-editor, 
.elementor-button, 
.elementor-tab-title,
.elementor-accordion-title,
.elementor-icon-box-description,
.elementor-testimonial-content,
.elementor-post-excerpt {
    font-family: 'Roboto', sans-serif !important;
}
            </code></pre>
        </div>
        
        <div class="code-block">
            <h3>JavaScript for Persistent Override</h3>
            <pre><code>
// Function to apply font overrides
function applyFontOverrides() {
    // Apply to body
    document.body.style.fontFamily = "'Roboto', sans-serif";
    
    // Apply to all headings
    const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
    headings.forEach(heading => {
        heading.style.fontFamily = "'Anaheim', sans-serif";
    });
    
    // Apply to Elementor-specific elements
    const elementorElements = document.querySelectorAll(`
        .elementor-heading-title,
        .elementor-widget-heading .elementor-heading-title,
        [class*="elementor-size-"],
        .elementor-widget-container, 
        .elementor-text-editor, 
        .elementor-button, 
        .elementor-tab-title,
        .elementor-accordion-title,
        .elementor-icon-box-description,
        .elementor-testimonial-content,
        .elementor-post-excerpt
    `);
    
    elementorElements.forEach(el => {
        if (el.classList.contains('elementor-heading-title') || 
            el.classList.contains('elementor-widget-heading') ||
            el.matches('[class*="elementor-size-"]')) {
            el.style.fontFamily = "'Anaheim', sans-serif";
        } else {
            el.style.fontFamily = "'Roboto', sans-serif";
        }
    });
}

// Run on page load
document.addEventListener('DOMContentLoaded', applyFontOverrides);

// Run after Elementor actions (if Elementor is used)
if (typeof elementor !== 'undefined') {
    elementor.hooks.addAction('frontend/element_ready/widget', applyFontOverrides);
}

// Optional: Use MutationObserver to watch for dynamic changes
const observer = new MutationObserver(applyFontOverrides);
observer.observe(document.body, { 
    childList: true, 
    subtree: true 
});
            </code></pre>
        </div>
        
        <div class="note">
            <h3>Important Note</h3>
            <p>Using !important in CSS is necessary to override Elementor's styles, but it should be used judiciously. The JavaScript provides a more dynamic approach that will work even when Elementor modifies styles after page load.</p>
        </div>
    </div>

    <script>
        // Function to apply font overrides
        function applyFontOverrides() {
            // Apply to body
            document.body.style.fontFamily = "'Roboto', sans-serif";
            
            // Apply to all headings
            const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
            headings.forEach(heading => {
                heading.style.fontFamily = "'Anaheim', sans-serif";
            });
            
            // Apply to Elementor-specific elements
            const elementorElements = document.querySelectorAll(`
                .elementor-heading-title,
                .elementor-widget-heading .elementor-heading-title,
                [class*="elementor-size-"],
                .elementor-widget-container, 
                .elementor-text-editor, 
                .elementor-button, 
                .elementor-tab-title,
                .elementor-accordion-title,
                .elementor-icon-box-description,
                .elementor-testimonial-content,
                .elementor-post-excerpt
            `);
            
            elementorElements.forEach(el => {
                if (el.classList.contains('elementor-heading-title') || 
                    el.classList.contains('elementor-widget-heading') ||
                    el.matches('[class*="elementor-size-"]')) {
                    el.style.fontFamily = "'Anaheim', sans-serif";
                } else {
                    el.style.fontFamily = "'Roboto', sans-serif";
                }
            });
        }

        // Run on page load
        document.addEventListener('DOMContentLoaded', applyFontOverrides);

        // Run after Elementor actions (if Elementor is used)
        if (typeof elementor !== 'undefined') {
            elementor.hooks.addAction('frontend/element_ready/widget', applyFontOverrides);
        }

        // Optional: Use MutationObserver to watch for dynamic changes
        const observer = new MutationObserver(applyFontOverrides);
        observer.observe(document.body, { 
            childList: true, 
            subtree: true 
        });
    </script>
</body>
</html>/* End custom CSS */