/* Baza wiedzy i artykuły — osobny arkusz, aby uniknąć konfliktów ze starszym CSS */
:root {
  --knowledge-navy: #071b31;
  --knowledge-navy-2: #0d3154;
  --knowledge-blue: #169fc4;
  --knowledge-cyan: #31c3df;
  --knowledge-ink: #132033;
  --knowledge-muted: #627083;
  --knowledge-line: #dce5ed;
  --knowledge-bg: #f3f7fa;
  --knowledge-card: #ffffff;
}

/* ---------- BAZA WIEDZY ---------- */
.knowledge-page .page-hero {
  padding: 92px 0 72px;
}

.knowledge-page .page-hero h1 {
  max-width: 780px;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
}

.knowledge-page .knowledge-section {
  padding: 76px 0 104px;
  background:
    radial-gradient(circle at 10% 0%, rgba(49,195,223,.11), transparent 28rem),
    linear-gradient(180deg, #f7fafc 0%, #edf3f7 100%);
}

.knowledge-page .knowledge-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr);
  align-items: end;
  gap: 56px;
  margin-bottom: 34px;
}

.knowledge-page .knowledge-intro h2 {
  margin: 0;
}

.knowledge-page .knowledge-intro > p {
  margin: 0 0 4px;
  color: var(--knowledge-muted);
  font-size: 1.02rem;
}

/* Dokładnie 3 kolumny na szerokim ekranie */
.knowledge-page .knowledge-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 22px !important;
  align-items: stretch;
}

.knowledge-page .knowledge-card {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid rgba(121,146,167,.24);
  border-radius: 22px;
  background: var(--knowledge-card);
  box-shadow: 0 15px 44px rgba(14,39,63,.08);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.knowledge-page .knowledge-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--knowledge-blue), var(--knowledge-cyan));
  z-index: 2;
}

.knowledge-page .knowledge-card:hover,
.knowledge-page .knowledge-card:focus-within {
  transform: translateY(-6px);
  border-color: rgba(22,159,196,.65);
  box-shadow: 0 24px 60px rgba(14,39,63,.14);
}

.knowledge-page .knowledge-card__cover {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 330px;
  padding: 26px 26px 22px;
  color: inherit;
  text-decoration: none;
}

.knowledge-page .knowledge-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.knowledge-page .knowledge-card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 15px;
  background: linear-gradient(145deg, #e9f8fc, #d8eef6);
  box-shadow: inset 0 0 0 1px rgba(22,159,196,.12);
  color: #087c9c;
  font-size: 1.28rem;
  font-weight: 900;
}

.knowledge-page .knowledge-card__status {
  padding: 8px 10px;
  border-radius: 999px;
  background: #edf2f5;
  color: #728091;
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.knowledge-page .knowledge-card__status--ready {
  background: #def7ea;
  color: #08724c;
}

.knowledge-page .topic-meta {
  margin: 0 0 9px !important;
  color: #087e9e !important;
  font-size: .69rem !important;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.knowledge-page .knowledge-card h2 {
  min-height: 0 !important;
  margin: 0 0 13px !important;
  color: var(--knowledge-ink);
  font-size: 1.18rem !important;
  line-height: 1.3 !important;
  letter-spacing: -.025em;
}

.knowledge-page .knowledge-card p:not(.topic-meta) {
  margin: 0 0 22px !important;
  color: var(--knowledge-muted) !important;
  font-size: .91rem !important;
  line-height: 1.58 !important;
}

.knowledge-page .knowledge-card .card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto !important;
  padding-top: 16px;
  border-top: 1px solid #e7edf2;
  color: #087e9e;
  font-size: .88rem;
  font-weight: 850;
}

.knowledge-page .knowledge-card--featured {
  background: linear-gradient(150deg, #fff 30%, #eefbfe 100%);
}

.knowledge-page .knowledge-card--featured .knowledge-card__icon {
  background: linear-gradient(145deg, #20afd2, #08799e);
  color: #fff;
}

/* ---------- ARTYKUŁ ---------- */
.article-page {
  background: var(--knowledge-bg);
}

.article-page .article-hero {
  padding: 88px 0 70px;
}

.article-page .article-hero h1 {
  max-width: 930px;
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 5vw, 4.55rem);
  line-height: 1.03;
}

.article-page .article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.article-page .article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #e1edf5;
  font-size: .84rem;
}

.article-page .article-meta b {
  color: #fff;
}

.article-page .article-shell {
  padding: 64px 0 104px;
  background:
    radial-gradient(circle at 90% 0%, rgba(49,195,223,.08), transparent 25rem),
    var(--knowledge-bg);
}

.article-page .article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 34px;
  align-items: start;
}

.article-page .article {
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid var(--knowledge-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 65px rgba(13,38,61,.10);
}

.article-page .article__intro {
  padding: clamp(28px, 5vw, 52px) clamp(26px, 6vw, 66px) 36px;
  border-bottom: 1px solid var(--knowledge-line);
  background: linear-gradient(180deg, #fff, #f7fafc);
}

.article-page .article__intro .lead {
  margin: 0;
  color: #27384b;
  font-size: clamp(1.14rem, 2vw, 1.34rem);
  line-height: 1.72;
}

.article-page .article__body {
  padding: 38px clamp(26px, 6vw, 66px) 54px;
}

.article-page .article__body > p,
.article-page .article__body > ul,
.article-page .article__body > ol,
.article-page .article__body > table,
.article-page .article__body > .article-note {
  max-width: 74ch;
}

.article-page .article__body p,
.article-page .article__body li {
  color: #3b4b5e;
  font-size: 1rem;
  line-height: 1.78;
}

.article-page .article__body p {
  margin: 0 0 20px;
}

.article-page .article__body h2 {
  position: relative;
  margin: 54px 0 20px;
  padding-top: 22px;
  border-top: 1px solid var(--knowledge-line);
  color: var(--knowledge-ink);
  font-size: clamp(1.55rem, 3vw, 2.12rem);
  line-height: 1.2;
}

.article-page .article__body h2:first-of-type {
  margin-top: 34px;
}

.article-page .article__body h3 {
  margin: 30px 0 10px;
  color: #173451;
  font-size: 1.2rem;
}

.article-page .article__body ul,
.article-page .article__body ol {
  margin: 18px 0 28px;
  padding-left: 1.45rem;
}

.article-page .article__body li {
  margin-bottom: 9px;
  padding-left: 4px;
}

.article-page .article-note {
  margin: 30px 0;
  padding: 22px 24px;
  border: 1px solid #cbe7ef;
  border-left: 5px solid var(--knowledge-blue);
  border-radius: 14px;
  background: #eef9fc;
  color: #294357;
}

.article-page .article-note strong {
  display: block;
  margin-bottom: 7px;
  color: #0a3957;
  font-size: .79rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.article-page .article-table-wrap {
  max-width: 100%;
  margin: 26px 0 34px;
  overflow-x: auto;
  border: 1px solid var(--knowledge-line);
  border-radius: 14px;
}

.article-page .article table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: .92rem;
}

.article-page .article th,
.article-page .article td {
  padding: 14px 15px;
  border: 0;
  border-bottom: 1px solid var(--knowledge-line);
  text-align: left;
  vertical-align: top;
}

.article-page .article tr:last-child td {
  border-bottom: 0;
}

.article-page .article th {
  background: #0d3154;
  color: #fff;
  font-size: .77rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Wyraźnie odcięta sekcja autora */
.article-page .article-author {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin: 0 !important;
  padding: 32px clamp(26px, 6vw, 66px) !important;
  border: 0 !important;
  border-top: 1px solid rgba(255,255,255,.12) !important;
  background: linear-gradient(135deg, #071b31, #0d3154);
  color: #fff;
}

.article-page .article-author img {
  width: 92px !important;
  height: 92px !important;
  border: 3px solid rgba(255,255,255,.22);
  border-radius: 20px !important;
  object-fit: cover;
}

.article-page .article-author__label {
  display: block;
  margin-bottom: 5px;
  color: #7ed7e9;
  font-size: .69rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.article-page .article-author h2 {
  margin: 0 0 7px !important;
  color: #fff;
  font-size: 1.34rem !important;
}

.article-page .article-author p {
  max-width: 68ch;
  margin: 0 0 12px !important;
  color: #d5e2ec !important;
  font-size: .92rem !important;
  line-height: 1.6 !important;
}

.article-page .article-author__link {
  color: #7ed7e9;
  font-size: .88rem;
  font-weight: 850;
}

.article-page .article-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.article-page .sidebar-box {
  padding: 22px;
  border: 1px solid var(--knowledge-line);
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 36px rgba(13,38,61,.06);
}

.article-page .sidebar-box h2 {
  margin: 0 0 14px;
  color: var(--knowledge-ink);
  font-size: 1.03rem;
}

.article-page .toc {
  display: grid;
  gap: 2px;
}

.article-page .toc a {
  padding: 9px 0;
  border-bottom: 1px solid #edf1f4;
  color: #526275;
  font-size: .89rem;
}

.article-page .toc a:last-child {
  border-bottom: 0;
}

.article-page .toc a:hover {
  color: #087e9e;
}

.article-page .related {
  padding: 76px 0 90px;
  background: #e9f0f5;
}

.article-page .related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.article-page .related-card {
  padding: 24px;
  border: 1px solid var(--knowledge-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(13,38,61,.06);
}

.article-page .related-card h3 {
  margin: 0 0 8px;
  color: var(--knowledge-ink);
}

.article-page .related-card p {
  color: var(--knowledge-muted);
}

.article-page .related-card a {
  color: #087e9e;
  font-weight: 850;
}

/* Strony artykułów w przygotowaniu */
.article-page .coming-soon-panel {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 70px);
  border: 1px solid var(--knowledge-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(13,38,61,.09);
  text-align: center;
}

.article-page .coming-soon-panel .status-pill {
  display: inline-flex;
  margin-bottom: 20px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef3f6;
  color: #647386;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .knowledge-page .knowledge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

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

  .article-page .article-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .knowledge-page .knowledge-intro {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .knowledge-page .knowledge-grid {
    grid-template-columns: 1fr !important;
  }

  .knowledge-page .knowledge-card__cover {
    min-height: 0;
  }

  .article-page .article-shell {
    padding-top: 38px;
  }

  .article-page .article-sidebar,
  .article-page .related-grid {
    grid-template-columns: 1fr;
  }

  .article-page .article-author {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 16px;
  }

  .article-page .article-author img {
    width: 70px !important;
    height: 70px !important;
  }
}
