/* ==========================================================================
   THEME VARIABLES SETUP (Default Context: Dark Mode)
   ========================================================================== */
:root,
html[data-theme="dark"] {
    --site-bg-main: #0a0a0a;
    --site-bg-surface: #121212;
    --site-border-element: #222222;
    --site-txt-primary: #ffffff;
    --site-txt-secondary: #aaaaaa;
    --site-accent: #d4af37; /* Premium Gold Accent */
}

html[data-theme="light"] {
    --site-bg-main: #f8f9fa;
    --site-bg-surface: #ffffff;
    --site-border-element: #e2e8f0;
    --site-txt-primary: #1a1a1a;
    --site-txt-secondary: #64748b;
    --site-accent: #aa8010;
}

/* ==========================================================================
   GLOBAL CASCADING INVERSION (Hello Elementor & UAE Header/Footer System)
   ========================================================================== */
body, 
#page, 
header, 
footer,
.site-header,
.site-footer,
.uhaf-header,
.uhaf-footer,
.elementor-section,
.elementor-column,
.elementor-widget-container,
.uael-bg-overlay,
.elementor-background-overlay {
    background-color: var(--site-bg-main) !important;
    background-image: none !important; /* Strips background image presets */
    color: var(--site-txt-primary) !important;
    transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

/* Specific target overrides for inner container blocks inside UAE header/footers */
html[data-theme="light"] .uhaf-header .elementor-container,
html[data-theme="light"] .uhaf-footer .elementor-container,
html[data-theme="light"] .elementor-location-header,
html[data-theme="light"] .elementor-location-footer {
    background-color: var(--site-bg-main) !important;
}

/* ==========================================================================
   NAVIGATION MENU & TEXT OVERRIDES
   ========================================================================== */
h1, h2, h3, h4, h5, h6, 
a, 
span, 
p, 
.elementor-heading-title,
.uael-nav-menu .uael-menu-item,
.uael-nav-menu a,
.uhaf-header a,
.uhaf-footer a {
    color: var(--site-txt-primary) !important;
    transition: color 0.3s ease !important;
}

/* Handle dropdown mobile menu containers for UAE navigation elements */
.uael-nav-menu__container,
.uael-nav-menu--main .uael-nav-menu__layout-horizontal ul {
    background-color: var(--site-bg-surface) !important;
}

/* Secondary Meta fields fallback adjustments */
.sub-text, 
time, 
.elementor-post-info,
.uael-post__meta {
    color: var(--site-txt-secondary) !important;
}

/* ==========================================================================
   PREMIUM TOGGLE ICON BUTTON STYLING
   ========================================================================== */
.theme-toggle-btn {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    cursor: pointer;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--site-accent) !important;
    transition: transform 0.2s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
}

html[data-theme="dark"] .theme-toggle-btn .moon-icon { display: none; }
html[data-theme="dark"] .theme-toggle-btn .sun-icon { display: block; }
html[data-theme="light"] .theme-toggle-btn .sun-icon { display: none; }
html[data-theme="light"] .theme-toggle-btn .moon-icon { display: block; }


/* ==========================================================================
   UNIVERSAL THEME OVERRIDES FOR LIGHT MODE UNIFORMITY
   ========================================================================== */


html[data-theme="light"] .elementor-widget-container,
html[data-theme="light"] .elementor-text-editor {
    color: #334155 !important;
}

/* Catch-all for theme single container background definitions */
html[data-theme="light"] .site-main article.post,
html[data-theme="light"] .entry-content,
html[data-theme="light"] .elementor-page-title {
    background-color: transparent !important;
}

/* Intercept theme parent blocks hosting the meta content element */
html[data-theme="light"] .elementor-widget-container .marsiya-meta-block,
html[data-theme="light"] .elementor-column .marsiya-meta-block {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

/* Core Global Form Field Sanitization for Site Wide Elements in Light Mode */
html[data-theme="light"] input[type="text"],
html[data-theme="light"] select {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    border-color: #cbd5e1 !important;
}

/* ==========================================================================
   THEME SWITCHER BYPASS - EXACT LOCKED ELEMENTS ONLY (WHITE EXCLUSIVITY)
   ========================================================================== */

/* This targets ONLY the exact element carrying the class, leaving general h1/h2 tags alone */
html[data-theme="light"] .marsiya-theme-lock,
html[data-theme="light"] .elementor-element .marsiya-theme-lock,
html[data-theme="light"] .e-con-inner .marsiya-theme-lock {
    color: #ffffff !important;
}

/* If you placed the class on an Elementor parent column/container widget instead, 
   this forces only its immediate internal children to remain white */
html[data-theme="light"] .marsiya-theme-lock h1,
html[data-theme="light"] .marsiya-theme-lock h2,
html[data-theme="light"] .marsiya-theme-lock h3,
html[data-theme="light"] .marsiya-theme-lock p,
html[data-theme="light"] .marsiya-theme-lock span,
html[data-theme="light"] .marsiya-theme-lock .elementor-heading-title {
    color: #ffffff !important;
}

