/* ===============================
   Fluxen Shield Domy Dochodowe
   Nature_Organic UI — style.css
   Mobile-first, flexbox-only
   =============================== */

/* -------- Reset & Base Normalize -------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { padding-left: 1.2rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font: inherit; }

/* -------- Design Tokens (Nature Organic) -------- */
:root {
  --color-primary: #1E2A38; /* brand primary: deep slate */
  --color-forest: #2F6B4F;  /* brand secondary: forest green */
  --color-accent: #F5F7FA;  /* brand accent: light */
  --color-earth-cream: #EDE7DB; /* natural sand */
  --color-earth-linen: #EFEAE1; /* light linen */
  --color-clay: #B88463; /* warm clay for subtle accents */
  --color-ink: #1B1F23; /* near black for text */
  --color-muted: #6B746E; /* muted olive gray */
  --color-border: #DADFD9; /* soft border */
  --focus: #3F8F69; /* focus green */

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --radius-pill: 999px;

  --shadow-1: 0 2px 8px rgba(30,42,56,0.08);
  --shadow-2: 0 6px 18px rgba(30,42,56,0.12);

  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-60: 60px;
}

/* -------- Base Typography & Body -------- */
body {
  font-family: Arial, Helvetica, sans-serif; /* brand body */
  color: #243026; /* deep natural text */
  background: var(--color-earth-linen);
  line-height: 1.6;
}

h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; color: var(--color-primary); line-height: 1.2; }
h1 { font-size: 32px; margin-bottom: var(--space-16); }
h2 { font-size: 24px; margin-bottom: var(--space-16); }
h3 { font-size: 18px; margin-bottom: var(--space-8); }
p, li { font-size: 16px; color: #2E352F; }
small, .meta { font-size: 14px; color: var(--color-muted); }

strong { color: var(--color-primary); font-weight: 700; }

/* Accessible focus */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

/* -------- Containers & Sections -------- */
/* MANDATORY: class-based spacing pattern */
.section { margin-bottom: 60px; padding: 40px 20px; }

/* Apply same spacing to semantic section elements to match HTML */
section { margin-bottom: 60px; padding: 40px 20px; background: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow-1); position: relative; }

/* Organic, subtle leaf edge accent using solid strip */
section::after {
  content: "";
  position: absolute;
  right: 16px; top: 16px; width: 56px; height: 12px;
  background: var(--color-forest);
  border-radius: 6px 10px 6px 10px;
  opacity: 0.1;
}

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 14px; display: flex; flex-direction: column; gap: var(--space-20); }
.content-wrapper { display: flex; flex-direction: column; gap: var(--space-20); }

/* Generic utility flex systems (Flexbox only) */
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--color-accent); border: 1px solid var(--color-border); border-radius: var(--radius-m); padding: var(--space-20); box-shadow: var(--shadow-1); transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }

/* Text + Image pattern */
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.text-image-section > * { flex: 1 1 280px; }

/* Feature item pattern */
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; padding: var(--space-20); border-radius: var(--radius-m); background: #fff; box-shadow: var(--shadow-1); border: 1px solid var(--color-border); }

/* Testimonial card (readable: dark on light) */
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; background: var(--color-earth-cream); border: 1px solid var(--color-border); border-left: 6px solid var(--color-forest); border-radius: var(--radius-m); box-shadow: var(--shadow-1); }
.testimonial-card blockquote { font-style: italic; color: #2B342E; }
.testimonial-card > div { color: var(--color-primary); font-weight: 600; }

.rating-summary { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; background: #fff; padding: var(--space-12) var(--space-16); border: 1px solid var(--color-border); border-radius: var(--radius-pill); box-shadow: var(--shadow-1); color: var(--color-primary); }
.rating-summary span { padding: 4px 10px; border-radius: var(--radius-pill); background: var(--color-accent); }

/* Lists with organic bullets */
ul { list-style: none; padding-left: 0; }
ul li { position: relative; padding-left: 28px; }
ul li::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 40% 60% 50% 50% / 50% 40% 60% 50%; background: var(--color-forest); margin-right: 10px; position: absolute; left: 0; top: 9px; opacity: 0.9; }
ol { padding-left: 20px; }

/* -------- Header & Navigation -------- */
header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: saturate(120%) blur(6px); box-shadow: 0 1px 8px rgba(0,0,0,0.06); }
header .container { flex-direction: row; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; gap: var(--space-16); }
header img { height: 34px; width: auto; }
header nav { display: none; align-items: center; gap: var(--space-16); }
header nav a { color: var(--color-primary); padding: 8px 10px; border-radius: var(--radius-s); transition: background-color .2s ease, color .2s ease; }
header nav a:hover { background: var(--color-accent); color: var(--color-forest); }

/* CTA button (organic pill) */
.cta-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; background: var(--color-forest); color: #fff; border-radius: var(--radius-pill); box-shadow: var(--shadow-1); transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.cta-button:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); background: #2B5D45; }
.cta-button:active { transform: translateY(0); box-shadow: var(--shadow-1); }
.cta-button.secondary { background: transparent; color: var(--color-forest); border: 2px solid var(--color-forest); }
.cta-button.secondary:hover { background: var(--color-forest); color: #fff; }

/* Appointment link visual */
.appointment-link { color: var(--color-forest); border-bottom: 2px solid rgba(47,107,79,0.25); padding-bottom: 2px; }
.appointment-link:hover { border-bottom-color: var(--color-forest); }

/* Mobile menu controls */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--color-forest); color: #fff; box-shadow: var(--shadow-1); }
.mobile-menu-toggle:hover { background: #2B5D45; }

.mobile-menu { position: fixed; top: 0; right: 0; bottom: 0; width: 86%; max-width: 360px; background: #fff; box-shadow: -8px 0 18px rgba(0,0,0,0.15); transform: translateX(100%); transition: transform .35s ease; z-index: 1100; display: flex; flex-direction: column; }
.mobile-menu.open, body.menu-open .mobile-menu { transform: translateX(0); }

.mobile-menu-close { align-self: flex-end; margin: 12px; width: 40px; height: 40px; border-radius: 10px; background: var(--color-accent); color: var(--color-primary); }
.mobile-nav { display: flex; flex-direction: column; gap: 12px; padding: 10px 20px 24px; overflow-y: auto; }
.mobile-nav a { padding: 12px 10px; border-radius: var(--radius-s); color: var(--color-primary); background: #fff; border: 1px solid var(--color-border); }
.mobile-nav a:hover { background: var(--color-accent); color: var(--color-forest); }

/* Optional overlay via body state */
body.menu-open::before { content: ""; position: fixed; inset: 0; background: rgba(27,31,35,0.45); z-index: 1090; }
body.menu-open { overflow: hidden; }

/* Desktop nav visible */
@media (min-width: 992px) {
  header nav { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* -------- Hero & Common Blocks -------- */
/* First section as hero: light organic surface */
main > section:first-of-type { background: var(--color-accent); border: 1px solid var(--color-border); }
main > section:first-of-type h1 { font-size: 32px; }

.assurance-bullets, .key-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.assurance-bullets li, .key-badges span { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-pill); padding: 8px 12px; color: var(--color-primary); box-shadow: var(--shadow-1); }

.kpi-counters { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.kpi-counters > div { flex: 1 1 140px; padding: 16px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-m); box-shadow: var(--shadow-1); color: var(--color-primary); display: flex; flex-direction: column; align-items: center; text-align: center; }
.kpi-counters strong { font-size: 24px; color: var(--color-forest); }

.value-props, .offer-types-cards, .case-study-cards, .core-competencies { display: flex; flex-wrap: wrap; gap: 20px; }
.value-props > div, .offer-types-cards > div, .case-study-cards > div, .core-competencies > div { flex: 1 1 260px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-l); padding: var(--space-20); box-shadow: var(--shadow-1); transition: transform .25s ease, box-shadow .25s ease; }
.value-props > div:hover, .offer-types-cards > div:hover, .case-study-cards > div:hover, .core-competencies > div:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }

/* Contact clusters with icons */
.content-wrapper > div img[alt^="Telefon"],
.content-wrapper > div img[alt^="Email"],
.content-wrapper > div img[alt^="Adres"],
.content-wrapper > div img[alt^="Godziny"],
.content-wrapper > div img[alt^="Rezerwacja"] { display: inline-block; width: 18px; height: 18px; margin-right: 6px; vertical-align: middle; }

/* Map placeholder */
.map-embed { display: flex; align-items: center; justify-content: center; min-height: 200px; background: var(--color-accent); border: 1px dashed var(--color-border); border-radius: var(--radius-m); color: var(--color-muted); }

/* Tables (responsive-friendly within container) */
.content-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-m); overflow: hidden; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-earth-cream); color: var(--color-primary); font-weight: 700; }
tr:nth-child(even) td { background: var(--color-accent); }

/* Labels & checkboxes */
label { display: flex; align-items: center; gap: 10px; color: var(--color-primary); }
input[type="checkbox"] { width: 18px; height: 18px; border: 2px solid var(--color-forest); border-radius: 6px; appearance: none; background: #fff; position: relative; }
input[type="checkbox"]:checked { background: var(--color-forest); border-color: var(--color-forest); }
input[type="checkbox"]:checked::after { content: ""; position: absolute; left: 5px; top: 1px; width: 4px; height: 8px; border: 2px solid #fff; border-top: 0; border-left: 0; transform: rotate(45deg); }
input[disabled] { opacity: .7; cursor: not-allowed; }

/* Links */
a { color: var(--color-forest); }
a:hover { color: #265840; }

/* -------- Footer -------- */
footer { background: var(--color-primary); color: #E9EFF3; border-top-left-radius: 24px; border-top-right-radius: 24px; margin-top: 40px; }
footer .container { padding-top: 28px; padding-bottom: 28px; }
footer .content-wrapper { display: flex; flex-wrap: wrap; gap: 20px; }
footer nav { display: flex; flex-wrap: wrap; gap: 12px; }
footer nav a { color: #E9EFF3; padding: 6px 10px; border-radius: var(--radius-s); background: rgba(255,255,255,0.04); }
footer nav a:hover { background: rgba(255,255,255,0.12); }
.company-contact-snippet { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,0.05); padding: 12px 16px; border-radius: var(--radius-m); }
.company-contact-snippet img { width: 28px; height: 28px; }
.social-links { display: flex; gap: 10px; }
.social-links a { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(255,255,255,0.08); }
.social-links a:hover { background: rgba(255,255,255,0.16); }
.legal-disclaimer { width: 100%; font-size: 14px; color: #CFE0E8; opacity: 0.9; }

/* -------- Cookie Consent Banner -------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 14px; padding: 16px 16px 18px; background: #fff; border-top: 1px solid var(--color-border); box-shadow: 0 -4px 18px rgba(0,0,0,0.08); transform: translateY(100%); transition: transform .35s ease; z-index: 1200; }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-text { color: var(--color-primary); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-btn { padding: 10px 14px; border-radius: var(--radius-pill); border: 2px solid transparent; }
.cookie-btn.accept { background: var(--color-forest); color: #fff; }
.cookie-btn.reject { background: #fff; color: var(--color-primary); border-color: var(--color-border); }
.cookie-btn.settings { background: var(--color-accent); color: var(--color-primary); }
.cookie-btn:hover { filter: brightness(0.98); }

/* Cookie Modal */
.cookie-modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 1300; }
.cookie-modal.show { display: flex; }
.cookie-modal::before { content: ""; position: absolute; inset: 0; background: rgba(27,31,35,0.5); }
.cookie-modal-content { position: relative; background: #fff; border-radius: var(--radius-l); border: 1px solid var(--color-border); box-shadow: var(--shadow-2); padding: 20px; width: 92%; max-width: 560px; display: flex; flex-direction: column; gap: 14px; z-index: 1; }
.cookie-modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-categories { display: flex; flex-direction: column; gap: 12px; }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-m); background: var(--color-accent); }
.cookie-row .always { font-size: 14px; color: var(--color-muted); }

/* Simple toggle */
.toggle { width: 46px; height: 26px; background: #D0D7D3; border-radius: 26px; position: relative; transition: background .2s ease; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-1); transition: transform .2s ease; }
.toggle.on { background: var(--color-forest); }
.toggle.on::after { transform: translateX(20px); }

/* -------- Responsive Rules -------- */
@media (min-width: 600px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .kpi-counters > div { padding: 18px 20px; }
}

@media (min-width: 992px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  section { padding: 48px 32px; }
  .container { gap: var(--space-24); }

  /* Arrange footer columns nicely with flex only */
  footer .content-wrapper { flex-direction: row; align-items: flex-start; }
  footer nav { flex: 2 1 320px; }
  .company-contact-snippet { flex: 2 1 320px; }
  .social-links { flex: 1 1 160px; justify-content: flex-end; }
}

/* -------- Page-specific Enhancements -------- */
/* Index highlights */
.value-props > div h3 { color: var(--color-forest); }

/* Offer page badges */
.key-badges span { background: var(--color-earth-cream); color: var(--color-primary); border-color: #e3dbce; }

/* Projects tables spacing */
.case-study-cards > div h3 { color: var(--color-forest); }

/* Model page: emphasize steps */
ol li { margin-bottom: 8px; }

/* Results KPI emphasis */
.kpi-counters > div strong { color: var(--color-forest); }

/* About page competencies */
.core-competencies > div { background: var(--color-accent); border-style: dashed; }

/* Contact page blocks */
.content-wrapper > div strong { color: var(--color-primary); }

/* Thank-you page */
main a.cta-button { align-self: flex-start; }

/* -------- Helper Classes (optional) -------- */
.badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-primary); border: 1px solid var(--color-border); }
.muted { color: var(--color-muted); }

/* -------- Ensure Flex-only Layouts for common groups -------- */
/* Many sections already defined above, ensure all multi-item wrappers are flex */
.content-wrapper > nav { display: flex; flex-wrap: wrap; gap: 12px; }

/* -------- Print basics -------- */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  section { box-shadow: none; background: #fff; }
}
