/**
 * FMC dark mode — overrides theme colors via data-theme on <html>.
 * Keeps layout/structure; tune tokens as needed.
 */

/* Arabic typography */
[lang="ar"] body,
[lang="ar"] h1,
[lang="ar"] h2,
[lang="ar"] h3,
[lang="ar"] h4,
[lang="ar"] h5,
[lang="ar"] h6,
[lang="ar"] p,
[lang="ar"] span,
[lang="ar"] div,
[lang="ar"] a,
[lang="ar"] button,
[lang="ar"] input,
[lang="ar"] textarea {
    font-family: 'Cairo', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* International phone numbers: always LTR inside RTL (Arabic) — do not reorder digits */
.fmc-phone {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
    font-variant-numeric: lining-nums;
}

/* Home / Elementor icon-box contact: belt-and-suspenders for tel: (pairs with .fmc-phone in markup) */
.wdt-custom-icon-box-contact a[href^="tel:"] {
    direction: ltr;
    unicode-bidi: isolate;
}

:root[data-theme="light"],
html:not([data-theme]) {
    /* Explicit text/page bg so nested widgets don’t inherit wrong colors */
    --fmc-page-bg: #ffffff;
    --fmc-text: #1f2937;
    --fmc-surface: #ffffff;
    --fmc-border: rgba(2, 59, 74, 0.08);
    --fmc-card-bg: #ffffff;
    --fmc-card-border: rgba(2, 59, 74, 0.08);
    --fmc-input-bg: #ffffff;
    --fmc-input-border: #d1d5db;
    --fmc-input-text: #1f2937;
    --fmc-table-border: #e5e7eb;
    --fmc-table-stripe: #f9fafb;
    --fmc-heading: #023b4a;
    --fmc-muted: #6b7280;
    --fmc-link: #128AF0;
    --fmc-link-hover: #0d6ebf;
    --fmc-strip-bg: #f8f9fa;
    --fmc-callout-bg: #fff8f0;
    --fmc-callout-border: #fde8d0;
}

:root[data-theme="light"] body,
html:not([data-theme]) body {
    color: var(--fmc-text);
    background-color: var(--fmc-page-bg);
}

:root[data-theme="light"] #main,
html:not([data-theme]) #main {
    color: var(--fmc-text);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --fmc-page-bg: #0f172a;
    --fmc-text: #e2e8f0;
    --fmc-surface: #1e293b;
    --fmc-border: rgba(148, 163, 184, 0.2);
    --fmc-card-bg: #1e293b;
    --fmc-card-border: rgba(148, 163, 184, 0.2);
    --fmc-input-bg: #0f172a;
    --fmc-input-border: #475569;
    --fmc-input-text: #e2e8f0;
    --fmc-table-border: #334155;
    --fmc-table-stripe: #1e293b;
    --fmc-heading: #f1f5f9;
    --fmc-muted: #94a3b8;
    --fmc-link: #7dd3fc;
    --fmc-link-hover: #38bdf8;
    --fmc-strip-bg: #1e293b;
    /* Newsletter strip: slightly lighter blue-slate than footer (--fmc-surface) so the band reads clearly */
    --fmc-newsletter-bg: #243548;
    --fmc-callout-bg: rgba(251, 191, 36, 0.08);
    --fmc-callout-border: rgba(251, 191, 36, 0.28);
}

html[data-theme="dark"] body {
    background-color: var(--fmc-page-bg) !important;
    color: var(--fmc-text);
}

html[data-theme="dark"] body .wrapper,
html[data-theme="dark"] body .inner-wrapper {
    background-color: var(--fmc-page-bg);
}

/* Standard inner routes: unify strip behind hero + body (hero keeps inline background-image) */
html[data-theme="dark"] #main:has(> .page-hero-banner) {
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.96) 0%,
        rgba(15, 23, 42, 0.88) 42%,
        rgba(30, 41, 59, 0.92) 100%
    ) !important;
}

html[data-theme="dark"] .products-grid-section {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 45%, #0f172a 100%) !important;
}

html[data-theme="dark"] body.page-equipments .equipments-grid-photo {
    background: var(--fmc-page-bg) !important;
}

html[data-theme="dark"] body.page-equipments .equipment-photo-card {
    background: var(--fmc-card-bg) !important;
    border-color: var(--fmc-card-border) !important;
}

html[data-theme="dark"] #main,
html[data-theme="dark"] .page-hero-banner,
html[data-theme="dark"] .legal-section,
html[data-theme="dark"] .about-section,
html[data-theme="dark"] .blog-section,
html[data-theme="dark"] .blog-single-grid,
html[data-theme="dark"] .blog-archive-inner {
    background-color: var(--fmc-page-bg) !important;
    color: var(--fmc-text);
}

html[data-theme="dark"] .sidebar-widget:not(.sidebar-cta) {
    background: var(--fmc-surface) !important;
    border-color: var(--fmc-border) !important;
    color: var(--fmc-text);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] a:not(.sidebar-cta-btn):not(.wdt-button) {
    color: var(--fmc-link);
}

html[data-theme="dark"] #header-wrapper,
html[data-theme="dark"] #header {
    filter: brightness(0.92);
}

/* ---------- Nav-Integrated Toggles (Theme + Language) ---------- */

/* Widen nav column on desktop (Col 3 is hidden, so nav takes its space) */
@media (min-width: 1025px) {
    .elementor-element-5c5725a {
        width: 18% !important;
        flex: 0 0 18% !important;
        max-width: 18% !important;
    }
    .elementor-element-d95f6ac {
        width: 82% !important;
        flex: 0 0 82% !important;
        max-width: 82% !important;
    }
}

/* Force nav to stay on one line */
.wdt-primary-nav {
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    align-items: center !important;
}

/* Tighten nav item spacing slightly */
.wdt-header-menu .wdt-primary-nav > li > a {
    padding: 8px 12px !important;
}

/* Theme toggle – circle icon button in the nav bar */
.fmc-nav-theme-toggle {
    margin-left: 6px !important;
}

.fmc-nav-theme-toggle > a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    padding: 0 !important;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease !important;
}

.fmc-nav-theme-toggle > a:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.fmc-nav-theme-toggle > a i {
    font-size: 15px;
    line-height: 1;
}

/* Show/hide sun vs moon icons */
.fmc-theme-icon-light {
    display: none !important;
}

.fmc-theme-toggle-btn[aria-pressed="true"] .fmc-theme-icon-dark {
    display: none !important;
}

.fmc-theme-toggle-btn[aria-pressed="true"] .fmc-theme-icon-light {
    display: inline !important;
}

.fmc-theme-toggle-btn[aria-pressed="true"] {
    color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.15) !important;
    border-color: rgba(251, 191, 36, 0.3) !important;
}

/* Language switch – pill button in the nav bar */
.fmc-nav-lang-switch {
    margin-left: 4px !important;
}

.fmc-nav-lang-switch > a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 5px 12px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    transition: background 0.25s ease, border-color 0.25s ease !important;
    white-space: nowrap !important;
}

.fmc-nav-lang-switch > a:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.fmc-nav-lang-switch > a i {
    font-size: 14px;
    line-height: 1;
}

/* Override theme nav underline effects for toggles */
.fmc-nav-theme-toggle > a::before,
.fmc-nav-theme-toggle > a::after,
.fmc-nav-lang-switch > a::before,
.fmc-nav-lang-switch > a::after {
    display: none !important;
}

/* RTL adjustments */
[dir="rtl"] .fmc-nav-theme-toggle {
    margin-left: 0 !important;
    margin-right: 8px !important;
}

[dir="rtl"] .fmc-nav-lang-switch {
    margin-left: 0 !important;
    margin-right: 6px !important;
}

/* Dark mode overrides for nav toggles */
html[data-theme="dark"] .fmc-nav-theme-toggle > a {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

html[data-theme="dark"] .fmc-nav-theme-toggle > a:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

html[data-theme="dark"] .fmc-theme-toggle-btn[aria-pressed="true"] {
    color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.12) !important;
    border-color: rgba(251, 191, 36, 0.25) !important;
}

html[data-theme="dark"] .fmc-nav-lang-switch > a {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

html[data-theme="dark"] .fmc-nav-lang-switch > a:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

/* Mobile menu: style toggles in the offcanvas menu */
.mobile-menu .fmc-nav-theme-toggle,
.mobile-menu .fmc-nav-lang-switch {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Desktop nav keeps compact icon-only mode toggle */
.fmc-nav-theme-toggle .fmc-toggle-label,
.fmc-nav-theme-toggle .fmc-toggle-label-short {
    display: none !important;
}

/* Mobile sidebar — theme-aware (light surface + dark text vs dark drawer). */
@media (max-width: 1024px) {
    /*
     * Industy JS (custom4d80.js) creates .mobile-menu under <body>; header placeholders are unused.
     */
    .mobile-nav-container.mobile-nav-offcanvas-right {
        left: auto !important;
        right: 0 !important;
        overflow: hidden !important;
    }

    /* Panel shell (layout only; colors per theme below) */
    .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu,
    body > .mobile-menu {
        width: min(92vw, 380px) !important;
        max-width: min(92vw, 380px) !important;
        bottom: 0 !important;
        height: auto !important;
        max-height: none !important;
        box-sizing: border-box;
        padding: max(14px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
        z-index: 100100 !important;
        pointer-events: auto !important;
        left: auto !important;
        right: 0 !important;
        overflow-x: hidden !important;
        overflow-y: hidden !important;
    }

    /*
     * Inner <ul> must stay position:absolute inside the panel (theme uses fixed+100% width + light bg).
     */
    #header .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu > ul,
    #header .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu > ul:not(.menu-item-object-wdt_mega_menus ul),
    body > .mobile-menu > ul,
    body > .mobile-menu > ul:not(.menu-item-object-wdt_mega_menus ul) {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        min-height: 100% !important;
        margin: 0 !important;
        z-index: 1 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        transform: none !important;
        -webkit-transform: none !important;
    }

    .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu::before,
    .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu::after,
    body > .mobile-menu::before,
    body > .mobile-menu::after {
        content: none !important;
        display: none !important;
    }

    .mobile-nav-container.mobile-nav-offcanvas-right .overlay,
    body > .mobile-menu-overlay {
        backdrop-filter: blur(2px);
        z-index: 100090 !important;
        pointer-events: auto !important;
    }

    .mobile-nav-container .sub-menu-overlay {
        display: none !important;
        pointer-events: none !important;
    }

    .mobile-menu .wdt-primary-nav {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }

    /* Shared link chrome */
    .mobile-menu .wdt-primary-nav > li:not(.close-nav) > a {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 44px;
        padding: 11px 14px !important;
        border-radius: 12px !important;
        font-size: 0.98rem !important;
        line-height: 1.35 !important;
        transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
        text-decoration: none !important;
        position: relative;
        z-index: 1;
        pointer-events: auto !important;
    }

    .mobile-menu .fmc-nav-theme-toggle,
    .mobile-menu .fmc-nav-lang-switch {
        margin-top: 4px !important;
    }

    .mobile-menu .fmc-nav-theme-toggle > a,
    .mobile-menu .fmc-nav-lang-switch > a {
        border-radius: 12px !important;
        padding: 12px 14px !important;
        min-height: 46px;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        pointer-events: auto !important;
        transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

    .mobile-menu .fmc-nav-theme-toggle > a span,
    .mobile-menu .fmc-nav-lang-switch > a span {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .mobile-menu .fmc-nav-theme-toggle .fmc-toggle-label {
        display: inline !important;
        font-size: 0.94rem !important;
        font-weight: 600 !important;
    }

    .mobile-menu .fmc-nav-theme-toggle .fmc-toggle-label-short {
        display: none !important;
    }

    /* ---------- Light / default: light drawer, readable text (no dark-text-on-dark-panel) ---------- */
    html[data-theme="light"] .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu,
    html[data-theme="light"] body > .mobile-menu,
    html:not([data-theme]) .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu,
    html:not([data-theme]) body > .mobile-menu {
        background: var(--fmc-surface) !important;
        background-color: var(--fmc-surface) !important;
        color: var(--fmc-text) !important;
        box-shadow: -12px 0 40px rgba(2, 59, 74, 0.14);
    }

    html[data-theme="light"] #header .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu > ul,
    html[data-theme="light"] #header .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu > ul:not(.menu-item-object-wdt_mega_menus ul),
    html[data-theme="light"] body > .mobile-menu > ul,
    html[data-theme="light"] body > .mobile-menu > ul:not(.menu-item-object-wdt_mega_menus ul),
    html:not([data-theme]) #header .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu > ul,
    html:not([data-theme]) #header .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu > ul:not(.menu-item-object-wdt_mega_menus ul),
    html:not([data-theme]) body > .mobile-menu > ul,
    html:not([data-theme]) body > .mobile-menu > ul:not(.menu-item-object-wdt_mega_menus ul) {
        background: var(--fmc-surface) !important;
        background-color: var(--fmc-surface) !important;
    }

    html[data-theme="light"] .mobile-nav-container.mobile-nav-offcanvas-right .overlay,
    html[data-theme="light"] body > .mobile-menu-overlay,
    html:not([data-theme]) .mobile-nav-container.mobile-nav-offcanvas-right .overlay,
    html:not([data-theme]) body > .mobile-menu-overlay {
        background: rgba(15, 23, 42, 0.38) !important;
    }

    html[data-theme="light"] .mobile-menu .wdt-primary-nav > li:not(.close-nav) > a,
    html:not([data-theme]) .mobile-menu .wdt-primary-nav > li:not(.close-nav) > a {
        background: var(--fmc-strip-bg) !important;
        border: 1px solid var(--fmc-border) !important;
        color: var(--fmc-heading) !important;
    }

    html[data-theme="light"] .mobile-menu .wdt-primary-nav > li:not(.close-nav) > a span,
    html:not([data-theme]) .mobile-menu .wdt-primary-nav > li:not(.close-nav) > a span {
        color: var(--fmc-heading) !important;
        -webkit-text-fill-color: var(--fmc-heading) !important;
    }

    html[data-theme="light"] .mobile-menu .wdt-primary-nav > li.current-menu-item > a,
    html[data-theme="light"] .mobile-menu .wdt-primary-nav > li.current_page_item > a,
    html:not([data-theme]) .mobile-menu .wdt-primary-nav > li.current-menu-item > a,
    html:not([data-theme]) .mobile-menu .wdt-primary-nav > li.current_page_item > a {
        background: rgba(18, 138, 240, 0.12) !important;
        border-color: rgba(18, 138, 240, 0.45) !important;
        color: var(--fmc-link-hover) !important;
    }

    html[data-theme="light"] .mobile-menu .wdt-primary-nav > li.current-menu-item > a span,
    html[data-theme="light"] .mobile-menu .wdt-primary-nav > li.current_page_item > a span,
    html:not([data-theme]) .mobile-menu .wdt-primary-nav > li.current-menu-item > a span,
    html:not([data-theme]) .mobile-menu .wdt-primary-nav > li.current_page_item > a span {
        color: var(--fmc-link-hover) !important;
        -webkit-text-fill-color: var(--fmc-link-hover) !important;
    }

    html[data-theme="light"] .mobile-menu .wdt-primary-nav > li:not(.close-nav) > a:hover,
    html:not([data-theme]) .mobile-menu .wdt-primary-nav > li:not(.close-nav) > a:hover {
        background: #eef2f7 !important;
        border-color: rgba(18, 138, 240, 0.22) !important;
        transform: translateY(-1px);
    }

    html[data-theme="light"] .mobile-menu .fmc-nav-theme-toggle > a,
    html[data-theme="light"] .mobile-menu .fmc-nav-lang-switch > a,
    html:not([data-theme]) .mobile-menu .fmc-nav-theme-toggle > a,
    html:not([data-theme]) .mobile-menu .fmc-nav-lang-switch > a {
        background: rgba(18, 138, 240, 0.08) !important;
        border: 1px solid rgba(18, 138, 240, 0.35) !important;
        color: var(--fmc-heading) !important;
    }

    html[data-theme="light"] .mobile-menu .fmc-nav-theme-toggle > a span,
    html[data-theme="light"] .mobile-menu .fmc-nav-lang-switch > a span,
    html:not([data-theme]) .mobile-menu .fmc-nav-theme-toggle > a span,
    html:not([data-theme]) .mobile-menu .fmc-nav-lang-switch > a span {
        color: var(--fmc-heading) !important;
        -webkit-text-fill-color: var(--fmc-heading) !important;
    }

    html[data-theme="light"] .mobile-menu .fmc-nav-theme-toggle > a i,
    html[data-theme="light"] .mobile-menu .fmc-nav-lang-switch > a i,
    html:not([data-theme]) .mobile-menu .fmc-nav-theme-toggle > a i,
    html:not([data-theme]) .mobile-menu .fmc-nav-lang-switch > a i {
        color: var(--fmc-link) !important;
    }

    html[data-theme="light"] .mobile-menu ul li.close-nav a:before,
    html[data-theme="light"] .mobile-menu ul li.close-nav a:after,
    html:not([data-theme]) .mobile-menu ul li.close-nav a:before,
    html:not([data-theme]) .mobile-menu ul li.close-nav a:after {
        background-color: var(--fmc-heading) !important;
    }

    /* ---------- Dark: branded drawer + light text ---------- */
    html[data-theme="dark"] .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu,
    html[data-theme="dark"] .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu[data-menu],
    html[data-theme="dark"] #header .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu,
    html[data-theme="dark"] body > .mobile-menu {
        background: linear-gradient(180deg, #0c1822 0%, #132635 100%) !important;
        background-color: #132635 !important;
        color: #dbe9f5 !important;
        box-shadow: -12px 0 48px rgba(0, 0, 0, 0.45);
    }

    html[data-theme="dark"] #header .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu > ul,
    html[data-theme="dark"] #header .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu > ul:not(.menu-item-object-wdt_mega_menus ul),
    html[data-theme="dark"] body > .mobile-menu > ul,
    html[data-theme="dark"] body > .mobile-menu > ul:not(.menu-item-object-wdt_mega_menus ul) {
        background: linear-gradient(180deg, #0c1822 0%, #132635 100%) !important;
        background-color: #132635 !important;
    }

    html[data-theme="dark"] .mobile-nav-container.mobile-nav-offcanvas-right .overlay,
    html[data-theme="dark"] body > .mobile-menu-overlay {
        background: rgba(4, 20, 33, 0.62) !important;
    }

    html[data-theme="dark"] .mobile-menu .wdt-primary-nav > li:not(.close-nav) > a {
        background: rgba(14, 34, 48, 0.96) !important;
        border: 1px solid rgba(124, 182, 221, 0.38) !important;
        color: #f3f9ff !important;
    }

    html[data-theme="dark"] .mobile-menu .wdt-primary-nav > li:not(.close-nav) > a span {
        color: #f3f9ff !important;
        opacity: 1 !important;
        -webkit-text-fill-color: #f3f9ff !important;
    }

    html[data-theme="dark"] .mobile-menu .wdt-primary-nav > li.current-menu-item > a,
    html[data-theme="dark"] .mobile-menu .wdt-primary-nav > li.current_page_item > a {
        background: rgba(18, 138, 240, 0.3) !important;
        border-color: rgba(132, 198, 242, 0.72) !important;
    }

    html[data-theme="dark"] .mobile-menu .wdt-primary-nav > li:not(.close-nav) > a:hover {
        background: rgba(30, 58, 78, 0.95) !important;
        border-color: rgba(148, 200, 235, 0.55) !important;
        transform: translateY(-1px);
    }

    html[data-theme="dark"] .mobile-menu .fmc-nav-theme-toggle > a,
    html[data-theme="dark"] .mobile-menu .fmc-nav-lang-switch > a {
        background: rgba(14, 40, 58, 0.98) !important;
        border: 1px solid rgba(130, 190, 228, 0.62) !important;
        color: #eaf6ff !important;
    }

    html[data-theme="dark"] .mobile-menu .fmc-nav-theme-toggle > a span,
    html[data-theme="dark"] .mobile-menu .fmc-nav-lang-switch > a span {
        color: #eaf6ff !important;
        -webkit-text-fill-color: #eaf6ff !important;
    }

    html[data-theme="dark"] .mobile-menu ul li.close-nav a:before,
    html[data-theme="dark"] .mobile-menu ul li.close-nav a:after {
        background-color: rgba(255, 255, 255, 0.88) !important;
    }

    html[data-theme="dark"] .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu,
    html[data-theme="dark"] .mobile-nav-container.mobile-nav-offcanvas-right .mobile-menu *,
    html[data-theme="dark"] body > .mobile-menu,
    html[data-theme="dark"] body > .mobile-menu * {
        opacity: 1 !important;
    }

    /* Chat FAB: tuck while menu is open */
    body.nav-is-visible #fabContainer {
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.2s ease;
    }
}

/* Remove old fixed-position prefs (no longer used) */
.fmc-site-prefs {
    display: none !important;
}

/* ----- Home: light sections + carousels (dark mode) ----- */
html[data-theme="dark"] body[data-fmc-page="home"] .home-products-section,
html[data-theme="dark"] body[data-fmc-page="home"] .home-blog-section,
html[data-theme="dark"] body[data-fmc-page="home"] .home-projects-section {
    background: var(--fmc-page-bg) !important;
    color: var(--fmc-text);
}

html[data-theme="dark"] body[data-fmc-page="home"] .home-products-subtitle,
html[data-theme="dark"] body[data-fmc-page="home"] .home-blog-subtitle,
html[data-theme="dark"] body[data-fmc-page="home"] .home-projects-subtitle {
    color: var(--fmc-link);
}

html[data-theme="dark"] body[data-fmc-page="home"] .home-products-title,
html[data-theme="dark"] body[data-fmc-page="home"] .home-blog-title,
html[data-theme="dark"] body[data-fmc-page="home"] .home-projects-title {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .home-products-carousel {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] body[data-fmc-page="home"] .carousel-arrow {
    background: var(--fmc-surface);
    border-color: var(--fmc-border);
    color: var(--fmc-text);
}

html[data-theme="dark"] body[data-fmc-page="home"] .carousel-arrow:hover {
    background: #0d6ebf;
    border-color: #128AF0;
    color: #fff;
}

html[data-theme="dark"] body[data-fmc-page="home"] .carousel-dot {
    background: #475569;
}

html[data-theme="dark"] body[data-fmc-page="home"] .carousel-dot.active {
    background: var(--fmc-link);
}

html[data-theme="dark"] body[data-fmc-page="home"] .home-project-slide .project-card {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

/* Blog cards inside home carousel */
html[data-theme="dark"] body[data-fmc-page="home"] .home-blog-section .blog-card {
    background: var(--fmc-surface) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] body[data-fmc-page="home"] .home-blog-section .blog-card-title a {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .home-blog-section .blog-card-title a:hover {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .home-blog-section .blog-card-excerpt {
    color: #94a3b8 !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .home-blog-section .blog-card-meta {
    color: #94a3b8 !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .home-blog-section .blog-card-readmore {
    color: var(--fmc-link) !important;
}

/* Product PDF modal */
html[data-theme="dark"] .product-pdf-modal {
    background-color: rgba(0, 0, 0, 0.72);
}

html[data-theme="dark"] .product-pdf-modal-content {
    background-color: var(--fmc-surface);
    color: var(--fmc-text);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--fmc-border);
}

html[data-theme="dark"] .product-pdf-modal-body {
    background: var(--fmc-page-bg);
}

html[data-theme="dark"] .product-pdf-modal-body iframe {
    background: #0f172a;
}

html[data-theme="dark"] .product-pdf-modal-footer {
    background-color: var(--fmc-surface);
    border-top-color: var(--fmc-border);
}

html[data-theme="dark"] .download-product-pdf-btn {
    background: linear-gradient(135deg, #166534 0%, #14532d 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .download-product-pdf-btn:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%) !important;
    color: #fff !important;
}

html[data-theme="dark"] .close-product-modal-btn {
    background: var(--fmc-surface) !important;
    color: var(--fmc-heading) !important;
    border: 2px solid var(--fmc-border) !important;
}

html[data-theme="dark"] .close-product-modal-btn:hover {
    background: var(--fmc-page-bg) !important;
    border-color: var(--fmc-muted) !important;
    color: var(--fmc-heading) !important;
}

/* Certificate preview modal */
html[data-theme="dark"] .cert-modal {
    background-color: rgba(0, 0, 0, 0.72);
}

html[data-theme="dark"] .cert-modal-content {
    background: var(--fmc-surface);
    color: var(--fmc-text);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--fmc-border);
}

html[data-theme="dark"] .cert-modal-body {
    background: var(--fmc-page-bg);
}

html[data-theme="dark"] .cert-modal-body img {
    border-color: var(--fmc-border);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .cert-modal-footer {
    background: var(--fmc-surface);
    border-top-color: var(--fmc-border);
}

html[data-theme="dark"] .cert-modal-footer a.cert-download-btn {
    background: linear-gradient(135deg, #166534 0%, #14532d 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .cert-modal-footer a.cert-download-btn:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%) !important;
    color: #fff !important;
}

html[data-theme="dark"] .cert-modal-footer button.cert-card-btn {
    background: var(--fmc-surface) !important;
    color: var(--fmc-heading) !important;
    border-color: var(--fmc-border) !important;
}

html[data-theme="dark"] .cert-modal-footer button.cert-card-btn:hover {
    background: var(--fmc-page-bg) !important;
    border-color: var(--fmc-muted) !important;
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .cert-modal .cert-modal-close {
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.28) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

/* ===== Products & Equipments Pages (Dark Mode) ===== */
html[data-theme="dark"] .products-grid,
html[data-theme="dark"] .equipments-grid {
    background: var(--fmc-page-bg);
}

html[data-theme="dark"] .page-products .product-photo-card__inner,
html[data-theme="dark"] .related-products-section .product-photo-card__inner {
    border-color: var(--fmc-card-border) !important;
    background: #0a1620;
}

html[data-theme="dark"] .page-products .product-photo-card__media,
html[data-theme="dark"] .related-products-section .product-photo-card__media {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
}

html[data-theme="dark"] .product-card,
html[data-theme="dark"] .equipment-card {
    background: var(--fmc-card-bg) !important;
    border-color: var(--fmc-card-border) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .product-card:hover,
html[data-theme="dark"] .equipment-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .product-card-title,
html[data-theme="dark"] .equipment-card-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .product-card-title a,
html[data-theme="dark"] .equipment-card-title a {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .product-card-title a:hover,
html[data-theme="dark"] .equipment-card-title a:hover {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .product-card-excerpt,
html[data-theme="dark"] .equipment-card-excerpt {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .product-filters,
html[data-theme="dark"] .equipment-filters {
    background: var(--fmc-surface);
    border-color: var(--fmc-border);
}

/* Product / Equipment / Project single — shared `.product-detail-*` markup */
html[data-theme="dark"] .product-detail-section {
    background: var(--fmc-page-bg) !important;
    color: var(--fmc-text);
}

html[data-theme="dark"] .product-detail-title,
html[data-theme="dark"] .equipment-detail-title,
html[data-theme="dark"] .product-detail-heading,
html[data-theme="dark"] .product-features-heading {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .product-detail-description,
html[data-theme="dark"] .equipment-detail-description {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .product-features-list,
html[data-theme="dark"] .equipment-features-list {
    color: var(--fmc-text);
}

html[data-theme="dark"] .product-features-list li,
html[data-theme="dark"] .equipment-features-list li {
    color: var(--fmc-text);
    border-bottom-color: var(--fmc-border) !important;
}

html[data-theme="dark"] .product-features-list .feature-icon,
html[data-theme="dark"] .equipment-features-list .feature-icon {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .product-no-catalog {
    background: var(--fmc-callout-bg) !important;
    border-color: var(--fmc-callout-border) !important;
}

html[data-theme="dark"] .product-no-catalog p {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .product-pdf-section {
    background: var(--fmc-surface) !important;
    border-color: var(--fmc-border) !important;
}

html[data-theme="dark"] .product-pdf-heading {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .product-image-showcase,
html[data-theme="dark"] .equipment-image-showcase {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] section.home-products-section.related-products-section,
html[data-theme="dark"] body.page-product-single section.home-products-section.related-products-section,
html[data-theme="dark"] body.page-equipment-single section.home-products-section.related-products-section {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%) !important;
}

html[data-theme="dark"] body.page-project-single .home-projects-section.related-pep-strip {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%) !important;
}

html[data-theme="dark"] body.page-project-single .home-projects-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] body.page-product-single .related-products-section .home-products-title,
html[data-theme="dark"] body.page-equipment-single .related-products-section .home-products-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .related-products-section:not(.home-products-section),
html[data-theme="dark"] .related-equipments-section {
    background: var(--fmc-surface) !important;
}

html[data-theme="dark"] .related-products-heading,
html[data-theme="dark"] .related-equipments-heading {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] body.page-product-single #relatedCarouselPrev,
html[data-theme="dark"] body.page-product-single #relatedCarouselNext,
html[data-theme="dark"] body.page-equipment-single #relatedEquipPrev,
html[data-theme="dark"] body.page-equipment-single #relatedEquipNext,
html[data-theme="dark"] body.page-project-single #relatedProjectsPrev,
html[data-theme="dark"] body.page-project-single #relatedProjectsNext {
    background: var(--fmc-surface) !important;
    border-color: var(--fmc-border) !important;
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] body.page-product-single #relatedCarouselPrev:hover,
html[data-theme="dark"] body.page-product-single #relatedCarouselNext:hover,
html[data-theme="dark"] body.page-equipment-single #relatedEquipPrev:hover,
html[data-theme="dark"] body.page-equipment-single #relatedEquipNext:hover,
html[data-theme="dark"] body.page-project-single #relatedProjectsPrev:hover,
html[data-theme="dark"] body.page-project-single #relatedProjectsNext:hover {
    background: rgba(18, 138, 240, 0.2) !important;
    border-color: var(--fmc-link) !important;
    color: var(--fmc-link) !important;
}

/* ===== Projects Pages (Dark Mode) ===== */
html[data-theme="dark"] .projects-grid {
    background: var(--fmc-page-bg);
}

html[data-theme="dark"] .project-card {
    background: var(--fmc-card-bg) !important;
    border-color: var(--fmc-card-border) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .project-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .project-card-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .project-card-title a {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .project-card-title a:hover {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .project-card-meta {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .project-filters {
    background: var(--fmc-surface);
    border-color: var(--fmc-border);
}

/* Project Single Page */
html[data-theme="dark"] .project-detail-section {
    background: var(--fmc-page-bg) !important;
    color: var(--fmc-text);
}

html[data-theme="dark"] .project-detail-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .project-detail-content {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .project-info-list {
    background: var(--fmc-surface);
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .project-info-list li {
    color: var(--fmc-text);
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .project-gallery {
    background: var(--fmc-page-bg);
}

/* ===== Certificates Page (Dark Mode) ===== */
html[data-theme="dark"] .certificates-section {
    background: var(--fmc-page-bg) !important;
}

html[data-theme="dark"] .certificates-grid {
    background: var(--fmc-page-bg);
}

html[data-theme="dark"] .certificates-toolbar-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .cert-card {
    background: var(--fmc-card-bg) !important;
    border-color: var(--fmc-card-border) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .cert-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .cert-card-body h3 {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .cert-card-image {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

html[data-theme="dark"] .certificates-section .cert-view-toggle:not(.is-active) {
    background: var(--fmc-surface) !important;
    color: var(--fmc-text) !important;
    border-color: var(--fmc-border) !important;
}

html[data-theme="dark"] .certificates-section .cert-view-toggle:not(.is-active):hover {
    background: rgba(18, 138, 240, 0.12) !important;
    color: var(--fmc-text) !important;
    border-color: var(--fmc-link) !important;
}

html[data-theme="dark"] .certificates-section .cert-card-actions a.cert-btn-download {
    background: var(--fmc-surface) !important;
    color: var(--fmc-heading) !important;
    border-color: var(--fmc-link) !important;
}

html[data-theme="dark"] .certificates-section .cert-card-actions a.cert-btn-download:hover {
    background: rgba(18, 138, 240, 0.12) !important;
    color: var(--fmc-heading) !important;
    border-color: var(--fmc-link-hover) !important;
}

/* ===== Careers Pages (Dark Mode) ===== */
html[data-theme="dark"] .careers-section {
    background: var(--fmc-page-bg) !important;
}

html[data-theme="dark"] .careers-grid {
    background: var(--fmc-page-bg);
}

html[data-theme="dark"] .career-card {
    background: var(--fmc-card-bg) !important;
    border-color: var(--fmc-card-border) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .career-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .career-card-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .career-card-meta {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .career-card-excerpt {
    color: var(--fmc-text) !important;
}

/* Career Single & Application Form */
html[data-theme="dark"] .career-detail-section {
    background: var(--fmc-page-bg) !important;
    color: var(--fmc-text);
}

html[data-theme="dark"] .career-detail-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .career-detail-content {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .career-requirements,
html[data-theme="dark"] .career-responsibilities {
    background: var(--fmc-surface);
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .career-requirements li,
html[data-theme="dark"] .career-responsibilities li {
    color: var(--fmc-text);
}

html[data-theme="dark"] .career-application-form {
    background: var(--fmc-surface);
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .careers-cta {
    background: var(--fmc-surface) !important;
    border-color: var(--fmc-border) !important;
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .careers-cta a {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .career-card-link {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .career-card-link:hover {
    color: var(--fmc-link-hover) !important;
}

html[data-theme="dark"] .career-card-meta i {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .job-single-section {
    background: var(--fmc-page-bg) !important;
}

html[data-theme="dark"] .job-single-meta {
    color: var(--fmc-muted) !important;
    border-bottom-color: var(--fmc-border) !important;
}

html[data-theme="dark"] .job-single-meta i {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .job-single-body h2 {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .job-single-body p,
html[data-theme="dark"] .job-list li {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .job-application-section {
    background: var(--fmc-surface) !important;
    border-color: var(--fmc-border) !important;
}

html[data-theme="dark"] .job-application-heading {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .job-application-intro {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .job-related {
    border-top-color: var(--fmc-border) !important;
}

html[data-theme="dark"] .job-related-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .job-related-list a {
    color: var(--fmc-link) !important;
}

/* ===== Contact Page (Dark Mode) ===== */
html[data-theme="dark"] .contact-section {
    background: var(--fmc-page-bg) !important;
}

html[data-theme="dark"] .contact-info-grid {
    background: var(--fmc-page-bg);
}

html[data-theme="dark"] .contact-info-card {
    background: var(--fmc-card-bg) !important;
    border-color: var(--fmc-card-border) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .contact-info-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .contact-info-card h3 {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .contact-info-card p {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .contact-info-card a {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .contact-info-card a:hover {
    color: var(--fmc-link-hover) !important;
}

/* Contact Form */
html[data-theme="dark"] .contact-form {
    background: var(--fmc-surface);
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .contact-form input,
html[data-theme="dark"] .contact-form textarea,
html[data-theme="dark"] .contact-form select {
    background: var(--fmc-input-bg) !important;
    border-color: var(--fmc-input-border) !important;
    color: var(--fmc-input-text) !important;
}

html[data-theme="dark"] .contact-form input:focus,
html[data-theme="dark"] .contact-form textarea:focus,
html[data-theme="dark"] .contact-form select:focus {
    border-color: #128AF0 !important;
    box-shadow: 0 0 0 3px rgba(18, 138, 240, 0.1);
}

html[data-theme="dark"] .contact-form label {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .contact-form ::placeholder {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .contact-form-wrapper {
    background: var(--fmc-surface) !important;
    border: 1px solid var(--fmc-border) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .contact-form-subtitle {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .form-alert-success {
    background: rgba(34, 197, 94, 0.12) !important;
    color: #86efac !important;
    border: 1px solid rgba(34, 197, 94, 0.35) !important;
}

html[data-theme="dark"] .form-alert-error {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

html[data-theme="dark"] .contact-section .form-group label {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .contact-section .form-group input,
html[data-theme="dark"] .contact-section .form-group textarea {
    background: var(--fmc-input-bg) !important;
    border-color: var(--fmc-input-border) !important;
    color: var(--fmc-input-text) !important;
}

html[data-theme="dark"] .contact-section .form-group input::placeholder,
html[data-theme="dark"] .contact-section .form-group textarea::placeholder {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .contact-info-item strong {
    color: var(--fmc-heading) !important;
}

/* ===== About Page (Dark Mode) ===== */
html[data-theme="dark"] body.page-about .about-section {
    background: var(--fmc-page-bg) !important;
    color: var(--fmc-text);
}

html[data-theme="dark"] body.page-about .about-alt-bg {
    background: var(--fmc-strip-bg) !important;
}

html[data-theme="dark"] body.page-about .section-heading {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] body.page-about .about-text p {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] body.page-about .mvo-card {
    background: var(--fmc-card-bg) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    border-top-color: var(--fmc-link) !important;
}

html[data-theme="dark"] body.page-about .mvo-card h3 {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] body.page-about .mvo-card p {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] body.page-about .about-inline-contact {
    border-top-color: var(--fmc-border) !important;
}

html[data-theme="dark"] body.page-about .about-inline-contact-item i {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] body.page-about .about-inline-contact-item a {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] body.page-about .about-inline-contact-item a:hover {
    color: var(--fmc-link-hover) !important;
}

html[data-theme="dark"] body.page-about .about-tab-content p {
    color: var(--fmc-text) !important;
}

/* About — technology tabs on small screens (main.php forces light pill buttons) */
@media (max-width: 767px) {
    html[data-theme="dark"] body.page-about .about-tech .about-tab-btn {
        background: var(--fmc-surface) !important;
        color: var(--fmc-text) !important;
        border-color: var(--fmc-border) !important;
        text-shadow: none !important;
    }

    html[data-theme="dark"] body.page-about .about-tech .about-tab-btn.active {
        background: var(--fmc-link) !important;
        color: #0f172a !important;
        border-color: var(--fmc-link) !important;
    }
}

html[data-theme="dark"] body.page-about .about-stats-section {
    background: linear-gradient(135deg, #022b3a 0%, #0e7490 55%, #1d4ed8 100%) !important;
}

html[data-theme="dark"] body.page-about .about-stats-section .about-stat-number {
    color: #ffffff !important;
}

html[data-theme="dark"] body.page-about .about-stats-section .about-stat-label {
    color: rgba(255, 255, 255, 0.88) !important;
}

html[data-theme="dark"] .about-timeline {
    background: var(--fmc-surface);
}

html[data-theme="dark"] .about-timeline-item {
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .about-timeline-year {
    color: #128AF0 !important;
}

html[data-theme="dark"] .about-timeline-content {
    color: var(--fmc-text) !important;
}

/* ===== Blog Archive & Single (Dark Mode) ===== */
html[data-theme="dark"] .blog-archive-section {
    background: var(--fmc-page-bg) !important;
}

html[data-theme="dark"] .blog-archive-grid {
    background: var(--fmc-page-bg);
}

html[data-theme="dark"] .blog-card {
    background: var(--fmc-card-bg) !important;
    border-color: var(--fmc-card-border) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .blog-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .blog-card-title a {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .blog-card-title a:hover {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .blog-card-excerpt {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .blog-card-meta {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .blog-card-readmore {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .blog-card-readmore:hover {
    color: var(--fmc-link-hover) !important;
}

html[data-theme="dark"] .blog-active-filters {
    background: var(--fmc-surface) !important;
    border-color: var(--fmc-border) !important;
}

html[data-theme="dark"] .blog-active-filters-label {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .blog-filter-chip {
    background: rgba(18, 138, 240, 0.18) !important;
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .blog-filter-clear-all {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .blog-empty-state {
    background: var(--fmc-surface) !important;
    border-color: var(--fmc-border) !important;
    color: var(--fmc-text);
}

html[data-theme="dark"] .blog-empty-state h3 {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .blog-pagination {
    border-top-color: var(--fmc-border) !important;
}

html[data-theme="dark"] .blog-pagination .pagination-info {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .blog-pagination .pagination-link {
    background: var(--fmc-card-bg) !important;
    border-color: var(--fmc-border) !important;
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .blog-pagination .pagination-link:hover {
    border-color: var(--fmc-link) !important;
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .blog-pagination .pagination-link.active {
    background: #128AF0 !important;
    border-color: #128AF0 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .blog-related-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .share-label {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .blog-single-meta i {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .blog-single-category a {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .blog-single-tags .blog-card-tag {
    background: rgba(18, 138, 240, 0.15) !important;
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .blog-single-share {
    border-top-color: var(--fmc-border) !important;
}

html[data-theme="dark"] .blog-sidebar-search-wrap {
    background: var(--fmc-input-bg) !important;
    border-color: var(--fmc-border) !important;
}

html[data-theme="dark"] .blog-sidebar-search-wrap:focus-within {
    background: var(--fmc-surface) !important;
}

html[data-theme="dark"] .blog-sidebar-search-input {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .blog-sidebar-search-icon {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .blog-sidebar-live-results {
    background: var(--fmc-surface) !important;
    border-color: var(--fmc-border) !important;
}

html[data-theme="dark"] .live-result-item {
    color: var(--fmc-text) !important;
    border-bottom-color: var(--fmc-border) !important;
}

html[data-theme="dark"] .live-result-item small {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .live-result-item:hover {
    background: rgba(56, 189, 248, 0.08) !important;
}

html[data-theme="dark"] .sidebar-categories a {
    color: var(--fmc-text) !important;
}

/* Blog sidebar search — override Elementor/Woo global input backgrounds */
html[data-theme="dark"] .blog-sidebar .sidebar-widget--search input[type="text"],
html[data-theme="dark"] .blog-sidebar .blog-sidebar-search-input {
    background: transparent !important;
    background-color: transparent !important;
    color: var(--fmc-input-text) !important;
    -webkit-text-fill-color: var(--fmc-input-text) !important;
}

html[data-theme="dark"] .blog-sidebar .blog-sidebar-search-input::placeholder {
    color: var(--fmc-muted) !important;
    opacity: 1;
}

html[data-theme="dark"] .blog-sidebar .blog-sidebar-search-input:-webkit-autofill,
html[data-theme="dark"] .blog-sidebar .blog-sidebar-search-input:-webkit-autofill:hover,
html[data-theme="dark"] .blog-sidebar .blog-sidebar-search-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--fmc-input-text) !important;
    box-shadow: 0 0 0 1000px var(--fmc-input-bg) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

html[data-theme="dark"] .blog-sidebar .sidebar-widget-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .blog-sidebar .blog-sidebar-search-wrap:focus-within {
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45), 0 0 0 4px rgba(56, 189, 248, 0.15);
}

html[data-theme="dark"] .blog-list-main {
    color: var(--fmc-text);
}

html[data-theme="dark"] .blog-related {
    color: var(--fmc-text);
}

html[data-theme="dark"] .blog-sidebar .blog-card-tag.active {
    background: #f7c600 !important;
    color: #023b4a !important;
    border-color: #f7c600 !important;
}

html[data-theme="dark"] .blog-empty-state p {
    color: var(--fmc-muted) !important;
}

/* Blog Single Page */
html[data-theme="dark"] .blog-single-section {
    background: var(--fmc-page-bg) !important;
}

html[data-theme="dark"] .blog-single-content {
    background: var(--fmc-surface);
    color: var(--fmc-text);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
    border-radius: 16px;
    border: 1px solid var(--fmc-border);
    padding: clamp(20px, 3vw, 32px);
}

html[data-theme="dark"] .blog-single-featured-img {
    border: 1px solid var(--fmc-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .blog-single-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .blog-single-meta {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .blog-single-body {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .blog-single-body h1,
html[data-theme="dark"] .blog-single-body h2,
html[data-theme="dark"] .blog-single-body h3,
html[data-theme="dark"] .blog-single-body h4,
html[data-theme="dark"] .blog-single-body h5,
html[data-theme="dark"] .blog-single-body h6 {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .blog-single-body blockquote {
    background: rgba(18, 138, 240, 0.1);
    border-color: #128AF0;
    color: var(--fmc-text);
}

html[data-theme="dark"] .blog-single-body code {
    background: #0f172a;
    color: var(--fmc-link);
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .blog-single-body pre {
    background: #0f172a;
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .blog-single-body pre code {
    color: #e2e8f0;
}

html[data-theme="dark"] .blog-single-tags {
    background: var(--fmc-surface);
}

html[data-theme="dark"] .blog-single-tag {
    background: rgba(18, 138, 240, 0.15);
    color: var(--fmc-link);
    border-color: rgba(18, 138, 240, 0.3);
}

html[data-theme="dark"] .blog-single-tag:hover {
    background: rgba(18, 138, 240, 0.25);
}

html[data-theme="dark"] .related-posts-section {
    background: var(--fmc-surface) !important;
}

html[data-theme="dark"] .related-posts-heading {
    color: var(--fmc-heading) !important;
}

/* ===== Tables (Dark Mode) ===== */
html[data-theme="dark"] table {
    background: var(--fmc-surface);
    border-color: var(--fmc-table-border);
}

html[data-theme="dark"] th {
    background: #0f172a;
    color: var(--fmc-heading);
    border-color: var(--fmc-table-border);
}

html[data-theme="dark"] td {
    color: var(--fmc-text);
    border-color: var(--fmc-table-border);
}

html[data-theme="dark"] tbody tr:nth-child(even) {
    background: var(--fmc-table-stripe);
}

html[data-theme="dark"] tbody tr:hover {
    background: rgba(18, 138, 240, 0.08);
}

/* ===== Pagination (Dark Mode) ===== */
html[data-theme="dark"] .pagination {
    background: var(--fmc-surface);
}

html[data-theme="dark"] .pagination-link,
html[data-theme="dark"] .pagination-prev,
html[data-theme="dark"] .pagination-next {
    background: var(--fmc-card-bg);
    color: var(--fmc-text);
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .pagination-link:hover,
html[data-theme="dark"] .pagination-prev:hover,
html[data-theme="dark"] .pagination-next:hover {
    background: rgba(18, 138, 240, 0.15);
    color: var(--fmc-link);
    border-color: #128AF0;
}

html[data-theme="dark"] .pagination-link.active {
    background: linear-gradient(135deg, #023b4a 0%, #034d61 100%);
    color: #fff;
    border-color: #023b4a;
}

html[data-theme="dark"] .pagination-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== Breadcrumbs (Dark Mode) ===== */
html[data-theme="dark"] .page-hero-breadcrumb {
    color: var(--fmc-text);
}

html[data-theme="dark"] .page-hero-breadcrumb a {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .page-hero-breadcrumb a:hover {
    color: var(--fmc-link-hover) !important;
}

html[data-theme="dark"] .page-hero-breadcrumb .separator {
    color: var(--fmc-muted);
}

/* ===== Newsletter (Dark Mode) ===== */
html[data-theme="dark"] .site-newsletter {
    background: var(--fmc-newsletter-bg) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

html[data-theme="dark"] .site-newsletter-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .site-newsletter-description {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .site-newsletter-form input {
    background: var(--fmc-input-bg) !important;
    border-color: var(--fmc-input-border) !important;
    color: var(--fmc-input-text) !important;
}

html[data-theme="dark"] .site-newsletter-form input:focus {
    border-color: #128AF0 !important;
    box-shadow: 0 0 0 3px rgba(18, 138, 240, 0.1);
}

html[data-theme="dark"] .site-newsletter-form input::placeholder {
    color: var(--fmc-muted) !important;
}

/* ===== Footer (Dark Mode) ===== */
html[data-theme="dark"] #footer {
    background: var(--fmc-surface) !important;
}

html[data-theme="dark"] .footer-main {
    background: var(--fmc-surface);
}

html[data-theme="dark"] .footer-col-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .footer-desc {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .footer-links a {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .footer-links a:hover {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .footer-contact-list {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .footer-contact-list a {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .footer-contact-list a:hover {
    color: var(--fmc-link-hover) !important;
}

html[data-theme="dark"] .footer-social-link {
    background: rgba(18, 138, 240, 0.1);
    color: var(--fmc-link);
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .footer-social-link:hover {
    background: rgba(18, 138, 240, 0.2);
    color: var(--fmc-link);
}

html[data-theme="dark"] .footer-copyright {
    background: #0f172a !important;
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .footer-copyright p {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .footer-legal-links a {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .footer-legal-links a:hover {
    color: var(--fmc-link) !important;
}

/* ===== Chatbot Modal (Dark Mode) ===== */
/* Isolate from Elementor/Woo global `button` / `input` rules — explicit tokens + !important where themes win */
html[data-theme="dark"] .chatbot-modal {
    background-color: rgba(0, 0, 0, 0.72);
}

html[data-theme="dark"] .chatbot-modal-content {
    background: var(--fmc-surface);
    color: var(--fmc-text);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--fmc-border);
    color-scheme: dark;
}

html[data-theme="dark"] .chatbot-modal-header {
    background: linear-gradient(135deg, #023b4a 0%, #128af0 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .chatbot-modal-title,
html[data-theme="dark"] .chatbot-modal-title i,
html[data-theme="dark"] .chatbot-modal-title .fa {
    color: #ffffff !important;
}

html[data-theme="dark"] .chatbot-modal .chatbot-modal-close {
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.28) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .chatbot-modal .chatbot-modal-close:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.75) !important;
}

html[data-theme="dark"] .chatbot-form {
    background: var(--fmc-surface);
    color: var(--fmc-text);
}

html[data-theme="dark"] .chatbot-form-group label {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .chatbot-form-group label span {
    color: #f87171 !important;
}

html[data-theme="dark"] .chatbot-form-group input {
    background: var(--fmc-input-bg) !important;
    border-color: var(--fmc-input-border) !important;
    color: var(--fmc-input-text) !important;
}

html[data-theme="dark"] .chatbot-form-group input:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22) !important;
}

html[data-theme="dark"] .chatbot-form-group input::placeholder {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .chatbot-modal .chatbot-submit-btn {
    color: #ffffff !important;
    background: linear-gradient(135deg, #023b4a, #128af0) !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .chatbot-modal .chatbot-submit-btn:hover {
    color: #ffffff !important;
    filter: brightness(1.06);
}

html[data-theme="dark"] .chatbot-modal .chatbot-submit-btn i {
    color: #ffffff !important;
}

/* ===== Forms General (Dark Mode) ===== */
html[data-theme="dark"] .form-group {
    color: var(--fmc-text);
}

html[data-theme="dark"] .form-label {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .form-control {
    background: var(--fmc-input-bg) !important;
    border-color: var(--fmc-input-border) !important;
    color: var(--fmc-input-text) !important;
}

html[data-theme="dark"] .form-control:focus {
    border-color: #128AF0 !important;
    box-shadow: 0 0 0 3px rgba(18, 138, 240, 0.1);
}

html[data-theme="dark"] .form-control::placeholder {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .form-error {
    color: #fca5a5 !important;
}

html[data-theme="dark"] .form-success {
    color: #86efac !important;
}

html[data-theme="dark"] select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e2e8f0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

/* ===== Alerts & Notifications (Dark Mode) ===== */
html[data-theme="dark"] .alert {
    background: var(--fmc-surface);
    border-color: var(--fmc-border);
    color: var(--fmc-text);
}

html[data-theme="dark"] .alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #86efac;
}

html[data-theme="dark"] .alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

html[data-theme="dark"] .alert-warning {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fde047;
}

html[data-theme="dark"] .alert-info {
    background: rgba(18, 138, 240, 0.1);
    border-color: rgba(18, 138, 240, 0.3);
    color: var(--fmc-link);
}

/* ===== Badges (Dark Mode) ===== */
html[data-theme="dark"] .badge {
    background: rgba(18, 138, 240, 0.15);
    color: var(--fmc-link);
}

html[data-theme="dark"] .badge-primary {
    background: linear-gradient(135deg, #023b4a 0%, #034d61 100%);
    color: #fff;
}

html[data-theme="dark"] .badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

html[data-theme="dark"] .badge-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fde047;
}

/* ===== Tooltips (Dark Mode) ===== */
html[data-theme="dark"] .tooltip {
    background: #0f172a;
    color: var(--fmc-text);
    border-color: var(--fmc-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* ===== Search & Filters (Dark Mode) ===== */
html[data-theme="dark"] .search-form {
    background: var(--fmc-surface);
}

html[data-theme="dark"] .search-input {
    background: var(--fmc-input-bg) !important;
    border-color: var(--fmc-input-border) !important;
    color: var(--fmc-input-text) !important;
}

html[data-theme="dark"] .search-input:focus {
    border-color: #128AF0 !important;
}

html[data-theme="dark"] .filter-group {
    background: var(--fmc-surface);
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .filter-label {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .filter-option {
    color: var(--fmc-text);
}

html[data-theme="dark"] .filter-option:hover {
    background: rgba(18, 138, 240, 0.1);
    color: var(--fmc-link);
}

/* ===== Hero Banners (Dark Mode) ===== */
/* Do not set background shorthand here — it clears inline background-image on .page-hero-banner */

html[data-theme="dark"] .page-hero-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .page-hero-description {
    color: var(--fmc-text) !important;
}

/* ===== Elementor Widgets (Dark Mode) ===== */
html[data-theme="dark"] .elementor-widget-container {
    color: var(--fmc-text);
}

html[data-theme="dark"] .wdt-heading-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .wdt-heading-subtitle {
    color: var(--fmc-muted) !important;
}

html[data-theme="dark"] .wdt-heading-content-wrapper {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] .wdt-content-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .wdt-content-title a {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .wdt-content-title a:hover {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .elementor-text-editor {
    color: var(--fmc-text) !important;
}

/* ===== Buttons (Dark Mode) ===== */
html[data-theme="dark"] .wdt-button.wdt-button-link {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] .wdt-button.wdt-button-link:hover {
    color: var(--fmc-link-hover) !important;
}

/* ===== Cards General (Dark Mode) ===== */
html[data-theme="dark"] .card {
    background: var(--fmc-card-bg) !important;
    border-color: var(--fmc-card-border) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .card-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .card-text {
    color: var(--fmc-text) !important;
}

/* ===== Image Overlays (Dark Mode) ===== */
html[data-theme="dark"] .image-overlay {
    background: rgba(15, 23, 42, 0.8);
}

html[data-theme="dark"] .image-overlay-title {
    color: #fff !important;
}

html[data-theme="dark"] .image-overlay-text {
    color: #e2e8f0 !important;
}

/* ===== Accordions (Dark Mode) ===== */
html[data-theme="dark"] .accordion {
    background: var(--fmc-surface);
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .accordion-header {
    background: var(--fmc-card-bg);
    color: var(--fmc-text);
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .accordion-header:hover {
    background: rgba(18, 138, 240, 0.1);
}

html[data-theme="dark"] .accordion-body {
    background: var(--fmc-surface);
    color: var(--fmc-text);
}

/* ===== Modals General (Dark Mode) ===== */
html[data-theme="dark"] .modal-backdrop {
    background: rgba(0, 0, 0, 0.8);
}

html[data-theme="dark"] .modal-content {
    background: var(--fmc-surface);
    color: var(--fmc-text);
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .modal-header {
    background: #0f172a;
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .modal-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] .modal-body {
    background: var(--fmc-surface);
    color: var(--fmc-text);
}

html[data-theme="dark"] .modal-footer {
    background: #0f172a;
    border-color: var(--fmc-border);
}

html[data-theme="dark"] .close-modal-btn {
    color: var(--fmc-text);
}

html[data-theme="dark"] .close-modal-btn:hover {
    color: var(--fmc-link);
}

/* ===== Loading States (Dark Mode) ===== */
html[data-theme="dark"] .spinner {
    border-color: var(--fmc-border);
    border-top-color: #128AF0;
}

html[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
}

/* ===== Dropdown Menus (Dark Mode) ===== */
html[data-theme="dark"] .dropdown-menu {
    background: var(--fmc-surface);
    border-color: var(--fmc-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .dropdown-item {
    color: var(--fmc-text);
}

html[data-theme="dark"] .dropdown-item:hover {
    background: rgba(18, 138, 240, 0.1);
    color: var(--fmc-link);
}

html[data-theme="dark"] .dropdown-divider {
    border-color: var(--fmc-border);
}

/* ===== Home page: Elementor sections (dark mode contrast) =====
   Mirrors/extends inline fmc-home-contrast-late in main.php so light text
   stays on dark hero/stats overlays and readable text on light cards. */
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-1802 .wdt-dark-bg .wdt-heading-title,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-1802 .wdt-dark-bg .wdt-heading-subtitle,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-1802 .wdt-dark-bg .wdt-heading-content-wrapper,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-203 .wdt-dark-bg .wdt-heading-title,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-203 .wdt-dark-bg .wdt-heading-subtitle,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-203 .wdt-dark-bg .wdt-heading-content-wrapper,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-207 .wdt-dark-bg .wdt-heading-title,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-207 .wdt-dark-bg .wdt-heading-subtitle,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-207 .wdt-dark-bg .wdt-heading-content-wrapper,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-208 .wdt-dark-bg .wdt-heading-title,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-208 .wdt-dark-bg .wdt-heading-subtitle,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-208 .wdt-dark-bg .wdt-heading-content-wrapper,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-1802 .elementor-widget.wdt-dark-bg .wdt-heading-title,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-1802 .elementor-widget.wdt-dark-bg .wdt-heading-subtitle,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-1802 .elementor-widget.wdt-dark-bg .wdt-heading-content-wrapper {
    color: #f8fafc !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-0780f13 .wdt-heading-title,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-0780f13 .wdt-heading-subtitle,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-0780f13 .wdt-heading-content-wrapper,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-0780f13 .wdt-content-title,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-0780f13 .wdt-content-title a,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-0780f13 .wdt-text-tile,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-0780f13 .wdt-elementor-repeater-container-wrapper,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-0780f13 .wdt-content-counter,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-0780f13 .wdt-content-counter-number,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-0780f13 .wdt-content-counter-suffix,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-0780f13 h2,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-0780f13 h5,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-0780f13 .wdt-pagination-prev,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-0780f13 .wdt-pagination-next {
    color: #f8fafc !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-707b88b.wdt-dark-bg .wdt-heading-content-wrapper {
    color: #e2e8f0 !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-82817d5 .wdt-content-title,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-82817d5 .wdt-content-title a,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-82817d5 .wdt-content-description,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-82817d5 .wdt-icon-box-holder p,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-82817d5 .wdt-content-subtitle,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-82817d5 h5,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-82817d5 .wdt-content-detail-group {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-d41c343 .wdt-heading-subtitle {
    color: var(--fmc-link) !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-d41c343 .wdt-heading-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-8ff430f .wdt-heading-subtitle,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-8ff430f .wdt-heading-title,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-f125398 .wdt-heading-subtitle,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-f125398 .wdt-heading-title {
    color: var(--fmc-heading) !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-2e5293a .wdt-tabs-list > li > a .wdt-content-title {
    color: var(--fmc-text) !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-2e5293a .wdt-tabs-list > li.ui-state-active > a .wdt-content-title {
    color: #fff !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-2e5293a .wdt-tabs-content-wrapper .wdt-tabs-content,
html[data-theme="dark"] body[data-fmc-page="home"] .elementor-element.elementor-element-2e5293a .wdt-tabs-content-wrapper .wdt-tabs-content * {
    color: var(--fmc-text) !important;
}

/* Home — About FMC horizontal cards (phone): light styles live in main.php; dark needs matching surface + text */
@media (max-width: 767px) {
    html[data-theme="dark"] body[data-fmc-page="home"] .fmc-about-mobile-slide {
        background: var(--fmc-card-bg) !important;
        background-color: var(--fmc-card-bg) !important;
        border: 1px solid var(--fmc-card-border) !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.38);
    }

    html[data-theme="dark"] body[data-fmc-page="home"] .fmc-about-dot {
        background: rgba(148, 163, 184, 0.35) !important;
    }

    html[data-theme="dark"] body[data-fmc-page="home"] .fmc-about-dot.is-active {
        background: var(--fmc-link) !important;
    }
}

html[data-theme="dark"] body[data-fmc-page="home"] .fmc-about-mobile-slide .wdt-heading-content-wrapper,
html[data-theme="dark"] body[data-fmc-page="home"] .fmc-about-mobile-slide .elementor-widget-text-editor,
html[data-theme="dark"] body[data-fmc-page="home"] .fmc-about-mobile-slide .elementor-widget-text-editor .elementor-widget-container {
    color: var(--fmc-text) !important;
    -webkit-text-fill-color: var(--fmc-text) !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .fmc-about-mobile-slide .wdt-heading-title {
    color: var(--fmc-heading) !important;
    -webkit-text-fill-color: var(--fmc-heading) !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] #wdt-image-box-0e1f898 .wdt-media-image-cover-container .wdt-content-title a {
    color: #fff !important;
}

html[data-theme="dark"] body[data-fmc-page="home"] .home-products-browse-btn,
html[data-theme="dark"] body[data-fmc-page="home"] .home-blog-browse-btn,
html[data-theme="dark"] body[data-fmc-page="home"] .home-projects-browse-btn {
    color: var(--fmc-link) !important;
}
