/* HLA4 Transplant: nagłówki podstron, treść, artykuł, archiwa, karty wpisów, 404. */

.h4-pagehead {
  position: relative;
  overflow: hidden;
  padding-block: clamp(40px, 6.5vw, 88px) clamp(26px, 4vw, 48px);
  background: #000;
  color: #fff;
}

.h4-pagehead.has-image {
  background:
    linear-gradient(0deg, #000 4%, rgba(0, 0, 0, 0.78) 55%, rgba(0, 0, 0, 0.9)),
    var(--h4-ph-image) center / cover no-repeat,
    #000;
}

.h4-site .h4-pagehead__title {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 6rem);
  line-height: 0.94;
}

.h4-site .h4-pagehead__lead {
  max-width: 62ch;
  margin: 1em 0 0;
  font-size: 1.15rem;
  color: var(--h4-mute);
}

.h4-crumbs {
  margin-bottom: 1.2em;
  font-size: 0.92rem;
  color: var(--h4-mute);
}

.h4-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.h4-crumbs li + li::before {
  content: "/";
  margin-right: 8px;
  opacity: 0.6;
}

.h4-crumbs a {
  color: var(--h4-mute);
  text-decoration: none;
}

.h4-crumbs a:hover {
  color: #fff;
  text-decoration: underline;
}

.h4-page,
.h4-single,
.h4-archive,
.h4-newsroom-wrap {
  padding-block: clamp(30px, 5vw, 70px);
}

.h4-page__body > .h4c:first-child,
.h4-newsroom-wrap > .h4c:first-child {
  margin-top: 0;
}

.h4-page__body > .h4c + .h4c {
  margin-top: clamp(34px, 5vw, 70px);
}

/* Treść dowolnej strony (edytor): układ czytelny, komponenty wtyczek zajmują całą szerokość */
.h4-page__body > p,
.h4-page__body > ul,
.h4-page__body > ol,
.h4-page__body > h2,
.h4-page__body > h3,
.h4-page__body > blockquote {
  max-width: 68ch;
}

/* Artykuł */
.h4-site .h4-pagehead--article .h4-pagehead__title {
  max-width: 24ch;
  font-size: clamp(2.4rem, 6.4vw, 4.8rem);
}

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

.h4-article__wrap {
  display: grid;
  gap: clamp(20px, 3vw, 36px);
  padding-block: clamp(26px, 4vw, 56px) clamp(10px, 2vw, 24px);
}

.h4-article__figure {
  margin: 0;
}

.h4-article__img {
  display: block;
  width: 100%;
  border-radius: var(--h4-radius);
}

.h4-article__figure figcaption {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--h4-mute);
}

.h4-article__body {
  font-size: 1.12rem;
  line-height: 1.72;
}

/* Karty wpisów (archiwa) */
.h4-postgrid {
  display: grid;
  gap: var(--h4-gap);
}

.h4-postcard {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--h4-surface);
  border: 1px solid var(--h4-line);
  border-radius: var(--h4-radius);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.h4-postcard:hover {
  transform: translateY(-3px);
  border-color: var(--h4-accent);
}

.h4-postcard__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0c0c0c;
}

.h4-postcard__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.h4-postcard__ph {
  display: grid;
  place-items: center;
  height: 100%;
  font-family: var(--h4-font-display);
  font-weight: 800;
  font-size: 3rem;
  letter-spacing: 0.1em;
  color: var(--h4-accent);
  background: linear-gradient(135deg, #222, #000);
}

.h4-postcard__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 18px 20px 22px;
}

.h4-site .h4-postcard__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 0 0 0.7em;
  font-size: 0.88rem;
  color: var(--h4-mute);
}

.h4-site .h4-postcard__title {
  margin: 0 0 0.45em;
  font-size: 1.7rem;
  line-height: 1.02;
}

.h4-postcard__title a {
  color: var(--h4-text);
  text-decoration: none;
}

.h4-postcard__title a:hover {
  color: var(--h4-accent);
}

.h4-site .h4-postcard__excerpt {
  margin: 0;
  color: var(--h4-mute);
}

.h4-empty {
  padding: 2em 0;
  color: var(--h4-mute);
}

/* Paginacja */
.h4-pager ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2.4em 0 0;
  padding: 0;
  list-style: none;
}

.h4-pager a,
.h4-pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  font-family: var(--h4-font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--h4-text);
  text-decoration: none;
  border: 1px solid var(--h4-line);
  border-radius: 4px;
}

.h4-pager .current {
  color: var(--h4-accent-ink);
  background: var(--h4-accent);
  border-color: var(--h4-accent);
}

/* Strona 404 */
.h4-notfound {
  padding-block: clamp(56px, 10vw, 140px);
  background: #000;
}

.h4-notfound__code {
  margin: 0;
  font-family: var(--h4-font-display);
  font-weight: 800;
  font-size: clamp(6rem, 24vw, 16rem);
  line-height: 0.85;
  color: var(--h4-red);
}

.h4-notfound__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 1.6em 0 0;
}

@media (min-width: 720px) {
  .h4-postgrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .h4-postgrid {
    grid-template-columns: repeat(3, 1fr);
  }

  .h4-article__wrap {
    grid-template-columns: minmax(0, 1fr) minmax(0, 720px);
    column-gap: clamp(28px, 4vw, 64px);
    align-items: start;
  }

  .h4-article__wrap:not(:has(.h4-article__figure)) {
    grid-template-columns: minmax(0, 720px);
  }
}

/* Kontakt */
.h4-contact {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
}

.h4-site .h4-contact__h {
  margin: 0 0 0.4em;
  font-size: 1.3rem;
  letter-spacing: 0.14em;
  color: var(--h4-accent);
}

.h4-contact__list {
  margin: 0 0 1.6em;
  padding: 0;
  list-style: none;
}

.h4-contact__list li {
  margin-bottom: 0.3em;
}

.h4-contact__data {
  padding: 24px;
  background: var(--h4-surface);
  border: 1px solid var(--h4-line);
  border-radius: var(--h4-radius);
  align-self: start;
}

@media (min-width: 960px) {
  .h4-contact.has-data {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

/* Korpus strony: biała kartka z pędzlową krawędzią pod czarnym nagłówkiem (strony ciemne: TV, Galeria) */
.h4-body {
  position: relative;
  min-height: 40vh;
}

.h4-body--dark {
  --h4-bg: #0c0c0c;
  --h4-torn-bg: #0c0c0c;
  background: var(--h4-bg);
  color: var(--h4-text);
}

/* Zdjęcie obok tekstu artykułu jedzie razem z przewijaniem (przyklejone pod nagłówkiem), dopóki czytasz tekst */
@media (min-width: 960px) {
  .h4-article__figure {
    position: sticky;
    top: calc(var(--h4-header-h) + var(--wp-admin--admin-bar--height, 0px) + 24px);
    align-self: start;
  }
}
