/* ===== CSS RESET & NORMALIZE ===== */

html {
  box-sizing: border-box;
  font-size: 16px;
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}
body {
  min-height: 100vh;
  background: #fff;
  color: #283046;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, picture {
  max-width: 100%;
  display: block;
}
a {
  color: #36A3D9;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #283046;
}
ul, ol {
  list-style: none;
  margin: 0 0 16px 0;
  padding-left: 0;
}
input, button, textarea, select {
  font: inherit;
}
button {
  border: none;
  outline: none;
  background: none;
  cursor: pointer;
}

/* ===== BRAND VARIABLES ===== */
:root {
  --primary: #283046;
  --secondary: #36A3D9;
  --accent: #F6F6F6;
  --border: #E3E8EF;
  --neutral-100: #FFFFFF;
  --neutral-200: #F6F6F6;
  --neutral-300: #EAEAEA;
  --neutral-700: #6A7B95;
  --success: #31C48D;
  --danger: #F56565;

  --font-display: 'Montserrat', Arial, sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;
}

/* ===== TYPOGRAPHY ===== */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}
h1 {font-size: 2.5rem; margin-bottom: 24px}
h2 {font-size: 2rem; margin-bottom: 20px}
h3 {font-size: 1.375rem; margin-bottom: 16px}
h4 {font-size: 1.125rem; margin-bottom: 10px}
h5, h6 {font-size: 1rem; margin-bottom: 8px}

p {
  margin-bottom: 16px;
}

li {
  margin-bottom: 8px;
  font-size:1rem;
  color: var(--primary);
}

.text-section b, .content-wrapper b {color: var(--secondary); font-weight: 600;}

/* ===== CONTAINER LAYOUTS ===== */
.container {
  width: 100%;
  max-width: 1140px;
  padding-left: 20px;
  padding-right: 20px;
  margin-left: auto;
  margin-right: auto;
}

.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}

.text-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.text-image-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
}

.feature-grid,.service-grid,.case-studies {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  margin-top: 18px;
}

.feature-item, .service-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: var(--neutral-200);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(40,48,70,0.04);
  padding: 28px 24px;
  min-width: 220px;
  flex: 1 1 230px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.card-container, .card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(40,48,70,0.05);
  padding: 28px;
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

/* Testimonials & Cards */
.testimonial-slider {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 28px 22px 28px;
  background: var(--accent);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(24,29,46,0.06);
  flex: 1 1 290px;
  min-width: 250px;
  margin-bottom: 20px;
  color: var(--primary);
}
.testimonial-card p {
  color: var(--primary);
  font-style: italic;
  font-size: 1.08rem;
}
.testimonial-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary);
}

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

/* Case Studies (Realizacje) */
.case-studies {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.case-studies .text-section {
  flex: 1 1 300px;
  background: var(--accent);
  padding: 26px 22px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(24,29,46,0.05);
  margin-bottom: 20px;
}

/* ===== HEADER & NAVIGATION ===== */
header {
  background: var(--neutral-100);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  margin-right: 20px;
}
.logo img {
  width: 175px;
  height: auto;
  display: block;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.main-nav a {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: color 0.18s;
}
.main-nav a:hover, .main-nav a:focus {
  color: var(--secondary);
}

.cta {
  background: var(--secondary);
  color: var(--neutral-100);
  padding: 12px 26px;
  border-radius: 28px;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(54,163,217, 0.08);
  display: inline-block;
  text-align: center;
  margin-left: 18px;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.cta.primary {
  background: var(--primary);
  color: var(--neutral-100);
}
.cta:hover, .cta:focus {
  background: var(--secondary);
  color: #fff;
}
.cta.primary:hover, .cta.primary:focus {
  background: #364979;
  color: #fff;
}

/* ===== MOBILE NAVIGATION ===== */
.mobile-menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  color: var(--primary);
  border-radius: 6px;
  padding: 4px 12px;
  transition: background 0.18s;
  z-index: 121;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  background: var(--accent);
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--neutral-100);
  transform: translateX(-100vw);
  transition: transform 0.34s cubic-bezier(.65,.05,.36,1);
  z-index: 120;
  box-shadow: 0 8px 32px rgba(40,48,70, 0.16);
  display: flex;
  flex-direction: column;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  align-self: flex-end;
  font-size: 2rem;
  color: var(--primary);
  background: transparent;
  margin: 18px 24px 10px 0;
  border-radius: 5px;
  padding: 4px 10px;
  transition: background 0.18s;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
  background: var(--accent);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 0 32px;
  margin-top: 10px;
}
.mobile-nav a {
  color: var(--primary);
  font-size: 1.18rem;
  font-family: var(--font-display);
  font-weight: 500;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  width: 100%;
  transition: color 0.18s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--secondary);
}

/* ===== HERO ===== */
.hero {
  background: var(--accent);
  padding: 60px 0 56px 0;
  display: flex;
  align-items: center;
  min-height: 340px;
}
.hero .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero .content-wrapper {
  max-width: 700px;
}
.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 18px;
}
.hero p {
  font-size: 1.18rem;
  margin-bottom: 24px;
  color: var(--neutral-700);
}

/* ===== BUTTONS & INTERACTIONS ===== */
button, .cta, .mobile-menu-close {
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, border 0.18s;
}

/* ===== LISTS WITH ICONS (footer & sections) ===== */
.footer-contact ul,
.text-section ul,
.content-wrapper ul{
  padding-left: 0;
  margin-bottom: 0;
}
.footer-contact li,
.text-section li,
.content-wrapper li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 1rem;
  color: var(--primary);
  line-height: 1.5;
}
.footer-contact img,
.text-section img {
  width: 23px;
  height: 23px;
  filter: grayscale(0.1);
}

/* SERVICES GRID IN OFERTA */
.service-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 18px;
}
.service-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: var(--neutral-200);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(40,48,70,0.04);
  padding: 28px 24px;
  min-width: 220px;
  flex: 1 1 230px;
  margin-bottom: 20px;
}
.service-item img {
  width: 44px; height: 44px;
  margin-bottom: 6px;
  filter: grayscale(0.1);
}
.service-item h3 {
  font-size: 1.14rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--primary);
}

/* FAQ / ACCORDION (systemy-monitoringu) */
.faq-accordion h3 {
  cursor: pointer;
  background: var(--accent);
  border-radius: 7px;
  padding: 12px 18px;
  margin-bottom: 7px;
  transition: background 0.15s;
  position: relative;
}
.faq-accordion h3:hover,
.faq-accordion h3:focus {
  background: var(--secondary);
  color: #fff;
}
.faq-accordion p {
  padding: 0 22px 10px 30px;
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 0;
}

/* ===== FOOTER ===== */
footer {
  background: var(--neutral-200);
  font-size: 1rem;
  color: var(--primary);
  margin-top: 60px;
  border-top: 1px solid var(--border);
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 36px;
  padding-bottom: 16px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  margin-bottom: 20px;
}
.footer-brand img {
  width: 130px;
  margin-bottom: 12px;
}
.footer-links, .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links a {
  color: var(--primary);
  font-family: var(--font-body);
  font-weight: 500;
  transition: color 0.17s;
}
.footer-links a:hover, .footer-links a:focus {
  color: var(--secondary);
}
.footer-contact ul {
  margin-top: 5px;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 10px;
  color: var(--neutral-700);
  font-size: 1rem;
}
.newsletter {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.newsletter h4 {
  margin-bottom: 6px;
}

/* ===== COOKIE CONSENT BANNER ===== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--neutral-100);
  box-shadow: 0 -2px 24px rgba(40,48,70, 0.08);
  border-top: 1px solid var(--border);
  z-index: 5000;
  padding: 20px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 22px;
  animation: fadeInUp 0.8s cubic-bezier(.48,.02,.41,1) 0s 1;
}
@keyframes fadeInUp {
  from {transform: translateY(120px); opacity: 0;}
  to {transform: translateY(0); opacity: 1;}
}
.cookie-banner p {
  margin-bottom: 0;
  color: var(--primary);
  flex: 5;
  font-size: 1rem;
}
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 2;
}
.cookie-btn {
  padding: 10px 20px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  background: var(--accent);
  color: var(--primary);
  border: 1px solid var(--border);
  transition: background 0.17s, color 0.17s, border 0.17s;
}
.cookie-btn.accept {
  background: var(--success);
  color: #fff;
  border: none;
}
.cookie-btn.accept:hover, .cookie-btn.accept:focus {
  background: #26ac75;
}
.cookie-btn.reject {
  background: var(--danger);
  color: #fff;
  border: none;
}
.cookie-btn.reject:hover, .cookie-btn.reject:focus {
  background: #d23535;
}
.cookie-btn.settings {
  background: var(--neutral-200);
  color: var(--primary);
  border: 1px solid var(--border);
}
.cookie-btn.settings:hover, .cookie-btn.settings:focus {
  background: var(--accent);
}

/* COOKIE MODAL */
.cookie-modal-overlay {
  display: none;
  position: fixed;
  z-index: 5001;
  inset: 0;
  background: rgba(40,48,70,0.32);
  align-items: center;
  justify-content: center;
}
.cookie-modal-overlay.open {
  display: flex;
}
.cookie-modal {
  background: var(--neutral-100);
  border-radius: 12px;
  box-shadow: 0 4px 32px rgba(40,48,70,.15);
  padding: 32px 24px;
  max-width: 460px;
  width: 90vw;
  animation: popUp 0.25s cubic-bezier(.47,.58,.58,1.18);
  position: relative;
}
@keyframes popUp {from {transform: scale(0.93); opacity: 0;} to {transform: scale(1); opacity: 1;}}
.cookie-modal h2 {
  font-size: 1.34rem;
  margin-bottom: 14px;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 1rem;
}
.cookie-category .toggle {
  width: 32px;
  height: 18px;
  position: relative;
  background: var(--neutral-300);
  border-radius: 12px;
  transition: background 0.15s;
  margin-right: 8px;
  flex-shrink: 0;
}
.cookie-category .toggle[data-on="true"] {
  background: var(--secondary);
}
.cookie-category .toggle:after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.18s;
}
.cookie-category .toggle[data-on="true"]:after {
  left: 16px;
}
.cookie-modal .modal-actions {
  display: flex;
  gap: 13px;
  margin-top: 18px;
}
.cookie-modal .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  color: var(--primary);
  font-size: 1.48rem;
}
.cookie-modal .modal-close:hover, .cookie-modal .modal-close:focus {color: var(--secondary);}

/* ===== MAP/IMAGE INSIDE TEXT-SECTION ===== */
.map img {
  max-width: 72px;
  margin-bottom: 7px;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 4px rgba(40,48,70,0.07);
}

/* ===== MEDIA QUERIES (MOBILE-FIRST) ===== */
@media (max-width: 991px) {
  .container {
    max-width: 100%;
  }
  .feature-grid, .service-grid, .card-container, .card-grid, .testimonial-slider,.case-studies {
    gap: 14px;
  }
  .feature-item, .service-item, .case-studies .text-section {
    flex: 1 1 180px;
    min-width: 160px;
    padding: 20px 14px;
  }
  .footer-top {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.34rem; }
  .hero {
    padding: 38px 0 32px 0;
    min-height: 220px;
  }
  header .container {
    flex-wrap: wrap;
    min-height: 64px;
    gap: 10px;
  }
  .main-nav {
    display: none;
  }
  .cta {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .section, .content-wrapper {
    padding: 28px 8px;
    margin-bottom: 38px;
  }
  .feature-grid,.service-grid,.card-container,.card-grid,.testimonial-slider,.case-studies {
    flex-direction: column;
    gap: 12px;
  }
  .feature-item, .service-item, .case-studies .text-section, .testimonial-card, .card {
    min-width: unset;
    padding: 15px 10px;
  }
  .content-grid, .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-brand img {
    width: 110px;
  }
  .footer-bottom {
    font-size: .96rem;
    padding-top: 10px;
  }
  .cookie-modal {
    padding: 20px 8px;
    width: 95vw;
    font-size: .96rem;
  }
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 6px;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.68rem; }
  h2 { font-size: 1.13rem; }
  .hero { padding: 24px 0 16px 0; }
  .feature-item, .service-item, .testimonial-card, .case-studies .text-section {padding: 12px 3px !important;}
  .cookie-modal { padding: 12px 2px; }
}

/* ===== MICRO-INTERACTIONS & TRANSITIONS ===== */
.feature-item, .service-item, .card, .testimonial-card, .case-studies .text-section {
  transition: box-shadow 0.18s, transform 0.14s;
}
.feature-item:hover, .service-item:hover, .card:hover, .testimonial-card:hover, .case-studies .text-section:hover {
  box-shadow: 0 6px 20px rgba(40,48,70, 0.09);
  transform: translateY(-2px) scale(1.01);
}

footer, header, nav, .main-nav, .footer-links a, .content-wrapper, .feature-item, .service-item, .section, .testimonial-card, .card, .faq-accordion h3 {
  transition: background 0.12s, color 0.12s, border 0.12s, box-shadow 0.18s;
}

/* ===== SCANDINAVIAN CLEAN VISUAL EFFECTS ===== */
.feature-item, .service-item, .card, .testimonial-card, .case-studies .text-section {
  background: var(--neutral-100);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(40,48,70,0.04);
  border: 1px solid var(--border);
}

.section {
  background: var(--accent);
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(40,48,70, 0.06);
  margin-bottom: 60px;
  padding: 40px 20px;
}


/* ===== ENSURE ADEQUATE SPACING BETWEEN SECTIONS & CARDS ===== */
.section + .section {
  margin-top: 32px;
}
.content-wrapper > * + * {
  margin-top: 12px;
}
.card + .card, .testimonial-card + .testimonial-card, .feature-item + .feature-item,.service-item + .service-item,.case-studies .text-section + .text-section {
  margin-top: 20px;
}

/* ===== Z-INDEX & PREVENT OVERLAP ===== */
header {z-index: 50;}
.mobile-menu {z-index: 120;}
.mobile-menu-toggle {z-index: 121;}
.cookie-banner {z-index: 5000;}
.cookie-modal-overlay {z-index: 5001;}

/* ===== UTILITY CLASSES ===== */
.mt-24 {margin-top: 24px !important;}
.mb-24 {margin-bottom: 24px !important;}
.mt-48 {margin-top: 48px !important;}
.mb-48 {margin-bottom: 48px !important;}
.text-center {text-align: center !important;}
.centered {justify-content: center !important; align-items: center !important;}
.visible {display: block !important;}
.hidden {display: none !important;}

/* ===== SELECTION COLOR ===== */
::selection {
  background: var(--secondary, #36A3D9);
  color: #fff;
}
