/* Mega menu ACF
 *
 * header     .acf-mega-header          — pasek (logo + belka + burger)
 * logo       .acf-mega-logo
 * burger     .acf-mega-burger        — tylko <=1024px
 * 1. poziom  .acf-mega-trigger       — Oferta, Wiedza…
 * panel      .acf-mega-panel        — dropdown 2+3
 * 2. poziom  .acf-mega-tab          — zakładki lewej kolumny
 * 3. poziom  .acf-mega-sublink      — własne linki
 *            .acf-mega-feed         — blog / case / webinar / e-book
 *            .acf-mega-features     — wyróżniki
 *            --1 jedno zdjęcie, --2 dwa obok, --many karuzela
 * CTA        .acf-mega-cta
 *
 * .is-current / .is-open / .is-active
 * Desktop: @media (min-width: 1025px)
 * Mobile:  @media (max-width: 1024px)
 */

/* ========== WSPÓLNE (desktop + mobile) ========== */

/* Pasek: logo + belka + burger */

.acf-mega-header {
  /* Od ilu % wysokości otwartego menu zaczyna się biel. Mniejsza = wcześniej biało, większa = dłużej szaro. */
  --acf-mega-white-stop: 50%;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  font-family: CabinetGrotesk, sans-serif;
  overflow: visible;
  z-index: 10000;
  background: transparent;
}

/* Zamknięte: solid #F7F7F7 jak hero. Otwarte: gradient do bieli + cień. */
.acf-mega-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--acf-mega-surface-h, 100%);
  background-color: #F7F7F7;
  background-image: none;
  background-size: 100% var(--acf-mega-gradient-h, 420px);
  background-repeat: no-repeat;
  background-position: top;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
  z-index: 0;
}

.acf-mega-header:has(.acf-mega-item.is-open)::before,
.acf-mega-header.is-open::before {
  border-radius: 0 0 14px 14px;
  background-image: linear-gradient(#F7F7F7 0%, #FFFFFF var(--acf-mega-white-stop, 50%));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 60px 0 rgba(21, 27, 58, 0.18);
}

.acf-mega-header > * {
  position: relative;
  z-index: 1;
}

.acf-mega-header::after {
  content: none;
}

body.acf-mega-lock {
  overflow: hidden;
}

.acf-mega-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
  min-height: 87.5px;
}

/* Podkreślenie tylko pod contentem belki (szerokość .container), nie na całą stronę. */
.acf-mega-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #1415130F;
  pointer-events: none;
  z-index: 2;
}

.acf-mega-nav--header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 96px;
  min-width: 0;
  flex: 1 1 auto;
}

.acf-mega-logo-img {
  display: block;
  height: 30px;
  width: auto;
  max-width: 200px;
}

.acf-mega-logo-img--light {
  filter: brightness(0) invert(1);
}

/* MENU MOBILE: hamburger — białe kółko */

.acf-mega-burger {
  width: 40px;
  height: 40px;
  border: 0;
  background: #fff;
  color: #151B3A;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(21, 27, 58, 0.1);
  cursor: pointer;
  padding: 0;
}

.acf-mega-burger svg {
  display: block;
}

.acf-mega-header.is-open .acf-mega-burger-open {
  display: none;
}

.acf-mega-header.is-open .acf-mega-burger-close {
  display: flex;
}

.acf-mega-actions {
  display: none;
}

.acf-mega-back,
.acf-mega-tab-chevron,
.acf-mega-trigger-arrow {
  display: none;
}

.acf-mega-feature-caption {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin-top: 12px;
  color: #141513;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.acf-mega-cta {
  background: #151B3A;
  padding: 10px 22px;
  font-size: 16px;
  font-weight: 700;
  line-height: 150%;
  white-space: nowrap;
  text-decoration: none;
}

.acf-mega-cta:hover {
  background: #151B3A;
  color: #fff;
}

/* ========== 1. POZIOM — górna belka ========== */

.acf-mega-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px 8px;
}

.acf-mega-trigger {
  font-size: 16px;
  font-weight: 400;
  line-height: 150%;
  padding: 8px 16px;
  position: relative;
  text-decoration: none;
  color: #686A6A;
}

.acf-mega-trigger:hover,
.acf-mega-item.is-open > .acf-mega-trigger,
.acf-mega-item.is-current > .acf-mega-trigger {
  color: #141513;
}

/* Podkreślenie tylko dla aktywnego linku — bez hover / otwartego panelu. */
.acf-mega-item.is-current > .acf-mega-trigger::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2.5px;
  border-radius: 6px;
  background: #2EAD54;
}

.acf-mega-chevron {
  transition: transform 0.2s ease;
}

.acf-mega-item.is-open > .acf-mega-trigger .acf-mega-chevron {
  transform: rotate(180deg);
}

/* ========== PANEL (2. + 3. poziom) ========== */

.acf-mega-panel {
  display: none;
  background: transparent;
}

.acf-mega-item.is-open > .acf-mega-panel {
  display: block;
}

.acf-mega-panel-inner {
  min-height: 220px;
}

/* 2. POZIOM — zakładki lewej kolumny */

.acf-mega-sidebar {
  width: 280px;
  /*padding-top: 44px;*/
  /*padding-bottom: 40px;*/
  padding-right: 16px;
  border-right: 1px solid #e7e9ed;
}

.acf-mega-tab {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #141513;
  font-family: inherit;
  font-size: 18px;
  line-height: 150%;
  font-weight: 700;
  padding: 14px 18px;
  border-radius: 8px;
}

.acf-mega-tab .acf-mega-arrow {
  opacity: 0;
  margin-left: 12px;
}

.acf-mega-tab--link,
.acf-mega-tab--static {
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.acf-mega-tab--static {
  cursor: default;
}

.acf-mega-tab.is-active,
.acf-mega-tab:hover {
  background: #ebecef;
}

.acf-mega-tab.is-current {
  color: #41ad49;
}

.acf-mega-tab.is-current.is-active,
.acf-mega-tab.is-current:hover {
  background: #e8f6ea;
}

.acf-mega-tab.is-active .acf-mega-arrow,
.acf-mega-tab:hover .acf-mega-arrow {
  opacity: 1;
}

/* 2. POZIOM — style_2: zwykła kolumna (jak 3. poziom: kicker + linki) */

.acf-mega-sidebar--style-2 {
  /*padding-top: 47px;*/
  padding-top: 0;
}

.acf-mega-sidebar--style-2 .acf-mega-sidebar-tabs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.acf-mega-sidebar--style-2 .acf-mega-tab {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  padding: 0;
  border-radius: 0;
  color: #141513;
}

.acf-mega-sidebar--style-2 .acf-mega-tab.is-active {
  background: transparent;
}

.acf-mega-sidebar--style-2 .acf-mega-tab:hover,
.acf-mega-sidebar--style-2 .acf-mega-tab.is-current {
  background: transparent;
  color: #41ad49;
}

.acf-mega-sidebar--style-2 .acf-mega-tab.is-current {
  font-weight: 700;
}

.acf-mega-panel--typed .acf-mega-sidebar--feed .acf-mega-feed-list {
  max-width: 100%;
}

/* 3. POZIOM — treść prawej części panelu */

.acf-mega-content {
  /*padding: 47px 8px 40px 72px;*/
  padding: 0 8px 0 72px;
}

.acf-mega-desktop-leaf-features {
  display: none;
}

.acf-mega-pane.is-active {
  display: block;
}

.acf-mega-kicker {
  color: #141513B2;
  font-size: 11px;
  font-weight: 700;
  margin: 0 0 16px;
}

.acf-mega-kicker-2 {
  color: #41AD49;
  font-size: 11px;
  font-weight: 700;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 1.98px;
  line-height: 16.5px;
}

.acf-mega-link-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  row-gap: 12px;
}

.acf-mega-link-grid.acf-mega-link-grid--cats {
  grid-template-columns: 1fr;
  column-gap: 0;
}

.acf-mega-sublink {
  color: #141513;
  font-size: 16px;
  font-weight: 400;
  line-height: 150%;
  text-decoration: none;
}

span.acf-mega-sublink,
div.acf-mega-feature,
span.acf-mega-cta {
  cursor: default;
}

a.acf-mega-feature {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

a.acf-mega-feature:hover .acf-mega-feature-caption,
a.acf-mega-feature.is-current .acf-mega-feature-caption {
  color: #41ad49;
}

.acf-mega-sublink:hover,
.acf-mega-sublink.is-current {
  color: #41ad49;
}

.acf-mega-sublink.is-current {
  font-weight: 700;
}

/* 3. POZIOM — feed: blog / case studies / webinary / e-booki */

.acf-mega-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 420px;
}

.acf-mega-feed-link {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.acf-mega-feed-all {
  display: inline-block;
  margin-top: 14px;
  color: #141513;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.acf-mega-feed-all:hover,
.acf-mega-feed-all.is-current {
  color: #41ad49;
}

/* 3. POZIOM WYROZNIKI: --1 jedno zdjecie (bez karuzeli), --2 dwa obok, --many karuzela */

.acf-mega-features {
  margin-left: 40px;
  padding-left: 32px;
  border-left: 1px solid #e7e9ed;
  flex: 0 0 auto;
}

.acf-mega-features.acf-mega-features--solo {
  margin-left: auto;
  padding-left: 0;
  border-left: 0;
}

.acf-mega-features--1 {
  width: auto;
  margin-left: auto;
}

.acf-mega-features--2 .acf-mega-feature-carousel {
  width: auto;
  max-width: 483px; /* 2 × 213.5 + 56 */
}

/* Karuzela: wypełnia rodzica i ucina nadmiar (scroll w tracku). */
.acf-mega-features--many {
  flex: 1 1 auto;
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.acf-mega-features--many .acf-mega-feature-carousel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.acf-mega-features--many.acf-mega-features--solo {
  width: auto;
  max-width: 100%;
  margin-left: auto;
}

.acf-mega-features--many .acf-mega-feature-list {
  width: max-content;
  max-width: none;
}

/* Bez karuzeli: rząd kart do prawej. W karuzeli lista od lewej (żeby nie ucinać). */
.acf-mega-features--many:not(:has(.acf-mega-feature-carousel)) .acf-mega-feature-list {
  margin-left: auto;
}

/* KARUZELA: opakowanie strzalek + track (tylko gdy >1 wyroznik) */

.acf-mega-feature-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.acf-mega-feature-track {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  flex: 1 1 auto;
  min-width: 0;
}

.acf-mega-feature-track::-webkit-scrollbar {
  display: none;
}

.acf-mega-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  gap: 56px;
}

.acf-mega-feature-list > li {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.acf-mega-features--1 .acf-mega-feature-list {
  display: block;
}

.acf-mega-features--1 .acf-mega-feature-list > li {
  flex-basis: auto;
}

.acf-mega-features--2 .acf-mega-feature-list > li,
.acf-mega-features--many .acf-mega-feature-list > li {
  flex: 0 0 213.5px;
  width: 213.5px;
}

.acf-mega-feature {
  display: block;
  color: #151b3a;
  width: 213.5px;
  max-width: 213.5px;
}

/* 1 wyróżnik: 313.5 × 210 */
.acf-mega-features--1 .acf-mega-feature {
  width: 313.5px;
  max-width: 313.5px;
}

/* 2+ wyróżniki: 213.5 × 197 */
.acf-mega-features--2 .acf-mega-feature,
.acf-mega-features--many .acf-mega-feature {
  width: 213.5px;
  max-width: 213.5px;
}

.acf-mega-feature-picture {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  width: 213.5px;
  height: 197px;
  max-width: 213.5px;
  max-height: 197px;
}

.acf-mega-features--1 .acf-mega-feature-picture {
  width: 313.5px;
  height: 210px;
  max-width: 313.5px;
  max-height: 210px;
}

.acf-mega-features--2 .acf-mega-feature-picture,
.acf-mega-features--many .acf-mega-feature-picture {
  width: 213.5px;
  height: 197px;
  max-width: 213.5px;
  max-height: 197px;
}

.acf-mega-feature-img {
  display: block;
  width: 213.5px;
  height: 197px;
  max-width: none;
  max-height: none;
  aspect-ratio: 213.5 / 197;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
}

.acf-mega-features--1 .acf-mega-feature-img {
  width: 313.5px;
  height: 210px;
  aspect-ratio: 313.5 / 210;
}

.acf-mega-features--2 .acf-mega-feature-img,
.acf-mega-features--many .acf-mega-feature-img {
  width: 213.5px;
  height: 197px;
  aspect-ratio: 213.5 / 197;
}

.acf-mega-feature-picture .acf-mega-feature-img,
.acf-mega-features--1 .acf-mega-feature-picture .acf-mega-feature-img,
.acf-mega-features--2 .acf-mega-feature-picture .acf-mega-feature-img,
.acf-mega-features--many .acf-mega-feature-picture .acf-mega-feature-img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

.acf-mega-features--vertical .acf-mega-feature-list,
.acf-mega-features--vertical .acf-mega-features--1 .acf-mega-feature-list,
.acf-mega-features--vertical.acf-mega-features--1 .acf-mega-feature-list,
.acf-mega-features--vertical.acf-mega-features--2 .acf-mega-feature-list,
.acf-mega-features--vertical.acf-mega-features--many .acf-mega-feature-list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.acf-mega-features--vertical .acf-mega-feature-list > li,
.acf-mega-features--vertical.acf-mega-features--2 .acf-mega-feature-list > li,
.acf-mega-features--vertical.acf-mega-features--many .acf-mega-feature-list > li {
  flex: none;
  width: 213.5px;
}

.acf-mega-features--vertical.acf-mega-features--1 .acf-mega-feature-list > li {
  width: 313.5px;
}

.acf-mega-feature-img--mob {
  display: none;
}

/* KARUZELA STRZALKI: ukryte, az JS doda .has-overflow */

.acf-mega-feature-nav {
  display: none;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ebecef;
  color: #151b3a;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.acf-mega-feature-carousel.has-overflow .acf-mega-feature-nav {
  display: inline-flex;
}

.acf-mega-feature-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.acf-mega-feature-nav:hover:not(:disabled) {
  background: #dfe2e7;
}

.admin-bar .acf-mega-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .acf-mega-header {
    top: 46px;
  }
}

/* Offset contentu = wysokość belki ACF (zamiast starego .primary-top: 85px).
   Bez doliczania admin bara — WP już odpycha html przez margin-top. */
.has-acf-mega-menu .primary-top {
  padding-top: 87.5px;
}

@media (max-width: 1024px) {
  .has-acf-mega-menu .primary-top {
    padding-top: 64px;
  }
}

/* MENU DESKTOP (od 1025px): hover, panel pod belka */
@media (min-width: 1025px) {
  .acf-mega-actions {
    display: none;
  }

  .acf-mega-back,
  .acf-mega-tab-chevron,
  .acf-mega-trigger-arrow,
  .acf-mega-mobile-features {
    display: none;
  }

  .acf-mega-desktop-leaf-features {
    display: block;
  }

  .acf-mega-desktop-leaf-features .acf-mega-pane-grid {
    justify-content: flex-end;
    width: 100%;
  }

  .acf-mega-desktop-leaf-features .acf-mega-feature-list,
  .acf-mega-desktop-leaf-features .acf-mega-features--1 .acf-mega-feature-list {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    width: 100%;
  }

  /* Karuzela (--many): od lewej, żeby overflow nie ucinał pierwszej karty. */
  .acf-mega-desktop-leaf-features .acf-mega-features--many .acf-mega-feature-list {
    justify-content: flex-start;
    width: max-content;
    max-width: none;
  }

  .acf-mega-desktop-leaf-features .acf-mega-features--vertical .acf-mega-feature-list,
  .acf-mega-desktop-leaf-features .acf-mega-features--vertical.acf-mega-features--1 .acf-mega-feature-list,
  .acf-mega-desktop-leaf-features .acf-mega-features--vertical.acf-mega-features--2 .acf-mega-feature-list,
  .acf-mega-desktop-leaf-features .acf-mega-features--vertical.acf-mega-features--many .acf-mega-feature-list {
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
  }

  .acf-mega-desktop-leaf-features .acf-mega-feature-track {
    display: block;
    justify-content: flex-start;
  }

  .acf-mega-desktop-leaf-features .acf-mega-features--1 .acf-mega-feature-track,
  .acf-mega-desktop-leaf-features .acf-mega-features--2 .acf-mega-feature-track {
    display: flex;
    justify-content: flex-end;
  }

  .acf-mega-nav--header {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    min-width: 0;
    gap: 96px;
  }

  .acf-mega-list {
    width: auto;
    flex: 0 1 auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 2px 6px;
    align-items: stretch;
    align-self: stretch;
  }

  .acf-mega-item {
    display: flex;
    align-items: center;
  }

  .acf-mega-item--has-panel {
    position: static;
  }

  .acf-mega-trigger {
    height: 100%;
  }

  .acf-mega-panel {
    position: fixed;
    left: 0;
    right: 0;
    top: 72px;
    width: 100%;
  }

  .admin-bar .acf-mega-panel {
    top: 120px;
  }

  .acf-mega-cta {
    align-self: center;
    margin-left: 8px;
  }

  .acf-mega-item--cta {
    margin-left: 16px;
  }

  .acf-mega-pane-grid--1,
  .acf-mega-pane-grid--2,
  .acf-mega-pane-grid--many,
  .acf-mega-pane-grid--features-only {
    justify-content: flex-end;
  }

  .acf-mega-pane-grid--many {
    min-width: 0;
    overflow: hidden;
  }

  /* Wyróżniki zawsze do prawej — także samotne. */
  .acf-mega-pane-grid--1 .acf-mega-features,
  .acf-mega-pane-grid--2 .acf-mega-features,
  .acf-mega-pane-grid--many .acf-mega-features,
  .acf-mega-pane-grid--features-only .acf-mega-features,
  .acf-mega-pane-grid--many .acf-mega-features--solo,
  .acf-mega-features--solo {
    margin-left: auto;
  }

  .acf-mega-pane-grid--many .acf-mega-features:not(.acf-mega-features--solo) {
    flex: 1 1 auto;
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .acf-mega-features--1 .acf-mega-feature-list,
  .acf-mega-features--2 .acf-mega-feature-list {
    justify-content: flex-end;
    margin-left: auto;
  }

  .acf-mega-content {
    min-width: 0;
    overflow: hidden;
  }

  .acf-mega-panel-inner {
    min-width: 0;
  }

  .acf-mega-pane-grid--1 .acf-mega-links {
    flex: 0 0 425.5px;
    width: 425.5px;
    max-width: 425.5px;
  }

  .acf-mega-pane-grid--2 .acf-mega-links,
  .acf-mega-pane-grid--many .acf-mega-links {
    flex: 0 0 256px;
    width: 256px;
    max-width: 256px;
  }

  .acf-mega-pane-grid--2 .acf-mega-link-grid,
  .acf-mega-pane-grid--many .acf-mega-link-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .acf-mega-pane-grid--2 .acf-mega-feed-list,
  .acf-mega-pane-grid--many .acf-mega-feed-list {
    max-width: 100%;
  }

  .acf-mega-panel--typed .acf-mega-links {
    flex: 0 0 256px;
    width: 256px;
    max-width: 256px;
  }

  /* style_3: kategorie | wyróżniki. Okno = 3 karty (3 × 213.5 + 2 × 56), 4+ przewija karuzela. */
  .acf-mega-panel--style-3 .acf-mega-features--many {
    flex: 0 1 auto;
  }

  .acf-mega-panel--style-3 .acf-mega-features--many .acf-mega-feature-carousel {
    width: auto;
  }

  .acf-mega-panel--style-3 .acf-mega-feature-track {
    flex: 0 1 752.5px;
    max-width: 752.5px;
  }
}

/* MENU MOBILE (do 1024px): drill-down + accordion */
@media (max-width: 1024px) {
  .acf-mega-header.is-open::before {
    height: 100dvh;
    border-radius: 0;
  }

  .acf-mega-bar {
    min-height: 64px;
  }

  .acf-mega-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .acf-mega-header.is-open .acf-mega-cta--bar {
    display: none;
  }

  .acf-mega-cta--bar {
    padding: 8px 16px;
    font-size: 14px;
  }

  .acf-mega-cta--bar .acf-mega-arrow {
    width: 12px;
    height: 8px;
    margin-left: 6px;
  }

  .acf-mega-cta--nav {
    display: none;
  }

  .acf-mega-header.is-open .acf-mega-cta--nav {
    display: flex;
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: center;
    margin-top: auto;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 8px;
    padding: 14px 22px;
    font-size: 16px;
  }

  .acf-mega-header.is-open:has(.acf-mega-item.is-open) .acf-mega-cta--nav {
    display: none;
  }

  .acf-mega-nav--header {
    display: none;
  }

  .acf-mega-header.is-open .acf-mega-nav--header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    position: fixed;
    left: 0;
    right: 0;
    top: 64px;
    bottom: 0;
    z-index: 2;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 16px 16px;
    background: transparent;
    min-width: 0;
    flex: none;
    width: 100%;
    max-width: none;
  }

  .admin-bar .acf-mega-header.is-open .acf-mega-nav--header {
    top: calc(46px + 64px);
  }

  .acf-mega-header.is-open .acf-mega-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    padding: 0;
    gap: 4px;
    flex: 1 0 auto;
  }

  .acf-mega-item {
    width: 100%;
    border-bottom: 1px solid #e7e9ed;
  }

  .acf-mega-item--cta {
    border-bottom: 0;
    margin: 16px 0 8px;
  }

  .acf-mega-header.is-open .acf-mega-item.is-open {
    border-bottom: 1px solid #e7e9ed;
  }

  .acf-mega-header.is-open .acf-mega-trigger {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    font-size: 20px;
    font-weight: 400;
    line-height: 150%;
    letter-spacing: 0%;
    color: #141513;
  }

  .acf-mega-trigger:hover,
  .acf-mega-item.is-open > .acf-mega-trigger,
  .acf-mega-item.is-current > .acf-mega-trigger {
    color: #141513;
  }

  .acf-mega-item--has-panel > .acf-mega-trigger::after,
  .acf-mega-item.is-current > .acf-mega-trigger::after {
    display: none;
  }

  .acf-mega-trigger .acf-mega-chevron {
    display: none;
  }

  .acf-mega-trigger-arrow {
    display: flex;
    align-items: center;
    margin-left: auto;
  }

  .acf-mega-trigger-arrow .acf-mega-arrow {
    margin-left: 0;
  }

  .acf-mega-back {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 18px 0;
    border: 0;
    border-bottom: 1px solid #e7e9ed;
    background: transparent;
    color: #141513;
    font-family: inherit;
    font-size: 20px;
    font-weight: 400;
    line-height: 150%;
    letter-spacing: 0%;
    text-align: left;
    cursor: pointer;
  }

  .acf-mega-panel {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    top: 64px;
    bottom: 0;
    z-index: 4;
    margin: 0;
    padding: 0 16px 16px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-image: linear-gradient(#F7F7F7 0%, #FFFFFF 50%);
    background-size: 100% 100vh;
    background-repeat: no-repeat;
    transform: translate3d(100%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.38s;
  }

  .acf-mega-panel[hidden] {
    display: block;
  }

  .acf-mega-header.is-open .acf-mega-item.is-open > .acf-mega-panel {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  .acf-mega-header:not(.is-open) .acf-mega-panel {
    transition: none;
    transform: translate3d(100%, 0, 0);
    visibility: hidden;
  }

  .admin-bar .acf-mega-panel {
    top: calc(46px + 64px);
  }

  @media (prefers-reduced-motion: reduce) {
    .acf-mega-panel,
    .acf-mega-pane,
    .acf-mega-pane.is-active {
      transition: none;
    }
  }

  .acf-mega-panel .container {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    min-width: 0;
    box-sizing: border-box;
  }

  .acf-mega-panel-inner {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
  }

  .acf-mega-sidebar {
    width: 100%;
    border-right: 0;
    padding: 0;
  }

  .acf-mega-sidebar:not(.acf-mega-sidebar--feed) > .acf-mega-kicker {
    display: none;
  }

  .acf-mega-sidebar-tabs {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .acf-mega-tab,
  .acf-mega-sidebar--style-2 .acf-mega-tab {
    font-size: 18px;
    font-weight: 700;
    line-height: 150%;
    padding: 18px 0;
    letter-spacing: 0%;
    border-radius: 0;
    color: #141513;
    border-bottom: 1px solid #e7e9ed;
  }

  .acf-mega-tab.is-active,
  .acf-mega-tab:hover,
  .acf-mega-tab.is-current,
  .acf-mega-tab.is-current.is-active,
  .acf-mega-tab.is-current:hover,
  .acf-mega-sidebar--style-2 .acf-mega-tab.is-active,
  .acf-mega-sidebar--style-2 .acf-mega-tab:hover,
  .acf-mega-sidebar--style-2 .acf-mega-tab.is-current,
  .acf-mega-sidebar--style-2 .acf-mega-tab.is-active,
  .acf-mega-sidebar--style-2 .acf-mega-tab.is-current {
    background: transparent;
    color: #141513;
    font-weight: 700;
  }

  .acf-mega-tab .acf-mega-arrow {
    display: none;
  }

  .acf-mega-tab-chevron {
    display: flex;
    align-items: center;
    margin-left: auto;
    transition: transform 0.2s ease;
  }

  .acf-mega-tab.is-active .acf-mega-tab-chevron {
    transform: rotate(180deg);
  }

  .acf-mega-tab.is-active {
    border-bottom: 0;
  }

  .acf-mega-content {
    padding: 0;
  }

  .acf-mega-pane,
  .acf-mega-pane.is-active {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    padding: 0;
    pointer-events: none;
    transition: grid-template-rows 0.38s cubic-bezier(0.22, 1, 0.36, 1),
                padding 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .acf-mega-pane.is-active {
    grid-template-rows: 1fr;
    padding: 0 0 20px;
    border-bottom: 1px solid #e7e9ed;
    pointer-events: auto;
  }

  .acf-mega-pane > .acf-mega-pane-grid {
    min-height: 0;
    overflow: hidden;
  }

  .acf-mega-pane-grid {
    flex-direction: column;
  }

  .acf-mega-links {
    padding-left: 4px;
  }

  .acf-mega-kicker {
    margin: 4px 0 12px;
  }

  .acf-mega-link-grid {
    grid-template-columns: 1fr;
    row-gap: 12px;
    column-gap: 0;
  }

  .acf-mega-feed-list {
    max-width: 100%;
    gap: 12px;
  }

  .acf-mega-feed-link {
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }

  .acf-mega-content,
  .acf-mega-pane-grid,
  .acf-mega-features,
  .acf-mega-mobile-features,
  .acf-mega-mobile-feature-list,
  .acf-mega-mobile-feature-list > li,
  .acf-mega-mobile-feature {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .acf-mega-features {
    margin: 24px 0 0;
    padding: 0;
    border-left: 0;
  }

  .acf-mega-feature-carousel,
  .acf-mega-features--2 .acf-mega-feature-carousel,
  .acf-mega-features--many .acf-mega-feature-carousel {
    width: 100%;
    max-width: 100%;
    display: block;
    min-width: 0;
  }

  .acf-mega-feature-nav {
    display: none !important;
  }

  .acf-mega-feature-track {
    overflow: visible;
  }

  .acf-mega-feature-list,
  .acf-mega-features--1 .acf-mega-feature-list,
  .acf-mega-features--2 .acf-mega-feature-list,
  .acf-mega-features--many .acf-mega-feature-list {
    display: block;
    width: 100%;
  }

  .acf-mega-features--vertical .acf-mega-feature-list,
  .acf-mega-features--vertical.acf-mega-features--1 .acf-mega-feature-list,
  .acf-mega-features--vertical.acf-mega-features--2 .acf-mega-feature-list,
  .acf-mega-features--vertical.acf-mega-features--many .acf-mega-feature-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .acf-mega-feature-list > li:nth-child(n+2),
  .acf-mega-features--2 .acf-mega-feature-list > li:nth-child(n+2),
  .acf-mega-features--many .acf-mega-feature-list > li:nth-child(n+2) {
    display: none;
  }

  .acf-mega-features--vertical .acf-mega-feature-list > li:nth-child(n+2),
  .acf-mega-features--vertical.acf-mega-features--2 .acf-mega-feature-list > li:nth-child(n+2),
  .acf-mega-features--vertical.acf-mega-features--many .acf-mega-feature-list > li:nth-child(n+2) {
    display: block;
  }

  .acf-mega-features--1 .acf-mega-feature-list > li,
  .acf-mega-features--2 .acf-mega-feature-list > li,
  .acf-mega-features--many .acf-mega-feature-list > li,
  .acf-mega-features--vertical .acf-mega-feature-list > li,
  .acf-mega-features--vertical.acf-mega-features--2 .acf-mega-feature-list > li,
  .acf-mega-features--vertical.acf-mega-features--many .acf-mega-feature-list > li {
    width: auto;
    flex: none;
  }

  /* Mobile domyślnie: 222 × 150, tytuł pod zdjęciem */
  .acf-mega-feature,
  .acf-mega-features--1 .acf-mega-feature,
  .acf-mega-features--2 .acf-mega-feature,
  .acf-mega-features--many .acf-mega-feature {
    display: block;
    width: 222px;
    max-width: 222px;
  }

  .acf-mega-feature-picture,
  .acf-mega-features--1 .acf-mega-feature-picture,
  .acf-mega-features--2 .acf-mega-feature-picture,
  .acf-mega-features--many .acf-mega-feature-picture {
    width: 222px;
    height: 150px;
    max-width: 222px;
    max-height: 150px;
  }

  .acf-mega-panel img.acf-mega-feature-img,
  .acf-mega-feature-img,
  .acf-mega-features--1 .acf-mega-feature-img,
  .acf-mega-features--2 .acf-mega-feature-img,
  .acf-mega-features--many .acf-mega-feature-img,
  .acf-mega-feature-picture .acf-mega-feature-img,
  .acf-mega-features--1 .acf-mega-feature-picture .acf-mega-feature-img {
    display: block;
    width: 222px;
    height: 150px;
    max-width: 222px;
    max-height: 150px;
    min-width: 0;
    aspect-ratio: 222 / 150;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    box-sizing: border-box;
  }

  .acf-mega-feature-picture .acf-mega-feature-img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }

  .acf-mega-feature-img--desk {
    display: none !important;
  }

  .acf-mega-feature-img--mob,
  .acf-mega-mobile-feature-img.acf-mega-feature-img--mob {
    display: block;
  }

  .acf-mega-feature-caption {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    margin-top: 12px;
    color: #141513;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
  }

  /* Mobile ze zdjęciem mobilnym: 121 × 121, tytuł po prawej */
  .acf-mega-feature--has-mobile-img,
  .acf-mega-features--1 .acf-mega-feature--has-mobile-img,
  .acf-mega-features--2 .acf-mega-feature--has-mobile-img,
  .acf-mega-features--many .acf-mega-feature--has-mobile-img {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 100%;
  }

  .acf-mega-feature--has-mobile-img .acf-mega-feature-picture,
  .acf-mega-features--1 .acf-mega-feature--has-mobile-img .acf-mega-feature-picture {
    width: 121px;
    height: 121px;
    max-width: 121px;
    max-height: 121px;
    flex: 0 0 121px;
  }

  .acf-mega-feature--has-mobile-img .acf-mega-feature-img,
  .acf-mega-features--1 .acf-mega-feature--has-mobile-img .acf-mega-feature-img,
  .acf-mega-feature--has-mobile-img .acf-mega-feature-picture .acf-mega-feature-img {
    width: 121px;
    height: 121px;
    max-width: 121px;
    max-height: 121px;
    aspect-ratio: 1 / 1;
    flex: 0 0 121px;
  }

  .acf-mega-feature--has-mobile-img .acf-mega-feature-picture .acf-mega-feature-img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    flex: none;
  }

  .acf-mega-feature--has-mobile-img .acf-mega-feature-caption {
    margin-top: 0;
    flex: 1 1 auto;
    min-width: 0;
  }

  .acf-mega-mobile-features {
    display: block;
    margin-top: 28px;
    padding-bottom: 16px;
  }

  .acf-mega-mobile-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .acf-mega-mobile-feature {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    color: #141513;
  }

  .acf-mega-mobile-feature-img,
  .acf-mega-mobile-feature-img.acf-mega-feature-img--mob {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    max-height: none;
    flex: none;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: left center;
    border-radius: 16px;
    box-sizing: border-box;
  }

  .acf-mega-mobile-feature-img.acf-mega-feature-img--desk {
    display: none !important;
  }

  .acf-mega-mobile-feature-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding-top: 2px;
  }

  .acf-mega-mobile-feature-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
  }

  .acf-mega-mobile-feature-meta {
    margin-top: 4px;
    color: #14151399;
    font-size: 13px;
    line-height: 1.4;
  }

  .acf-mega-mobile-feature-btn {
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #151B3A;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
  }

  .acf-mega-mobile-feature-btn .acf-mega-arrow {
    width: 12px;
    height: 8px;
    margin-left: 6px;
  }

  .admin-bar .acf-mega-header.is-open::before {
    height: calc(100dvh - 46px);
  }
}

