/* ============================================================
   Theme overrides — force light or dark via html[data-theme]
   These use higher specificity than the @media queries so they
   win regardless of system preference.
   ============================================================ */

/* ---------- FORCE DARK ---------- */
html[data-theme="dark"] {
    --vf-primary: #ffffff;
    --vf-accent: #eeb30d;
    --vf-accent-hover: #f5c534;
    --vf-dark: #1a1a2e;
    --vf-darker: #0f0f1a;
    --vf-light: #e2e8f0;
    --glass-bg: rgba(30, 30, 50, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --vf-nav-text: #e2e8f0;
    --vf-bg-glass: rgba(15, 15, 26, 0.8);
    --vf-border: rgba(255, 255, 255, 0.06);
    color-scheme: dark;
}

html[data-theme="dark"] body {
    background-color: #0f0f1a;
    color: #e2e8f0;
}

html[data-theme="dark"] .hero-section {
    background: radial-gradient(circle at top right, #1a1a2e, #0f0f1a, #16162a);
}

html[data-theme="dark"] .hero-section::before {
    background: rgba(238, 179, 13, 0.15);
}

html[data-theme="dark"] .hero-section::after {
    background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .glass-card {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .glass-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .glass-card-static,
html[data-theme="dark"] .glass-card-static:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-color: var(--glass-border);
}

html[data-theme="dark"] .blog-card-placeholder {
    background: linear-gradient(45deg, #1a1a2e, #16162a);
}

html[data-theme="dark"] .blog-card-placeholder-alt {
    background: linear-gradient(135deg, #1a1a2e, #16162a);
}

html[data-theme="dark"] .text-muted-custom {
    color: #94a3b8;
}

html[data-theme="dark"] .section-bg-white {
    background-color: #16162a;
}

html[data-theme="dark"] .cta-orb {
    background: radial-gradient(circle, rgba(238, 179, 13, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
}

html[data-theme="dark"] .text-dark {
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .navbar-modern.scrolled {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
    background-color: rgba(15, 15, 26, 0.95) !important;
}

html[data-theme="dark"] .custom-toggler .navbar-toggler-icon {
    filter: invert(1);
}

html[data-theme="dark"] .auth-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .auth-toggle {
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .form-control-custom {
    background-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .form-control-custom:focus {
    background-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .form-control-custom::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 991.98px) {
    html[data-theme="dark"] .navbar-collapse {
        background: #1a1a2e;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    }

    html[data-theme="dark"] .nav-link-custom:hover {
        background-color: rgba(238, 179, 13, 0.1);
    }
}

/* ---------- FORCE LIGHT ---------- */
html[data-theme="light"] {
    --vf-primary: #545454;
    --vf-accent: #eeb30d;
    --vf-accent-hover: #d9a00a;
    --vf-dark: #f0f2f5;
    --vf-darker: #f8f9fb;
    --vf-light: #1e293b;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.1);
    --vf-nav-text: #545454;
    --vf-bg-glass: rgba(255, 255, 255, 0.85);
    --vf-border: rgba(0, 0, 0, 0.08);
    color-scheme: light;
}

html[data-theme="light"] body {
    background-color: #f8f9fb;
    color: #1e293b;
}

html[data-theme="light"] .hero-section {
    background: radial-gradient(circle at top right, #f8f9fb, #eef1f5, #e4e8ee);
}

html[data-theme="light"] .hero-section::before {
    background: rgba(238, 179, 13, 0.1);
}

html[data-theme="light"] .hero-section::after {
    background: rgba(84, 84, 84, 0.1);
}

html[data-theme="light"] .glass-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .glass-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1), 0 16px 40px rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .glass-card-static,
html[data-theme="light"] .glass-card-static:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
    border-color: var(--glass-border);
}

html[data-theme="light"] .blog-card-placeholder {
    background: linear-gradient(45deg, #e8ecf1, #dde2e8);
}

html[data-theme="light"] .blog-card-placeholder-alt {
    background: linear-gradient(135deg, #e8ecf1, #dde2e8);
}

html[data-theme="light"] .text-muted-custom {
    color: #64748b;
}

html[data-theme="light"] .section-bg-white {
    background-color: #ffffff;
}

html[data-theme="light"] .cta-orb {
    background: radial-gradient(circle, rgba(238, 179, 13, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
}

html[data-theme="light"] .text-dark {
    color: #1e293b !important;
}

html[data-theme="light"] .navbar-modern.scrolled {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

html[data-theme="light"] .custom-toggler .navbar-toggler-icon {
    filter: none;
}

html[data-theme="light"] .auth-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .auth-toggle {
    background: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .form-control-custom {
    background-color: rgba(128, 128, 128, 0.08);
}

html[data-theme="light"] .form-control-custom:focus {
    background-color: rgba(128, 128, 128, 0.12);
}

html[data-theme="light"] .form-control-custom::placeholder {
    color: #94a3b8;
}

@media (max-width: 991.98px) {
    html[data-theme="light"] .navbar-collapse {
        background: white;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.06);
    }

    html[data-theme="light"] .nav-link-custom:hover {
        background-color: rgba(238, 179, 13, 0.08);
    }
}

/* ---------- TOGGLE BUTTON ---------- */
.theme-toggle {
    background: none;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--vf-light);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--vf-accent);
    color: var(--vf-accent);
    background: rgba(238, 179, 13, 0.08);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
    transform: rotate(20deg);
}
