/* Theme CSS Custom Properties - Light/Dark Mode */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.4);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --accent: #0ea5e9;
    --accent-hover: #0284c7;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-nav: rgba(15, 23, 42, 0.8);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --accent: #38bdf8;
    --accent-hover: #7dd3fc;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}

/* === Dark mode overrides === */

/* Body & main */
body { transition: background-color 0.3s ease, color 0.3s ease; }
[data-theme="dark"] body { background: var(--bg-primary); color: var(--text-primary); }
[data-theme="dark"] main { background: var(--bg-primary); }

/* Navigation */
[data-theme="dark"] nav {
    background: var(--bg-nav) !important;
    color: #f1f5f9;
}
[data-theme="dark"] nav .text-gray-800,
[data-theme="dark"] nav .text-gray-900 {
    color: #e2e8f0 !important;
}
[data-theme="dark"] nav a,
[data-theme="dark"] nav button {
    color: #e2e8f0;
}
[data-theme="dark"] nav a:hover,
[data-theme="dark"] nav button:hover {
    color: #38bdf8;
}
[data-theme="dark"] nav .bg-white,
[data-theme="dark"] nav [x-show] {
    background: #1e293b !important;
    color: #f1f5f9;
}
[data-theme="dark"] nav .hover\:bg-sky-100:hover {
    background: #334155 !important;
}

/* Cards */
[data-theme="dark"] .bento-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}
[data-theme="dark"] .bento-title { color: var(--text-primary); }
[data-theme="dark"] .bento-text { color: var(--text-secondary); }
[data-theme="dark"] .bento-icon {
    background: linear-gradient(135deg, #1e3a5f, #1e293b);
    color: #38bdf8;
}

[data-theme="dark"] .card-anim {
    background: linear-gradient(145deg, rgba(255,255,255,0.02), rgba(56,189,248,0.05));
    border-color: var(--border-color);
}
[data-theme="dark"] .card-title { color: var(--text-primary); }
[data-theme="dark"] .card-text { color: var(--text-secondary); }

/* Homepage sections */
[data-theme="dark"] .bg-gradient-to-b,
[data-theme="dark"] .bg-gradient-to-tr {
    background: var(--bg-secondary) !important;
}
[data-theme="dark"] .bg-sky-50 {
    background: var(--bg-card) !important;
}
[data-theme="dark"] .text-slate-500,
[data-theme="dark"] .text-slate-600,
[data-theme="dark"] .text-slate-700 {
    color: var(--text-secondary) !important;
}
[data-theme="dark"] .text-sky-800 {
    color: #38bdf8 !important;
}

/* Sections with white/light backgrounds */
[data-theme="dark"] section {
    color: var(--text-primary);
}
[data-theme="dark"] .bg-white\/70,
[data-theme="dark"] .bg-white {
    background: var(--bg-card) !important;
}

/* Trust badges */
[data-theme="dark"] .trust-marquee::before {
    background: linear-gradient(to right, var(--bg-secondary), transparent);
}
[data-theme="dark"] .trust-marquee::after {
    background: linear-gradient(to left, var(--bg-secondary), transparent);
}

/* Forms */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

/* Modals */
[data-theme="dark"] .bg-white {
    background: var(--bg-card) !important;
}

/* Theme toggle button */
#theme-toggle {
    transition: background-color 0.2s ease;
}
[data-theme="dark"] #theme-toggle:hover {
    background: #334155;
}
