
@media (max-width: 768px) {
    .category-scroll {
        overflow-x: auto;
        white-space: nowrap;
        display: flex;
        gap: 10px;
        padding-bottom: 5px;
    }
}
@media (max-width: 600px) {
    .mud-typography-h4 {
        font-size: 18px;
    }

    .mud-typography-h6 {
        font-size: 14px;
    }

    .mud-chip {
        font-size: 12px;
    }
}

@media (max-width: 600px) {
    .freelancer-card {
        flex-direction: column;
        width: 100%;
    }
}

.logo-responsive {
    width: 180px;
    /* Desktop default */
    max-width: 100%;
    height: auto;
}
.app-footer {
    background: var(--mud-palette-background-gray);
    padding: 32px 0;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.footer-link {
    color: #666;
    font-size: 14px;
    padding: 6px 0;
}

    .footer-link:hover {
        color: var(--mud-palette-primary);
    }

/* Mobile fix */
@media (max-width: 600px) {
    .footer-title {
        font-size: 15px;
        text-align: center;
    }

    .footer-link {
        text-align: center;
        font-size: 13px;
    }
}

/* LOGO RESPONSIVE */
.logo-responsive {
    width: 180px;
    max-width: 100%;
    height: auto;
    transition: width 0.3s ease;
}

@media (max-width: 768px) {
    .logo-responsive {
        width: 140px;
    }
}

@media (max-width: 600px) {
    .logo-responsive {
        width: 120px;
    }
}

@media (max-width: 480px) {
    .logo-responsive {
        width: 100px;
    }
}

/* NAV BUTTON TEXT */
.mud-button-text {
    font-size: 14px;
}
@media (max-width: 600px) {
    footer {
        font-size: 12px;
    }
}

@media (max-width: 600px) {
    .mud-button-text {
        font-size: 12px;
    }
}
@media (max-width: 600px) {
    .mud-paper {
        padding: 12px !important;
    }

    .mud-typography {
        font-size: 13px;
    }
}

/* ================= MOBILE CATEGORIES RESPONSIVENESS ================= */

@media (max-width: 768px) {

    /* Categories next line mein aayen */
    .categories-wrapper {
        flex-wrap: wrap !important;
        gap: 6px;
    }

    /* Category button font small */
    .category-menu .mud-button-label {
        font-size: 12px !important;
    }

    /* Subcategory checkbox font small */
    .subcategory-checkbox .mud-typography {
        font-size: 11px !important;
    }

    /* Menu width thora compact */
    .category-menu {
        min-width: auto !important;
    }
}
/* Mobile layout protection */
@media (max-width: 960px) {
    :global(.mud-drawer) {
        width: min(280px, calc(100vw - 40px)) !important;
    }
}
html,
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

a,
.btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e52950;
}

.validation-message {
    color: #e52950;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1I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121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
    text-align: start;
}

/* yAccessibility Font Size Fix - Comprehensive fix for font size changes */
/* Apply font size to html element first */
html[data-font-size="1"],
html.font-size-1 {
    font-size: 110% !important;
}

html[data-font-size="2"],
html.font-size-2 {
    font-size: 120% !important;
}

html[data-font-size="3"],
html.font-size-3 {
    font-size: 130% !important;
}

html[data-font-size="4"],
html.font-size-4 {
    font-size: 140% !important;
}

html[data-font-size="5"],
html.font-size-5 {
    font-size: 150% !important;
}

html[data-font-size="-1"],
html.font-size-minus-1 {
    font-size: 90% !important;
}

html[data-font-size="-2"],
html.font-size-minus-2 {
    font-size: 80% !important;
}

/* Force font size inheritance to all elements */
html[data-font-size] body,
html[data-font-size] *,
html.font-size-1 *,
html.font-size-2 *,
html.font-size-3 *,
html.font-size-4 *,
html.font-size-5 *,
html.font-size-minus-1 *,
html.font-size-minus-2 * {
    font-size: inherit !important;
}

/* Specific elements that need explicit font size */
html[data-font-size] p,
html[data-font-size] span,
html[data-font-size] div,
html[data-font-size] a,
html[data-font-size] button,
html[data-font-size] input,
html[data-font-size] textarea,
html[data-font-size] select,
html[data-font-size] label,
html[data-font-size] h1,
html[data-font-size] h2,
html[data-font-size] h3,
html[data-font-size] h4,
html[data-font-size] h5,
html[data-font-size] h6,
html[data-font-size] li,
html[data-font-size] td,
html[data-font-size] th,
html[data-font-size] .mud-typography,
html[data-font-size] .mud-text,
html[data-font-size] .mud-button {
    font-size: inherit !important;
    line-height: 1.5 !important;
}

/* Readable Font - Apply Hebrew-friendly readable font */
/* Multiple selectors to cover all possible yAccessibility implementations */
html[data-readable-font="true"],
html[data-readable-font],
html.readable-font,
body.readable-font {
    font-family: 'Segoe UI', 'Arial Hebrew', 'David', 'Gisha', 'Miriam', 'Tahoma', Arial, sans-serif !important;
}

html[data-readable-font="true"] *,
html[data-readable-font] *,
html.readable-font *,
body.readable-font * {
    font-family: 'Segoe UI', 'Arial Hebrew', 'David', 'Gisha', 'Miriam', 'Tahoma', Arial, sans-serif !important;
    font-feature-settings: normal !important;
    letter-spacing: normal !important;
}

/* Additional selectors for yAccessibility widget */
.simple-font,
html.simple-font,
html[data-simple-font="true"],
html[data-simple-font] {
    font-family: 'Segoe UI', 'Arial Hebrew', 'David', 'Gisha', 'Miriam', 'Tahoma', Arial, sans-serif !important;
}

.simple-font *,
html.simple-font *,
html[data-simple-font="true"] *,
html[data-simple-font] * {
    font-family: 'Segoe UI', 'Arial Hebrew', 'David', 'Gisha', 'Miriam', 'Tahoma', Arial, sans-serif !important;
}




/* ================= SIDEBAR & NAV POLISH ================= */

/* Better spacing for nav links in the drawer */
.mud-nav-link {
    padding: 12px 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
}

.mud-drawer-header {
    padding: 16px !important;
    border-bottom: 1px solid #eee;
}

/* Make sure the drawer itself feels premium and is VISIBLE on top */
.mud-drawer {
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1) !important;
    background-color: white !important;
    z-index: 1300 !important;
    /* Ensure it's above everything */
    max-width: 100%;
    /* Allow drawer to take up max space without overflow */
}

/* Ensure font is acceptable for English LTR */
body,
.mud-typography {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
}

/* Prevent horizontal scroll when drawer is open */
body.drawer-open {
    overflow-x: hidden;
}

.mud-drawer-content {
    overflow-x: hidden;
}

/* Mobile drawer should not exceed viewport width */
@media (max-width: 768px) {
    .mud-drawer {
        width: calc(100vw - 60px) !important;
        max-width: 280px !important;
    }
}

/* ================= MOBILE RESPONSIVENESS - FONT SIZES & SPACING ================= */
@media (max-width: 768px) {
    /* Reduce font sizes for mobile */
    .mud-typography-h4 {
        font-size: 1.25rem !important; /* ~20px */
    }

    .mud-typography-h5 {
        font-size: 1.1rem !important; /* ~17.6px */
    }

    .mud-typography-h6 {
        font-size: 1rem !important; /* ~16px */
    }

    .mud-typography-subtitle1 {
        font-size: 0.9rem !important; /* ~14.4px */
    }

    .mud-typography-subtitle2 {
        font-size: 0.85rem !important; /* ~13.6px */
    }

    .mud-typography-body1 {
        font-size: 0.875rem !important; /* ~14px */
    }

    .mud-typography-body2 {
        font-size: 0.8rem !important; /* ~12.8px */
    }

    .mud-typography-caption {
        font-size: 0.75rem !important; /* ~12px */
    }

    /* Reduce spacing in MudStack and MudGrid */
    .mud-stack {
        gap: 0.5rem !important;
    }

    /* Reduce padding in cards and papers */
    .mud-paper {
        padding: 12px !important;
    }

    .pa-3 {
        padding: 8px !important;
    }

    .pa-4 {
        padding: 12px !important;
    }

    .pa-5 {
        padding: 16px !important;
    }

    /* Reduce margins */
    .mt-4 {
        margin-top: 0.75rem !important;
    }

    .mb-4 {
        margin-bottom: 0.75rem !important;
    }

    .my-4 {
        margin-top: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
}

/* ================= MOBILE CARD OVERFLOW FIXES ================= */
@media (max-width: 768px) {
    /* Ensure cards don't overflow */
    .freelancer-card,
    .mud-paper {
        max-width: 100% !important;
        overflow-x: hidden !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
    }

    /* Fix grid items to prevent overflow */
    .mud-grid-item {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Ensure text doesn't overflow */
    .mud-typography {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }

    /* Fix chips to wrap properly */
    .mud-chip {
        max-width: 100% !important;
        word-wrap: break-word !important;
        white-space: normal !important;
    }

    /* Ensure buttons fit within cards */
    .mud-button {
        min-width: auto !important;
        white-space: normal !important;
    }

    /* Fix avatar sizes on mobile */
    .mud-avatar {
        flex-shrink: 0 !important;
    }
}

/* ================= MOBILE FILTERS RESPONSIVENESS ================= */
@media (max-width: 768px) {
    /* Make filter sections more compact */
    .section-container {
        height: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
        padding: 8px !important;
    }

    /* Filter papers should be more compact */
    .mud-paper .pa-5 {
        padding: 12px !important;
    }

    /* Filter stack spacing - reduce on mobile */
    .mud-stack[spacing="4"] {
        gap: 1rem !important;
    }

    /* Filter input fields should stack on mobile */
    .mud-stack[class*="Row"] {
        flex-direction: column !important;
    }

    /* Numeric fields in filters */
    .mud-numeric-field {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }

    /* Text fields in filters */
    .mud-text-field {
        width: 100% !important;
    }

    /* Filter button alignment */
    .mud-icon-button[class*="mb-6"] {
        margin-bottom: 0 !important;
        margin-top: 0.5rem !important;
        align-self: flex-start !important;
    }

    /* Filter collapse animation */
    .mud-collapse {
        transition: all 0.3s ease !important;
    }

    /* Filter titles should be smaller */
    .mud-text[typo="Typo.h5"] {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }
}

/* ================= MOBILE FOOTER RESPONSIVENESS ================= */
@media (max-width: 768px) {
    .app-footer {
        padding: 24px 16px !important;
    }

    .footer-title {
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        margin-bottom: 12px !important;
        text-align: center !important;
    }

    .footer-link {
        font-size: 0.8rem !important;
        padding: 4px 0 !important;
        text-align: center !important;
        display: block !important;
    }

    /* Footer grid items should stack */
    .app-footer .mud-grid-item {
        margin-bottom: 16px !important;
    }

    /* Footer bottom row */
    .footer-copyright {
        font-size: 0.75rem !important;
        text-align: center !important;
        margin-bottom: 16px !important;
        display: block !important;
    }

    /* Footer social icons */
    .footer-social {
        justify-content: center !important;
        margin-top: 8px !important;
    }

    .app-footer .mud-icon-button {
        padding: 8px !important;
        margin: 0 4px !important;
    }

    /* Footer divider */
    .app-footer .mud-divider {
        margin: 20px 0 !important;
    }
}

/* ================= CARD BUTTONS STYLING ================= */
.freelancer-card-buttons,
.job-card-buttons {
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

.card-action-button {
    min-width: auto !important;
    white-space: nowrap;
    padding: 8px 16px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Desktop font sizes for cards - Further increased for better readability */
@media (min-width: 960px) {
    .freelancer-card .mud-typography-h6,
    .job-card .mud-typography-h6 {
        font-size: 1.55rem !important; /* Increased from 1.35rem */
    }

    .freelancer-card .mud-typography-subtitle2,
    .job-card .mud-typography-subtitle2 {
        font-size: 1.15rem !important; /* Increased from 1.1rem */
    }

    .freelancer-card .mud-typography-body2,
    .job-card .mud-typography-body2 {
        font-size: 1.0rem !important; /* Increased from 0.95rem */
    }

    .freelancer-card .mud-typography-caption,
    .job-card .mud-typography-caption {
        font-size: 0.875rem !important; /* Increased from 0.8rem */
    }
}

/* ================= MOBILE JOB CARD & FREELANCER CARD FIXES ================= */
@media (max-width: 768px) {
    /* Job card specific fixes */
    .job-card .mud-grid {
        gap: 0.75rem !important;
    }

    /* Ensure job card content doesn't overflow */
    .job-card .mud-grid-item {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Job card text should wrap properly */
    .job-card .mud-text,
    .job-card .mud-chip {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }

    /* Job details should stack on mobile */
    .job-details .mud-stack[class*="Row"] {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    /* Card buttons on mobile */
    .freelancer-card-buttons,
    .job-card-buttons {
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        gap: 0.25rem !important;
        overflow-x: auto;
    }

    .card-action-button {
        flex: 0 0 auto;
        min-width: auto !important;
        font-size: 0.65rem !important;
        padding: 4px 8px !important;
        white-space: nowrap;
    }
}

/* ================= MOBILE SEARCH BAR FIXES ================= */
/* Mobile buttons gap kam karna */
/*@media (max-width: 768px) {
    .navbar-left-section-mobile .mud-stack {
        gap: 0.25rem !important;*/ /* ya 0.125rem for very small gap */
    /*}
}*/

@media (max-width: 768px) {
    .mud-text-field {
        font-size: 0.875rem !important;
    }

    .mud-input-label {
        font-size: 0.8rem !important;
    }
}
@media (max-width: 768px) {
    /* Remove only inner border (freelancer-card), keep outer MudPaper border */
    .freelancer-card {
        box-shadow: none !important;
    }
}
/* ================= NAVBAR WHITE BACKGROUND ================= */
.white-navbar {
    background-color: white !important;
    color: #333 !important;
}

.white-navbar .mud-button-text {
    color: #333 !important;
}

.white-navbar .mud-button-text:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

/* ================= NAVBAR STYLING ================= */

/* User menu styling */
.mud-menu .mud-menu-item {
    padding: 10px 16px !important;
    min-height: 40px !important;
}

.mud-menu .mud-menu-item .mud-icon {
    margin-right: 12px !important;
}

/* Mobile button styling */
@media (max-width: 768px) {
    .navbar-btn {
        font-size: 10px !important;
        padding: 4px 6px !important;
        min-width: auto !important;
        white-space: nowrap;
        line-height: 1.2 !important;
    }

    .mobile-profile-btn {
        font-size: 10px !important;
        padding: 4px 6px !important;
        min-width: auto !important;
        white-space: nowrap;
    }
}

/* ================= MOBILE CONTAINER & SPACING ================= */
@media (max-width: 768px) {
    /* Reduce container padding */
    .mud-container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* Reduce main content top margin - navbar is now horizontal */
    .mud-main-content {
        padding-top: 70px !important; /* Account for horizontal navbar */
    }

    /* Reduce grid spacing */
    .mud-grid[spacing="1"] {
        gap: 0.5rem !important;
    }

    .mud-grid[spacing="2"] {
        gap: 0.75rem !important;
    }

    .mud-grid[spacing="3"] {
        gap: 1rem !important;
    }

    .mud-grid[spacing="4"] {
        gap: 1.25rem !important;
    }

    /* App bar improvements */
    .mud-app-bar {
        padding: 0 8px !important;
        min-height: auto !important;
    }

    /* Ensure app bar buttons are properly sized */
    .mud-app-bar .mud-button {
        padding: 6px 12px !important;
        font-size: 0.875rem !important;
    }
}