/* ========================================
   PROJECT CASE STUDIES - STYLES
   Premium Edition 2025 | Karol Wyszynski
   ⭐ PRODUCTION READY - ALL FEATURES WORKING
   ⭐ HERO GRID: CHIPS BESIDE IMAGE + BUTTON BELOW
   ======================================== */

:root {
  --wrap-max: 1100px;
}

/* ========================================
   ACCORDION COMPONENTS
   ======================================== */

.kwcs-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  background: #fff;
  padding: 0 1.25rem;
}

.kwcs-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  background: #f8fafc;
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  border: none;
  width: 100%;
  text-align: left;
  transition: background 0.2s ease;
}

.kwcs-header:hover {
  background: #f1f5f9;
}





.kwcs-header:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

.kwcs-header .icon {
  margin-left: auto;
  font-weight: 700;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  color: #64748b;
}

.kwcs-header .num {
  font-weight: 700;
  margin-right: 10px;
  color: #0077cc;
}

.kwcs-item {
  border: 1px solid #e2e8f0;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: #fff;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.kwcs-item.open .kwcs-content {
  max-height: 2000px !important;
  padding: 1.25rem;
}

.kwcs-item.open .kwcs-header .icon {
  transform: rotate(45deg);
  color: #2563eb;
}

.kwcs-accordion {
  max-width: 900px;
  margin: 0 auto 2rem;
}

/* ========================================
   HERO SECTION
   ======================================== */

.kwcs-hero-head {
  padding: 4rem 1rem;
  text-align: center;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
}

.kwcs-hero-head .wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

.kwcs-hero-head .eyebrow {
  text-transform: uppercase;
  color: var(--color-primary, #06b6d4);
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.kwcs-hero-head h1 {
  font-family: var(--font-heading, serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  line-height: 1.2;
  color: #0f172a;
}

.kwcs-hero-head .sub {
  font-size: 1.125rem;
  color: var(--color-text-light, #64748b);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.pm-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-top: 1.75rem;
  font-size: 0.9rem;
  color: #475569;
}
.pm-hero-meta strong { color: #0f172a; font-weight: 600; }
.pm-meta-sep { color: #cbd5e1; font-size: 1rem; }
@media (max-width: 600px) {
  .pm-meta-sep { display: none; }
  .pm-hero-meta { flex-direction: column; gap: 0.4rem; }
}

.kwcs-hero-body {
  padding: 2rem 1rem;
}

.kwcs-hero-body .wrap.inner {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
}

/* ========================================
   HERO CONTENT GRID - Chipsy + Zdjęcie OBOK
   ⭐ NEW: Grid layout for side-by-side
   ======================================== */

.hero-content-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.5fr;
  gap: 2.5rem;
  align-items: flex-end;
  margin-bottom: 2rem;
}
.hero-content-grid > .hero-image:only-child { grid-column: 1 / -1; }

/* Hero image (tylko Raz Dwa) — responsywny, bez zniekształceń: plik ma proporcje
   ~1450x1306, ale zrzut ma pusty, biały dół (formularz). Kadrujemy go wizualnie
   przez aspect-ratio + object-fit:cover + object-position:top, żeby pokazać tylko
   górną, treściwą część (nagłówek, siatka kategorii, panel podsumowania) i nie
   robić niepotrzebnie wysokiego hero. Scope #case-razdwa-pelne. */
/* Podtytuł pod skróconym H2 (tylko Raz Dwa) — nosi korzyść przeniesioną
   z dawnego długiego nagłówka. Ciemniejszy i pogrubiony nad muted leadem. */
#case-razdwa-pelne .razdwa-h2-sub {
  max-width: 760px;
  margin: -0.25rem auto 1.25rem;
  text-align: center;
  color: #0f172a;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.5;
}

#case-razdwa-pelne .razdwa-tradeoff {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #475569;
}
#case-razdwa-pelne .razdwa-tradeoff strong {
  color: #0c6076;
}

#case-razdwa-pelne .ux-decision-box ul {
  margin: 0.25rem 0 0;
  padding-left: 1.15rem;
}
#case-razdwa-pelne .ux-decision-box ul li {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 0.4rem;
}
#case-razdwa-pelne .ux-decision-box ul li:last-child {
  margin-bottom: 0;
}

/* Przebieg projektu ma 6 etapów (o jeden więcej niż domyślny flow) —
   nieco więcej miejsca i węższe kolumny, żeby ostatni etap się nie ucinał. */
#case-razdwa-pelne .user-flow--6 {
  max-width: 1060px;
}
#case-razdwa-pelne .user-flow--6 .flow-step {
  min-width: 104px;
  padding: 0 0.3rem;
}

#case-razdwa-pelne .razdwa-miro { margin-bottom: 2rem; }
#case-razdwa-pelne .razdwa-miro img {
  /* Miro to dowód, że było planowanie — wystarczy podgląd ~połowy rozmiaru,
     pełny widok dostępny po kliknięciu (lightbox). width:100% + max-width
     trzyma responsywność na mobile (nie przekroczy szerokości ekranu). */
  display: block;
  width: 100%;
  max-width: 380px;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
  cursor: zoom-in;
}
#case-razdwa-pelne .razdwa-miro .img-desc {
  text-align: center;
}

#case-razdwa-pelne .kwcs-hero-body .hero-image {
  width: 100%;
  display: flex;
  justify-content: center;
}
#case-razdwa-pelne .kwcs-hero-body .hero-image .cover {
  display: block;
  width: 100%;
  max-width: 1040px;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-radius: 14px;
  box-shadow: 0 24px 60px -28px rgba(15, 23, 42, 0.32);
}

.hero-buttons-vertical {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: flex-start;
}

.hero-buttons-vertical .kwcs-chip {
  min-width: auto;
  width: 100%;
}

.kwcs-hero-body .hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.kwcs-chip {
  background: #fff;
  border: 1px solid var(--color-border, #e2e8f0);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  color: var(--color-text, #0f172a);
  text-align: center;
  line-height: 1.2;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  min-width: 200px;
}

.kwcs-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
  border-color: var(--color-primary, #06b6d4);
}

.kwcs-chip:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}



/* ========================================
   SECTIONS
   ======================================== */

.kwcs-sec {
  padding: 3rem 1rem;
}
.kwcs-sec--alt { background: #f8fafc; }

.kwcs-sec .wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.kwcs-sec h2 {
  text-align: center;
  font-family: var(--font-heading, serif);
  margin-bottom: 2rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: #0f172a;
}

.kwcs-sec h3 {
  font-family: var(--font-heading, serif);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 1.25rem;
}

.kwcs-sec p {
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: #334155;
}

.kwcs-sec ul {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.kwcs-sec ul li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
  color: #334155;
}

/* ========================================
   CARDS (3-column grid)
   ======================================== */

.kwcs-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  align-items: start;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 1rem;
  overflow: visible;
}

.kwcs-card {
  background: #fff;
  padding: 2.5rem 2rem;
  border-radius: 1.25rem;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 320px;
  position: relative;
  overflow: visible;
}

.kwcs-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px -8px rgba(6, 182, 212, 0.3);
  z-index: 10;
}

.kwcs-card:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 4px;
}

.kwcs-card h3, .kwcs-card h4 {
  font-family: var(--font-heading, serif);
  font-size: 1.5rem;
  margin: 0 0 1.5rem 0;
  color: var(--color-primary, #06b6d4);
  font-weight: 700;
}

.kwcs-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}

.kwcs-card li {
  padding-left: 1.75rem;
  position: relative;
  margin-bottom: 0.85rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #334155;
}

.kwcs-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-success, #10b981);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ========================================
   RESULT SECTION — definicja finalna niżej (~linia 905)
   ======================================== */

/* ========================================
   CTA BUTTON
   ======================================== */

/* ========================================
   CTA BUTTON - PRIMARNA AKCJA
   Inspirowany przyciskami ze strony głównej
   ======================================== */

.kwcs-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1.125rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
  margin: 1.5rem 0;
  border: none;
  cursor: pointer;
  /* Nie może przekroczyć szerokości kontenera — inaczej długi label (np.
     "Karoma — identyfikacja wizualna i sklep B2B") rozpycha stronę na mobile.
     min-width:0 pozwala tekstowi zawinąć się zamiast wypychać poza ekran. */
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  text-align: center;
}

.kwcs-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.kwcs-cta:active {
  transform: translateY(0);
}

.kwcs-cta:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

.kwcs-cta svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.kwcs-cta:hover svg {
  transform: translateX(4px);
}


/* ========================================
   GALLERY 2-COLUMN GRID
   ======================================== */

.kwcs-gallery-section {
  padding: 2rem 1rem;
  overflow: visible;
}

.kwcs-gallery-section .wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 1rem;
  overflow: visible;
}

.kwcs-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin: 2rem auto 0;
  max-width: var(--wrap-max);
  padding: 0;
  overflow: visible;
  pointer-events: auto;
}
.kwcs-gallery-grid--mb { margin-bottom: 2rem; }

.gallery-item {
  position: relative;
  overflow: visible;
  pointer-events: auto;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.5rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  cursor: zoom-in;
  position: relative;
  pointer-events: auto;
}

.gallery-item img:hover {
  transform: scale(1.05);
  z-index: 100;
}

.gallery-item .img-desc {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: #64748b;
  font-style: italic;
  line-height: 1.4;
}

/* ========================================
   LIGHTBOX MODAL
   ======================================== */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 85vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: imageZoomIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}

@keyframes imageZoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-close {
  position: fixed;
  top: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10001;
  line-height: 1;
  padding: 0;
  font-weight: 300;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  user-select: none;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1) rotate(90deg);
}

.lightbox-caption {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  max-width: 80vw;
  text-align: center;
  z-index: 10000;
  backdrop-filter: blur(12px);
  line-height: 1.5;
  pointer-events: none;
}

body.lightbox-open {
  overflow: hidden;
}

/* ========================================
   WEBSITE SHOWCASE SECTION
   ======================================== */

.kwcs-website-showcase {
  position: relative;
  overflow: visible;
  padding: clamp(50px, 8vh, 80px) 0;
  contain: none;
}

.kwcs-website-showcase::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="0.5" fill="%23cbd5e1" opacity="0.1"/><circle cx="75" cy="75" r="0.3" fill="%23cbd5e1" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
  opacity: 0.6;
  z-index: -1;
  pointer-events: none;
}

.kwcs-website-showcase .wrap {
  position: relative;
  z-index: 1;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4.5vw, 36px);
  overflow: visible;
}

.kwcs-website-showcase h2 {
  font-size: clamp(26px, 3.8vw, 34px);
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--kwcs-ink, #0f172a);
  position: relative;
  z-index: 1;
}

.kwcs-website-showcase > .wrap > p {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--kwcs-mute, #475569);
  line-height: 1.7;
  margin-bottom: clamp(40px, 6vh, 60px);
  max-width: 900px;
  position: relative;
  z-index: 1;
}

/* ========================================
   SHOWCASE STACK VIEW
   ======================================== */

.showcase-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(60px, 10vh, 100px);
  margin-top: clamp(40px, 6vh, 60px);
  animation: fadeInUp 0.5s ease;
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.showcase-section {
  animation: fadeInUp 0.5s ease;
  position: relative;
  z-index: 8;
  padding-bottom: clamp(30px, 5vh, 50px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.4);
}

.showcase-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.showcase-section h3 {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700;
  color: var(--kwcs-ink, #0f172a);
  margin-bottom: 0.75rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.showcase-section h3:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 4px;
}

.tab-description {
  font-size: 1rem;
  color: var(--kwcs-mute, #64748b);
  margin-bottom: 35px;
  font-style: italic;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Showcase row */
.showcase-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 35px;
  margin-bottom: 35px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  pointer-events: auto;
}

.showcase-item {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 5px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
  position: relative;
  z-index: 8;
  pointer-events: auto;
}

.showcase-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 50px rgba(37, 99, 235, 0.12), 0 8px 25px rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
  z-index: 10;
}

.showcase-item:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 4px;
}

.showcase-item img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  cursor: zoom-in;
  max-width: 100%;
  max-height: 450px;
  object-fit: contain;
  pointer-events: auto;
}

.showcase-item img:hover {
  transform: scale(1.05);
}

.showcase-item img:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 4px;
}

.showcase-item p {
  text-align: center;
  font-size: 0.875rem;
  color: var(--kwcs-mute, #64748b);
  margin-top: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Mobile image showcase */
.showcase-mobile {
  max-width: 260px;
  margin: 0 auto;
  justify-self: center;
  pointer-events: auto;
}

.showcase-mobile img {
  max-height: 480px;
  object-fit: contain;
  cursor: zoom-in;
  pointer-events: auto;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.showcase-mobile img:hover {
  transform: scale(1.05);
}

/* Features box */
.features-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: clamp(26px, 4.5vw, 36px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 5px 20px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 8;
  overflow: visible;
  max-width: 1100px;
  margin: 0 auto;
}

.features-box:hover {
  box-shadow: 0 16px 50px rgba(37, 99, 235, 0.12), 0 8px 25px rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
}

.features-box:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 4px;
}

.features-box h4 {
  font-size: clamp(19px, 2.8vw, 24px);
  font-weight: 700;
  color: var(--kwcs-ink, #1e293b);
  margin-bottom: clamp(20px, 3.5vh, 28px);
  background: linear-gradient(135deg, #1e293b, #475569);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 1rem;
  color: var(--kwcs-mute, #475569);
  line-height: 1.7;
}

.features-list li svg {
  width: 22px;
  height: 22px;
  stroke: #10b981;
  flex-shrink: 0;
  margin-top: 3px;
}

.features-list li strong {
  color: var(--kwcs-ink, #1e293b);
  font-weight: 600;
}
/* Context Section - Ulepszona */
.kwcs-context-section {
  padding: 4rem 1rem;
}

.context-intro {
  max-width: 820px;
  margin: 0 auto 2.5rem;
}

.context-intro p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #475569;
  margin-bottom: 1rem;
}

.scope-heading {
  text-align: center;
  font-family: var(--font-heading, serif);
  font-size: 1.75rem;
  color: #0f172a;
  margin-bottom: 2.5rem;
  font-weight: 700;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.scope-item {
  text-align: center;
  padding: 1.5rem 1rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

.scope-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.15);
}

.scope-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.scope-item p {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.5;
  margin: 0;
}

/* Logo Section - Ulepszona */
.kwcs-logo-section {
  padding: 5rem 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.logo-intro {
  max-width: 900px;
  margin: 0 auto 3rem;
}

/* Mockups Section - Więcej przestrzeni */
.kwcs-mockups-section {
  padding: 5rem 1rem;
}

.mockups-intro {
  max-width: 900px;
  margin: 0 auto 3rem;
}

/* Floating Cart Section - Większe paddingi */
.floating-cart-section {
  padding-top: 4rem !important;
  padding-bottom: 4rem !important;
  border-radius: 1.5rem;
  margin: 3rem 0;
}

/* Result Section - Ulepszona */
.kwcs-result {
  text-align: center;
  margin-top: 4rem;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 1.5rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.result-lead {
  max-width: 800px;
  margin: 0 auto 3rem;
}

.result-lead p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #475569;
  text-align: center;
  margin: 0;
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem auto;
  max-width: 1000px;
}

.result-card {
  background: #fff;
  padding: 2rem 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  text-align: center;
}

.result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.15);
}

.result-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.result-card h3, .result-card h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.result-card p {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
  text-align: center;
}

.kwcs-result .kwcs-cta {
  margin: 2.5rem auto 2rem;
  display: inline-flex;
}

.result-next {
  max-width: 800px;
  margin: 3rem auto 0;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.result-next h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
}

.result-next p {
  font-size: 1.0625rem;
  color: #475569;
  line-height: 1.8;
  text-align: center;
  margin: 0;
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

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

/* ========================================
   RESPONSYWNOŚĆ - 1024px
   ======================================== */

@media (max-width: 1024px) {
  .hero-content-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .showcase-row {
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 100%;
  }

  .showcase-item img {
    max-height: 380px;
  }

  .showcase-mobile {
    max-width: 240px;
  }

  .showcase-mobile img {
    max-height: 420px;
  }

  .showcase-section h3 {
    font-size: clamp(20px, 3vw, 26px);
  }

  .showcase-stack {
    gap: clamp(50px, 8vh, 80px);
    max-width: 100%;
  }

  .lightbox-content {
    max-width: 92vw;
    max-height: 88vh;
  }

  .lightbox-caption {
    bottom: 25px;
    padding: 12px 24px;
    font-size: 14px;
    max-width: 88vw;
  }

  .lightbox-close {
    top: 22px;
    right: 22px;
    width: 52px;
    height: 52px;
    font-size: 30px;
  }
}

/* ========================================
   RESPONSYWNOŚĆ - 900px
   ======================================== */

@media (max-width: 900px) {
  .hero-content-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .kwcs-trio {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .kwcs-card {
    min-height: 280px;
  }

  .kwcs-card:nth-child(3) {
    grid-column: 1 / 3;
    justify-self: center;
    max-width: 420px;
    margin-top: 1rem;
  }
}

/* ========================================
   RESPONSYWNOŚĆ - 768px
   ⭐ ZMIANA: Chipsy NAD zdjęciem na mobile
   ======================================== */

@media (max-width: 768px) {
  /* ZMIANA KOLEJNOŚCI: Chipsy NAD zdjęciem */
  .hero-content-grid {
    display: flex;
    flex-direction: column-reverse;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .hero-buttons-vertical {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
    order: 2;
  }

  .hero-buttons-vertical .kwcs-chip {
    width: auto;
    flex: 1;
    min-width: 140px;
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
  }

  .hero-buttons-vertical .kwcs-chip b {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
  }

  .kwcs-hero-body .hero-image {
    order: 1;
  }

  .kwcs-gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 100%;
  }

  .kwcs-hero-head {
    padding: 3rem 1rem;
  }

  .kwcs-hero-body {
    padding: 1.5rem 0.5rem;
  }

  .kwcs-hero-body .hero-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }

  .kwcs-chip {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    line-height: 1.3;
    min-width: auto;
    width: 100%;
  }

  .kwcs-chip b {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
  }

  .hero-image-cta {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    margin: 1.5rem auto 0;
  }

  .kwcs-sec {
    padding: 3rem 1rem;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox-content {
    max-width: 95vw;
    max-height: 85vh;
    border-radius: 10px;
  }

  .lightbox-caption {
    bottom: 20px;
    padding: 11px 20px;
    font-size: 13px;
    max-width: 90vw;
    border-radius: 6px;
  }

  .lightbox-close {
    top: 18px;
    right: 18px;
    width: 48px;
    height: 48px;
    font-size: 28px;
  }

  .kwcs-result {
    max-width: 100%;
    padding: 2rem 1.5rem;
  }

  .kwcs-result p {
    max-width: 100%;
    font-size: 1rem;
  }

  .kwcs-accordion {
    max-width: 100%;
  }

  .kwcs-content,
  .kwcs-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .kwcs-item.open .kwcs-content {
    padding: 1rem;
  }

  .kwcs-website-showcase {
    padding: 40px 0;
  }

  .showcase-section {
    padding-bottom: clamp(20px, 3vh, 30px);
  }

  .showcase-section h3 {
    font-size: clamp(18px, 2.8vw, 22px);
    margin-bottom: 0.5rem;
  }

  .showcase-row {
    gap: 20px;
    margin-bottom: 25px;
    max-width: 100%;
  }

  .showcase-item {
    padding: 16px;
  }

  .showcase-item img {
    max-height: 300px;
  }

  .showcase-mobile {
    max-width: 220px;
  }

  .showcase-mobile img {
    max-height: 380px;
  }

  .features-box {
    padding: 20px;
    max-width: 100%;
  }

  .features-box h4 {
    font-size: clamp(17px, 2.2vw, 20px);
    margin-bottom: 14px;
  }

  .features-list {
    gap: 12px;
  }

  .features-list li {
    font-size: 0.9rem;
  }

  .features-list li svg {
    width: 20px;
    height: 20px;
  }

  .tab-description {
    font-size: 0.9rem;
    margin-bottom: 25px;
  }

  .showcase-stack {
    gap: clamp(40px, 6vh, 60px);
    max-width: 100%;
  }
   .kwcs-context-section,
  .kwcs-logo-section,
  .kwcs-mockups-section {
    padding: 3rem 1rem;
  }

  .scope-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .floating-cart-section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
    margin: 2rem 0;
  }

  .result-cards {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2.5rem auto;
  }

  .kwcs-result {
    padding: 3rem 1.5rem;
    margin-top: 3rem;
  }

  .result-icon {
    font-size: 2.25rem;
  }


}


/* ========================================
   RESPONSYWNOŚĆ - 600px
   ======================================== */

@media (max-width: 600px) {
  .kwcs-trio {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .kwcs-card {
    padding: 2rem 1.5rem;
    min-height: auto;
  }

  .kwcs-card h3, .kwcs-card h4 {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
  }

  .kwcs-card li {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
  }

  .kwcs-card:nth-child(3) {
    grid-column: auto;
    justify-self: stretch;
    max-width: 100%;
    margin-top: 0;
  }

  .kwcs-sec {
    padding: 2.5rem 1rem;
  }

  .kwcs-hero-head {
    padding: 2.5rem 1rem;
  }

  .kwcs-hero-body {
    padding: 1rem 0;
  }

  .kwcs-hero-body .hero-buttons {
    gap: 0.4rem;
    margin-bottom: 1.5rem;
  }

  .kwcs-chip {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: 6px;
    min-width: auto;
    width: 100%;
  }

  .kwcs-chip b {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
  }

  .hero-image-cta {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
    width: 100%;
  }

  .kwcs-website-showcase {
    padding: 30px 0;
  }

  .showcase-section {
    padding-bottom: 20px;
  }

  .showcase-section h3 {
    font-size: clamp(16px, 2.5vw, 20px);
    margin-bottom: 0.4rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .showcase-row {
    gap: 15px;
    margin-bottom: 20px;
    max-width: 100%;
  }

  .showcase-item {
    padding: 12px;
  }

  .showcase-item img {
    max-height: 250px;
  }

  .showcase-item p {
    font-size: 0.75rem;
    margin-top: 8px;
  }

  .showcase-mobile {
    max-width: 180px;
  }

  .showcase-mobile img {
    max-height: 330px;
  }

  .lightbox {
    padding: 12px;
  }

  .lightbox-content {
    max-width: 96vw;
    max-height: 80vh;
    border-radius: 8px;
  }

  .lightbox-caption {
    bottom: 16px;
    padding: 10px 16px;
    font-size: 12px;
    max-width: 92vw;
  }

  .lightbox-close {
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    font-size: 24px;
  }

  .features-box {
    padding: 18px;
    max-width: 100%;
  }

  .features-list li {
    font-size: 0.85rem;
    gap: 10px;
  }

  .features-box h4 {
    font-size: clamp(15px, 2vw, 18px);
    margin-bottom: 12px;
  }

  .features-list {
    gap: 10px;
  }

  .features-list li svg {
    width: 18px;
    height: 18px;
  }

  .tab-description {
    font-size: 0.85rem;
    margin-bottom: 20px;
  }

  .showcase-stack {
    gap: 30px;
    max-width: 100%;
  }
    .scope-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .scope-item {
    padding: 1.25rem 1rem;
  }

  .scope-icon {
    font-size: 2rem;
  }

  .result-icon {
    font-size: 2rem;
  }

  .result-card {
    padding: 1.5rem 1.25rem;
  }

  .result-card h3, .result-card h4 {
    font-size: 1.125rem;
  }

  .kwcs-result {
    padding: 2.5rem 1.25rem;
    border-radius: 1rem;
  }

  .kwcs-result h2 {
    font-size: 1.75rem;
  }

  .result-next {
    padding-top: 2rem;
    margin-top: 2rem;
  }

  .result-next h3 {
    font-size: 1.25rem;
  }
}

/* ========================================
   RESPONSYWNOŚĆ - 480px
   ======================================== */

@media (max-width: 480px) {
  .showcase-item img {
    max-height: 200px;
  }

  .showcase-mobile img {
    max-height: 280px;
  }

  .showcase-item {
    padding: 10px;
  }

  .showcase-row {
    gap: 10px;
    max-width: 100%;
  }

  .showcase-stack {
    gap: 25px;
    max-width: 100%;
  }

  .showcase-section {
    padding-bottom: 15px;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .lightbox,
  .lightbox-content {
    animation: none !important;
    transition: none !important;
  }

  .lightbox-close:hover {
    transform: none !important;
  }

  .showcase-item,
  .features-box,
  .showcase-item img,
  .showcase-section {
    animation: none !important;
    transition: none !important;
  }
}

/* Print styles */
@media print {
  .lightbox,
  .kwcs-cta {
    display: none !important;
  }
}
/* ========================================
   HERO IMAGE CTA BUTTON - GRADIENT STYLE
   Przycisk poniżej zdjęcia w hero section
   ======================================== */

.hero-image-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  /* fit-content nie może przekroczyć szerokości kontenera na mobile */
  max-width: 100%;
  box-sizing: border-box;
  margin: 2rem auto 0;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
  border: none;
  cursor: pointer;
  text-align: center;
}

/* Responsywne obrazy hero w starszej strukturze case studies
   (sir-roger, voucher, cyfradruk mają <img class="cover" width="1200">).
   Scoped reguły #case-*-pelne .cover są bardziej specyficzne i wygrywają. */
.hero-image .cover,
.hero-image img {
  max-width: 100%;
  height: auto;
}

/* CTA case studies są też .kw-btn, który wymusza white-space:nowrap
   (kw-buttons.css) — długi label (np. "Karoma — identyfikacja wizualna i
   sklep B2B") zostawał w jednej linii i był ucinany przez overflow:hidden.
   Podnosimy specyficzność (.kwcs-cta.kw-btn = 0,2,0 > .kw-btn = 0,1,0),
   pozwalamy zawijać i rosnąć w pionie. overflow:hidden zostaje (przycina
   poświatę hover do zaokrąglenia). */
.kwcs-cta.kw-btn,
.hero-image-cta.kw-btn {
  white-space: normal;
  line-height: 1.25;
  height: auto;
}

.hero-image-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.hero-image-cta:active {
  transform: translateY(0);
}

.hero-image-cta:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

.hero-image-cta svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.hero-image-cta:hover svg {
  transform: translateX(3px);
}

/* Responsywność */
@media (max-width: 768px) {
  .hero-image-cta {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    margin: 1.5rem auto 0;
  }

  .hero-image-cta svg {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 600px) {
  .hero-image-cta {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
  }

  .hero-image-cta svg {
    width: 15px;
    height: 15px;
  }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

.showcase-item,
.showcase-item img,
.features-box {
  will-change: transform;
  transform-style: preserve-3d;
}
/* ==========================================================================
   RAZ DWA - CUSTOM CASE STUDY STYLES (DODATEK DO PORTFOLIO.CSS)
   ========================================================================== */

/* 1. SEKCJA STATYSTYK (Stats) */
.razdwa-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; max-width: 900px; margin: 0 auto 2rem; }
.razdwa-stat { text-align: center; padding: 1.5rem 1rem; background: #fff; border: 1px solid rgba(230,233,239,0.8); border-radius: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.razdwa-stat-num { font-size: 2rem; font-weight: 700; color: #0ea5e9; line-height: 1; margin-bottom: 0.35rem; }
.razdwa-stat-label { font-size: 0.8rem; color: #64748b; line-height: 1.3; }

/* 2. EKOSYSTEM (Diagram) */
.razdwa-ecosystem { max-width: 900px; margin: 0 auto; }
.razdwa-ecosystem-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.eco-node { background: #fff; border: 1px solid rgba(230,233,239,0.8); border-radius: 0.75rem; padding: 1.2rem; text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.eco-node-icon { font-size: 1.75rem; margin-bottom: 0.4rem; }
.eco-node-label { font-size: 0.9rem; font-weight: 600; color: #0f172a; }
.eco-node-sub { font-size: 0.8rem; color: #64748b; margin-top: 0.3rem; }
.eco-arrow { font-size: 1.5rem; color: #0ea5e9; font-weight: 700; text-align: center; }

/* 3. DECYZJE UX (Boxes) */
.ux-decision-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; max-width: 900px; margin: 2rem auto; }
.ux-decision-box { background: #fff; border: 1px solid #e2e8f0; border-left: 4px solid #0ea5e9; border-radius: 0.75rem; padding: 1.5rem; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.ux-decision-box .ux-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #0ea5e9; margin-bottom: 0.5rem; display: block; }
.ux-decision-box h3, .ux-decision-box h4 { font-size: 1rem; font-weight: 700; color: #0f172a; margin-bottom: 0.5rem; }
.ux-decision-box p { font-size: 0.875rem; color: #475569; line-height: 1.6; margin: 0; }

/* 4. USER FLOW (Ścieżka) */
.user-flow { display: flex; align-items: flex-start; gap: 0; max-width: 960px; margin: 2rem auto; overflow-x: auto; padding-bottom: 1rem; }
.flow-step { flex: 1; min-width: 120px; text-align: center; padding: 0 0.5rem; }
.flow-step-icon { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #0ea5e9, #2563eb); color: #fff; font-size: 1.25rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 0.8rem; box-shadow: 0 4px 10px rgba(37,99,235,0.2); }
.flow-step-label { font-size: 0.85rem; font-weight: 600; color: #0f172a; margin-bottom: 0.25rem; }
.flow-step-sub { font-size: 0.75rem; color: #64748b; line-height: 1.3; }
.flow-arrow { flex-shrink: 0; padding-top: 14px; color: #0ea5e9; font-size: 1.25rem; font-weight: 700; }

/* 5. ARCHITEKTURA (Warstwy) */
.arch-layers { max-width: 720px; margin: 2rem auto; display: flex; flex-direction: column; }
.arch-layer { display: grid; grid-template-columns: 140px 1fr; align-items: stretch; border: 1px solid #e2e8f0; border-bottom: none; }
.arch-layer:first-child { border-radius: 0.75rem 0.75rem 0 0; }
.arch-layer:last-child { border-bottom: 1px solid #e2e8f0; border-radius: 0 0 0.75rem 0.75rem; }
.arch-layer-label { background: linear-gradient(135deg, #0ea5e9, #2563eb); color: #fff; display: flex; align-items: center; justify-content: center; padding: 1rem; font-size: 0.85rem; font-weight: 700; text-align: center; line-height: 1.3; }
.arch-layer-content { background: #fff; padding: 1rem 1.25rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.arch-tag { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 0.375rem; padding: 0.25rem 0.6rem; font-size: 0.8125rem; font-family: 'Courier New', monospace; color: #0f172a; font-weight: 500; }
.arch-tag.highlight { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

/* 6. INTEGRACJE (Karty) */
.integration-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 960px; margin: 2rem auto; }
.int-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 1.5rem; text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.int-card-icon { font-size: 2rem; margin-bottom: 0.8rem; }
.int-card-title { font-weight: 700; font-size: 1rem; color: #0f172a; margin-bottom: 0.5rem; }
.int-card-desc { font-size: 0.875rem; color: #475569; line-height: 1.5; }
.int-card-code { font-family: 'Courier New', monospace; font-size: 0.8rem; color: #1d4ed8; background: #eff6ff; border-radius: 0.375rem; padding: 0.3rem 0.6rem; margin-top: 0.8rem; display: inline-block; }

/* 7. TESTY (Grid z listą plików) */
.test-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; max-width: 900px; margin: 2rem auto; }
.test-item { background: #fff; border: 1px solid #e2e8f0; border-left: 3px solid #10b981; border-radius: 0.75rem; padding: 1rem; }
.test-item-name { font-size: 0.8125rem; font-family: 'Courier New', monospace; color: #0f172a; font-weight: 600; margin-bottom: 0.3rem; }
.test-item-count { font-size: 0.875rem; color: #10b981; font-weight: 700; margin-bottom: 0.2rem; }
.test-item-sub { font-size: 0.75rem; color: #64748b; line-height: 1.4; }

/* showcase-stack / showcase-row / tab-description — definicje finalne wyżej (linie ~611+) */

/* 9. DEKORACJE I DIVIDERY — finalna definicja .section-divider wyżej w pliku */

/* 10. UTILITY — wspólne wzorce zamiast inline style */
.kwcs-section-lead {
  max-width: 760px;
  margin: 0 auto 2rem;
  text-align: center;
  color: #475569;
  line-height: 1.7;
  font-size: 1rem;
}
.kwcs-h3-center {
  text-align: center;
  margin-top: 2.25rem;
  margin-bottom: 1.25rem;
}
.kwcs-section-list {
  max-width: 760px;
  margin: 0 auto 2rem;
  color: #475569;
  line-height: 1.7;
  padding-left: 1.5rem;
}

.kwcs-sec .kwcs-section-lead {
  margin-bottom: 2rem;
}

/* ========================================
   SPRINT 2 — Typography utility classes
   ======================================== */
.mt-0 { margin-top: 0; }

.kwcs-result-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}
.kwcs-roadmap-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.kwcs-footnote {
  max-width: 900px;
  margin: 0 auto 1.5rem;
  font-size: 0.8125rem;
  color: #64748b;
  text-align: center;
  line-height: 1.5;
}
.kwcs-callout {
  max-width: 760px;
  margin: 2rem auto 0;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #06b6d4;
  border-radius: 0.75rem;
}
.kwcs-callout p {
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}
.kwcs-note {
  max-width: 720px;
  margin: 1rem auto 0;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: center;
}
.kwcs-section-lead--tight { margin-bottom: 1.5rem; }
.kwcs-section-lead--sm {
  font-size: 0.875rem;
  margin-top: 1rem;
  margin-bottom: 0;
}

.kwcs-text-center { text-align: center; }

.kwcs-prose {
  max-width: 760px;
  margin: 0 auto 2rem;
  color: #475569;
  line-height: 1.7;
}

.kwcs-note-italic {
  max-width: 760px;
  margin: 2rem auto 0;
  color: #475569;
  font-style: italic;
  text-align: center;
}

.kwcs-info-box {
  margin-top: 3rem;
  padding: 2rem;
  background: #f9f9f9;
  border-radius: 8px;
  text-align: center;
}
.kwcs-info-box h3 {
  margin-bottom: 1rem;
  color: #333;
}
.kwcs-info-box ul {
  list-style: none;
  padding: 0;
  color: #666;
  line-height: 1.8;
}
.kwcs-info-box p {
  margin-top: 1.5rem;
  color: #999;
  font-size: 0.875rem;
}

.kwcs-cta-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s ease;
}
.kwcs-cta-link:hover { background: #333; }

/* ==========================================================================
   RESPONSYWNOŚĆ (RAZ DWA)
   ========================================================================== */
@media (max-width: 768px) {
  .razdwa-stats { grid-template-columns: repeat(2, 1fr); }
  .razdwa-ecosystem-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .eco-arrow { transform: rotate(90deg); margin: 0.5rem 0; }
  .ux-decision-grid { grid-template-columns: 1fr; }
  .user-flow { flex-wrap: wrap; gap: 1rem; }
  .flow-arrow { display: none; }
  .integration-flow { grid-template-columns: 1fr; }
  .arch-layer { grid-template-columns: 1fr; border-bottom: 1px solid #e2e8f0; border-radius: 0.5rem !important; margin-bottom: 1rem; }
  .showcase-row { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ==========================================================================
   UI DESIGN SYSTEM SECTION  (.kwcs-ui-system)
   Reusable across all case studies — project colors via CSS custom props:
   --ui-primary, --ui-secondary, --ui-primary-hover, --ui-primary-active,
   --ui-bg-light, --ui-font-heading, --ui-font-body
   ========================================================================== */

.kwcs-ui-system {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.kwcs-ui-system h2 {
  text-align: center;
  font-family: var(--font-heading, serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.ui-system-intro {
  text-align: center;
  color: #64748b;
  font-size: 1rem;
  max-width: 580px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.ui-system-block {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
}

.ui-block-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ui-primary, #06b6d4);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  display: block;
  font-family: inherit;
}

/* ── Color palette ────────────────────── */
.ui-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
}

.ui-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.ui-swatch-color {
  width: 72px;
  height: 72px;
  border-radius: 0.875rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.ui-swatch-name {
  font-size: 0.775rem;
  font-weight: 600;
  color: #334155;
  text-align: center;
}

.ui-swatch-hex {
  font-size: 0.7rem;
  font-family: 'Courier New', monospace;
  color: #94a3b8;
}

/* ── Typography scale ─────────────────── */
.ui-type-scale {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ui-type-row {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.ui-type-row:last-child { border-bottom: none; }

.ui-type-meta {
  min-width: 185px;
  flex-shrink: 0;
}

.ui-type-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  display: block;
  margin-bottom: 0.15rem;
}

.ui-type-spec {
  font-size: 0.775rem;
  color: #64748b;
  font-family: 'Courier New', monospace;
  display: block;
}

.ui-type-sample { color: #0f172a; line-height: 1.25; }
.ui-type-sample.is-h1 { font-size: 2.5rem; font-weight: 700; font-family: var(--ui-font-heading, var(--font-heading, serif)); }
.ui-type-sample.is-h2 { font-size: 1.875rem; font-weight: 700; font-family: var(--ui-font-heading, var(--font-heading, serif)); }
.ui-type-sample.is-h3 { font-size: 1.25rem; font-weight: 600; }
.ui-type-sample.is-body { font-size: 1rem; line-height: 1.7; color: #475569; }
.ui-type-sample.is-caption { font-size: 0.8125rem; color: #94a3b8; }

/* ── Button showcase ─────────────────── */
.ui-btn-table {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ui-btn-row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.ui-btn-kind-label {
  min-width: 80px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  flex-shrink: 0;
  padding-bottom: 0.6rem;
}

.ui-btn-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.ui-btn-state-label {
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 500;
}

.ui-demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.375rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: default;
  font-family: inherit;
  line-height: 1;
  border: 2px solid transparent;
  white-space: nowrap;
  pointer-events: none;
  transition: none;
}

/* Primary states */
.ui-demo-btn.is-primary { background: var(--ui-primary, #06b6d4); color: #fff; border-color: var(--ui-primary, #06b6d4); }
.ui-demo-btn.is-primary.is-hover { background: var(--ui-primary-hover, #0891b2); border-color: var(--ui-primary-hover, #0891b2); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.18); }
.ui-demo-btn.is-primary.is-active { background: var(--ui-primary-active, #0e7490); border-color: var(--ui-primary-active, #0e7490); }
.ui-demo-btn.is-primary.is-disabled { background: var(--ui-primary, #06b6d4); border-color: var(--ui-primary, #06b6d4); opacity: 0.35; }

/* Secondary states */
.ui-demo-btn.is-secondary { background: transparent; color: var(--ui-primary, #06b6d4); border-color: var(--ui-primary, #06b6d4); }
.ui-demo-btn.is-secondary.is-hover { background: var(--ui-primary, #06b6d4); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.ui-demo-btn.is-secondary.is-active { background: var(--ui-primary-hover, #0891b2); color: #fff; border-color: var(--ui-primary-hover, #0891b2); }
.ui-demo-btn.is-secondary.is-disabled { color: #cbd5e1; border-color: #e2e8f0; opacity: 0.5; }

/* Tertiary states */
.ui-demo-btn.is-tertiary { background: transparent; color: var(--ui-primary, #06b6d4); border-color: transparent; text-decoration: underline; padding-left: 0.25rem; padding-right: 0.25rem; }
.ui-demo-btn.is-tertiary.is-hover { background: rgba(6,182,212,0.08); text-decoration: none; border-radius: 0.375rem; }
.ui-demo-btn.is-tertiary.is-active { color: var(--ui-primary-active, #0e7490); background: rgba(6,182,212,0.14); }
.ui-demo-btn.is-tertiary.is-disabled { opacity: 0.38; color: #94a3b8; text-decoration: none; }

@media (max-width: 640px) {
  .ui-system-block { padding: 1.5rem; }
  .ui-btn-row { gap: 0.6rem; }
  .ui-type-row { flex-direction: column; gap: 0.25rem; }
  .ui-type-meta { min-width: unset; }
  .ui-type-sample.is-h1 { font-size: 1.75rem; }
  .ui-type-sample.is-h2 { font-size: 1.375rem; }
}

/* ==========================================================================
   CONTRIBUTION SECTION  (.kwcs-contribution)
   Shows explicit designer/PM role breakdown per project
   ========================================================================== */

.kwcs-contribution {
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
  border-top: 1px solid #e2e8f0;
}

.kwcs-contribution h2 {
  text-align: center;
  font-family: var(--font-heading, serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.contribution-lead {
  text-align: center;
  color: #64748b;
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 2.75rem;
  line-height: 1.7;
}

.contribution-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

.contribution-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: 3px solid var(--color-primary, #06b6d4);
  border-radius: 1rem;
  padding: 1.75rem 1.5rem;
  text-align: left;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contribution-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(6, 182, 212, 0.1);
}

.contribution-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
  background: rgba(6, 182, 212, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--color-primary, #06b6d4);
}

.contribution-step {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary, #06b6d4);
  margin-bottom: 0.35rem;
  display: block;
}

.contribution-item h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
  font-family: inherit;
  line-height: 1.3;
}

.contribution-item p {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.65;
  margin: 0;
  text-align: left;
}

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


/* ============================================================
   FLOATING PROJECT NAVIGATION (Previous / Next)
   ============================================================ */
#project-floating-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
  pointer-events: auto;
  animation: pfnFadeIn 0.4s ease;
}

@keyframes pfnFadeIn {
  from { opacity: 0; transform: translate(20px, -50%); }
  to   { opacity: 1; transform: translate(0, -50%); }
}

.pfn-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  transition: all 0.25s ease;
  max-width: 240px;
  font-family: inherit;
  text-align: left;
}

.pfn-btn:hover {
  background: #06b6d4;
  border-color: #06b6d4;
  box-shadow: 0 14px 36px rgba(6, 182, 212, 0.35);
}

.pfn-btn.pfn-prev:hover { transform: translateX(-4px); }
.pfn-btn.pfn-next:hover { transform: translateX(4px); }

.pfn-btn svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.pfn-btn:hover svg { opacity: 1; }

.pfn-label {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.pfn-btn.pfn-next .pfn-label { text-align: right; }

.pfn-label small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
  margin-bottom: 2px;
  font-weight: 500;
}

.pfn-label strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tablet: smaller buttons */
@media (max-width: 1100px) and (min-width: 769px) {
  #project-floating-nav { right: 16px; gap: 10px; }
  .pfn-btn { padding: 12px 14px; max-width: 200px; }
  .pfn-label strong { font-size: 12px; }
}

/* Mobile: stick to bottom, side by side */
@media (max-width: 768px) {
  #project-floating-nav {
    top: auto;
    bottom: 16px;
    left: 16px;
    right: 16px;
    transform: none;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    animation: pfnFadeInMobile 0.4s ease;
  }
  @keyframes pfnFadeInMobile {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .pfn-btn {
    flex: 1;
    min-width: 0;
    max-width: none;
    padding: 10px 12px;
    gap: 8px;
  }
  .pfn-label small { display: none; }
  .pfn-label strong { font-size: 12px; }
  .pfn-btn.pfn-prev:hover,
  .pfn-btn.pfn-next:hover { transform: translateY(-2px); }
}

/* ========================================
   RAZDWA CASE STUDY — przeniesione z embedded <style>
   w razdwa_aplikacja.html (DOMParser gubi style z <head>)
   ======================================== */

/* Statystyki */
.razdwa-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto 2rem;
}
@media (max-width: 600px) {
  .razdwa-stats { grid-template-columns: repeat(2, 1fr); }
}
.razdwa-stat {
  text-align: center;
  padding: 1.5rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
}
.razdwa-stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: #0284c7;
  line-height: 1;
  margin-bottom: 0.35rem;
}
.razdwa-stat-label {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.3;
}

/* Ekosystem */
.razdwa-ecosystem { max-width: 900px; margin: 0 auto; }
.razdwa-ecosystem-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.eco-node {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  text-align: center;
}
.eco-node-icon { font-size: 1.75rem; margin-bottom: 0.25rem; }
.eco-node-label { font-size: 0.875rem; font-weight: 600; color: #0f172a; }
.eco-node-sub { font-size: 0.8rem; color: #64748b; margin-top: 0.2rem; }
.eco-arrow {
  font-size: 1.5rem;
  color: #0292AA;
  text-align: center;
  font-weight: 700;
}
@media (max-width: 600px) {
  .razdwa-ecosystem-row { grid-template-columns: 1fr; }
  .eco-arrow { transform: rotate(90deg); }
}

/* UX Decisions */
.ux-decision-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 2rem auto;
}
@media (max-width: 600px) {
  .ux-decision-grid { grid-template-columns: 1fr; }
}
.ux-decision-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #06b6d4;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
}
.ux-decision-box h3, .ux-decision-box h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}
.ux-decision-box p {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.6;
  text-align: left !important;
  margin: 0 0 0.5rem;
}
.ux-decision-box p:last-child { margin-bottom: 0; }
.ux-decision-box .ux-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0292AA;
  margin-bottom: 0.35rem;
}

/* User flow */
.user-flow {
  display: flex;
  align-items: flex-start;
  gap: 0;
  max-width: 960px;
  margin: 2rem auto;
  overflow-x: auto;
  padding-bottom: 1rem;
}
.flow-step { flex: 1; min-width: 130px; text-align: center; padding: 0 0.5rem; }
.flow-step-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  color: #fff; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.5rem;
}
.flow-step-label { font-size: 0.8rem; font-weight: 600; color: #0f172a; margin-bottom: 0.25rem; }
.flow-step-sub { font-size: 0.75rem; color: #64748b; line-height: 1.3; }
.flow-arrow {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  padding-top: 14px;
  color: #0292AA; font-size: 1.25rem; font-weight: 700;
}
@media (max-width: 768px) {
  .user-flow { flex-wrap: wrap; }
  .flow-arrow { display: none; }
}

/* Architektura warstw */
.arch-layers {
  max-width: 720px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.arch-layer {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: stretch;
  border: 1px solid #e2e8f0;
  border-bottom: none;
}
.arch-layer:first-child { border-radius: 0.75rem 0.75rem 0 0; }
.arch-layer:last-child { border-bottom: 1px solid #e2e8f0; border-radius: 0 0 0.75rem 0.75rem; }
.arch-layer-label {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 0.875rem 1rem;
  font-size: 0.8125rem; font-weight: 700; text-align: center;
  line-height: 1.3; letter-spacing: 0.03em;
}
.arch-layer-content {
  background: #fff;
  padding: 0.875rem 1.25rem;
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0.5rem;
}
.arch-tag {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.8125rem;
  font-family: 'Courier New', monospace;
  color: #0f172a; font-weight: 500;
}
.arch-tag.highlight { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

/* Integration flow */
.integration-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 960px;
  margin: 2rem auto;
}
@media (max-width: 700px) {
  .integration-flow { grid-template-columns: 1fr; }
}
.int-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
}
.int-card-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.int-card-title { font-weight: 700; font-size: 1rem; color: #0f172a; margin-bottom: 0.5rem; }
.int-card-desc { font-size: 0.875rem; color: #475569; line-height: 1.5; }
.int-card-code {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  margin-top: 0.5rem;
  display: inline-block;
}

/* Pokrycie testami */
.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 2rem auto;
}
.test-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #10b981;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
}
.test-item-name {
  font-size: 0.8125rem;
  font-family: 'Courier New', monospace;
  color: #0f172a; font-weight: 600;
  margin-bottom: 0.25rem;
}
.test-item-count { font-size: 0.875rem; color: #10b981; font-weight: 700; }
.test-item-sub { font-size: 0.75rem; color: #64748b; }

/* Section divider — z anchorem; scroll-margin pod sticky rail */
.section-divider {
  text-align: center;
  max-width: var(--wrap-max);
  margin: 3rem auto 1.25rem;
  padding-inline: 1rem;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.2;
  color: #0f172a;
  position: relative;
  scroll-margin-top: 80px;
}
.section-divider::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: #06b6d4;
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Sekcje z id też dostają scroll-margin */
[id^="razdwa-"] { scroll-margin-top: 80px; }

/* ========================================
   RAZDWA — Executive summary po hero
   ======================================== */
.razdwa-summary {
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
  border-top: 1px solid #e0f2fe;
  border-bottom: 1px solid #e0f2fe;
  padding: 3rem 1rem;
}
.razdwa-summary .wrap { max-width: 1100px; margin: 0 auto; }
.razdwa-summary h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  color: #0f172a;
  text-align: center;
  margin-bottom: 0.5rem;
}
.razdwa-summary-lead {
  max-width: 760px;
  margin: 0 auto 2rem;
  text-align: center;
  color: #475569;
  font-size: 1.0625rem;
  line-height: 1.7;
}
.razdwa-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}
.razdwa-summary-cell {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
}
.razdwa-summary-cell .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0292AA;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.razdwa-summary-cell .value {
  font-size: 0.95rem;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.4;
}
@media (max-width: 900px) {
  .razdwa-summary-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .razdwa-summary-grid { grid-template-columns: 1fr; }
}

/* ========================================
   RAZDWA — Chapter rail (lewa sticky sidebar)

   UWAGA: rail jest przenoszony JS-em do <body>,
   bo .project-details-container ma transform i
   tworzy containing block dla position: fixed.

   Założenia (gold standard):
   - desktop: pełna lista 14 rozdziałów widoczna od razu,
     pełne etykiety (bez timeline-kropki), bez scrollowania
     wewnątrz railu w typowym viewport,
   - klik dowolnego rozdziału, w tym środkowego, działa od razu
     (scrollIntoView na targecie w body),
   - rail nie nachodzi na content (sekcja RAZDWA dostaje
     padding-left na ≥1280px) ani na floating prev/next nav po prawej,
   - mobile (≤1100px) — fixed top bar z poziomym scrollem pigułek.
   ======================================== */
.razdwa-chapter-rail {
  position: fixed;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 0.75rem 0.7rem;
  margin: 0;
  width: 180px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 18px 48px -16px rgba(15, 23, 42, 0.22);
  pointer-events: auto;
}
.razdwa-chapter-rail-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0292AA;
  font-weight: 700;
  padding: 0.15rem 0.45rem 0.5rem;
  margin: 0 0 0.4rem;
  border-bottom: 1px solid #f1f5f9;
}
.razdwa-chapter-rail-list {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.15rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.razdwa-chapter-rail-list li { margin: 0; }
.razdwa-chapter-rail-list li::before { content: none !important; }
/* Reset timeline pseudo-elementu z poprzedniej iteracji */
.razdwa-chapter-rail-list::before { content: none !important; }
.razdwa-chapter-link {
  display: block;
  background: transparent;
  border: 1px solid transparent;
  color: #4a5568;
  font-size: 0.775rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.005em;
  padding: 0.35rem 0.6rem;
  border-radius: 0.45rem;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  white-space: normal;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
/* Reset kropki-markera z poprzedniej iteracji timeline */
.razdwa-chapter-link::before { content: none !important; }
.razdwa-chapter-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.razdwa-chapter-link:focus-visible {
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
}
.razdwa-chapter-link.is-active {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
  font-weight: 600;
}

/* ── L2 (podsekcje) — wcięcie, mniejszy font, strzałka-marker, lżejszy akcent ── */
.razdwa-chapter-link[data-rail-level="2"] {
  padding-left: 1.6rem;
  font-size: 0.715rem;
  font-weight: 400;
  color: #64748b;
  position: relative;
}
/* Strzałka-marker (›) — override globalnego resetu content: none !important */
.razdwa-chapter-link[data-rail-level="2"]::before {
  content: "›" !important;
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  transition: color 0.15s ease;
}
.razdwa-chapter-link[data-rail-level="2"]:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.razdwa-chapter-link[data-rail-level="2"]:hover::before { color: #0292AA; }
/* L2 aktywny — sam akcent koloru, bez wypełnienia tła
   (żeby L1 aktywny zawsze miał silniejszy sygnał wizualny niż L2) */
.razdwa-chapter-link[data-rail-level="2"].is-active {
  background: transparent;
  border-color: transparent;
  color: #0284c7;
  font-weight: 600;
}
.razdwa-chapter-link[data-rail-level="2"].is-active::before { color: #0284c7; }

/* Full-bleed kontenera RAZDWA — pełna szerokość viewportu w OBU kontekstach
   (standalone i #case-viewer w portfolio.html, gdzie .project-content ma własny
   padding). Bez tego tła kolorowych sekcji sięgały tylko krawędzi kontenera,
   nie viewportu — z lewej (gdzie pływa fixed rail) zostawał biały pas.
   margin: calc(50% - 50vw) => kontener [0, vw] niezależnie od kontekstu.
   Wzorzec spójny z #case-karoma-pelne / #case-power-of-mind-pelne. */
#case-razdwa-pelne {
  max-width: none !important;
  width: auto;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Desktop ≥1280px — szerszy rail, content RAZDWA odsunięty w prawo,
   żeby rail nie nachodził na sekcje przy max-width 1200 wycentrowanych */
@media (min-width: 1280px) {
  .razdwa-chapter-rail {
    width: 172px;
    padding: 0.8rem 0.7rem;
  }
  .razdwa-chapter-link {
    font-size: 0.79rem;
    padding: 0.38rem 0.65rem;
  }
  /* Odsuń content RAZDWA za rail (16 + ~196 wizualnie + gap) i poszerz kolumnę,
     żeby treść dosunęła się w lewo i zmniejszył się prawy margines */
  #case-razdwa-pelne { padding-left: 216px; --wrap-max: 1240px; }
  /* Full-bleed kolorowych sekcji: cofamy padding kontenera (216) marginesem,
     żeby tło sięgało lewej krawędzi ekranu (rail pływa nad tłem).
     Kompensujący padding-left utrzymuje treść w tej samej kolumnie. */
  #case-razdwa-pelne > .razdwa-summary,
  #case-razdwa-pelne > .kwcs-sec--alt {
    margin-left: -216px;
    padding-left: calc(216px + 1rem);
  }
}

/* Laptop 1101-1279px — węższy rail, mniejszy margin contentu */
@media (min-width: 1101px) and (max-width: 1279px) {
  .razdwa-chapter-rail {
    width: 150px;
    padding: 0.6rem 0.55rem;
  }
  .razdwa-chapter-link {
    font-size: 0.74rem;
    padding: 0.32rem 0.5rem;
  }
  #case-razdwa-pelne { padding-left: 184px; --wrap-max: 1120px; }
  #case-razdwa-pelne > .razdwa-summary,
  #case-razdwa-pelne > .kwcs-sec--alt {
    margin-left: -184px;
    padding-left: calc(184px + 1rem);
  }
}

/* Tablet i mobile ≤1100px — fixed top bar z poziomym scrollem pigułek */
@media (max-width: 1100px) {
  .razdwa-chapter-rail {
    left: 12px;
    right: 12px;
    top: 12px;
    transform: none;
    width: auto;
    max-width: none;
    max-height: none;
    padding: 0.55rem 0.7rem;
    border-radius: 0.7rem;
  }
  .razdwa-chapter-rail-label { display: none; }
  .razdwa-chapter-rail-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.35rem;
  }
  .razdwa-chapter-link {
    flex-shrink: 0;
    white-space: nowrap;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    color: #0f172a;
  }
  .razdwa-chapter-link:hover {
    background: #06b6d4;
    border-color: #06b6d4;
    color: #fff;
  }
  /* Mobile L2 — mniejsza pigułka, słabszy kontrast (bez wcięcia, bo top bar
     jest horyzontalny — wcięcie nie ma sensu, hierarchia przez rozmiar) */
  .razdwa-chapter-link[data-rail-level="2"] {
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    background: #f8fafc;
    color: #64748b;
  }
  .razdwa-chapter-link[data-rail-level="2"]::before { content: none !important; }
  .razdwa-chapter-link[data-rail-level="2"].is-active {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #bae6fd;
  }
  /* Mobile top bar nie wymaga marginesu sekcji */
  #case-razdwa-pelne { padding-left: 0; }
}

/* Bardzo niskie wysokości viewportu — pełny pion + scroll wewnątrz railu */
@media (min-width: 1101px) and (max-height: 720px) {
  .razdwa-chapter-rail {
    top: 12px;
    bottom: 12px;
    transform: none;
    max-height: calc(100vh - 24px);
  }
}

/* ========================================
   KW-Design — chapter rail timeline (zachowane bez zmian z PR #50)
   ======================================== */
.kwcs-chapter-rail-list {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.15rem;
  list-style: none;
  padding: 0;
  margin: 0;
  pointer-events: auto;
}
@media (min-width: 1280px) {
  .kwcs-chapter-rail {
    left: max(0.85rem, calc(50vw - 820px));
    max-width: 240px;
    width: 240px;
    padding: 5.5rem 0.5rem 4rem;
  }
  .kwcs-chapter-rail-label { display: block; }
  .kwcs-chapter-rail-list::before { left: 0.7rem; }
  .kwcs-chapter-link {
    font-size: 0.82rem;
    padding: 0.25rem 0.6rem 0.25rem 0.3rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .kwcs-chapter-link.is-active {
    background: rgba(236, 254, 255, 0.95);
    border-color: #a5f3fc;
  }
}
@media (max-height: 560px) {
  .kwcs-chapter-rail { overflow-y: auto; }
  .kwcs-chapter-rail-list { justify-content: flex-start; gap: 0.4rem; }
  .kwcs-chapter-rail-list::before { bottom: auto; height: 100%; }
}

/* Lightbox aktywny — chowamy oba raile, żeby nie zasłaniały zdjęcia */
body.lightbox-open .razdwa-chapter-rail,
body.lightbox-open .kwcs-chapter-rail { display: none; }

/* ========================================
   RAZDWA — Contribution grid
   ======================================== */

/* Eyebrow nad h2 sekcji "Moja rola" — sygnał kategorii sekcji */
.razdwa-contribution-eyebrow {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0292AA;
  margin-bottom: 0.5rem;
  text-align: center;
}

.contribution-grid--razdwa {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 1100px;
  margin: 2rem auto;
}
.contribution-cell {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem 1.4rem;
  border-top: 4px solid #06b6d4;
}
.contribution-cell.contribution-cell--solo { border-top-color: #0284c7; }
.contribution-cell.contribution-cell--shared { border-top-color: #10b981; }
.contribution-cell.contribution-cell--external { border-top-color: #f59e0b; }
.contribution-cell h3, .contribution-cell h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.contribution-cell h3 .dot, .contribution-cell h4 .dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
}
.contribution-cell--solo h3, .contribution-cell--solo h4 { color: #0284c7; }
.contribution-cell--shared h3, .contribution-cell--shared h4 { color: #10b981; }
.contribution-cell--external h3, .contribution-cell--external h4 { color: #f59e0b; }
.contribution-cell ul {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
}
.contribution-cell li {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 0.35rem;
}
.contribution-cell li::before { content: none !important; }
@media (max-width: 900px) {
  .contribution-grid--razdwa { grid-template-columns: 1fr; }
}

/* ========================================
   RAZDWA — System UI (design tokens projektu)
   ======================================== */
.razdwa-systemui {
  max-width: 1100px;
  margin: 2rem auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .razdwa-systemui { grid-template-columns: 1fr; }
}
.systemui-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem 1.4rem;
}
.systemui-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.85rem;
}
.systemui-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.systemui-swatch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.3rem 0.6rem 0.3rem 0.35rem;
}
.systemui-swatch-color {
  width: 28px; height: 28px;
  border-radius: 0.375rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}
.systemui-swatch-meta { line-height: 1.2; }
.systemui-swatch-name { font-size: 0.75rem; color: #0f172a; font-weight: 600; }
.systemui-swatch-code {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  color: #64748b;
}
.systemui-typo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}
.systemui-typo-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.4rem 0.6rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}
.systemui-typo-sample { color: #0f172a; min-width: 90px; }
.systemui-typo-sample.is-display { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; }
.systemui-typo-sample.is-heading { font-family: 'Inter', sans-serif; font-size: 1.05rem; font-weight: 700; }
.systemui-typo-sample.is-body { font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 400; }
.systemui-typo-sample.is-mono { font-family: 'Courier New', monospace; font-size: 0.85rem; color: #1d4ed8; }
.systemui-typo-meta {
  font-size: 0.75rem;
  color: #64748b;
}
.systemui-components {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.systemui-components .arch-tag { font-size: 0.75rem; }

/* ========================================
   ASSET MISSING — placeholder dla brakujących obrazów
   Pokazuje nazwę pliku zamiast szarego rectangle.
   ======================================== */
.asset-missing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 200px;
  background: repeating-linear-gradient(
    45deg,
    #fef3c7,
    #fef3c7 10px,
    #fde68a 10px,
    #fde68a 20px
  );
  border: 2px dashed #d97706;
  border-radius: 0.75rem;
  padding: 1.5rem 1rem;
  text-align: center;
  color: #78350f;
  font-size: 0.85rem;
  line-height: 1.4;
}
.asset-missing-icon { font-size: 2rem; line-height: 1; }
.asset-missing-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
}
.asset-missing-filename {
  display: inline-block;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d97706;
  padding: 0.3rem 0.7rem;
  border-radius: 0.4rem;
  font-family: 'Courier New', Courier, monospace;
  color: #78350f;
  font-weight: 700;
  font-size: 0.85rem;
  word-break: break-all;
  max-width: 100%;
}

/* ========================================
   KWCS-SUMMARY — uniwersalne klasy executive summary
   (paralela do .razdwa-summary; do reuse dla każdego case study)
   ======================================== */
.kwcs-summary {
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
  border-top: 1px solid #e0f2fe;
  border-bottom: 1px solid #e0f2fe;
  padding: 3rem 1rem;
}
.kwcs-summary .wrap { max-width: 1100px; margin: 0 auto; }
.kwcs-summary h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  color: #0f172a;
  text-align: center;
  margin-bottom: 0.5rem;
}
.kwcs-summary-lead {
  max-width: 760px;
  margin: 0 auto 2rem;
  text-align: center;
  color: #475569;
  font-size: 1.0625rem;
  line-height: 1.7;
}
.kwcs-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}
.kwcs-summary-cell {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
}
.kwcs-summary-cell .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0292AA;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.kwcs-summary-cell .value {
  font-size: 0.95rem;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.4;
}
@media (max-width: 900px) {
  .kwcs-summary-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .kwcs-summary-grid { grid-template-columns: 1fr; }
}

/* Dodatkowa klasa pomocnicza dla "Kontekst decyzji" pod główną decyzją */
.ux-decision-box .ux-context {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-left: 3px solid #06b6d4;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #475569;
}
.ux-decision-box .ux-context strong { color: #0f172a; }

/* ============================================================
   RAZ DWA DRUK — scoped visual polish (1 pass)
   Wszystko pod #case-razdwa-pelne. Zero edycji globalnych klas —
   nie wpływa na pozostałe case studies.
   ============================================================ */

/* 2 · Ujednolicony akcent: cyan #06b6d4 w całym case study.
   .razdwa-stat-num był jedynym elementem na #0ea5e9 (rozjazd z
   summary / divider / callout, które używają #06b6d4). */
#case-razdwa-pelne .razdwa-stat-num { color: #0292AA; }

/* 3 · Pojedyncze obrazy nie zostawiają pustej połowy rzędu.
   Modyfikatory dodane tylko na blokach 1-obrazkowych w HTML;
   galerie wieloobrazowe (bez --single) zachowują się jak dotąd. */
#case-razdwa-pelne .kwcs-gallery-grid--single {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}
#case-razdwa-pelne .showcase-row--single {
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
}

/* 4 · Rytm pionowy: tytuł sekcji (.section-divider) bliżej własnej
   treści. Globalnie gap title->content wynosił ~4.25rem
   (divider margin-bottom 1.25 + .kwcs-sec padding-top 3). */
#case-razdwa-pelne .section-divider + .kwcs-sec { padding-top: 1.25rem; }

#case-razdwa-pelne .section-divider + .kwcs-context-section { padding-top: 4rem; }

/* 6 · Podpisy pod obrazami — spójne w całym case study (bez italic,
   jednolity rozmiar/kolor/wyśrodkowanie). */
#case-razdwa-pelne .gallery-item .img-desc,
#case-razdwa-pelne .showcase-item p {
  font-style: normal;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
  text-align: center;
}

/* 7 · Trio grid: 3-kolumnowy układ na desktop dla galerii z 3 screenshotami. */
#case-razdwa-pelne .kwcs-gallery-grid--trio {
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 900px) {
  #case-razdwa-pelne .kwcs-gallery-grid--trio {
    grid-template-columns: repeat(2, 1fr);
  }
  #case-razdwa-pelne .kwcs-gallery-grid--trio .gallery-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 480px;
    margin-inline: auto;
  }
}
@media (max-width: 600px) {
  #case-razdwa-pelne .kwcs-gallery-grid--trio {
    grid-template-columns: 1fr;
  }
  #case-razdwa-pelne .kwcs-gallery-grid--trio .gallery-item:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: 100%;
    margin-inline: 0;
  }
}

/* ============================================================
   RAZ DWA — UX/UI cleanup pass 2
   ============================================================ */

/* 1 · Rezultat projektu — zredukowane whitespace */
#case-razdwa-pelne .kwcs-result {
  margin-top: 0;
  padding: 2.5rem 2rem;
}
#case-razdwa-pelne .result-lead {
  margin-bottom: 2rem;
}

/* 2 · Ekosystem solo row — ostatni węzeł wycentrowany */
.razdwa-ecosystem-row--solo {
  display: flex;
  justify-content: center;
}
.razdwa-ecosystem-row--solo .eco-node {
  max-width: calc(50% - 0.5rem);
  width: 100%;
}
@media (max-width: 600px) {
  .razdwa-ecosystem-row--solo .eco-node {
    max-width: 100%;
  }
}

/* 3 · Gridy 3-elementowe — 2+1 centered */
.ux-decision-grid--trio .ux-decision-box:last-child {
  grid-column: 1 / -1;
  max-width: calc(50% - 0.75rem);
  margin-inline: auto;
}
@media (max-width: 768px) {
  .ux-decision-grid--trio .ux-decision-box:last-child {
    grid-column: auto;
    max-width: 100%;
    margin-inline: 0;
  }
}

/* 4 · Za co odpowiadałem — full-width premium role layout */
#case-razdwa-pelne .contribution-cell--solo {
  grid-column: 1 / -1;
  max-width: 820px;
  margin-inline: auto;
  padding: 2rem 2.5rem;
  display: grid;
  grid-template-columns: minmax(160px, 200px) 1fr;
  gap: 0 3rem;
  align-items: start;
}
#case-razdwa-pelne .contribution-cell--solo h3 {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.4;
  padding-top: 0.125rem;
}
#case-razdwa-pelne .contribution-cell--solo ul {
  margin: 0;
  padding-left: 1.1rem;
}
#case-razdwa-pelne .contribution-cell--solo li {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
@media (max-width: 768px) {
  #case-razdwa-pelne .contribution-cell--solo {
    grid-template-columns: 1fr;
    max-width: 600px;
    padding: 1.5rem;
  }
  #case-razdwa-pelne .contribution-cell--solo h3 {
    margin-bottom: 0.75rem;
  }
}

/* ============================================================
   RAZ DWA — UX/UI cleanup pass 3
   ============================================================ */

/* 1 · Za co odpowiadałem — domknięcie sekcji Kontekst */
#case-razdwa-pelne .contribution-grid--razdwa {
  margin-top: 0.75rem;
}

/* 2 · Trio gridy — 3 równe kolumny na desktopie */
.ux-decision-grid--trio {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1100px;
  gap: 1.25rem;
}
.ux-decision-grid--trio .ux-decision-box:last-child {
  grid-column: auto;
  max-width: 100%;
  margin-inline: 0;
}
@media (max-width: 900px) {
  .ux-decision-grid--trio {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    gap: 1.5rem;
  }
  .ux-decision-grid--trio .ux-decision-box:last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 0.75rem);
    margin-inline: auto;
  }
}
@media (max-width: 600px) {
  .ux-decision-grid--trio {
    grid-template-columns: 1fr;
  }
  .ux-decision-grid--trio .ux-decision-box:last-child {
    grid-column: auto;
    max-width: 100%;
    margin-inline: 0;
  }
}

/* 3 · Ekosystem solo — wyrównanie szerokości węzła */
.razdwa-ecosystem-row--solo .eco-node {
  max-width: calc(50% - 1.5rem);
}

/* 4 · Rezultat — przewidywalny 3-col zamiast auto-fit */
#case-razdwa-pelne .result-cards {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 768px) {
  #case-razdwa-pelne .result-cards {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   BREADCRUMB — case study nav back to portfolio
   Używany w karoma.html i kolejnych case studies
   ======================================== */
.kwcs-breadcrumb {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
}
.kwcs-breadcrumb .wrap {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.kwcs-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  font-size: 0.9rem;
  color: #0284c7;
  cursor: pointer;
  font-weight: 500;
  padding: 0;
  text-decoration: none;
  transition: color 0.2s;
}
.kwcs-back-btn:hover { color: #0369a1; }
.kwcs-breadcrumb-sep { color: #94a3b8; font-size: 0.9rem; }
.kwcs-breadcrumb-current { font-size: 0.9rem; color: #64748b; }

/* ========================================
   #CASE-KAROMA-PELNE — scoped overrides
   Dopasowanie spacingu i layoutu do wzorca RazDwa
   ======================================== */
#case-karoma-pelne .section-divider + .kwcs-sec { padding-top: 1.25rem; }

#case-karoma-pelne .result-cards {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 768px) {
  #case-karoma-pelne .result-cards {
    grid-template-columns: 1fr;
  }
}

#case-karoma-pelne .kwcs-sec--alt .kwcs-trio { margin-top: 1.5rem; }

/* "Za co odpowiadałem" — domknięcie kompozycji: full-width w 3-col gridzie,
   max-width dopasowany do szerokości ux-decision-grid powyżej */
#case-karoma-pelne .contribution-cell--solo {
  grid-column: 1 / -1;
  max-width: 900px;
  margin-inline: auto;
}

/* Chapter rail — subtelniejszy, nie konkuruje z treścią */
#karoma-chapter-rail {
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.07);
  border-color: #edf0f4;
  background: rgba(255, 255, 255, 0.90);
}
#karoma-chapter-rail .razdwa-chapter-rail-label {
  color: #94a3b8;
}

/* ========================================
   #CASE-KAROMA-PELNE — layout: kompensacja fixed railu + hero image
   Analogicznie do #case-razdwa-pelne. Fixed .razdwa-chapter-rail nachodzi
   na treść, jeśli kontener case'a nie dostanie padding-left. Hero image ma
   realne proporcje 1144x975 (atrybuty w HTML skorygowane), więc contain nie
   letterboxuje. Scope #case-karoma-pelne — nie rusza innych case studies.
   ======================================== */
#case-karoma-pelne .kwcs-hero-body .hero-image {
  width: 100%;
  display: flex;
  justify-content: center;
}
#case-karoma-pelne .kwcs-hero-body .hero-image .cover {
  display: block;
  width: 100%;
  max-width: 860px;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 24px 60px -28px rgba(15, 23, 42, 0.32);
}

/* Podtytuł H2 — wyśrodkowany pod tytułem (section-divider jest center).
   Karoma nie miała tej reguły, więc podtytuły renderowały się do lewej. */
#case-karoma-pelne .razdwa-h2-sub {
  max-width: 760px;
  margin: -0.25rem auto 1.25rem;
  text-align: center;
  color: #0f172a;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.5;
}

/* Kontener rozciągnięty na pełną szerokość viewportu w OBU kontekstach
   (standalone i #case-viewer w portfolio.html, gdzie .project-content ma
   własny padding). Bez tego full-bleed sekcji sięgał tylko krawędzi
   kontenera, nie viewportu — w portfolio zostawał biały pas z lewej.
   margin: calc(50% - 50vw) => kontener [0, vw] niezależnie od kontekstu. */
#case-karoma-pelne {
  /* index-styles.css (ładowany w portfolio) ma section{max-width:100%!important;
     width:100%}, co capuje kontener do szerokości rodzica i blokuje full-bleed.
     Nadpisujemy: !important + width:auto, żeby marginesy rozciągnęły go do vw. */
  max-width: none !important;
  width: auto;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Desktop ≥1280px — content odsunięty w prawo za fixed rail, szersza kolumna */
@media (min-width: 1280px) {
  #case-karoma-pelne { padding-left: 216px; --wrap-max: 1240px; }
  /* Full-bleed kolorowych sekcji: cofamy padding kontenera (216) marginesem,
     żeby tło sięgało lewej krawędzi treści strony (rail pływa nad tłem).
     Kompensujący padding-left utrzymuje treść w tym samym miejscu. */
  #case-karoma-pelne > .razdwa-summary,
  #case-karoma-pelne > .kwcs-sec--alt,
  #case-karoma-pelne > .kwcs-logo-section {
    margin-left: -216px;
    padding-left: calc(216px + 1rem);
  }
}
/* Laptop 1101-1279px — węższy rail, mniejszy margines */
@media (min-width: 1101px) and (max-width: 1279px) {
  #case-karoma-pelne { padding-left: 184px; --wrap-max: 1120px; }
  #case-karoma-pelne > .razdwa-summary,
  #case-karoma-pelne > .kwcs-sec--alt,
  #case-karoma-pelne > .kwcs-logo-section {
    margin-left: -184px;
    padding-left: calc(184px + 1rem);
  }
}
/* Tablet i mobile ≤1100px — rail jako górny pasek, bez marginesu bocznego.
   Sekcje są już pełnej szerokości, więc full-bleed nie jest potrzebny. */
@media (max-width: 1100px) {
  #case-karoma-pelne { padding-left: 0; }
}

/* Rezultat bez pływającej karty — zdejmujemy tło/radius/shadow/max-width,
   żeby sekcja była pełnowymiarowa i centrowała treść w tej samej kolumnie
   .wrap co reszta sekcji (spójne wyśrodkowanie). text-align:center zostaje.
   display:block + border/backdrop:none neutralizują kolizję z portfolio.css
   (.kwcs-result{display:flex;border;backdrop-filter} — inny komponent o tej
   samej nazwie klasy, ładowany tylko w portfolio, powodował shrink-wrap tytułu). */
#case-karoma-pelne .kwcs-result {
  display: block;
  background: none;
  border: none;
  backdrop-filter: none;
  border-radius: 0;
  box-shadow: none;
  max-width: none;
  margin: 0;
  padding: 0;
}
/* portfolio.css:800 .kwcs-result p{font-weight:600} pogrubiał tekst kart/leada
   tylko w portfolio — reset do normalnej wagi (jak w standalone). */
#case-karoma-pelne .kwcs-result p { font-weight: 400; }
/* portfolio.css .kwcs-card{border;backdrop-filter} dawał kartom Wniosków border
   i blur tylko w portfolio — neutralizacja do stanu standalone. */
#case-karoma-pelne .kwcs-card { border: none; backdrop-filter: none; }

/* Hero CTA na mobile ma width:100% + padding — bez border-box padding wychodzi
   poza kontener (~16px overflow na 390px). Fix jak w RazDwa. */
#case-karoma-pelne .hero-image-cta {
  box-sizing: border-box;
  max-width: 100%;
}

/* ========================================
   #CASE-KAROMA-PELNE — blok zaproszenia (CTA końcowe) + slot cytatu
   Odpowiednik bloku #case-razdwa-pelne. Scope karoma — nie rusza innych.
   ======================================== */
#case-karoma-pelne .result-invite {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  text-align: center;
}
#case-karoma-pelne .result-invite h3 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 0 0 0.75rem;
  color: #0f172a;
}
#case-karoma-pelne .result-invite p {
  max-width: 640px;
  margin: 0 auto 0.5rem;
  color: #475569;
}
#case-karoma-pelne .result-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
/* neutralizacja margin:auto z .kwcs-result .kwcs-cta, ktory w flexie
   rozpychal przyciski na krawedzie */
#case-karoma-pelne .result-invite-actions .kwcs-cta {
  margin: 0.5rem 0;
}
#case-karoma-pelne .kwcs-cta--ghost {
  background: transparent;
  color: #0284c7;
  box-shadow: none;
  border: 1px solid #0284c7;
}
#case-karoma-pelne .kwcs-cta--ghost:hover {
  background: rgba(2, 132, 199, 0.08);
  box-shadow: none;
}

/* Gotowy styl dla cytatu klienta — aktywny po odkomentowaniu slotu w HTML */
#case-karoma-pelne .razdwa-quote {
  margin: 2.5rem auto 0;
  max-width: 720px;
  padding: 1.75rem 2rem;
  border-left: 4px solid #06b6d4;
  background: rgba(6, 182, 212, 0.07);
  border-radius: 0 0.75rem 0.75rem 0;
}
#case-karoma-pelne .razdwa-quote blockquote {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  line-height: 1.6;
  font-style: italic;
  color: #0f172a;
}
#case-karoma-pelne .razdwa-quote figcaption {
  font-weight: 600;
  color: #334155;
}

/* ========================================
   #CASE-POWER-OF-MIND-PELNE — scoped overrides
   Wdrożenie wzorca RazDwa/Karoma pod nowy slug. Paleta marki:
   indygo #4f46e5 (primary) + cyan #06b6d4 (akcent). Scope
   #case-power-of-mind-pelne — nie rusza innych case studies.
   ======================================== */
#case-power-of-mind-pelne .section-divider + .kwcs-sec { padding-top: 1.25rem; }

#case-power-of-mind-pelne .result-cards {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 768px) {
  #case-power-of-mind-pelne .result-cards {
    grid-template-columns: 1fr;
  }
}

#case-power-of-mind-pelne .kwcs-sec--alt .kwcs-trio { margin-top: 1.5rem; }

/* "Za co odpowiadałem" — full-width w 3-col gridzie, wyśrodkowany */
#case-power-of-mind-pelne .contribution-cell--solo {
  grid-column: 1 / -1;
  max-width: 900px;
  margin-inline: auto;
}

/* Stat-num na cyan akcent marki (spójnie z RazDwa/Karoma) */
#case-power-of-mind-pelne .razdwa-stat-num { color: #0292AA; }

/* Chapter rail — subtelniejszy, nie konkuruje z treścią */
#pom-chapter-rail {
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.07);
  border-color: #edf0f4;
  background: rgba(255, 255, 255, 0.90);
}
#pom-chapter-rail .razdwa-chapter-rail-label {
  color: #94a3b8;
}

/* Hero image — plik ma proporcje 1573x1383, ale pod przyciskiem "Dowiedz się
   więcej o mnie" zostaje pusty margines. Kadrujemy przez aspect-ratio +
   object-fit:cover + object-position:top, jak w #case-KW-Design-pelne. */
#case-power-of-mind-pelne .kwcs-hero-body .hero-image {
  width: 100%;
  display: flex;
  justify-content: center;
}
#case-power-of-mind-pelne .kwcs-hero-body .hero-image .cover {
  display: block;
  width: 100%;
  max-width: 860px;
  height: auto;
  aspect-ratio: 1573 / 1260;
  object-fit: cover;
  object-position: top;
  border-radius: 14px;
  box-shadow: 0 24px 60px -28px rgba(15, 23, 42, 0.32);
}

/* Podtytuł H2 — wyśrodkowany pod tytułem (section-divider jest center) */
#case-power-of-mind-pelne .razdwa-h2-sub {
  max-width: 760px;
  margin: -0.25rem auto 1.25rem;
  text-align: center;
  color: #0f172a;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.5;
}

/* Kontener rozciągnięty na pełną szerokość viewportu w OBU kontekstach
   (standalone i #case-viewer w portfolio.html, gdzie .project-content ma
   własny padding). Bez tego full-bleed sekcji sięgał tylko krawędzi
   kontenera, nie viewportu — zostawał biały pas i efekt "kontener w
   kontenerze". margin: calc(50% - 50vw) => kontener [0, vw] niezależnie
   od kontekstu. Wzorzec z #case-karoma-pelne. */
#case-power-of-mind-pelne {
  /* index-styles.css (ładowany w portfolio) ma section{max-width:100%!important;
     width:100%}, co capuje kontener do szerokości rodzica i blokuje full-bleed.
     Nadpisujemy: !important + width:auto, żeby marginesy rozciągnęły go do vw. */
  max-width: none !important;
  width: auto;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Desktop ≥1280px — content odsunięty za fixed rail + full-bleed teł */
@media (min-width: 1280px) {
  #case-power-of-mind-pelne { padding-left: 216px; --wrap-max: 1240px; }
  #case-power-of-mind-pelne > .razdwa-summary,
  #case-power-of-mind-pelne > .kwcs-sec--alt,
  #case-power-of-mind-pelne > .kwcs-logo-section {
    margin-left: -216px;
    padding-left: calc(216px + 1rem);
  }
}
/* Laptop 1101-1279px — węższy rail, mniejszy margines */
@media (min-width: 1101px) and (max-width: 1279px) {
  #case-power-of-mind-pelne { padding-left: 184px; --wrap-max: 1120px; }
  #case-power-of-mind-pelne > .razdwa-summary,
  #case-power-of-mind-pelne > .kwcs-sec--alt,
  #case-power-of-mind-pelne > .kwcs-logo-section {
    margin-left: -184px;
    padding-left: calc(184px + 1rem);
  }
}
/* Tablet i mobile ≤1100px — rail jako górny pasek, bez marginesu bocznego */
@media (max-width: 1100px) {
  #case-power-of-mind-pelne { padding-left: 0; }
}

/* Hero CTA na mobile — box-sizing, żeby padding nie dawał overflow na 390px */
#case-power-of-mind-pelne .hero-image-cta {
  box-sizing: border-box;
  max-width: 100%;
}

/* Rezultat bez pływającej karty — zdejmujemy tło/radius/shadow/border,
   żeby sekcja centrowała treść w tej samej kolumnie .wrap co reszta.
   display:block neutralizuje kolizję z portfolio.css (.kwcs-result{
   display:flex;border;backdrop-filter} — inny komponent o tej samej nazwie
   klasy, ładowany tylko w portfolio, shrink-wrapował tytuł do lewej). */
#case-power-of-mind-pelne .kwcs-result {
  display: block;
  background: none;
  border: none;
  backdrop-filter: none;
  border-radius: 0;
  box-shadow: none;
  max-width: none;
  margin: 0;
  padding: 0;
}
/* portfolio.css .kwcs-result p{font-weight:600} pogrubiał lead/karty tylko
   w portfolio — reset do normalnej wagi (jak w standalone). */
#case-power-of-mind-pelne .kwcs-result p { font-weight: 400; }
/* portfolio.css .kwcs-card{border;backdrop-filter} dawał kartom Rezultatu
   border i blur tylko w portfolio — neutralizacja do stanu standalone. */
#case-power-of-mind-pelne .kwcs-card { border: none; backdrop-filter: none; }

/* Blok zaproszenia (CTA końcowe) + ghost CTA + slot cytatu */
#case-power-of-mind-pelne .result-invite {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  text-align: center;
}
#case-power-of-mind-pelne .result-invite h3 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 0 0 0.75rem;
  color: #0f172a;
}
#case-power-of-mind-pelne .result-invite p {
  max-width: 640px;
  margin: 0 auto 0.5rem;
  color: #475569;
}
#case-power-of-mind-pelne .result-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
/* neutralizacja margin:auto z .kwcs-result .kwcs-cta w flexie */
#case-power-of-mind-pelne .result-invite-actions .kwcs-cta {
  margin: 0.5rem 0;
}
/* Ghost CTA — spójny z niebieskim standardem CTA w całym projekcie
   (razdwa/karoma używają #0284c7), nie brandowe indygo POM. */
#case-power-of-mind-pelne .kwcs-cta--ghost {
  background: transparent;
  color: #0284c7;
  box-shadow: none;
  border: 1px solid #0284c7;
}
#case-power-of-mind-pelne .kwcs-cta--ghost:hover {
  background: rgba(2, 132, 199, 0.08);
  box-shadow: none;
}

/* Gotowy styl cytatu klientki — aktywny po odkomentowaniu slotu w HTML */
#case-power-of-mind-pelne .razdwa-quote {
  margin: 2.5rem auto 0;
  max-width: 720px;
  padding: 1.75rem 2rem;
  border-left: 4px solid #06b6d4;
  background: rgba(6, 182, 212, 0.07);
  border-radius: 0 0.75rem 0.75rem 0;
}
#case-power-of-mind-pelne .razdwa-quote blockquote {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  line-height: 1.6;
  font-style: italic;
  color: #0f172a;
}
#case-power-of-mind-pelne .razdwa-quote figcaption {
  font-weight: 600;
  color: #334155;
}

/* ========================================
   KWCS-FOOTER — uproszczony footer case studies
   ======================================== */
.kwcs-footer {
  border-top: 1px solid #e2e8f0;
  padding: 1.25rem 1rem;
  margin-top: 2rem;
  background: #f8fafc;
}
.kwcs-footer .wrap {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: #64748b;
}
.kwcs-footer a {
  color: #0284c7;
  text-decoration: none;
  transition: color 0.2s;
}
.kwcs-footer a:hover { color: #0369a1; }
@media (max-width: 600px) {
  .kwcs-footer .wrap { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

/* ─── Carousel (wizualizacje.html) ─── */
body { overflow-x: hidden; }

#carousel-container {
  position: relative;
  background: #262626;
  width: 100%;
  height: 74vh;
  margin: 2rem auto 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-height: 320px;
  max-height: 84vh;
}

#carousel-container img {
  display: none;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: scale-down;
  margin: 0 auto;
  border-radius: 8px;
  background: #262626;
  user-select: none;
  -webkit-user-drag: none;
  box-sizing: border-box;
  padding: 3%;
}

#carousel-container img.active {
  display: block;
}

#carousel-controls {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1rem auto 0 auto;
  width: fit-content;
}

#carousel-controls button {
  background: #191919;
  color: #fff;
  border: none;
  font-size: 2rem;
  border-radius: 6px;
  padding: 0.5rem 1.5rem;
  opacity: 0.9;
  cursor: pointer;
  transition: background 0.3s ease;
  user-select: none;
}

#carousel-controls button:active,
#carousel-controls button:focus,
#carousel-controls button:hover {
  background: #111;
}

@media (max-width: 700px) {
  #carousel-container {
    height: 45vh;
    min-height: 190px;
    max-height: 55vh;
  }
  #carousel-container img {
    max-width: 100vw;
    max-height: 98%;
  }
  #carousel-controls {
    gap: 1.5rem;
    margin-top: 0.5rem;
  }
}

/* ========================================
   PROJECT PREV/NEXT NAVIGATION
   Cykliczna nawigacja między case studies
   ======================================== */
.kwcs-project-nav {
  padding: clamp(2rem, 5vw, 3rem) 1rem;
  border-top: 1px solid #e2e8f0;
}

.kwcs-project-nav .wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
}

.kwcs-project-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  max-width: 48%;
  text-decoration: none;
  color: #0f172a;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 1rem 1.35rem;
  box-shadow: 0 2px 10px rgba(2, 6, 23, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.kwcs-project-nav__link:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary, #06b6d4);
  box-shadow: 0 10px 26px rgba(6, 182, 212, 0.18);
}

.kwcs-project-nav__link:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.kwcs-project-nav__next {
  margin-left: auto;
}

.kwcs-project-nav__text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.kwcs-project-nav__prev .kwcs-project-nav__text {
  align-items: flex-start;
  text-align: left;
}

.kwcs-project-nav__next .kwcs-project-nav__text {
  align-items: flex-end;
  text-align: right;
}

.kwcs-project-nav__text small {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.15rem;
}

.kwcs-project-nav__text strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.kwcs-project-nav__icon {
  flex-shrink: 0;
  color: var(--color-primary, #06b6d4);
}

@media (max-width: 600px) {
  .kwcs-project-nav .wrap {
    flex-direction: column;
    gap: 0.75rem;
  }
  .kwcs-project-nav__link {
    max-width: 100%;
    justify-content: flex-start;
  }
  .kwcs-project-nav__next {
    margin-left: 0;
    justify-content: flex-end;
  }
}

/* ============================================================
   Raz Dwa — hero CTA: na mobile ma width:100% + padding, ale bez
   box-sizing:border-box padding wychodzil poza szerokosc (overflow
   ~16px na 390px). border-box wlacza padding w szerokosc.
   Na desktopie przycisk ma width:fit-content, wiec bez zmian.
   Scope: #case-razdwa-pelne (nie wpływa na inne case studies)
============================================================ */
#case-razdwa-pelne .hero-image-cta {
  box-sizing: border-box;
  max-width: 100%;
}

/* ============================================================
   Raz Dwa — blok zaproszenia (CTA końcowe) + slot cytatu klienta
   Scope: #case-razdwa-pelne (nie wpływa na inne case studies)
============================================================ */
#case-razdwa-pelne .result-invite {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  text-align: center;
}
#case-razdwa-pelne .result-invite h3 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 0 0 0.75rem;
  color: #0f172a;
}
#case-razdwa-pelne .result-invite p {
  max-width: 640px;
  margin: 0 auto 0.5rem;
  color: #475569;
}
#case-razdwa-pelne .result-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
/* neutralizacja margin:auto z .kwcs-result .kwcs-cta, ktory w flexie
   rozpychal przyciski na krawedzie */
#case-razdwa-pelne .result-invite-actions .kwcs-cta {
  margin: 0.5rem 0;
}
#case-razdwa-pelne .kwcs-cta--ghost {
  background: transparent;
  color: #0284c7;
  box-shadow: none;
  border: 1px solid #0284c7;
}
#case-razdwa-pelne .kwcs-cta--ghost:hover {
  background: rgba(2, 132, 199, 0.08);
  box-shadow: none;
}

/* Gotowy styl dla cytatu klienta — aktywny po odkomentowaniu slotu w HTML */
#case-razdwa-pelne .razdwa-quote {
  margin: 2.5rem auto 0;
  max-width: 720px;
  padding: 1.75rem 2rem;
  border-left: 4px solid #06b6d4;
  background: rgba(6, 182, 212, 0.07);
  border-radius: 0 0.75rem 0.75rem 0;
}
#case-razdwa-pelne .razdwa-quote blockquote {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  line-height: 1.6;
  font-style: italic;
  color: #0f172a;
}
#case-razdwa-pelne .razdwa-quote figcaption {
  font-weight: 600;
  color: #334155;
}

/* ============================================================
   KW-Design — scoped styles
   Scope: #case-KW-Design-pelne (nie wpływa na inne case studies)
   ============================================================ */

/* Kontener rozciągnięty na pełną szerokość viewportu w OBU kontekstach
   (standalone i #case-viewer w portfolio.html, gdzie .project-content ma
   własny padding). Bez tego full-bleed sekcji sięgał tylko krawędzi
   kontenera, nie viewportu — w portfolio zostawał biały pas z lewej.
   margin: calc(50% - 50vw) => kontener [0, vw] niezależnie od kontekstu.
   Wzorzec z #case-karoma-pelne / #case-power-of-mind-pelne. */
#case-KW-Design-pelne {
  /* index-styles.css (ładowany w portfolio) ma section{max-width:100%!important;
     width:100%}, co capuje kontener do szerokości rodzica i blokuje full-bleed.
     Nadpisujemy: !important + width:auto, żeby marginesy rozciągnęły go do vw. */
  max-width: none !important;
  width: auto;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Rail padding — odsunięcie contentu za fixed sidebar */
@media (min-width: 1280px) {
  #case-KW-Design-pelne { padding-left: 216px; --wrap-max: 1240px; }
}
@media (min-width: 1101px) and (max-width: 1279px) {
  #case-KW-Design-pelne { padding-left: 184px; --wrap-max: 1120px; }
}
@media (max-width: 1100px) {
  #case-KW-Design-pelne { padding-left: 0; }
}

/* Full-bleed tła na sekcjach kolorowych (razdwa-summary + logo-section mają
   własne tło). Cofamy padding railu marginesem, kompensujemy padding-leftem,
   żeby tło sięgało krawędzi treści (rail pływa nad tłem). */
@media (min-width: 1280px) {
  #case-KW-Design-pelne > .razdwa-summary,
  #case-KW-Design-pelne > .kwcs-sec--alt,
  #case-KW-Design-pelne > .kwcs-logo-section {
    margin-left: -216px;
    padding-left: calc(216px + 1rem);
  }
}
@media (min-width: 1101px) and (max-width: 1279px) {
  #case-KW-Design-pelne > .razdwa-summary,
  #case-KW-Design-pelne > .kwcs-sec--alt,
  #case-KW-Design-pelne > .kwcs-logo-section {
    margin-left: -184px;
    padding-left: calc(184px + 1rem);
  }
}

/* Podtytuł pod H2 */
#case-KW-Design-pelne .razdwa-h2-sub {
  max-width: 760px;
  margin: -0.25rem auto 1.25rem;
  text-align: center;
  color: #0f172a;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.5;
}

/* Hero image — plik ma proporcje 1257x1269, ale zrzut ma pusty, biały dół
   pod przyciskami (mierzone: treść kończy się ~97% wysokości). Kadrujemy
   przez aspect-ratio + object-fit:cover + object-position:top, tak jak
   w #case-razdwa-pelne, żeby nie pokazywać martwego marginesu. */
#case-KW-Design-pelne .kwcs-hero-body .hero-image {
  width: 100%;
  display: flex;
  justify-content: center;
}
#case-KW-Design-pelne .kwcs-hero-body .hero-image .cover {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  aspect-ratio: 1257 / 1235;
  object-fit: cover;
  object-position: top;
  border-radius: 14px;
  box-shadow: 0 24px 60px -28px rgba(15, 23, 42, 0.32);
}

/* Hero CTA — overflow fix na mobile */
#case-KW-Design-pelne .hero-image-cta {
  box-sizing: border-box;
  max-width: 100%;
}

/* Stat liczby — kolor akcentu */
#case-KW-Design-pelne .razdwa-stat-num { color: #0292AA; }

/* Contribution cell solo — pełna szerokość */
#case-KW-Design-pelne .contribution-cell--solo {
  grid-column: 1 / -1;
  max-width: 720px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  #case-KW-Design-pelne .contribution-cell--solo { max-width: 100%; }
}

/* Result section — bez pływającej karty. Zdejmujemy tło/radius/shadow/border,
   żeby sekcja była pełnowymiarowa i centrowała treść w tej samej kolumnie .wrap
   co reszta sekcji (spójne wyśrodkowanie). display:block + border/backdrop:none
   neutralizują kolizję z portfolio.css (.kwcs-result{display:flex;border;
   backdrop-filter} — inny komponent o tej samej nazwie klasy, ładowany tylko
   w portfolio, shrink-wrapował tytuł do lewej). Wzorzec z karoma/power-of-mind. */
#case-KW-Design-pelne .kwcs-result {
  display: block;
  background: none;
  border: none;
  backdrop-filter: none;
  border-radius: 0;
  box-shadow: none;
  max-width: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
/* portfolio.css .kwcs-result p{font-weight:600} pogrubiał tekst kart/leada
   tylko w portfolio — reset do normalnej wagi (jak w standalone). */
#case-KW-Design-pelne .kwcs-result p { font-weight: 400; }
/* portfolio.css .kwcs-card{border;backdrop-filter} dawał kartom border i blur
   tylko w portfolio — neutralizacja do stanu standalone. */
#case-KW-Design-pelne .kwcs-card { border: none; backdrop-filter: none; }
#case-KW-Design-pelne .result-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}
@media (max-width: 768px) {
  #case-KW-Design-pelne .result-cards {
    grid-template-columns: 1fr;
  }
}

/* Result invite (CTA końcowe) */
#case-KW-Design-pelne .result-invite {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  text-align: center;
}
#case-KW-Design-pelne .result-invite h3 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 0 0 0.75rem;
  color: #0f172a;
}
#case-KW-Design-pelne .result-invite p {
  max-width: 640px;
  margin: 0 auto 0.5rem;
  color: #475569;
}
#case-KW-Design-pelne .result-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
#case-KW-Design-pelne .result-invite-actions .kw-btn {
  margin: 0.5rem 0;
}
/* "Zobacz stronę" renderował się jako goły tekst zamiast obrysowanego
   przycisku — inne case studies (karoma/power-of-mind/razdwa) mają własny
   ID-scoped override na .kwcs-cta--ghost, KW-Design nie miał żadnego, więc
   .kw-btn.kwcs-cta--ghost z kw-buttons.css nie dawało widocznego efektu.
   Jawny fallback w palecie teal v1.0, spójny z primary powyżej. */
#case-KW-Design-pelne .kwcs-cta--ghost {
  background: transparent;
  color: #0e7490;
  border: 2px solid #0e7490;
  box-shadow: none;
}
#case-KW-Design-pelne .kwcs-cta--ghost:hover {
  background: #0e7490;
  color: #fff;
}

/* Slot cytatu klienta */
#case-KW-Design-pelne .razdwa-quote {
  margin: 2.5rem auto 0;
  max-width: 720px;
  padding: 1.75rem 2rem;
  border-left: 4px solid #06b6d4;
  background: rgba(6, 182, 212, 0.07);
  border-radius: 0 0.75rem 0.75rem 0;
}
#case-KW-Design-pelne .razdwa-quote blockquote {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  line-height: 1.6;
  font-style: italic;
  color: #0f172a;
}
#case-KW-Design-pelne .razdwa-quote figcaption {
  font-weight: 600;
  color: #334155;
}
