/* 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: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html {
  box-sizing: border-box;
  line-height: 1.5;
  font-size: 16px;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  font-family: 'Roboto', Arial, sans-serif;
  color: #274060;
  background: #f7f6f3;
  min-height: 100vh;
  letter-spacing: 0.015em;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: #274060;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #38824c;
  outline: none;
}

/* NATURE ORGANIC PALETTE & ACCENTS */
:root {
  --ap-primary: #274060;
  --ap-secondary: #FFD700;
  --ap-accent: #F7F7F7;
  --ap-green: #38824c;
  --ap-earth: #7d6332;
  --ap-bark: #594A27;
  --ap-bone: #f3ede3;
  --ap-shadow: rgba(56, 130, 76, 0.05);
  --ap-shadow-dark: rgba(39,64,96,0.12);
  --ap-error: #bf360c;
}

/* CONTAINER */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--ap-accent);
  border-radius: 24px;
  box-shadow: 0 4px 24px var(--ap-shadow);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.text-section {
  background: var(--ap-bone);
  border-radius: 20px;
  padding: 28px 20px;
  margin-top: 10px;
  box-shadow: 0 2px 10px var(--ap-shadow-dark);
  font-size: 1.07rem;
}

/* FLEX UTILITY CLASSES */
.card-container,
.card-grid,
.review-list,
.comparison-list,
.report-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 20px;
}

.card {
  background: var(--ap-bone);
  margin-bottom: 20px;
  border-radius: 18px;
  position: relative;
  box-shadow: 0 2px 10px var(--ap-shadow-dark);
  padding: 24px 20px;
}

.review-card,
.comparison-card,
.report-card {
  background: var(--ap-bone);
  border-radius: 18px;
  box-shadow: 0 2px 10px var(--ap-shadow-dark);
  padding: 22px 18px;
  margin-bottom: 20px;
  flex: 1 1 320px;
  min-width: 260px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 5px solid var(--ap-green);
  transition: transform 0.14s;
}
.review-card:hover,
.comparison-card:hover,
.report-card:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 6px 22px var(--ap-shadow);
}

.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;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 20px;
  background: #fffde5;
  border-radius: 21px;
  box-shadow: 0 2px 12px var(--ap-shadow-dark);
  margin-bottom: 20px;
  border-left: 5px solid var(--ap-green);
  position: relative;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.testimonial-card:hover {
  box-shadow: 0 5px 26px var(--ap-shadow-dark);
  border-left-color: var(--ap-earth);
}
.testimonial-card blockquote {
  color: #274060;
  font-size: 1.1rem;
  font-style: italic;
  margin: 0;
  line-height: 1.6;
}
.testimonial-card .testimonial-author {
  font-weight: bold;
  color: var(--ap-green);
  font-size: 1rem;
  margin-top: 8px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: var(--ap-bone);
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 6px var(--ap-shadow);
}

/* HERO SECTION */
.hero {
  margin-bottom: 48px;
  background: linear-gradient(135deg, #f3ede3 80%, #ebefd8 100%);
  border-radius: 30px;
  box-shadow: 0 6px 28px var(--ap-shadow);
  padding: 46px 0 38px 0;
}
.hero h1 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 2.3rem;
  color: var(--ap-green);
  font-weight: 700;
  line-height: 1.14;
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}
.hero p {
  font-size: 1.18rem;
  margin-bottom: 18px;
  color: var(--ap-bark);
}

/* HEADINGS & TYPOGRAPHY */
h1, h2, h3, h4, h5 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  line-height: 1.18;
  color: var(--ap-green);
  margin-bottom: 12px;
}
h1 { font-size: 2.1rem; margin-bottom: 18px; }
h2 { font-size: 1.55rem; margin-bottom: 12px; }
h3 { font-size: 1.17rem; margin-bottom: 7px; }
h4 { font-size: 1rem; }
h5 { font-size: 0.97rem; }

ul, ol {
  margin-bottom: 16px;
  padding-left: 24px;
}
ul li, ol li {
  margin-bottom: 7px;
  font-size: 1rem;
  padding-left: 6px;
  position: relative;
  color: #274060;
  line-height: 1.6;
}
ul li img {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 50%;
  background: #ebefd8;
  padding: 2px;
}
strong {
  color: #274060;
  font-weight: 600;
}

p {
  margin-bottom: 14px;
  font-size: 1rem;
}

blockquote {
  quotes: "\201C" "\201D" "\2018" "\2019";
}

hr {
  border: 0;
  height: 1px;
  background: var(--ap-earth);
  margin: 22px 0;
  opacity: 0.12;
}

/* HEADER & NAVIGATION */
header {
  background: #ffffff;
  box-shadow: 0 2px 8px var(--ap-shadow-dark);
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 120;
}
.logo img {
  height: 48px;
  width: auto;
  border-radius: 12px;
  background: #f7f6f3;
  padding: 0 4px;
}
.main-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-left: 18px;
}
.main-nav a {
  padding: 7px 12px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  color: #274060;
  border-radius: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.14s, color 0.16s;
}
.main-nav a:hover, .main-nav a:focus {
  background: var(--ap-green);
  color: #FFF;
}
.cta-button.primary, .cta-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.07rem;
  color: #fff;
  background: var(--ap-green);
  border: none;
  border-radius: 18px;
  padding: 12px 24px;
  line-height: 1.1;
  box-shadow: 0 4px 16px var(--ap-shadow-dark);
  cursor: pointer;
  transition: background 0.18s, transform 0.16s, box-shadow 0.15s;
  margin-left: 22px;
  text-align: center;
  text-decoration: none;
}
.cta-button.primary:hover, .cta-button.primary:focus,
.cta-button:hover, .cta-button:focus {
  background: var(--ap-earth);
  color: #fffbe5;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 26px var(--ap-shadow);
}

/* MOBILE MENU BUTTON */
.mobile-menu-toggle {
  background: var(--ap-green);
  color: #FFF;
  border: none;
  font-size: 1.96rem;
  border-radius: 16px;
  width: 48px;
  height: 48px;
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: 24px;
  cursor: pointer;
  box-shadow: 0 2px 12px var(--ap-shadow-dark);
  transition: background 0.14s;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--ap-earth);
}

/* MOBILE MENU */
.mobile-menu {
  position: fixed;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(43, 54, 31, 0.87);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-end;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.4,1,.3,1);
  pointer-events: none;
  opacity: 0;
}
.mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}
.mobile-menu-close {
  background: #fff;
  color: var(--ap-green);
  font-size: 2.2rem;
  border: none;
  border-radius: 15px;
  width: 44px;
  height: 44px;
  margin: 32px 18px 8px 0;
  cursor: pointer;
  align-self: flex-end;
  z-index: 2010;
  box-shadow: 0 2px 12px var(--ap-shadow);
  transition: background 0.13s, color 0.15s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--ap-green);
  color: #fff;
}
.mobile-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 30px 0 0 0;
  align-items: flex-end;
  gap: 0;
}
.mobile-nav a {
  display: flex;
  align-items: center;
  font-size: 1.17rem;
  font-family: 'Montserrat', Arial, sans-serif;
  color: #fff;
  padding: 18px 34px 18px 32px;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(247,247,247,0.07);
  transition: background 0.13s, color 0.14s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--ap-accentshadow), #e1f8ed;
  color: var(--ap-green);
  outline: none;
}

/* MOBILE NAV HIDE ON DESKTOP */
@media (max-width: 1020px) {
  .main-nav { display: none; }
  .mobile-menu-toggle { display: flex; }
}
@media (min-width: 1021px) {
  .mobile-menu { display: none !important; }
}

/* RESPONSIVE HEADER */
@media (max-width: 640px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0 2px 0;
  }
  .logo img {
    height: 39px;
  }
  .cta-button, .cta-button.primary {
    margin-left: 0;
    margin-top: 12px;
  }
}

/* FOOTER */
footer {
  background: #e9eadb;
  padding: 28px 0 22px 0;
  margin-top: 48px;
}
footer .container {
  padding: 0 12px;
}
footer .content-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.footer-nav a {
  color: var(--ap-bark);
  font-size: 1rem;
  padding: 2px 0;
  border-radius: 8px;
}
.footer-nav a:hover, .footer-nav a:focus {
  background: var(--ap-green);
  color: #fff;
}
footer address {
  color: #48553c;
  font-size: 0.98rem;
  margin-top: 8px;
  font-style: normal;
  letter-spacing: 0.01em;
  line-height: 1.6;
}
footer img {
  height: 44px;
  margin-bottom: 8px;
  border-radius: 10px;
}
@media (max-width: 700px) {
  footer .content-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }
}

/* BUTTONS */
.button, .cta-button, .cta-button.primary, .cookie-btn {
  font-family: 'Montserrat', Arial, sans-serif;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  border: none;
  border-radius: 17px;
  font-weight: 700;
  color: #fff;
  background-color: var(--ap-green);
  padding: 10px 24px;
  font-size: 1rem;
  transition: background 0.17s, color 0.15s, box-shadow 0.19s, transform .12s;
  box-shadow: 0 2px 14px var(--ap-shadow-dark);
  margin: 0 6px 0 0;
}
.button:active, .cta-button:active, .cookie-btn:active {
  transform: scale(0.96);
}
.button.secondary, .cookie-btn.secondary {
  background: #fff;
  color: var(--ap-green);
  border: 1px solid var(--ap-green);
}
.button.secondary:hover, .cookie-btn.secondary:hover {
  background: var(--ap-bone);
  color: var(--ap-earth);
}
.button.danger, .cookie-btn.danger {
  background: var(--ap-error);
}
.button.danger:hover, .cookie-btn.danger:hover {
  background: #ad2500;
}
.cookie-btn.accept {
  background: var(--ap-green);
}
.cookie-btn.accept:hover { background: #11541c; }
.cookie-btn.reject {
  background: var(--ap-bark);
}
.cookie-btn.reject:hover {
  background: var(--ap-earth);
}
.cookie-btn.settings {
  background: #fff;
  color: var(--ap-green);
  border: 1px solid var(--ap-green);
}
.cookie-btn.settings:hover { background: var(--ap-bone); }

/* FORM ELEMENTS (for Kontakt, Rekomendacje in layout) */
input, textarea, select {
  width: 100%;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid #dbe4cc;
  background: #fcfbf7;
  border-radius: 10px;
  font-size: 1rem;
  margin-top: 5px;
  margin-bottom: 16px;
  font-family: 'Roboto', sans-serif;
  color: #274060;
  box-shadow: none;
  transition: border 0.14s, box-shadow 0.13s;
}
input:focus, textarea:focus, select:focus {
  border: 1.5px solid var(--ap-green);
  outline: none;
  box-shadow: 0 1px 7px var(--ap-shadow);
}
label {
  display: block;
  font-weight: 500;
  color: #274060;
  font-size: 0.99rem;
  margin-bottom: 7px;
}

/* SECTION SPACING */
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--ap-accent);
  border-radius: 22px;
  box-shadow: 0 4px 18px var(--ap-shadow);
}

/* Responsive Section Spacing */
@media (max-width: 768px) {
  section, .section {
    padding: 28px 6px 28px 6px;
    margin-bottom: 44px;
  }
}

/* FLEXBOX LAYOUTS ON MOBILE */
@media (max-width: 768px) {
  .content-wrapper,
  .card-container,
  .card-grid,
  .review-list,
  .comparison-list,
  .report-list {
    flex-direction: column;
    gap: 16px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  .feature-item {
    gap: 12px;
    padding: 14px 8px;
  }
}

/* Callout Effect for Pricing, Important Spans */
ul li span, .price {
  background: var(--ap-secondary);
  color: var(--ap-bark);
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 0.98rem;
  font-weight: 700;
  margin-left: 7px;
  letter-spacing: 0.01em;
}

/* Micro-animations & transitions for hover/tap */
.card, .review-card, .comparison-card, .report-card {
  transition: box-shadow 0.18s, transform 0.17s;
}
.card:hover, .review-card:hover, .comparison-card:hover, .report-card:hover {
  box-shadow: 0 7px 28px var(--ap-shadow-dark);
  transform: translateY(-5px) scale(1.017);
}

/* ORGANIC (NATURE) SHAPES WITH DECORATIVE ACCENTS */
.section,
.hero,
.text-section,
.card,
.review-card,
.comparison-card,
.report-card,
.testimonial-card {
  border-radius: 21px 28px 19px 24px / 23px 18px 28px 16px;
  /* Subtle disorder for organic effect */
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100vw;
  background: #f4f5ec;
  color: #274060;
  box-shadow: 0 -3px 22px var(--ap-shadow);
  padding: 20px 14px 18px 14px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 1.02rem;
  animation: cookiebanner-in 0.7s cubic-bezier(.18,.88,.47,1.27);
}
@keyframes cookiebanner-in {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.cookie-banner .cookie-buttons {
  display: flex;
  gap: 17px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

/* Cookie Modal Popup */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43,54,31,0.55);
  z-index: 4100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cookie-modal-fadein 0.28s cubic-bezier(.3,1,.7,1);
}
@keyframes cookie-modal-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.cookie-modal {
  background: #faf6eb;
  color: #274060;
  border-radius: 21px 16px 24px 23px / 19px 22px 16px 27px;
  box-shadow: 0 8px 36px var(--ap-shadow-dark);
  max-width: 410px;
  width: 96vw;
  padding: 34px 22px 18px 22px;
  z-index: 4200;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 17px;
  animation: cookie-modal-slidein 0.36s cubic-bezier(.18,.9,.38,1.15);
}
@keyframes cookie-modal-slidein {
  from { transform: translateY(120px) scale(0.88); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.cookie-modal-close {
  position: absolute;
  right: 12px; top: 11px;
  background: none;
  color: #274060;
  border: none;
  font-size: 1.46rem;
  border-radius: 8px;
  cursor: pointer;
  padding: 2px 7px;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  background: var(--ap-green);
  color: #fff;
}
.cookie-categories {
  margin-top: 9px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 1.01rem;
}
.cookie-category input[type="checkbox"] {
  accent-color: var(--ap-green);
  width: 20px;
  height: 20px;
  margin-right: 7px;
}
.cookie-category label {
  margin: 0;
  font-size: 1rem;
}
.cookie-category.essential label {
  font-weight: 700;
  color: #274060;
}
/* Ensure essential is visually checked/disabled */
.cookie-category.essential input[type="checkbox"] {
  pointer-events: none;
  outline: none;
}

/* Ensure visible on mobile */
@media (max-width: 480px) {
  .cookie-modal {
    padding: 19px 6px 10px 8px;
    max-width: 99vw;
    font-size: 0.96rem;
  }
}

/* Custom scrollbar styling for organic/nature touch */
::-webkit-scrollbar {
  width: 11px;
  background: var(--ap-accent);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb {
  background: #d2cab9;
  border-radius: 9px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ap-green);
}

/* Media Queries for General Responsiveness */
@media (max-width: 480px) {
  body {
    font-size: 15px;
  }
  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.08rem; }
  .hero { padding: 22px 0 16px 0; }
}
@media (max-width: 376px) {
  .cookie-banner, .cookie-modal {
    font-size: 0.95rem;
  }
  .hero h1 {
    font-size: 1.09rem;
  }
}

/* Accessibility: Focus Styles */
a:focus-visible, button:focus-visible, .cta-button:focus-visible, .cookie-btn:focus-visible {
  outline: 2.5px solid var(--ap-secondary);
  outline-offset: 2.5px;
}

/* List alignment fix for organic look */
ul, ol {
  margin-left: 0;
  padding-left: 20px;
}
ul li, ol li::marker { color: var(--ap-green); }
ul li::before, ol li::before {
  display: none;
}

/* Contact Details Card */
.contact-details {
  background: #e1f8ed;
  border-radius: 15px;
  padding: 13px 10px 13px 13px;
  margin-top: 10px;
  font-size: 1rem;
  color: #21411a;
  line-height: 1.5;
  box-shadow: 0 1px 12px var(--ap-shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Hide visually for a11y utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px 1px 1px 1px);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: 0;
}

/* Miscellaneous spacing for all wrappers */
.container, .content-wrapper, .text-section, .review-list, .comparison-list, .report-list, .testimonial-card, .card-container, .card, .card-grid {
  margin-bottom: 20px;
}

/* RESPONSIVE - ENSURE NO OVERLAP AND FLEX-WRAP */
@media (max-width: 850px) {
  .container {
    max-width: 96vw;
    padding: 0 6px;
  }
  .hero {
    border-radius: 19px;
  }
}
@media (max-width: 480px) {
  .testimonial-card, .card, .review-card, .comparison-card, .report-card {
    padding: 13px 8px;
    font-size: 0.97rem;
    border-radius: 15px 11px 18px 17px / 13px 13px 15px 14px;
  }
  .footer-nav a {
    font-size: 0.97rem;
  }
}

/* Animate transitions nicely */
*, *:before, *:after {
  transition-property: color, background, box-shadow, border-color, transform, outline;
  transition-duration: .13s;
  transition-timing-function: cubic-bezier(.48,1.7,.42,.64);
}

/* Ensure cards and flex elements do not overlap */
.review-card, .comparison-card, .report-card, .testimonial-card, .card {
  min-width: 0;
  max-width: 100%;
  word-break: break-word;
}

/* Print friendly base */
@media print {
  header, footer, nav, .main-nav, .mobile-menu, .cta-button, .cookie-banner, .cookie-modal, .mobile-menu-toggle { display: none !important; }
  body, .container, section, .section, .content-wrapper, .card, .hero { box-shadow: none; background: #fff; }
  a { text-decoration: underline; color: #000; }
}
