/* =====================================================
   MS-PROGRESS - astra-overrides.css
   Naglowek i stopka z Header/Footer Buildera Astry wygladaja jak w projekcie (strona/*.html).
   - #masthead ma klase .site-header, wiec sections.css / photo-hero.css / theme-dark.css
     (position:fixed, przezroczystosc, .is-stuck ze script.js, logo jasne/rewers) dzialaja bez zmian.
   - Marka (HTML 1) i przycisk (HTML 2) to markup projektu (.brand, .btn.btn--ghost.nav__cta).
   - Tu: neutralizacja tel/odstepow Astry + menu Astry w stylu .nav / .nav__dropdown + stopka w stylu .footer.
   Ladowany na koncu (po generated.css).
   ===================================================== */

/* ---------- Naglowek: tlo, wysokosc, kontener ---------- */
#masthead .main-header-bar,
#masthead .ast-primary-header-bar,
#masthead .ast-mobile-header-wrap .ast-primary-header-bar,
#masthead .ast-above-header-bar,
#masthead .ast-below-header-bar {
  background: transparent !important;
  border: 0 !important;
  min-height: 72px;
}
#masthead .site-primary-header-wrap.ast-container,
#masthead .ast-mobile-header-wrap .site-primary-header-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
#masthead .site-primary-header-wrap .ast-builder-grid-row {
  min-height: 72px;
  height: 72px;
  column-gap: 24px;
}
body.admin-bar #masthead { top: 32px; }
@media (max-width: 782px) { body.admin-bar #masthead { top: 46px; } }
/* Astra dokleja wpautop do elementow HTML */
#masthead .ast-builder-html-element p,
#colophon .ast-builder-html-element p:empty { margin: 0; }
#masthead .ast-builder-html-element > p { display: contents; }
/* Astra: 15px w elementach HTML; w projekcie naglowek dziedziczy 16px / 1.55 */
#masthead .ast-header-html,
#masthead .ast-builder-html-element {
  font-size: 16px;
  line-height: 1.55;
  display: flex;
  align-items: center;
}

/* Decyzja klienta 2026-09-28: podpis marki ciemniejszy niz w projekcie (--ink-400 byl slabo widoczny na jasnym tle).
   Specyficznosc (0,2,0): wygrywa z .brand__sub i .theme-dark .brand__sub, przegrywa z wariantem nad zdjeciem (photo-hero.css). */
.site-header .brand__sub { color: var(--ink-500); }
.theme-dark .site-header .brand__sub { color: var(--ink-400); }

/* ---------- Menu glowne (Astra) = .nav ---------- */
#masthead .main-header-bar-navigation,
#masthead .main-navigation,
#masthead .ast-main-header-bar-alignment { height: auto; }
#masthead .main-header-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  background: transparent;
  border: 0;
}
#masthead .main-header-menu > .menu-item { height: auto; line-height: normal; position: relative; display: block; }
/* Jak .nav w projekcie: jeden rzad, przy ciasnej szerokosci (1081-1150px) zawija sie tekst pozycji, nie cale pozycje */
#masthead .main-header-menu { flex-wrap: nowrap; }
#masthead .main-header-menu > .menu-item { flex: 0 1 auto; min-width: 0; }
#masthead .main-header-menu > .menu-item > .menu-link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-600);
  padding: 6px 0;
  line-height: 1.55;
  height: auto;
  position: relative;
  display: inline-block;
  transition: color 160ms var(--ease);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
#masthead .main-header-menu > .menu-item > .menu-link:hover,
#masthead .main-header-menu > .menu-item.current-menu-item > .menu-link,
#masthead .main-header-menu > .menu-item.current-menu-ancestor > .menu-link { color: var(--ink-900); }
#masthead .main-header-menu > .menu-item.current-menu-item > .menu-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
}
/* Strzalki Astry -> strzalki z projektu */
#masthead .main-header-menu .dropdown-menu-toggle,
#masthead .main-header-menu .ast-menu-toggle,
#masthead .main-header-menu .sub-menu .ast-icon { display: none !important; }
/* W projekcie link z podmenu (.nav__group > a) jest inline */
#masthead .main-header-menu > .menu-item-has-children > .menu-link { display: inline !important; }
/* Odstepy miedzy elementami prawej strony: tylko gap menu + margin .nav__cta (jak w .nav) */
#masthead .site-header-primary-section-right { gap: 28px; }
#masthead .site-header-primary-section-right > * { margin: 0; padding: 0; }
#masthead .main-header-menu > .menu-item-has-children > .menu-link::after {
  content: "\2193";
  display: inline-block;
  margin-left: 6px;
  font-size: 9px;
  transform: translateY(-1px);
  color: var(--ink-400);
  position: static;
  height: auto;
  background: none;
}

/* Podmenu = .nav__dropdown - pokazywanie/ukrywanie jak w projekcie (hover / focus-within) */
@media (min-width: 1081px) {
  #masthead .main-header-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: -16px;
    right: auto;
    width: auto;
    min-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border: 1px solid var(--ink-100) !important;
    border-radius: 2px;
    box-shadow: 0 30px 60px rgba(10, 20, 33, 0.12);
    padding: 12px;
    margin-top: 12px;
    font-weight: 400;
    line-height: 1.55;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 200ms;
    z-index: 60;
  }
  #masthead .main-header-menu .menu-item:hover > .sub-menu,
  #masthead .main-header-menu .menu-item:focus-within > .sub-menu,
  #masthead .main-header-menu .menu-item.focus > .sub-menu {
    left: -16px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}
#masthead .main-header-menu .sub-menu .menu-item { border: 0; }
#masthead .main-header-menu .sub-menu .menu-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-800);
  border-bottom: 1px solid var(--ink-100);
  background: transparent;
  position: relative;
}
#masthead .main-header-menu .sub-menu .menu-item:last-child > .menu-link { border-bottom: 0; }
#masthead .main-header-menu .sub-menu .menu-link::after {
  content: "\2192";
  margin-left: auto;
  color: var(--ink-400);
  font-size: 14px;
}
#masthead .main-header-menu .sub-menu .menu-link:hover,
#masthead .main-header-menu .sub-menu .current-menu-item > .menu-link { background: var(--ink-50); color: var(--ink-900); }

/* Przycisk w naglowku (HTML 2). W projekcie jest dzieckiem .nav, wiec obowiazuja go tez reguly
   `.nav a` (padding 6px 0, letter-spacing .08em, position relative) oraz .nav__cta { margin-left: 28px }. */
#masthead a.nav__cta {
  margin-left: 28px;
  padding: 6px 0;
  letter-spacing: 0.08em;
  position: relative;
  color: var(--ink-600);
  transition: color 160ms var(--ease);
}
#masthead a.nav__cta:hover { color: var(--paper); }
.theme-dark #masthead a.nav__cta { color: var(--ink-500); }
.theme-dark #masthead a.nav__cta:hover { color: var(--ink-900); }

/* Astra: `a, .site-header a *, .site-footer a * { transition: all .2s linear }` - projekt tych przejsc nie ma.
   Specyficznosc jak u Astry (plik ladowany pozniej), wiec przejscia z klas projektu dalej dzialaja. */
:where(body.msp-page) a,
:where(body.msp-page) .site-header a *,
:where(body.msp-page) .site-footer a * { transition: none; }
#masthead .main-header-menu .sub-menu .menu-link { transition: color 160ms var(--ease); }

/* ---------- Naglowek nad zdjeciem (odpowiednik photo-hero.css dla menu Astry) ---------- */
@media (min-width: 1081px) {
  body.has-photo-hero #masthead:not(.is-stuck) .main-header-menu > .menu-item > .menu-link { color: rgba(255, 255, 255, 0.78); }
  body.has-photo-hero #masthead:not(.is-stuck) .main-header-menu > .menu-item > .menu-link:hover,
  body.has-photo-hero #masthead:not(.is-stuck) .main-header-menu > .menu-item.current-menu-item > .menu-link,
  body.has-photo-hero #masthead:not(.is-stuck) .main-header-menu > .menu-item.current-menu-ancestor > .menu-link { color: #fff; }
  body.has-photo-hero #masthead:not(.is-stuck) .main-header-menu > .menu-item-has-children > .menu-link::after { color: rgba(255, 255, 255, 0.5); }
  body.has-photo-hero #masthead:not(.is-stuck) a.nav__cta { border-color: rgba(255, 255, 255, 0.32); color: #fff; }
  body.has-photo-hero #masthead:not(.is-stuck) a.nav__cta:hover { background: #fff; color: #14161a; }
}

/* ---------- Ciemny motyw ---------- */
.theme-dark #masthead .main-header-menu > .menu-item > .menu-link { color: var(--ink-500); }
.theme-dark #masthead .main-header-menu > .menu-item > .menu-link:hover,
.theme-dark #masthead .main-header-menu > .menu-item.current-menu-item > .menu-link { color: var(--ink-900); }
.theme-dark #masthead .main-header-menu .sub-menu { background: var(--paper); border-color: rgba(255, 255, 255, 0.08) !important; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); }
.theme-dark #masthead .main-header-menu .sub-menu .menu-link { color: var(--ink-700); border-bottom-color: rgba(255, 255, 255, 0.06); }
.theme-dark #masthead .main-header-menu .sub-menu .menu-link:hover { background: rgba(255, 255, 255, 0.04); color: var(--ink-900); }

/* ---------- Mobile (Astra <= 1080px - filtr astra_tablet_breakpoint w functions.php): przycisk menu = .nav-toggle, panel = .nav mobilne ---------- */
#masthead .ast-mobile-header-wrap .menu-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: 1px solid var(--ink-200);
  border-radius: 2px;
  color: var(--ink-900);
}
/* Ikona jak .nav-toggle w projekcie: 3 kreski 1.5px (top 13/19/25px, left/right 9px) zamiast SVG Astry */
#masthead .ast-mobile-header-wrap .menu-toggle { position: relative; }
#masthead .ast-mobile-header-wrap .menu-toggle .mobile-menu-toggle-icon,
#masthead .ast-mobile-header-wrap .menu-toggle svg { display: none; }
#masthead .ast-mobile-header-wrap .menu-toggle::before {
  content: "";
  position: absolute;
  left: 9px; right: 9px; top: 13px;
  height: 1.5px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
}
.theme-dark #masthead .ast-mobile-header-wrap .menu-toggle { color: var(--ink-900); }
body.has-photo-hero #masthead:not(.is-stuck) .ast-mobile-header-wrap .menu-toggle { color: #fff; border-color: rgba(255, 255, 255, 0.32); }
.theme-dark #masthead .ast-mobile-header-wrap .menu-toggle { border-color: rgba(255, 255, 255, 0.14); }
#masthead .ast-mobile-header-content {
  background: var(--paper) !important;
  border-bottom: 1px solid var(--ink-100);
  padding: 24px var(--gutter) 36px;
}
#masthead .ast-mobile-header-content .main-header-menu { flex-direction: column; align-items: stretch; gap: 0; }
#masthead .ast-mobile-header-content .menu-link {
  display: block;
  padding: 16px 0 !important;
  border-bottom: 1px solid var(--ink-100) !important;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-600) !important;
  background: transparent !important;
}
#masthead .ast-mobile-header-content .sub-menu { padding: 0 0 12px 16px; border: 0; box-shadow: none; }
#masthead .ast-mobile-header-content .sub-menu .menu-link { text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-size: 14px; color: var(--ink-800) !important; }
#masthead .ast-mobile-header-content .ast-header-html-2 { margin-top: 16px; }
#masthead .ast-mobile-header-content .nav__cta { margin-left: 0; }
.theme-dark #masthead .ast-mobile-header-content { background: var(--paper) !important; border-bottom-color: rgba(255, 255, 255, 0.08); }
.theme-dark #masthead .ast-mobile-header-content .menu-link { border-bottom-color: rgba(255, 255, 255, 0.06) !important; }

/* ---------- Stopka = .footer ---------- */
#colophon.site-footer {
  background: var(--ink-950);
  color: var(--ink-300);
  font-size: 13px;
  padding: 56px 0 40px;
}
#colophon .site-primary-footer-wrap,
#colophon .site-below-footer-wrap,
#colophon .site-above-footer-wrap { background: transparent !important; padding: 0; border: 0; min-height: 0; }
#colophon .ast-builder-grid-row-container-inner { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); box-sizing: border-box; }
#colophon .ast-builder-grid-row { max-width: none; margin: 0; }
/* Elementy HTML Astry: czcionka ze stopki (13px/1.55); wpautop -> <p> wokol linkow neutralne */
#colophon .ast-header-html,
#colophon .ast-builder-html-element,
#colophon .footer-widget-area { font-size: inherit; line-height: inherit; color: inherit; }
#colophon .ast-builder-html-element p:has(> a),
#colophon .ast-builder-html-element p:empty { display: contents; }
#colophon [data-section="sidebar-widgets-footer-widget-3"] .widget,
#colophon [data-section="sidebar-widgets-footer-widget-3"] .textwidget { margin: 0; font-size: inherit; color: inherit; }
#colophon .site-primary-footer-wrap .ast-builder-grid-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  align-items: start;
}
@media (max-width: 900px) {
  #colophon .site-primary-footer-wrap .ast-builder-grid-row { grid-template-columns: 1fr 1fr; }
}
#colophon .site-footer-section { display: block; margin: 0; padding: 0; }
#colophon .footer-widget-area,
#colophon .ast-footer-html-1,
#colophon .ast-footer-html-2 { margin: 0; padding: 0; text-align: left; }
#colophon .ast-builder-html-element { color: inherit; }
/* Widgety menu (Firma, Branze) = .footer__col */
#colophon .widget { margin: 0; }
#colophon .widget-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin: 0 0 16px;
  line-height: 1.55;
}
#colophon .widget_nav_menu ul { list-style: none; margin: 0; padding: 0; }
#colophon .widget_nav_menu li { margin: 0; padding: 0; }
#colophon .widget_nav_menu a { display: block; padding: 6px 0; color: var(--ink-200); text-decoration: none; }
#colophon .widget_nav_menu a:hover { color: var(--accent); }
#colophon [data-section="sidebar-widgets-footer-widget-2"] .widget_nav_menu a { display: flex; align-items: center; gap: 10px; }
#colophon [data-section="sidebar-widgets-footer-widget-2"] .widget_nav_menu a::before { content: "/"; font-family: var(--font-mono); font-size: 11px; color: var(--ink-500); }
/* Dolny pasek = .footer__bottom */
#colophon .site-below-footer-wrap .ast-builder-grid-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  /* Decyzja klienta 2026-09-28: jasniej niz w projekcie (--ink-500), zeby tekst byl lepiej widoczny */
  color: var(--ink-400);
}
#colophon .site-below-footer-wrap .site-footer-section { flex: 0 1 auto; }
#colophon .site-primary-footer-wrap .ast-builder-grid-row,
#colophon .site-below-footer-wrap .ast-builder-grid-row { min-height: 0 !important; }
/* photo-hero.css: .footer .social-links a { color: inherit } - stopka Astry nie ma klasy .footer */
#colophon .social-links a { color: inherit; }
/* Astra filtruje HTML elementow (wp_kses) i usuwa <svg> - ikony z projektu (te same sciezki, viewBox 24x24)
   rysujemy maska CSS w kolorze tekstu (currentColor), wiec hover z projektu dziala bez zmian. */
.social-links a::before {
  content: "";
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: var(--msp-icon) center / contain no-repeat;
  mask: var(--msp-icon) center / contain no-repeat;
}
.social-links a:has(svg)::before { display: none; }
.social-links a[href*="linkedin.com"] { --msp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.98 3.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5zM3 9h4v12H3zM9 9h3.8v1.7h.05c.53-1 1.83-2.05 3.77-2.05C20.6 8.65 21 11.1 21 14.3V21h-4v-5.9c0-1.4-.03-3.2-1.95-3.2-1.96 0-2.25 1.52-2.25 3.1V21H9z'/%3E%3C/svg%3E"); }
.social-links a[href*="facebook.com"] { --msp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.5 21v-7.5h2.5l.4-3h-2.9V8.6c0-.87.25-1.46 1.5-1.46h1.55V4.47A21 21 0 0 0 14.3 4.3c-2.2 0-3.8 1.35-3.8 3.83v2.37H8v3h2.5V21z'/%3E%3C/svg%3E"); }
.social-links a[href*="xing.com"] { --msp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.3 6.6h3.1l1.9 3.3-2.7 4.7H4.5l2.7-4.7zM15.9 3h3.2l-5.2 9.2 3.4 6.8h-3.2l-3.4-6.8z'/%3E%3C/svg%3E"); }
/* Projekt (styles.css a:not([class])) podkresla wszystkie linki kolumn stopki; linki menu Astry maja klase .menu-link */
#colophon .widget_nav_menu a { text-decoration: underline; text-underline-offset: 3px; }
#colophon .ast-footer-copyright,
#colophon .ast-footer-copyright p,
#colophon .ast-footer-html-3 { margin: 0; color: inherit; font-size: inherit; }
/* Menu dokumentow = .footer__legal */
#colophon .footer-nav-wrap ul { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; list-style: none; }
#colophon .footer-nav-wrap .menu-item { margin: 0; padding: 0; }
#colophon .footer-nav-wrap .menu-link { color: inherit; text-decoration: none; padding: 0; line-height: inherit; }
#colophon .footer-nav-wrap .menu-link:hover { color: #fff; text-decoration: underline; }
/* Ciemny motyw stopki */
.theme-dark #colophon.site-footer { background: #03080f; color: var(--ink-500); }
.theme-dark #colophon .site-primary-footer-wrap .ast-builder-grid-row { border-bottom-color: rgba(255, 255, 255, 0.06); }
.theme-dark #colophon .widget-title { color: var(--ink-400); }
.theme-dark #colophon .widget_nav_menu a { color: var(--ink-600); }
.theme-dark #colophon .widget_nav_menu a:hover { color: var(--accent); }
.theme-dark #colophon .site-below-footer-wrap .ast-builder-grid-row { color: var(--ink-500); }

/* ---------- Baner zgody na cookies i plansza mapy Google (logika w script.js) ---------- */
.msp-cc {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 300;
  width: min(560px, calc(100vw - 48px));
}
.msp-cc[hidden],
.msp-cc__settings[hidden],
.msp-cc [hidden] { display: none !important; }
.msp-cc__box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--paper);
  color: var(--ink-700);
  border: 1px solid var(--ink-100);
  border-radius: 2px;
  box-shadow: 0 30px 60px rgba(10, 20, 33, 0.16);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
}
.msp-cc__box p { margin: 0; }
.msp-cc__box p a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.msp-cc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
body .msp-cc .msp-cc__link {
  padding: 6px 0;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--ink-600);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
body .msp-cc .msp-cc__link:hover { color: var(--ink-900); background: none; }
.msp-cc__settings { display: flex; flex-direction: column; border-top: 1px solid var(--ink-100); }
.msp-cc__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ink-100);
  cursor: pointer;
}
body .msp-cc .msp-cc__row input {
  -webkit-appearance: auto;
  appearance: auto;
  flex: none;
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: var(--accent);
}
.msp-cc__row strong { display: block; font-weight: 600; font-size: 14px; color: var(--ink-900); }
.msp-cc__row small { display: block; font-size: 13px; color: var(--ink-500); }
.theme-dark .msp-cc__box { border-color: rgba(255, 255, 255, 0.08); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); }
.theme-dark .msp-cc__settings,
.theme-dark .msp-cc__row { border-color: rgba(255, 255, 255, 0.08); }
@media (max-width: 640px) {
  .msp-cc { left: 16px; right: 16px; bottom: 16px; width: auto; }
  .msp-cc__box { padding: 18px; }
  .msp-cc__actions .btn { flex: 1 1 auto; justify-content: center; }
}

.office-map--embed .msp-map-consent {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  height: 100%;
  min-height: 360px;
  padding: 32px;
  box-sizing: border-box;
  background: var(--canvas);
  border: 1px solid var(--ink-100);
}
.msp-map-consent p { margin: 0; max-width: 46ch; font-size: 14px; color: var(--ink-600); }
.msp-map-consent__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.msp-map-consent__actions a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.theme-dark .office-map--embed .msp-map-consent { border-color: rgba(255, 255, 255, 0.08); }

/* ---------- Poprawki responsywne (odstepstwo od projektu: w projekcie strona przewija sie w bok) ---------- */
/* Branza obronna: siatki "why" maja w projekcie style="" z liczba kolumn - skladamy je jak pozostale. */
@media (max-width: 1000px) {
  .why__grid.msp-s-823d07,
  .why__grid.msp-s-b509a4 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
  .why__grid.msp-s-823d07,
  .why__grid.msp-s-b509a4 { grid-template-columns: 1fr !important; }
}
/* Strefa wiedzy: zakladki filtra zawijaja sie zamiast wychodzic poza ekran. */
@media (max-width: 600px) {
  .knowledge-tabs { display: flex; flex-wrap: wrap; max-width: 100%; }
}

/* ---------- Przycisk "na gore" (logika w script.js) - lustrzane odbicie przelacznika motywu ---------- */
html body .msp-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 199;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: var(--paper, #fff);
  color: var(--ink-900, #0a1421);
  border: 1px solid var(--ink-200, #c7cdd9);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(10, 20, 33, 0.10);
  font-family: var(--font-mono, monospace);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease), box-shadow 200ms var(--ease),
              background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease),
              visibility 0s linear 200ms;
}
html body .msp-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
html body .msp-top:hover,
html body .msp-top:focus {
  background: var(--paper, #fff);
  color: var(--ink-900, #0a1421);
  border-color: var(--ink-200, #c7cdd9);
}
html body .msp-top.is-visible:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(10, 20, 33, 0.18);
}
html body .msp-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-dark body .msp-top,
.theme-dark body .msp-top:hover,
.theme-dark body .msp-top:focus {
  color: var(--accent);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
/* Baner cookies zajmuje ten sam rog - wtedy przycisk sie chowa. */
html body:has(.msp-cc:not([hidden])) .msp-top { opacity: 0; visibility: hidden; }
@media (max-width: 640px) {
  html body .msp-top { right: 16px; bottom: 16px; width: 40px; height: 40px; }
}

/* OWZ: w projekcie ".legal a.cert__dl:hover{color:#fff}" + przezroczyste tlo = bialy tekst na bialym. Po najechaniu tekst w kolorze akcentu (jak .cert__dl:hover). */
html body.msp-page .legal a.cert__dl:hover,
html body.msp-page .legal a.cert__dl:focus { color: var(--accent); background: transparent; }

/* Menu mobilne: "Branze" jako pelny wiersz, podmenu zawsze rozwiniete pod nim (jak .nav__dropdown w projekcie przy <=1080px). */
@media (max-width: 1080px) {
  #masthead .ast-mobile-header-content .main-header-menu > .menu-item-has-children > .menu-link { display: block !important; }
  #masthead .ast-mobile-header-content .main-header-menu .sub-menu {
    display: block !important;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    width: auto;
    min-width: 0;
    margin: 0;
    background: transparent;
  }
}
@media (max-width: 1080px) {
  #masthead .ast-mobile-header-content .sub-menu .menu-link { line-height: 1.55 !important; padding: 12px 0 !important; }
}
@media (max-width: 1080px) {
  .theme-dark #masthead .ast-mobile-header-content .sub-menu { background: transparent; box-shadow: none; border: 0 !important; }
}
/* O nas, "Inzynieria i proces": w projekcie style="grid-template-columns: 1fr 1fr" blokuje skladanie kart - na telefonie jedna kolumna (jak pages.css). */
@media (max-width: 900px) {
  .industry-cards[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

/* ---------- Przelacznik jezykow (inc/msp-i18n.php): flaga + kod, rozwijana lista ---------- */
.msp-lang { position: relative; display: inline-flex; align-items: center; margin-right: 24px; vertical-align: middle; }
html body .msp-lang__current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  margin: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink-600);
  cursor: pointer;
}
html body .msp-lang__current:hover,
html body .msp-lang__current:focus { background: none; color: var(--ink-900); }
html body .msp-lang__current:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.msp-lang__arrow { font-size: 9px; color: var(--ink-400); transition: transform 200ms var(--ease); }
.msp-lang.is-open .msp-lang__arrow { transform: rotate(180deg); }
.msp-flag {
  display: inline-block;
  flex: none;
  width: 20px;
  height: 14px;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 1px rgba(10, 20, 33, 0.14);
}
.msp-flag--pl { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Crect width='16' height='5' fill='%23fff'/%3E%3Crect y='5' width='16' height='5' fill='%23dc143c'/%3E%3C/svg%3E"); }
.msp-flag--de { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 3'%3E%3Crect width='5' height='1' fill='%23000'/%3E%3Crect y='1' width='5' height='1' fill='%23dd0000'/%3E%3Crect y='2' width='5' height='1' fill='%23ffce00'/%3E%3C/svg%3E"); }
.msp-flag--en { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3CclipPath id='a'%3E%3Cpath d='M0 0v30h60V0z'/%3E%3C/clipPath%3E%3CclipPath id='b'%3E%3Cpath d='M30 15h30v15zv15H0zH0V0zV0h30z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23a)'%3E%3Cpath d='M0 0v30h60V0z' fill='%23012169'/%3E%3Cpath d='M0 0l60 30m0-30L0 30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M0 0l60 30m0-30L0 30' clip-path='url(%23b)' stroke='%23C8102E' stroke-width='4'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23C8102E' stroke-width='6'/%3E%3C/g%3E%3C/svg%3E"); }
.msp-lang__list {
  position: absolute;
  top: 100%;
  right: -12px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  min-width: 190px;
  margin-top: 12px;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--ink-100);
  border-radius: 2px;
  box-shadow: 0 30px 60px rgba(10, 20, 33, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 200ms;
}
.msp-lang.is-open .msp-lang__list { opacity: 1; visibility: visible; transform: none; }
html body .msp-lang__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.3;
  color: var(--ink-800);
  text-decoration: none;
  white-space: nowrap;
}
html body .msp-lang__item:hover,
html body .msp-lang__item:focus,
html body .msp-lang__item.is-current { background: var(--ink-50); color: var(--ink-900); }
.msp-lang__item .msp-lang__code { min-width: 22px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-500); }
/* naglowek przezroczysty nad zdjeciem */
body.has-photo-hero #masthead:not(.is-stuck) .msp-lang__current,
body.has-photo-hero #masthead:not(.is-stuck) .msp-lang__current:hover { color: #fff; }
body.has-photo-hero #masthead:not(.is-stuck) .msp-lang__current .msp-lang__arrow { color: rgba(255, 255, 255, 0.5); }
/* ciemny motyw */
.theme-dark .msp-lang__list { background: var(--paper); border-color: rgba(255, 255, 255, 0.08); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); }
.theme-dark html body .msp-lang__item,
html.theme-dark body .msp-lang__item { color: var(--ink-700); }
html.theme-dark body .msp-lang__item:hover,
html.theme-dark body .msp-lang__item:focus,
html.theme-dark body .msp-lang__item.is-current { background: rgba(255, 255, 255, 0.04); color: var(--ink-900); }
.theme-dark .msp-flag { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }
/* menu mobilne: jezyki w rzedzie, bez listy rozwijanej */
@media (max-width: 1080px) {
  #masthead .ast-mobile-header-content .msp-lang { display: flex; margin: 0 0 20px; }
  #masthead .ast-mobile-header-content .msp-lang__current { display: none; }
  #masthead .ast-mobile-header-content .msp-lang__list {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  html body #masthead .ast-mobile-header-content .msp-lang__item { padding: 8px 12px; border: 1px solid var(--ink-100); background: transparent; }
  html body #masthead .ast-mobile-header-content .msp-lang__item.is-current { border-color: var(--ink-900); }
  #masthead .ast-mobile-header-content .msp-lang__name { display: none; }
  #masthead .ast-mobile-header-content .msp-lang__item .msp-lang__code { color: var(--ink-800); }
  html.theme-dark body #masthead .ast-mobile-header-content .msp-lang__item { border-color: rgba(255, 255, 255, 0.14); }
  html.theme-dark body #masthead .ast-mobile-header-content .msp-lang__item.is-current { border-color: var(--ink-900); }
}
@media (max-width: 1080px) {
  #masthead .ast-mobile-header-content .ast-header-html-2 .ast-builder-html-element { flex-direction: column; align-items: flex-start; }
}
/* Naglowek z przelacznikiem jezykow: bez zawijania; przy 1081-1279px bez podpisu przy logo (brak miejsca). */
#masthead .main-header-menu > .menu-item > .menu-link,
#masthead .msp-lang__current,
#masthead .nav__cta { white-space: nowrap; }
@media (min-width: 1081px) and (max-width: 1279px) {
  #masthead .brand__sub { display: none !important; }
}
/* Wersja niemiecka: dlugie wyrazy zlozone na waskich ekranach - automatyczne dzielenie wyrazow (lang="de-DE"). */
@media (max-width: 900px) {
  html[lang^="de"] body { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: anywhere; }
}
@media (min-width: 1081px) and (max-width: 1399px) {
  html[lang^="de"] #masthead .brand__sub { display: none !important; }
}
/* Decyzja klienta (tymczasowo): "Strefa wiedzy" ukryta w menu - pozycje menu z klasa msp-menu-ukryj (opcja msp_hidden_menu_items). */
.menu-item.msp-menu-ukryj { display: none !important; }

/* ---------- Pole pliku w jezyku strony (script.js): wyglad jak dotychczasowe natywne pole ---------- */
.msp-file { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; padding: 8px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.18); }
.msp-file .msp-file__input { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: 0 !important; border: 0 !important; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
html body .msp-file .msp-file__btn {
  flex: none;
  padding: 9px 14px;
  margin: 0;
  background: var(--accent);
  color: var(--ink-900);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
html body .msp-file .msp-file__btn:hover,
html body .msp-file .msp-file__btn:focus { background: var(--accent); color: var(--ink-900); }
html body .msp-file .msp-file__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.msp-file__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: 12px; color: var(--ink-300); }
.theme-dark .msp-file__name { color: #fff; }
