@media (min-width: 768px) and (max-width: 1024px) {
    /* ROOT FIX: Prevent the entire header from exceeding the viewport width */
    html body .elementor-10 {
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    /* ROOT CONTAINER: Force it to fit the viewport, reset the problematic 5% padding */
    html body .elementor-10 .elementor-element-26414a9e {
        width: 100% !important;
        max-width: 100vw !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        overflow: visible !important; /* DO NOT USE overflow: hidden */
    }

    /* LEFT COLUMN (Logo): Prevent it from taking too much space */
    html body .elementor-10 .elementor-element-69535710 {
        width: 160px !important; /* Strict width to leave room for the right side */
        min-width: 120px !important;
        flex: 0 0 auto !important; /* Don't grow, don't shrink past min-width */
        padding: 0 !important;
        margin: 0 !important;
    }
    
    html body .elementor-10 .elementor-element-ce7cb62 {
        width: 100% !important;
    }

    /* RIGHT COLUMN (Contact, Hamburger, Lang): Must shrink to fit remaining space */
    html body .elementor-10 .elementor-element-21d4308c {
        width: auto !important;
        flex: 1 1 0% !important; /* Allow growing and shrinking heavily */
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 10px !important; /* Tighter gap to save space */
        padding: 0 !important;
        margin: 0 !important;
        min-width: 0 !important; /* Critical: allows flex items to shrink below their content size if needed */
    }

    /* CONTACT BUTTON: Allow shrinking if absolutely necessary, but prefer to keep size */
    html body .elementor-10 .elementor-element-107cc81 {
        flex: 0 1 auto !important;
        min-width: 0 !important;
    }
    
    /* Optimize button padding and text size for tablet to save space */
    html body .elementor-10 .elementor-element-107cc81 .elementor-button {
        padding: 8px 12px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }

    /* HAMBURGER MENU: Keep it intact */
    html body .elementor-10 .elementor-element-1edaed93 {
        flex: 0 0 auto !important;
    }
    
    /* HAMBURGER DROPDOWN: Ensure it doesn't overflow the screen horizontally */
    html body .elementor-10 .elementor-element-1edaed93 .elementor-nav-menu--dropdown {
        width: 90vw !important;
        max-width: 350px !important;
        right: 0 !important;
        left: auto !important;
        transform: none !important;
        margin-top: 15px !important;
    }

    /* LANGUAGE SWITCHER: Force visibility and inline display */
    html body .elementor-10 .elementor-element-6fd942a {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex: 0 0 auto !important; /* Don't shrink the language switcher */
        position: static !important;
        z-index: 99 !important;
        pointer-events: auto !important;
        clip: auto !important;
        height: auto !important;
        width: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    html body .elementor-10 .elementor-element-6fd942a .elementor-widget-container {
        display: flex !important;
        visibility: visible !important;
    }

    html body .elementor-10 .elementor-element-6fd942a .elementor-nav-menu {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 6px !important; /* Tight gap */
        visibility: visible !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    html body .elementor-10 .elementor-element-6fd942a .elementor-nav-menu a {
        padding: 0 !important;
        font-size: 13px !important; /* Slightly smaller text */
    }
    
    /* Hide the mobile dropdown toggle for the language switcher on tablet if it exists */
    html body .elementor-10 .elementor-element-6fd942a .elementor-menu-toggle {
        display: none !important;
    }
}
