
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Oswald:wght@400;500;600;700;800;900&display=swap');
:root {
    --color-primary: #dc2626;
    --color-hover: #ef4444;
    --color-accent: #fee2e2;
    --color-bg: #fef2f2;
    --font-main: 'Outfit', system-ui, sans-serif;
    --font-heading: 'Oswald', 'Outfit', system-ui, sans-serif;
    --border-radius: 16px;
    --card-radius: 0px;
    --shadow: 0 20px 40px -8px rgba(0,0,0,0.15);
}
body, html { font-family: var(--font-main) !important; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading) !important; }

/* Primary color overrides */
[class*="bg-[#2d5a27]"], [class*="bg-[#"], .bg-primary { background-color: var(--color-primary) !important; }
[class*="text-[#2d5a27]"], .text-primary { color: var(--color-primary) !important; }
[class*="border-[#2d5a27]"], .border-primary { border-color: var(--color-primary) !important; }
[class*="hover:bg-[#"]:hover { background-color: var(--color-hover) !important; }
[class*="hover:text-[#"]:hover { color: var(--color-hover) !important; }
.text-emerald-600, .text-green-600, .text-teal-600 { color: var(--color-primary) !important; }
.bg-emerald-600, .bg-green-600, .bg-teal-600 { background-color: var(--color-primary) !important; }
/* CONTRAST_GUARD_V1: захист контрасту.
   Модель часто пише секцію під темний фон (text-gray-300, text-white),
   а картки всередині світлі — виходить світле по світлому. Тут вирівнюємо. */

/* 1. Футер із власним тлом не чіпаємо взагалі */
footer:not([class*="bg-"]) { background-color: var(--color-bg) !important; }

/* 2. Світлий текст у світлій картці -> читабельний темний */
.bg-white [class*="text-white"], .bg-white [class*="text-gray-2"],
.bg-white [class*="text-gray-3"], .bg-white [class*="text-gray-4"],
.bg-white [class*="text-slate-3"], .bg-white [class*="text-slate-4"],
.bg-gray-50 [class*="text-white"], .bg-gray-50 [class*="text-gray-2"],
.bg-gray-50 [class*="text-gray-3"], .bg-gray-50 [class*="text-gray-4"],
.bg-gray-100 [class*="text-white"], .bg-gray-100 [class*="text-gray-2"],
.bg-gray-100 [class*="text-gray-3"], .bg-gray-100 [class*="text-gray-4"],
.bg-slate-50 [class*="text-white"], .bg-slate-50 [class*="text-gray-3"],
.bg-slate-50 [class*="text-gray-4"], .bg-blue-50 [class*="text-white"],
.bg-blue-50 [class*="text-gray-3"], .bg-sky-50 [class*="text-white"],
.bg-sky-50 [class*="text-gray-3"] { color: #374151 !important; }

/* 3. Темний текст у темній секції -> світлий */
[class*="bg-gray-8"] [class*="text-gray-7"], [class*="bg-gray-8"] [class*="text-gray-8"],
[class*="bg-gray-9"] [class*="text-gray-7"], [class*="bg-gray-9"] [class*="text-gray-8"],
[class*="bg-gray-9"] [class*="text-gray-9"], [class*="bg-slate-9"] [class*="text-gray-8"],
[class*="bg-slate-9"] [class*="text-gray-9"], [class*="bg-black"] [class*="text-gray-8"],
[class*="bg-black"] [class*="text-gray-9"] { color: #e5e7eb !important; }

/* 4. Світлий футер -> темний текст і посилання */
footer:not([class*="bg-"]) [class*="text-white"],
footer:not([class*="bg-"]) [class*="text-gray-2"],
footer:not([class*="bg-"]) [class*="text-gray-3"],
footer:not([class*="bg-"]) [class*="text-gray-4"],
footer:not([class*="bg-"]) a { color: #374151 !important; }
footer:not([class*="bg-"]) h1, footer:not([class*="bg-"]) h2,
footer:not([class*="bg-"]) h3, footer:not([class*="bg-"]) h4 { color: #111827 !important; }

/* 5. Темний футер -> світлий текст */
footer[class*="bg-gray-8"] h3, footer[class*="bg-gray-8"] h4,
footer[class*="bg-gray-9"] h3, footer[class*="bg-gray-9"] h4,
footer[class*="bg-slate-9"] h3, footer[class*="bg-slate-9"] h4,
footer[class*="bg-black"] h3, footer[class*="bg-black"] h4 { color: #ffffff !important; }
footer[class*="bg-gray-9"] a, footer[class*="bg-slate-9"] a,
footer[class*="bg-black"] a { color: #d1d5db; }
a.rounded-full, button.rounded-full, .btn { border-radius: var(--border-radius) !important; }
.rounded-lg, .rounded-xl, .rounded-2xl { border-radius: var(--card-radius) !important; }
/* v7.17.0 Bug D: long brand names truncate in header (Nutritionistguideinfo etc) */
header a[href*="index"] { min-width: 0; }
header a[href*="index"] > span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
@media (min-width: 1024px) { header a[href*="index"] > span { max-width: 280px; } }
/* v7.17.2 Bug AK-css: bg-white/light cards inside text-white dark sections — invisible text fix */
.bg-white, .bg-gray-50, .bg-gray-100 { color: #1f2937; }
