/* ================== 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;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}
body {
  min-height: 100%;
  width: 100%;
  background: linear-gradient(135deg, #d1e3eb 0%, #fff 100%);
  font-family: 'Roboto', Arial, sans-serif;
  color: #224E65;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-repeat: no-repeat;
}

img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}
a {
  color: #224E65;
  text-decoration: none;
  transition: color 0.2s;
}
a:focus {
  outline: 2px dashed #F9C846;
  outline-offset: 2px;
}
ul, ol {
  padding-left: 24px;
}

/* ================== TYPOGRAPHY ================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  color: #224E65;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-weight: 700;
}
h1 { font-size: 2.5rem; margin-bottom: 20px; }
h2 { font-size: 2rem; margin-bottom: 16px; }
h3 { font-size: 1.25rem; margin-bottom: 12px; }
h4 { font-size: 1.1rem; margin-bottom: 10px; }

p {
  margin-bottom: 18px;
  color: #224E65;
  font-weight: 400;
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.1rem; }
}

strong, b {
  font-weight: bold;
  color: #224E65;
}

/* ================== CONTAINER ================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ================== HEADER ================== */
header {
  background: #fff;
  box-shadow: 0 1px 16px 0 rgba(34, 78, 101, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.logo { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; }

.main-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 30px;
}
.main-nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: #224E65;
  position: relative;
  padding: 2px 0;
  transition: color 0.2s;
}
.main-nav a:hover, .main-nav a:focus {
  color: #F9C846;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(90deg, #224e65 0%, #5986a8 100%);
  color: #fff;
  border-radius: 28px;
  padding: 12px 28px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  box-shadow: 0 2px 8px rgba(34, 78, 101, 0.09);
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s, color 0.15s;
  margin-left: 24px;
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(90deg, #1b4256 0%, #224e65 100%);
  color: #F9C846;
  box-shadow: 0 4px 18px rgba(34,78,101,0.14);
}

/* Burger toggle for mobile */
.mobile-menu-toggle {
  background: #224E65;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.9rem;
  padding: 7px 13px;
  margin-left: 10px;
  cursor: pointer;
  display: none;
  z-index: 1202;
  transition: background 0.2s, color 0.2s;
}
.mobile-menu-toggle:focus {
  background: #F9C846;
  color: #224E65;
}

/* Hide burger on desktop */
@media (max-width: 1040px) {
  .main-nav {
    display: none;
  }
  .btn-primary {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}

/* =============== MOBILE MENU OVERLAY ================ */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(34,78,101, 0.98);
  color: #fff;
  z-index: 2100;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 40px;
  padding-left: 0;
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 2200;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: #F9C846;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
  width: 100%;
  margin: 80px 0 0 36px;
}
.mobile-nav a {
  color: #fff;
  font-size: 1.25rem;
  padding: 9px 0;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  width: 100%;
  letter-spacing: 0.03em;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: #F9C846;
  background: rgba(255,255,255,0.08);
}

@media (min-width: 1041px) {
  .mobile-menu, .mobile-menu-toggle {
    display: none !important;
  }
}

/* ======================= HERO SECTION =======================*/
.hero {
  background: linear-gradient(120deg, #224e65 0%, #418dc8 100%);
  color: #fff;
  min-height: 320px;
  display: flex;
  align-items: center;
  margin-bottom: 60px;
  position: relative;
  overflow: hidden;
}
.hero .container {
  justify-content: flex-start;
  height: 100%;
}
.hero .content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 650px;
}
.hero h1, .hero p {
  color: #fff;
}
.hero .btn-primary {
  margin-left: 0;
  margin-top: 18px;
}

@media (max-width: 768px) {
  .hero {
    min-height: 180px;
    padding: 32px 0;
    margin-bottom: 36px;
  }
  .hero .content-wrapper {
    gap: 12px;
  }
}

/* =================== SECTION DEFAULT =================== */
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
@media (max-width: 768px) {
  section, .section {
    padding: 28px 12px;
    margin-bottom: 38px;
  }
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  width: 100%;
}

.text-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 16px;
}

/* ========== FLEXBOX LAYOUT PATTERNS ========== */
.feature-grid, .system-list, .solution-grid, .service-cards, .case-list, .blog-card-grid, .card-container, .content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 10px;
}
.card-container {
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 3px 14px 0 rgba(34, 78, 101, 0.09);
  margin-bottom: 20px;
  position: relative;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.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) {
  .feature-grid, .system-list, .solution-grid, .service-cards, .case-list, .blog-card-grid, .card-container, .content-grid, .text-image-section {
    flex-direction: column !important;
    gap: 20px;
  }
}

/***** FEATURES & ITEMS *****/
.feature, .system-item, .solution-item, .service-card, .case-item, .blog-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 8px rgba(34, 78, 101, 0.08);
  padding: 30px 22px 26px 22px;
  min-width: 200px;
  flex: 1 1 210px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  transition: box-shadow 0.23s, transform 0.24s;
  margin-bottom: 20px;
  position: relative;
}
.feature:hover, .system-item:hover, .solution-item:hover, .service-card:hover, .case-item:hover, .blog-card:hover {
  box-shadow: 0 6px 24px rgba(34, 78, 101, 0.12);
  transform: translateY(-4px) scale(1.02);
}

.feature img, .system-item img {
  height: 44px;
  width: 44px;
  margin-bottom: 8px;
}

.solution-item h3, .service-card h3 {
  color: #224E65;
}

/***** TESTIMONIALS & SLIDER *****/
.testimonial-slider {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  padding: 26px 22px 22px 22px;
  border-radius: 14px;
  box-shadow: 0 1px 13px 0 rgba(34, 80, 110, 0.08);
  min-width: 230px;
  flex: 1 1 240px;
  margin-bottom: 20px;
  transition: box-shadow 0.2s, transform 0.21s;
  color: #224E65;
}
.testimonial-card .stars {
  font-size: 1.28rem;
  letter-spacing: 0.1em;
  color: #F9C846;
  font-weight: 700;
}
.testimonial-card .customer {
  font-size: 1rem;
  font-style: italic;
  color: #5986a8;
}
.testimonial-card:hover {
  box-shadow: 0 8px 24px 0 rgba(34, 78, 101, 0.14);
  transform: translateY(-2px);
}

/***** BENEFIT LIST *****/
.benefit-list {
  list-style: disc inside;
  color: #224E65;
  font-size: 1.05rem;
  margin-left: 14px;
}
.benefit-list li {
  margin-bottom: 12px;
  padding-left: 2px;
}

/***** Feature Item Pattern *****/
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* ============== CASE STUDIES (/referencje.html) ============== */
.case-list {
  gap: 24px;
}
.case-item {
  background: #fff;
  border-radius: 13px;
  box-shadow: 0 1px 11px rgba(34,78,101,0.07);
  padding: 28px 20px 22px 20px;
  min-width: 200px;
  flex: 1 1 230px;
  transition: box-shadow 0.16s, transform 0.17s;
  margin-bottom: 20px;
}
.case-item:hover {
  box-shadow: 0 4px 14px rgba(34,78,101,0.11);
  transform: translateY(-2px);
}

/***** Blog Cards *****/
.blog-card-grid {
  gap: 24px;
  margin-bottom: 10px;
}
.blog-card {
  background: #fff;
  border-radius: 13px;
  padding: 26px 20px 22px 20px;
  box-shadow: 0 1px 11px rgba(34,78,101,0.08);
  min-width: 200px;
  flex: 1 1 250px;
  margin-bottom: 20px;
  transition: box-shadow 0.16s, transform 0.17s;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.blog-card:hover {
  box-shadow: 0 4px 15px rgba(34,78,101,0.14);
  transform: translateY(-2px);
}
.blog-card a {
  color: #224E65;
  font-weight: 700;
  transition: color 0.15s;
  margin-top: 3px;
}
.blog-card a:hover, .blog-card a:focus {
  color: #F9C846;
}

/***** Contact Details Pattern *****/
.contact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 28px;
}

@media (max-width: 768px) {
  .contact-details {
    flex-direction: column;
    gap: 18px;
  }
}

.contact-details ul {
  list-style: none;
  margin-left: 0;
}
.contact-details li {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.contact-details img {
  width: 22px;
  height: 22px;
}

/***** Footer *****/
footer {
  background: #224e65;
  color: #fff;
  padding: 35px 0 15px 0;
  margin-top: 0;
}
footer .container {
  flex-direction: column;
  gap: 20px;
}
.footer-nav {
  display: flex;
  flex-direction: row;
  gap: 32px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.footer-nav a {
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
  font-family: 'Montserrat', Arial, sans-serif;
  transition: color 0.15s;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: #F9C846;
  text-decoration: underline;
}
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  font-size: 0.98rem;
  margin-bottom: 14px;
}
.footer-contact img {
  width: 20px;
  height: 20px;
  margin-right: 6px;
}
.footer-copy {
  color: #d1e3eb;
  font-size: 0.95rem;
  padding-top: 8px;
  letter-spacing: 0.03em;
}
@media (max-width: 768px) {
  .footer-nav, .footer-contact {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }
  .footer-copy {
    text-align: left;
    font-size: 0.92rem;
  }
}

/* ================== SPACING BETWEEN CARDS & SECTIONS ================== */
section, .section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card, .feature, .system-item, .solution-item, .service-card, .case-item, .blog-card, .testimonial-card {
  margin-bottom: 20px;
}
.card-container, .feature-grid, .service-cards, .case-list, .blog-card-grid, .testimonial-slider, .system-list, .solution-grid, .content-grid {
  gap: 24px;
}

/* =========== BUTTONS/INTERACTIVE ELEMENTS ============== */
button, .btn-primary, [type="button"] {
  outline: none;
}
button:focus, .btn-primary:focus, [type="button"]:focus {
  outline: 2px solid #F9C846;
}

.btn-primary {
  box-shadow: 0 2px 8px rgba(34,78,101,0.08);
}

/* ================== LISTS ================== */
ul, ol {
  margin-bottom: 16px;
}

li {
  margin-bottom: 10px;
  font-size: 1.03rem;
}

/**** Misc - Superscript for case studies ****/
sup { font-size: 0.9em; vertical-align: top; }

/**** Animations & Smooth Transitions ****/
* {
  transition: box-shadow 0.17s, color 0.17s, background 0.24s, border 0.2s;
}

/* ================= COOKIE BANNER ================ */
.cookie-banner {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  background: #224E65;
  color: #fff;
  padding: 22px 20px 18px 20px;
  z-index: 99999;
  box-shadow: 0 -1px 12px rgba(34, 78, 101, 0.11);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
  transition: transform 0.35s cubic-bezier(0.42,0,0.58,1);
}
.cookie-banner.hide {
  transform: translateY(120%);
}
.cookie-banner-message {
  font-size: 1.02rem;
  color: #fff;
  font-weight: 400;
  max-width: 450px;
}
.cookie-banner-btns {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
}
.cookie-banner-btns .btn-cookie {
  background: #F9C846;
  color: #224E65;
  border: none;
  border-radius: 26px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  padding: 10px 24px;
  margin-left: 0;
  box-shadow: 0 2px 7px rgba(34,78,101,0.10);
  transition: background 0.18s, color 0.15s;
}
.btn-cookie-settings {
  background: #fff;
  color: #224E65;
  border: none;
  margin-left: 0;
  font-size: 1rem;
  border-radius: 26px;
  padding: 10px 20px;
  font-weight: 600;
}
.btn-cookie-reject {
  background: #d1e3eb;
  color: #224E65;
}
.cookie-banner-btns .btn-cookie:hover, .cookie-banner-btns .btn-cookie:focus {
  background: #ffe58f;
  color: #224E65;
}

@media (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 8px;
  }
  .cookie-banner-message {
    font-size: 0.98rem;
    max-width: 100%;
  }
}

/***** COOKIE MODAL *****/
.cookie-modal {
  display: none;
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(34, 78, 101, 0.75);
  z-index: 100000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.35s cubic-bezier(.4,0,.2,1);
}
.cookie-modal.open {
  display: flex;
}
.cookie-modal-dialog {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 38px rgba(34,78,101,0.14);
  max-width: 410px;
  width: 98vw;
  padding: 30px 26px 24px 26px;
  color: #224E65;
  font-family: 'Roboto', Arial, sans-serif;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: slideInUp 0.38s cubic-bezier(.3,1.2,.2,1);
  position: relative;
}
.cookie-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #224E65;
  font-size: 1.7rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.17s;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  color: #F9C846;
}
.cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cookie-category label {
  font-size: 1rem;
  font-family: 'Montserrat', Arial, sans-serif;
  color: #224E65;
  font-weight: 500;
}
.cookie-category input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #F9C846;
  cursor: pointer;
}
/* Essential cookies note */
.cookie-category .cookie-essential {
  color: #555;
  font-size: 0.93rem;
  font-style: italic;
}
.cookie-modal-actions {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}
.cookie-modal-actions .btn-cookie {
  min-width: 110px;
}

@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes slideInUp {
  from { transform: translateY(110px); opacity: 0; } to { transform: translateY(0); opacity: 1; }
}

/* ================== MEDIA QUERIES for RESPONSIVENESS ================== */
@media (max-width: 1040px) {
  header .container {
    flex-direction: row;
    flex-wrap: nowrap;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 14px;
  }
}
@media (max-width: 900px) {
  .feature-grid, .system-list, .solution-grid, .service-cards, .case-list, .blog-card-grid, .testimonial-slider {
    flex-wrap: wrap;
    gap: 16px;
  }
}
@media (max-width: 600px) {
  .feature, .system-item, .solution-item, .service-card, .case-item, .blog-card {
    padding: 16px 10px 17px 10px;
    font-size: 0.97rem;
    min-width: 150px;
  }
  .testimonial-card {
    padding: 16px 10px 15px 10px;
    min-width: 120px;
  }
}

/* ===================== FORMS (contact & newsletter, optional) ===================== */
input, textarea {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1rem;
  border-radius: 9px;
  border: 1px solid #d1e3eb;
  padding: 12px 12px 12px 17px;
  margin-bottom: 16px;
  background: #fff;
  color: #224E65;
  transition: border 0.18s;
}
input:focus, textarea:focus {
  border: 1.5px solid #F9C846;
}
label {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 500;
  color: #224E65;
  margin-bottom: 5px;
  font-size: 1rem;
}

/* ================== SCROLLBAR STYLES ================== */
::-webkit-scrollbar { width: 12px; background: #d1e3eb; }
::-webkit-scrollbar-thumb { background: #224e65; border-radius: 40px; }

/* ================== ACCESSIBILITY HOVERS & STATES ================== */
a:focus, .btn-primary:focus, .btn-cookie:focus {
  outline: 2px solid #F9C846;
  outline-offset: 2px;
  z-index: 1002;
}

/* ========== VISUAL HIERARCHY + SPACING =========== */
.section h2 { margin-bottom: 22px; }
.section p { margin-bottom: 16px; }
.section .btn-primary {
  margin-top: 14px;
}

/* =================== ADDITIONAL MODERN EFFECTS =================== */
.feature, .system-item, .solution-item, .service-card, .case-item, .blog-card {
  border-left: 5px solid #F9C846;
  border-top: 0;
  border-bottom: 0;
  border-right: 0;
}

/***** Z-INDEX LAYERS for overlays and header *****/
header { z-index: 1200; position: sticky; top: 0; }
.mobile-menu { z-index: 2100; }
.cookie-banner { z-index: 99999; }
.cookie-modal { z-index: 100000; }

/* Prevent overlapping: adequate margins and padding everywhere. */