/* =========================================================
   Tryb ciemny (dzień/noc) — nadpisania pod html.dark
   Domyślnie strona jest JASNA; ten plik działa tylko, gdy
   <html> ma klasę "dark" (ustawia ją przełącznik w nav).
   ========================================================= */

/* --- Tło i tekst bazowy --- */
html.dark body { background-color: #0b1120 !important; color: #cbd5e1 !important; }

/* --- Nav (glass) + menu mobilne --- */
html.dark .glass {
  background: rgba(15, 23, 42, 0.85) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
}
html.dark #mobile-menu { background-color: #0f172a !important; }
/* logo w nav na ciemnym → białe (jak w stopce) */
html.dark nav img[alt="EcoPartner"] { filter: brightness(0) invert(1); }

/* --- Powierzchnie / karty --- */
html.dark .bg-white { background-color: #1e293b !important; }
html.dark .bg-slate-50 { background-color: #1e293b !important; }
html.dark .bg-slate-100 { background-color: #334155 !important; }
/* bg-slate-900 na SEKCJACH/stopce zostaje #0f172a (lekko jaśniejsze od tła).
   Ale bg-slate-900 na PRZYCISKACH (a/button) znika na ciemnym → robimy je lime. */
html.dark a.bg-slate-900,
html.dark button.bg-slate-900 { background-color: #65a30d !important; color: #ffffff !important; }
html.dark a.bg-slate-900:hover,
html.dark button.bg-slate-900:hover { background-color: #4d7c0f !important; }

/* --- Tekst --- */
html.dark .text-slate-900 { color: #f1f5f9 !important; }
html.dark .text-slate-800 { color: #e2e8f0 !important; }
html.dark .text-slate-700 { color: #cbd5e1 !important; }
html.dark .text-slate-600 { color: #94a3b8 !important; }
html.dark .text-slate-500 { color: #94a3b8 !important; }
html.dark .text-slate-400 { color: #64748b !important; }
/* text-white zostaje (na ciemnych przyciskach/stopce) */

/* --- Obramowania --- */
html.dark .border-slate-200 { border-color: #334155 !important; }
html.dark .border-slate-300 { border-color: #475569 !important; }
html.dark .border-slate-100 { border-color: #1e293b !important; }

/* --- Hovery na jasnych tłach → ciemne --- */
html.dark .hover\:bg-slate-50:hover { background-color: #334155 !important; }
html.dark .hover\:border-slate-300:hover { border-color: #64748b !important; }

/* --- Lime akcenty: lekko rozjaśnione dla kontrastu na ciemnym --- */
html.dark .text-lime-700 { color: #a3e635 !important; }
html.dark .text-lime-600 { color: #a3e635 !important; }

/* --- Artykuły LeadOrbit (.article-body, .excerpt-box) --- */
html.dark .article-body h2 { color: #f1f5f9 !important; border-bottom-color: #334155 !important; }
html.dark .article-body h3 { color: #e2e8f0 !important; }
html.dark .article-body h4 { color: #cbd5e1 !important; }
html.dark .article-body p,
html.dark .article-body li { color: #cbd5e1 !important; }
html.dark .article-body strong,
html.dark .article-body b { color: #ffffff !important; }
html.dark .article-body a { color: #a3e635 !important; }
html.dark .article-body th { background: #1e293b !important; color: #a3e635 !important; border-color: #334155 !important; }
html.dark .article-body td { color: #cbd5e1 !important; border-color: #334155 !important; }
html.dark .article-body tr:nth-child(even) { background: rgba(255, 255, 255, 0.03) !important; }
html.dark .article-body blockquote { background: #1e293b !important; color: #94a3b8 !important; }
html.dark .article-body hr { border-top-color: #334155 !important; }
html.dark .excerpt-box {
  background: linear-gradient(135deg, rgba(132, 204, 22, 0.12), rgba(30, 41, 59, 0.7)) !important;
  border-color: rgba(132, 204, 22, 0.3) !important;
}
html.dark .excerpt-box p { color: #cbd5e1 !important; }

/* --- Przełącznik motywu (ikony słońce/księżyc) --- */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline-block; }
html.dark .theme-toggle .icon-sun { display: inline-block; }
html.dark .theme-toggle .icon-moon { display: none; }
