/* =====================
   CSS RESET & NORMALIZE
   ===================== */
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.5;
  background: #fff;
  color: #101010;
}
ol, ul {
  list-style: none;
}
a {
  background: transparent;
  color: inherit;
  text-decoration: none;
}
img {
  border: 0;
  max-width: 100%;
  display: block;
}
button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: 100%;
  margin: 0;
  border: none;
  background: none;
  color: inherit;
}
button {
  cursor: pointer;
}

/* =====================
   CSS VARIABLES
   ===================== */
:root {
  --black: #101010;
  --white: #fff;
  --gray-100: #f5f5f5;
  --gray-200: #ededed;
  --gray-300: #d2d2d2;
  --gray-400: #b0b0b0;
  --gray-700: #3b3b3b;
  --primary: #155A32;
  --accent: #21784C;
  --brand-secondary: #E8F5E9;
  --font-display: 'Montserrat', Arial, Helvetica, sans-serif;
  --font-body: 'Open Sans', Arial, Helvetica, sans-serif;
  --border-radius: 14px;
  --shadow-elevated: 0 2px 16px 0 rgba(16,16,16,0.07), 0 1.5px 8px 0 rgba(16,16,16,0.10);
  --transition: all 0.2s cubic-bezier(.43,.17,.29,.88);
}

/* =====================
   GLOBAL TYPOGRAPHY
   ===================== */
body {
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--white);
  color: var(--black);
  font-weight: 400;
}
:lang(pl) {
  font-family: var(--font-body);
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--black);
  font-weight: 700;
  line-height: 1.15;
}
h1 {
  font-size: 2.5rem;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}
h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  letter-spacing: -0.1px;
}
p, li, ul, ol, span {
  font-size: 1rem;
  color: var(--black);
}
p {
  margin-bottom: 18px;
  line-height: 1.7;
}
strong, b {
  font-weight: 600;
}

/* =====================
   CONTAINER SYSTEM
   ===================== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* =====================
   HEADER / NAVIGATION
   ===================== */
header {
  width: 100%;
  background: var(--white);
  border-bottom: 1.5px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 300;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  height: 78px;
}
header nav {
  display: flex;
  gap: 20px;
  align-items: center;
}
header nav a {
  padding: 8px 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--gray-700);
  font-weight: 500;
  position: relative;
  transition: color .16s;
}
header nav a:hover,
header nav a:focus {
  color: var(--black);
}
header .cta.primary {
  margin-left: 18px;
}
header img {
  height: 36px;
  width: auto;
  margin-right: 30px;
}

/* Hamburger */
.mobile-menu-toggle {
  background: none;
  display: flex;
  align-items: center;
  font-size: 2rem;
  color: var(--black);
  border-radius: var(--border-radius);
  border: none;
  padding: 7px 13px;
  margin-left: 16px;
  transition: background var(--transition);
}
.mobile-menu-toggle:hover {  
  background: var(--gray-100);
}

/* Hide navigation and show burger on mobile */
@media (max-width: 1024px) {
  header nav,
  header .cta.primary {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}
@media (min-width: 1025px) {
  .mobile-menu-toggle,
  .mobile-menu {
    display: none !important;
  }
}

/* MOBILE MENU OVERLAY */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255,255,255,0.95);
  z-index: 900;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  transform: translateX(100vw);
  transition: transform .32s cubic-bezier(.41,.12,.29,1.01);
  padding: 0;
  pointer-events: none;
  opacity: 0;
}
.mobile-menu.open {
  transform: translateX(0);
  pointer-events: auto;
  opacity: 1;
}
.mobile-menu-close {
  font-size: 2.2rem;
  color: var(--black);
  align-self: flex-end;
  background: none;
  border: none;
  margin: 28px 28px 0 0;
  cursor: pointer;
  transition: color var(--transition);
}
.mobile-menu-close:hover {
  color: var(--primary);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 40px 0 0 42px;
}
.mobile-nav a {
  color: var(--black);
  font-size: 1.25rem;
  font-family: var(--font-display);
  letter-spacing: -0.6px;
  font-weight: 700;
  padding: 10px 0;
  border-radius: var(--border-radius);
  transition: background var(--transition);
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  background: var(--gray-100);
  color: var(--primary);
}

/* =====================
   HERO / PAGE SECTIONS
   ===================== */
section {
  width: 100%;
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--white);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
section:last-child {
  margin-bottom: 0;
}
/* Responsive content-wrapper spacing */
@media (max-width: 600px) {
  section {
    padding: 28px 7px;
  }
}

/* =====================
   FEATURES / CARDS
   ===================== */
.feature-grid, .card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
}
.feature {
  background: var(--gray-100);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-elevated);
  padding: 28px 22px 24px 22px;
  min-width: 230px;
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
  transition: box-shadow .22s, background .18s;
  border: 1.5px solid var(--gray-200);
  position: relative;
}
.feature img {
  height: 38px;
  width: auto;
  margin-bottom: 6px;
  filter: grayscale(100%) contrast(125%);
  opacity: .88;
}
.feature h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--black);
}
.feature p {
  font-size: 1rem;
  color: var(--gray-700);
}
.feature:hover, .feature:focus-within {
  background: var(--gray-200);
  box-shadow: 0 6px 24px 0 rgba(16,16,16,0.14);
  border-color: var(--accent);
}

.card, .testimonial-card {
  background: var(--white);
  box-shadow: var(--shadow-elevated);
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  padding: 26px 22px;
  border: 1.5px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: border-color .18s, box-shadow .18s;
}
.card-container {
  gap: 24px;
}
.card:hover,
.testimonial-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 24px 0 rgba(16,16,16,0.15);
}

.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

/* Visual pattern for testimonials (CRITICAL contrast) */
.testimonial-card {
  background: var(--gray-100); /* Light BG for dark text */
  color: var(--black);
  border-left: 5px solid var(--primary);
}
.testimonial-card span {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent);
}
.testimonial-card p {
  font-size: 1.08rem;
  font-style: italic;
  color: var(--black);
}

/* =====================
   LISTS
   ===================== */
ul, ol {
  margin-bottom: 18px;
  padding-left: 22px;
}
ul li, ol li {
  font-size: 1rem;
  margin-bottom: 14px;
  color: var(--black);
  position: relative;
  padding-left: 12px;
}
ul li:before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--gray-300);
  border-radius: 50%;
  margin-right: 10px;
  position: absolute;
  left: 0;
  top: 8px;
}

/* =====================
   Text/Image/LAYOUT SECTIONS
   ===================== */
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
  }
}

.text-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

/* =====================
   BUTTONS & CTA
   ===================== */
.cta {
  appearance: none;
  border-radius: var(--border-radius);
  padding: 13px 34px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.03em;
  border: none;
  box-shadow: var(--shadow-elevated);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  position: relative;
  margin-top: 12px;
  display: inline-block;
}
.cta.primary {
  background: var(--black);
  color: var(--white);
}
.cta.primary:hover, .cta.primary:focus {
  background: var(--primary);
  color: var(--white);
}
.cta.secondary {
  background: var(--gray-200);
  color: var(--black);
}
.cta.secondary:hover, .cta.secondary:focus {
  background: var(--gray-400);
  color: var(--black);
}
.cta.accent {
  background: var(--accent);
  color: var(--white);
}
.cta.accent:hover, .cta.accent:focus {
  background: var(--primary);
  color: var(--white);
}
@media (max-width: 600px) {
  .cta {
    width: 100%;
    text-align: center;
    padding: 13px 0;
  }
}

/* =====================
   FOOTER
   ===================== */
footer {
  width: 100%;
  background: var(--black);
  color: var(--white);
  margin-top: 64px;
  padding: 0;
}
footer .container {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 20px 12px 20px;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.footer-nav a {
  color: var(--gray-300);
  font-size: 0.98rem;
  text-decoration: underline;
  transition: color var(--transition);
}
.footer-nav a:hover {
  color: var(--white);
}
.footer-contact img {
  height: 28px;
  margin-bottom: 12px;
  filter: brightness(0) invert(1) grayscale(1);
}
.footer-contact p, .footer-contact a {
  color: var(--gray-200);
  font-size: 0.97rem;
}

.container.copyright {
  margin: 0 auto;
  padding: 14px 16px 22px 16px;
  border-top: 1px solid var(--gray-400);
  flex-direction: row;
  justify-content: center;
  color: var(--gray-400);
}

@media (max-width: 900px) {
  footer .container {
    flex-direction: column;
    gap: 12px;
    padding: 32px 8px 8px 8px;
  }
}

/* =====================
   FORMS (AVOIDED in DESIGN unless extended)
   ===================== */
input, select, textarea {
  background: var(--gray-100);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--border-radius);
  padding: 9px 13px;
  color: var(--black);
  font-size: 1rem;
  margin-bottom: 20px;
  width: 100%;
  transition: border var(--transition), box-shadow var(--transition);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  outline: none;
}

/* =====================
   COOKIE CONSENT BANNER
   ===================== */
.cookie-banner {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  background: var(--black);
  color: var(--white);
  z-index: 950;
  padding: 26px 18px 18px 18px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -2px 14px 0 rgba(20,20,20,.14);
  gap: 16px;
  animation: slideInBanner 0.7s cubic-bezier(.48,.38,.29,1.01);
}
@keyframes slideInBanner {
  from {transform: translateY(100%); opacity:0;}
  to   {transform: translateY(0); opacity:1;}
}
.cookie-banner p {
  color: var(--gray-200);
  font-size: 1rem;
  line-height: 1.5;
  flex: 1 1 auto;
  margin-bottom: 0;
}
.cookie-actions {
  display: flex;
  flex-direction: row;
  gap: 14px;
  align-items: center;
}
.cookie-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--border-radius);
  padding: 10px 22px;
  border: none;
  background: var(--gray-800, #232323);
  color: var(--white);
  margin-top: 0;
  transition: background var(--transition), color var(--transition);
  box-shadow: none;
}
.cookie-btn.accept {
  background: var(--primary);
  color: var(--white);
}
.cookie-btn.accept:hover {
  background: var(--accent);
}
.cookie-btn.reject {
  background: var(--gray-400);
  color: var(--black);
}
.cookie-btn.reject:hover {
  background: var(--gray-700);
  color: var(--white);
}
.cookie-btn.settings {
  background: transparent;
  color: var(--white);
  border: 1.5px solid var(--gray-400);
}
.cookie-btn.settings:hover {
  color: var(--accent);
  background: var(--gray-200);
}
@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 22px 8px 12px 8px;
  }
  .cookie-actions {
    width: 100%;
    gap: 8px;
  }
}

/* COOKIE MODAL POPUP */
.cookie-modal-overlay {
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(16,16,16,0.45);
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.cookie-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.cookie-modal {
  background: var(--white);
  color: var(--black);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-elevated);
  padding: 34px 28px 26px 28px;
  min-width: 285px;
  max-width: 94vw;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-bottom: 34px;
  animation: slideModal .3s cubic-bezier(.44,.21,.41,1.02);
}
@keyframes slideModal {
  from {transform: translateY(60px); opacity: 0;}
  to   {transform: translateY(0); opacity: 1;}
}
.cookie-modal-close {
  position: absolute;
  top: 11px; right: 18px;
  background: none;
  color: var(--black);
  font-size: 1.5rem;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  transition: background .13s;
  border-radius: var(--border-radius);
}
.cookie-modal-close:hover {
  background: var(--gray-100);
}
.cookie-modal h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
  font-family: var(--font-display);
}
.cookie-modal-category {
  display: flex;
  flex-direction: row;
  gap: 18px;
  align-items: center;
  margin-bottom: 12px;
}
.cookie-toggle {
  accent-color: var(--primary);
  margin-left: 7px;
}
.cookie-category-desc {
  color: var(--gray-700);
  font-size: 0.98rem;
}
@media (max-width: 520px) {
  .cookie-modal {
    padding: 19px 8px 16px 10px;
  }
}

/* =====================
   MISCELLANEOUS / DETAILS
   ===================== */
a {
  transition: color var(--transition), border-color var(--transition);
}
a:hover, a:focus {
  color: var(--primary);
  outline: none;
}
::-webkit-input-placeholder { color: var(--gray-400); }
::-moz-placeholder { color: var(--gray-400); }
:-ms-input-placeholder { color: var(--gray-400); }
::placeholder { color: var(--gray-400); }

/* Scrollbar for monochrome */
::-webkit-scrollbar {
  width: 8px;
  background: var(--gray-200);
}
::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 10px;
}

/* =====================
   SPACING & FLEX LAYOUTS (MANDATORY)
   ===================== */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
}
.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: center;
  gap: 20px;
  padding: 20px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* =====================
   RESPONSIVE DESIGN
   ===================== */
@media (max-width: 1200px) {
  .container {
    max-width: 96vw;
  }
}
@media (max-width: 900px) {
  .feature-grid {
    gap: 18px;
    flex-direction: column;
  }
  .feature {
    flex-basis: 100%;
    min-width: unset;
  }
}
@media (max-width: 768px) {
  .container {
    max-width: 100vw;
    padding: 0 4vw;
  }
  h1 {
    font-size: 2rem;
    margin-bottom: 15px;
  }
  h2 {
    font-size: 1.5rem;
    margin-bottom: 14px;
  }
  .content-grid {
    gap: 12px;
  }
  .section {
    margin-bottom: 36px;
    padding: 32px 8px;
  }
  .feature-grid {
    gap: 15px;
  }
}
@media (max-width: 640px) {
  header .container {
    height: 52px;
    padding: 0 5px;
    gap: 16px;
  }
  .footer-nav, .footer-contact {
    font-size: 0.91rem;
  }
  .container.copyright {
    padding: 8px 4px 11px 4px;
  }
}

/* =====================
   MODERN MICRO-INTERACTIONS
   ===================== */
.cta, .cookie-btn {
  will-change: background, color, box-shadow;
}
.cta:active, .cookie-btn:active {
  box-shadow: none;
  transform: translateY(1.5px) scale(.98);
}
.feature:active {
  box-shadow: none;
  background: var(--gray-300);
}
.mobile-nav a:active {
  background: var(--gray-300);
}

/* =====================
   PRINT STYLES
   ===================== */
@media print {
  header, footer, .cookie-banner, .mobile-menu { display: none !important; }
  body { color: #000; background: #fff; }
}
