.page-hero {
  padding-block: clamp(56px, 6vw, 96px);
  background: var(--black);
  color: #fff;
}

.page-hero--image {
  position: relative;
  isolation: isolate;
  background-position: center;
  background-size: cover;
}

.page-hero--image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(12, 12, 12, .68);
}

.page-hero .display-title {
  max-width: 16ch;
}

.page-hero-lead {
  max-width: 640px;
  margin: 26px 0 0;
  color: #c4c4c4;
  font-size: 18px;
}

.breadcrumbs {
  margin: 0 0 26px;
  color: #9d9d9d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.breadcrumbs a:hover {
  color: var(--red);
}

.breadcrumbs span[aria-current] {
  color: #fff;
}

.entry {
  padding-block: clamp(62px, 7vw, 110px);
}

.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

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

.entry-content {
  max-width: 78ch;
  font-size: 17px;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content h2 {
  margin: 48px 0 18px;
  font-family: var(--display);
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.entry-content h3 {
  margin: 36px 0 14px;
  font-size: clamp(21px, 2vw, 26px);
  line-height: 1.2;
}

.entry-content h4 {
  margin: 28px 0 12px;
  font-size: 19px;
}

.entry-content p {
  margin: 0 0 20px;
}

.entry-content a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 22px;
  padding-left: 22px;
  display: grid;
  gap: 9px;
}

.entry-content li::marker {
  color: var(--red);
  font-weight: 900;
}

.entry-content img,
.entry-content figure {
  margin: 30px 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.entry-content figcaption {
  margin-top: 10px;
  color: var(--gray);
  font-size: 14px;
}

.entry-content blockquote {
  margin: 30px 0;
  padding: 4px 0 4px 26px;
  border-left: 4px solid var(--red);
  color: var(--black);
  font-size: 20px;
  font-weight: 600;
}

.entry-content table {
  width: 100%;
  margin: 26px 0;
  border-collapse: collapse;
  font-size: 15px;
}

.entry-content th,
.entry-content td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
}

.entry-content th {
  background: var(--mist);
  font-weight: 900;
}

.entry-content hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.entry-meta {
  margin: 0 0 26px;
  color: var(--gray);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar {
  position: sticky;
  top: calc(var(--header) + 28px);
  display: grid;
  gap: 24px;
}

.sidebar-box:not(.sidebar-box--dark) {
  padding-top: 4px;
}

.sidebar-box--dark {
  padding: 30px 28px;
  border-radius: var(--radius);
  background: var(--black);
  color: #fff;
}

.sidebar-box:not(.sidebar-box--dark) h3 {
  margin: 0 0 6px;
  color: var(--black);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.sidebar-box--dark h3 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.12;
}

.sidebar-box p {
  margin: 0 0 22px;
  color: inherit;
  font-size: 15px;
  opacity: .85;
}

.sidebar-box .button {
  width: 100%;
}

/* Domyslny hover przyciskow schodzi do czerni — na czarnym boxie znikalby. */
.sidebar-box--dark .button:hover {
  border-color: #fff;
  background: #fff;
  color: var(--black);
}

.sidebar-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-list a {
  position: relative;
  display: block;
  padding: 13px 0 13px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  transition: color .2s ease;
}

.sidebar-list li:last-child a {
  border-bottom: 0;
}

.sidebar-list a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 7px;
  height: 2px;
  background: var(--line);
  transition: width .2s ease, background .2s ease;
}

.sidebar-list a:hover,
.sidebar-list .is-current a {
  color: var(--red);
}

.sidebar-list a:hover::before,
.sidebar-list .is-current a::before {
  width: 12px;
  background: var(--red);
}

.usluga-features {
  margin: 0 0 42px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  list-style: none;
}

.usluga-feature {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.usluga-feature:hover {
  border-color: rgba(201, 26, 21, .55);
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}

.usluga-feature .feature-icon {
  margin-bottom: 18px;
  border-color: transparent;
}

.usluga-feature h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.15;
}

.usluga-feature p {
  margin: 0;
  color: var(--gray);
  font-size: 15px;
}

.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(38px, 4vw, 62px);
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
}

.cta-band--image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--cta-bg);
  background-position: center right;
  background-size: cover;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 28%, rgba(0, 0, 0, .4) 55%, #000 88%);
  mask-image: linear-gradient(to right, transparent 0%, transparent 28%, rgba(0, 0, 0, .4) 55%, #000 88%);
}

.cta-band h2 {
  margin: 0;
  max-width: 62%;
  font-family: var(--display);
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.06;
}

.cta-band h2 span {
  display: block;
}

.cta-band .button--dark {
  border-color: #fff;
  background: #fff;
  color: var(--black);
}

.cta-band .button--dark:hover {
  border-color: var(--black);
  background: var(--black);
  color: #fff;
}

.archive-intro {
  margin-bottom: 44px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.tax-filter {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
}

.tax-filter a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--mist);
  color: var(--gray);
  font-size: 14px;
  font-weight: 800;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.tax-filter a:hover,
.tax-filter .is-active a {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.post-card {
  border: 1px solid #deded9;
  border-radius: var(--radius);
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.post-card:hover {
  border-color: rgba(201, 26, 21, .6);
  box-shadow: var(--shadow-card);
  transform: translateY(-5px);
}

.post-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-card-body {
  flex: 1;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.post-card h2,
.post-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.12;
}

.post-card p {
  margin: 0 0 18px;
  color: var(--gray);
  font-size: 15px;
}

.post-card .button--line {
  align-self: flex-start;
  margin-top: auto;
}

.realizacja-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(36px, 4vw, 64px);
  align-items: start;
}

.realizacja-top .entry-content {
  max-width: none;
}

.realizacja-aside {
  display: grid;
  gap: 22px;
}

.realizacja-meta {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  list-style: none;
}

.realizacja-meta li {
  padding: 20px 22px;
  background: #fff;
}

.realizacja-meta small {
  display: block;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.realizacja-meta strong {
  display: block;
  margin-top: 6px;
  font-size: 19px;
}

/* Masonry na kolumnach CSS — zdjecia zachowuja naturalne proporcje,
   a pion i poziom uklada sie bez skryptu mierzacego wysokosci. */
.realizacja-galeria {
  margin-top: clamp(48px, 5vw, 72px);
  columns: 3;
  column-gap: 16px;
}

.galeria-item {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--mist);
  cursor: zoom-in;
  overflow: hidden;
  break-inside: avoid;
}

.galeria-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity .25s ease;
}

.galeria-item:hover img,
.galeria-item:focus-visible img {
  opacity: .82;
}

.realizacje-inne {
  padding-top: 0;
}

.realizacje-inne .section-heading {
  margin-bottom: 44px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.realizacje-inne .display-title {
  margin: 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  padding: clamp(16px, 3vw, 40px);
  background: rgba(12, 12, 12, .95);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-frame {
  flex: 1;
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: min(100%, 1400px);
  max-height: 88vh;
  width: auto;
  border-radius: var(--radius);
  object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-pill);
  background: transparent;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  border-color: var(--red);
  background: var(--red);
}

.lightbox-close {
  position: absolute;
  top: clamp(16px, 3vw, 32px);
  right: clamp(16px, 3vw, 32px);
}

.lightbox-counter {
  position: absolute;
  bottom: clamp(16px, 3vw, 30px);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: #9d9d9d;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
}

.pagination {
  margin-top: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination .page-numbers {
  min-width: 46px;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.pagination .page-numbers:hover,
.pagination .current {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-form input[type="search"] {
  flex: 1;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid #9b9b9b;
  border-radius: var(--radius-sm);
}

.search-form input[type="search"]:focus {
  outline: 3px solid var(--red);
  border-color: var(--red);
}

.no-results {
  padding: 40px 0 0;
  color: var(--gray);
  font-size: 18px;
}

.error-404 {
  padding-block: clamp(80px, 10vw, 160px);
  text-align: center;
}

.error-404 .display-title {
  margin-bottom: 20px;
}

.error-404 p {
  max-width: 52ch;
  margin: 0 auto 32px;
  color: var(--gray);
  font-size: 18px;
}

.error-404 .search-form {
  max-width: 460px;
  margin: 0 auto;
}

.comments-area {
  max-width: 78ch;
  margin-top: 60px;
  padding-top: 44px;
  border-top: 1px solid var(--line);
}

.comments-area h2 {
  margin: 0 0 26px;
  font-size: 26px;
}

.comment-list {
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}

.comment-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.comment-list .children {
  margin: 20px 0 0 28px;
  padding: 0;
  list-style: none;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid #9b9b9b;
  border-radius: var(--radius-sm);
}

.comment-form textarea {
  min-height: 140px;
}

.comment-form .submit {
  min-height: 46px;
  padding: 10px 26px;
  border: 1px solid var(--red);
  border-radius: var(--radius-pill);
  background: var(--red);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
