/*
Theme Name: Finanset
Theme URI: https://finanset.pl
Author: Twoje Studio
Author URI: https://example.com
Description: W pełni edytowalny motyw WordPress dla serwisu porównującego rankingi bankowe (konta, karty, kredyty, lokaty). Zaprojektowany na podstawie makiety Figma - strona główna oraz strona rankingu. Motyw obsługuje własny typ treści "Oferty rankingowe", akapity FAQ, menu, logo, widgety w stopce oraz panel Personalizacji dla sekcji hero.
Version: 1.8.1
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: finanset
Tags: custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, blog
*/

/* ==========================================================================
   1. RESET & CUSTOM PROPERTIES
   ========================================================================== */
:root {
  --c-primary: #13a6da;
  --c-primary-alt: #1caad7;
  --c-secondary: #7ed9b8;
  --c-secondary-alt: #88dcbd;
  --c-gradient: linear-gradient(90deg, var(--c-primary) 0%, var(--c-secondary) 100%);
  --c-gradient-soft: linear-gradient(90deg, #18a8d8 0%, #7bd7b9 100%);
  --c-text: #14161a;
  --c-text-soft: #323232;
  --c-muted: #64748b;
  --c-muted-2: #abaab3;
  --c-bg-soft: #f7f7f7;
  --c-white: #ffffff;
  --c-border: #e7e7ea;
  --c-border-accent: #88dcbd;

  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 15px;
  --radius-sm: 10px;

  /*
   * Jak Moneteo przy ~1884 px:
   *   naglowek/stopka  max-width 1440 px  (margines ~222 px),
   *   tresc strony     max-width 1200 px  (margines ~342 px).
   */
  --shell: 1200px;
  --shell-wide: 1440px;
  --container: 1200px;

  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --shadow-card: 0 20px 45px -25px rgba(20, 30, 45, 0.25);
  --shadow-soft: 0 12px 30px -18px rgba(20, 30, 45, 0.18);
  --heading-section-size: clamp(1.25rem, 1rem + .8vw, 1.75rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--c-text);
  background: var(--c-white);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font-family: inherit;
}

.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: 0;
  background: var(--c-primary);
  color: #fff;
  padding: 14px 22px;
  z-index: 10000;
  border-radius: 0 0 10px 0;
}
.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   2. LAYOUT HELPERS
   ========================================================================== */
.shell {
  max-width: var(--shell);
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  container-type: inline-size;
  container-name: page;
}

@media (min-width: 768px) {
  .shell {
    padding: 0 30px;
  }
}

.shell--wide {
  max-width: var(--shell-wide);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 48px 0;
}

@media (min-width: 1024px) {
  .section {
    padding: 72px 0;
  }
}

.section--tight {
  padding: 32px 0;
}

.text-gradient {
  background: var(--c-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 28px;
  min-height: 52px;
  border-radius: var(--radius-xl);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  line-height: 1.25;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--c-gradient);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.btn--ghost {
  background: var(--c-bg-soft);
  color: var(--c-text);
}

.btn--outline {
  background: transparent;
  border: 3px solid var(--c-border-accent);
  color: var(--c-text-soft);
}

.btn--sm {
  padding: 14px 22px;
  min-height: 44px;
  font-size: 0.9rem;
  border-radius: var(--radius-lg);
}

.btn--block {
  width: 100%;
}

.eyebrow {
  font-size: 1.125rem;
  font-weight: 700;
}

.section-heading {
  font-size: var(--heading-section-size);
  font-weight: 700;
  margin: 0 0 24px;
  line-height: 1.2;
  color: var(--c-text);
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--c-muted);
}

/* ==========================================================================
   3. HEADER
   ========================================================================== */
.site-header {
  padding: 20px 0 0;
  position: relative;
  z-index: 50;
}

.site-header .shell--wide {
  max-width: 1920px;
}

.header-bar {
  background: var(--c-bg-soft);
  border: 1px solid #edf1f3;
  border-radius: 18px;
  box-shadow: 0 12px 28px -24px rgba(8, 39, 60, 0.55);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-text);
  flex-shrink: 0;
}

.site-branding__name {
  display: block;
  width: 198px;
  font-size: 1.25rem;
  line-height: 1.25;
}

.site-branding img {
  max-height: 40px;
  width: auto;
}

.site-branding .site-branding__default-logo {
  display: block;
  width: 198px;
  height: auto;
  max-height: 40px;
}

@media (max-width: 767px) {
  .site-branding .site-branding__default-logo {
    width: 156px;
    max-height: 30px;
  }
}

.primary-nav {
  flex: 1;
  display: none;
  align-self: center;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 36px;
}

.primary-nav li {
  display: flex;
  align-items: center;
}

.primary-nav li::after {
  content: "";
  width: 6px;
  height: 6px;
  margin: -3px 0 0 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  line-height: 1;
  color: var(--c-text);
  white-space: nowrap;
}

.primary-nav a:hover {
  color: var(--c-primary);
}

@media (min-width: 1200px) {
  .primary-nav > ul > li {
    position: relative;
  }

  .primary-nav .sub-menu {
    position: absolute;
    z-index: 80;
    top: calc(100% + 18px);
    left: -20px;
    display: grid;
    visibility: hidden;
    width: 320px;
    gap: 2px;
    padding: 12px;
    border: 1px solid #dce8ec;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 54px -30px rgba(7, 42, 65, 0.68);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-7px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  .primary-nav > ul > li:nth-child(4) > .sub-menu {
    left: 50%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(760px, calc(100vw - 80px));
    transform: translate(-50%, -7px);
  }

  .primary-nav > ul > li:nth-child(4):hover > .sub-menu,
  .primary-nav > ul > li:nth-child(4):focus-within > .sub-menu {
    transform: translate(-50%, 0);
  }

  .primary-nav li:hover > .sub-menu,
  .primary-nav li:focus-within > .sub-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .primary-nav .sub-menu::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 20px;
  }

  .primary-nav .sub-menu li {
    display: block;
  }

  .primary-nav .sub-menu li::after {
    display: none;
  }

  .primary-nav .sub-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #17334a;
    font-size: 0.84rem;
    line-height: 1.35;
    white-space: normal;
  }

  .primary-nav .sub-menu a:hover,
  .primary-nav .sub-menu a:focus {
    background: #edf8f7;
    color: #078e91;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: none;
  flex-shrink: 0;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.menu-toggle {
  display: inline-flex;
  background: #fff;
}

@media (min-width: 1200px) {
  .primary-nav {
    display: block;
    transform: translateY(5px);
  }

  .header-actions .icon-btn {
    width: 32px;
    height: 32px;
    background: transparent;
  }

  .header-actions .icon-btn svg {
    width: 23px;
    height: 23px;
  }

  .menu-toggle {
    display: none;
  }
}

.mobile-nav-panel {
  display: none;
  background: var(--c-bg-soft);
  border-radius: var(--radius-lg);
  margin-top: 12px;
  padding: 10px 20px;
}

.mobile-nav-panel.is-open {
  display: block;
}

.mobile-nav-panel ul {
  display: flex;
  flex-direction: column;
}

.mobile-nav-panel li {
  border-bottom: 1px solid #e7e7ea;
}

.mobile-nav-panel li:last-child {
  border-bottom: none;
}

.mobile-nav-panel a {
  display: block;
  padding: 14px 4px;
  font-size: 1.05rem;
}

.mobile-nav-panel .sub-menu {
  margin: 4px 0 8px 12px;
  padding-left: 14px;
  border-left: 2px solid #66d6c5;
}

.mobile-nav-panel .sub-menu li {
  border-bottom: 0;
}

.mobile-nav-panel .sub-menu a {
  padding-block: 7px;
  color: #476074;
  font-size: 0.9rem;
  font-weight: 500;
}

@media (min-width: 1200px) {
  .mobile-nav-panel {
    display: none !important;
  }
}

/* ==========================================================================
   4. HERO
   ========================================================================== */
.hero {
  position: relative;
  padding: 20px 0 32px;
}

/*
 * Scena hero. Grafika i tekst leżą w tej samej komórce siatki, więc wysokość
 * sekcji wynika z proporcji grafiki — tak jak w makiecie. Grafika to jeden plik
 * (zdjęcie razem z poświatą gradientu): strona główna 1540x942 px,
 * strona rankingu 1540x856 px. Pozycje elementów podane są w procentach tych
 * wymiarów, dzięki czemu układ skaluje się bez rozjeżdżania się z projektem.
 */
.hero-stage {
  position: relative;
  display: grid;
}

.hero-visual {
  grid-area: 1 / 1;
  position: relative;
  align-self: start;
}

@media (min-width: 768px) {
  .hero-visual {
    margin-top: 56px;
  }
}

@media (min-width: 1200px) {
  .hero-visual {
    margin-top: 72px;
  }
}

.hero-figure {
  display: block;
}

.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-copy {
  grid-area: 1 / 1;
  align-self: start;
  position: relative;
  z-index: 2;
  width: 59.7%;
  padding-top: 10.2%;
}

.hero-stage--ranking .hero-copy {
  padding-top: 0.5%;
}

/* Na stronach rankingów grafika zaczyna się bliżej górnej krawędzi. */
@media (min-width: 768px) {
  .template-ranking .hero-visual {
    margin-top: -36px;
  }

  .template-ranking .hero-copy {
    padding-top: 8.4%;
  }

}

@media (min-width: 1200px) {
  .template-ranking .hero-visual {
    margin-top: -72px;
  }

  .template-ranking .hero-copy {
    padding-top: 7.8%;
  }

  .template-ranking .hero-stage--compact-copy .hero-copy {
    padding-top: 7.2%;
  }

  .template-ranking .hero > .shell,
  .template-ranking #ranking-lista > .shell {
    max-width: 1320px;
  }
}

.hero-heading {
  font-size: 2.4rem;
  font-size: clamp(1.8rem, 4.54cqi, 3.5rem);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 18px;
}

.hero-subtitle {
  font-weight: 300;
  font-size: 1.05rem;
  font-size: clamp(0.95rem, 1.56cqi, 1.25rem);
  max-width: 30.5em;
  margin: 0 0 24px;
  color: var(--c-text);
}

.hero-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

/* Dymki leżą na grafice hero (względem .hero-visual). */
.hero-badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.62em;
  min-width: 25.84%;
  max-width: 46%;
  padding: 1em 1.25em;
  background: #fff;
  border-radius: var(--radius-xl);
  font-size: 0.9rem;
  font-size: clamp(0.75rem, 1.56cqi, 1.15rem);
  line-height: 1.15;
}

.hero-badge .badge-icon {
  width: 1.46em;
  height: 1.46em;
  flex-shrink: 0;
}

.badge-accent {
  font-weight: 500;
}

.badge-accent--blue {
  color: var(--c-primary);
}

.badge-accent--green {
  color: var(--c-secondary);
}

.hero-stage--home .hero-badge--a {
  left: 23.57%;
  top: 70.81%;
}

.hero-stage--home .hero-badge--b {
  left: 61.17%;
  top: 79.19%;
}

.hero-stage--home .hero-badge--c {
  left: 29.61%;
  top: 88.85%;
}

.hero-stage--ranking .hero-badge--a {
  left: 22.01%;
  top: 70.79%;
}

.hero-stage--ranking .hero-badge--b {
  left: 69.03%;
  top: 78.04%;
}

.hero-stage--ranking .hero-badge--c {
  left: 31.3%;
  top: 87.5%;
}

@media (max-width: 1199px) {
  .hero-badge {
    padding: 0.65em 0.85em;
  }
}

@media (max-width: 767px) {
  .hero-visual {
    display: none;
  }

  .hero-copy,
  .hero-stage--ranking .hero-copy {
    width: 100%;
    padding-top: 12px;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    max-width: 340px;
    margin: 0 auto 8px;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 16px 22px;
    min-height: 52px;
    white-space: normal;
  }
}

/* Alternatywny hero przypisywany pojedynczo w edycji rankingu. */
.hero--gradient-card {
  padding: 22px 0 38px;
}

.template-ranking .hero--gradient-card > .shell,
.ranking-directory__hero > .shell {
  width: calc(100% - 80px);
  max-width: 1600px;
  padding-inline: 0;
}

.ranking-hero-panel {
  position: relative;
  isolation: isolate;
  min-height: 560px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 55%) minmax(0, 45%);
  align-items: center;
  border-radius: 24px;
  background: linear-gradient(108deg, #dcefe6 0%, #ccebdd 26%, #7ed9b8 62%, #13a6da 100%);
  box-shadow: 0 18px 50px rgba(10, 68, 96, 0.11);
}

.ranking-hero-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 9% 18%, rgba(230, 246, 238, 0.58), rgba(216, 240, 228, 0.18) 31%, transparent 59%),
    linear-gradient(90deg, rgba(222, 242, 232, 0.18), transparent 68%);
}

.ranking-hero-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 620px;
  height: 620px;
  right: -270px;
  bottom: -330px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.05), 0 0 0 140px rgba(255, 255, 255, 0.04);
}

.ranking-hero-panel__copy {
  position: relative;
  z-index: 3;
  padding: clamp(44px, 4.4vw, 72px) 32px clamp(36px, 3.5vw, 54px) clamp(44px, 5vw, 82px);
}

.ranking-hero-panel__heading {
  max-width: 8.4em;
  margin: 0 0 22px;
  color: #08152d;
  font-size: clamp(2.75rem, 4.05vw, 4.35rem);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.ranking-hero-panel__subtitle {
  max-width: 610px;
  margin: 0 0 26px;
  color: #243348;
  font-size: clamp(1rem, 1.32vw, 1.2rem);
  line-height: 1.55;
}

.ranking-hero-panel__actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-bottom: 30px;
}

.ranking-hero-panel__actions .btn {
  gap: 14px;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(19, 166, 218, 0.24);
}

.ranking-hero-panel__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 7px;
  border-bottom: 1px solid currentColor;
  color: #13243a;
  font-weight: 600;
}

.ranking-hero-panel__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  color: #405069;
  font-size: 0.82rem;
}

.ranking-hero-panel__meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ranking-hero-panel__meta b {
  color: #109dbe;
  font-size: 1rem;
}

.ranking-hero-panel__meta img {
  display: block;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.ranking-hero-panel__visual {
  position: relative;
  z-index: 2;
  align-self: stretch;
  min-width: 0;
  background: transparent;
}

.ranking-hero-panel__visual img {
  position: absolute;
  z-index: 2;
  right: 50%;
  bottom: -39%;
  display: block;
  width: auto;
  max-width: none;
  height: 155%;
}

.ranking-hero-panel__visual--horizontal img {
  right: -4%;
  bottom: -18%;
  width: clamp(960px, 60vw, 1080px);
  height: auto;
}

.ranking-hero-panel__visual--compact img {
  right: 0;
  bottom: -20%;
  width: clamp(820px, 49vw, 900px);
  height: auto;
}

/* Category cutouts fit entirely inside the existing hero illustration column. */
@media (min-width: 1200px) {
  .ranking-hero-panel__visual--cutout > .ranking-hero-panel__artwork {
    inset: 112px 0 0;
    width: 100%;
    height: calc(100% - 112px);
    max-width: 100%;
    object-fit: contain;
    object-position: center bottom;
    transform: none;
  }

  .ranking-hero-panel__visual--cutout .ranking-hero-float--a {
    top: 24px;
  }

  .ranking-hero-panel__visual--cutout .ranking-hero-float--c {
    top: auto;
    bottom: 24px;
  }
}

@media (min-width: 1200px) and (max-width: 1399px) {
  .ranking-hero-panel__visual--cutout .ranking-hero-float--c {
    right: 12px;
    bottom: 16px;
    width: 200px;
  }
}

@media (max-width: 1050px) {
  .ranking-hero-panel {
    grid-template-columns: minmax(0, 56%) minmax(0, 44%);
  }

  .ranking-hero-panel__copy {
    padding-left: 46px;
  }

  .ranking-hero-panel__visual img {
    right: -8%;
    bottom: -34%;
    height: 142%;
  }

  .ranking-hero-panel__visual--horizontal img {
    right: -36%;
    bottom: -10%;
    width: 880px;
    height: auto;
  }


  .ranking-hero-panel__visual--compact img {
    right: -5%;
    bottom: -22%;
    width: 760px;
    height: auto;
  }
}

@media (max-width: 767px) {
  .hero--gradient-card {
    padding-top: 14px;
  }

  .template-ranking .hero--gradient-card > .shell {
    width: 100%;
    padding-inline: 16px;
  }

  .ranking-hero-panel {
    display: block;
    min-height: 720px;
    border-radius: 18px;
  }

  .ranking-hero-panel__copy {
    padding: 34px 24px 0;
    text-align: left;
  }

  .ranking-hero-panel__heading {
    max-width: 520px;
    font-size: clamp(2.25rem, 11vw, 3.4rem);
  }

  .ranking-hero-panel__subtitle {
    max-width: 540px;
  }

  .ranking-hero-panel__actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 22px;
  }

  .ranking-hero-panel__actions .btn {
    width: auto;
    min-height: 48px;
    padding: 13px 19px;
  }

  .ranking-hero-panel__meta {
    gap: 8px 16px;
    max-width: 460px;
  }

  .ranking-hero-panel__visual {
    position: absolute;
    right: -9%;
    bottom: 0;
    width: 79%;
    height: 43%;
  }

  .ranking-hero-panel__visual img {
    right: 0;
    bottom: -70%;
    height: 188%;
  }

  .ranking-hero-panel__visual--horizontal {
    right: 0;
    width: 100%;
  }

  .ranking-hero-panel--horizontal {
    min-height: 820px;
  }

  .ranking-hero-panel--compact {
    min-height: 800px;
  }

  .ranking-hero-panel__visual--horizontal img {
    right: -10%;
    bottom: -35%;
    width: 700px;
    height: auto;
  }

  .ranking-hero-panel__visual--compact {
    right: 0;
    width: 100%;
  }

  .ranking-hero-panel__visual--compact img {
    right: -5%;
    bottom: -40%;
    width: 540px;
    height: auto;
  }

}

/* ==========================================================================
   5. CATEGORY FILTER GRID
   ========================================================================== */
/*
 * Siatka kategorii: 5 kolumn w kontenerze 1200 px (jak tresc na Moneteo).
 * Kafelek z makiety 284 x 70, odstep 30, zaokraglenie 15 px.
 */
.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 16px;
  }
}

@media (min-width: 1200px) {
  .category-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px 16px;
  }
}

.category-chip {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 56px;
  padding: 14px 16px 14px 52px;
  background: var(--c-bg-soft);
  border-radius: 15px;
  text-align: left;
  text-decoration: none;
}

.category-chip img,
.category-chip svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  object-fit: contain;
  object-position: left center;
}

.category-chip span {
  display: block;
  min-width: 0;
  color: var(--c-text-soft);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: break-word;
}

@media (min-width: 768px) {
  .category-chip {
    min-height: 62px;
    padding: 8px 12px 8px 58px;
  }

  .category-chip img,
  .category-chip svg {
    left: 16px;
    width: 28px;
    height: 28px;
  }

  .category-chip span {
    font-size: 13px;
    color: var(--c-muted-2);
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
  }
}

@media (min-width: 1200px) {
  .category-chip {
    min-height: 62px;
    padding: 8px 12px 8px 50px;
    text-align: left;
  }

  .category-chip img,
  .category-chip svg {
    left: 14px;
    width: 26px;
    height: 26px;
  }

  .category-chip span {
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
  }
}

.category-chip.is-active {
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--c-border-accent);
}

.category-chip:hover {
  box-shadow: inset 0 0 0 2px var(--c-border-accent);
}

.featured-ranking-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.featured-ranking-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 180px;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 15px;
  background: var(--c-bg-soft);
  color: var(--c-muted-2);
  font-size: 0.75rem;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  border: 0;
  cursor: pointer;
}

.featured-ranking-tab img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.featured-ranking-tab.is-active,
.featured-ranking-tab:hover {
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--c-border-accent);
}

.featured-ranking-panel[hidden] {
  display: none;
}

.featured-ranking-empty {
  padding: 28px;
  margin: 0;
  border-radius: var(--radius-xl);
  background: var(--c-bg-soft);
  color: var(--c-muted);
  text-align: center;
}

@media (min-width: 768px) {
  .featured-ranking-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    overflow: visible;
  }

  .featured-ranking-tab {
    min-width: 0;
  }
}

.category-grid-footer {
  display: none;
}

.category-grid-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  background: none;
  border: none;
  color: var(--c-text-soft);
  font-weight: 700;
  font-size: 0.95rem;
}

.category-grid-toggle svg {
  width: 12px;
  height: 12px;
  transition: transform 0.25s ease;
}

.category-grid-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.category-grid-all {
  display: none;
}

@media (max-width: 767px) {
  .category-grid:not(.is-expanded) .category-chip:nth-child(n+5) {
    display: none;
  }

  .category-grid-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
  }

  .category-grid.is-expanded + .category-grid-footer .category-grid-all {
    display: inline-flex;
    margin-top: 8px;
  }
}

/* ==========================================================================
   6. RANKING LIST
   ========================================================================== */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.offer-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "lead main cta"
    "desc desc desc"
    "toggle toggle toggle"
    "details details details";
  column-gap: 24px;
  row-gap: 8px;
  align-items: start;
  background: var(--c-bg-soft);
  border-radius: var(--radius-xl);
  padding: 28px;
  position: relative;
}

.offer-card__flags {
  grid-area: flags;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.offer-card:has(.offer-card__flags) {
  grid-template-areas:
    "flags flags flags"
    "lead main cta"
    "desc desc desc"
    "toggle toggle toggle"
    "details details details";
}

.offer-card--sponsored {
  background: #fff;
  box-shadow: var(--shadow-card);
  border: 1px solid #d7eef8;
}

.offer-card__badge,
.offer-card__tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 8px;
  line-height: 1;
}

.offer-card__badge {
  background: var(--c-primary);
  color: #fff;
}

.offer-card__tag {
  background: var(--c-secondary);
  color: #fff;
}

.offer-card__cta-note {
  color: var(--c-muted-2);
  font-size: 0.8rem;
  margin: 8px 0 0;
}

.offer-card__lead {
  grid-area: lead;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.offer-card__rank {
  grid-area: rank;
  flex: 0 0 30px;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--c-muted-2);
  padding-top: 6px;
  line-height: 1;
  text-align: right;
}

.offer-card__rank::after {
  content: ".";
}

.offer-card__brand {
  grid-area: brand;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  min-width: 0;
}

@media (min-width: 768px) {
  .offer-card__brand {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 8px;
  }
}

.offer-card__logo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
}

.offer-card__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 128px;
  height: 44px;
  min-height: 44px;
  overflow: hidden;
}

.offer-card__rating {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.offer-card__stars {
  display: inline-flex;
  gap: 3px;
}

.offer-card__stars svg {
  width: 16px;
  height: 16px;
  fill: #ffb43a;
}

.offer-card__stars svg.is-empty {
  fill: #e3e3e6;
}

.offer-card__bank-name {
  flex-basis: 100%;
  margin: 0;
  color: var(--c-muted-2);
  font-size: 0.95rem;
  font-weight: 300;
}

.offer-card__main {
  grid-area: main;
  min-width: 0;
}

.offer-card__cta {
  grid-area: cta;
  text-align: center;
}

.offer-card__cta .btn {
  padding: 20px 28px;
  width: 100%;
  white-space: nowrap;
}

/* Stałe kolumny wyrównują bank, parametry i CTA pomiędzy wszystkimi kartami. */
@media (min-width: 1100px) {
  .offer-card--api {
    grid-template-columns: 180px minmax(0, 1fr) 174px;
  }

  .offer-card--api .offer-card__lead {
    width: 180px;
  }

  .offer-card--api .offer-card__brand {
    width: 138px;
  }

  .offer-card--api .offer-card__cta {
    width: 174px;
  }
}

.offer-card__users {
  color: var(--c-muted-2);
  font-size: 0.85rem;
  margin: 10px 0 0;
}

.offer-card__title {
  font-size: clamp(1.05rem, 1.56cqi, 1.25rem);
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.offer-card__desc {
  grid-area: desc;
  font-weight: 300;
  font-size: 1.05rem;
  margin: 4px 0 8px;
  color: var(--c-text-soft);
}

.offer-card__ai-summary {
  grid-area: desc;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 6px 0 5px;
  padding: 10px 13px;
  border: 1px solid #d8e9f8;
  border-radius: 7px;
  background: #eef7ff;
  color: #075fd1;
  font-size: 0.91rem;
  font-weight: 600;
  line-height: 1.4;
}

.offer-card__ai-summary--condition {
  border-color: #d8e2e9;
  background: #f6f9fb;
  color: #243746;
  font-weight: 400;
}

.offer-card__ai-summary--promo {
  border-color: #ffe399;
  background: #fff2c7;
  color: #253243;
}

.offer-card__ai-summary-icon {
  display: inline-flex;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.offer-card__ai-summary-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.offer-card__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
}

/* API zwraca do pięciu parametrów głównych — na desktopie tworzą jeden rząd. */
.offer-card--api .offer-card__stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(10px, 1.25vw, 20px);
}

.offer-card--api .offer-card__stat-label {
  font-size: 0.72rem;
  white-space: nowrap;
}

.offer-card--api .offer-card__stat-value {
  font-size: clamp(0.92rem, 1.15vw, 1.1rem);
}

.offer-card__stat {
  min-width: 0;
}

.offer-card__stat-label {
  display: block;
  color: var(--c-muted-2);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.offer-card__stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
}

.offer-card__toggle {
  grid-area: toggle;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  color: var(--c-muted-2);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 0 0;
}

.offer-card__toggle svg {
  width: 12px;
  height: 12px;
  transition: transform 0.25s ease;
}

.offer-card__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.offer-card__details {
  grid-area: details;
  display: none;
  border-top: 1px solid #e2e2e6;
  margin: 10px -28px -28px;
  padding: 0 28px 28px;
}

.offer-card__details.is-open {
  display: block;
}

.offer-card__details table {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  border-collapse: collapse;
}

.offer-card__detail-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  width: calc(100% + 56px);
  margin: 0 -28px;
  overflow: hidden;
  border-bottom: 1px solid #dfe3e8;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.offer-card__detail-tabs::-webkit-scrollbar {
  display: none;
}

.offer-card__detail-tab {
  position: relative;
  min-width: 0;
  min-height: 54px;
  padding: 12px 16px;
  border: 0;
  border-right: 1px solid #dfe3e8;
  background: transparent;
  color: var(--c-text);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.offer-card__detail-tab:last-child {
  border-right: 0;
}

.offer-card__detail-tab::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}

.offer-card__detail-tab:hover,
.offer-card__detail-tab:focus-visible,
.offer-card__detail-tab.is-active {
  color: var(--c-primary);
}

.offer-card__detail-tab:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: -3px;
}

.offer-card__detail-tab.is-active::after {
  background: var(--c-gradient);
}

.offer-card__detail-panel {
  padding-top: 12px;
}

.offer-card__detail-panel[hidden] {
  display: none;
}

.offer-card__brand--text {
	justify-content: center;
	min-height: 64px;
	text-align: center;
}

.offer-card__brand--text .offer-card__bank-name {
	font-size: 16px;
	font-weight: 700;
}

.offer-card__cta .btn.is-disabled {
	cursor: not-allowed;
	opacity: .55;
}

.offer-card__details-section th {
	background: #f5f7fb;
	color: #223048;
	font-size: 13px;
	padding: 10px 12px;
	text-align: left;
}

.offer-card__pros,
.offer-card__cons {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 20px 4px;
}

.offer-card__pros ul,
.offer-card__cons ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 14px;
  padding: 0;
  list-style: none;
}

.offer-card__pros li,
.offer-card__cons li {
  position: relative;
  min-height: 22px;
  padding-left: 30px;
  line-height: 1.45;
}

.offer-card__pros li::before,
.offer-card__cons li::before {
  position: absolute;
  top: 1px;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.offer-card__pros li::before {
  content: "+";
  background: var(--c-gradient);
}

.offer-card__cons li::before {
  content: "−";
  background: #7b8794;
}

.offer-card__details td {
  padding: 12px 0;
  font-size: 1.05rem;
  vertical-align: top;
}

.offer-card__details td:first-child {
  width: 45%;
  font-weight: 500;
  color: var(--c-text-soft);
}

.offer-card__details tr:not(:last-child) td {
  border-bottom: 1px solid #ececef;
}

@media (max-width: 991px) {
  .offer-card__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .offer-card--api .offer-card__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .offer-card--api .offer-card__stat-label {
    white-space: normal;
  }
}

@media (max-width: 767px) {
  .offer-card {
    grid-template-columns: minmax(112px, auto) minmax(0, 1fr);
    grid-template-areas:
      "lead main"
      "stats stats"
      "desc desc"
      "cta cta"
      "toggle toggle"
      "details details";
    column-gap: 16px;
    row-gap: 8px;
    background: var(--c-bg-soft);
    border: 0;
    border-radius: var(--radius-xl);
    padding: 22px;
  }

  .offer-card:has(.offer-card__flags) {
    grid-template-areas:
      "flags flags"
      "lead main"
      "stats stats"
      "desc desc"
      "cta cta"
      "toggle toggle"
      "details details";
  }

  .offer-card__lead {
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }

  .offer-card__main {
    display: contents;
  }

  .offer-card__flags {
    margin-bottom: 4px;
  }

  .offer-card__brand {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
  }

  .offer-card__logo {
    width: 92px;
    height: 34px;
    min-height: 34px;
  }

  .offer-card__logo img {
    width: 100%;
    height: 100%;
    max-width: none;
  }

  .offer-card__stars svg {
    width: 14px;
    height: 14px;
  }

  .offer-card__bank-name {
    font-size: 0.82rem;
  }

  .offer-card__rank {
    flex-basis: 24px;
    width: 24px;
    padding-top: 5px;
    background: transparent;
    color: var(--c-muted-2);
    border-radius: 0;
    font-size: 1rem;
    text-align: right;
  }

  .offer-card__title {
    font-size: 1rem;
    margin: 0 0 8px;
    padding-top: 1px;
  }

  .offer-card__desc {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 4px 0 8px;
  }

  .offer-card__ai-summary {
    font-size: 0.84rem;
    padding: 9px 11px;
  }

  .offer-card__stats {
    grid-area: stats;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 4px 0 0;
    overflow: visible;
    border-top: 1px solid #e4e4e8;
  }

  .offer-card--api .offer-card__stats {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-bottom: 0;
  }

  .offer-card__stat {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 10px 0;
    border-bottom: 1px solid #e4e4e8;
  }

  .offer-card__stat-label {
    flex: 0 0 42%;
    margin: 1px 0 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--c-muted-2);
    white-space: normal;
  }

  .offer-card__stat-value {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.92rem;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .offer-card__detail-tab {
    min-width: 0;
    min-height: 48px;
    padding: 10px 12px;
    font-size: 0.78rem;
  }

  .offer-card__details {
    margin: 8px -22px -22px;
    padding: 0 22px 22px;
  }

  .offer-card__detail-tabs {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: calc(100% + 44px);
    margin: 0 -22px;
  }

  .offer-card__detail-tab {
    border-bottom: 1px solid #dfe3e8;
  }

  .offer-card__detail-tab:nth-child(2n) {
    border-right: 0;
  }

  .offer-card__detail-tab:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    border-right: 0;
  }

  .offer-card__pros,
  .offer-card__cons {
    padding-right: 0;
    padding-left: 0;
  }

  .offer-card__cta {
    margin-top: 8px;
    text-align: center;
  }

  .offer-card__cta .btn {
    width: auto;
    min-width: 180px;
    padding: 15px 24px;
    font-size: 0.95rem;
  }

  .offer-card__users {
    margin-top: 8px;
    font-size: 0.8rem;
  }

  .offer-card__toggle {
    padding-top: 8px;
    font-size: 0.875rem;
  }

  .offer-card__details td {
    font-size: 0.875rem;
    padding: 10px 0;
  }

  .offer-card__details td:first-child {
    width: 42%;
  }
}

.ranking-list-footer {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

.ranking-intro {
  margin-bottom: 48px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--c-text);
}

.ranking-intro p {
  margin: 0 0 1em;
}

.ranking-intro p:last-child {
  margin-bottom: 0;
}

.ranking-title {
  margin-bottom: 28px;
}

.ranking-title__date {
  font-weight: 700;
  color: var(--c-text);
}

.ranking-expand-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.ranking-expand-footer .ranking-more:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}

.ranking-more {
  min-width: 220px;
  border-radius: 8px;
  padding: 16px 24px;
}

.ranking-more svg {
  width: 16px;
  height: 16px;
}

.ranking-load-status {
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: var(--c-text);
}

/* ==========================================================================
   7. NEWS GRID
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

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

.news-card {
  overflow: visible;
  border-radius: 0;
}

.news-card__media {
  display: block;
  position: relative;
  aspect-ratio: 493 / 251;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card__tag,
.post-category-tag {
  position: absolute;
  z-index: 1;
  left: 14px;
  top: 14px;
  display: inline-block;
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--c-gradient-soft);
  color: #fff;
  font-weight: 700;
  font-size: .75rem;
  line-height: 1.2;
  padding: 7px 12px;
  border-radius: 999px;
}

.news-card__body {
  padding: 20px 16px 24px;
}

.news-card__meta {
  display: flex;
  justify-content: space-between;
  color: var(--c-muted);
  font-size: 0.85rem;
  font-weight: 300;
  margin-bottom: 14px;
}

.news-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.3;
}

.news-card__title a {
  color: inherit;
}

.news-card__excerpt {
  font-weight: 200;
  color: var(--c-text-soft);
  font-size: 1rem;
  margin: 0 0 16px;
}

.news-grid-footer {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

/* ==========================================================================
   8. FAQ ACCORDION
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 1px solid #e2e2e6;
}

.faq-item:last-child {
  border-bottom: 2px solid var(--c-text);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  text-align: left;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--c-text-soft);
}

.faq-question svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.faq-question[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 0 18px;
  font-weight: 300;
  font-size: 0.9375rem;
  color: var(--c-text-soft);
}

.faq-answer.is-open {
  display: block;
}

/* ==========================================================================
   9. GUIDE / ARTICLE CONTENT
   ========================================================================== */
.guide-content {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--c-text-soft);
}

.guide-content h2,
.guide-content h3 {
  font-weight: 700;
  color: var(--c-text);
  margin: 1.6em 0 0.6em;
}

.guide-content p {
  margin: 0 0 1.1em;
}

.guide-content a {
  text-decoration: underline;
}

.guide-content ul,
.guide-content ol {
  margin: 0 0 1.1em;
  padding-left: 30px;
}

.guide-content li {
  margin-bottom: 6px;
}

.guide-content ul {
  list-style: disc;
}

.guide-content ol {
  list-style: decimal;
}

.ranking-editorial {
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid #e1e8ed;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7fcfc 0%, #fff 55%);
  overflow-wrap: anywhere;
}

.ranking-editorial > :first-child {
  margin-top: 0;
}

.ranking-editorial > :last-child {
  margin-bottom: 0;
}

.ranking-editorial h3 {
  font-size: clamp(1rem, .95rem + .2vw, 1.125rem);
  line-height: 1.4;
}

.ranking-editorial a {
  color: var(--c-text);
  text-underline-offset: 3px;
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.site-footer {
  padding: 36px 0 24px;
}

.footer-panel {
  background: var(--c-bg-soft);
  border-radius: var(--radius-xl);
  padding: 42px 36px 26px;
}

.footer-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

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

@media (min-width: 1100px) {
  .footer-columns {
    grid-template-columns: repeat(5, 1fr);
  }
}

.footer-column h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 20px;
}

.footer-column ul li {
  margin-bottom: 16px;
}

.footer-column ul a {
  color: var(--c-text-soft);
  font-size: 0.95rem;
}

.footer-column ul a:hover {
  color: var(--c-primary);
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid #e2e2e6;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--c-muted-2);
  font-size: 0.9rem;
}

/* ==========================================================================
   11. GENERIC PAGE / SINGLE / BLOG
   ========================================================================== */
.page-hero {
  padding: 52px 0 28px;
}

.page-hero h1 {
  font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem);
  font-weight: 700;
  margin: 0;
}

/* ==========================================================================
   10. WPIS BLOGOWY
   ========================================================================== */
.article {
  padding: 36px 0 0;
}

.article-hero {
  position: relative;
  margin: 0 0 22px;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.article-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.article-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
}

.article-meta {
  color: var(--c-muted);
  font-size: 0.95rem;
  font-weight: 400;
}

.article-share {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--c-muted);
}

.article-share svg {
  width: 22px;
  height: 22px;
}

.article-share__copied {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--c-text);
  color: #fff;
  font-size: 0.75rem;
  white-space: nowrap;
}

.article-share.is-copied .article-share__copied {
  display: block;
}

.article-title {
  font-size: clamp(1.7rem, 1.15rem + 1.7vw, 2.55rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 24px;
  color: var(--c-text);
}

.note-box {
  margin: 0 0 28px;
  padding: 18px 20px;
  background: #f4fbfe;
  border: 1px solid var(--c-primary);
  border-radius: 10px;
}

.section .note-box {
  margin: 0;
}

.article-main > .note-box {
  margin: 28px 0 0;
}

.note-box p {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--c-text);
}

.note-box__label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.article-takeaways {
  margin: 0 0 36px;
}

.article-takeaways__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--c-text);
}

.article-takeaways ul {
  list-style: disc;
  padding-left: 1.25em;
  margin: 0;
}

.article-takeaways li {
  margin-bottom: 6px;
  font-weight: 300;
  color: var(--c-text-soft);
  line-height: 1.55;
}

.article .guide-content {
  padding-bottom: 8px;
}

.article .guide-content h2 {
  font-size: 1.45rem;
  scroll-margin-top: 24px;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

@media (min-width: 1024px) {
  .article-layout--toc {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 40px;
  }
}

.article-toc {
  background: var(--c-bg-soft);
  border-radius: var(--radius-md);
  padding: 18px 18px 16px;
}

@media (min-width: 1024px) {
  .article-toc {
    position: sticky;
    top: 24px;
  }
}

.article-toc__title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
}

.article-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-toc li + li {
  margin-top: 2px;
}

.article-toc a {
  display: block;
  padding: 7px 10px;
  border-left: 2px solid transparent;
  color: var(--c-muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
}

.article-toc a:hover,
.article-toc a.is-active {
  color: var(--c-text);
  border-left-color: var(--c-primary);
}

.entry-content {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
}

.entry-content h2,
.entry-content h3 {
  font-weight: 700;
}

.entry-content img {
  border-radius: var(--radius-lg);
}

.blog-index {
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr;
  padding: 60px 0;
}

@media (min-width: 768px) {
  .blog-index {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .blog-index {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 20px 0 60px;
}

/* ========================================================================== 
   12. BANKI
   ========================================================================== */
.bank-hero {
  padding: 58px 0 42px;
}

.bank-hero__inner {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(36px, 6vw, 88px);
  padding: clamp(32px, 5vw, 68px);
  border-radius: var(--radius-xl);
  background: var(--c-bg-soft);
}

.bank-hero__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 34px;
  border-radius: var(--radius-lg);
  background: #fff;
}

.bank-hero__logo:empty::before,
.bank-card__logo:empty::before {
  content: "BANK";
  color: var(--c-muted-2);
  font-weight: 700;
  letter-spacing: .12em;
}

.bank-hero__logo img {
  display: block;
  max-width: 100%;
  max-height: 112px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.bank-hero__eyebrow,
.bank-ranking-card__type {
  margin: 0 0 8px;
  color: var(--c-primary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bank-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.05;
}

.bank-hero__excerpt {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--c-text-soft);
  font-size: 1.08rem;
  line-height: 1.65;
}

.bank-content {
  max-width: 940px;
}

.bank-content h2 {
  margin-top: 0;
}

.bank-related-section + .bank-related-section {
  padding-top: 10px;
}

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

.bank-ranking-card,
.bank-card {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 28px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--c-text);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.bank-ranking-card:hover,
.bank-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-primary);
  box-shadow: var(--shadow-card);
}

.bank-ranking-card strong {
  margin-bottom: 28px;
  font-size: 1.22rem;
  line-height: 1.35;
}

.bank-ranking-card > span:last-child {
  margin-top: auto;
  color: var(--c-primary);
  font-weight: 700;
}

.bank-archive .page-hero p {
  max-width: 700px;
  margin: 12px 0 0;
  color: var(--c-text-soft);
}

.bank-card {
  align-items: flex-start;
  min-height: 260px;
}

.bank-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 72px;
  margin-bottom: 24px;
  overflow: hidden;
}

.bank-card__logo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.bank-card h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.bank-card h2 a {
  color: inherit;
}

.bank-card p {
  margin: 0 0 22px;
  color: var(--c-text-soft);
  line-height: 1.55;
}

.bank-card .text-link {
  margin-top: auto;
}

@media (max-width: 900px) {
  .bank-hero__inner {
    grid-template-columns: 1fr;
  }

  .bank-hero__logo {
    min-height: 130px;
  }

  .bank-ranking-grid,
  .bank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .bank-hero {
    padding: 28px 0;
  }

  .bank-hero__inner {
    gap: 24px;
    padding: 24px;
  }

  .bank-ranking-grid,
  .bank-grid {
    grid-template-columns: 1fr;
  }
}

.pagination a,
.pagination span {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--c-bg-soft);
  font-weight: 600;
}

.pagination .current {
  background: var(--c-gradient);
  color: #fff;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
  margin-bottom: 16px;
}

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

.search-form input[type="search"] {
  flex: 1;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
}

.widget {
  margin-bottom: 40px;
}

.widget_search .search-form {
  margin: 0;
}

/* WP core alignment helpers */
.alignwide {
  max-width: 100%;
}
.aligncenter {
  margin-left: auto;
  margin-right: auto;
}
.wp-caption-text {
  color: var(--c-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   13. RANKING PAGE — COMPACT COMPARISON LAYOUT
   ========================================================================== */
.ranking-list {
  gap: 14px;
}

.offer-card {
  background: #fff;
  border: 1px solid #e2e9ed;
  border-radius: 16px;
  box-shadow: 0 8px 24px -24px rgba(16, 42, 62, 0.55);
}

.offer-card:first-child {
  border-color: #83dcc1;
  box-shadow: 0 10px 28px -24px rgba(19, 166, 218, 0.65);
}

.offer-card__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 10px;
  background: #d9f5eb;
  color: #17364d;
  font-size: 1.35rem;
  line-height: 1;
  text-align: center;
}

.offer-card:nth-child(even) .offer-card__rank {
  background: #e2f3fa;
}

.offer-card__rank::after {
  content: none;
}

.offer-card__cta .btn {
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 9px;
  box-shadow: 0 10px 22px -16px rgba(19, 166, 218, 0.75);
}

.offer-card__toggle {
  color: #4e7c94;
  font-size: 0.8rem;
}

@media (min-width: 1100px) {
  .offer-card {
    grid-template-columns: 205px minmax(0, 1fr) 170px;
    grid-template-areas:
      "lead title cta"
      "stats stats stats"
      "desc desc desc"
      "toggle toggle toggle"
      "details details details";
    column-gap: 22px;
    row-gap: 8px;
    min-height: 228px;
    padding: 22px 24px 18px;
    align-items: start;
  }

  .offer-card:has(.offer-card__flags) {
    grid-template-areas:
      "flags flags flags"
      "lead title cta"
      "stats stats stats"
      "desc desc desc"
      "toggle toggle toggle"
      "details details details";
  }

  .offer-card--api .offer-card__lead {
    width: 205px;
    align-items: center;
    gap: 14px;
  }

  .offer-card__lead {
    align-self: center;
    align-items: center;
  }

  .offer-card--api .offer-card__brand {
    width: 145px;
    gap: 5px;
  }

  .offer-card__logo {
    width: 136px;
    height: 46px;
    min-height: 46px;
  }

  .offer-card__main {
    display: contents;
  }

  .offer-card__title {
    grid-area: title;
    display: flex;
    align-items: center;
    align-self: center;
    width: 100%;
    min-height: 46px;
    margin: 0;
    font-size: clamp(1.08rem, 1.35vw, 1.28rem);
    line-height: 1.35;
  }

  .offer-card__stats,
  .offer-card--api .offer-card__stats {
    grid-area: stats;
    width: 100%;
    margin-top: 10px;
    padding: 18px 12px 4px;
    border-top: 1px solid #e8edf0;
    gap: clamp(28px, 4vw, 72px);
  }

  .offer-card__stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .offer-card--api .offer-card__stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .offer-card--api .offer-card__stat-label {
    font-size: 0.68rem;
  }

  .offer-card--api .offer-card__stat-value {
    font-size: 1rem;
    line-height: 1.35;
  }

  .offer-card--api .offer-card__cta {
    width: 170px;
    align-self: start;
  }

  .offer-card__cta-note {
    margin-top: 6px;
    font-size: 0.72rem;
  }

  .offer-card__toggle {
    grid-column: 1 / -1;
    justify-self: center;
    width: auto;
    min-width: 190px;
    padding: 9px 18px 0;
  }

  .offer-card__desc {
    width: 100%;
    margin: 4px 0 0;
    color: #4f6575;
    font-size: .92rem;
    line-height: 1.55;
  }

  .offer-card__details {
    margin: 12px -22px -20px;
    padding: 0 22px 22px;
  }
}

.ranking-faq-section,
.ranking-news-section {
  padding-top: 34px;
  padding-bottom: 34px;
}

.ranking-section-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
  color: #10233b;
  font-size: var(--heading-section-size);
  line-height: 1.2;
}

.ranking-section-heading__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: #dff5fa;
  color: #14a7d7;
}

.ranking-section-heading__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ranking-section-heading__icon img {
  display: block;
  width: 24px;
  height: 24px;
}

@media (min-width: 1200px) {
  .template-ranking .ranking-good-to-know-section > .shell,
  .template-ranking .ranking-faq-section > .shell,
  .template-ranking .ranking-news-section > .shell,
  .template-ranking .ranking-guide-section > .shell,
  .template-ranking .ranking-editorial-section > .shell,
  .ranking-directory__content > .shell,
  .home .site-main > .section > .shell {
    max-width: 1320px;
  }
}

.template-ranking .faq-list {
  gap: 8px;
}

.template-ranking .faq-item,
.template-ranking .faq-item:last-child {
  overflow: hidden;
  border: 1px solid #e1e8ed;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px -20px rgba(21, 49, 68, 0.7);
}

.template-ranking .faq-question {
  padding: 16px 18px;
  color: #172b42;
  font-size: 0.96rem;
  font-weight: 650;
}

.template-ranking .faq-question:hover,
.template-ranking .faq-question:focus-visible {
  background: #f8fcfd;
}

.template-ranking .faq-question svg {
  width: 14px;
  height: 14px;
  color: #55748a;
}

.template-ranking .faq-answer {
  padding: 0 18px 16px;
  color: #4a6071;
  line-height: 1.6;
}

.template-ranking .news-grid {
  gap: 22px;
}

.template-ranking .news-card {
  overflow: hidden;
  border: 1px solid #e0e7eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px -28px rgba(15, 41, 62, 0.8);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.template-ranking .news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -26px rgba(15, 41, 62, 0.58);
}

.template-ranking .news-card__media {
  aspect-ratio: 16 / 8.5;
  border-radius: 0;
}

.template-ranking .news-card__body {
  padding: 15px 17px 18px;
}

.template-ranking .news-card__meta {
  margin-bottom: 9px;
  font-size: 0.72rem;
}

.template-ranking .news-card__title {
  margin-bottom: 9px;
  color: #15283d;
  font-size: 1.05rem;
  line-height: 1.35;
}

.template-ranking .news-card__excerpt {
  margin-bottom: 13px;
  color: #596d7c;
  font-size: 0.88rem;
  line-height: 1.55;
}

.template-ranking .news-card .arrow-link {
  color: var(--c-primary);
  font-size: 0.85rem;
}

@media (max-width: 767px) {
  .offer-card {
    border: 1px solid #e2e9ed;
    background: #fff;
    border-radius: 16px;
  }

  .offer-card__rank {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    font-size: 1.18rem;
  }

  .ranking-faq-section,
  .ranking-news-section {
    padding-top: 26px;
    padding-bottom: 26px;
  }

  .ranking-section-heading {
    gap: 10px;
  }

  .ranking-section-heading__icon {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .template-ranking .faq-question {
    padding: 15px;
    font-size: 0.9rem;
  }

  .template-ranking .faq-answer {
    padding: 0 15px 15px;
  }
}

/* ==========================================================================
   14. SHARED WIDE FRAME, HERO FLOATS & DARK FOOTER
   ========================================================================== */
@media (min-width: 768px) {
  .site-header .shell--wide,
  .site-footer .shell--wide {
    width: calc(100% - 80px);
    max-width: 1600px;
    padding-inline: 0;
  }
}

.ranking-hero-float {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 224px;
  min-height: 68px;
  padding: 12px 17px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 36px -20px rgba(4, 57, 83, 0.48);
  color: #10283e;
  font-size: 0.9rem;
  line-height: 1.3;
  backdrop-filter: blur(10px);
}

.ranking-hero-float__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
}

.ranking-hero-float__icon img {
  position: static;
  width: 34px;
  height: 34px;
  max-width: 34px;
  object-fit: contain;
}

.ranking-hero-float__text {
  display: block;
  min-width: 0;
  color: #10283e;
  font-family: var(--font-sans);
  font-weight: 700;
}

.ranking-hero-float--a {
  top: 15%;
  right: 3%;
}

.ranking-hero-float--b {
  top: 44%;
  right: auto;
  left: -7%;
}

.ranking-hero-float--c {
  top: 68%;
  right: 4%;
}

.site-footer {
  padding: 38px 0 24px;
}

.site-footer .footer-panel {
  padding: 50px 48px 26px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 0%, rgba(19, 166, 218, 0.18), transparent 34%),
    linear-gradient(118deg, #061c35 0%, #082743 58%, #0b3150 100%);
  box-shadow: 0 18px 44px -30px rgba(3, 23, 44, 0.8);
}

.site-footer .footer-columns {
  grid-template-columns: minmax(210px, 1.35fr) repeat(5, minmax(130px, 1fr));
  gap: clamp(24px, 2.4vw, 42px);
  align-items: start;
}

.footer-brand__logo {
  display: inline-flex;
  width: 205px;
  margin-bottom: 18px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.footer-brand__logo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 42px;
  object-fit: contain;
}

.footer-brand p {
  max-width: 245px;
  margin: 0;
  color: #b8cad8;
  font-size: 0.88rem;
  line-height: 1.65;
}

.site-footer .footer-column h4,
.site-footer .footer-column h4.text-gradient {
  margin-bottom: 17px;
  background: none;
  color: #7ed9b8;
  -webkit-text-fill-color: currentColor;
  font-size: 0.78rem;
  letter-spacing: 0.055em;
}

.site-footer .footer-column ul li {
  margin-bottom: 10px;
}

.site-footer .footer-column ul a {
  color: #dbe7ef;
  font-size: 0.82rem;
  line-height: 1.4;
}

.site-footer .footer-column ul a:hover {
  color: #7ed9b8;
}

.site-footer .footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top-color: rgba(212, 231, 243, 0.14);
  color: #8fa7b8;
  font-size: 0.78rem;
}

@media (max-width: 1199px) {
  .ranking-hero-float {
    width: 170px;
    min-height: 56px;
    padding: 9px 11px;
    border-radius: 15px;
    font-size: 0.74rem;
  }

  .ranking-hero-float__icon {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }

  .ranking-hero-float__icon img {
    width: 18px;
    height: 18px;
  }

  .site-footer .footer-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-brand p {
    max-width: 460px;
  }
}

@media (max-width: 767px) {
  .site-header .shell--wide,
  .site-footer .shell--wide {
    width: 100%;
    padding-inline: 16px;
  }

  .ranking-hero-float {
    display: none;
  }

  .site-footer {
    padding-top: 26px;
  }

  .site-footer .footer-panel {
    padding: 34px 24px 22px;
    border-radius: 20px;
  }

  .site-footer .footer-columns {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-brand__logo {
    width: 188px;
  }

  .site-footer .footer-bottom {
    flex-direction: column;
  }
}

/* Full-width footer frame across the whole site. */
.site-footer {
  padding: 0;
}

.site-footer .shell--wide {
  width: 100%;
  max-width: none;
  padding-inline: 0;
}

.site-footer .footer-panel {
  border-radius: 0;
  box-shadow: none;
  padding-right: max(32px, calc((100vw - 1500px) / 2));
  padding-left: max(32px, calc((100vw - 1500px) / 2));
}

@media (max-width: 767px) {
  .site-footer {
    padding-top: 0;
  }

  .site-footer .shell--wide {
    padding-inline: 0;
  }

.site-footer .footer-panel {
    border-radius: 0;
    padding-right: 24px;
    padding-left: 24px;
  }
}

/* ========================================================================== 
   18. WSZYSTKIE ARTYKUŁY
   ========================================================================== */
body.page-template-page-articles {
  background: #eef9f7;
}

.page-template-page-articles .site-header {
  background: #eef9f7;
}

.articles-archive {
  background:
    radial-gradient(circle at 92% 6%, rgba(72, 206, 194, 0.16), transparent 28rem),
    linear-gradient(180deg, #eef9f7 0%, #f7fbfc 58%, #ffffff 100%);
}

.articles-hero {
  padding: 22px 0 clamp(46px, 6vw, 76px);
}

.articles-hero > .shell {
  width: calc(100% - 80px);
  max-width: 1600px;
  padding-inline: 0;
}

.articles-hero-panel {
  min-height: 560px;
}

.articles-eyebrow {
  margin: 0 0 15px;
  color: #078e91;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.115em;
  text-transform: uppercase;
}

.articles-hero .articles-eyebrow {
  color: #078e91;
}

.articles-hero .ranking-hero-panel__heading {
  max-width: 8.5em;
}

.articles-hero-panel__visual > .articles-hero-panel__image {
  right: 28%;
  bottom: -2%;
  width: clamp(500px, 35vw, 560px);
  height: auto;
  max-width: none;
  object-fit: contain;
}

.articles-hero-float {
  right: 1.5%;
  left: auto;
  width: 198px;
  min-height: 62px;
  padding: 10px 14px;
  border-radius: 16px;
}

.articles-hero-float--a {
  top: 20%;
  right: auto;
  left: -7%;
}

.articles-hero-float--c {
  top: 54%;
  right: 1.5%;
  left: auto;
  bottom: auto;
}

.articles-hero-float .ranking-hero-float__icon img {
  width: 30px;
  height: 30px;
}

.articles-listing {
  padding-top: 0;
}

.articles-filters {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 0 0 clamp(52px, 7vw, 82px);
  padding: 4px 2px 12px;
  scrollbar-width: thin;
}

.articles-filter {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid #d8e5ea;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: #314a5e;
  font-size: 0.84rem;
  font-weight: 650;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.articles-filter:hover {
  transform: translateY(-1px);
  border-color: #3cc4bb;
  color: #078e91;
}

.articles-filter span {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  padding-inline: 6px;
  border-radius: 7px;
  background: #edf7f7;
  font-size: 0.72rem;
}

.articles-filter.is-active {
  border-color: transparent;
  background: linear-gradient(110deg, #083958, #0caeb0);
  color: #fff;
  box-shadow: 0 12px 28px -20px rgba(6, 87, 108, 0.8);
}

.articles-listing__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.articles-listing__heading h2 {
  margin: 0;
  color: #102c46;
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  letter-spacing: -0.04em;
}

.articles-listing__result {
  margin: 0 0 5px;
  color: #607586;
  font-size: 0.9rem;
}

.articles-grid.blog-index {
  gap: clamp(20px, 2.2vw, 30px);
  padding: 0;
}

.articles-grid .news-card {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #dce7eb;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 18px 38px -34px rgba(9, 43, 67, 0.8);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.articles-grid .news-card:hover {
  transform: translateY(-4px);
  border-color: rgba(30, 188, 181, 0.52);
  box-shadow: 0 24px 48px -34px rgba(5, 63, 87, 0.75);
}

.articles-grid .news-card__media {
  aspect-ratio: 16 / 9;
  border-radius: 0;
}

.articles-grid .news-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 19px 21px;
}

.articles-grid .news-card__meta {
  margin-bottom: 11px;
  font-size: 0.72rem;
}

.articles-grid .news-card__title {
  color: #10283e;
  font-size: 1.08rem;
  line-height: 1.38;
}

.articles-grid .news-card__excerpt {
  color: #566c7d;
  font-size: 0.88rem;
  line-height: 1.6;
}

.articles-grid .arrow-link {
  margin-top: auto;
  color: #079da0;
  font-size: 0.84rem;
}

.articles-listing .pagination {
  flex-wrap: wrap;
  padding-bottom: clamp(60px, 8vw, 100px);
  padding-top: 48px;
}

.articles-listing .pagination a,
.articles-listing .pagination span {
  min-width: 42px;
  border: 1px solid #dce8ec;
  border-radius: 9px;
  background: #fff;
  text-align: center;
}

.articles-listing .pagination .current {
  border-color: transparent;
  background: linear-gradient(110deg, #083958, #0caeb0);
}

.articles-empty {
  margin-bottom: 90px;
  padding: 64px 30px;
  border: 1px solid #dce8ec;
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

@media (max-width: 767px) {
  .articles-hero {
    padding-top: 14px;
  }

  .articles-hero > .shell {
    width: 100%;
    padding-inline: 16px;
  }

  .articles-hero-panel {
    min-height: 790px;
  }

  .articles-hero-panel__visual {
    right: -4%;
    width: 100%;
    height: 43%;
  }

  .articles-hero-panel__visual > .articles-hero-panel__image {
    right: -5%;
    bottom: -3%;
    width: min(540px, 126vw);
    height: auto;
  }

  .articles-listing__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .articles-listing__result {
    margin: 0;
  }
}

/* ========================================================================== 
   19. KATALOG RANKINGÓW
   ========================================================================== */
.ranking-directory {
  background: var(--c-white);
}

.post-type-archive-ranking .site-header {
  background: transparent;
}

.ranking-directory__hero {
  padding: 22px 0 clamp(46px, 6vw, 76px);
}

.ranking-directory__hero-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 6vw, 76px);
  border: 1px solid rgba(19, 166, 218, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 82% 20%, rgba(119, 226, 205, 0.48), transparent 31%),
    linear-gradient(108deg, #dcefe6 0%, #ccebdd 38%, #48c8c1 100%);
  box-shadow: 0 18px 50px rgba(10, 68, 96, 0.11);
}

.ranking-directory__hero-panel::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -250px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.05), 0 0 0 140px rgba(255, 255, 255, 0.04);
}

.ranking-directory__hero h1 {
  max-width: 820px;
  margin: 0 0 20px;
  color: #08152d;
  font-size: clamp(2.7rem, 5.3vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.ranking-directory__hero-panel > p:not(.articles-eyebrow) {
  max-width: 650px;
  margin: 0;
  color: #2a4052;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.6;
}

.ranking-directory__summary {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 30px;
  color: #23445a;
}

.ranking-directory__summary strong {
  color: #078e91;
  font-size: 2.4rem;
  line-height: 1;
}

.ranking-directory__summary span {
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ranking-directory__content {
  padding-top: 0;
}

.ranking-directory__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding-bottom: clamp(64px, 8vw, 110px);
}

.ranking-directory-card {
  min-width: 0;
}

.ranking-directory-card > a {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 250px;
  height: 100%;
  flex-direction: column;
  padding: 28px;
  border: 1px solid #dce8ec;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 38px -34px rgba(9, 43, 67, 0.8);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ranking-directory-card > a:hover {
  transform: translateY(-4px);
  border-color: rgba(30, 188, 181, 0.56);
  box-shadow: 0 24px 48px -34px rgba(5, 63, 87, 0.76);
}

.ranking-directory-card__number {
  position: absolute;
  right: 22px;
  top: 18px;
  color: #e5f3f2;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
}

.ranking-directory-card__label {
  position: relative;
  align-self: flex-start;
  max-width: calc(100% - 52px);
  overflow: hidden;
  padding: 7px 11px;
  border-radius: 999px;
  background: linear-gradient(100deg, #13a6da 0%, #50d4bc 100%);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-directory-card h2 {
  position: relative;
  margin: 30px 0 24px;
  color: #10283e;
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
  line-height: 1.3;
}

.ranking-directory-card__link {
  position: relative;
  margin-top: auto;
  color: #078e91;
  font-size: 0.88rem;
  font-weight: 700;
}

@media (max-width: 1023px) {
  .ranking-directory__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .ranking-directory__hero-panel {
    padding: 36px 26px;
    border-radius: 18px;
  }

  .ranking-directory__grid {
    grid-template-columns: 1fr;
  }

  .ranking-directory-card > a {
    min-height: 220px;
  }
}

/* Grupowany katalog rankingów — wariant spójny z hero pozostałych podstron. */
.ranking-directory__hero.ranking-directory__hero {
  padding: 22px 0 38px;
}

.ranking-directory__hero-panel.ranking-directory__hero-panel {
  min-height: 560px;
  padding: 0;
  border: 0;
  background: linear-gradient(108deg, #dcefe6 0%, #ccebdd 26%, #7ed9b8 62%, #13a6da 100%);
}

.ranking-directory__hero-panel.ranking-directory__hero-panel::after {
  right: -270px;
  bottom: -330px;
  width: 620px;
  height: 620px;
}

.ranking-directory__hero .ranking-hero-panel__heading {
  max-width: 8.4em;
  margin: 0 0 22px;
  font-size: clamp(2.75rem, 4.05vw, 4.35rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.ranking-directory__hero .ranking-hero-float__icon img {
  position: static;
  width: 27px;
  height: 27px;
  object-fit: contain;
}

.ranking-directory__content {
  padding-top: clamp(24px, 4vw, 54px);
  padding-bottom: clamp(70px, 9vw, 120px);
}

.ranking-directory-group + .ranking-directory-group {
  margin-top: clamp(42px, 5vw, 62px);
}

.ranking-directory-group__heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #d5e5e9;
}

.ranking-directory-group__heading > div {
  min-width: 0;
}

.ranking-directory-group__heading p {
  margin: 0 0 3px;
  color: #079497;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ranking-directory-group__heading h2 {
  margin: 0;
  color: #0b2039;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.ranking-directory-group__icon,
.ranking-directory-card__icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(34, 186, 186, 0.18);
  background: linear-gradient(145deg, #ecf8f5, #d9f3ee);
  color: #14aeb2;
}

.ranking-directory-group__icon {
  width: 62px;
  height: 62px;
  border-radius: 16px;
}

.ranking-directory-group__icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.ranking-directory-group__count {
  margin-left: auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef7f7;
  color: #567080;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.ranking-directory__grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 0;
}

.ranking-directory-chip {
  min-height: 62px;
  border: 1px solid #d7e4e9;
  background: #fff;
  box-shadow: 0 8px 22px -20px rgba(8, 45, 68, 0.72);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ranking-directory-chip span {
  color: #17334a;
  font-weight: 700;
}

.ranking-directory-chip:hover,
.ranking-directory-chip:focus-visible {
  border-color: #29c1b7;
  box-shadow: 0 10px 24px -18px rgba(6, 103, 113, 0.72);
  transform: translateY(-2px);
}

.ranking-directory-card > a {
  min-height: 275px;
  padding: 24px;
  border-radius: 14px;
}

.ranking-directory-card__top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 58px;
}

.ranking-directory-card__icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
}

.ranking-directory-card__icon img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.ranking-directory-card__number {
  position: static;
  color: #e5f3f2;
  font-size: 3.3rem;
}

.ranking-directory-card__label {
  max-width: 100%;
  margin-top: 19px;
}

.ranking-directory-card h3 {
  position: relative;
  margin: 16px 0 24px;
  color: #10283e;
  font-size: clamp(1.18rem, 1.65vw, 1.48rem);
  line-height: 1.3;
}

@media (max-width: 767px) {
  .ranking-directory__hero-panel.ranking-directory__hero-panel {
    min-height: 800px;
    padding: 0;
  }

  .ranking-directory__hero .ranking-hero-panel__heading {
    font-size: clamp(2.25rem, 11vw, 3.4rem);
  }

  .ranking-directory-group__heading {
    align-items: flex-start;
  }

  .ranking-directory-group__count {
    display: none;
  }

  .ranking-directory__grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .ranking-directory__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 16px;
  }
}

@media (max-width: 620px) {
  .ranking-directory__hero-panel.ranking-directory__hero-panel {
    padding: 0;
  }

  .ranking-directory-card > a {
    min-height: 245px;
  }
}

/* Shared components and fluid layouts, including the intermediate widths. */
.article-main,
.article-layout > *,
.news-card,
.offer-card > *,
.footer-columns > *,
.ranking-hero-panel__copy {
  min-width: 0;
}

.section-heading,
.articles-listing__heading h2,
.ranking-directory-group__heading h2,
.article .guide-content h2,
.guide-content h2,
.article-takeaways__title {
  font-size: var(--heading-section-size);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.ranking-section-heading > span:last-child {
  min-width: 0;
}

.ranking-directory-group__icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: #dff5fa;
}

.ranking-directory-group__icon img {
  width: 24px;
  height: 24px;
}

:is(.news-grid, .blog-index) .news-card {
  overflow: hidden;
  border: 1px solid #e0e7eb;
  border-radius: 14px;
  background: #fff;
}

:is(.news-grid, .blog-index) .news-card__media {
  border-radius: 0;
  aspect-ratio: 16 / 9;
}

:is(.news-grid, .blog-index) .news-card__title {
  font-size: clamp(1rem, .95rem + .2vw, 1.125rem);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

:is(.news-grid, .blog-index) .news-card {
  display: flex;
  flex-direction: column;
}

:is(.news-grid, .blog-index) .news-card__media {
  flex-shrink: 0;
}

:is(.news-grid, .blog-index) .news-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 16px 20px;
}

:is(.news-grid, .blog-index) .news-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  flex-shrink: 0;
  height: 2.8em;
  margin: 0 0 10px;
}

:is(.news-grid, .blog-index) .news-card__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  flex-shrink: 0;
  font-size: .9rem;
  line-height: 1.55;
  height: 4.65em;
  margin: 0 0 16px;
}

:is(.news-grid, .blog-index) .news-card .arrow-link {
  align-self: flex-start;
  margin-top: 0;
}

.news-card__meta {
  flex-wrap: wrap;
  gap: 6px 12px;
}

.article-title,
.entry-content,
.guide-content,
.offer-card__title,
.offer-card__stat-value,
.footer-column,
.mobile-nav-panel a {
  overflow-wrap: anywhere;
}

.entry-content table,
.guide-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.entry-content iframe,
.entry-content video {
  max-width: 100%;
}

.pagination,
.ranking-hero-panel__actions {
  flex-wrap: wrap;
}

.btn,
.ranking-hero-panel__link {
  max-width: 100%;
  white-space: normal;
}

.search-form input[type="search"] {
  min-width: 0;
  width: 100%;
}

@media (min-width: 1200px) {
  .primary-nav {
    min-width: 0;
  }

  .primary-nav ul {
    gap: clamp(18px, 1.8vw, 36px);
  }

  .primary-nav > ul > li:nth-last-child(-n+3) > .sub-menu {
    right: 0;
    left: auto;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .news-grid,
  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .offer-card,
  .offer-card--api {
    grid-template-columns: 180px minmax(0, 1fr) 170px;
    grid-template-areas: "lead title cta" "stats stats stats" "desc desc desc" "toggle toggle toggle" "details details details";
    gap: 12px 18px;
    padding: 22px;
  }

  .offer-card:has(.offer-card__flags) {
    grid-template-areas: "flags flags flags" "lead title cta" "stats stats stats" "desc desc desc" "toggle toggle toggle" "details details details";
  }

  .offer-card__main {
    display: contents;
  }

  .offer-card__title {
    grid-area: title;
    align-self: center;
    margin: 0;
  }

  .offer-card__stats,
  .offer-card--api .offer-card__stats {
    display: grid;
    grid-area: stats;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
    width: 100%;
    margin-top: 8px;
    padding: 16px 0 0;
    border-top: 1px solid #e8edf0;
  }

  .offer-card__stat-label {
    white-space: normal;
  }
}

/* Copy and illustration occupy separate rows on tablets and phones. */
@media (max-width: 1199px) {
  .ranking-hero-panel,
  .ranking-directory__hero-panel.ranking-directory__hero-panel,
  .articles-hero-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .ranking-hero-panel__copy {
    padding: clamp(24px, 5vw, 46px);
  }

  .ranking-hero-panel__heading,
  .ranking-directory__hero .ranking-hero-panel__heading,
  .articles-hero .ranking-hero-panel__heading {
    max-width: 15em;
    font-size: clamp(2rem, 4.5vw + .5rem, 3.5rem);
  }

  .ranking-hero-panel__visual,
  .articles-hero-panel__visual,
  .ranking-hero-panel__visual--compact,
  .ranking-hero-panel__visual--horizontal {
    position: relative;
    right: auto;
    bottom: auto;
    align-self: stretch;
    flex: none;
    width: 100%;
    height: clamp(320px, 48vw, 440px);
  }

  .ranking-hero-panel__visual > img,
  .articles-hero-panel__visual > .articles-hero-panel__image {
    right: 50%;
    bottom: -10%;
    width: auto;
    height: 110%;
    max-width: none;
    transform: translateX(50%);
  }

  .ranking-hero-float,
  .articles-hero-float {
    display: flex;
    width: clamp(138px, 23vw, 198px);
    min-height: 56px;
    padding: 10px;
    font-size: .78rem;
  }

  .ranking-hero-float--a,
  .articles-hero-float--a {
    top: 8%;
    right: 4%;
    left: auto;
  }

  .ranking-hero-float--b {
    top: 42%;
    right: auto;
    left: 4%;
  }

  .ranking-hero-float--c,
  .articles-hero-float--c {
    top: 68%;
    right: 4%;
    bottom: auto;
    left: auto;
  }

  .articles-hero-float--a {
    right: auto;
    left: 4%;
  }

  .articles-hero-float--c {
    top: 22%;
  }
}

@media (max-width: 767px) {
  .header-bar {
    gap: 10px;
    padding: 12px 16px;
  }

  .site-branding__name {
    width: clamp(124px, 40vw, 156px);
    font-size: 1rem;
  }

  .header-actions {
    gap: 8px;
  }

  .site-branding img,
  .site-branding .site-branding__default-logo {
    width: clamp(124px, 40vw, 156px);
    max-height: 32px;
  }

  .ranking-hero-panel__heading,
  .ranking-directory__hero .ranking-hero-panel__heading,
  .articles-hero .ranking-hero-panel__heading {
    font-size: clamp(2rem, 7.4vw + .4rem, 3.25rem);
  }

  .ranking-hero-panel__meta {
    gap: 10px 16px;
    line-height: 1.5;
  }

  .ranking-hero-panel__visual > img,
  .articles-hero-panel__visual > .articles-hero-panel__image {
    right: 44%;
  }

  .ranking-hero-float,
  .articles-hero-float {
    gap: 6px;
    font-size: .72rem;
    width: 138px;
  }

  .ranking-hero-float__icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
  }

  .ranking-hero-float__icon img,
  .articles-hero-float .ranking-hero-float__icon img {
    width: 24px;
    height: 24px;
    max-width: 24px;
  }

  .offer-card,
  .offer-card--api {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "lead" "title" "stats" "desc" "cta" "toggle" "details";
    padding: 18px;
    gap: 12px;
  }

  .offer-card:has(.offer-card__flags) {
    grid-template-areas: "flags" "lead" "title" "stats" "desc" "cta" "toggle" "details";
  }

  .offer-card__lead,
  .offer-card__brand {
    align-items: center;
  }

  .offer-card__title {
    grid-area: title;
    margin: 0;
    font-size: 1.05rem;
  }

  .offer-card__stat {
    gap: 12px;
  }

  .offer-card__details {
    margin-inline: -18px;
    padding-inline: 18px;
  }

  .offer-card__details td {
    font-size: .875rem;
    overflow-wrap: anywhere;
  }

  .article-hero {
    border-radius: 16px;
  }

  .article-hero img {
    aspect-ratio: 16 / 10;
  }

  .article-toolbar {
    align-items: flex-start;
  }

  .article-meta {
    font-size: .8rem;
  }

  .article-share {
    flex-shrink: 0;
  }

  .section {
    padding-block: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .offer-card__lead {
    align-self: center;
    align-items: center;
  }
}

/* Keep the benefit boxes beside one another, outside the illustration. */
@media (max-width: 1199px) {
  .ranking-hero-panel__visual,
  .articles-hero-panel__visual {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
    gap: 10px;
    height: clamp(380px, 50vw, 480px);
    padding: 8px 20px 0;
  }

  .articles-hero-panel__visual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-hero-float,
  .articles-hero-float,
  .ranking-hero-float--a,
  .ranking-hero-float--b,
  .ranking-hero-float--c {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    justify-self: center;
    width: 100%;
    max-width: 224px;
  }

  .ranking-hero-panel__visual > img,
  .articles-hero-panel__visual > .articles-hero-panel__image {
    right: 50%;
    bottom: -1px;
    height: calc(100% - 90px);
  }
}

@media (max-width: 599px) {
  .ranking-hero-panel__visual,
  .articles-hero-panel__visual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: 420px;
    padding-inline: 14px;
  }

  .ranking-hero-float--c:not(.articles-hero-float) {
    grid-column: 1 / -1;
    max-width: 180px;
  }

  .ranking-hero-panel__visual > img {
    height: calc(100% - 150px);
  }

  .articles-hero-panel__visual > .articles-hero-panel__image {
    height: calc(100% - 100px);
  }
}

/* Full artwork remains on desktop; smaller screens retain the complete copy. */
.ranking-hero-title--compact {
  display: none;
}

.ranking-guide__layout {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.ranking-guide__toc {
  position: sticky;
  top: 100px;
  padding: 20px;
  border: 1px solid #e1e8ed;
  border-radius: 14px;
  background: #f7fcfc;
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  font-size: .875rem;
  line-height: 1.45;
}

.ranking-guide__toc summary {
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
}

.ranking-guide__toc ol {
  margin: 16px 0;
  padding-left: 20px;
  list-style: decimal;
}

.ranking-guide__toc li {
  margin-bottom: 10px;
}

.ranking-guide__toc a {
  overflow-wrap: anywhere;
}

.ranking-guide__toc a:hover,
.ranking-guide__toc a:focus-visible {
  color: #008a9c;
  text-decoration: underline;
}

.ranking-guide__content {
  min-width: 0;
}

.ranking-guide__content :is(h2, h3),
#przewodnik,
#ranking-lista {
  scroll-margin-top: 110px;
}

.ranking-guide__back {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Category navigation uses the same icons and palette as the ranking tiles. */
.header-bar {
  position: relative;
}

.primary-nav {
  transform: none;
}

@media (min-width: 1200px) {
  .primary-nav {
    padding-left: clamp(24px, 2.3vw, 44px);
  }

  .primary-nav .site-menu__link {
    line-height: 1.25;
  }
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-menu__row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-menu__link {
  padding-block: 12px;
  font-weight: 550;
}

.site-menu__toggle {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  color: var(--c-text);
  background: transparent;
}

.site-menu__toggle svg {
  width: 14px;
  height: 14px;
  transition: transform .2s ease;
}

.site-menu__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.site-menu__item.is-open .site-menu__link {
  color: #008a9c;
}

.site-menu__toggle:hover,
.site-menu__toggle:focus-visible {
  background: #e4f5f3;
}

.site-mega {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline: 0;
  z-index: 90;
  padding: 24px;
  border: 1px solid #dce8ec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 48px -24px rgba(8, 39, 60, .32);
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
}

.site-mega::before {
  content: "";
  position: absolute;
  height: 10px;
  bottom: 100%;
  inset-inline: 0;
}

.site-mega[hidden],
.site-mega__group[hidden] {
  display: none !important;
}

.site-mega a {
  white-space: normal;
  line-height: 1.4;
}

.site-mega__tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-bottom: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #e6eef1;
}

.site-mega__tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 44px;
  padding: 14px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--c-text-soft);
  font-size: .875rem;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
}

.site-mega__tab::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px;
  background: var(--c-gradient);
  opacity: 0;
}

.site-mega__tab:hover,
.site-mega__tab[aria-selected="true"] {
  color: #087f8e;
}

.site-mega__tab[aria-selected="true"]::after {
  opacity: 1;
}

.site-mega__tab:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 3px;
}

.site-mega__count {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 2px 6px;
  border-radius: 5px;
  background: #eef5f6;
  color: #567078;
  font-size: .7rem;
  font-weight: 600;
}

.site-mega__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.primary-nav .site-mega__card,
.mobile-nav-panel .site-mega__card,
.site-mega__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 18px 10px 14px;
  border: 1px solid #e0e9ed;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  line-height: 1.35;
  font-size: .875rem;
  transition: border-color .18s ease, background .18s ease;
}

.site-mega__card:hover,
.site-mega__card:focus-visible {
  background: #f3fbfa;
  border-color: #7dcfc7;
}

.site-mega__icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e1f6fa, #e8f8ee);
}

.site-mega__icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.site-mega__card-label {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.site-mega__card-hint {
  margin-top: auto;
  color: #6c8994;
  font-size: .7rem;
}

.site-mega__heading {
  margin: 0 0 18px;
  font-weight: 700;
}

.site-mega__guides {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 20px;
}

.primary-nav .site-mega__guides a,
.site-mega__guides a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid #e7eef1;
  border-radius: 8px;
  font-size: .875rem;
  line-height: 1.45;
}

.site-mega__empty {
  margin: 12px 0 24px;
  color: var(--c-text-soft);
}

.primary-nav .site-mega__all,
.mobile-nav-panel .site-mega__all,
.site-mega__all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 10px 0 2px;
  font-size: .875rem;
  font-weight: 650;
  color: #087f8e;
}

@media (max-width: 1199px) {
  .mobile-nav-panel {
    padding: 12px 16px;
  }

  .site-menu {
    display: block;
  }

  .site-menu__row {
    justify-content: space-between;
    min-height: 48px;
    border-bottom: 1px solid #e5edef;
  }

  .site-menu__link {
    flex: 1;
  }

  .site-mega {
    position: static;
    max-height: none;
    margin-top: 12px;
    padding: 12px 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .site-mega__tabs {
    flex-wrap: wrap;
    gap: 4px 20px;
    margin-bottom: 12px;
  }

  .site-mega__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .site-mega__guides {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (max-width: 599px) {
  .site-mega__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .site-mega__guides {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-mega__card,
  .mobile-nav-panel .site-mega__card {
    padding: 12px 8px;
    font-size: .8rem;
  }

  .site-mega__card-hint {
    font-size: .65rem;
  }
}

.ranking-guide__additional {
  margin-top: 28px;
  padding-top: 4px;
  border-top: 1px solid #e1e8ed;
}

.ranking-guide__anchor {
  display: block;
  scroll-margin-top: 110px;
}

@media (max-width: 1199px) {
  .hero,
  .hero.hero--gradient-card {
    padding-block: 8px 16px;
  }

  .hero > .shell,
  .template-ranking .hero--gradient-card > .shell,
  .articles-hero > .shell {
    width: 100%;
    padding-inline: 16px;
  }

  .ranking-hero-panel,
  .ranking-directory__hero-panel.ranking-directory__hero-panel,
  .articles-hero-panel {
    display: block;
    min-height: 0;
    height: auto;
    padding: 0;
    border-radius: 16px;
  }

  .ranking-hero-panel__visual,
  .articles-hero-panel__visual,
  .hero-visual,
  .hero-badge,
  .ranking-hero-title--desktop {
    display: none;
  }

  .ranking-hero-title--compact {
    display: inline;
  }

  .ranking-hero-panel::after {
    display: none;
  }

  .ranking-hero-panel__copy,
  .template-ranking .hero-copy,
  .hero-copy {
    width: 100%;
    padding: 24px 20px;
  }

  .ranking-hero-panel__heading,
  .ranking-directory__hero .ranking-hero-panel__heading,
  .articles-hero .ranking-hero-panel__heading,
  .hero-heading {
    max-width: none;
    margin: 0 0 16px;
    font-size: clamp(1.75rem, 3vw + .75rem, 2.75rem);
    line-height: 1.12;
  }

  .ranking-hero-panel__subtitle,
  .hero-subtitle {
    max-width: none;
    margin: 0 0 20px;
    font-size: 1rem;
    line-height: 1.55;
  }

  .ranking-hero-panel__actions {
    gap: 14px 22px;
    margin-bottom: 20px;
  }

  .hero :is(h1, .hero-heading) .text-gradient {
    background-image: linear-gradient(100deg, #008faa, #117b76);
  }

  .section {
    padding-block: 24px;
  }

  .hero + .section {
    padding-top: 12px;
  }

  .ranking-guide__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .ranking-guide__toc {
    position: static;
    max-height: none;
    padding: 16px 20px;
  }

  .ranking-guide__toc ol {
    columns: 2;
    column-gap: 32px;
  }

  .ranking-guide__toc li {
    break-inside: avoid;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .hero > .shell,
  .template-ranking .hero--gradient-card > .shell,
  .articles-hero > .shell {
    padding-inline: 30px;
  }

  .ranking-hero-panel__copy {
    padding: 28px;
  }
}

@media (max-width: 599px) {
  .ranking-guide__toc ol {
    columns: 1;
  }

  .ranking-editorial {
    padding: 20px 16px;
  }
}

/* Shared category archives, institution chips and crawlable offer pagination. */
body.category,
body.category .site-header { background: #eef9f7; }
.bank-ranking-directory { display: grid; }
.ranking-offer-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
}
.ranking-pagination-label { color: #49647a; padding: 8px; font-size: 14px; }
.ranking-offer-pagination a,
.ranking-offer-pagination .current {
  min-width: 38px;
  padding: 8px 12px;
  text-align: center;
  border: 1px solid #d7e4e9;
  border-radius: 8px;
  background: #fff;
}
.ranking-offer-pagination .current { color: #fff; background: #079ca9; border-color: #079ca9; }
.ranking-offer-pagination a:hover { border-color: #29c1b7; }
.ranking-more[aria-disabled="true"] { opacity: .65; cursor: wait; }
@media (min-width: 1200px) {
  .site-footer .footer-columns { grid-template-columns: minmax(210px, 1.35fr) repeat(4, minmax(130px, 1fr)); }
}
