/* ============ Motyw Porównator ============ */
@font-face { font-family: "Fira Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/FiraSans-Regular.woff2) format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/FiraSans-SemiBold.woff2) format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/FiraSans-Bold.woff2) format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 800; font-style: normal; font-display: swap; src: url(../fonts/FiraSans-ExtraBold.woff2) format("woff2"); }

:root {
  --pc-navy: #0f2a44; --pc-navy-2: #153654; --pc-teal: #0e9f9a; --pc-teal-d: #0b7b77; --pc-teal-l: #e3f5f4;
  --pc-orange: #f28c28; --pc-orange-l: #fdf0e2; --pc-grey: #5b6770; --pc-line: #d5dce1; --pc-bg: #f5f7f9;
  --pc-text: #1d2830; --pc-radius: 12px;
  --wrap: 1200px; --content: 760px; --gutter: clamp(1rem, 4vw, 2rem);
  --font: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--pc-text); background: #fff; -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--pc-teal-d); text-underline-offset: .15em; }
a:hover { color: var(--pc-navy); }
:focus-visible { outline: 3px solid var(--pc-teal); outline-offset: 2px; }
h1, h2, h3, h4 { color: var(--pc-navy); line-height: 1.2; font-weight: 800; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.875rem, 4.5vw, 2.75rem); }
h2 { font-size: clamp(1.375rem, 3vw, 1.75rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--content { max-width: calc(var(--content) + 2 * var(--gutter)); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: .5rem; z-index: 100; background: #fff; padding: .5rem 1rem; border-radius: 8px; }
.skip-link:focus { left: .5rem; }

/* ---------- Nagłówek ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--pc-line); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--pc-navy); }
.brand .robot { color: var(--pc-navy); flex: 0 0 auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-weight: 800; font-size: 1.375rem; letter-spacing: -.02em; color: var(--pc-navy); }
.brand__tagline { font-size: .75rem; color: var(--pc-grey); }
.brand__logo { max-height: 44px; width: auto; }
.site-nav { margin-left: auto; }
.site-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.site-nav .menu a { display: block; padding: .5rem .75rem; border-radius: 8px; color: var(--pc-navy); font-weight: 600; text-decoration: none; }
.site-nav .menu a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { background: var(--pc-teal-l); color: var(--pc-teal-d); }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--pc-line); border-radius: 10px; background: #fff; cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 20px; height: 2px; background: var(--pc-navy); margin: 0 auto; position: relative; transition: transform .2s; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; } .nav-toggle__bars::after { top: 6px; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--pc-line); padding: .5rem var(--gutter) 1rem; box-shadow: 0 12px 24px rgba(15,42,68,.08); }
  .nav-open .site-nav { display: block; }
  .site-nav .menu { flex-direction: column; }
  .site-header__inner { position: relative; }
  .nav-open .nav-toggle__bars { background: transparent; }
  .nav-open .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }
}

/* ---------- Okruszki i nagłówki stron ---------- */
.breadcrumbs ol { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; font-size: .875rem; color: var(--pc-grey); }
.breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: .35rem; color: var(--pc-line); }
.breadcrumbs a { color: var(--pc-grey); text-decoration: none; }
.breadcrumbs a:hover { color: var(--pc-teal-d); text-decoration: underline; }
.page-head { padding-top: clamp(1.5rem, 4vw, 2.5rem); }
.page-title { margin-bottom: .5rem; }
.entry-meta { color: var(--pc-grey); font-size: .9375rem; }
.entry-content { padding-bottom: 3rem; }
.entry-content > * + * { margin-top: 0; }
.entry-content .alignwide { width: min(calc(var(--wrap)), calc(100vw - 2 * var(--gutter))); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content ul, .entry-content ol { padding-left: 1.25rem; }
.entry-content blockquote { margin: 1.5rem 0; padding: .75rem 1.25rem; border-left: 4px solid var(--pc-teal); background: var(--pc-teal-l); border-radius: 0 8px 8px 0; }
.entry-thumb img { border-radius: var(--pc-radius); }

/* ---------- Hero (pełna szerokość) ---------- */
.hero { background: var(--pc-navy); color: #fff; padding: clamp(1.25rem, 3vw, 2rem) 0 clamp(1.5rem, 4vw, 2.5rem); margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.hero .breadcrumbs ol, .hero .breadcrumbs a { color: #b9c7d3; }
.hero .breadcrumbs li:not(:last-child)::after { color: #4b6680; }
.hero__title { color: #fff; margin-bottom: .35rem; }
.hero__lead { color: #dbe4ea; max-width: 62ch; margin: 0; font-size: 1.125rem; }
.hero--bank .pc-bankhead { background: transparent; padding: 0; margin: 0; border-radius: 0; }
.hero--bank .pc-bankhead__logo { flex-basis: 200px; height: 120px; }
.hero--bank .pc-bankhead__title { font-size: clamp(2rem, 5vw, 3rem); }

/* ---------- Układ strony banku ---------- */
.layout-bank { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-bottom: 3.5rem; }
@media (min-width: 1000px) {
  .layout-bank { grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; align-items: start; }
  .layout-bank__side { position: sticky; top: calc(68px + 1.5rem); }
  .admin-bar .layout-bank__side { top: calc(68px + 32px + 1.5rem); }
}
@media (min-width: 640px) and (max-width: 999px) { .layout-bank__side { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; } }
.layout-bank__side { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 640px) and (max-width: 999px) { .layout-bank__side { display: grid; } }
.layout-bank__main > .pc-section { margin: 0 0 2.5rem; }
.layout-bank .pc-list { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* ---------- Katalog banków ---------- */
.bank-grid { list-style: none; margin: 0 0 3.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.bank-tile { display: flex; flex-direction: column; gap: .35rem; padding: 1rem; border: 1px solid var(--pc-line); border-radius: var(--pc-radius); background: #fff; transition: border-color .15s, box-shadow .15s; }
.bank-tile:hover { border-color: var(--pc-teal); box-shadow: 0 6px 18px rgba(15,42,68,.07); }
.bank-tile__link { display: flex; flex-direction: column; gap: .6rem; text-decoration: none; color: var(--pc-navy); }
.bank-tile__logo { height: 72px; display: flex; align-items: center; justify-content: center; background: var(--pc-bg); border-radius: 8px; padding: .5rem; }
.bank-tile__logo img { width: 100%; height: 100%; object-fit: contain; }
.bank-tile__initial { font-size: 2rem; font-weight: 800; color: var(--pc-teal); }
.bank-tile__name { font-weight: 800; font-size: 1.125rem; }
.bank-tile__meta { font-size: .875rem; color: var(--pc-grey); }
.bank-tile__meta strong { color: var(--pc-teal-d); }
.bank-tile__phone { font-size: .875rem; color: var(--pc-navy); text-decoration: none; }

/* ---------- Listy wpisów ---------- */
.post-list { display: flex; flex-direction: column; gap: 1.5rem; padding-bottom: 2rem; }
.post-item__title { margin-bottom: .2rem; font-size: 1.375rem; }
.post-item__title a { color: var(--pc-navy); text-decoration: none; }
.post-item__meta { color: var(--pc-grey); font-size: .875rem; margin: 0 0 .35rem; }
.nav-links { display: flex; gap: .5rem; padding-bottom: 3rem; }
.nav-links .page-numbers { padding: .35rem .75rem; border: 1px solid var(--pc-line); border-radius: 8px; text-decoration: none; }
.nav-links .current { background: var(--pc-navy); color: #fff; border-color: var(--pc-navy); }
.error-404 { text-align: center; padding-bottom: 4rem; }
.error-404 .robot { width: 96px; height: 96px; }
.search-form { display: flex; gap: .5rem; max-width: 420px; margin: 1rem auto; }
.search-form input[type=search] { flex: 1; padding: .55rem .75rem; border: 1px solid var(--pc-line); border-radius: 8px; font: inherit; }
.search-form .search-submit { padding: .55rem 1rem; border: 0; border-radius: 8px; background: var(--pc-navy); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- Stopka ---------- */
.site-footer { background: var(--pc-navy); color: #b9c7d3; padding: 2.5rem 0 1.5rem; margin-top: 2rem; }
.site-footer__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 760px) { .site-footer__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.brand--footer .brand__name { color: #fff; }
.site-footer__brand p { margin: .75rem 0 0; max-width: 42ch; font-size: .9375rem; }
.site-footer__nav .menu { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2rem; }
.site-footer__nav a { display: inline-block; padding: .25rem 0; color: #fff; text-decoration: none; font-weight: 600; }
.site-footer__nav a:hover { color: #7ff0e6; }
.site-footer__legal { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid #24425f; font-size: .8125rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.site-footer__legal p { margin: 0; max-width: 80ch; }

/* ---------- Strona kalkulatora: 3 kolumny (kategorie | kalkulator i artykuł | spis treści) ---------- */
.calc-wrap { padding-top: 1.25rem; }
.layout-calc { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "nav"; }
.layout-calc__main { grid-area: main; min-width: 0; }
.layout-calc__nav { grid-area: nav; }
.layout-calc__toc { grid-area: toc; display: none; }
.calc-head { margin-bottom: 1.25rem; }
.calc-head__cat { display: inline-block; margin-bottom: .35rem; font-size: .8125rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--pc-teal-d); text-decoration: none; }
.calc-head__title { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: .35rem; }
.calc-head .pc-toolmeta { margin-bottom: .75rem; }
.calc-head__lead { font-size: 1.125rem; color: var(--pc-grey); margin: 0; max-width: 65ch; }
.calc-content { max-width: 72ch; }
.calc-content h2 { margin-top: 2.25rem; font-size: 1.5rem; scroll-margin-top: 96px; }
.calc-content h3 { margin-top: 1.5rem; font-size: 1.1875rem; scroll-margin-top: 96px; }
.calc-content table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.calc-content th, .calc-content td { border: 1px solid var(--pc-line); padding: .5rem .65rem; text-align: left; }
.calc-content thead th { background: var(--pc-bg); }
.layout-calc__nav .pc-tree { padding-top: 1rem; border-top: 3px solid var(--pc-navy); }
@media (min-width: 900px) {
  .layout-calc { grid-template-columns: 240px minmax(0, 1fr); grid-template-areas: "nav main"; }
  .layout-calc__nav .pc-tree { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow: auto; padding-top: 0; border-top: 0; }
}
@media (min-width: 1180px) {
  .layout-calc.has-toc { grid-template-columns: 230px minmax(0, 1fr) 220px; grid-template-areas: "nav main toc"; }
  .layout-calc.has-toc .layout-calc__toc { display: block; }
  .layout-calc.has-toc .pc-toc--inline { display: none; }
  .layout-calc__toc .pc-toc { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow: auto; padding-left: 1rem; border-left: 1px solid var(--pc-line); font-size: .875rem; }
  .layout-calc__toc .pc-toc__list { padding-left: 1.1rem; }
}

/* ---------- Katalog i kategorie kalkulatorów ---------- */
.section-title { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.calc-cats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.calc-cat { display: flex; flex-direction: column; padding: 1.25rem; border: 1px solid var(--pc-line); border-top: 4px solid var(--pc-teal); border-radius: var(--pc-radius); background: #fff; }
.calc-cat__title { font-size: 1.25rem; margin: 0 0 .35rem; display: flex; align-items: center; gap: .5rem; }
.calc-cat__title a { color: var(--pc-navy); text-decoration: none; }
.calc-cat__count { font-size: .75rem; font-weight: 700; color: var(--pc-grey); background: var(--pc-bg); border-radius: 999px; padding: .1rem .55rem; }
.calc-cat__desc { color: var(--pc-grey); font-size: .9375rem; margin: 0 0 .75rem; }
.calc-cat__list { list-style: none; margin: 0 0 1rem; padding: 0; }
.calc-cat__list li { padding: .3rem 0; border-bottom: 1px dashed var(--pc-line); }
.calc-cat__list a { color: var(--pc-navy); text-decoration: none; }
.calc-cat__list a:hover { color: var(--pc-teal-d); text-decoration: underline; }
.calc-cat__more { margin-top: auto; font-weight: 700; text-decoration: none; }
.calc-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.calc-card__link { display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: 1.1rem 1.15rem; border: 1px solid var(--pc-line); border-radius: var(--pc-radius); background: #fff; color: var(--pc-text); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.calc-card__link:hover { border-color: var(--pc-teal); box-shadow: 0 6px 18px rgba(15,42,68,.07); color: var(--pc-text); }
.calc-card__cat { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--pc-teal-d); }
.calc-card__title { font-size: 1.125rem; margin: 0; }
.calc-card__desc { margin: 0; font-size: .9375rem; color: var(--pc-grey); }
.calc-card__go { margin-top: auto; padding-top: .35rem; font-weight: 700; color: var(--pc-orange); }
.layout-calcarchive { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .layout-calcarchive { grid-template-columns: 240px minmax(0, 1fr); }
  .layout-calcarchive__nav { order: -1; }
}
