#hor-level-hub,
#hor-level-hub * { box-sizing:border-box; }

#hor-level-hub {
  --navy:#2A2F70;
  --navy-dark:#2A2F70;
  --yellow:#E8A924;
  --yellow-dark:#D89A16;
  --yellow-soft:#FFF9E9;
  --ink:#34394E;
  --muted:#687085;
  --line:#E1E5EF;
  --soft:#F7F9FC;
  --cream:#FFF9E9;
  --hor-level-accent:#2A2F70;
  --hor-level-soft:#F4F6FB;
  width:100%;
  overflow:hidden;
  background:#fff;
  color:var(--ink);
  font-family:Roboto,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  overflow-wrap:anywhere;
}

#hor-level-hub img { max-width:100%; display:block; }
#hor-level-hub a { color:inherit; text-decoration:none!important; }

#hor-level-hub h1,
#hor-level-hub h2,
#hor-level-hub h3,
#hor-level-hub p { margin-top:0; }

#hor-level-hub h1,
#hor-level-hub h2 {
  font-family:Roboto,Arial,sans-serif;
  text-wrap:balance;
}

.hor-level-shell {
  width:min(1180px,calc(100% - 48px));
  margin-inline:auto;
}

/* ===== TYPOGRAFIA I NAGŁÓWKI — identyczny system jak homepage ===== */
#hor-level-hub h1 {
  margin:0 0 16px;
  color:var(--navy);
  font-size:clamp(44px,5vw,64px);
  line-height:.95;
  letter-spacing:-.055em;
  font-weight:700;
}

#hor-level-hub h2 {
  margin:0;
  color:var(--navy);
  font-size:clamp(28px,2.65vw,36px);
  line-height:1.05;
  letter-spacing:-.03em;
  font-weight:700;
}

.hor-level-eyebrow {
  margin:0 0 8px;
  color:var(--navy);
  font-size:12px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.hor-level-kicker {
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 12px;
  color:var(--navy);
  font-size:12px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.hor-level-kicker::before {
  content:'';
  width:23px;
  height:3px;
  border-radius:99px;
  background:var(--yellow);
}

/* ===== HERO ===== */
.hor-level-hero {
  padding:42px 0 50px;
  border-bottom:1px solid var(--line);
  background:#fff;
}

.hor-level-hero-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(430px,.95fr);
  gap:48px;
  align-items:center;
}

.hor-level-hero-copy { min-width:0; }

.hor-level-lead {
  max-width:650px;
  margin:0 0 14px;
  color:#24345A;
  font-size:17px;
  line-height:1.5;
}

.hor-level-note {
  max-width:650px;
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

.hor-level-actions {
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin-top:26px;
}

.hor-level-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:48px;
  padding:0 24px;
  border-radius:10px;
  border:1px solid transparent;
  font-size:15px;
  font-weight:800;
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}

.hor-level-btn:hover { transform:translateY(-1px); }

.hor-level-btn-primary {
  background:var(--yellow)!important;
  border-color:var(--yellow)!important;
  color:var(--navy-dark)!important;
}

.hor-level-btn-primary:hover {
  background:var(--yellow-dark)!important;
  border-color:var(--yellow-dark)!important;
}

.hor-level-btn-secondary {
  background:#fff!important;
  border-color:var(--navy)!important;
  color:var(--navy)!important;
}

.hor-level-btn-secondary:hover {
  background:var(--yellow-soft)!important;
}

.hor-level-btn-light {
  background:transparent!important;
  border-color:rgba(255,255,255,.65)!important;
  color:#fff!important;
}

.hor-level-btn-light:hover {
  background:rgba(255,255,255,.08)!important;
  border-color:#fff!important;
}

.hor-level-hero-media {
  position:relative;
  aspect-ratio:1.48/1;
  overflow:hidden;
  border-radius:18px;
  background:#F1F4F7;
  box-shadow:0 10px 28px rgba(42,47,112,.065);
}

.hor-level-hero-media img {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

/* ===== SEKCJE ===== */
.hor-level-filter-section,
.hor-level-tools,
.hor-level-levels { padding:28px 0; }

.hor-level-section-heading {
  margin-bottom:18px;
}

.hor-level-section-heading-split {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:24px;
}

.hor-level-section-heading-split > p,
.hor-level-section-heading > p:not(.hor-level-eyebrow) {
  flex:0 1 430px;
  margin:0;
  color:var(--muted);
  font-size:12.5px;
  line-height:1.45;
}

/* ===== FILTRY ===== */
.hor-level-filters {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}

.hor-level-filters button {
  min-height:40px;
  padding:0 15px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--navy);
  font:inherit;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
  transition:background .18s ease,color .18s ease;
}

.hor-level-filters button:hover { background:var(--soft); }

.hor-level-filters button.is-active {
  background:var(--navy);
  color:#fff;
}

/* ===== BIBLIOTEKA — ten sam język kart co rozwiązania na homepage ===== */
.hor-level-library {
  padding:34px 0 42px;
  border-top:1px solid #EEF1F6;
  border-bottom:1px solid #EEF1F6;
  background:var(--soft);
}

.hor-level-library-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.hor-level-library-card {
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-width:0;
  border:1px solid #E3E7EF;
  border-radius:14px;
  background:#fff;
  box-shadow:0 8px 24px rgba(42,47,112,.055);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}

.hor-level-library-card:hover {
  transform:translateY(-2px);
  border-color:#D3D9E5;
  box-shadow:0 14px 30px rgba(42,47,112,.085);
}

.hor-level-library-card[hidden] { display:none!important; }

/* Miniatura jest celowo drugoplanowa: ma wspierać orientację, nie konkurować z tytułem wpisu. */
.hor-level-card-image {
  display:block;
  aspect-ratio:2.35/1;
  margin:10px 10px 0;
  overflow:hidden;
  border:1px solid #EDF0F5;
  border-radius:10px;
  background:linear-gradient(180deg,#F8F9FC,#F2F4F8);
}

.hor-level-card-image img {
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.86;
  filter:saturate(.68) contrast(.92) brightness(1.03);
  transition:opacity .18s ease,filter .18s ease,transform .18s ease;
}

.hor-level-library-card:hover .hor-level-card-image img {
  opacity:.94;
  filter:saturate(.82) contrast(.96) brightness(1.02);
  transform:scale(1.012);
}

.hor-level-card-image.is-placeholder {
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(145deg,var(--hor-level-soft),#fff);
}

.hor-level-placeholder {
  width:72%;
  padding:18px;
  border:1px solid rgba(42,47,112,.08);
  border-radius:12px;
  background:rgba(255,255,255,.78);
}

.hor-level-placeholder small {
  color:var(--hor-level-accent);
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.hor-level-placeholder strong {
  display:block;
  margin-top:7px;
  color:var(--navy);
  font-size:18px;
  line-height:1.2;
}

.hor-level-card-body {
  display:flex;
  flex-direction:column;
  flex:1;
  padding:14px 15px 15px;
}

.hor-level-card-meta {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom:8px;
}

.hor-level-card-meta span {
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:0 8px;
  border-radius:999px;
  background:var(--yellow);
  color:var(--navy-dark);
  font-size:10px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.hor-level-card-meta .hor-level-meta-level {
  background:var(--hor-level-soft);
  color:var(--hor-level-accent);
  border:1px solid rgba(42,47,112,.08);
}

#hor-level-hub .hor-level-library-card h3 {
  margin:0 0 8px;
  color:var(--navy);
  font-family:Roboto,Arial,sans-serif;
  font-size:16px;
  line-height:1.25;
}

.hor-level-library-card h3 a { color:var(--navy); }

.hor-level-excerpt {
  flex:1;
  margin:0 0 12px;
  color:#506184;
  font-size:12px;
  line-height:1.4;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.hor-level-card-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:auto;
  padding-top:10px;
  border-top:1px solid #EEF1F6;
}

.hor-level-card-type {
  color:#66738B;
  font-size:11px;
}

.hor-level-text-link {
  color:var(--navy)!important;
  font-size:12px;
  font-weight:800;
}

.hor-level-text-link::after {
  content:' →';
  color:var(--yellow-dark);
}

.hor-level-no-results,
.hor-level-empty {
  padding:24px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:var(--muted);
  text-align:center;
}

.hor-level-pagination { margin-top:26px; }

.hor-level-pagination .nav-links {
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:7px;
}

.hor-level-pagination .page-numbers {
  min-width:38px;
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  color:var(--navy);
  font-size:12px;
  font-weight:800;
}

.hor-level-pagination .current {
  border-color:var(--navy);
  background:var(--navy);
  color:#fff;
}

/* ===== NARZĘDZIA ===== */
.hor-level-tools-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.hor-level-tool {
  min-height:112px;
  display:flex;
  gap:13px;
  align-items:center;
  padding:17px;
  border:1px solid #E3E7EF;
  border-radius:14px;
  background:#fff;
  box-shadow:0 8px 24px rgba(42,47,112,.045);
  color:var(--navy)!important;
}

.hor-level-tool-mark {
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  flex:0 0 48px;
  border-radius:50%;
  background:#FFF7E5;
  color:var(--navy);
  font-size:12px;
  font-weight:900;
}

.hor-level-tool-copy { display:flex; flex-direction:column; min-width:0; }
.hor-level-tool strong { font-size:14px; }
.hor-level-tool small {
  margin-top:3px;
  color:var(--muted);
  font-size:11.5px;
  line-height:1.4;
}
.hor-level-tool em {
  margin-top:7px;
  color:var(--navy);
  font-size:11px;
  font-style:normal;
  font-weight:800;
}

/* ===== CTA PAID ===== */
.hor-level-paid { padding:10px 0 34px; }

.hor-level-paid-card {
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(250px,.45fr);
  border-radius:14px;
  background:var(--navy);
}

.hor-level-paid-copy { padding:32px 34px; }

.hor-level-paid-copy h2 { color:#fff!important; }

.hor-level-paid-copy > p:not(.hor-level-eyebrow) {
  max-width:720px;
  margin:12px 0 0;
  color:#E1E6F2;
  font-size:13px;
  line-height:1.55;
}

.hor-level-paid-eyebrow { color:var(--yellow)!important; }

.hor-level-paid-mark {
  min-height:210px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:24px;
  background:linear-gradient(145deg,#FFF7DC,#FFFDF5);
}

.hor-level-paid-mark span {
  color:#7A8498;
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.hor-level-paid-mark strong {
  color:var(--navy);
  font-family:Roboto,Arial,sans-serif;
  font-size:25px;
  font-style:italic;
  line-height:1.24;
  text-align:center;
}

/* ===== POZIOMY — skopiowane 1:1 z homepage V12 ===== */
.hor-level-level-grid {
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:16px;
}

.hor-level-level-link {
  --level-bg:#fff;
  --level-accent:var(--navy);
  position:relative;
  min-height:132px;
  padding:22px 14px 16px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  overflow:visible;
  border:1px solid rgba(42,47,112,.10);
  border-radius:14px;
  background:linear-gradient(145deg,var(--level-bg) 0%,#fff 76%);
  box-shadow:0 8px 22px rgba(42,47,112,.055);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}

.hor-level-level-link::before {
  content:'';
  position:absolute;
  top:0;
  left:20px;
  right:20px;
  height:4px;
  border-radius:0 0 999px 999px;
  background:var(--level-accent);
}

.hor-level-level-link::after {
  content:'';
  position:absolute;
  inset:8px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.72);
  pointer-events:none;
}

.hor-level-level-link:hover {
  transform:translateY(-3px);
  border-color:rgba(42,47,112,.20);
  box-shadow:0 14px 30px rgba(42,47,112,.09);
}

.hor-level-level-link:not(:last-child) > .hor-level-level-code::after {
  content:'→';
  position:absolute;
  right:-24px;
  top:50%;
  transform:translateY(-50%);
  color:#7C86A0;
  font-size:22px;
  line-height:1;
  font-weight:400;
  z-index:4;
}

.hor-level-level-code {
  position:relative;
  margin-bottom:7px;
  color:var(--level-accent);
  font-size:30px;
  line-height:1;
  font-weight:900;
  letter-spacing:-.02em;
}

.hor-level-level-link strong {
  color:var(--navy);
  font-size:14px;
  line-height:1.2;
  font-weight:800;
}

.hor-level-level-link p {
  margin:8px 0 0;
  color:#52617F;
  font-size:12px;
  line-height:1.35;
}

/* aktywny poziom: tylko bardzo subtelne wzmocnienie, bez zmiany systemu */
.hor-level-level-link.is-current {
  border-color:var(--level-accent);
}

/* ACCESSIBILITY */
#hor-level-hub a:focus-visible,
#hor-level-hub button:focus-visible {
  outline:3px solid var(--yellow);
  outline-offset:3px;
}

/* RESPONSIVE — zgodne z homepage */
@media (max-width:1100px) {
  .hor-level-shell { width:min(100% - 34px,1180px); }
}

@media (max-width:820px) {
  .hor-level-hero-grid { grid-template-columns:1fr; gap:26px; }
  .hor-level-hero-media { aspect-ratio:16/10; }
  .hor-level-section-heading-split { flex-direction:column; align-items:flex-start; gap:8px; }
  .hor-level-library-grid { grid-template-columns:repeat(2,1fr); }
  .hor-level-tools-grid { grid-template-columns:1fr; }
  .hor-level-paid-card { grid-template-columns:1fr; }
  .hor-level-paid-mark { min-height:150px; }
  .hor-level-level-grid { grid-template-columns:1fr; gap:10px; }
  .hor-level-level-link:not(:last-child) > .hor-level-level-code::after { display:none; }
}

@media (max-width:560px) {
  .hor-level-shell { width:min(100% - 24px,1180px); }
  #hor-level-hub h1 { font-size:clamp(40px,12vw,56px); }
  .hor-level-actions { display:grid; grid-template-columns:1fr; }
  .hor-level-btn { width:100%; }
  .hor-level-filters {
    flex-wrap:nowrap;
    overflow-x:auto;
    scrollbar-width:thin;
  }
  .hor-level-filters button { flex:0 0 auto; }
  .hor-level-library-grid { grid-template-columns:1fr; }
  .hor-level-paid-copy { padding:26px 20px; }
}

@media (prefers-reduced-motion:reduce) {
  #hor-level-hub * { transition:none!important; scroll-behavior:auto!important; }
}


/* ===== KOMPETENCJE — ten sam język wizualny, prostsza nawigacja ===== */
.hor-competency-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.hor-competency-link {
  min-height:78px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:15px;
  border:1px solid rgba(42,47,112,.10);
  border-radius:14px;
  background:linear-gradient(145deg,#F7F9FC,#fff 76%);
  box-shadow:0 8px 22px rgba(42,47,112,.045);
  color:var(--navy)!important;
  font-size:14px;
  font-weight:800;
  text-align:center;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}

.hor-competency-link:hover {
  transform:translateY(-2px);
  border-color:rgba(42,47,112,.18);
  box-shadow:0 12px 26px rgba(42,47,112,.07);
}

.hor-competency-link.is-current {
  border-color:var(--navy);
  background:linear-gradient(145deg,var(--yellow-soft),#fff 76%);
}

@media (max-width:820px) {
  .hor-competency-grid { grid-template-columns:repeat(2,1fr); }
}

@media (max-width:560px) {
  .hor-competency-grid { grid-template-columns:1fr; }
}
