/* === CSS RESET & BASE STYLES === */
html {
  box-sizing: border-box;
  font-size: 16px;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Open Sans', Arial, sans-serif;
  background: #fff;
  color: #23334A;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: #1C355C;
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 600;
}
a:hover,
a:focus {
  color: #ffab2a;
}
ul, ol {
  margin-left: 1.3em;
  margin-bottom: 1em;
}
li {
  margin-bottom: 0.5em;
}

/* === PLAYFUL DYNAMIC PALETTE === */
:root {
  --primary: #1C355C;
  --secondary: #56928F;
  --accent: #F0E6D2;
  --fun-yellow: #FFAB2A;
  --fun-coral: #FF6F61;
  --fun-purple: #7A4FFF;
  --white: #fff;
  --soft-shadow: 0 4px 14px 0 rgba(44, 74, 110, 0.14);
  --radius-xl: 32px;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--primary);
  margin-bottom: 16px;  
}
h1 {
  font-size: 2.4rem; /* 38px */
  line-height: 1.18;
}
h2 {
  font-size: 2rem;   /* 32px */
  color: var(--fun-coral);
}
h3 {
  font-size: 1.375rem; /* 22px */
  color: var(--fun-purple);
}
h4, h5, h6 {
  font-size: 1.125rem; /* 18px */
}
.section p,
p {
  margin-bottom: 16px;
}
strong {
  font-weight: 700;
}

/* Make text playful */
h1, h2 {
  position: relative;
}
h1::after, h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 8px;
  background: var(--fun-yellow);
  border-radius: 8px;
  margin-top: 12px;
  animation: underline-pop 1s cubic-bezier(.48,1.97,.54,-0.95) 1;
}
@keyframes underline-pop {
  0% { width: 0; opacity: 0; }
  80% { width: 70px; opacity: 1; }
  100% { width: 50px; opacity: 1; }
}

/* === LAYOUT CONTAINERS === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  width: 100%;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}

/* FLEXBOX --- Do NOT use Grid or Columns (enforced) */
.card-container,
.card-grid, /* for custom layouts */
.content-grid,
.service-grid,
.tip-cards,
.article-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.card {
  margin-bottom: 20px;
  position: relative;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* Spacing and white space */
.card, .service-card, .article-list > article, .tip-cards > div, .testimonial-card {
  margin-bottom: 20px;
}

/* === MAIN NAV (Desktop) === */
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
}
.main-nav a img {
  height: 40px;
  margin-right: 18px;
}
.main-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  font-size: 17px;
  transition: background 0.2s, color 0.2s;
  position: relative;
}
.main-nav a:hover, .main-nav a:focus {
  background: var(--fun-yellow);
  color: var(--primary);
}
.btn-primary {
  background: var(--fun-yellow);
  color: var(--primary) !important;
  border: none;
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  border-radius: var(--radius-lg);
  font-size: 18px;
  padding: 12px 32px;
  box-shadow: 0 4px 18px rgba(255,171,42,0.18);
  font-weight: 800;
  cursor: pointer;
  margin-left: 8px;
  position: relative;
  transition: background 0.2s, color 0.2s, box-shadow 0.28s cubic-bezier(.47,1.64,.41,.8);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--fun-coral);
  color: #fff !important;
  box-shadow: 0 2px 8px 0 rgba(255,111,97,0.16);
  transform: translateY(-3px) scale(1.05) rotate(-2deg);
}

/* === HAMBURGER MOBILE MENU === */
.mobile-menu-toggle {
  display: none;
  background: var(--fun-coral);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 2.2rem;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 18px;
  top: 13px;
  z-index: 1001;
  transition: background 0.15s, color 0.15s, transform 0.25s cubic-bezier(.47,1.64,.41,.8);
  box-shadow: 0 2px 8px 0 rgba(255,111,97,0.16);
}
.mobile-menu-toggle:active {
  background: var(--fun-yellow);
  color: var(--primary);
  transform: scale(0.96) rotate(-6deg);
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--accent);
  z-index: 1999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transform: translateX(-100%);
  transition: transform 0.40s cubic-bezier(.55,1.2,.32,1);
  box-shadow: 4px 0 36px 0 rgba(28,53,92,0.12);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  background: none;
  border: none;
  color: var(--fun-coral);
  font-size: 2rem;
  align-self: flex-end;
  margin: 20px 24px 0 0;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 2001;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
  color: var(--fun-yellow);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin: 40px 0 0 36px;
}
.mobile-nav a {
  font-size: 1.25rem;
  padding: 10px 0;
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  color: var(--primary);
  font-weight: 700;
  border-radius: var(--radius-sm);
  width: 100vw;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--fun-yellow);
  color: var(--fun-coral);
}

/* Hide nav on mobile, show hamburger */
@media (max-width: 1023px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}
@media (min-width: 1024px) {
  .mobile-menu {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: none !important;
  }
}

/* === SECTIONS & CARDS === */
.section {
  border-radius: var(--radius-xl);
  background: var(--accent);
  box-shadow: var(--soft-shadow);
  margin-bottom: 60px;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}
.service-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  margin-bottom: 24px;
}
.service-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--soft-shadow);
  padding: 28px 24px 24px 24px;
  min-width: 270px;
  flex: 1 1 250px;
  max-width: 340px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.26s cubic-bezier(.47,1.64,.41,.8), box-shadow 0.18s;
  position: relative;
}
.service-card h2, .service-card h3 {
  color: var(--fun-purple);
  margin-bottom: 8px;
}
.service-card:hover {
  transform: translateY(-4px) scale(1.04) rotate(-2deg);
  box-shadow: 0 8px 34px 0 rgba(44,74,110,0.19);
}

.article-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 16px;
}
.article-list > article {
  background: var(--fun-yellow);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(255,171,42,0.09);
  padding: 24px 20px;
  min-width: 240px;
  flex: 1 1 240px;
  max-width: 320px;
  transition: box-shadow 0.21s, transform 0.17s;
}
.article-list > article:hover {
  transform: scale(1.04) rotate(1.5deg);
  box-shadow: 0 8px 32px rgba(255,171,42,0.22);
}

.tip-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.tip-cards > div {
  background: var(--fun-coral);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--soft-shadow);
  padding: 22px 18px;
  min-width: 200px;
  flex: 1 1 200px;
  max-width: 310px;
  margin-bottom: 20px;
  transition: transform 0.22s, box-shadow 0.19s;
}
.tip-cards > div:hover {
  transform: translateY(-3px) scale(1.05) rotate(-2deg);
  box-shadow: 0 8px 28px 0 rgba(255,111,97,0.19);
}

/* === TESTIMONIALS === */
.testimonial-card {
  background: #fff;
  border-radius: var(--radius-xl) var(--radius-lg);
  box-shadow: 0 2px 14px 0 rgba(44, 74, 110, 0.13);
  padding: 24px 32px;
  margin-bottom: 20px;
  color: #232335;
  min-width: 280px;
  flex: 1 1 310px;
  position: relative;
  transition: box-shadow 0.22s, transform 0.16s;
}
.testimonial-card p {
  font-size: 1.12rem;
  color: #43244a;
  font-weight: 500;
}
.testimonial-card span {
  display: block;
  font-size: 1rem;
  color: var(--fun-coral);
  font-weight: 700;
  margin-top: 10px;
  font-style: italic;
}
.testimonial-card:hover {
  box-shadow: 0 8px 32px 0 rgba(44, 74, 110, 0.19);
  transform: scale(1.03) rotate(0.9deg);
}

/* === FAQ ACCORDION (static, playful style) === */
.faq-accordion > div {
  background: var(--fun-yellow);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px 0 rgba(255,171,42,0.13);
  padding: 18px 22px 14px 22px;
  margin-bottom: 12px;
  color: var(--primary);
  transition: box-shadow 0.2s, transform 0.14s;
}
.faq-accordion > div:hover {
  box-shadow: 0 6px 26px 0 rgba(255,171,42,0.18);
  transform: scale(1.02) rotate(-1deg);
}
.faq-accordion h3 {
  margin-bottom: 7px;
}

/* === FOOTER === */
footer {
  background: var(--primary);
  color: var(--accent);
  padding: 40px 0 24px 0;
}
footer .container {
  padding: 0 10px;
}
footer .content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  align-items: flex-start;
  justify-content: space-between;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
footer nav a {
  color: var(--accent);
  font-size: 1rem;
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 700;
  padding: 4px 0;
  border-radius: var(--radius-sm);
}
footer nav a:hover, footer nav a:focus {
  color: var(--fun-yellow);
}
footer p {
  margin-bottom: 10px;
  font-size: 15px;
  color: var(--accent);
}
footer img {
  height: 38px;
  filter: brightness(96%) drop-shadow(0 1px 8px #372);
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  footer .content-wrapper {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
  }
}

/* === ICONS === */
section img[alt^="Certyfikat"],
section img[alt^="Gwarancja"] {
  height: 54px;
  width: auto;
  display: inline-block;
  margin-right: 18px;
  margin-top: 10px;
  filter: drop-shadow(0 2px 10px #ffab2a44);
  vertical-align: middle;
}
section img[alt^="Indywidualne"] {
  height: 46px;
  margin-right: 10px;
  vertical-align: middle;
}
section img[alt^="Transparentność"], section img[alt^="Gwarancja"] {
  height: 46px;
  margin-right: 10px;
  vertical-align: middle;
}

/* === ANIMATIONS/MICROINTERACTIONS === */
.btn-primary, .service-card, .article-list > article, .testimonial-card, .tip-cards > div, .faq-accordion > div {
  transition: box-shadow 0.17s, transform 0.23s, background 0.2s, color 0.18s;
}

/* Decorative playful circles */
.section::before {
  content: '';
  position: absolute;
  bottom: -38px;
  left: -38px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--fun-yellow);
  opacity: 0.20;
  z-index: 0;
  animation: playful-circles 3.8s infinite alternate ease-in-out;
  pointer-events: none;
}
@keyframes playful-circles {
  0% {transform: scale(0.95) translateY(0);}
  100% {transform: scale(1.17) translateY(-7px);}
}
.section::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -25px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--fun-coral);
  opacity: 0.13;
  z-index: 0;
  animation: playful-circles-alt 5.3s infinite alternate-reverse ease-in-out;
  pointer-events: none;
}
@keyframes playful-circles-alt {
  0% {transform: scale(1.0) translateY(0);}
  100% {transform: scale(1.09) translateY(10px);}
}

/* === COOKIE CONSENT BANNER === */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0;
  width: 100vw;
  background: #fffbe0;
  color: var(--primary);
  box-shadow: 0 -4px 22px 0 rgba(28,53,92,0.11);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  z-index: 3000;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 18px 26px;
  font-size: 1.02rem;
  animation: cookie-slide-up 0.63s cubic-bezier(.47,1.64,.41,.8);
}
@keyframes cookie-slide-up {
  from {transform: translateY(58px); opacity: 0;}
  to   {transform: translateY(0); opacity: 1;}
}
.cookie-banner .btn-primary,
.cookie-banner .btn-outline,
.cookie-banner .btn-settings {
  margin: 0 6px;
  min-width: 110px;
  font-size: 1rem;
  padding: 8px 22px;
}
.btn-outline {
  background: none;
  border: 2px solid var(--fun-coral);
  color: var(--fun-coral);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  padding: 9px 22px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border 0.18s;
}
.btn-outline:hover, .btn-outline:focus {
  background: var(--fun-coral);
  color: #fff;
}
.btn-settings {
  background: var(--fun-purple);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  border: none;
  padding: 8px 22px;
  cursor: pointer;
  transition: background 0.17s, color 0.17s;
}
.btn-settings:hover, .btn-settings:focus {
  background: var(--fun-yellow);
  color: var(--primary);
}

/* Cookie settings modal */
.cookie-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(44, 52, 84, 0.38);
  z-index: 5001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in-cookie 0.23s;
}
@keyframes fade-in-cookie {
  from { opacity: 0; } to { opacity: 1; }
}
.cookie-modal {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: 0 6px 42px 0 rgba(44,52,84,0.14);
  max-width: 400px;
  min-width: 260px;
  padding: 30px 34px 22px 34px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  animation: modal-scalein 0.33s cubic-bezier(.47,1.64,.41,.8);
}
@keyframes modal-scalein {
  from { transform: scale(0.86); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.cookie-modal h3 {
  font-size: 1.3rem;
  color: var(--fun-purple);
}
.cookie-modal .cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: 100%;
  margin-bottom: 18px;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  gap: 15px;
}
.cookie-modal .cookie-category label {
  font-size: 1.06rem;
  color: var(--primary);
  font-weight: 700;
}
.cookie-modal .cookie-toggle {
  width: 38px; height: 20px;
  border-radius: 10px;
  background: #F0E6D2;
  border: none;
  position: relative;
  cursor: pointer;
  margin-left: 6px;
  transition: background 0.14s;
}
.cookie-modal .cookie-toggle.enabled {
  background: var(--fun-coral);
}
.cookie-modal .cookie-toggle::before {
  content: '';
  display: block;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 1px; left: 1px;
  box-shadow: 0 1px 3px 0 rgba(28,53,92,0.17);
  transition: left 0.19s cubic-bezier(.47,1.64,.41,.8);
}
.cookie-modal .cookie-toggle.enabled::before {
  left: 19px;
  background: #fff7e2;
}
.cookie-modal .cookie-category input[disabled] + .cookie-toggle {
  opacity: 0.7;
  pointer-events: none;
  background: var(--secondary);
}
.cookie-modal .cookie-modal-btns {
  display: flex;
  flex-direction: row;
  gap: 14px;
  width: 100%;
  justify-content: flex-end;
}
.cookie-modal .cookie-close-modal {
  position: absolute;
  top: 10px; right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--fun-coral);
  transition: color 0.18s;
}
.cookie-modal .cookie-close-modal:hover, .cookie-modal .cookie-close-modal:focus {
  color: var(--fun-yellow);
}


/* === RESPONSIVE: MOBILE FIRST === */
@media (max-width: 768px) {
  .container { padding: 0 8px; }
  .content-wrapper { padding: 0; }
  .section {
    padding: 28px 7px;
    margin-bottom: 40px;
    border-radius: var(--radius-md);
  }
  .main-nav {
    display: none !important;
  }
  h1 { font-size: 1.48rem; }
  h2 { font-size: 1.21rem; }
  h3 { font-size: 1.05rem; }
  .service-card, .article-list > article, .tip-cards > div, .testimonial-card {
    min-width: unset;
    max-width: 100%;
    flex: 1 1 100%;
    padding: 22px 10px 14px 13px;
  }
  .service-grid, .card-container, .card-grid, .article-list, .tip-cards {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }
  .testimonial-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 8px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
  footer .content-wrapper {
    flex-direction: column;
    gap: 14px;
    padding: 0;
    align-items: flex-start;
  }
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 7px;
    font-size: 0.97rem;
  }
  .cookie-modal {
    min-width: 180px;
    padding: 20px 10px 12px 12px;
    max-width: 94vw;
  }
}

/* === UTILITY === */
.hide { display: none!important; }
.text-section { margin-bottom: 36px; }
.faq-section { margin-top: 18px; }
.faq-accordion { margin-top: 18px; }

/* === ACCESSIBILITY === */
:focus-visible {
  outline: 2px solid var(--fun-purple);
  outline-offset: 2px;
}

/* === END === */
