/* Browser Compatibility Fixes */

/* Prevent text rendering issues */
* {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Fix for Safari and older browsers */
@supports (-webkit-appearance: none) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Prevent text duplication/ghost text */
.nav-links,
.nav-links li,
.nav-links a {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fix for Firefox */
@-moz-document url-prefix() {
    .nav-links {
        display: -moz-box;
        display: -moz-flex;
        display: flex;
    }
}

/* Fix for IE11 and older */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .nav-links {
        display: -ms-flexbox;
        display: flex;
    }
    
    .container {
        display: block;
    }
}

/* Prevent horizontal scroll on all browsers */
html {
    overflow-x: hidden;
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

body {
    overflow-x: hidden;
    position: relative;
}

/* Fix for mobile browsers */
@media (max-width: 768px) {
    /* Prevent text selection issues */
    .nav-links a {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }
    
    /* Ensure proper touch scrolling */
    .nav-links {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
    }
}

/* Fix for Chrome text rendering */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .nav-links a {
        -webkit-font-feature-settings: "liga" off;
    }
}

/* Prevent double borders/outlines */
*:focus {
    outline: none;
}

a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Fix for Safari flexbox issues */
@supports (-webkit-appearance: none) and (not (display: -webkit-box)) {
    .nav-links {
        display: -webkit-flex;
        display: flex;
    }
}





