/* =========================================================================
   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;
}
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after {
  box-sizing: inherit;
}
body {
  line-height: 1.6;
  background: #F7F6F3;
  color: #1A2326;
  font-family: 'Roboto', 'Georgia', serif;
  font-size: 16px;
  min-height: 100vh;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-style: none;
}
a {
  color: #05415A;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #F6C440;
}
ul, ol {
  padding-left: 22px;
}
table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.5em;
}
th, td {
  padding: 0.8em 1em;
  border-bottom: 1px solid #E6E1D8;
  font-family: 'Roboto', 'Georgia', serif;
}
th {
  background: #E6E1D8;
  font-weight: 700;
}

/* =========================================================================
   BRAND COLORS & FONTS (Elegant Classic)
   ========================================================================= */
:root {
  --primary: #05415A;
  --secondary: #73B1BC;
  --accent: #F6C440;
  --bg: #F7F6F3;
  --card-bg: #FFFFFF;
  --border: #E6E1D8;
  --muted: #6A767C;
  --success: #4d7926;
  --danger: #ad4d27;
  --shadow: 0 2px 24px rgba(5,65,90,0.06);
  --radius: 12px;
  --main-serif: 'Georgia', 'Times New Roman', serif;
  --main-sans: 'Roboto', Arial, sans-serif;
  --display: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}

/* =========================================================================
   TYPOGRAPHY & DEFAULTS
   ========================================================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--display), var(--main-serif);
  color: var(--primary);
  margin-bottom: 0.6em;
  letter-spacing: 0.01em;
}
h1 {
  font-size: 2.7rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 16px;
}
h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 14px;
}
h3 {
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 12px;
}
p, li, td, th {
  font-family: var(--main-serif);
  font-size: 1rem;
  color: #22292f;
  margin-bottom: 8px;
}
strong {
  font-weight: 600;
}
em {
  font-family: var(--main-serif);
}
.note {
  color: var(--muted);
  font-size: 0.98em;
  font-style: italic;
}

/* =========================================================================
   MAIN STRUCTURE & CONTAINERS
   ========================================================================= */
.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 0;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.section:last-child {
  margin-bottom: 0;
}

/* =========================================================================
   HEADER & NAVIGATION
   ========================================================================= */
header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 10px rgba(5,65,90,0.03);
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  min-height: 72px;
}
.brand-logo img {
  height: 44px;
  width: auto;
  margin-right: 16px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.main-nav a {
  font-family: var(--display);
  font-size: 1.07rem;
  color: var(--primary);
  padding: 8px 0;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.main-nav a.btn-primary {
  margin-left: 16px;
}
.main-nav a:hover, .main-nav a:focus {
  color: var(--accent);
  background: rgba(246,196,64,0.08);
}
.mobile-menu-toggle {
  display: none;
  background: none;
  font-size: 2.1rem;
  color: var(--primary);
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 210;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  background: #e6e1d8;
  border-radius: 50%;
}

/* --------------------------------------------------
   MOBILE NAVIGATION DRAWER
   -------------------------------------------------- */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5,65,90,0.98);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 32px 24px 24px 24px;
  z-index: 400;
  transform: translateX(-110%);
  transition: transform 0.4s cubic-bezier(0.7,0,0.3,1);
  box-shadow: 0 0 40px 8px rgba(5,65,90,0.16);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  font-size: 2rem;
  color: var(--accent);
  background: none;
  border: none;
  align-self: flex-end;
  margin-bottom: 30px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.mobile-menu-close:focus,
.mobile-menu-close:hover {
  background: rgba(246,196,64,0.13);
  border-radius: 50%;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
}
.mobile-nav a {
  color: #fff;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.25rem;
  padding: 13px 6px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--accent);
  color: #05415A;
}

/* Hide main nav and show burger on small screens */
@media (max-width: 992px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}
@media (min-width: 993px) {
  .mobile-menu {
    display: none !important;
  }
}

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn-primary,
a.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff !important;
  border: none;
  border-radius: var(--radius);
  padding: 11px 32px;
  font-family: var(--display);
  font-size: 1.13rem;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(5,65,90,0.07);
  letter-spacing: 0.02em;
  transition: background 0.18s, box-shadow 0.23s, color 0.23s;
  cursor: pointer;
  text-align: center;
  outline: none;
  margin-top: 8px;
  margin-bottom: 18px;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--secondary);
  color: #fff !important;
  box-shadow: 0 4px 32px 0 rgba(246,196,64,0.11), 0 1px 16px rgba(5,65,90,0.10);
}
.btn-secondary, a.btn-secondary {
  display: inline-block;
  background: var(--accent);
  color: var(--primary) !important;
  border: none;
  border-radius: var(--radius);
  padding: 11px 30px;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(5,65,90,0.06);
  letter-spacing: 0.01em;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.btn-secondary:hover, .btn-secondary:focus {
  background: #ffe38d;
  color: var(--primary) !important;
}

/* =========================================================================
   HERO SECTION, FEATURES, CARDS
   ========================================================================= */
.hero {
  background: linear-gradient(112deg, #fff 70%, var(--secondary) 100%);
  padding: 56px 0 40px 0;
  margin-bottom: 46px;
}
.hero h1 {
  font-family: var(--main-serif);
  font-size: 2.5rem;
  color: var(--primary);
}
.hero p {
  font-size: 1.17rem;
  color: var(--muted);
  margin-bottom: 30px;
}
.features .feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 12px;
  margin-bottom: 8px;
}
.feature-grid li {
  flex: 1 0 230px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 26px 18px 22px 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  transition:box-shadow 0.26s, border-color 0.14s;
  min-width: 240px;
  max-width: 312px;
  margin-bottom: 20px;
}
.feature-grid li:hover {
  border-color: var(--secondary);
  box-shadow: 0 4px 32px -3px var(--secondary);
}
.feature-grid img {
  height: 36px; width: 36px; opacity: 0.98;
}
.feature-grid h3 {
  font-size: 1.16rem;
  font-weight: 500;
  color: var(--primary);
}

/* =========================================================================
   SERVICES, ABOUT, PRICING, CTA
   ========================================================================= */
.services ul,
.about ul {
  margin-left: 0px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  list-style: disc inside;
  margin-bottom: 10px;
}
.services ul li,
.about ul li {
  font-size: 1.01rem;
  background: transparent;
  padding-left: 0;
}
.cta {
  background: var(--secondary);
  border-radius: var(--radius);
  margin: 42px 0 16px 0;
  box-shadow: 0 2px 24px rgba(5,65,90,0.07);
  color: #fff;
}
.cta .content-wrapper {
  align-items: center;
  text-align: center;
  gap: 18px;
}
.cta h2 {
  color: var(--primary);
}

/* =========================================================================
    TESTIMONIALS
   ========================================================================= */
.testimonials {
  background: #F4F6F8;
  border-radius: var(--radius);
  margin: 38px 0 34px 0;
  padding: 32px 0;
}
.testimonials .content-wrapper {
  gap: 24px;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 28px;
  margin-bottom: 24px;
  box-shadow: 0 2px 14px 0 rgba(5,65,90,0.11);
  max-width: 530px;
  transition: box-shadow 0.2s, border-color 0.2s;
  color: #1a2326;
}
.testimonial-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 32px -1px var(--secondary);
}
.testimonial-card p {
  font-size: 1.09rem;
  color: #1A2326;
  margin-bottom: 4px;
  font-family: var(--main-serif);
}
.testimonial-card span {
  font-size: 1rem;
  color: var(--muted);
}
.testimonial-card .stars {
  color: var(--accent);
  letter-spacing: 1.5px;
  font-size: 1.2em;
  font-family: var(--display);
}

/* =========================================================================
   CARDS & CARD CONTAINERS
   ========================================================================= */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  transition: box-shadow 0.23s, border-color 0.19s;
  min-width: 220px;
  max-width: 320px;
}
.card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px -4px var(--secondary);
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

/* =========================================================================
   LAYOUT FLEX SYSTEMS
   ========================================================================= */
.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;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
/* About page specific */
.about .text-section {
  margin-bottom: 22px;
}
.map-placeholder {
  border: 1px dashed var(--secondary);
  background: #f4fafd;
  border-radius: var(--radius);
  padding: 27px 10px;
  text-align: center;
  margin: 18px 0 12px 0;
  color: var(--muted);
}

/* =========================================================================
   TABLE STYLES (CENNIK)
   ========================================================================= */
.pricing table {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.pricing th,
.pricing td {
  font-size: 1.04rem;
  color: var(--primary);
  font-family: var(--main-serif);
}
.pricing th {
  font-weight: 600;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
footer {
  background: #fff;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 32px 0 20px 0;
  font-size: 1rem;
  box-shadow: 0 -2px 24px rgba(5,65,90,0.03);
}
.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-bottom: 8px;
  justify-content: center;
}
.footer-menu a {
  color: var(--primary);
  text-decoration: underline dotted;
  transition: color 0.18s;
}
.footer-menu a:hover {
  color: var(--accent);
}
footer p {
  color: var(--muted);
  font-size: 0.97rem;
  text-align: center;
  margin-top: 8px;
}

/* =========================================================================
   LEGAL, PRIVACY, RODO, THANK-YOU PAGES
   ========================================================================= */
.legal {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 50px 0 50px 0;
  padding: 40px 0;
}
.legal .content-wrapper,
.thank-you .content-wrapper {
  gap: 18px;
  align-items: flex-start;
}
.legal h1 {
  margin-bottom: 24px;
}
.legal h2 {
  color: var(--secondary);
  font-size: 1.25rem;
  font-family: var(--display);
  margin-top: 24px;
}
.legal ul {
  gap: 9px;
  margin-left: 16px;
}
.legal li {
  color: #262e31;
  font-family: var(--main-serif);
}
.thank-you .content-wrapper {
  text-align: center;
}

/* =========================================================================
   COOKIE CONSENT BANNER & MODAL
   ========================================================================= */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #F9F5EA;
  border-top: 1px solid var(--border);
  padding: 24px 12px 18px 12px;
  z-index: 2000;
  box-shadow: 0 -2px 32px rgba(5,65,90,0.11);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: transform 0.42s cubic-bezier(0.8,0,0.22,1);
  transform: translateY(0);
}
.cookie-banner.hide {
  transform: translateY(130%);
  pointer-events: none;
}
.cookie-banner p {
  color: #111b22;
  font-size: 1.01em;
}
.cookie-banner .cookie-btn {
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 7px;
  padding: 10px 20px;
  margin-left: 8px;
  font-family: var(--display);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s, color 0.15s;
  font-size: 1rem;
  box-shadow: 0 1px 16px rgba(246,196,64,0.11);
}
.cookie-banner .cookie-btn.settings {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--accent);
}
.cookie-banner .cookie-btn:hover, .cookie-banner .cookie-btn:focus {
  background: #ffe490;
  color: #025687;
}

/* Cookie preferences modal */
.cookie-modal {
  display: none;
  position: fixed;
  z-index: 2050;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(5,65,90,0.44);
  align-items: center;
  justify-content: center;
  animation: cookieModalFadeIn 0.5s;
}
.cookie-modal.active {
  display: flex;
}
@keyframes cookieModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal-dialog {
  background: #fff;
  padding: 36px 28px 30px 28px;
  border-radius: var(--radius);
  box-shadow: 0 4px 40px 0 rgba(5,65,90,0.19);
  min-width: 322px;
  max-width: 97vw;
  font-family: var(--main-serif);
  color: #232323;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cookie-modal-dialog h2 {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 4px;
}
.cookie-modal-close {
  position: absolute; top: 19px; right: 24px;
  background: none;
  color: var(--accent);
  font-size: 1.46rem;
  border: none;
  cursor: pointer;
  padding: 2px 8px;
  z-index: 10;
  transition: background 0.18s;
}
.cookie-modal-close:focus,
.cookie-modal-close:hover {
  background: #fffacd;
  border-radius: 50%;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 7px;
}
.cookie-category input[type="checkbox"] {
  width: 19px; height:19px;
  accent-color: var(--accent);
  margin-right: 2px;
}
.cookie-category.essential input[type="checkbox"] {
  accent-color: var(--accent);
}
.cookie-category.essential label {
  color: #aaa;
  font-weight: 500;
  opacity: 0.75;
}
.cookie-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  justify-content: flex-end;
}
.cookie-modal-actions .cookie-btn {
  margin: 0;
}

/* =========================================================================
   RESPONSIVENESS (Mobile First)
   ========================================================================= */
@media (max-width: 768px) {
  html { font-size: 94.5%; }

  .container {
    padding: 0 11px;
  }

  header .container {
    flex-direction: row;
    gap: 0;
    padding: 0 10px;
  }
  .content-wrapper {
    gap: 18px;
    padding: 0 2px;
  }
  .main-nav {
    display: none !important;
  }
  .hero {
    padding: 32px 0 34px 0;
    margin-bottom: 24px;
  }
  .features .feature-grid {
    flex-direction: column;
    gap: 18px;
  }
  .feature-grid li {
    min-width: 0;
    max-width: 100%;
  }
  .card-container,
  .content-grid {
    flex-direction: column !important;
    gap: 14px;
  }
  .testimonial-card {
    max-width: 100%;
    padding: 18px 10px;
  }
  .legal {
    padding: 19px 0;
    margin: 18px 0;
  }
  .section {
    padding: 20px 4px;
    margin-bottom: 28px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
  }
  .footer-menu {
    gap: 12px;
    justify-content: flex-start;
  }
  .cookie-banner {
    flex-direction: column;
    gap: 10px;
    padding: 17px 8px 12px 8px;
    font-size: 0.97em;
  }
  .cookie-modal-dialog {
    min-width: 0;
    padding: 18px 10px 19px 10px;
  }
}

/* Tablet - adjust typography */
@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.3rem; }
  .hero h1 { font-size: 1.45rem; }
}

/* =========================================================================
   ANIMATIONS & MICROINTERACTIONS
   ========================================================================= */
.btn-primary, .btn-secondary, .cookie-btn {
  transition: background 0.17s, color 0.16s, box-shadow 0.22s;
}
.card, .testimonial-card, .feature-grid li {
  transition: box-shadow 0.20s, border-color 0.13s, background 0.19s;
}
section, .section, .hero, .features, .services, .testimonials, .pricing, .contact, .cta, .legal, .about, .thank-you {
  animation: fadeInSection 0.82s;
}
@keyframes fadeInSection {
  0% { opacity:0; transform:translateY(25px); }
  75% { opacity:0.23; }
  100% { opacity:1; transform:translateY(0); }
}

/* =========================================================================
   FORMS (if any later)
   ========================================================================= */
input, textarea, select {
  font-family: var(--main-serif);
  font-size: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.19s;
  box-shadow: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--secondary);
}

/* =========================================================================
   MISCELLANEOUS
   ========================================================================= */
::-webkit-scrollbar {
  width: 12px;
  background: #E6E1D8;
}
::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 6px;
}

/* Prevent overlapping for all flex containers */
.card, .testimonial-card, .feature-grid li, .card-container > *, .content-grid > *, .section > *, .container > * {
  margin-right: 0;
}

/* Minimum margin for cards/sections */
.card, .testimonial-card, .feature-grid li {
  margin-bottom: 20px !important;
}
.section > * + * {
  margin-top: 20px;
}

/* CRITICAL: prevent overlapping and ensure spacing between cards/sections */
.card-container, .card-grid, .feature-grid, .content-grid {
  gap: 20px;
}

/* =========================================================================
   END OF STYLE.CSS
   ========================================================================= */