/* ==================================================
   CSS RESET & BASE (normalize, box model, consistency)
   ================================================== */
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;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  min-height: 100vh;
  background: #F9F9F8;
  color: #233A53;
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}
ul, ol {
  margin-left: 24px;
  margin-bottom: 16px;
}
li {
  margin-bottom: 8px;
}
a {
  color: #233A53;
  text-underline-position: under;
  transition: color 0.2s;
  text-decoration-thickness: 2px;
}
a:hover, a:focus {
  color: #F2C063;
  outline: none;
  text-decoration-color: #F2C063;
}

/* FONT IMPORTS: (should be in HTML, but fallback here) */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Montserrat:wght@600;800&display=swap');

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 700;
  color: #233A53;
  letter-spacing: -0.8px;
}
h1 {
  font-size: 2.25rem;
  margin-bottom: 24px;
  line-height: 1.18;
}
h2 {
  font-size: 1.75rem;
  margin-bottom: 20px;
  line-height: 1.22;
}
h3 {
  font-size: 1.32rem;
  margin-bottom: 14px;
  font-weight: 600;
}
h4 { font-size: 1.11rem; margin-bottom: 10px; }

p {
  margin-bottom: 18px;
}
strong, b {
  font-weight: 700;
}

/* ====================
   LAYOUT STRUCTURE 
   =================== */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

/* Main sections spacing (MANDATED) */
section {
  margin-bottom: 60px;
  padding: 40px 0 40px 0;
  background: transparent;
}

/* If .section class used anywhere, fallback: */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}

/* FLEX-ONLY LAYOUTS  */
.card-container, .services-grid, .feature-grid, .blog-list, .project-highlights, .footer-cols, .content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  width: 100%;
  align-items: stretch;
  margin-bottom: 0;
  /* let card handle its own bottom spacing */
}
.content-grid {
  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;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px 0 rgba(35,58,83,0.09);
  margin-bottom: 20px;
  max-width: 480px;
  flex: 1 1 320px;
  border-left: 5px solid #F2C063;
  transition: box-shadow 0.18s, border-color 0.18s;
}
.testimonials {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.testimonial-card p {
  color: #233A53;
  font-size: 1.08rem;
  margin-bottom: 8px;
  line-height: 1.5;
}
.testimonial-card span {
  color: #997e39;
  font-size: 0.98em;
  font-weight: 700;
}
.testimonial-card:hover {
  box-shadow: 0 4px 24px 0 rgba(35,58,83,0.17);
  border-color: #f5b534;
  background: #FFFDEE;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
.feature-list ul,
.feature-list ol {
  margin-bottom: 20px;
  margin-left: 0px;
  padding-left: 0;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0 10px 0px;
  margin-bottom: 4px;
}
.feature-list img {
  width: 22px;
  height: 22px;
}
.project-highlights > div, .blog-list > div, .services-grid > div, .feature-grid > div, .services-list > div {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 12px 0 rgba(242,192,99,0.08);
  padding: 24px 20px 18px 20px;
  flex: 1 1 280px;
  min-width: 240px;
  transition: box-shadow 0.22s, transform 0.22s;
  margin-bottom: 20px;
  border: 1.5px solid #F9F9F8;
  display: flex;
  flex-direction: column;
}
.project-highlights > div:hover, .blog-list > div:hover, .services-grid > div:hover, .feature-grid > div:hover {
  box-shadow: 0 6px 32px 0 rgba(242,192,99,0.22);
  transform: translateY(-4px) scale(1.018);
}

.services-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.services-list > div {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 10px 0 rgba(242,192,99,0.08);
  padding: 23px 19px 15px 19px;
  flex: 1 1 250px;
  min-width: 200px;
  margin-bottom: 20px;
  transition: box-shadow .18s, transform .18s;
  border: 1.3px solid #F9F9F8;
  display: flex;
  flex-direction: column;
}
.services-list > div:hover {
  box-shadow: 0 4px 18px 0 rgba(35,58,83,0.11);
  transform: translateY(-2px) scale(1.015);
}


/* Category Filters */
.category-filters ul {
  display: flex;
  gap: 18px;
  list-style: none;
  margin-left: 0;
}
.category-filters li {
  margin-bottom: 0;
}
.category-filters a {
  background: #F2C063;
  color: #233A53;
  border-radius: 12px;
  padding: 8px 22px;
  font-size: 1em;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 4px;
}
.category-filters a:hover {
  background: #ffd989;
  color: #222a36;
}

.newsletter-section {
  background: #F2C063;
  border-radius: 18px;
  box-shadow: 0 2px 18px 0 rgba(35,58,83,0.09);
  padding: 40px 28px;
  align-items: center;
  text-align: center;
}
.newsletter-section h2, .newsletter-section p {
  color: #233A53;
}

/* ====================
   HEADER NAVIGATION
   =================== */
header {
  background: #fff;
  box-shadow: 0 4px 18px 0 rgba(35,58,83,0.05);
  position: sticky;
  top: 0;
  z-index: 111;
  padding: 0;
}
header .container {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
header a img {
  height: 38px;
  border-radius: 7px;
}

.main-nav {
  display: flex;
  gap: 28px;
}
.main-nav a {
  color: #233A53;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  padding: 9px 0;
  border-radius: 7px;
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover, .main-nav a:focus {
  background: #FFF2CF;
  color: #B4851D;
}

.btn {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  font-size: 1.05em;
  border-radius: 25px;
  padding: 13px 32px;
  border: none;
  outline: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 9px 0 rgba(242,192,99,0.13);
  transition: background 0.18s, box-shadow 0.18s, color 0.18s, transform 0.18s;
  margin-left: 12px;
  display: inline-block;
}
.btn-primary {
  background: #F2C063;
  color: #233A53;
}
.btn-primary:hover, .btn-primary:focus {
  background: #ffd989;
  color: #233A53;
  box-shadow: 0 3px 14px 0 rgba(242,192,99,0.22);
  transform: translateY(-2px) scale(1.04);
}
.btn-secondary {
  background: #233A53;
  color: #fff;
  border: 2px solid #F2C063;
}
.btn-secondary:hover, .btn-secondary:focus {
  background: #fff;
  color: #233A53;
  border-color: #233A53;
}

/* Burger menu button */
.mobile-menu-toggle {
  font-size: 2rem;
  line-height: 1;
  background: #F2C063;
  color: #233A53;
  border: none;
  padding: 8px 14px;
  border-radius: 15px;
  cursor: pointer;
  box-shadow: 0 2px 8px 0 rgba(242,192,99,0.20);
  transition: background 0.16s, color 0.16s;
  display: none;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: #997e39;
  color: #fff;
  outline: none;
}

/* MOBILE HEADER NAV */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: #fff;
  z-index: 9000;
  transform: translateX(-100vw);
  transition: transform .45s cubic-bezier(.86,.01,.15,.99);
  box-shadow: 0 2px 32px 0 rgba(35,58,83,0.18);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.mobile-menu.active {
  transform: translateX(0);
}
.mobile-menu-close {
  font-size: 2.3rem;
  background: none;
  color: #233A53;
  border: none;
  cursor: pointer;
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 9991;
  transition: color .19s;
  border-radius: 12px;
  padding: 2px 10px 2px 4px;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: #F2C063;
  background: #EEE8DC;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 80px;
  width: 100%;
  align-items: flex-start;
  padding-left: 35px;
}
.mobile-nav a {
  color: #233A53;
  background: transparent;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  border-radius: 9px;
  padding: 12px 16px 12px 0;
  transition: background .17s, color .17s;
  text-decoration: none;
  display: inline-block;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: #FFF2CF;
  color: #B4851D;
}

/* Main nav on mobile: hide */
@media (max-width: 1020px) {
  .main-nav {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: block !important;
    margin-left: auto;
  }
  .btn-primary {
    margin-left: 0;
  }
}

/* Desktop: .mobile-menu always hidden unless .active */
@media (min-width: 1021px) {
  .mobile-menu {
    display: none !important;
  }
}

/* ===========
    MAIN AREA
   =========== */
main .container {
  padding-top: 24px;
  padding-bottom: 24px;
}

/* Cards are general style container components */
.card {
  margin-bottom: 20px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 12px 0 rgba(242,192,99,0.08);
  position: relative;
  padding: 28px 22px 18px 22px;
  min-width: 220px;
  border: 1.5px solid #F9F9F8;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.21s, transform 0.21s;
}
.card:hover {
  box-shadow: 0 8px 42px 0 rgba(242,192,99,0.20);
  transform: translateY(-5px) scale(1.025);
}

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

/* =============
  SPECIAL CTAs  
 ============= */
.content-wrapper > a.btn, .content-wrapper > .btn, .newsletter-section .btn {
  margin-top: 12px;
  align-self: flex-start;
}
.newsletter-section .btn {
  margin-top: 16px;
}

/* ============
   TEXT SECTIONS
   ============ */
.text-section {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 10px 0 rgba(242,192,99,0.07);
  padding: 32px 24px 28px 24px;
  margin-bottom: 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.text-section h3 {
  margin-top: 8px;
  margin-bottom: 11px;
}
.text-section p {
  margin-bottom: 11px;
}

/* =============
   FOOTER
   ============= */
footer {
  background: #233A53;
  color: #fff;
  padding-top: 48px;
  padding-bottom: 24px;
  margin-top: 80px;
}
.footer-bottom {
  padding-top: 40px;
  text-align: center;
  color: #F2C063;
  font-size: 0.98em;
}
.content-wrapper {
  gap: 24px;
}
footer .content-wrapper {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 32px 48px;
  align-items: flex-start;
  margin-bottom: 16px;
  justify-content: flex-start;
}
.footer-col {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-width: 220px;
}
.footer-col strong {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  color: #F2C063;
}
.footer-col img[alt='Fancy Missions'] {
  height: 46px;
  border-radius: 9px;
}
.footer-col img:not([alt='Fancy Missions']) {
  height: 22px;
  width: 22px;
  margin-right: 7px;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-nav a {
  color: #fff;
  font-size: 1em;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  text-decoration: none;
  opacity: .90;
  border-radius: 7px;
  padding: 5px 0px 5px 0px;
  transition: background 0.14s, color 0.14s;
}
.footer-nav a:hover, .footer-nav a:focus {
  background: #393F58;
  color: #F2C063;
}
.footer-col a img {
  filter: grayscale(10%);
  transition: filter 0.2s, transform 0.14s;
}
.footer-col a:hover img {
  filter: none;
  transform: scale(1.11) rotate(-7deg);
}


/* =============
 COOKIE BANNER & MODAL
 ============= */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10300;
  background: #FFFDEE;
  border-top: 2px solid #F2C063;
  box-shadow: 0 -2px 16px 0 rgba(242,192,99,0.19);
  padding: 24px 20px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  width: 100%;
  max-width: 100vw;
  transition: transform .4s cubic-bezier(.71,-0.04,.17,1.29), opacity .32s;
}
.cookie-banner.hide {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}
.cookie-banner-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.cookie-banner p {
  color: #233A53;
  font-size: 1rem;
  text-align: center;
}
.cookie-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
  align-items: center;
}
.cookie-btn {
  padding: 10px 24px;
  border-radius: 17px;
  border: none;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  font-size: 1.01em;
  margin: 0;
  cursor: pointer;
  transition: background 0.16s, color 0.16s, box-shadow 0.16s;
  box-shadow: 0 1px 4px 0 rgba(242,192,99,0.08);
}
.cookie-btn.accept {
  background: #F2C063;
  color: #233A53;
}
.cookie-btn.accept:hover, .cookie-btn.accept:focus {
  background: #ffe7a1;
  color: #233A53;
}
.cookie-btn.reject {
  background: #233A53;
  color: #fff;
  border: 2px solid #F2C063;
}
.cookie-btn.reject:hover, .cookie-btn.reject:focus {
  background: #fff;
  color: #F2C063;
}
.cookie-btn.settings {
  background: transparent;
  color: #233A53;
  border: 2px solid #F2C063;
}
.cookie-btn.settings:hover, .cookie-btn.settings:focus {
  background: #FFF2CF;
  color: #b4851d;
}

/* Cookie modal */
.cookie-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 11110;
  background: rgba(35,58,83,0.31);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.29s, visibility 0.29s;
}
.cookie-modal.active {
  visibility: visible;
  opacity: 1;
}
.cookie-modal-content {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 6px 48px 0 rgba(242,192,99,0.14);
  padding: 34px 30px 27px 30px;
  min-width: 320px;
  max-width: 95vw;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
  position: relative;
}
.cookie-modal-close {
  position: absolute;
  top: 14px;
  right: 21px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #233A53;
  cursor: pointer;
  padding: 2px 8px 2px 4px;
  border-radius: 12px;
  transition: background 0.13s, color 0.12s;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  background: #FFF2CF;
  color: #b4851d;
}
.cookie-modal h3, .cookie-modal h4 {
  color: #233A53;
  font-family: 'Montserrat', Arial;
  margin-bottom: 8px;
}
.cookie-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cookie-toggle-item {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 5px;
}
.cookie-toggle-label {
  flex: 1;
  font-size: 1em;
}
.cookie-toggle-switch {
  width: 36px;
  height: 20px;
  position: relative;
  display: inline-block;
}
.cookie-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #F2C063;
  border-radius: 20px;
  transition: background 0.19s;
}
.cookie-toggle-switch input:checked + .cookie-slider {
  background: #233A53;
}
.cookie-slider:before {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.18s;
}
.cookie-toggle-switch input:checked + .cookie-slider:before {
  transform: translateX(15px);
}

/* Mark essential as always enabled */
.cookie-toggle-label.essential {
  font-weight: bold;
  color: #233A53;
}
.cookie-toggle-label.essential:after {
  content: ' (zawsze aktywne)';
  color: #af850e;
  font-size: .92em;
}
.cookie-toggle-switch input[disabled] + .cookie-slider {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ===============
   MEDIA QUERIES
   =============== */

@media (max-width: 900px){
  .container { max-width: 98vw; }
  .content-wrapper {
      gap: 16px;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }
  main .container { padding-top: 14px; padding-bottom: 10px; }
  .project-highlights > div, .blog-list > div, .services-grid > div, .feature-grid > div, .services-list > div {
    min-width: 100%;
    margin-right: 0;
    padding: 17px 12px 14px 12px;
  }
  .newsletter-section {
    padding: 23px 10px;
  }
  .content-wrapper, .footer .content-wrapper {
    flex-direction: column !important;
    gap: 16px !important;
    align-items: stretch !important;
  }
  .text-image-section {
    flex-direction: column !important;
    gap: 17px;
    align-items: center !important;
  }
  .feature-list ul, .feature-list ol, .footer-nav {
    gap: 9px;
  }
  .footer-col {
    min-width: unset;
    width: 100%;
    gap: 7px;
    margin-bottom: 12px;
  }
  .footer-bottom {
    padding-top: 27px;
  }
}
@media (max-width: 535px) {
  h1 { font-size: 1.25rem; }
  h2 { font-size: 1.1rem; }
  header .container { flex-direction: column; gap: 7px; }
  section { padding: 21px 0 21px 0; margin-bottom: 24px; }
  .newsletter-section, .text-section { padding: 12px 8px 11px 8px; }
  .cookie-modal-content { min-width: unset; padding: 16px 8px; }
}

/* Micro-interactions & focus states */
input[type='text'], input[type='email'], textarea, select {
  border-radius: 13px;
  border: 1.5px solid #ece2c0;
  padding: 10px 13px;
  font-size: 1em;
  outline: none;
  margin-bottom: 17px;
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  transition: border 0.15s, box-shadow 0.13s;
}
input:focus, textarea:focus, select:focus {
  border-color: #F2C063;
  box-shadow: 0 1px 7px 0 rgba(242,192,99,0.13);
}

.btn:active {
  transform: scale(0.96);
}
.mobile-menu-toggle:active, .mobile-menu-close:active { transform: scale(0.93); }

/* Checklist icons */
ul li img, ol li img {
  vertical-align: middle;
  margin-right: 7px;
  width: 17px;
  height: 17px;
  display: inline-block;
}

/* Accessibility outline */
a:focus-visible, button:focus-visible {
  outline: 2.5px solid #F2C063 !important;
  outline-offset: 1px;
}

/* Utility classes */
.d-none { display: none !important; }
.text-center { text-align: center; }
.w-100 { width: 100%; }

/* Prevent absolute use on cards/content */
.card, .testimonial-card, .blog-list > div, .footer-col, .project-highlights > div {
  position: relative !important;
}

/* Prevent element overlap, ensure adequate spacing */
.card, .testimonial-card, .services-list > div, .feature-list > ul > li,
.project-highlights > div, .blog-list > div {
  margin-bottom: 20px !important;
}

/* Ensures no content is overlapped by cookie banner */
body { padding-bottom: 80px; }

/* Decorative elements can use absolute, but not main content! */

/* End of CSS */
