/* ==========================================================================
   TERSEL — Style Arkusza CSS
   Liquid Glass Morphing Header + Siatka Kropkowa + Portal Artykułów
   ========================================================================== */

:root, :host {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', monospace;

  /* Liquid Glass Custom Properties */
  --glass-frost: 0.12;
  --glass-saturation: 1.35;
  --filter-id: url(#glass-filter-_r_b_);

  /* Kolory */
  --color-bg: #ffffff;
  --color-dot: rgba(15, 23, 42, 0.11);
  --color-text-main: #0f172a;
  --color-text-muted: #64748b;
  --color-card-bg: rgba(255, 255, 255, 0.85);
  --color-border: rgba(226, 232, 240, 0.85);
  --color-border-glow: rgba(0, 0, 0, 0.08);

  /* Akcenty kategorii */
  --accent-hot: #ef4444;
  --accent-tech: #2563eb;
  --accent-ai: #8b5cf6;
  --accent-geopol: #059669;
  --accent-world: #d97706;

  /* Wymiary paska */
  --header-height: 64px;
  --header-top-gap: 14px;
  --container-max: 1320px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  /* Tło białe w szare lekko widoczne kropki */
  background-image: radial-gradient(var(--color-dot) 1.25px, transparent 1.25px);
  background-size: 24px 24px;
  background-position: 0 0;
  color: var(--color-text-main);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}

/* Ukrycie wektora SVG z filtrem (tylko defs) */
.glass-surface__filter-svg {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   PASTYLKA LIQUID GLASS & ANIMACJE
   ========================================================================== */

/* Główna pastylka - dynamiczna pozycja */
.liquidglass-capsule {
  position: fixed;
  z-index: 1000;
  pointer-events: auto;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  overflow: hidden;
  will-change: transform, top, left, width, height, border-radius;
  transition: 
    top 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    left 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.6s ease,
    background 0.6s ease;
}

/* Stan centralny (Loading & Intro) */
.liquidglass-capsule.state-center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 100px;
  justify-content: center;
}

/* Krok 4a: Sam pionowy ruch w górę na wysokość paska (2x szybciej: 0.45s) */
.liquidglass-capsule.state-flyup {
  left: 50%;
  top: var(--header-top-gap);
  transform: translate(-50%, 0);
  width: 320px;
  height: var(--header-height);
  justify-content: center;
  transition: 
    top 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Krok 4b: Dopiero teraz wydłużenie w pełny pasek górny hover (2x szybciej: 0.45s) */
.liquidglass-capsule.state-topbar {
  left: 50%;
  top: var(--header-top-gap);
  transform: translate(-50%, 0);
  width: calc(100% - 32px);
  max-width: var(--container-max);
  height: var(--header-height);
  justify-content: space-between;
  padding: 0 16px 0 20px;
  transition: 
    width 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.45s ease;
}

/* Styl wypełnienia Liquid Glass */
.liquidglass-surface {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: blur(20px) saturate(var(--glass-saturation, 1.35));
  backdrop-filter: blur(20px) saturate(var(--glass-saturation, 1.35));
  box-shadow: 
    inset 0 0 2px 1px rgba(255, 255, 255, 0.9),
    inset 0 0 12px 3px rgba(255, 255, 255, 0.5),
    inset 0 4px 16px rgba(17, 17, 26, 0.05),
    inset 0 8px 24px rgba(17, 17, 26, 0.04),
    inset 0 6px 56px rgba(17, 17, 26, 0.03),
    0 10px 30px -10px rgba(0, 0, 0, 0.08),
    0 2px 8px -2px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.75);
  transition: opacity 0.4s ease;
}

/* Połysk szklany na pastylce */
.liquidglass-surface::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 48%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-radius: 9999px 9999px 60px 60px;
  pointer-events: none;
}

/* Faza 1: Wypełnienie niewidoczne, widoczne tylko rysowanie konturu */
.state-center.step-draw .liquidglass-surface {
  opacity: 0;
}

/* Faza 2: Efekt fali wodnej / wrzucenia kamienia w płynny liquid glass */
.state-center.step-fill {
  animation: waterRippleImpact 0.55s cubic-bezier(0.2, 0.8, 0.3, 1.2) forwards;
}

@keyframes waterRippleImpact {
  0% {
    transform: translate(-50%, -50%) scale(0.94);
  }
  35% {
    transform: translate(-50%, -50%) scale(1.08, 1.12);
  }
  65% {
    transform: translate(-50%, -50%) scale(0.97, 0.96);
  }
  85% {
    transform: translate(-50%, -50%) scale(1.02, 1.01);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Pierścień fali rozchodzącej się na wodzie */
.water-ripple-wave {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  pointer-events: none;
  opacity: 0;
}

.step-fill .water-ripple-wave {
  animation: rippleSpread 0.55s ease-out forwards;
}

@keyframes rippleSpread {
  0% {
    opacity: 0.85;
    transform: scale(0.4);
    box-shadow: 
      inset 0 0 0 2px rgba(255, 255, 255, 0.95),
      0 0 0 0 rgba(255, 255, 255, 0.8),
      0 0 20px rgba(255, 255, 255, 0.6);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.06);
    box-shadow: 
      inset 0 0 0 4px rgba(255, 255, 255, 0.8),
      0 0 24px 6px rgba(255, 255, 255, 0.5);
  }
  100% {
    opacity: 0;
    transform: scale(1.25);
    box-shadow: 
      inset 0 0 0 0 rgba(255, 255, 255, 0),
      0 0 35px 10px rgba(255, 255, 255, 0);
  }
}

.state-center.step-fill .liquidglass-surface,
.state-center.step-slot .liquidglass-surface,
.state-center.step-settled .liquidglass-surface,
.state-flyup .liquidglass-surface,
.state-topbar .liquidglass-surface {
  opacity: 1;
}

/* Obramówka SVG rysowana na początku (2x szybciej: 0.65s) */
.capsule-border-draw {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.capsule-border-rect {
  fill: none;
  stroke: #0f172a;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 850;
  stroke-dashoffset: 850;
}

/* Animacja rysowania obramówki: 0.65s */
.step-draw .capsule-border-rect {
  animation: drawBorder 0.65s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes drawBorder {
  0% {
    stroke-dashoffset: 850;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.step-fill .capsule-border-draw {
  opacity: 0.2;
}
.step-slot .capsule-border-draw,
.step-settled .capsule-border-draw,
.state-flyup .capsule-border-draw,
.state-topbar .capsule-border-draw {
  opacity: 0;
}

/* ==========================================================================
   LOGO TERSEL — JEDEN SPÓJNY ELEMENT, BEZ ZMIANY ROZMIARU I BEZ SKAKANIA
   ========================================================================== */

.capsule-inner-content {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
}

/* Kontener logo - stałe wymiary, pozycjonowanie w centrum pastylki */
.logo-slot-container {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  flex-shrink: 0;
  overflow: hidden;
  height: 40px;
}

/* Kiedy pastylka jest w centrum LUB leci pionowo w górę: idealnie w środku */
.liquidglass-capsule.state-center .logo-slot-container,
.liquidglass-capsule.state-flyup .logo-slot-container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
}

/* Kiedy pasek jest wydłużony na górze: LOGO ZAWSZE PO LEWEJ STRONIE */
.liquidglass-capsule.state-topbar .capsule-inner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.liquidglass-capsule.state-topbar .logo-slot-container {
  position: static;
  transform: none;
  order: 1;
  margin-right: 18px;
  width: auto;
}

/* Stały rozmiar logo: dokładnie 30px wysokości na każdym etapie */
.tersel-logo-image {
  height: 30px;
  width: auto;
  display: block;
  object-fit: contain;
  will-change: transform, filter, opacity;
}

/* Jedno szybkie zakręcenie od dołu (2x szybciej: 0.55s) */
.animate-single-slot {
  animation: singleSlotSpinFast 0.55s cubic-bezier(0.12, 0.88, 0.22, 1.05) forwards;
}

@keyframes singleSlotSpinFast {
  0% {
    transform: translateY(130%);
    opacity: 0;
    filter: blur(4px);
  }
  35% {
    opacity: 1;
    filter: blur(1.5px);
  }
  80% {
    transform: translateY(-8%);
    filter: blur(0px);
  }
  100% {
    transform: translateY(0%);
    opacity: 1;
    filter: blur(0px);
  }
}

/* Nawigacja i zakładki na pasku (po prawej stronie od logo) */
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  order: 2;
  margin-right: auto;
  pointer-events: none;
  transition: opacity 0.4s ease 0.15s;
}

.state-topbar .topbar-nav {
  opacity: 1;
  pointer-events: auto;
}

/* Przyciski zakładek (Test 1, Test 2, kategorie) */
.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  border-radius: 9999px;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.8);
  color: #0f172a;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.nav-tab.active {
  background: #0f172a;
  color: #ffffff;
}

.nav-tab-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.nav-tab.active .nav-tab-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Prawa część paska (Akcje, Replay animacji - zawsze po prawej stronie) */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  order: 3;
  margin-left: auto;
  transform: translateX(20px);
  pointer-events: none;
  transition: opacity 0.4s ease 0.2s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.state-topbar .topbar-actions {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.btn-replay-anim {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(203, 213, 225, 0.7);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-replay-anim:hover {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.btn-search {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(203, 213, 225, 0.7);
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-search:hover {
  background: #ffffff;
  color: #0f172a;
  transform: scale(1.05);
}

/* ==========================================================================
   PRZYCISK HAMBURGER NA PASKU GÓRNYM
   ========================================================================== */

.btn-hamburger {
  display: none;
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(203, 213, 225, 0.75);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  -webkit-tap-highlight-color: transparent;
}

.btn-hamburger:hover {
  background: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-hamburger:active {
  transform: scale(0.95);
}

.btn-hamburger .hamburger-box {
  width: 18px;
  height: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.btn-hamburger .hamburger-bar {
  display: block;
  width: 18px;
  height: 2px;
  background-color: #0f172a;
  border-radius: 2px;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease, background-color 0.25s ease;
  transform-origin: center;
}

/* Stan otwarty: płynna metamorfoza w krzyżyk X */
.btn-hamburger.is-active {
  background: #0f172a;
  border-color: #0f172a;
}

.btn-hamburger.is-active .hamburger-bar {
  background-color: #ffffff;
}

.btn-hamburger.is-active .bar-1 {
  transform: translateY(6px) rotate(45deg);
}

.btn-hamburger.is-active .bar-2 {
  opacity: 0;
  transform: scaleX(0);
}

.btn-hamburger.is-active .bar-3 {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   MENU MOBILNE — PŁYWAJĄCY LIQUID GLASS DRAWER Z ANIMACJĄ OTWIERANIA
   ========================================================================== */

/* Przyciemniający szklany backdrop za menu */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(15, 23, 42, 0.32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
  pointer-events: none;
}

.mobile-menu-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Pływająca kapsuła menu mobilnego */
.mobile-menu-drawer {
  position: fixed;
  top: calc(var(--header-top-gap) + var(--header-height) + 10px);
  left: 14px;
  right: 14px;
  max-width: 440px;
  margin: 0 auto;
  z-index: 999;
  border-radius: 26px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-16px) scale(0.96);
  transform-origin: top center;
  transition: 
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.32s ease,
    visibility 0.4s ease,
    filter 0.35s ease;
  filter: blur(6px);
  box-shadow: 
    0 24px 64px -12px rgba(15, 23, 42, 0.22),
    0 8px 24px -4px rgba(15, 23, 42, 0.08),
    inset 0 0 2px 1px rgba(255, 255, 255, 0.95);
}

/* Otwarty stan menu - sprężyste pojawienie się */
.mobile-menu-drawer.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  filter: blur(0px);
}

/* Powierzchnia Liquid Glass menu */
.mobile-drawer-surface {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  backdrop-filter: blur(32px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  pointer-events: none;
}

.mobile-drawer-content {
  position: relative;
  z-index: 2;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Górna belka w menu mobilnym */
.mobile-drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.mobile-drawer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.drawer-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
  border-radius: 9999px;
}

.mobile-drawer-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.05);
  border: none;
  color: #64748b;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-drawer-close:hover {
  background: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

/* Lista linków kategorii w menu mobilnym */
.mobile-categories-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-category-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-bottom: 4px;
  padding-left: 4px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 16px;
  text-decoration: none;
  color: #1e293b;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(241, 245, 249, 0.95);
  transition: all 0.22s ease;
  font-weight: 600;
  font-size: 14px;
}

.mobile-nav-link:hover, .mobile-nav-link:active {
  background: #ffffff;
  border-color: rgba(203, 213, 225, 0.85);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transform: translateX(3px);
}

.nav-link-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Nowoczesne ikony kategorii w menu mobilnym */
.nav-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.mobile-nav-link:hover .nav-item-icon {
  transform: scale(1.08);
}

.nav-icon-hot {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.nav-icon-tech {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.nav-icon-ai {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

.nav-icon-geopol {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
}

.nav-icon-world {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
}

.nav-link-text {
  font-size: 14px;
  font-weight: 600;
}

.nav-link-arrow {
  color: #94a3b8;
  font-size: 15px;
  transition: transform 0.2s ease;
}

.mobile-nav-link:hover .nav-link-arrow {
  transform: translateX(3px);
  color: #0f172a;
}

/* Wektorowa ikonka ognia w badge i w kartach */
.badge-flame-icon {
  display: inline-block;
  vertical-align: -1px;
  flex-shrink: 0;
}

.badge-hot-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-hot .badge-flame-icon {
  color: #ffffff;
}

/* Płynna, kaskadowa animacja pojawiania się pozycji menu po otwarciu */
.mobile-menu-drawer.open .mobile-nav-link {
  animation: drawerItemSlide 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--nav-i, 0) * 45ms + 0.08s);
}

@keyframes drawerItemSlide {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   TREŚĆ PORTALU ARTYKUŁÓW (TERSEL PORTAL)
   ========================================================================== */

.page-wrapper {
  padding-top: calc(var(--header-height) + var(--header-top-gap) + 24px);
  padding-bottom: 80px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  transition: opacity 0.8s ease 0.4s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

.page-wrapper.hidden {
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
}

.page-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Margines dla płynnego przewijania pod pływającym paskiem liquid glass */
#gorace,
.category-block {
  scroll-margin-top: calc(var(--header-height) + var(--header-top-gap) + 20px);
}

/* Nagłówek sekcji */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0f172a;
}

.section-indicator.hot { background: var(--accent-hot); box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
.section-indicator.tech { background: var(--accent-tech); }
.section-indicator.ai { background: var(--accent-ai); }
.section-indicator.geopol { background: var(--accent-geopol); }
.section-indicator.world { background: var(--accent-world); }

.section-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
}

.section-more-link {
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.section-more-link:hover {
  color: #0f172a;
}

/* ==========================================================================
   SEKCJA 1: GORĄCE TEMATY (4 ARTYKUŁY)
   ========================================================================== */

.hot-topics-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  margin-bottom: 56px;
}

/* Duży główny artykuł (Hero Lead) */
.hero-article-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 36px;
  text-decoration: none;
  color: #ffffff;
  background-color: #0f172a;
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.hero-article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.22);
}

.hero-article-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.88;
}

.hero-article-card:hover .hero-article-img {
  transform: scale(1.04);
}

.hero-article-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.6) 45%, rgba(15, 23, 42, 0.94) 100%);
  pointer-events: none;
}

.hero-article-content {
  position: relative;
  z-index: 5;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 9999px;
  margin-bottom: 14px;
}

.badge-hot {
  background: var(--accent-hot);
  color: #ffffff;
}

.badge-tech { background: rgba(37, 99, 235, 0.15); color: #1d4ed8; }
.badge-ai { background: rgba(139, 92, 246, 0.15); color: #6d28d9; }
.badge-geopol { background: rgba(5, 150, 105, 0.15); color: #047857; }
.badge-world { background: rgba(217, 119, 6, 0.15); color: #b45309; }
.badge-sponsored {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.08);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge-sponsored svg {
  color: #d97706;
  flex-shrink: 0;
}
.badge-sponsored:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.5);
}
.hero-article-card .badge-sponsored {
  background: rgba(245, 158, 11, 0.25);
  color: #fef3c7;
  border-color: rgba(245, 158, 11, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.hero-article-card .badge-sponsored svg {
  color: #fbbf24;
}

.hero-article-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.hero-article-excerpt {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  margin-bottom: 18px;
  max-width: 90%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.7);
}

/* Prawa kolumna 3 artykułów Hot */
.hot-secondary-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-card-compact {
  display: flex;
  gap: 16px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 16px;
  text-decoration: none;
  color: var(--color-text-main);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
  transition: all 0.25s ease;
}

.article-card-compact:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  border-color: rgba(203, 213, 225, 0.8);
}

.compact-img-wrap {
  width: 120px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.compact-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card-compact:hover .compact-img-wrap img {
  transform: scale(1.05);
}

.compact-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.compact-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
  color: #0f172a;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.meta-dark {
  color: #64748b;
  font-size: 12px;
}

/* ==========================================================================
   KATEGORIE DWU-KAFELKOWE (Technologia, AI, Geopolityka, Świat)
   ========================================================================== */

.categories-container {
  display: flex;
  flex-direction: column;
  gap: 52px;
}

.two-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.standard-article-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text-main);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
  transition: all 0.25s ease;
}

.standard-article-card:hover {
  transform: translateY(-3px);
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.06);
  border-color: rgba(203, 213, 225, 0.8);
}

.standard-card-img-wrap {
  height: 220px;
  position: relative;
  overflow: hidden;
}

.standard-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.standard-article-card:hover .standard-card-img-wrap img {
  transform: scale(1.04);
}

.card-tag-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
}

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

.standard-card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  color: #0f172a;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.standard-card-excerpt {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

/* Stopka strony */
.portal-footer {
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #64748b;
  font-size: 13px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  height: 20px;
}

.footer-categories {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-cat-link {
  color: #64748b;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-cat-link:hover {
  color: #0f172a;
  text-decoration: underline;
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-wrap: wrap;
}

.footer-legal-link {
  color: #64748b;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-legal-link:hover {
  color: #0f172a;
  text-decoration: underline;
}

.footer-dot {
  color: #cbd5e1;
  font-size: 12px;
}

/* ==========================================================================
   RESPONSYWNOŚĆ (Mobile & Tablet)
   ========================================================================== */

@media (max-width: 860px) {
  .hot-topics-grid {
    grid-template-columns: 1fr;
  }
  .hero-article-card {
    min-height: 380px;
  }
  .two-cards-grid {
    grid-template-columns: 1fr;
  }
  /* Ukryj belkę nawigacji poziomej na tabletach i telefonach — używamy menu hamburgerowego */
  .topbar-nav {
    display: none !important;
  }
  .btn-hamburger {
    display: inline-flex;
  }
  .state-topbar {
    width: calc(100% - 20px);
    padding: 0 14px;
    height: 58px;
  }
  .topbar-logo-wrap img {
    height: 25px;
  }
}

@media (max-width: 640px) {
  .liquidglass-capsule.state-center {
    width: min(290px, 88vw);
    height: 90px;
  }
  .liquidglass-capsule.state-flyup {
    width: min(290px, 88vw);
    height: 54px;
    top: 10px;
  }
  .state-topbar {
    width: calc(100% - 16px);
    top: 10px;
    height: 54px;
    padding: 0 12px;
  }
  .state-topbar .logo-slot-container {
    order: 1;
    margin-right: 8px;
    margin-left: 0;
  }
  .state-topbar .topbar-actions {
    order: 2;
    margin-left: auto;
    margin-right: 0;
    gap: 8px;
  }
  .topbar-logo-wrap img {
    height: 22px;
  }
  .btn-search,
  .label-long {
    display: none !important;
  }
  .btn-hamburger {
    width: 36px;
    height: 36px;
  }
  .mobile-menu-drawer {
    top: 72px;
    left: 10px;
    right: 10px;
    border-radius: 22px;
  }
  .mobile-drawer-surface {
    border-radius: 22px;
  }
  .mobile-drawer-content {
    padding: 16px 14px;
    gap: 14px;
  }
  .hero-article-title {
    font-size: 20px;
  }
  .hero-article-card {
    padding: 20px;
    min-height: 340px;
  }
  .article-card-compact {
    flex-direction: column;
    gap: 12px;
  }
  .compact-img-wrap {
    width: 100%;
    height: 160px;
  }
  .standard-card-img-wrap {
    height: 180px;
  }
  .portal-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}


/* ==========================================================================
   TERSEL — LOGIN, AUTH MODAL, MOJE KONTO, TERSEL PANEL & ARTICLE READER
   ========================================================================== */

/* Przycisk profilu w pasku górnym (minimalistyczna ikonka ludzika) */
.btn-user-profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(203, 213, 225, 0.7);
  color: #334155;
  cursor: pointer;
  position: relative;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.btn-user-profile:hover {
  background: #ffffff;
  border-color: rgba(203, 213, 225, 0.95);
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.user-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  transition: all 0.2s ease;
}

.btn-user-profile:hover .user-icon-wrap {
  background: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

.btn-user-profile.is-logged-in {
  padding: 0 12px 0 6px;
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(203, 213, 225, 0.85);
  color: #0f172a;
}

.btn-user-profile.is-logged-in:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.btn-user-profile.is-logged-in .user-icon-wrap {
  background: #0f172a;
  color: #ffffff;
}

.btn-user-profile.is-logged-in:hover .user-icon-wrap {
  background: #1e293b;
}

.user-name-text {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.1px;
}

.user-role-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 7px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
  border: 1px solid rgba(15, 23, 42, 0.08);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.2;
}

.btn-user-profile.is-logged-in:hover .user-role-tag {
  background: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

.tersel-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tersel-modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 25px 60px -15px rgba(15, 23, 42, 0.25),
    0 0 0 1px rgba(15, 23, 42, 0.05);
  padding: 32px 28px;
  animation: modalCardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalCardPop {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.9);
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #0f172a;
  color: #ffffff;
}

.auth-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-header-logo img {
  height: 28px;
  width: auto;
}

.auth-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.05);
  padding: 4px;
  border-radius: 9999px;
  margin-bottom: 24px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 9px 16px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  font-family: var(--font-main);
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.form-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.8);
  font-family: var(--font-main);
  font-size: 14px;
  color: #0f172a;
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-toggle-pwd {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 13px;
  padding: 4px;
}

.btn-toggle-pwd:hover {
  color: #0f172a;
}

.btn-submit-auth {
  width: 100%;
  height: 46px;
  margin-top: 8px;
  border-radius: 14px;
  border: none;
  background: #0f172a;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

.btn-submit-auth:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}

.btn-submit-auth:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-alert-error {
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}

.auth-alert-success {
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}

.auth-demo-hint {
  margin-top: 18px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.03);
  border-radius: 10px;
  border: 1px dashed rgba(15, 23, 42, 0.15);
  font-size: 12px;
  color: #64748b;
  text-align: center;
}

.auth-demo-hint code {
  background: rgba(15, 23, 42, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
  color: #0f172a;
}

/* ==========================================================================
   PANEL MOJE KONTO (ACCOUNT DRAWER)
   ========================================================================== */
.tersel-account-drawer {
  position: fixed;
  top: 84px;
  right: 24px;
  width: 360px;
  max-width: calc(100vw - 48px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 20px 50px -10px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(15, 23, 42, 0.05);
  padding: 24px;
  z-index: 1500;
  animation: accountDrawerSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes accountDrawerSlide {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.account-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 18px;
}

.account-avatar-large {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.account-avatar-large.admin {
  background: #0f172a;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.account-details-name {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.account-details-email {
  font-size: 13px;
  color: #64748b;
  margin-top: 1px;
}

.role-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
  margin-top: 5px;
}

.role-badge-pill.admin {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.15);
}

.role-badge-pill.reader {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Tersel Panel Button w Moje Konto */
.btn-tersel-panel-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.15);
}

.btn-tersel-panel-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
}

.panel-trigger-left {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.panel-trigger-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.panel-trigger-title {
  font-size: 14px;
  font-weight: 700;
  display: block;
}

.panel-trigger-desc {
  font-size: 11.5px;
  color: #94a3b8;
  display: block;
}

.btn-account-logout {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #ef4444;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-account-logout:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* Przycisk Google OAuth i separator */
.btn-oauth-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 18px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  margin-bottom: 16px;
}

.btn-oauth-google:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.btn-oauth-google:active {
  transform: translateY(0);
}

.btn-oauth-google:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0;
  color: #94a3b8;
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
  padding: 0 12px;
  font-weight: 500;
}

/* Ikona zębatki w nagłówku panelu konta */
.drawer-header-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-header-icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* Przycisk Ustawień w panelu konta */
.btn-tersel-settings-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 15px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.btn-tersel-settings-trigger:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.btn-tersel-settings-trigger .settings-icon {
  background: #f1f5f9;
  color: #0f172a;
}

/* Alert niezweryfikowanego konta w drawerze */
.account-unverified-alert {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.btn-verify-prompt {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.btn-verify-prompt:hover {
  color: #78350f;
}

/* Modal Ustawień Konta */
.settings-modal-card {
  max-width: 520px;
  width: 100%;
}

.settings-tabs {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.settings-tab-btn {
  flex: 1;
  min-width: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-tab-btn:hover:not(.active) {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}

.settings-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.settings-tab-btn.danger.active {
  color: #ef4444;
  font-weight: 700;
}

.settings-info-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 13px;
  color: #0369a1;
  line-height: 1.5;
  margin-bottom: 18px;
}

.settings-danger-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 13px;
  color: #991b1b;
  line-height: 1.5;
  margin-bottom: 18px;
}

.code-input-group {
  margin: 18px 0;
  text-align: center;
}

.code-input-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 8px;
  display: block;
}

.code-digit-input {
  font-family: 'Space Grotesk', monospace;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 8px;
  text-align: center;
  padding: 10px 16px;
  border: 2px solid #0284c7;
  border-radius: 14px;
  background: #f0f9ff;
  color: #0284c7;
  width: 240px;
  max-width: 100%;
  outline: none;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
  transition: all 0.2s ease;
}

.code-digit-input:focus {
  border-color: #0369a1;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.2);
}

.btn-danger-action {
  width: 100%;
  padding: 12px 18px;
  border-radius: 14px;
  border: none;
  background: #ef4444;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-danger-action:hover:not(:disabled) {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
}

.btn-danger-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary-link {
  background: transparent;
  border: none;
  color: #64748b;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  text-decoration: underline;
  padding: 4px;
}

.btn-secondary-link:hover {
  color: #0f172a;
}

/* ==========================================================================
   TERSEL PANEL — DASHBOARD ADMINISTRACYJNY
   ========================================================================== */
.tersel-dashboard-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: #f8fafc;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.tersel-dashboard-page,
.tersel-dashboard-page-content {
  min-height: 100vh;
  width: 100%;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
}

.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-brand img {
  height: 26px;
}

.dash-badge {
  background: #0f172a;
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.dash-nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.05);
  padding: 4px;
  border-radius: 9999px;
}

.dash-tab-btn {
  padding: 7px 18px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  font-family: var(--font-main);
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dash-btn-exit {
  padding: 8px 16px;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.dash-btn-exit:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.dash-container {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.dash-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.dash-view-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

.dash-view-subtitle {
  font-size: 14px;
  color: #64748b;
  margin-top: 4px;
}

.dash-search-input {
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-family: var(--font-main);
  font-size: 13.5px;
  width: 280px;
  outline: none;
  transition: all 0.2s ease;
}

.dash-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Tabela w Dashboardzie */
.dash-table-wrap {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  overflow: hidden;
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.dash-table th {
  background: #f8fafc;
  padding: 14px 18px;
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e2e8f0;
}

.dash-table td {
  padding: 16px 18px;
  font-size: 13.5px;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.dash-table tr:last-child td {
  border-bottom: none;
}

.dash-table tr:hover td {
  background: #fafafa;
}

.badge-admin-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
}

.badge-admin-status.yes {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.badge-admin-status.no {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Paginacja 10 na stronę */
.dash-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  font-size: 13px;
  color: #64748b;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-page-step {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-page-step:hover:not(:disabled) {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.btn-page-step:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Przyciski akcji w tabeli */
.table-btn-action {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.table-btn-action.toggle-admin {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

.table-btn-action.toggle-admin:hover {
  background: #2563eb;
  color: #ffffff;
}

.table-btn-action.toggle-verified {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}

.table-btn-action.toggle-verified:hover {
  background: #0284c7;
  color: #ffffff;
}

.table-btn-action.toggle-verified.is-verified {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}

.table-btn-action.toggle-verified.is-verified:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.table-btn-action.delete {
  background: #fff1f2;
  color: #e11d48;
  border-color: #fecdd3;
  margin-left: 6px;
}

.table-btn-action.delete:hover {
  background: #e11d48;
  color: #ffffff;
}

.badge-verified-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
}

.badge-verified-status.yes {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.badge-verified-status.no {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.tersel-verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -2px;
  margin-left: 4px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.tersel-verified-badge:hover {
  transform: scale(1.18);
}

/* ==========================================================================
   NOWOCZESNY EDYTOR ARTYKUŁÓW W TERSEL PANEL
   ========================================================================== */
.editor-card {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 32px;
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
}

.editor-grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}

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

.editor-main-title-input {
  width: 100%;
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-main);
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  outline: none;
  transition: all 0.2s ease;
  margin-bottom: 18px;
}

.editor-main-title-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Pasek narzędzi edytora */
.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px 12px 0 0;
  border-bottom: none;
}

.toolbar-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.toolbar-btn:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.toolbar-separator {
  width: 1px;
  height: 20px;
  background: #cbd5e1;
  margin: 0 4px;
}

/* Obszar pisania edytora */
.editor-textarea {
  width: 100%;
  min-height: 380px;
  padding: 18px;
  border-radius: 0 0 12px 12px;
  border: 1px solid #e2e8f0;
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.7;
  color: #0f172a;
  outline: none;
  resize: vertical;
  background: #ffffff;
  transition: border-color 0.2s ease;
}

.editor-textarea:focus {
  border-color: #2563eb;
}

/* Podgląd Featured Image */
.featured-image-box {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  margin-top: 6px;
}

.featured-preview-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

.btn-upload-trigger {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-upload-trigger:hover {
  background: #0f172a;
  color: #ffffff;
}

/* ==========================================================================
   NOWOCZESNY CZYTNIK ARTYKUŁÓW (ARTICLE READER VIEW)
   ========================================================================== */
.article-reader-view {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px 80px;
  animation: readerFadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

@keyframes readerFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.reader-back-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.btn-reader-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.9);
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-reader-back:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  transform: translateX(-2px);
}

.reader-hero-wrap {
  position: relative;
  width: 100%;
  height: 440px;
  border-radius: 28px;
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.15);
}

.reader-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reader-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.65) 100%);
}

.reader-category-pill {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 2;
}

.reader-header {
  margin-bottom: 28px;
}

.reader-title {
  font-family: var(--font-mono);
  font-size: 38px;
  line-height: 1.25;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

@media (max-width: 768px) {
  .reader-title {
    font-size: 26px;
  }
  .reader-hero-wrap {
    height: 260px;
  }
}

.reader-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.reader-author-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.reader-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.reader-meta-stat {
  font-size: 13.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 5px;
}

.reader-excerpt-lead {
  font-size: 19px;
  line-height: 1.6;
  font-weight: 600;
  color: #1e293b;
  padding-left: 20px;
  border-left: 4px solid #2563eb;
  margin-bottom: 32px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.reader-sponsored-disclaimer {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fffbeb;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 32px;
  font-size: 13.5px;
  color: #92400e;
}

.reader-sponsored-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.18);
  color: #d97706;
  flex-shrink: 0;
}

.reader-sponsored-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reader-sponsored-text strong {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #78350f;
}

.reader-sponsored-text span {
  color: #92400e;
  line-height: 1.45;
}

.reader-content-body {
  font-size: 17px;
  line-height: 1.8;
  color: #334155;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.reader-content-body p {
  margin-bottom: 22px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.reader-content-body h2 {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin: 36px 0 16px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.reader-content-body h3 {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 28px 0 12px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.reader-content-body blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  background: rgba(37, 99, 235, 0.04);
  border-left: 4px solid #2563eb;
  border-radius: 0 16px 16px 0;
  font-style: italic;
  font-size: 18px;
  line-height: 1.6;
  color: #1e293b;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.reader-content-body pre,
.reader-content-body code {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  max-width: 100%;
}

.reader-content-body figure {
  margin: 32px 0;
  max-width: 100%;
}

.reader-content-body figure img,
.reader-content-body img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
  display: block;
}

.reader-content-body figcaption {
  font-size: 13px;
  color: #64748b;
  text-align: center;
  margin-top: 10px;
  overflow-wrap: break-word;
}

/* Sekcja powiązanych artykułów */
.reader-related-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid #e2e8f0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* ==========================================================================
   DEDYKOWANA STRONA KATEGORII (CATEGORY PAGE VIEW)
   ========================================================================== */
.category-page-view {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 20px 80px;
  animation: readerFadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.category-breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.category-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
}

.breadcrumb-link {
  color: #2563eb;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}

.breadcrumb-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.btn-category-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.9);
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn-category-back:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  transform: translateX(-2px);
}

.category-banner {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.95));
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  padding: 40px 36px;
  margin-bottom: 36px;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.category-banner-info {
  max-width: 650px;
}

.category-banner-title {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  margin: 12px 0 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-banner-desc {
  font-size: 15.5px;
  line-height: 1.6;
  color: #475569;
}

.category-banner-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.cat-stat-num {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #0f172a;
  display: block;
}

/* Minimalistyczny link z działu (usuwa wszelkie brzydkie obramowania buttona) */
.section-more-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-family: var(--font-main) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.section-more-link:hover {
  color: #0f172a !important;
  transform: translateX(3px) !important;
}

/* Nowoczesna plakietka ognia SVG w menu dla Gorących Tematów (bez emoji) */
.nav-badge-flame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  margin-left: 5px;
  flex-shrink: 0;
}

/* Duża karta wyróżniona w kategorii (Category Hero) */
.category-lead-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  overflow: hidden;
  box-shadow: 0 8px 30px -8px rgba(15, 23, 42, 0.08);
  margin-bottom: 40px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-lead-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -12px rgba(15, 23, 42, 0.14);
}

.category-lead-img-wrap {
  position: relative;
  min-height: 320px;
  overflow: hidden;
}

.category-lead-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-lead-card:hover .category-lead-img {
  transform: scale(1.03);
}

.category-lead-content {
  padding: 32px 32px 32px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-lead-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin: 12px 0 14px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.category-lead-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #475569;
  margin-bottom: 20px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

@media (max-width: 860px) {
  .category-lead-card {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .category-lead-content {
    padding: 24px;
  }
  .category-lead-img-wrap {
    height: 240px;
    min-height: auto;
  }
}

/* Siatka pozostałych artykułów w kategorii */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* ==========================================================================
   SEKCJA KOMENTARZY POD ARTYKUŁEM (ARTICLE COMMENTS)
   ========================================================================== */
.article-comments-section {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 2px solid #e2e8f0;
}

.comments-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.comments-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comments-header-title h3 {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.comments-count-pill {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
}

/* Box zachęcający do logowania dla gości */
.comments-login-box {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.95));
  border: 1.5px dashed rgba(203, 213, 225, 0.9);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.comments-login-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.comments-login-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.comments-login-text h4 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.comments-login-text p {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.4;
  margin: 0;
}

.btn-login-to-comment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  white-space: nowrap;
}

.btn-login-to-comment:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

/* Formularz dodawania komentarza */
.comment-composer-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
}

.composer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.composer-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.composer-author-name {
  font-size: 13.5px;
  color: #334155;
}

.composer-author-name strong {
  color: #0f172a;
}

.composer-rule-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.comment-textarea {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  font-family: var(--font-main);
  font-size: 14.5px;
  line-height: 1.55;
  color: #0f172a;
  background: #f8fafc;
  resize: vertical;
  min-height: 95px;
  outline: none;
  transition: all 0.2s ease;
}

.comment-textarea:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.char-counter {
  font-size: 12px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.btn-submit-comment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  padding: 9px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-submit-comment:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-submit-comment:not(:disabled):hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Baner gdy użytkownik już dodał swój 1 komentarz */
.comment-already-posted-banner {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(240, 253, 244, 0.9));
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.already-posted-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

.already-posted-text {
  font-size: 13.5px;
  line-height: 1.45;
  color: #1e293b;
}

.already-posted-text strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 2px;
}

/* Lista komentarzy */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 20px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.comment-card.is-own {
  border-color: rgba(37, 99, 235, 0.35);
  background: linear-gradient(180deg, rgba(240, 246, 255, 0.45) 0%, rgba(255, 255, 255, 0.95) 100%);
  box-shadow: 0 4px 16px -2px rgba(37, 99, 235, 0.08);
}

.comment-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.comment-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comment-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
}

.comment-user-avatar.admin {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.comment-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-user-meta {
  display: flex;
  flex-direction: column;
}

.comment-user-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-username {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
}

.badge-comment-admin {
  font-size: 10px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  padding: 2px 7px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-comment-own {
  font-size: 11px;
  font-weight: 600;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  padding: 2px 8px;
  border-radius: 9999px;
}

.comment-timestamp {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-edited-tag {
  font-style: italic;
  color: #94a3b8;
  font-size: 11.5px;
}

.comment-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.btn-action-pill.btn-delete:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.comment-content-text {
  font-size: 15px;
  line-height: 1.65;
  color: #334155;
  margin-top: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Edycja inline */
.comment-edit-box {
  margin-top: 14px;
}

.comment-edit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.btn-cancel-edit {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #64748b;
  padding: 7px 15px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cancel-edit:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-save-edit {
  background: #2563eb;
  border: none;
  color: #ffffff;
  padding: 7px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-save-edit:hover {
  background: #1d4ed8;
}

.btn-save-edit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Stan pusty */
.comments-empty-state {
  text-align: center;
  padding: 48px 20px;
  background: rgba(248, 250, 252, 0.6);
  border-radius: 20px;
  border: 1px dashed #e2e8f0;
}

.comments-empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.7;
}

.comments-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.comments-empty-subtitle {
  font-size: 13.5px;
  color: #64748b;
}

/* Płynne menu użytkownika w topbarze artykułu */
.topbar-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 16px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 12px;
  min-width: 200px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: modalFadeIn 0.2s ease;
}

/* ==========================================================================
   STATYSTYKI ARTYKUŁU I RETENCJA CZYTANIA (DASHBOARD)
   ========================================================================== */

.stats-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.stats-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stats-article-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 680px;
}

.stats-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #64748b;
}

.stats-article-title {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.stats-range-tabs {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
}

.stats-range-btn {
  border: none;
  background: transparent;
  padding: 7px 14px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.18s ease;
}

.stats-range-btn:hover {
  color: #0f172a;
}

.stats-range-btn.active {
  background: #ffffff;
  color: #2563eb;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* 4 Karty KPI */
.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 1024px) {
  .stats-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .stats-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.stats-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.stats-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.stats-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stats-kpi-icon.blue { background: rgba(37, 99, 235, 0.1); color: #2563eb; }
.stats-kpi-icon.purple { background: rgba(139, 92, 246, 0.1); color: #7c3aed; }
.stats-kpi-icon.green { background: rgba(16, 185, 129, 0.1); color: #059669; }
.stats-kpi-icon.amber { background: rgba(245, 158, 11, 0.1); color: #d97706; }

.stats-kpi-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.stats-kpi-subtext {
  font-size: 12.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Karta z wykresem */
.stats-chart-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.stats-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.stats-chart-title-wrap h3 {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.stats-chart-title-wrap p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.stats-chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  font-weight: 600;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.blue { background: #2563eb; }
.legend-dot.green { background: #10b981; }

.stats-chart-svg-wrap {
  width: 100%;
  height: 280px;
  position: relative;
  overflow: visible;
}

.stats-chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Tooltip nad wykresem */
.stats-chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  transform: translate(-50%, -100%);
  margin-top: -12px;
  white-space: nowrap;
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: left 0.1s ease, top 0.1s ease;
}

.stats-chart-tooltip strong {
  display: block;
  font-size: 12.5px;
  color: #f8fafc;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 3px;
}

/* 2-kolumnowa sekcja retencji */
.stats-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .stats-grid-2col {
    grid-template-columns: 1fr;
  }
}

.stats-deepdive-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.stats-deepdive-header {
  margin-bottom: 20px;
}

.stats-deepdive-header h3 {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.stats-deepdive-header p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

/* Elementy lejka retencji */
.stats-funnel-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stats-funnel-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stats-funnel-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
}

.stats-funnel-title {
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats-funnel-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
}

.stats-funnel-value {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #0f172a;
}

.stats-progress-track {
  width: 100%;
  height: 10px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.stats-progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.stats-progress-fill.stage-0 { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.stats-progress-fill.stage-1 { background: linear-gradient(90deg, #6366f1, #4f46e5); }
.stats-progress-fill.stage-2 { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }
.stats-progress-fill.stage-3 { background: linear-gradient(90deg, #10b981, #059669); }

.stats-progress-fill.dist-0 { background: #94a3b8; }
.stats-progress-fill.dist-1 { background: #38bdf8; }
.stats-progress-fill.dist-2 { background: #3b82f6; }
.stats-progress-fill.dist-3 { background: #10b981; }

.stats-funnel-desc {
  font-size: 12px;
  color: #64748b;
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   MODAL DOSTOSOWYWANIA STATYSTYK I RETENCJI ARTYKUŁU
   ========================================================================== */
.stats-custom-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.stats-custom-modal-content {
  background: #ffffff;
  border-radius: 24px;
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}

.stats-custom-modal-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

.stats-custom-modal-title {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats-custom-modal-sub {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.stats-custom-modal-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stats-box-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 20px;
}

.stats-box-header {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stats-inputs-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 640px) {
  .stats-inputs-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stats-custom-modal-footer {
  padding: 18px 28px 24px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  position: sticky;
  bottom: 0;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

/* ==========================================================================
   SEARCH MODAL — LIQUID GLASS OVERLAY
   ========================================================================== */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: searchOverlayIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes searchOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes searchModalIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.search-modal {
  position: relative;
  width: 90%;
  max-width: 640px;
  border-radius: 24px;
  overflow: hidden;
  animation: searchModalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    0 25px 60px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.search-modal-glass {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 24px;
  z-index: 0;
}

.search-modal-content {
  position: relative;
  z-index: 1;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.search-input-icon {
  flex-shrink: 0;
  color: #94a3b8;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 17px;
  font-weight: 500;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #0f172a;
  caret-color: #0284c7;
}

.search-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.search-clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: rgba(15, 23, 42, 0.06);
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-clear-btn:hover {
  background: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

.search-kbd {
  flex-shrink: 0;
  font-size: 11px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.05);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(203, 213, 225, 0.5);
}

.search-results-area {
  max-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.search-results-area::-webkit-scrollbar {
  width: 6px;
}

.search-results-area::-webkit-scrollbar-track {
  background: transparent;
}

.search-results-area::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 3px;
}

.search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}

.search-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(148, 163, 184, 0.3);
  border-top-color: #0284c7;
  border-radius: 50%;
  animation: searchSpin 0.7s linear infinite;
}

@keyframes searchSpin {
  to { transform: rotate(360deg); }
}

.search-empty,
.search-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}

.search-results-list {
  padding: 8px;
}

.search-result-item {
  display: flex;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  animation: searchResultFadeIn 0.25s ease both;
}

.search-result-item:hover {
  background: rgba(15, 23, 42, 0.04);
}

@keyframes searchResultFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-result-item:nth-child(1) { animation-delay: 0ms; }
.search-result-item:nth-child(2) { animation-delay: 40ms; }
.search-result-item:nth-child(3) { animation-delay: 40ms; }
.search-result-item:nth-child(4) { animation-delay: 80ms; }
.search-result-item:nth-child(5) { animation-delay: 120ms; }
.search-result-item:nth-child(6) { animation-delay: 160ms; }
.search-result-item:nth-child(7) { animation-delay: 200ms; }
.search-result-item:nth-child(8) { animation-delay: 240ms; }

.search-result-img {
  flex-shrink: 0;
  width: 72px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(226, 232, 240, 0.5);
}

.search-result-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
  display: inline-block;
}

.search-result-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  margin: 0 0 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-excerpt {
  font-size: 12.5px;
  line-height: 1.45;
  color: #64748b;
  margin: 0 0 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-meta {
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .search-overlay {
    padding-top: 5vh;
  }
  .search-modal {
    width: 95%;
    border-radius: 20px;
  }
  .search-modal-glass {
    border-radius: 20px;
  }
  .search-result-img {
    width: 56px;
    height: 42px;
  }
}

/* ==============================================================================
   ZARZĄDZANIE API W PANELU ADMINISTRATORA
   ============================================================================== */
.api-connection-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.api-connection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 16px;
}

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

.api-info-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}

.api-url-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0f172a;
  color: #38bdf8;
  padding: 10px 14px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  overflow-x: auto;
  margin-top: 8px;
}

.api-badge-method {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.api-badge-method.get {
  background: #dcfce7;
  color: #15803d;
}

.api-badge-method.post {
  background: #dbeafe;
  color: #1d4ed8;
}

.api-badge-method.put,
.api-badge-method.patch {
  background: #f3e8ff;
  color: #7e22ce;
}

.api-badge-method.delete {
  background: #fee2e2;
  color: #b91c1c;
}

.api-badge-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.api-badge-status.s2xx {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.api-badge-status.s4xx,
.api-badge-status.s5xx {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.api-key-value-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 5px 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #0f172a;
}

.api-snippet-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.api-snippet-tab-btn {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.api-snippet-tab-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.api-snippet-tab-btn.active {
  background: #2563eb;
  color: #ffffff;
}

.api-code-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  overflow-x: auto;
  position: relative;
  white-space: pre-wrap;
  word-break: break-all;
}

.api-code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.api-code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.api-log-detail-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.api-log-detail-card {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: modalFadeIn 0.2s ease-out;
}

/* ==============================================================================
   INFINITE SCROLL — FEED STARSZYCH ARTYKUŁÓW (PORTAL & KATEGORIE)
   ============================================================================== */

.older-articles-section {
  margin-top: 50px;
  margin-bottom: 70px;
}

.infinite-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.infinite-articles-counter {
  font-size: 13px;
  color: #475569;
  background: rgba(241, 245, 249, 0.9);
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.infinite-articles-counter strong {
  color: #0f172a;
  font-weight: 700;
}

.infinite-category-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 0 26px 0;
  padding: 4px 0;
}

.infinite-filter-pill {
  padding: 7px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.infinite-filter-pill:hover:not(.active) {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.infinite-filter-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.infinite-card-item {
  animation: feedCardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes feedCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.infinite-scroll-status {
  padding: 36px 0 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 80px;
}

.infinite-loading-spinner-wrap {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  background: #ffffff;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.infinite-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(37, 99, 235, 0.15);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: infiniteSpinner 0.75s linear infinite;
}

@keyframes infiniteSpinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.infinite-end-message {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  text-align: center;
}

.btn-scroll-to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 9999px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.btn-scroll-to-top:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
}

/* ==============================================================================
   TERSEL COOKIE & PRIVACY CONSENT BANNER (MINIMALISTYCZNY, BIAŁY, NOWOCZESNY)
   ============================================================================== */
.tersel-cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 420px;
  width: calc(100% - 36px);
  z-index: 999999;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  box-shadow: 
    0 20px 40px -15px rgba(15, 23, 42, 0.12),
    0 4px 16px rgba(15, 23, 42, 0.04),
    0 0 0 1px rgba(15, 23, 42, 0.04);
  padding: 22px 24px;
  color: #0f172a;
  font-family: var(--font-main, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tersel-cookie-banner.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.tersel-cookie-banner.closing {
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
}

.cookie-banner-inner {
  display: flex;
  flex-direction: column;
}

.cookie-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cookie-header-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cookie-mini-icon {
  color: #0f172a;
  flex-shrink: 0;
}

.cookie-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.cookie-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: #64748b;
  margin: 0 0 18px 0;
}

.cookie-text strong {
  color: #0f172a;
  font-weight: 600;
}

.cookie-link {
  color: #0f172a;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.cookie-link:hover {
  color: #2563eb;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie-btn {
  flex: 1;
  height: 38px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  border: none;
}

.cookie-btn-primary {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.cookie-btn-primary:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.cookie-btn-secondary {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.cookie-btn-secondary:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

@media (max-width: 640px) {
  .tersel-cookie-banner {
    bottom: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
    padding: 18px;
    border-radius: 18px;
  }
  .cookie-actions {
    flex-direction: column;
    gap: 8px;
  }
  .cookie-btn {
    width: 100%;
  }
}



