/* HLA4 Transplant: pasek "Na żywo", nagłówek, menu (PC i telefon), stopka. */

/* Pasek Na żywo */
.h4-livebar {
  position: relative;
  z-index: 60;
  background: var(--h4-heart);
  color: #fff;
}

.h4-livebar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding-block: 6px;
  font-size: 0.95rem;
}

.h4-livebar__dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  animation: h4-pulse 1.4s ease-in-out infinite;
}

.h4-livebar__label {
  font-family: var(--h4-font-display);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.h4-livebar__title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h4-site .h4-livebar__link {
  flex: none;
  padding: 4px 14px;
  font-weight: 800;
  color: var(--h4-heart);
  background: #fff;
  border-radius: 3px;
  text-decoration: none;
}

@keyframes h4-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.45;
    transform: scale(0.8);
  }
}

/* Nagłówek */
.h4-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #000;
  border-bottom: 1px solid var(--h4-line);
}

.admin-bar .h4-header {
  top: var(--wp-admin--admin-bar--height, 32px);
}

.h4-header__bar {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 36px);
  width: min(1480px, 100% - 2 * var(--h4-pad));
  min-height: var(--h4-header-h);
  margin-inline: auto;
}

.h4-brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  color: #fff;
  text-decoration: none;
}

.h4-site .h4-brand:hover {
  color: #fff;
}

.h4-brand__img {
  display: block;
  width: auto;
  max-height: 46px;
}

.h4-brand__mark {
  display: inline-flex;
  flex-direction: column;
  line-height: 0.82;
}

.h4-brand__hla {
  color: var(--h4-red);
  font-family: var(--h4-font-display);
  font-weight: 800;
  font-size: 2.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.h4-brand__hla b {
  margin-left: 0.04em;
  color: #fff;
  font-weight: 800;
}

.h4-brand__sub {
  margin-top: 0.22em;
  font-family: var(--h4-font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #fff;
}

.h4-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
}

.h4-menu,
.h4-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.h4-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px clamp(10px, 1.5vw, 26px);
}

.h4-menu li {
  position: relative;
}

.h4-menu > li > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  font-family: var(--h4-font-display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--h4-text);
  text-decoration: none;
}

.h4-menu > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 3px;
  background: var(--h4-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.h4-menu > li > a:hover::after,
.h4-menu > li.current-menu-item > a::after,
.h4-menu > li.current-menu-ancestor > a::after,
.h4-menu > li.current_page_item > a::after,
.h4-menu > li:focus-within > a::after {
  transform: scaleX(1);
}

.h4-site .h4-menu > li > a:hover {
  color: #fff;
}

.h4-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: -14px;
  z-index: 5;
  display: none;
  min-width: 220px;
  padding: 8px;
  background: #0c0c0c;
  border: 1px solid var(--h4-line);
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.h4-menu li:hover > .sub-menu,
.h4-menu li:focus-within > .sub-menu {
  display: block;
}

.h4-menu .sub-menu a {
  display: block;
  padding: 10px 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--h4-text);
  text-decoration: none;
  border-radius: 4px;
}

.h4-menu .sub-menu a:hover {
  background: var(--h4-surface-2);
}

.h4-nav__extra {
  display: none;
}

.h4-header__tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.h4-header__social {
  display: none;
}

.h4-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: var(--h4-text);
  background: transparent;
  border: 1px solid var(--h4-line);
  border-radius: 6px;
  cursor: pointer;
}

.h4-burger__bars,
.h4-burger__bars::before,
.h4-burger__bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentcolor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.h4-burger__bars {
  position: relative;
}

.h4-burger__bars::before,
.h4-burger__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.h4-burger__bars::before {
  top: -7px;
}

.h4-burger__bars::after {
  top: 7px;
}

.h4-burger[aria-expanded="true"] .h4-burger__bars {
  background: transparent;
}

.h4-burger[aria-expanded="true"] .h4-burger__bars::before {
  top: 0;
  transform: rotate(45deg);
}

.h4-burger[aria-expanded="true"] .h4-burger__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Ikony social (renderuje wtyczka: .h4c-social) w nagłówku */
.h4-header__social .h4c-social,
.h4-nav__extra .h4c-social {
  display: flex;
  gap: 4px;
}

/* Telefon i tablet (mobile first): menu jako pełnoekranowa warstwa */
.h4-burger {
  display: inline-flex;
}

.h4-nav {
  position: fixed;
  inset: 0;
  z-index: -1;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 22px;
  padding: calc(var(--h4-header-h) + 18px) var(--h4-pad) 32px;
  overflow-y: auto;
  background: #000;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}

.h4-nav.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.h4-menu {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0;
}

.h4-menu > li {
  border-bottom: 1px solid var(--h4-line);
}

.h4-menu > li > a {
  width: 100%;
  min-height: 58px;
  font-size: 1.9rem;
}

.h4-menu > li > a::after {
  display: none;
}

.h4-menu .sub-menu {
  position: static;
  display: block;
  min-width: 0;
  margin: 0 0 12px;
  padding: 0 0 0 14px;
  background: transparent;
  border: 0;
  border-left: 3px solid var(--h4-red);
  border-radius: 0;
  box-shadow: none;
}

.h4-menu .sub-menu a {
  padding: 8px 6px;
  font-size: 1.2rem;
}

.h4-nav__extra {
  display: block;
}

body.h4-nav-open {
  overflow: hidden;
}

.h4-header {
  z-index: 70;
}


@media (max-width: 480px) {
  :root {
    --h4-header-h: 64px;
  }

  .h4-brand__hla {
    font-size: 2rem;
  }

  .h4-brand__sub {
    font-size: 0.72rem;
  }
}

@media (min-width: 1200px) {
  .h4-header__social {
    display: block;
  }

  .h4-burger {
    display: none;
  }

  .h4-nav {
    position: static;
    z-index: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    padding: 0;
    overflow: visible;
    background: none;
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .h4-menu {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px clamp(10px, 1.5vw, 26px);
  }

  .h4-menu > li {
    border-bottom: 0;
  }

  .h4-menu > li > a {
    width: auto;
    min-height: 44px;
    font-size: 1.22rem;
  }

  .h4-menu > li > a::after {
    display: block;
  }

  .h4-menu .sub-menu {
    position: absolute;
    display: none;
    min-width: 220px;
    margin: 0;
    padding: 8px;
    background: #0c0c0c;
    border: 1px solid var(--h4-line);
    border-radius: 6px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  }

  .h4-menu li:hover > .sub-menu,
  .h4-menu li:focus-within > .sub-menu {
    display: block;
  }

  .h4-menu .sub-menu a {
    padding: 10px 12px;
    font-size: 1rem;
  }

  .h4-nav__extra {
    display: none;
  }

  body.h4-nav-open {
    overflow: visible;
  }
}

/* Stopka: trzy sekcje wyśrodkowane */
.h4-footer {
  --h4-torn-bg: #000;
  margin-top: 0;
  padding-top: 8px;
  background: #000;
  text-align: center;
}

.h4-footer__eco {
  padding-block: clamp(22px, 3vw, 36px);
  background: #0c0c0c;
  border-bottom: 1px solid var(--h4-line);
}

.h4-footer__grid {
  display: grid;
  gap: clamp(30px, 4vw, 48px);
  justify-items: center;
  padding-block: clamp(36px, 5vw, 64px);
}

.h4-footer__col {
  width: 100%;
  max-width: 360px;
}

.h4-footer .h4-brand {
  justify-content: center;
}

.h4-site .h4-footer__h {
  margin: 0 0 0.9em;
  font-size: 1.15rem;
  letter-spacing: 0.16em;
  color: #fff;
}

.h4-site .h4-footer__h::after {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin: 0.55em auto 0;
  background: var(--h4-red);
}

.h4-site .h4-footer__tagline {
  margin: 0.9em auto 1em;
  max-width: 28ch;
  color: var(--h4-mute);
}

.h4-site .h4-footer__tags {
  margin: 1em 0 0;
  font-size: 0.95rem;
  color: var(--h4-mute);
}

.h4-footer__social .h4c-social {
  justify-content: center;
  flex-wrap: wrap;
}

.h4-footer__menu,
.h4-footer__contact {
  margin: 0;
  padding: 0;
  list-style: none;
}

.h4-footer__menu li,
.h4-footer__contact li {
  margin: 0 0 0.3em;
}

.h4-footer__menu a,
.h4-footer__contact a {
  display: inline-block;
  padding-block: 6px;
  color: #fff;
  text-decoration: none;
}

.h4-footer__menu a:hover,
.h4-footer__contact a:hover {
  color: var(--h4-accent);
  text-decoration: underline;
}

.h4-footer__contact {
  margin-top: 1.4em;
  padding-top: 1.2em;
  border-top: 1px solid var(--h4-line);
  color: var(--h4-mute);
}

.h4-footer__bar {
  border-top: 1px solid var(--h4-line);
  font-size: 0.95rem;
  color: var(--h4-mute);
}

.h4-footer__barin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-block: 20px;
}

.h4-footer__barin p {
  margin: 0;
}

.h4-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
}

.h4-footer__bar a {
  color: var(--h4-mute);
}

.h4-site .h4-footer__bar .h4-footer__credit a {
  font-weight: 700;
  color: #c9970f;
  text-decoration: none;
}

.h4-site .h4-footer__bar .h4-footer__credit a:hover {
  color: #e6b422;
  text-decoration: underline;
}

@media (min-width: 720px) {
  .h4-footer__grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }

  .h4-footer__col {
    max-width: none;
  }

  .h4-footer__menu--cols {
    columns: 2;
    column-gap: 24px;
  }

  .h4-footer__barin {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 28px;
  }
}

.h4-footer__social .h4c-social__list {
  justify-content: center;
  flex-wrap: wrap;
}

.h4-footer__menu--cols {
  columns: 2;
  column-gap: 20px;
}

/* W nagłówku tylko trzy pierwsze ikony (Facebook, YouTube, Instagram); reszta jest w stopce i na stronie Kontakt */
.h4-header__social .h4c-social__list > :nth-child(n + 4) {
  display: none;
}

@media (min-width: 1200px) {
  .h4-header__bar {
    width: min(1480px, 100% - 2 * clamp(16px, 2.4vw, 48px));
    gap: clamp(12px, 1.6vw, 32px);
  }

  .h4-menu {
    flex-wrap: nowrap;
    gap: 2px clamp(8px, 1.3vw, 24px);
  }

  .h4-menu > li > a {
    font-size: clamp(1.02rem, 1.4vw, 1.22rem);
    letter-spacing: 0.05em;
    white-space: nowrap;
  }
}

/* W stopce i w menu na telefonie pięć głównych ikon w jednym rzędzie (pełny zestaw: strona Kontakt) */
.h4-footer__social .h4c-social__list > :nth-child(n + 6),
.h4-nav__extra .h4c-social__list > :nth-child(n + 6) {
  display: none;
}

.h4-site .h4-footer__bar .h4-footer__credit-mail a {
  font-weight: 400;
  color: var(--h4-mute);
  text-decoration: underline;
}
