/**
* FIREFOX CRITICAL CSS FIXES
* Ensures website works in Firefox
*/

/* ====== FIREFOX SPECIFIC FIXES ====== */
@-moz-document url-prefix() {
    /* Firefox-specific fixes */

    /* Force visibility */
    html, body {
        visibility: visible !important;
        opacity: 1 !important;
        display: block !important;
    }

    /* Fix flexbox */
    .nav-container,
    .nav-links,
    .hero-content,
    .about-container,
    .projects-container {
        display: -moz-box;
        display: -moz-flex;
        display: flex;
    }

    /* Fix pointer events */
    * {
        pointer-events: auto !important;
    }

    /* Fix cursor */
    a, button, [role="button"], [onclick], [href] {
        cursor: pointer !important;
    }

    /* Fix transforms */
    .sidebar {
        -moz-transform: translateX(-100%);
        transform: translateX(-100%);
    }

    .sidebar.active {
        -moz-transform: translateX(0);
        transform: translateX(0);
    }

    /* Fix font rendering */
    body {
        -moz-osx-font-smoothing: grayscale;
        font-smoothing: antialiased;
    }

    /* Fix z-index */
    .navbar, .sidebar, .hero, main, section {
        position: relative;
        z-index: 1;
    }

    .navbar {
        z-index: 1000;
    }

    .sidebar {
        z-index: 2000;
    }

    /* Fix project cards */
    .project-card-animated,
    .blog-card-animated {
        -moz-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* ====== COMMON FIXES FOR ALL BROWSERS ====== */
/* Remove any blocking elements */
.overlay.blocking,
.loading.blocking,
.spinner.blocking,
[class*="blocking"] {
    display: none !important;
    pointer-events: none !important;
}

/* Ensure main content is always visible */
html, body, main, .hero, .navbar, section {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix links */
a {
    pointer-events: auto !important;
    cursor: pointer !important;
    text-decoration: none;
}

a:hover {
    opacity: 0.8;
}

/* Fix buttons */
button, [role="button"], [onclick] {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Fix sidebar */
.sidebar {
    pointer-events: auto !important;
}

.sidebar.active {
    pointer-events: auto !important;
}

/* Fix navbar */
.navbar {
    pointer-events: auto !important;
}

.navbar a {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Fix project cards */
.project-card-animated,
.blog-card-animated {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Fix forms */
form, input, textarea, select, button {
    pointer-events: auto !important;
}


/* Focus styles for accessibility - Auto-added */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Link visibility fix - Auto-added */
a:not([style*="color"]) {
    color: #0066cc;
}
