/* === GŁÓWNA NAWIGACJA === */
.main-nav {
  width: 100%;
  background: #ededed;
  border-bottom: 1.5px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 16px 40px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
}

/* Logo */
.nav-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.main-logo {
  display: block;
  height: 110px;
}

/* Linki w centrum */
.nav-center {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
}
.nav-center li {
  display: flex;
  align-items: center;
}
.nav-center li a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #009B72;               /* zielony motyw */
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 600;
  font-size: 1.14rem;
  line-height: 1.15;
  min-height: 42px;
  padding-bottom: 2px;          /* kompensacja podkreślenia */
  transition: color .2s;
}
.nav-center li a:hover,
.nav-center li a.active { color: #065b3a; }

.nav-center li a.active {
  padding-bottom: 0;            /* utrzymuje wysokość */
}

/* Prawa część  numer telefonu */
.nav-right { flex: 0 0 auto; display: flex; align-items: center; }
.phone-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #009B72;
  color: #fff;
  padding: 10px 24px;
  border-radius: 22px;
  font-weight: 700;
  font-size: 1.09rem;
  line-height: 1.1;
  text-decoration: none;
  transition: background .18s;
  box-shadow: 0 2px 8px rgba(0, 155, 114, .12);
}
.phone-btn:hover { background: #037f5a; }

/* hamburger menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}
.menu-toggle span {
  width: 22px;
  height: 2px;
  background: #009B72;
  transition: all .3s ease;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }
.menu-toggle.active {
  position: fixed;
  top: 20px;
  right: 20px;
}
.menu-toggle.active span { background: #fff; }

body.menu-open {
  overflow: hidden;
}

@media (max-width: 1200px) {
  .main-nav {
    gap: 18px;
    padding: 14px 24px;
  }
  .main-logo {
    height: 96px;
  }
  .nav-center {
    gap: 24px;
  }
  .nav-center li a {
    font-size: 1rem;
  }
}

/* === RESPONSYWNOŚĆ === */
@media (max-width: 900px) {
  .main-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px 14px;
    gap: 12px;
  }
  .nav-left {
    order: 1;
  }
  .main-logo {
    height: 78px;
  }
  .nav-right {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .nav-center {
    display: none;
    order: 4;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .nav-center.open {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(12, 20, 17, .96);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    padding: 74px 24px 28px;
    overflow-y: auto;
  }
  .nav-center.open li {
    width: min(100%, 340px);
    text-align: center;
  }
  .nav-center.open li a {
    color: #009B72;
    font-size: clamp(1.15rem, 4.4vw, 1.55rem);
    font-weight: 800;
    text-transform: none;
    line-height: 1.2;
    min-height: auto;
    padding: 6px 0;
  }
  .nav-center.open li a:hover { color: #065b3a; }
  .phone-btn {
    width: min(100%, 320px);
    text-align: center;
    margin-top: 0;
  }
  .menu-toggle {
    display: flex;
    order: 2;
    align-self: center;
  }
}

/* Dodatkowe korekty układu */
@media (max-width: 800px) {
  .logo-box { margin-right: 0; margin-bottom: 6px; }
  .why-grid, .footer-grid { grid-template-columns: 1fr; gap: 18px; }
  .about-section, .why-section { padding: 30px 0 18px; }
}

@media (max-width: 520px) {
  .main-nav {
    padding: 10px 14px 12px;
  }
  .main-logo {
    height: 70px;
  }
  .phone-btn {
    width: 100%;
    font-size: 1rem;
    padding: 11px 16px;
  }
}
