/**
 * GRAFFITI-LOS Berlin — Subpages Dynamic Theme System
 * Vollständige Konsistenz zwischen Light- & Dark-Modus auf allen Leistungs-,
 * Ratgeber-, B2B- & Legal-Seiten.
 */

html {
    color-scheme: light;
}
html.dark {
    color-scheme: dark;
}

/* Smooth theme transitions across color schemes */
body, nav, section, header, footer, button, input, select, textarea, #mobile-menu-drawer {
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* ==========================================================================
   1. Canvas & Global Background in Dark Mode
   ========================================================================== */
html.dark body {
    background-color: #030712 !important; /* Cosmic Obsidian */
    color: #f8fafc !important;
}

html.dark main {
    background-color: #030712 !important;
}

html.dark .bg-surface,
html.dark .bg-background,
html.dark .bg-surface-variant,
html.dark .bg-surface-dim,
html.dark [class*="bg-surface"],
html.dark [class*="bg-background"] {
    background-color: #030712 !important;
}

/* ==========================================================================
   2. Atmospheric Gradients & Glows in Dark Mode
   ========================================================================== */
html.dark .from-surface {
    --tw-gradient-from: #030712 var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgba(3, 7, 18, 0) var(--tw-gradient-to-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
html.dark .via-surface\/80,
html.dark .via-surface\/90,
html.dark .via-surface\/70,
html.dark .via-surface\/60,
html.dark .via-surface\/50 {
    --tw-gradient-stops: var(--tw-gradient-from), #0b1329 var(--tw-gradient-via-position), var(--tw-gradient-to) !important;
}
html.dark .to-surface {
    --tw-gradient-to: #030712 var(--tw-gradient-to-position) !important;
}

/* Subdue light atmospheric wash in dark mode (prevent milky glare) */
html.dark .bg-gradient-to-b.via-cyan-100\/50,
html.dark [class*="via-cyan-100"],
html.dark [class*="to-sky-100"] {
    --tw-gradient-stops: var(--tw-gradient-from), rgba(6, 182, 212, 0.08) var(--tw-gradient-via-position), rgba(56, 189, 248, 0.04) !important;
}

/* ==========================================================================
   3. Cards & Glass Panels in Dark Mode
   ========================================================================== */
html.dark .bg-white,
html.dark .bg-white\/95,
html.dark .bg-white\/90,
html.dark .bg-white\/85,
html.dark .bg-white\/80,
html.dark .bg-white\/75,
html.dark .bg-white\/70,
html.dark .bg-white\/60,
html.dark .bg-white\/50,
html.dark .bg-white\/40,
html.dark .bg-white\/20,
html.dark .bg-white\/10,
html.dark [class*="bg-white/"] {
    background-color: rgba(15, 23, 42, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #f8fafc !important;
}

html.dark .bg-slate-50,
html.dark .bg-slate-50\/80,
html.dark .bg-slate-50\/70,
html.dark .bg-slate-50\/60,
html.dark [class*="bg-slate-50/"],
html.dark .bg-slate-100,
html.dark .bg-slate-100\/90,
html.dark .bg-slate-100\/80,
html.dark [class*="bg-slate-100/"] {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}

/* ==========================================================================
   4. Navbar, Mega Menu & Mobile Drawer
   ========================================================================== */
html.dark nav {
    background-color: rgba(15, 23, 42, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65), 0 0 30px rgba(6, 182, 212, 0.25) !important;
}
html.dark nav img[src*="logo.png"] {
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(6, 182, 212, 0.45)) !important;
}
html.dark nav a.text-primary,
html.dark nav a.text-on-surface {
    color: #f8fafc !important;
}
html.dark nav a.text-on-surface-variant {
    color: #94a3b8 !important;
}
html.dark nav a.text-on-surface-variant:hover,
html.dark nav a.text-primary:hover,
html.dark nav a.text-on-surface:hover {
    color: #38bdf8 !important;
}

html.dark #mobile-menu-toggle {
    background-color: rgba(30, 41, 59, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
}

/* Theme Toggle Button - Sonnensymbol im Dark Mode immer reinweiß */
html.dark [data-theme-toggle] {
    background-color: rgba(30, 41, 59, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
}
html.dark [data-theme-toggle] [data-theme-icon],
html.dark [data-theme-toggle] .material-symbols-outlined,
html.dark [data-theme-icon] {
    color: #ffffff !important;
}
html.dark [data-theme-toggle]:hover {
    border-color: #38bdf8 !important;
    color: #ffffff !important;
}
html.dark [data-theme-toggle]:hover [data-theme-icon] {
    color: #ffffff !important;
}

/* Mega Dropdown Menus in Dark Mode */
html.dark .group > div[class*="backdrop-blur-2xl"],
html.dark .group > div[class*="bg-white\/95"],
html.dark .group > div[class*="bg-white"] {
    background-color: rgba(15, 23, 42, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8) !important;
}
html.dark .group > div[class*="backdrop-blur-2xl"] a,
html.dark .group > div[class*="bg-white\/95"] a {
    color: #cbd5e1 !important;
}
html.dark .group > div[class*="backdrop-blur-2xl"] a:hover,
html.dark .group > div[class*="bg-white\/95"] a:hover {
    background-color: rgba(6, 182, 212, 0.15) !important;
    color: #38bdf8 !important;
}
html.dark .group > div[class*="backdrop-blur-2xl"] span.text-primary\/60,
html.dark .group > div[class*="bg-white\/95"] span.text-primary\/60 {
    color: #94a3b8 !important;
}

/* Mobile Drawer in Dark Mode */
html.dark #mobile-menu-drawer {
    background-color: rgba(15, 23, 42, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
}
html.dark #mobile-theme-bar {
    background-color: rgba(30, 41, 59, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}
html.dark #mobile-theme-title {
    color: #e2e8f0 !important;
}
html.dark .mobile-nav-link {
    color: #cbd5e1 !important;
}
html.dark .mobile-nav-link:hover {
    background-color: rgba(30, 41, 59, 0.8) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   5. Typography in Dark Mode
   ========================================================================== */
html.dark h1, html.dark h2, html.dark h3, html.dark h4, html.dark h5, html.dark h6 {
    color: #ffffff !important;
}
html.dark h1 span.bg-gradient-to-r,
html.dark h2 span.bg-gradient-to-r,
html.dark .text-transparent.bg-clip-text {
    background-image: linear-gradient(135deg, #38bdf8 0%, #22d3ee 45%, #c084fc 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    filter: drop-shadow(0 0 25px rgba(6, 182, 212, 0.35));
}
html.dark .text-on-surface,
html.dark .text-slate-900,
html.dark .text-slate-800,
html.dark .text-primary:not(button *):not(a[class*="from-"] *) {
    color: #f8fafc !important;
}
html.dark .text-on-surface-variant,
html.dark .text-slate-700,
html.dark .text-slate-600,
html.dark p:not(button *):not(a[class*="from-"] *) {
    color: #cbd5e1 !important;
}
html.dark .text-slate-500,
html.dark .text-slate-400 {
    color: #94a3b8 !important;
}
html.dark strong {
    color: #ffffff !important;
}

/* ==========================================================================
   6. Accent Badges, Pills & Color Variant Boxes
   ========================================================================== */
/* Cyan Badges & Containers */
html.dark .bg-cyan-50,
html.dark .bg-cyan-50\/40,
html.dark .bg-cyan-50\/50,
html.dark .bg-cyan-50\/60,
html.dark [class*="bg-cyan-50/"],
html.dark .bg-cyan-100,
html.dark .bg-cyan-100\/50,
html.dark .bg-cyan-100\/60,
html.dark .bg-cyan-100\/70,
html.dark .bg-cyan-100\/80,
html.dark [class*="bg-cyan-100/"] {
    background-color: rgba(6, 182, 212, 0.15) !important;
    border-color: rgba(6, 182, 212, 0.35) !important;
    color: #38bdf8 !important;
}
html.dark .text-cyan-950,
html.dark .text-cyan-900,
html.dark .text-cyan-800,
html.dark .text-cyan-700,
html.dark a.text-cyan-700,
html.dark a.text-cyan-800,
html.dark a.text-cyan-900 {
    color: #38bdf8 !important;
}
html.dark a.text-cyan-700:hover,
html.dark a.text-cyan-800:hover,
html.dark a.text-cyan-900:hover {
    color: #7dd3fc !important;
}

/* Purple Badges & Containers */
html.dark .bg-purple-50,
html.dark .bg-purple-50\/40,
html.dark .bg-purple-50\/50,
html.dark .bg-purple-50\/60,
html.dark .bg-purple-50\/70,
html.dark [class*="bg-purple-50/"],
html.dark .bg-purple-100,
html.dark .bg-purple-100\/80,
html.dark [class*="bg-purple-100/"] {
    background-color: rgba(88, 28, 135, 0.25) !important;
    border-color: rgba(168, 85, 247, 0.35) !important;
    color: #d8b4fe !important;
}
html.dark .text-purple-950,
html.dark .text-purple-900,
html.dark .text-purple-800,
html.dark .text-purple-700,
html.dark .text-purple-700\/80 {
    color: #d8b4fe !important;
}

/* Amber Badges & Containers */
html.dark .bg-amber-50,
html.dark .bg-amber-50\/50,
html.dark .bg-amber-50\/60,
html.dark .bg-amber-50\/70,
html.dark .bg-amber-50\/80,
html.dark [class*="bg-amber-50/"],
html.dark .bg-amber-100,
html.dark .bg-amber-100\/70,
html.dark .bg-amber-100\/80,
html.dark [class*="bg-amber-100/"] {
    background-color: rgba(120, 53, 15, 0.25) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
    color: #fcd34d !important;
}
html.dark .text-amber-950,
html.dark .text-amber-900,
html.dark .text-amber-800,
html.dark .text-amber-700,
html.dark .text-amber-700\/80 {
    color: #fcd34d !important;
}

/* Emerald Badges & Containers */
html.dark .bg-emerald-50,
html.dark .bg-emerald-50\/50,
html.dark [class*="bg-emerald-50/"],
html.dark .bg-emerald-100,
html.dark .bg-emerald-100\/80,
html.dark [class*="bg-emerald-100/"] {
    background-color: rgba(6, 95, 70, 0.25) !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
    color: #34d399 !important;
}
html.dark .text-emerald-950,
html.dark .text-emerald-900,
html.dark .text-emerald-800,
html.dark .text-emerald-700 {
    color: #34d399 !important;
}

/* Indigo Badges & Containers */
html.dark .bg-indigo-50,
html.dark [class*="bg-indigo-50/"],
html.dark .bg-indigo-100,
html.dark [class*="bg-indigo-100/"] {
    background-color: rgba(67, 56, 202, 0.25) !important;
    border-color: rgba(99, 102, 241, 0.35) !important;
    color: #a5b4fc !important;
}
html.dark .text-indigo-950,
html.dark .text-indigo-900,
html.dark .text-indigo-800,
html.dark .text-indigo-700 {
    color: #a5b4fc !important;
}

/* Step Badges & Circular Feature Icons */
html.dark .w-12.h-12.bg-cyan-50,
html.dark .w-10.h-10.bg-cyan-50,
html.dark .w-12.h-12.rounded-2xl.bg-cyan-50 {
    background-color: rgba(6, 182, 212, 0.2) !important;
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
    color: #38bdf8 !important;
}
html.dark .w-12.h-12.bg-indigo-50,
html.dark .w-10.h-10.bg-indigo-50 {
    background-color: rgba(99, 102, 241, 0.2) !important;
    border: 1px solid rgba(99, 102, 241, 0.35) !important;
    color: #818cf8 !important;
}
html.dark .w-12.h-12.bg-emerald-50,
html.dark .w-10.h-10.bg-emerald-50 {
    background-color: rgba(16, 185, 129, 0.2) !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    color: #34d399 !important;
}
html.dark .w-12.h-12.bg-amber-50,
html.dark .w-10.h-10.bg-amber-50 {
    background-color: rgba(245, 158, 11, 0.2) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    color: #fbbf24 !important;
}
html.dark .w-12.h-12.bg-purple-50,
html.dark .w-10.h-10.bg-purple-50 {
    background-color: rgba(168, 85, 247, 0.2) !important;
    border: 1px solid rgba(168, 85, 247, 0.35) !important;
    color: #c084fc !important;
}

/* ==========================================================================
   7. Photo Schnell-Einschätzung & Feature Highlight Cards (Screenshot 1 Fix)
   ========================================================================== */
html.dark .bg-cyan-50\/70,
html.dark [class*="bg-cyan-50/70"],
html.dark .bg-cyan-50\/80,
html.dark [class*="bg-cyan-50/80"] {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(10, 24, 44, 0.98) 100%) !important;
    border-color: rgba(6, 182, 212, 0.4) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5) !important;
}
html.dark .bg-cyan-50\/70 .w-12.h-12,
html.dark [class*="bg-cyan-50/70"] .w-12.h-12,
html.dark .bg-cyan-50\/80 .w-12.h-12,
html.dark [class*="bg-cyan-50/80"] .w-12.h-12 {
    background-color: rgba(6, 182, 212, 0.22) !important;
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
    color: #38bdf8 !important;
}
html.dark .bg-cyan-50\/70 h4,
html.dark [class*="bg-cyan-50/70"] h4,
html.dark .bg-cyan-50\/80 h4,
html.dark [class*="bg-cyan-50/80"] h4 {
    color: #ffffff !important;
}
html.dark .bg-cyan-50\/70 p,
html.dark [class*="bg-cyan-50/70"] p,
html.dark .bg-cyan-50\/80 p,
html.dark [class*="bg-cyan-50/80"] p {
    color: #cbd5e1 !important;
}
html.dark .bg-cyan-50\/70 a,
html.dark [class*="bg-cyan-50/70"] a,
html.dark .bg-cyan-50\/80 a,
html.dark [class*="bg-cyan-50/80"] a {
    color: #38bdf8 !important;
}
html.dark .bg-cyan-50\/70 a:hover,
html.dark [class*="bg-cyan-50/70"] a:hover,
html.dark .bg-cyan-50\/80 a:hover,
html.dark [class*="bg-cyan-50/80"] a:hover {
    color: #7dd3fc !important;
}

/* Cost Checklist Items in Dark Mode */
html.dark ul li.bg-white\/90 {
    background-color: rgba(15, 23, 42, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
}
html.dark ul li.bg-white\/90 span.material-symbols-outlined {
    color: #38bdf8 !important;
}

/* ==========================================================================
   7b. Substrat Deep Dive & Material Info Cards (Untergrund-Spezialwissen)
   ========================================================================== */
html.dark .bg-gradient-to-br.from-white,
html.dark [class*="bg-gradient-to-br"][class*="from-white"],
html.dark [class*="bg-gradient-to-br"][class*="via-cyan-50"],
html.dark [class*="bg-gradient-to-br"][class*="from-cyan-50"],
html.dark [class*="bg-gradient-to-br"][class*="via-white"],
html.dark [class*="bg-gradient-to-br"][class*="to-white"] {
    background-image: none !important;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(8, 16, 32, 0.98) 100%) !important;
    border-color: rgba(6, 182, 212, 0.35) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 35px rgba(6, 182, 212, 0.12) !important;
}

/* Header & Typography inside Material Deep Dive cards */
html.dark [class*="bg-gradient-to-br"][class*="from-white"] h2,
html.dark [class*="bg-gradient-to-br"][class*="from-cyan-50"] h2,
html.dark .bg-gradient-to-br.from-white h2,
html.dark [class*="bg-gradient-to-br"][class*="from-white"] h3,
html.dark [class*="bg-gradient-to-br"][class*="from-cyan-50"] h3 {
    color: #ffffff !important;
}

html.dark [class*="bg-gradient-to-br"][class*="from-white"] p,
html.dark [class*="bg-gradient-to-br"][class*="from-cyan-50"] p,
html.dark .bg-gradient-to-br.from-white p {
    color: #cbd5e1 !important;
}

html.dark [class*="bg-gradient-to-br"][class*="from-white"] span.text-cyan-700,
html.dark [class*="bg-gradient-to-br"][class*="from-cyan-50"] span.text-cyan-700,
html.dark .bg-gradient-to-br.from-white span.text-cyan-700 {
    color: #38bdf8 !important;
}

/* Icon Badge inside Material Deep Dive cards */
html.dark [class*="bg-gradient-to-br"][class*="from-white"] .w-12.h-12,
html.dark [class*="bg-gradient-to-br"][class*="from-cyan-50"] .w-12.h-12,
html.dark .w-12.h-12.bg-cyan-500\/10,
html.dark .bg-cyan-500\/10 {
    background-color: rgba(6, 182, 212, 0.2) !important;
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
    color: #38bdf8 !important;
}

/* Inner Bottom Bar inside Material Deep Dive cards */
html.dark [class*="bg-gradient-to-br"][class*="from-white"] .bg-white,
html.dark [class*="bg-gradient-to-br"][class*="from-cyan-50"] .bg-white,
html.dark .bg-gradient-to-br.from-white .bg-white {
    background-color: rgba(30, 41, 59, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

html.dark [class*="bg-gradient-to-br"][class*="from-white"] .bg-white span,
html.dark [class*="bg-gradient-to-br"][class*="from-cyan-50"] .bg-white span,
html.dark [class*="bg-gradient-to-br"][class*="from-white"] .bg-white div,
html.dark [class*="bg-gradient-to-br"][class*="from-cyan-50"] .bg-white div {
    color: #e2e8f0 !important;
}

html.dark [class*="bg-gradient-to-br"][class*="from-white"] .bg-white a,
html.dark [class*="bg-gradient-to-br"][class*="from-cyan-50"] .bg-white a,
html.dark [class*="bg-gradient-to-br"] a.text-cyan-700 {
    color: #38bdf8 !important;
}

html.dark [class*="bg-gradient-to-br"][class*="from-white"] .bg-white a:hover,
html.dark [class*="bg-gradient-to-br"][class*="from-cyan-50"] .bg-white a:hover,
html.dark [class*="bg-gradient-to-br"] a.text-cyan-700:hover {
    color: #7dd3fc !important;
}

/* ==========================================================================
   8. Inquiry Lead Forms & Trust Sidebar (Screenshot 2 Fix)
   ========================================================================== */
/* Trust Sidebar (.lg:col-span-5 in inquiry sections) */
html.dark .lg\:col-span-5.bg-cyan-50\/60,
html.dark .lg\:col-span-5[class*="bg-cyan-50"],
html.dark .lg\:col-span-5.bg-cyan-50,
html.dark div[class*="lg:col-span-5"][class*="bg-cyan-50"] {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(10, 18, 38, 0.98) 100%) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
}
html.dark .lg\:col-span-5 .w-10.h-10.rounded-xl,
html.dark div[class*="lg:col-span-5"] .w-10.h-10.rounded-xl {
    background-color: rgba(6, 182, 212, 0.2) !important;
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
    color: #38bdf8 !important;
}
html.dark .lg\:col-span-5 h4,
html.dark .lg\:col-span-5 .font-bold.text-slate-900,
html.dark .lg\:col-span-5 .text-slate-900,
html.dark div[class*="lg:col-span-5"] h4,
html.dark div[class*="lg:col-span-5"] .text-slate-900 {
    color: #ffffff !important;
}
html.dark .lg\:col-span-5 .text-slate-500,
html.dark .lg\:col-span-5 .text-slate-400,
html.dark div[class*="lg:col-span-5"] .text-slate-500,
html.dark div[class*="lg:col-span-5"] .text-slate-400 {
    color: #94a3b8 !important;
}
html.dark .lg\:col-span-5 .text-slate-700,
html.dark .lg\:col-span-5 ul li span,
html.dark div[class*="lg:col-span-5"] ul li span {
    color: #cbd5e1 !important;
}
html.dark .lg\:col-span-5 strong,
html.dark div[class*="lg:col-span-5"] strong {
    color: #ffffff !important;
}
html.dark .lg\:col-span-5 .border-cyan-200\/60,
html.dark .lg\:col-span-5 .border-cyan-100,
html.dark .lg\:col-span-5 .border-t,
html.dark div[class*="lg:col-span-5"] .border-t {
    border-color: rgba(255, 255, 255, 0.12) !important;
}
html.dark .lg\:col-span-5 a[href^="tel:"],
html.dark div[class*="lg:col-span-5"] a[href^="tel:"] {
    color: #38bdf8 !important;
}
html.dark .lg\:col-span-5 a[href^="tel:"]:hover,
html.dark div[class*="lg:col-span-5"] a[href^="tel:"]:hover {
    color: #7dd3fc !important;
}

/* B2B Benefits Sidebars (Gewerbe Amber & Hausverwaltungen Purple) */
html.dark .lg\:col-span-5[class*="from-amber-50"],
html.dark div[class*="lg:col-span-5"][class*="from-amber-50"] {
    background: linear-gradient(145deg, rgba(30, 20, 10, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
}
html.dark .lg\:col-span-5[class*="from-purple-50"],
html.dark div[class*="lg:col-span-5"][class*="from-purple-50"] {
    background: linear-gradient(145deg, rgba(25, 15, 38, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
    border-color: rgba(168, 85, 247, 0.3) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
}

/* Form Upload Dropzones */
html.dark .group\/upload,
html.dark [class*="group\/upload"],
html.dark div[class*="group/upload"] {
    background-color: rgba(15, 23, 42, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}
html.dark .group\/upload:hover,
html.dark [class*="group\/upload"]:hover,
html.dark div[class*="group/upload"]:hover {
    background-color: rgba(6, 182, 212, 0.12) !important;
    border-color: #38bdf8 !important;
}
html.dark .group\/upload .text-slate-800,
html.dark [class*="group\/upload"] .text-slate-800,
html.dark div[class*="group/upload"] .text-slate-800 {
    color: #ffffff !important;
}
html.dark .group\/upload .text-slate-400,
html.dark [class*="group\/upload"] .text-slate-400,
html.dark div[class*="group/upload"] .text-slate-400 {
    color: #94a3b8 !important;
}
html.dark .group\/upload .text-slate-500,
html.dark [class*="group\/upload"] .text-slate-500,
html.dark div[class*="group/upload"] .text-slate-500 {
    color: #cbd5e1 !important;
}

/* Form Inputs, Selects & Textareas */
html.dark input.bg-slate-50\/80,
html.dark select.bg-slate-50\/80,
html.dark input.bg-slate-50\/70,
html.dark select.bg-slate-50\/70,
html.dark input.bg-white,
html.dark select.bg-white,
html.dark textarea.bg-white,
html.dark select[class*="bg-slate-50"],
html.dark input[class*="bg-slate-50"],
html.dark input[type="text"],
html.dark input[type="email"],
html.dark input[type="tel"],
html.dark select,
html.dark textarea {
    background-color: rgba(15, 23, 42, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}
html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #94a3b8 !important;
}
html.dark label {
    color: #cbd5e1 !important;
}
html.dark input:focus,
html.dark select:focus,
html.dark textarea:focus {
    background-color: rgba(15, 23, 42, 1) !important;
    border-color: #38bdf8 !important;
}
html.dark select option {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

/* ==========================================================================
   9. Borders & Dividers
   ========================================================================== */
html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-200\/80,
html.dark .border-slate-300,
html.dark .border-white,
html.dark .border-white\/80,
html.dark .border-white\/90 {
    border-color: rgba(255, 255, 255, 0.12) !important;
}

/* ==========================================================================
   10. FAQs & Accordions
   ========================================================================== */
html.dark .faq-title {
    color: #f8fafc !important;
}
html.dark .faq-title:hover {
    color: #38bdf8 !important;
}
html.dark .faq-answer p {
    color: #cbd5e1 !important;
}
html.dark .divide-slate-100 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ==========================================================================
   11. Tables
   ========================================================================== */
html.dark table {
    background-color: rgba(15, 23, 42, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}
html.dark table th {
    background-color: rgba(30, 41, 59, 0.9) !important;
    color: #ffffff !important;
}
html.dark table td {
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}

/* ==========================================================================
   12. Footer Seamless Luxury Theme (Keine Trennlinie & einheitlicher Glow)
   ========================================================================== */
html.dark footer,
footer {
    background-color: #060913 !important;
}
html.dark footer [class*="border-b"][class*="pt-16"],
footer [class*="border-b"][class*="pt-16"] {
    border-bottom: none !important;
}

/* ==========================================================================
   13. Action Buttons & Gradient CTAs Preservation
   ========================================================================== */
button[class*="from-"],
button[class*="from-"] *,
a[class*="from-"],
a[class*="from-"] * {
    color: #ffffff !important;
}

/* ==========================================================================
   14. WCAG AA/AAA Light Mode Text Contrast Safeguard (Item A2)
   Upgrades low-contrast slate-400 (2.55:1) to slate-600 (7.58:1) on light surfaces
   while strictly preserving optimal 7.22:1 contrast in dark mode & dark containers.
   ========================================================================== */
html:not(.dark) .text-slate-400:not(footer *):not([class*="bg-slate-9"] *):not([class*="bg-slate-8"] *):not([class*="from-slate-9"] *):not([class*="from-primary"] *):not([class*="bg-primary"] *),
html.light .text-slate-400:not(footer *):not([class*="bg-slate-9"] *):not([class*="bg-slate-8"] *):not([class*="from-slate-9"] *):not([class*="from-primary"] *):not([class*="bg-primary"] *) {
    color: #475569 !important; /* slate-600: 7.58:1 contrast */
}

/* ==========================================================================
   15. Reduced Motion Accessibility (WCAG 2.2 AA SC 2.3.3) (Item A4)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    html {
        scroll-behavior: auto !important;
    }

    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .border-beam-track::before,
    .laser-particle-travel,
    .laser-beam-core,
    .btn-pulse-glow,
    [class*="animate-"] {
        animation: none !important;
    }
}

/* ==========================================================================
   16. Smooth FAQ Accordion Engine (Grid-based 60fps Fluid Transition)
   ========================================================================== */
.faq-item {
    transition: background-color 0.25s ease, border-color 0.25s ease;
}
.faq-question {
    user-select: none;
    cursor: pointer;
}
.faq-answer {
    display: grid !important;
    grid-template-rows: 0fr !important;
    transition: grid-template-rows 600ms cubic-bezier(0.25, 1, 0.3, 1) !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
}
.faq-item.is-open > .faq-answer,
.faq-item.is-open .faq-answer {
    grid-template-rows: 1fr !important;
    max-height: none !important;
}
.faq-answer > * {
    min-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    transform: translateY(-6px) !important;
    transition: opacity 450ms ease, transform 580ms cubic-bezier(0.25, 1, 0.3, 1) !important;
}
.faq-item.is-open > .faq-answer > *,
.faq-item.is-open .faq-answer > * {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
.faq-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 550ms cubic-bezier(0.25, 1, 0.3, 1), color 280ms ease !important;
    will-change: transform !important;
}
.faq-item.is-open .faq-icon {
    transform: rotate(180deg) !important;
}

/* FAQ Accordion Dark Mode Enhancements */
html.dark .faq-title {
    color: #f8fafc !important;
}
html.dark .faq-title:hover,
html.dark .faq-item:hover .faq-title,
html.dark .faq-item.is-open .faq-title {
    color: #38bdf8 !important;
}
html.dark .faq-answer p {
    color: #cbd5e1 !important;
}
html.dark .faq-icon {
    color: #38bdf8 !important;
}
html.dark .faq-item.border-b {
    border-color: rgba(255, 255, 255, 0.1) !important;
}


