.leg-hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
}

.leg-hero-meta__icon {
  display: flex;
}

.leg-hero-meta__icon svg {
  width: 17px;
  height: 20px;
}

.single-legislation-page .leg-wrap {
  max-width: var(--max-content-width, 1456px);
  margin: 0 auto;
  padding: 0 24px;
}

.leg-content-shell {
  padding: 40px 0 60px;
  background: transparent;
}

.leg-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.leg-layout--full {
  grid-template-columns: minmax(0, 1fr);
}

.leg-sidebar {
  position: sticky;
  top: 32px;
}

.leg-sidebar__content {
  position: relative;
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 48px -12px rgba(10, 22, 50, 0.05);
}

.leg-sidebar__eyebrow,
.leg-mobile-nav__eyebrow {
  margin: 0 0 8px;
  color: var(--goz-accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.leg-sidebar__title,
.leg-mobile-nav__title {
  margin: 0;
  color: var(--goz-primary);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.08;
}

.leg-sidebar__description {
  margin: 12px 0 0;
  color: rgba(33, 51, 97, 0.6);
  font-size: 0.9rem;
  line-height: 1.6;
}

.leg-nav {
  margin-top: 20px;
}

.leg-nav__list,
.leg-nav__sublist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.leg-nav__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.leg-nav__item {
  position: relative;
}

.leg-nav__sublink {
  display: block;
  border-radius: 12px;
  color: rgba(33, 51, 97, 0.72);
  text-decoration: none;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.leg-nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  color: var(--goz-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  padding: 8px 16px;
  margin: 0 -16px;
  transition: all 0.2s ease;
}

.leg-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  color: var(--goz-accent, #046cb5);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-top: 0;
  transition: all 0.2s ease;
}

.leg-nav__icon svg {
  width: 18px;
  height: 18px;
}

.leg-nav__link:hover,
.leg-nav__sublink:hover {
  color: var(--goz-accent, #046cb5);
}

.leg-nav__link:hover .leg-nav__icon {
  color: var(
    --goz-accent,
    #046cb5
  ); /* already there, but keeping it explicit */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08); /* slightly stronger shadow on hover */
}

.leg-nav__link.is-active,
.leg-nav__sublink.is-active {
  background-color: var(--goz-accent, #046cb5);
  color: #fff;
}

.leg-nav__link.is-active .leg-nav__icon,
.leg-nav__sublink.is-active .leg-nav__icon {
  background: #fff;
  color: var(--goz-accent, #046cb5);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.leg-nav__link.is-active {
  font-weight: 800;
}

.leg-nav__sublink.is-active-parent {
  color: rgba(33, 51, 97, 0.94);
}

.leg-nav__sublist {
  margin-top: 6px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(33, 51, 97, 0.08);
}

.leg-nav__subitem + .leg-nav__subitem {
  margin-top: 4px;
}

.leg-nav__sublink {
  padding: 6px 10px;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
}

.leg-nav__subitem--level-3 .leg-nav__sublink {
  padding-left: 16px;
}

.leg-nav__subitem--level-4 .leg-nav__sublink {
  padding-left: 22px;
}

.leg-mobile-nav,
.leg-mobile-nav-trigger {
  display: none;
}

.leg-main {
  display: flex;
  flex-direction: column;
  gap: 48px;
  min-width: 0;
}

.leg-summary-grid {
  display: flex;
  flex-direction: column;
  position: relative;
}

.leg-related-acts {
  position: relative;
}

.leg-section {
  position: relative;
  scroll-margin-top: 118px;
}

.leg-section--white {
  background: transparent;
}

.leg-section--gradient {
  padding: 32px 40px;
  border-radius: 16px;
  background: var(--goz-primary);
  color: #fff;
  border: none;
}

.leg-section--biz {
  padding: 40px 48px;
  border-radius: 16px;
  background: radial-gradient(circle at 80% 0%, #2f447a 0%, #162446 100%);
  box-shadow: 0 24px 50px -12px rgba(22, 36, 70, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #fff;
}

.leg-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(4, 108, 181, 0.08);
  color: var(--goz-accent, #046cb5);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.leg-eyebrow--light {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.leg-heading {
  margin: 0 0 24px;
  color: var(--goz-primary);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.leg-section-heading {
  margin-bottom: 20px;
}

.leg-sidebar__content {
  position: sticky;
  top: 138px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: #f8f9fa; /* Jasnoszare tło dla całej lewej kolumny jak w Dobrych Praktykach */
  border-radius: 16px;
  box-shadow: none;
}

.leg-sidebar__title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--goz-primary);
  border-bottom: 2px solid rgba(0, 0, 0, 0.05); /* Separator z dobrych praktyk */
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.leg-sidebar__description {
  display: none; /* Ukryte by wyrównać do spisu z Good Practices */
}

.leg-duo__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Wyrównanie do góry */
  scroll-margin-top: 118px;
  padding: 32px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.leg-duo__card:first-child {
  padding-top: 0;
}

.leg-duo__card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.leg-duo__badge {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  flex: none;
  margin-bottom: 20px;
  padding: 6px 20px 6px 6px;
  background: rgba(4, 108, 181, 0.06);
  border-radius: 100px;
  color: var(--goz-primary);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.leg-duo__badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 0;
  margin-right: 12px;
  flex-shrink: 0;
  background-color: #fff;
  border-radius: 50%;
  color: var(--goz-accent, #046cb5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.leg-duo__badge-icon svg {
  width: 18px;
  height: 18px;
}

.leg-duo__body {
  flex: 1;
  padding: 0;
  color: #444;
  font-size: 1.05rem; /* Nieco większe fonty dla czytelności z dużą whitespace */
  line-height: 1.75;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Zamiast center */
}

.leg-duo__card--blue .leg-duo__badge {
  /* No special class overrides needed */
}

.leg-duo__card--navy .leg-duo__badge {
  /* No special class overrides needed */
}

.leg-duo__card--blue .leg-duo__body,
.leg-duo__card--navy .leg-duo__body {
  background: transparent;
}

.leg-duo__body p {
  margin-bottom: 12px;
}

.leg-duo__body p:last-child {
  margin-bottom: 0;
}

.leg-duo__body ul,
.leg-duo__body ol {
  margin: 12px 0;
  padding-left: 20px;
}

.leg-duo__body li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.leg-article__heading {
  margin: 0;
  color: var(--goz-primary);
  font-size: 2.85rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.leg-article__content {
  color: #3b4868;
  font-size: 1.1rem;
  line-height: 1.8;
}

.leg-article__content p {
  margin-bottom: 20px;
}

.leg-article__content p:last-child {
  margin-bottom: 0;
}

.leg-article__content p:first-child {
  color: var(--goz-primary);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.7;
}

.leg-article__content ul,
.leg-article__content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.leg-article__content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.leg-article__content ul li {
  list-style: disc;
}

.leg-nav-heading {
  scroll-margin-top: 132px;
}

.leg-assumptions-image {
  width: 100%;
  margin-top: 34px;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(33, 51, 97, 0.1);
}

.leg-assumptions-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.leg-section--biz-modern {
  position: relative;
  overflow: hidden; /* Prevent SVG from spilling outside */
}

.leg-biz-bg-icon {
  position: absolute;
  top: 20px;
  right: -20px;
  z-index: 0;
  opacity: 0.04;
  pointer-events: none;
  transform: rotate(12deg);
  color: var(--goz-primary);
  width: 50%;
  max-width: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leg-biz-bg-icon svg {
  width: 100%;
  height: auto;
}

.leg-biz-content {
  color: var(--goz-primary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.leg-biz-content p {
  margin-bottom: 24px;
}

.leg-biz-content ul,
.leg-biz-content ol {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.leg-biz-content > ul > li,
.leg-biz-content > ol > li {
  position: relative;
  padding: 16px 24px 16px 64px;
  background: #f8f9fa;
  border-radius: 16px;
  color: var(--goz-primary);
  transition: all 0.3s ease;
}

.leg-biz-content > ul > li:hover,
.leg-biz-content > ol > li:hover {
  background: rgba(4, 108, 181, 0.04);
  transform: translateX(4px);
}

.leg-biz-content > ul > li::before {
  content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="%23046cb5"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5" /></svg>');
  position: absolute;
  left: 24px;
  top: 18px;
  width: 24px;
  height: 24px;
}

.leg-biz-content ol {
  counter-reset: biz-list-counter;
}

.leg-biz-content > ol > li {
  counter-increment: biz-list-counter;
}

.leg-biz-content > ol > li::before {
  content: counter(biz-list-counter);
  position: absolute;
  left: 24px;
  top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(4, 108, 181, 0.1);
  color: var(--goz-accent, #046cb5);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
}

.leg-biz-content li ul,
.leg-biz-content li ol {
  display: block;
  margin: 12px 0 0 0;
  padding-left: 0;
}

.leg-biz-content li ul li {
  position: relative;
  padding: 4px 0 4px 20px;
  background: transparent;
  border-radius: 0;
  color: var(--goz-primary);
  transition: none;
}

.leg-biz-content li ul li:hover {
  background: transparent;
  transform: none;
}

.leg-biz-content li ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 4px;
  color: var(--goz-accent, #046cb5);
  font-size: 1.2rem;
  line-height: 1;
  width: auto;
  height: auto;
  background: transparent;
}

.leg-linked-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
}

.leg-linked-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  background: #fff;
  color: var(--goz-primary);
  text-decoration: none;
  box-shadow: 0 4px 12px -4px rgba(10, 22, 50, 0.04);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

a.leg-linked-item {
  cursor: pointer;
}

a.leg-linked-item:hover {
  transform: translateY(-2px);
  border-color: rgba(4, 108, 181, 0.2);
  box-shadow: 0 8px 16px -6px rgba(4, 108, 181, 0.15);
  color: var(--goz-primary);
}

.leg-linked-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(4, 108, 181, 0.08);
  color: var(--goz-accent);
}

.leg-linked-item__icon svg {
  width: 18px;
  height: 18px;
}

.leg-linked-item__title {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.leg-linked-item__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.03);
  color: var(--goz-secondary);
  font-size: 0.9rem;
  opacity: 0.6;
  transition: all 0.3s ease;
}

a.leg-linked-item:hover .leg-linked-item__arrow {
  transform: translateX(4px);
  background: #f8f9fa; /* Zmiana na nowy kolor tła */
  color: var(--goz-primary);
  opacity: 1;
}

.leg-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.leg-cta-text__heading {
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
}

.leg-cta-buttons {
  display: flex;
  flex-shrink: 0;
  gap: 16px;
}

.leg-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.leg-cta-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.leg-cta-btn--outline {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
}

.leg-cta-btn--outline:hover {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateY(-2px);
}

.leg-cta-btn--solid {
  border: none;
  background: #fff;
  color: var(--goz-primary);
}

.leg-cta-btn--solid:hover {
  transform: translateY(-4px);
  background: #f0f4f8;
  box-shadow: 0 16px 32px -10px rgba(0, 0, 0, 0.2);
  color: var(--goz-primary);
}

.single-legislation-page .leg-section .post-cards-section,
.single-legislation-page .leg-related-acts .post-cards-section {
  padding: 0;
  background: transparent;
}

.single-legislation-page .leg-section .post-cards-container,
.single-legislation-page .leg-related-acts .post-cards-container {
  max-width: 100%;
  padding: 0;
}

.leg-mobile-nav-trigger {
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 14px 18px;
  border: 1px solid rgba(33, 51, 97, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--goz-primary);
  font-size: 0.96rem;
  font-weight: 600;
  box-shadow: 0 14px 28px rgba(22, 37, 74, 0.08);
}

.leg-mobile-nav-trigger__icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.leg-mobile-nav-trigger__icon svg {
  width: 18px;
  height: 18px;
}

.leg-mobile-nav__overlay {
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: rgba(18, 28, 52, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.leg-mobile-nav__panel {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9998;
  padding: 0 12px max(12px, env(safe-area-inset-bottom));
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
}

.leg-mobile-nav__panel.is-dragging {
  transition: none;
}

.leg-mobile-nav.is-open .leg-mobile-nav__panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.leg-mobile-nav__sheet {
  overflow: hidden;
  border-radius: 28px 28px 20px 20px;
  background: rgba(247, 248, 252, 0.98);
  box-shadow: 0 -16px 48px rgba(10, 18, 38, 0.24);
}

.leg-mobile-nav__handle {
  display: flex;
  justify-content: center;
  padding: 12px 16px 6px;
}

.leg-mobile-nav__handle-bar {
  width: 64px;
  height: 5px;
  border-radius: 999px;
  background: rgba(33, 51, 97, 0.18);
}

.leg-mobile-nav__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 20px 18px;
}

.leg-mobile-nav__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(33, 51, 97, 0.08);
  color: var(--goz-primary);
  font-size: 1.7rem;
  line-height: 1;
}

.leg-nav--drawer {
  max-height: min(70vh, 560px);
  overflow: auto;
  padding: 0 20px 20px;
  margin-top: 0;
}

body.goz-drawer-open {
  overflow: hidden;
}

.leg-related-acts {
  /* usunięto białe tło i paddingi */
}

.leg-related-acts .leg-eyebrow {
  margin-bottom: 20px;
}

.leg-related-acts .leg-heading {
  margin-bottom: 24px;
}

@media (max-width: 1120px) {
  .leg-layout {
    grid-template-columns: minmax(220px, 250px) minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 900px) {
  .leg-content-shell {
    padding: 32px 0 72px;
  }

  .leg-mobile-nav,
  .leg-mobile-nav-trigger {
    display: flex;
  }

  .leg-sidebar {
    display: none;
  }

  .leg-layout {
    grid-template-columns: 1fr;
  }

  .leg-section--gradient,
  .leg-section--biz {
    padding: 30px 24px;
    border-radius: 20px;
  }

  .leg-duo__card {
    padding: 24px 0;
  }

  .leg-duo__card:first-child {
    padding-top: 0;
  }

  .leg-duo__card:last-child {
    padding-bottom: 0;
    border-bottom: none;
  }

  .leg-duo__badge {
    padding: 4px 16px 4px 4px;
    margin-bottom: 16px;
    font-size: 0.8rem;
  }

  .leg-duo__badge-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
  }

  .leg-duo__badge-icon svg {
    width: 16px;
    height: 16px;
  }

  .leg-duo__body {
    padding: 0;
    font-size: 1rem;
    display: block;
  }

  .leg-related-acts {
    /* usunięto paddingi na mobile */
  }

  .leg-cta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .leg-cta-buttons {
    width: 100%;
    flex-direction: column;
  }

  .leg-cta-btn {
    justify-content: center;
  }

  .leg-nav--drawer .leg-nav__link {
    font-size: 0.95rem;
  }
}

@media (max-width: 600px) {
  .single-legislation-page .leg-wrap {
    padding: 0 16px;
  }

  .leg-content-shell {
    padding: 24px 0 56px;
  }

  .leg-section--gradient,
  .leg-section--biz {
    border-radius: 16px;
    padding: 20px 16px;
  }

  .leg-duo__badge {
    font-size: 0.9rem;
  }

  .leg-duo__badge-icon {
    width: 36px;
    height: 36px;
    margin-right: 12px;
  }

  .leg-heading,
  .leg-article__heading,
  .leg-biz-title {
    font-size: 1.72rem;
  }

  .leg-mobile-nav__panel {
    padding-left: 8px;
    padding-right: 8px;
  }
}
