/* case-studies.html — style specyficzne dla tej strony (wspólne w css/common.css) */

/* ===== SHARED ===== */
        .section-badge { display: block; font-size: 14px; font-weight: 700; color: var(--color-text-muted); text-transform: none; letter-spacing: 0; margin-bottom: 10px; }
        .section-badge svg { display: none; }

/* ===== HERO ===== */
        .cs-hero {
            padding: 140px 24px 80px; position: relative; overflow: hidden;
            background: var(--color-primary-light);
        }
        .cs-hero::before {
            content: ''; position: absolute; top: -100px; right: -5%;
            width: 600px; height: 600px;
            background: none;
            pointer-events: none;
        }
        .cs-hero-inner { max-width: var(--max-width); margin: 0 auto; }
        .cs-hero h1 {
            font-size: clamp(28px,4vw,45px); font-weight: 800;
            line-height: 1.15; letter-spacing: -1.2px; margin-bottom: 20px;
            max-width: 750px; 
        }
        .cs-hero h1 em { font-style: normal; color: var(--color-primary-text); }
        .cs-hero-sub {
            font-size: 16px; color: var(--color-text); line-height: 1.7;
            max-width: 600px; margin: 0 0 36px;
        }

        /* Aggregate stats */
        .cs-stats {
            display: flex; gap: 40px 48px; flex-wrap: wrap;
            margin-top: 48px; padding-top: 32px;
            border-top: 1px solid var(--color-border);
        }
        .cs-stat-value { font-size: 32px; font-weight: 800; color: var(--color-primary-text); }
        .cs-stat-label { font-size: 14px; color: var(--color-text-muted); margin-top: 2px; }

/* ===== FILTERS ===== */
        /* Pas filtrów pod sekcją otwierającą: wyrównany do lewej krawędzi treści,
           przyciski w rozmiarze dotykowym. Na telefonie jeden przewijany rząd zamiast kilku linii. */
        .cs-filters {
            max-width: var(--max-width); margin: 0 auto; padding: 40px 24px 0;
            display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px;
        }
        .cs-filter-btn {
            font: inherit; font-size: 16px; font-weight: 600; color: var(--color-text);
            background: var(--color-border); border: none; min-height: 44px;
            padding: 10px 20px; border-radius: var(--radius); cursor: pointer;
            transition: background 0.2s, color 0.2s;
        }
        .cs-filter-btn:hover { background: var(--color-primary-light); color: var(--color-primary-text); }
        .cs-filter-btn.active { background: var(--color-primary-text); color: #fff; }
        @media (max-width: 640px) {
            .cs-filters {
                flex-wrap: nowrap; overflow-x: auto; padding: 24px 16px 4px; margin-bottom: 28px;
                scrollbar-width: none; -webkit-overflow-scrolling: touch;
            }
            .cs-filters::-webkit-scrollbar { display: none; }
            .cs-filter-btn { flex: 0 0 auto; }
        }

/* ===== CASE STUDY CARDS ===== */
        .cs-list { max-width: var(--max-width); margin: 0 auto; padding: 0 24px 80px; }

        .cs-card {
            background: var(--color-surface); border: 1px solid var(--color-border);
            border-radius: var(--radius-lg); overflow: hidden;
            margin-bottom: 40px; transition: transform 0.3s, box-shadow 0.3s;
        }
        .cs-card[style*="display: none"] { margin-bottom: 0; }

        .cs-card-inner {
            display: grid; grid-template-columns: 1fr 1fr; min-height: 0;
        }

        /* Left: text */
        .cs-card-text { padding: 40px; display: flex; flex-direction: column; }
        .cs-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
        .cs-tag {
            font-size: 14px; font-weight: 700; text-transform: none;
            letter-spacing: 0; color: var(--color-text-muted);
        }
        .cs-tag + .cs-tag::before { content: '·'; margin-right: 8px; opacity: .6; }

        .cs-card-text h2 {
            font-size: clamp(16px,2.5vw,22px); font-weight: 800;
            letter-spacing: -0.5px; margin-bottom: 12px; line-height: 1.3;
        }

        .cs-problem, .cs-solution, .cs-effect {
            margin-bottom: 16px;
        }
        .cs-label {
            font-size: 14px; font-weight: 700; text-transform: none;
            letter-spacing: 0; margin-bottom: 6px;
        }
        .cs-label.problem { color: var(--color-accent-text); }
        .cs-label.solution { color: var(--color-primary-text); }
        .cs-label.effect { color: var(--color-secondary-text); }
        .cs-problem p, .cs-solution p, .cs-effect p {
            font-size: 16px; color: var(--color-text); line-height: 1.7;
        }

        /* Right: metrics panel */
        .cs-card-metrics {
            background: var(--color-primary-light);
            padding: 40px; display: flex; flex-direction: column; justify-content: center;
            gap: 24px; border-left: 1px solid var(--color-border);
        }
        .cs-metric { padding: 16px 0; border-top: 2px solid var(--color-border); }
        .cs-metric-value {
            font-size: 28px; font-weight: 800; margin-bottom: 4px;
        }
        .cs-metric-value.blue { color: var(--color-primary-text); }
        .cs-metric-value.green { color: var(--color-secondary-text); }
        .cs-metric-value.coral { color: var(--color-accent-text); }
        .cs-metric-label { font-size: 14px; color: var(--color-text-muted); }

        .cs-quote {
            padding: 16px; border-left: 3px solid var(--color-primary);
            background: var(--color-surface); border-radius: 0 var(--radius) var(--radius) 0;
        }
        .cs-quote p {
            font-size: 16px; font-style: italic; color: var(--color-text);
            line-height: 1.6; margin-bottom: 6px;
        }
        .cs-quote cite {
            font-style: normal; font-size: 14px; color: var(--color-text-muted); font-weight: 600;
        }

/* ===== CTA STRIP ===== */
/* ===== ŚCIANA LOGOTYPÓW Z WEZWANIEM POŚRODKU =====
   Siatka 6×4. Panel z wezwaniem jest umieszczony jawnie w środku
   (kolumny 3–4, wiersze 2–3), a komórki z logotypami układają się
   wokół niego automatycznie. Kreski robimy jednym cieniem na komórkę,
   żeby nie dublować obramowań na styku. */
        .logo-wall { padding: 0 24px 80px; }
        .lw-grid {
            max-width: var(--max-width); margin: 0 auto;
            display: grid; grid-template-columns: repeat(6, 1fr);
            background: var(--color-bg);
            border: 1px solid var(--color-border); border-radius: var(--radius-lg);
            overflow: hidden;
        }
        .lw-cell {
            display: flex; align-items: center; justify-content: center;
            min-height: 124px; padding: 20px 18px;
        }
        .lw-cell img {
            max-height: 38px; max-width: 100%; width: auto; object-fit: contain;
            filter: grayscale(1); opacity: 0.6;
            transition: filter 0.25s, opacity 0.25s;
        }
        .lw-cell img:hover { filter: none; opacity: 1; }

        .lw-cta {
            grid-column: 3 / span 2; grid-row: 2 / span 2;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            gap: 16px; padding: 32px 30px; text-align: center;
            background: var(--color-surface); position: relative; z-index: 2;
        }
        .lw-cta-lead {
            font-size: clamp(22px,2.2vw,24px); font-weight: 700;
            line-height: 1.4; letter-spacing: -0.4px; color: var(--color-text); max-width: 22ch;
        }
        .lw-cta-lead b { color: var(--color-primary-text); font-weight: 800; }
        .lw-cta-note { font-size: 14px; color: var(--color-text-muted); }

        /* Miejsce na logotyp — USUŃ tę regułę po wstawieniu prawdziwych plików. */
        .client-ph {
            display: flex; align-items: center; justify-content: center;
            height: 34px; min-width: 104px; padding: 0 12px;
            border: 1px dashed var(--color-border); border-radius: 6px;
            font-size: 14px; letter-spacing: 0; text-transform: none;
            color: var(--color-text-muted); white-space: nowrap;
        }

        @media (max-width: 1000px) {
            .lw-grid { grid-template-columns: repeat(4, 1fr); }
            .lw-cta { grid-column: 2 / span 2; grid-row: 2 / span 2; }
        }
        @media (max-width: 700px) {
            .lw-grid { grid-template-columns: repeat(2, 1fr); }
            .lw-cta { grid-column: 1 / -1; grid-row: auto; padding: 30px 22px; }
            .lw-cell { min-height: 96px; }
            /* Na telefonie 20 logotypów to 10 ekranów przewijania — pokazujemy 12.
               Panel z wezwaniem jest pierwszym dzieckiem, stąd n+14. */
            .lw-cell:nth-child(n+14) { display: none; }
        }

        .btn-white { display: inline-flex; align-items: center; gap: 10px; padding: 16px 32px; background: #fff; color: var(--color-primary-text); border: none; border-radius: var(--radius); font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform 0.15s, box-shadow 0.2s; position: relative; }
        .btn-white:hover { transform: translateY(-2px); }

/* ===== RESPONSIVE ===== */
        img, video { max-width: 100%; height: auto; }
        @media (max-width: 860px) {
            .cs-card-inner { grid-template-columns: 1fr; }
            .cs-card-metrics { border-left: none; border-top: 1px solid var(--color-border); }
            .cs-stats { gap: 32px; }
            .cs-hero { padding: 110px 20px 60px; }
        }
        @media (max-width: 640px) {
            .cs-hero { padding: 100px 16px 48px; }
            .cs-hero h1 { font-size: 28px; letter-spacing: -0.8px; }
            .cs-hero-sub { font-size: 16px; }
            .cs-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 32px; }
            .cs-stat-value { font-size: 28px; }
            .cs-card-text { padding: 28px 20px; }
            .cs-card-metrics { padding: 28px 20px; flex-direction: row; flex-wrap: wrap; }
            .cs-metric { flex: 1; min-width: 120px; }
            .cs-cta-inner { padding: 48px 24px; }
            .btn-primary, .btn-outline, .btn-white { width: 100%; justify-content: center; }
        }

/* ===== Dostępność — reguły specyficzne dla strony ===== */
.btn-white:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
    box-shadow: 0 0 0 4px rgba(59,139,219,0.2);
}
        .cs-hero-note{max-width:640px;margin: 16px 0 0;font-size:14px;line-height:1.65;color:var(--color-text-muted);}

/* Dopóki w siatce nie ma prawdziwych logotypów (komórki mają atrybut hidden),
   sekcja pokazuje samo wezwanie na całą szerokość. */
.lw-grid:not(:has(.lw-cell:not([hidden]))) { display: block; max-width: 720px; }
.lw-grid:not(:has(.lw-cell:not([hidden]))) .lw-cta { padding: 56px 24px; }
