/* ================================
   Reset & Base (mobile-first)
   ================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding-left: 1.1em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: transparent; border: none; padding: 0; cursor: pointer; }
:focus { outline: 2px solid #2A9D8F; outline-offset: 2px; }

/* ================================
   Theme Tokens — Nature Organic + Brand
   ================================ */
:root {
  --brand-primary: #0F2A56; /* deep navy */
  --brand-secondary: #2A9D8F; /* teal-green */
  --brand-accent: #F7FAFF; /* light accent */

  --ink: #1E2320; /* dark text, earthy charcoal */
  --subtle-ink: #3B473E;
  --bg: #FAF8F3; /* warm light sand */
  --card: #FFFFFF; /* clean card base */
  --cream: #F2EDE4; /* natural cream */
  --leaf: #2F6E4E; /* forest green */
  --moss: #517A65; /* muted green */
  --clay: #5B4636; /* earth brown */
  --border: #E4DECF; /* sand line */
  --muted: #6C746F;
  --link: #2A9D8F;
  --warning: #C96F2D; /* terracotta hint */

  --radius-s: 10px;
  --radius-m: 14px;
  --radius-l: 22px;
  --shadow-s: 0 2px 8px rgba(24, 36, 24, 0.08);
  --shadow-m: 0 6px 20px rgba(24, 36, 24, 0.10);
  --shadow-l: 0 10px 28px rgba(24, 36, 24, 0.12);
}

/* ================================
   Typography
   ================================ */
body {
  font-family: Verdana, Geneva, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
h1, h2, h3 { font-family: 'Trebuchet MS', 'Segoe UI', Verdana, sans-serif; color: var(--brand-primary); margin: 0; line-height: 1.25; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
p { margin: 0; color: var(--subtle-ink); }
small { color: var(--muted); }

/* Link styles with accessible contrast */
a { color: var(--link); text-decoration: underline; text-decoration-color: rgba(42,157,143,0.35); text-underline-offset: 2px; }
a:hover { color: var(--leaf); text-decoration-color: var(--leaf); }

/* ================================
   Layout Primitives (Flex-only)
   ================================ */
.container {
  display: flex; /* layout container */
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.content-wrapper {
  display: flex; /* layout container */
  flex-direction: column;
  gap: 20px;
}
section { margin-bottom: 60px; padding: 0; }

/* Mandatory spacing classes */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-m); box-shadow: var(--shadow-s); }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: flex-start; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* ================================
   Header & Navigation
   ================================ */
header { position: sticky; top: 0; z-index: 1000; background: #FFFFFF; border-bottom: 1px solid var(--border); box-shadow: 0 1px 10px rgba(24,36,24,0.05); }
header .container { padding-top: 14px; padding-bottom: 14px; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.logo { display: flex; align-items: center; }
.logo img { height: 34px; width: auto; }

.main-nav { display: none; align-items: center; gap: 18px; }
.main-nav a { color: var(--ink); font-weight: 600; padding: 8px 10px; border-radius: 8px; transition: background-color .2s ease, color .2s ease; }
.main-nav a:hover { background: var(--cream); color: var(--leaf); }

.cta-group { display: none; align-items: center; gap: 10px; }

/* Mobile toggle */
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50px;
  color: #fff; background: var(--leaf);
  box-shadow: var(--shadow-s);
  transition: transform .2s ease, background-color .2s ease;
}
.mobile-menu-toggle:hover { transform: translateY(-1px); background: var(--moss); }

/* Mobile menu overlay and panel (Flex-only) */
.mobile-menu {
  position: fixed; inset: 0; /* top right bottom left */
  display: none; /* shown via .open */
  background: rgba(20, 28, 22, 0.4);
  z-index: 2000;
  align-items: stretch; justify-content: flex-end;
}
.mobile-menu.open { display: flex; }
.mobile-menu-close {
  position: absolute; top: 12px; right: 12px; /* decorative control */
  width: 40px; height: 40px; border-radius: 50%;
  background: #FFFFFF; color: var(--ink);
  box-shadow: var(--shadow-s);
}
.mobile-nav {
  display: flex; flex-direction: column; gap: 8px;
  width: 82vw; max-width: 360px; height: 100vh;
  background: #FFFFFF; border-left: 1px solid var(--border);
  padding: 70px 20px 24px 20px;
  transform: translateX(100%);
  transition: transform .35s ease;
}
.mobile-menu.open .mobile-nav { transform: translateX(0); }
.mobile-nav a { display: flex; padding: 14px 10px; font-weight: 600; color: var(--brand-primary); border-radius: 10px; }
.mobile-nav a:hover { background: var(--cream); color: var(--leaf); }

/* Desktop breakpoint for nav */
@media (min-width: 992px) {
  .main-nav { display: flex; }
  .cta-group { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* ================================
   Buttons
   ================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; flex-direction: row; gap: 8px;
  padding: 12px 18px; border-radius: 999px;
  border: 2px solid transparent; text-decoration: none;
  font-weight: 700; letter-spacing: 0.2px;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--brand-secondary); color: #FFFFFF; }
.btn-primary:hover { background: var(--leaf); box-shadow: var(--shadow-m); transform: translateY(-2px); color: #D9E5DE; }

.btn-secondary { background: #FFFFFF; color: var(--leaf); border-color: var(--leaf); }
.btn-secondary:hover { color: #FFFFFF; background: var(--leaf); box-shadow: var(--shadow-m); transform: translateY(-2px); }

/* Button grouping */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ================================
   Hero Sections — organic blocks
   ================================ */
.hero { background: #EEF5F0; border-bottom: 1px solid var(--border); }
.hero .container { padding-top: 40px; padding-bottom: 30px; }
.hero .content-wrapper { gap: 16px; }
.hero h1 { color: var(--leaf); }
.hero p { max-width: 70ch; }

/* Trust & accreditations in hero */
.trust { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.trust ul { display: flex; flex-direction: column; gap: 8px; }
.trust li { color: var(--subtle-ink); }
.accreditations { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--muted); }

/* ================================
   Text Sections as organic cards
   ================================ */
.text-section {
  display: flex; flex-direction: column; gap: 10px; /* layout */
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 18px 16px;
  box-shadow: var(--shadow-s);
}
.text-section h3 { color: var(--brand-primary); }
.text-section p, .text-section li { color: var(--subtle-ink); }
.text-section ul { display: flex; flex-direction: column; gap: 8px; }

/* ================================
   Lists & Content
   ================================ */
ul li { margin-bottom: 6px; }
ul li::marker { color: var(--leaf); }
ol { display: flex; flex-direction: column; gap: 6px; padding-left: 1.1em; }

/* Breadcrumbs */
nav[aria-label='okruszki'] p { font-size: 14px; color: var(--muted); }
nav[aria-label='okruszki'] a { color: var(--leaf); }

/* ================================
   Testimonials — high contrast on light bg
   ================================ */
.testimonial-card {
  background: #FFFEFA; /* very light warm */
  border: 1px solid var(--border);
  border-left: 6px solid var(--leaf);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-s);
}
.testimonial-card p { color: var(--ink); }
.testimonial-card strong { color: var(--brand-primary); }

/* ================================
   Accents & Utilities
   ================================ */
.hr { height: 1px; background: var(--border); width: 100%; }
.muted { color: var(--muted); }

/* ================================
   Page-specific subtle tweaks
   ================================ */
/* Programy */
.hero nav[aria-label='okruszki'] p { margin-bottom: 4px; }

/* Footers */
footer { background: var(--brand-primary); color: #F5F5F2; border-top: 1px solid rgba(255,255,255,0.08); }
footer a { color: #E5F3EF; text-decoration: underline; text-underline-offset: 2px; }
footer a:hover { color: #AEE1D6; }
footer .content-wrapper { padding: 28px 0; }
footer .text-section { background: transparent; border: none; box-shadow: none; border-radius: 0; padding: 0; }
footer h3 { color: #FFFFFF; }
footer p { color: #E8ECEB; }

footer ul { display: flex; flex-direction: column; gap: 8px; padding-left: 1.1em; }

/* ================================
   Cookie Consent Banner & Modal (Flex-only)
   ================================ */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: none; /* toggled with .show */
  z-index: 2500;
  padding: 14px;
}
.cookie-banner.show { display: flex; }
.cookie-banner .cookie-inner {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  width: 100%; max-width: 1140px; margin: 0 auto; padding: 14px 16px;
  background: #FFFFFF; border: 1px solid var(--border); border-radius: var(--radius-l); box-shadow: var(--shadow-m);
}
.cookie-banner .text { display: flex; flex: 1 1 260px; min-width: 220px; color: var(--ink); }
.cookie-banner .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 999px; font-weight: 700; border: 2px solid transparent; }
.cookie-accept { background: var(--leaf); color: #fff; }
.cookie-accept:hover { background: var(--moss); }
.cookie-reject { background: #FFFFFF; color: var(--clay); border-color: var(--clay); }
.cookie-reject:hover { background: var(--clay); color: #fff; }
.cookie-settings { background: #FFFFFF; color: var(--leaf); border-color: var(--leaf); }
.cookie-settings:hover { background: var(--leaf); color: #fff; }

.cookie-modal {
  position: fixed; inset: 0; display: none; z-index: 3000; background: rgba(20, 28, 22, 0.5);
  align-items: center; justify-content: center; padding: 20px;
}
.cookie-modal.show { display: flex; }
.cookie-modal .modal-content {
  display: flex; flex-direction: column; gap: 16px;
  width: 100%; max-width: 720px; background: #FFFFFF; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-l);
  padding: 20px;
}
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.toggle-switch { width: 48px; height: 28px; border-radius: 28px; background: #D9E5DE; position: relative; transition: background-color .2s ease; }
.toggle-switch::before { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; box-shadow: var(--shadow-s); transition: transform .2s ease; }
.toggle-switch.on { background: var(--leaf); }
.toggle-switch.on::before { transform: translateX(20px); }
.cookie-modal .modal-footer { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ================================
   Forms (generic, in case of inputs later)
   ================================ */
input, select, textarea { width: 100%; padding: 12px 12px; border: 1px solid var(--border); border-radius: 10px; background: #FFFFFF; font: inherit; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(47,110,78,0.15); outline: none; }
label { font-weight: 600; color: var(--brand-primary); }

/* ================================
   Images & Icons inline alignment
   ================================ */
p img { display: inline-flex; vertical-align: middle; margin-right: 8px; }

/* ================================
   Cards (generic)
   ================================ */
.card { padding: 18px; }
.card > h3 { margin-bottom: 6px; }

/* ================================
   Responsive Rules
   ================================ */
/* Mobile-first defaults already column. */

@media (min-width: 576px) {
  h1 { font-size: 36px; }
  h2 { font-size: 26px; }
}

@media (min-width: 768px) {
  h1 { font-size: 42px; }
  h2 { font-size: 28px; }
  .text-image-section { flex-direction: row; align-items: center; }
  .hero .container { padding-top: 56px; padding-bottom: 42px; }
}

@media (min-width: 992px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
}

/* ================================
   Page body spacing inside sections
   ================================ */
main > section > .container > .content-wrapper { padding: 0; }

/* Provide generous spacing between blocks inside content-wrapper */
main .content-wrapper > * { margin: 0; }

/* ================================
   Additional Flex Utilities for layout consistency
   ================================ */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-20 { gap: 20px; }

/* ================================
   Accessibility & Selection
   ================================ */
::selection { background: rgba(42,157,143,0.25); }

/* ================================
   Ensure adequate spacing between all sections/cards
   ================================ */
main section .text-section + .text-section { margin-top: 10px; }
main section .testimonial-card + .testimonial-card { margin-top: 12px; }

/* ================================
   High-contrast requirement for testimonials & reviews
   ================================ */
section .testimonial-card, .testimonial-card p, .testimonial-card strong { color: #1D1F1E; }

/* ================================
   Header/Section Organic Accents (decorative only)
   ================================ */
.hero::after { content: ''; position: relative; display: block; height: 0; }
/* Decorative leaf tags can be added with pseudo elements on headings if needed (no absolute on content cards used). */
