/* =========================
   CSS RESET & NORMALISE
   ========================= */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1;
}
ol, ul {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
  border: 0;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  outline: none;
  box-sizing: border-box;
}

/* =========================
   CSS CUSTOM PROPERTIES
   ========================= */
:root {
  --color-primary: #1A365D;         /* Deep blue (brand) */
  --color-secondary: #60A5FA;       /* Blue Accent (brand) */
  --color-accent: #F1F5F9;          /* Soft light gray (brand) */
  --color-green: #4A9159;           /* Organic green accent */
  --color-earth: #A6906D;           /* Earth tone (brown-beige) */
  --color-background: #F8FAF3;      /* Very light warm organic background */
  --color-sand: #ECE5CE;            /* Subtle sand-beige accent */
  --color-panel: #FFFFFF;
  --color-border: #E3E2DF;
  --color-text: #26341A;            /* Clean, deep dark greenish text */
  --color-muted: #66745D;
  --color-shadow: rgba(74,145,89,0.10); /* Subtle green shadow */
  --radius-soft: 18px;
  --radius-medium: 32px;
  --shadow-soft: 0 4px 16px var(--color-shadow);
  --font-display: 'Montserrat', Arial, sans-serif;
  --font-body: 'Roboto', Arial, sans-serif;
  --transition: 0.25s cubic-bezier(.43,.17,.43,1);
  --spacing-xs: 8px;
  --spacing-s: 16px;
  --spacing-m: 24px;
  --spacing-l: 32px;
  --spacing-xl: 48px;
}

@media (max-width: 480px) {
  :root {
    --spacing-xs: 6px;
    --spacing-s: 12px;
    --spacing-m: 16px;
    --spacing-l: 22px;
    --spacing-xl: 32px;
  }
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-background);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

/* =========================
   HEADINGS & TYPOGRAPHY
   ========================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--color-primary);
  margin-bottom: var(--spacing-s);
}
h1 {
  font-size: 2.5rem;
  line-height: 1.1;
  margin-bottom: var(--spacing-m);
}
h2 {
  font-size: 2rem;
  line-height: 1.15;
  margin-bottom: var(--spacing-m);
}
h3 {
  font-size: 1.25rem;
}
p, ul, ol {
  margin-bottom: var(--spacing-s);
  font-size: 1rem;
}
ul li, ol li {
  margin-bottom: 8px;
  padding-left: 0.5em;
}
ul li:last-child, ol li:last-child {
  margin-bottom: 0;
}
strong {
  font-weight: 600;
}
.text-section ul,
.text-section ol {
  padding-left: 1em;
  margin-bottom: var(--spacing-m);
}

/* Hierarchy classes */
.text-section {
  max-width: 700px;
}
.text-section h1, .text-section h2, .text-section h3, .text-section h4 {
  color: var(--color-green);
}

/* =========================
   LINKS & BUTTONS
   ========================= */
a {
  transition: color var(--transition);
  cursor: pointer;
}
a.cta-primary, .cta-primary {
  display: inline-block;
  border-radius: var(--radius-soft);
  background: var(--color-green);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  padding: 0.75em 2.25em;
  margin-top: var(--spacing-s);
  box-shadow: 0 2px 8px var(--color-shadow);
  border: none;
  outline: none;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  letter-spacing: 0.5px;
}
a.cta-primary:hover, .cta-primary:hover,
a.cta-primary:focus, .cta-primary:focus {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 24px var(--color-shadow);
}
a.cta-secondary, .cta-secondary {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-green);
  border: 2px solid var(--color-green);
  border-radius: var(--radius-soft);
  padding: 0.65em 2em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-top: var(--spacing-s);
  box-shadow: 0 2px 8px var(--color-shadow);
  transition: color var(--transition), background var(--transition), box-shadow var(--transition), border var(--transition), transform var(--transition);
}
a.cta-secondary:hover,
a.cta-secondary:focus, .cta-secondary:focus {
  background: var(--color-green);
  color: #fff;
  border-color: var(--color-green);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px var(--color-shadow);
}

/* ===============================
   LAYOUT: CONTAINER & SECTION
   =============================== */
.container {
  width: 100%;
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--spacing-s);
  padding-right: var(--spacing-s);
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: transparent;
  border-radius: var(--radius-medium);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  align-items: flex-start;
}

/* Responsive for section paddings */
@media (max-width: 900px) {
  .section {
    padding: 24px 6px;
  }
  .container {
    padding: 0 8px;
  }
}
@media (max-width: 480px) {
  .section {
    padding: 12px 0;
    margin-bottom: 38px;
    border-radius: var(--radius-soft);
  }
}

/* ======================
   NAVIGATION & HEADER
   ====================== */
header {
  background: #fff;
  position: relative;
  box-shadow: 0 2px 12px rgba(42,70,43,0.08);
  z-index: 100;
}
header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  padding: var(--spacing-m) 0;
}
header nav a {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-primary);
  padding: 6px 10px;
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
  position: relative;
}
header nav a:hover, header nav a:focus {
  background: var(--color-green);
  color: #fff;
}
header nav img {
  height: 36px;
  margin-right: 24px;
}

.mobile-menu-toggle {
  display: none;
  position: absolute;
  right: 16px;
  top: 22px;
  font-size: 2.1rem;
  background: none;
  color: var(--color-green);
  border: none;
  border-radius: 12px;
  width: 46px; height: 46px;
  cursor: pointer;
  z-index: 101;
  transition: background var(--transition);
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--color-sand);
}

/* Responsive Nav */
@media (max-width: 950px) {
  header nav {
    flex-wrap: wrap;
    gap: 12px;
    padding: var(--spacing-s) 0;
  }
  header nav img {
    margin-right: 12px;
    height: 28px;
  }
}
@media (max-width: 800px) {
  header nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}

/* Mobile NAVIGATION MENU / OVERLAY */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(233,241,226,0.97);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(.86,.01,.43,.95);
  width: 100vw;
  height: 100vh;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  background: var(--color-green);
  color: #fff;
  border: none;
  font-size: 2rem;
  border-radius: 50%;
  padding: 8px 18px 8px 16px;
  margin: 22px 0 28px 22px;
  cursor: pointer;
  transition: background var(--transition);
  align-self: flex-start;
  z-index: 10001;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--color-primary);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 6px 22px 0 32px;
  width: 100%;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-primary);
  padding: 12px 22px 12px 0;
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
  width: 100%;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-green);
  color: #fff;
}

@media (min-width: 801px) {
  .mobile-menu {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: none !important;
  }
}

/* ===========================
   MAIN FLEX LAYOUT COMPONENTS
   =========================== */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: flex-start;
  margin-bottom: var(--spacing-m);
}
.feature-grid > div {
  background: var(--color-panel);
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);
  flex: 1 1 calc(240px);
  min-width: 200px;
  max-width: 274px;
  padding: var(--spacing-m) var(--spacing-s);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature-grid > div:hover {
  box-shadow: 0 10px 38px rgba(74,145,89,0.17);
  transform: translateY(-4px) scale(1.04);
}
.feature-grid img {
  width: 42px;
  height: 42px;
  margin-bottom: 8px;
}

.service-list, .blog-listing {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
}
.service-highligth-box, .blog-listing article {
  background: var(--color-accent);
  border-radius: var(--radius-soft);
  box-shadow: 0 1px 8px rgba(74,145,89,0.10);
  padding: var(--spacing-m) var(--spacing-s);
  margin-bottom: 20px;
  flex: 1 1 calc(275px);
  min-width: 200px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--color-border);
}

@media (max-width: 1200px) {
  .feature-grid, .service-list, .blog-listing {
    gap: 18px;
  }
  .feature-grid > div, .service-highligth-box, .blog-listing article {
    max-width: 400px;
  }
}
@media (max-width: 900px) {
  .feature-grid > div, .service-highligth-box, .blog-listing article {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .feature-grid, .service-list, .blog-listing {
    gap: 14px;
    flex-direction: column;
  }
}

.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
}

/* PROJECTS on 'realizacje' */
.project-summary {
  background: var(--color-sand);
  border-radius: var(--radius-soft);
  box-shadow: 0 1px 6px rgba(166,144,109,0.10);
  padding: var(--spacing-s) var(--spacing-m);
  margin-bottom: 20px;
}

/* Testimonials */
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: #fdfdfb;
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
}
.testimonial-card p {
  color: var(--color-muted);
  font-size: 1.07em;
  font-style: italic;
  line-height: 1.7;
  font-weight: 500;
  letter-spacing: 0.09px;
}
.testimonial-card span, .testimonial-card strong {
  color: var(--color-green);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.2px;
}

@media (max-width: 600px) {
  .testimonial-card {
    padding: 14px;
    gap: 8px;
  }
  .project-summary {
    padding: var(--spacing-xs) var(--spacing-s);
  }
}

/* Lists with icons (contact sections) */
.content-wrapper ul li, .text-section ul li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 1rem;
  color: var(--color-text);
}
.content-wrapper ul li img {
  width: 22px; height: 22px;
}

/* =========================
   FOOTER
   ========================= */
footer {
  background: #fff;
  border-top: 1.5px solid var(--color-border);
  margin-top: 60px;
  padding: 22px 0 8px 0;
}
footer .content-wrapper {
  display: flex;
  flex-direction: row;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
footer nav {
  display: flex;
  flex-direction: row;
  gap: 18px;
  align-items: center;
}
footer nav a {
  font-family: var(--font-body);
  color: var(--color-green);
  font-size: 0.98rem;
  padding: 5px 8px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
footer nav a:hover, footer nav a:focus {
  background: var(--color-sand);
  color: var(--color-primary);
}
footer img {
  height: 30px;
  margin-right: 18px;
}
footer p {
  font-size: 0.94rem;
  color: var(--color-muted);
  margin: 0;
}
@media (max-width: 800px) {
  footer .content-wrapper {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
  }
  footer nav {
    flex-wrap: wrap;
    gap: 10px;
  }
}


/* ==================================================
   CARDS, FLEX PATTERNS, AND GENERIC FLEX CONTAINERS
   ================================================== */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  min-width: 200px;
  max-width: 340px;
  border-radius: var(--radius-soft);
  background: var(--color-panel);
  box-shadow: var(--shadow-soft);
  padding: var(--spacing-m);
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

@media (max-width: 960px) {
  .card-container, .content-grid {
    gap: 14px;
    flex-direction: column;
  }
  .card {
    max-width: 100%;
  }
}

/* ==================================
   SPACING & GAPS BETWEEN ALL CARDS
   ================================== */
.card, .service-highligth-box, .blog-listing article, .testimonial-card, .project-summary, .feature-grid > div {
  margin-bottom: 20px;
}
.section > .container > .content-wrapper > * {
  margin-bottom: 20px;
}

/* =========================
   FORMS & INPUTS (if any)
   ========================= */
input, textarea, select {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-panel);
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 12px;
  min-width: 150px;
  max-width: 100%;
  transition: border-color var(--transition);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-green);
  outline: none;
}
button, .btn {
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

/* =========================
   MICRO-ANIMATIONS & HOVER
   ========================= */
.card:hover, .service-highligth-box:hover, .blog-listing article:hover {
  box-shadow: 0 8px 30px rgba(74,145,89,0.13);
  transform: translateY(-2px) scale(1.02);
}

/* =========================
   ORGANIC & NATURE STYLES
   =========================*/
.section {
  background: var(--color-sand);
  border-radius: var(--radius-medium);
  box-shadow: 0 2px 18px 2px rgba(46,84,24,0.045);
}
.feature-grid > div {
  border-left: 7px solid var(--color-green);
}
.service-highligth-box, .project-summary, .testimonial-card {
  border-left: 7px solid var(--color-earth);
}
.testimonial-card {
  background: #fcfff7;
}

/* Decorative organic shape for hero (optional, only as pseudo-element) */
.text-section {
  position: relative;
}
.text-section::before {
  content: '';
  display: block;
  position: absolute;
  left: -40px; top: -38px;
  width: 100px; height: 68px;
  border-radius: 80% 60% 60% 80%/60% 80% 80% 60%;
  background: var(--color-green);
  opacity: .09;
  z-index: 0;
  pointer-events: none;
}
@media (max-width: 700px) {
  .text-section::before {
    display: none;
  }
}
.text-section > * {
  position: relative;
  z-index: 1;
}

/* =========================
   RESPONSIVENESS
   =========================*/
@media (max-width: 700px) {
  body {
    font-size: 15px;
  }
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.3rem;
  }
}

@media (max-width: 500px) {
  h1 {
    font-size: 1.45rem;
  }
  h2 {
    font-size: 1.1rem;
  }
}

/* =========================
   COOKIE CONSENT BANNER
   =========================*/
.cookie-banner {
  position: fixed;
  left: 12px;
  bottom: 12px;
  right: 12px;
  z-index: 11000;
  background: #fffbe8;
  color: var(--color-text);
  border: 2px solid var(--color-sand);
  border-radius: var(--radius-soft);
  box-shadow: 0 4px 22px rgba(74,145,89,0.10);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  padding: 18px 28px;
  animation: fadeinBanner 0.7s ease;
  font-family: var(--font-body);
}
.cookie-banner p {
  flex: 1 1 auto;
  font-size: 1rem;
  color: var(--color-muted);
}
.cookie-banner .cookie-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cookie-btn {
  display: inline-block;
  border-radius: 8px;
  padding: 10px 20px;
  background: var(--color-green);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  margin-left: 0;
}
.cookie-btn:hover, .cookie-btn:focus {
  background: var(--color-primary);
  transform: translateY(-1px);
}
.cookie-btn.settings {
  background: var(--color-sand);
  color: var(--color-green);
  border: 1.5px solid var(--color-green);
}
.cookie-btn.settings:hover {
  background: var(--color-green);
  color: #fff;
}
@media (max-width: 700px) {
  .cookie-banner {
    flex-direction: column;
    gap: 10px;
    padding: 12px 8px;
    font-size: 0.97rem;
  }
  .cookie-banner .cookie-actions {
    width: 100%;
    gap: 7px;
  }
}

@keyframes fadeinBanner {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* COOKIE MODAL (FOR COOKIE SETTINGS) */
.cookie-modal-backdrop {
  position: fixed;
  top:0;left:0;right:0;bottom:0;
  background: rgba(46,54,27,0.15);
  z-index: 11001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeinBackdrop 0.2s ease;
}
@keyframes fadeinBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal {
  background: #fffbe8;
  border-radius: var(--radius-medium);
  box-shadow: 0 6px 42px rgba(74,145,89,0.17);
  border: 2px solid var(--color-sand);
  max-width: 410px;
  min-width: 260px;
  width: 95vw;
  padding: 32px 28px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  color: var(--color-text);
  z-index: 11002;
  animation: slideModalUp 0.35s cubic-bezier(.86,.01,.43,.95);
}
@keyframes slideModalUp {
  from {
    opacity: 0;
    transform: translateY(80px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.cookie-modal h2 {
  color: var(--color-green);
  font-size: 1.18rem;
  margin-bottom: 12px;
}
.cookie-modal .cookie-category {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-height: 38px;
  margin-bottom: 10px;
}
.cookie-modal .cookie-category .cookie-switch {
  display: inline-flex;
  align-items: center;
  position: relative;
}
.cookie-switch input[type=checkbox] {
  width: 34px;
  height: 16px;
  appearance: none;
  background: var(--color-sand);
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  transition: background .14s;
  margin-right: 8px;
  position: relative;
}
.cookie-switch input[type=checkbox]:checked {
  background: var(--color-green);
}
.cookie-switch input[type=checkbox]::after {
  content: '';
  position: absolute;
  left:3px;top:3px;
  width:10px;height:10px;
  border-radius:50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: left .15s;
  z-index: 1;
}
.cookie-switch input[type=checkbox]:checked::after {
  left: 21px;
}
.cookie-modal .cookie-info {
  font-size: 0.97rem;
  color: var(--color-muted);
  margin: 4px 0 0 0;
}
.cookie-modal .cookie-modal-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.cookie-modal .cookie-btn {
  min-width: 112px;
}

@media (max-width: 540px) {
  .cookie-modal {
    min-width: none;
    width: 98vw;
    padding: 18px 7px 15px 7px;
  }
  .cookie-modal-backdrop {
    align-items: flex-end;
    padding-bottom: 10vw;
  }
}

/* =========================
   SCROLLBARS & SELECT
   ========================= */
::-webkit-scrollbar {
  width: 8px;
  background: #F0F8F8;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb {
  background: var(--color-sand);
  border-radius: 8px;
}

/* =========================
   MISC ACCESSIBILITY (FOCUS)
   ========================= */
:focus-visible {
  outline: 2.5px solid var(--color-green);
  outline-offset: 1.5px;
}

/* =========================
   UTILS, HELPER CLASSES
   ========================= */
.hide-mobile { display: block; }
.hide-desktop { display: none; }
@media (max-width: 800px) {
  .hide-mobile { display: none !important; }
  .hide-desktop { display: block !important; }
}

/* Ensure all main content has min 20px gap */
.section > .container > .content-wrapper > * + * {
  margin-top: 20px;
}

/* =========================
   END OF CSS
   ========================= */
