/* --- CSS RESET & BASE 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, menu, 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, 
main, 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; }
*, *:before, *:after { box-sizing: inherit; }
article, aside, details, figcaption, figure, 
footer, header, hgroup, main, menu, nav, section {
  display: block;
}
body {
  line-height: 1.62;
  background: #F4F3ED;
  color: #16314E;
  font-family: 'Roboto', Arial, sans-serif;
  min-height: 100vh;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: #3AA6B9;
  text-decoration: none;
  transition: color 0.2s;
}
a:focus, a:hover {
  color: #16314E;
  outline: none;
  text-decoration: underline;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  color: #16314E;
  letter-spacing: 0.01em;
}
h1 {
  font-size: 2.25rem;
  line-height: 1.13;
  margin-bottom: 24px;
}
h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}
h3 {
  font-size: 1.125rem;
  margin-bottom: 16px;
}
p, ul, ol, address {
  font-size: 1rem;
  font-family: 'Roboto', Arial, sans-serif;
  line-height: 1.7;
  margin-bottom: 16px;
}
ul, ol {
  padding-left: 20px;
}
strong { font-weight: 700; }
blockquote {
  font-size: 1.125rem;
  font-family: 'Montserrat', Arial, sans-serif;
  background: #fff;
  color: #16314E;
  border-left: 4px solid #3AA6B9;
  padding: 20px 24px;
  margin: 0 0 4px 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(22,49,78,0.07);
}
blockquote span {
  display: block;
  margin-top: 12px;
  color: #3AA6B9;
  font-size: 0.98em;
  font-style: italic;
}

/* --- SECTION & LAYOUT CONTAINERS --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}
.section, section {
  background: transparent;
  margin-bottom: 60px;
  padding: 40px 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 900px) {
  .content-wrapper {
    gap: 32px;
  }
}

/* --- CARD & FLEX CONTAINERS --- */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(22,49,78,0.07);
  margin-bottom: 20px;
  position: relative;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s;
}
.card:hover {
  box-shadow: 0 8px 36px rgba(22,49,78,0.13);
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.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;
}
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- TESTIMONIALS --- */
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(22,49,78,0.08);
  margin-bottom: 20px;
  min-width: 0;
  color: #16314E;
}
.testimonial-card blockquote {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}

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

/* --- SERVICE CARDS (oferta.html) --- */
.service-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(22,49,78,0.07);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  border-left: 4px solid #3AA6B9;
  transition: box-shadow 0.2s;
}
.service-card:hover {
  box-shadow: 0 6px 34px rgba(22,49,78,0.14);
}

/* --- TEAM GRID (zespol.html) & ARTICLES (blog.html) --- */
.team_member_grid ul,
.article_preview_grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  list-style: none;
}
.team_member_grid li, .article_preview_grid li {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(22,49,78,0.06);
  padding: 20px 18px;
  margin-bottom: 20px;
  flex: 1 1 230px;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #16314E;
}
.team_member_grid img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-right: 12px;
  filter: grayscale(0.15) contrast(0.9);
}

/* --- BUTTONS & CTA --- */
.cta,
button,
input[type="submit"] {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  padding: 12px 32px;
  font-size: 1rem;
  border-radius: 24px;
  border: none;
  outline: none;
  cursor: pointer;
  color: #fff;
  background: #3AA6B9;
  transition: background 0.18s, box-shadow 0.18s, color 0.18s;
  box-shadow: 0 1px 4px rgba(58,166,185,0.09);
  margin: 8px 0;
  display: inline-block;
}
.cta:hover,
button:hover,
input[type="submit"]:hover {
  background: #16314E;
  color: #fff;
  box-shadow: 0 2px 14px rgba(22,49,78,0.16);
}
.cta:focus {
  outline: 2px solid #16314E;
}


/* --- NAVIGATION --- */
.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 0 8px 0;
  background: transparent;
  font-family: 'Montserrat', Arial, sans-serif;
}
.main-nav a {
  font-size: 1rem;
  padding: 10px 18px;
  border-radius: 20px;
  color: #16314E;
  transition: background 0.13s, color 0.13s;
}
.main-nav a.cta {
  background: #3AA6B9;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(58,166,185,0.08);
}
.main-nav a.cta:hover {
  background: #16314E;
}
.main-nav a:hover:not(.cta) {
  background: #e9efec;
  color: #3AA6B9;
}
.main-nav img {
  height: 38px;
  width: auto;
  margin-right: 10px;
}
@media (max-width: 1000px) {
  .main-nav a {
    font-size: 0.98rem;
    padding: 7px 10px;
  }
}

/* --- MOBILE MENU --- */
.mobile-menu-toggle {
  display: none;
  background: #fff;
  color: #16314E;
  border-radius: 50%;
  border: none;
  font-size: 2.2rem;
  width: 48px;
  height: 48px;
  position: absolute;
  top: 22px;
  right: 18px;
  z-index: 101;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(22,49,78,0.07);
  transition: background 0.15s, color 0.15s;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  background: #3AA6B9;
  color: #fff;
}
@media (max-width: 900px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}

.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: #F4F3ED;
  box-shadow: 0 4px 32px rgba(22,49,78,0.10);
  transform: translateX(100%);
  transition: transform 0.33s cubic-bezier(.86,0,.07,1);
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding-top: 0;
  padding-left: 0;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  font-size: 2rem;
  background: none;
  border: none;
  color: #16314E;
  margin: 20px 16px 0 8px;
  cursor: pointer;
  align-self: flex-end;
  z-index: 201;
  transition: color 0.175s;
}
.mobile-menu-close:focus, .mobile-menu-close:hover {
  color: #3AA6B9;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 15px;
  padding-left: 32px;
}
.mobile-nav a {
  padding: 12px 12px 12px 0;
  font-size: 1.18rem;
  color: #16314E;
  border-radius: 8px;
  display: block;
  transition: background 0.16s, color 0.16s;
  font-weight: 600;
}
.mobile-nav a:focus, .mobile-nav a:hover {
  background: #e9efec;
  color: #3AA6B9;
}
@media (min-width: 901px) {
  .mobile-menu {
    display: none;
  }
  .mobile-menu-toggle {
    display: none !important;
  }
}

/* --- FOOTER --- */
footer {
  background: #fff;
  padding: 36px 24px 24px 24px;
  box-shadow: 0 -4px 18px rgba(22,49,78,0.03);
  margin-top: 60px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  justify-content: flex-start;
}
.footer-nav a {
  color: #3AA6B9;
  font-weight: 500;
  transition: color 0.14s;
}
.footer-nav a:focus,
.footer-nav a:hover {
  color: #16314E;
  text-decoration: underline;
}
.footer-contact {
  margin-bottom: 18px;
  font-size: 0.99rem;
  color: #5c6b7d;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.footer-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.98rem;
  color: #7e8ca0;
}
.footer-brand img {
  height: 22px;
  width: auto;
}

@media (max-width: 800px) {
  footer,
  .footer-contact {
    flex-direction: column;
    gap: 8px;
  }
  .footer-nav {
    gap: 8px;
    margin-bottom: 10px;
  }
}

/* --- FORMS & SEARCH --- */
input[type="search"] {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px 18px;
  font-size: 1rem;
  width: 100%;
  max-width: 340px;
  font-family: 'Roboto', Arial, sans-serif;
  background-color: #fff;
  margin-bottom: 24px;
  color: #16314E;
  transition: border 0.18s;
}
input[type="search"]:focus {
  border: 1.5px solid #3AA6B9;
  outline: none;
}

/* --- CATEGORY MENU (blog.html) --- */
.category-menu {
  display: flex;
  gap: 14px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.category-menu a {
  padding: 6px 20px;
  background: #e6f0ef;
  color: #3AA6B9;
  border-radius: 16px;
  font-size: 0.98rem;
  font-weight: 600;
  transition: background 0.17s, color 0.17s;
}
.category-menu a:focus,
.category-menu a:hover {
  background: #3AA6B9;
  color: #fff;
}

/* --- PRICE OVERVIEW, PROCESS, BRAND PROMISE (oferta.html/about.html) --- */
.price-overview,
.process-outline, .brand-promise {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 0.5px 6px rgba(22,49,78,0.04);
  padding: 18px 14px;
  margin-bottom: 24px;
  color: #16314E;
}
.process-outline ol {
  padding-left: 23px;
  margin-bottom: 0;
  font-size: 1rem;
}
.brand-promise ul {
  margin-bottom: 0;
  font-size: 0.98rem;
  padding-left: 18px;
}

/* --- ADDRESS, MAPS, ETC. (kontakt.html) --- */
address {
  font-style: normal;
  color: #16314E;
}
.location_map {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 0.5px 8px rgba(22,49,78,0.04);
  padding: 16px 14px;
  margin-bottom: 20px;
  font-size: 0.99rem;
}

/* --- TEXT SECTIONS --- */
.text-section {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 8px rgba(22,49,78,0.04);
  padding: 24px 18px;
  margin-bottom: 16px;
}
.text-section ul {
  padding-left: 18px;
}

/* --- GENERAL SPACING --- */
ul li, ol li {
  margin-bottom: 8px;
}
.section, section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
@media (max-width: 600px) {
  .section, section {
    margin-bottom: 36px;
    padding: 28px 6px;
  }
}

/* --- GAP CORRECTIONS universal for all flexb layouts --- */
.card-container, .content-grid,
.text-image-section, .feature-item, .testimonial-card,
.team_member_grid ul, .article_preview_grid,
.footer-nav {
  gap: 20px;
}

/* --- RESPONSIVE FLEX CORRECTIONS --- */
@media (max-width:900px) {
  .card-container, .content-grid,
  .team_member_grid ul, .article_preview_grid {
    flex-direction: column;
  }
}

/* --- Z-INDEX GUARDS FOR MOBILE MENU --- */
header, .mobile-menu {
  z-index: 110;
  position: relative;
}

/* --- COOKIE BANNER --- */
.cookie-banner {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  background: #fff;
  box-shadow: 0 -4px 34px rgba(22,49,78,0.13);
  padding: 24px 18px 16px 18px;
  border-top: 2px solid #3AA6B9;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 500;
  transition: transform 0.35s cubic-bezier(.86,0,.07,1), opacity 0.35s;
  opacity: 1;
  transform: translateY(0);
}
.cookie-banner.closed {
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
}
.cookie-banner p,
.cookie-banner span {
  color: #16314E;
  font-size: 1rem;
  max-width: 520px;
}
.cookie-banner .cookie-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.cookie-banner button {
  padding: 10px 26px;
  border-radius: 18px;
  font-size: 1rem;
  font-family: 'Montserrat', Arial, sans-serif;
  border: none;
  font-weight: 600;
  transition: background 0.13s, color 0.13s;
  box-shadow: 0 1px 3px rgba(58,166,185,0.05);
  cursor: pointer;
}
.cookie-banner .accept {
  background: #3AA6B9;
  color: #fff;
}
.cookie-banner .accept:hover {
  background: #16314E;
}
.cookie-banner .reject {
  background: #e6f0ef;
  color: #16314E;
}
.cookie-banner .reject:hover {
  background: #16314E;
  color: #fff;
}
.cookie-banner .settings {
  background: #fff;
  color: #3AA6B9;
  border: 1.4px solid #3AA6B9;
}
.cookie-banner .settings:hover {
  background: #3AA6B9;
  color: #fff;
}

/* --- COOKIE PREFERENCES MODAL --- */
.cookie-modal-overlay {
  position: fixed;
  z-index: 1001;
  top: 0; left: 0;
  height: 100vh; width: 100vw;
  background: rgba(22,49,78,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s;
}
.cookie-modal-overlay.closed {
  opacity: 0;
  pointer-events: none;
}
.cookie-modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 64px rgba(22,49,78,0.17);
  padding: 36px 28px 28px 28px;
  min-width: 320px;
  max-width: 98vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  font-family: 'Roboto', Arial, sans-serif;
  color: #16314E;
  position: relative;
  animation: cookieModalIn 0.40s;
}
@keyframes cookieModalIn {
  0% { opacity: 0; transform: translateY(18px) scale(0.99); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.cookie-modal h2 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.28rem;
  margin-bottom: 18px;
}
.cookie-modal .cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.99rem;
  background: #f8fafb;
  padding: 12px 12px;
  border-radius: 10px;
}
.cookie-category.essential {
  opacity: 0.66;
  cursor: not-allowed;
}
.cookie-category input[type="checkbox"] {
  accent-color: #3AA6B9;
  width: 18px; height: 18px;
}
.cookie-modal .modal-btns {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
}
.cookie-modal .modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #3AA6B9;
  cursor: pointer;
  transition: color 0.15s;
}
.cookie-modal .modal-close:focus, .cookie-modal .modal-close:hover {
  color: #16314E;
}
.cookie-modal button {
  padding: 8px 20px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  background: #3AA6B9;
  color: #fff;
  transition: background 0.15s;
}
.cookie-modal button:hover {
  background: #16314E;
}

/* --- ANIMATIONS & MICRO-INTERACTIONS --- */
.cta,
button,
input[type="submit"] {
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.14s;
}
.cta:active, button:active, input[type="submit"]:active {
  transform: scale(0.97);
}
.card:hover, .service-card:hover, .testimonial-card:hover {
  box-shadow: 0 12px 44px rgba(22,49,78,0.23);
}

/* --- SCANDINAVIAN ELEMENTS --- */
.card, .service-card, .testimonial-card, .price-overview,
.process-outline, .brand-promise, .text-section, .location_map {
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(22,49,78,0.07), 0 1.5px 7px rgba(66,90,112,0.02);
  background: #fff;
}

/* --- LIGHT ICON FILTERS (subtle, neutral for natural Scandinavian feel) --- */
img[alt*=icon], .features img, .feature-item img {
  filter: grayscale(0.13) contrast(1.11) brightness(1.06) drop-shadow(0 1px 1px rgba(58,166,185,0.08));
}

/* --- MISCELLANEOUS CLASSES --- */
.brand-promise strong, .brand-promise ul li { color: #16314E; }
section a.cta { margin-top: 14px; }

/* --- RESPONSIVE TYPOGRAPHY --- */
@media (max-width: 600px) {
  h1 { font-size: 1.38rem; }
  h2 { font-size: 1.13rem; }
  blockquote { font-size: 0.99rem; padding: 12px 10px; }
  .team_member_grid li, .article_preview_grid li { min-width: 110px; font-size: 0.99rem; }
}

/* --- ENSURE NO OVERLAPPING AND CLEAR SPACING --- */
.card:not(:last-child), .testimonial-card:not(:last-child), .service-card:not(:last-child), .team_member_grid li, .article_preview_grid li, .section:not(:last-child) {
  margin-bottom: 24px;
}

/* --- UTILITIES --- */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

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