/* Naglowek: logo | menu | telefon + jezyk. */
.site-header { position: relative; z-index: 99; height: var(--bz-header-h); }
.header-main { background: #fff; width: 100%; transition: box-shadow .3s; }
.header-main.is-stuck { position: fixed; top: 0; left: 0; right: 0; box-shadow: 0 2px 12px rgba(0, 0, 0, .08); }
.header-container { max-width: 1440px; padding-left: 67px; padding-right: 0; }
.header-inner { display: flex; align-items: flex-end; height: var(--bz-header-h); }

.branding { flex: 0 0 auto; align-self: center; }
.branding .block { margin: 0; }
.logo-site { display: block; height: 64px; width: auto; max-width: 230px; }

.main-menu { flex: 1 1 auto; padding-left: 30px; text-align: right; }
.main-nav { list-style: none; margin: 0; padding: 0; display: inline-flex; }
.main-nav > li > a {
  display: block; padding: 20px; font-family: var(--bz-font-menu); font-size: 17px; font-weight: 700;
  line-height: 31.96px; text-transform: uppercase; color: var(--bz-heading);
}
.main-nav > li > a:hover, .main-nav > li.is-active-trail > a { color: var(--bz-pink); }
.main-nav-sub { display: none; }

.header-right { flex: 0 0 265px; align-self: stretch; padding: 24px 10px; text-align: center; position: relative; }
.header-right .block { margin: 0 20px 0 0; }
.header-right p { margin: 0; }
.header-right a { color: var(--bz-heading); }

/* Jezyki – desktop */
.lang-switcher { position: absolute; right: 30px; top: 77px; z-index: 9; text-align: left; }
.lang-current {
  background: none; border: 0; padding: 0; font-size: 16px; color: #000; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.lang-flag::before { content: ""; display: inline-block; width: 13px; height: 13px; vertical-align: -2px; color: var(--bz-pink); background-color: currentColor; -webkit-mask: url("../icons/fa/globe.svg") center / contain no-repeat; mask: url("../icons/fa/globe.svg") center / contain no-repeat; }
.lang-current .fa-caret-down { font-size: 12px; }
.lang-list {
  list-style: none; margin: 4px 0 0; padding: 6px 0; display: none; position: absolute; right: 0;
  background: #fff; min-width: 70px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.lang-switcher.is-open .lang-list { display: block; }
.lang-list li { padding: 0 16px; line-height: 30px; font-size: 16px; }
.lang-list li.is-active { display: none; }

/* Przelacznik w menu jest tylko dla widoku mobilnego. */
@media (min-width: 1200px) { .main-menu .lang-switcher { display: none; } }

/* Mobile: hamburger + panel boczny */
.menu-bar {
  position: relative; width: 36px; height: 32px; border: 0; background: none; padding: 0; margin-left: auto; display: block;
}
.menu-bar span { position: absolute; left: 6px; width: 24px; height: 2px; background: #222; transition: transform .3s, opacity .3s; }
.menu-bar span:nth-child(1) { top: 9px; }
.menu-bar span:nth-child(2) { top: 15px; }
.menu-bar span:nth-child(3) { top: 21px; }

@media (max-width: 1199.98px) {
  .site-header { height: 96px; }
  .header-container { padding-left: 15px; padding-right: 15px; }
  .header-inner { height: 96px; align-items: center; }
  .main-menu { padding-left: 20px; }
  .offcanvas-mobile {
    position: fixed; top: 0; left: -350px; width: 350px; max-width: 90vw; height: 100vh; z-index: 999;
    background: #fff; box-shadow: 0 4px 4px 1px rgba(0, 0, 0, .2); overflow-y: auto; text-align: left;
    transition: left .35s ease; padding-top: 50px;
  }
  .offcanvas-mobile.is-open { left: 0; }
  .offcanvas-close { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 22px; }
  .main-nav { display: block; padding: 0 20px; }
  .main-nav > li { border-bottom: 1px solid var(--bz-border); padding: 5px 0 10px; margin-bottom: 8px; text-align: center; }
  .main-nav > li > a { padding: 0; font-family: var(--bz-font-heading); line-height: 32px; color: #000; }
  .offcanvas-mobile .lang-switcher { position: static; padding: 20px; border-bottom: 1px solid var(--bz-border); }
  .offcanvas-mobile .lang-current { display: none; }
  .offcanvas-mobile .lang-list { display: flex; justify-content: center; gap: 6px; position: static; box-shadow: none; padding: 0; margin: 0; }
  .offcanvas-mobile .lang-list li { display: block; padding: 0; }
  .offcanvas-mobile .lang-list li + li::before { content: "|"; margin-right: 6px; color: var(--bz-text); }
  .offcanvas-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 998; }
}

/* Menu mobilne nad szarym przyciemnieniem (panel jest w naglowku, ktory tworzy wlasny kontekst warstw). */
@media (max-width: 1199.98px) {
  .site-header { z-index: 1001; }
  .offcanvas-overlay { z-index: 1000; }
}

/* Przycisk telefonu w naglowku (ikona + numer, klikniecie dzwoni). */
.bz-call {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 20px; border-radius: 30px;
  background: var(--bz-pink); color: #fff !important; font-family: var(--bz-font-menu); font-weight: 700;
  font-size: 16px; line-height: 1; white-space: nowrap; transition: background .25s, transform .25s, box-shadow .25s;
  box-shadow: 0 4px 12px rgba(27, 78, 155, .25);
}
.bz-call i { font-size: 15px; transform: scaleX(-1); }
.bz-call:hover, .bz-call:focus { background: #000; color: #fff !important; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.bz-call:focus-visible { outline: 3px solid var(--bz-yellow); outline-offset: 2px; }

/* Wybor jezyka (komputer): rozowe tlo, wysrodkowane skroty. */
@media (min-width: 1200px) {
  .header-right .lang-current {
    background: var(--bz-pink); color: #fff; border-radius: 30px; padding: 9px 16px; min-width: 76px;
    justify-content: center; font-family: var(--bz-font-menu); font-weight: 700; font-size: 16px; line-height: 1;
    box-shadow: 0 4px 12px rgba(27, 78, 155, .25); transition: background .25s;
  }
  .header-right .lang-current:hover, .header-right .lang-switcher.is-open .lang-current { background: #000; }
  .header-right .lang-flag::before { color: #fff; }
  .header-right .lang-list {
    left: 0; right: 0; min-width: 0; margin-top: 6px; padding: 6px 0; border-radius: 14px;
    background: var(--bz-pink); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); text-align: center;
  }
  .header-right .lang-list li { padding: 0; line-height: 34px; font-family: var(--bz-font-menu); font-weight: 700; }
  .header-right .lang-list a { display: block; color: #fff; }
  .header-right .lang-list a:hover, .header-right .lang-list a:focus { background: rgba(0, 0, 0, .18); color: #fff; }
}

/* Hover przyciskow w naglowku: zywszy roz + uniesienie + rozowa poswiata (zamiast czarnego). */
.bz-call:hover, .bz-call:focus {
  background: #ff2fa6; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(27, 78, 155, .45);
}
@media (min-width: 1200px) {
  .header-right .lang-current:hover, .header-right .lang-switcher.is-open .lang-current {
    background: #ff2fa6; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(27, 78, 155, .45);
  }
  .header-right .lang-current { transition: background .25s, transform .25s, box-shadow .25s; }
  .header-right .lang-list a:hover, .header-right .lang-list a:focus { background: #ff2fa6; }
}

/* Wybor jezyka: przycisk bez tla (ikona + napis), rozowa tylko rozwinieta lista. */
@media (min-width: 1200px) {
  .header-right .lang-current,
  .header-right .lang-current:hover,
  .header-right .lang-switcher.is-open .lang-current {
    background: none; box-shadow: none; transform: none; color: #000; padding: 6px 4px; min-width: 0;
  }
  .header-right .lang-flag::before { color: var(--bz-pink); }
  .header-right .lang-current:hover, .header-right .lang-switcher.is-open .lang-current { color: var(--bz-pink); }
  .header-right .lang-list { left: 50%; right: auto; transform: translateX(-50%); min-width: 76px; }
}

/* Telefon w rozwijanym menu (tylko telefon/tablet). */
#block-buzzi-phone-mobile { display: none; }
@media (max-width: 1199.98px) {
  #block-buzzi-phone-mobile { display: block; padding: 24px 20px; text-align: center; }
  #block-buzzi-phone-mobile .bz-call { font-size: 18px; padding: 12px 26px; }
}

/* Wszystkie strony (komputer): telefon i wybor jezyka w jednej linii z menu. */
@media (min-width: 1200px) {
  .header-right {
    flex: 0 0 auto; align-self: flex-end; height: 72px; padding: 0 30px 0 20px; margin-bottom: 0;
  }
  .header-right > div { display: flex; align-items: center; gap: 24px; height: 100%; }
  .header-right .block { margin: 0; }
  .header-right p { margin: 0; line-height: 1; }
  .header-right .lang-switcher { position: relative; top: auto; right: auto; }
}

/* Menu z 7 pozycjami: bez zawijania; ciasniej na mniejszych ekranach komputerowych (ponizej 1200 px dziala menu mobilne). */
.main-nav > li > a { white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1439.98px) {
  .main-nav > li > a { padding-left: 12px; padding-right: 12px; font-size: 16px; }
  .main-menu { padding-left: 10px; }
}

/* Menu mobilne dziala do 1199 px: bootstrapowe d-lg-* przelaczaja dopiero od 992 px, wiec wyrownujemy je tutaj. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .menu-bar.d-lg-none, .offcanvas-close.d-lg-none { display: block !important; }
  .header-right.d-lg-block { display: none !important; }
}

/* Podstrony oferty (usluga): pozycja "Oferta" w menu glownym na rozowo. */
body:has(article.node--type-service) .main-nav > li:has(> a[href$="/oferta"]) > a { color: var(--bz-pink); }
/* Pojedyncza realizacja / case study: odpowiednia pozycja menu na rozowo. */
body:has(.realizacja-page--real) .main-nav > li:has(> a[href$="/realizacje"]) > a,
body:has(.realizacja-page--case) .main-nav > li:has(> a[href$="/case-study"]) > a { color: var(--bz-pink); }

/* Gorny pasek (adres, telefon, e-mail, jezyk) */
.topbar { background: var(--bz-navy, #132447); color: #fff; font-size: 14px; }
.topbar a { color: #fff; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 52px; flex-wrap: wrap; }
.topbar .block { margin: 0; }
.topbar ul, .topbar .topbar-info { display: flex; gap: 24px; list-style: none; padding: 0; margin: 0; align-items: center; flex-wrap: wrap; }
.topbar i, .topbar svg { margin-right: 6px; }
