.mm-site-header {
  background: #071a30;
  border-bottom: 1px solid rgb(220 227 234 / 8%);
  color: #fff;
  margin: 0;
  padding: 0 !important;
  position: relative;
  z-index: 50;
}

.mm-site-header__inner {
  align-items: center;
  display: grid;
  gap: clamp(1.5rem, 3.4vw, 4.5rem);
  grid-template-columns: minmax(270px, auto) 1fr auto;
  margin: 0 !important;
  max-width: none !important;
  min-height: 90px;
  padding-inline: clamp(2.5rem, 3.85vw, 4rem);
  width: 100% !important;
}

.mm-brand {
  align-items: center;
  color: #fff;
  display: inline-flex;
  gap: 0.9rem;
  line-height: 1;
  text-decoration: none;
}

.mm-brand__bolt {
  background: linear-gradient(145deg, #ffd13d, #f3b915);
  clip-path: polygon(51% 0, 100% 0, 65% 41%, 94% 41%, 28% 100%, 45% 57%, 8% 57%);
  display: inline-block;
  flex: 0 0 auto;
  height: 64px;
  width: 38px;
}

.mm-brand__name {
  display: grid;
  font-family: "Barlow Semi Condensed", sans-serif;
  line-height: 0.95;
}

.mm-brand__name strong {
  font-size: clamp(1.4rem, 1.75vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.mm-brand__name small {
  color: #9fb0c8;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.045em;
  margin-top: 0.42rem;
}

.mm-site-header__nav {
  align-items: stretch;
  display: flex;
  font-family: "Barlow Semi Condensed", sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
  gap: clamp(1.4rem, 2.6vw, 2.8rem);
  justify-content: center;
  line-height: 1;
}

.mm-site-header__nav a {
  align-items: center;
  color: #c3cfe0;
  display: inline-flex;
  min-height: 90px;
  position: relative;
  text-decoration: none;
  transition: color 160ms ease-out;
  white-space: nowrap;
}

/* The lit item follows the view: "Strona główna" on the front page, "Oferta" on a service page. */
.home .mm-site-header__nav [data-mm-nav="home"],
.page-template-page-usluga .mm-site-header__nav [data-mm-nav="offer"],
.page-template-page-realizacje .mm-site-header__nav [data-mm-nav="works"],
.mm-site-header__nav .is-active {
  color: #fff;
  font-weight: 700;
}

.home .mm-site-header__nav [data-mm-nav="home"]::after,
.page-template-page-usluga .mm-site-header__nav [data-mm-nav="offer"]::after,
.page-template-page-realizacje .mm-site-header__nav [data-mm-nav="works"]::after,
.mm-site-header__nav .is-active::after {
  background: #f4c542;
  border-radius: 999px;
  bottom: 22px;
  content: "";
  height: 3px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 28px;
}

.mm-site-header__cta,
.mm-mobile-call {
  align-items: center;
  color: #fff;
  display: inline-flex;
  font-family: "Barlow Semi Condensed", sans-serif;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
}

.mm-site-header__cta {
  background: transparent;
  border: 1.5px solid rgb(220 227 234 / 34%);
  border-radius: 10px;
  font-size: 1.3rem;
  gap: 0.7rem;
  letter-spacing: 0.015em;
  min-height: 54px;
  padding: 0.8rem 1.35rem;
  transition: border-color 160ms ease-out, background-color 160ms ease-out;
  white-space: nowrap;
}

.mm-site-header__cta svg {
  color: #f4c542;
}

.mm-mobile-call {
  background: #175dff;
}

.mm-site-header__cta svg,
.mm-mobile-call svg {
  fill: none;
  height: 24px;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 24px;
}

.mm-site-header__mobile-actions {
  display: none;
}

.mm-site-header a:focus-visible,
.mm-nav-toggle:focus-visible {
  outline: 2px solid #f4c542;
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .mm-site-header__nav a:hover {
    color: #fff;
  }

  .mm-site-header__cta:hover {
    background: rgb(255 255 255 / 6%);
    border-color: rgb(244 197 66 / 72%);
  }

  .mm-mobile-call:hover {
    background: #0c4fe6;
  }
}

.mm-site-header__cta:active,
.mm-mobile-call:active,
.mm-nav-toggle:active {
  transform: scale(0.98);
}

/* The inline gutter mirrors the hero copy column, so the brand shares the H1 edge. */
@media (min-width: 1600px) {
  .mm-site-header__inner {
    padding-inline: max(4rem, calc((100vw - 1760px) / 2 + 4rem));
  }
}

@media (max-width: 1400px) {
  .mm-site-header__inner {
    padding-inline: 3rem;
  }
}

@media (max-width: 1240px) {
  .mm-site-header__inner {
    gap: 1.5rem;
    grid-template-columns: auto 1fr auto;
  }

  .mm-brand__name strong {
    font-size: 1.38rem;
  }

  .mm-site-header__nav {
    font-size: 1rem;
    gap: 1.25rem;
  }

  .mm-site-header__cta {
    font-size: 1.12rem;
    padding-inline: 1rem;
  }
}

@media (max-width: 1180px) {
  .mm-site-header__inner {
    padding-inline: 2rem;
  }
}

@media (max-width: 980px) {
  .mm-site-header__inner {
    display: flex;
    justify-content: space-between;
    min-height: 72px;
    padding-inline: clamp(1.25rem, 5vw, 3rem);
  }

  .mm-brand {
    gap: 0.6rem;
  }

  .mm-brand__bolt {
    height: 47px;
    width: 28px;
  }

  .mm-brand__name strong {
    font-size: 1.18rem;
  }

  .mm-brand__name small {
    font-size: 0.62rem;
    margin-top: 0.3rem;
  }

  .mm-site-header__nav,
  .mm-site-header__cta {
    display: none;
  }

  .mm-site-header__mobile-actions {
    align-items: center;
    display: flex;
    gap: 0.55rem;
  }

  .mm-mobile-call {
    border-radius: 50%;
    height: 46px;
    width: 46px;
  }

  .mm-mobile-menu {
    position: relative;
  }

  .mm-nav-toggle {
    align-content: center;
    cursor: pointer;
    display: grid;
    gap: 5px;
    height: 46px;
    justify-content: center;
    list-style: none;
    width: 46px;
  }

  .mm-nav-toggle::-webkit-details-marker {
    display: none;
  }

  .mm-nav-toggle span {
    background: #fff;
    height: 2px;
    transition: transform 180ms ease-out, opacity 120ms ease-out;
    width: 23px;
  }

  .mm-mobile-menu[open] .mm-nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mm-mobile-menu[open] .mm-nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .mm-mobile-menu[open] .mm-nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .mm-mobile-menu nav {
    background: #0b2240;
    border: 1px solid rgb(220 227 234 / 12%);
    border-radius: 10px;
    box-shadow: 0 18px 45px rgb(2 11 20 / 45%);
    display: grid;
    min-width: 220px;
    padding: 0.5rem;
    position: absolute;
    right: 0;
    top: calc(100% + 0.65rem);
  }

  .mm-mobile-menu nav a {
    border-radius: 6px;
    color: #e4ebf7;
    font-family: "Barlow Semi Condensed", sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0.75rem 0.85rem;
    text-decoration: none;
  }

  .mm-mobile-menu nav a:focus-visible,
  .mm-mobile-menu nav a:active {
    background: rgb(255 255 255 / 7%);
  }

  /* The service pages sit under "Oferta" like a short sub-list on the yellow wire. */
  .mm-mobile-menu nav a.mm-mobile-menu__service {
    border-left: 2px solid rgb(244 197 66 / 55%);
    border-radius: 0 6px 6px 0;
    font-size: 0.98rem;
    font-weight: 500;
    margin-left: 0.85rem;
    padding: 0.6rem 0.8rem;
    white-space: nowrap;
  }

  .mm-mobile-menu nav a[aria-current="page"] {
    color: #f4c542;
  }
}

@media (max-width: 600px) {
  .mm-site-header__inner {
    padding-inline: 1rem;
  }
}

@media (max-width: 380px) {
  .mm-brand__name strong {
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-site-header__nav a,
  .mm-site-header__cta,
  .mm-mobile-call,
  .mm-nav-toggle span {
    transition: none;
  }
}
