/*
 * Dodatki do project-page.css dla stron /ai i /jerzyk (PL i EN).
 *
 * Osobny plik zamiast dopisywania do project-page.css: te klocki (jasny
 * naglowek, przyklad dzialania, tabele, liczby z kontekstem) sa potrzebne
 * tylko tutaj, a strona o przejazdach nie musi ich pobierac.
 */

/* ------------------------------------------------------- Jasny naglowek -- */

/*
 * Turkus marki zostaje, ale jako akcent (pasek u gory, delikatne tlo), a nie
 * pelny gradient. Kontener ma te sama szerokosc co tresc strony, zeby
 * naglowek i sekcje zaczynaly sie od tej samej lewej krawedzi.
 */
.project-hero.project-hero--light {
    background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
    border-top: 4px solid #0f766e;
    border-bottom: 1px solid var(--project-line);
    color: var(--project-ink);
    padding: 56px 0 48px;
}

.project-hero--light .container {
    max-width: 1200px;
}

.project-hero--light h1 {
    font-weight: 400;
    max-width: 880px;
}

.project-hero--light .project-hero-lead {
    color: var(--project-muted);
}

.project-hero-meta {
    margin-top: 20px;
    font-size: 14px;
    color: #80868b;
}

.project-hero-meta a {
    color: var(--project-accent);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

/* Przyciski poza .project-section nie dostaja wymiarow z project-page.css. */
.hero-actions .btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 22px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

/* Dwa akapity wstepu: drugi (gdzie dziala, kto wdraza) tuz pod pierwszym. */
.project-hero--light .project-hero-lead + .project-hero-lead {
    margin-top: 12px;
}

/* Przyciski w tresci strony (sekcja dla informatykow). */
.project-section .hero-actions {
    margin-top: 20px;
    margin-bottom: 24px;
}

/* --------------------------------------------------- Trzy kroki przykladu -- */

/*
 * Pismo -> Jerzyk -> czlowiek. Prosty rzad zamiast grafiki, zeby bylo widac,
 * ze model niczego nie zalatwia sam, tylko podpowiada osobie od sprawy.
 */
.flow-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 1000px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    counter-reset: flow;
}

.flow-steps li {
    position: relative;
    padding: 14px 16px 14px 48px;
    background: var(--project-surface);
    border: 1px solid var(--project-line);
    border-radius: 8px;
    color: var(--project-muted);
    font-size: 14px;
    line-height: 1.5;
    counter-increment: flow;
}

.flow-steps li::before {
    content: counter(flow);
    position: absolute;
    left: 14px;
    top: 14px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--project-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.flow-steps strong {
    display: block;
    margin-bottom: 2px;
    color: var(--project-ink);
    font-size: 15px;
}

/* Przycisk "Zobacz przyklad" nie chowa naglowka sekcji pod paskiem strony. */
#przyklad,
#example,
#jak-zaczac,
#get-started {
    scroll-margin-top: 80px;
}

/* --------------------------------------------------------- Uwaga w tresci -- */

.note-box {
    max-width: 760px;
    margin-top: 24px;
    padding: 16px 20px;
    background: #f0fdfa;
    border-left: 4px solid var(--project-accent);
    border-radius: 8px;
    color: var(--project-ink);
    font-size: 15px;
    line-height: 1.7;
}

/* ------------------------------------------------------ Przyklad dzialania -- */

.example {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 1000px;
    margin: 0;
}

/* Fragment pisma wyglada jak kartka, zeby od razu bylo widac, co jest wejsciem. */
.example-letter {
    padding: 24px;
    background: #fff;
    border: 1px solid var(--project-line);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 15px;
    line-height: 1.75;
    color: #374151;
}

.example-label {
    display: block;
    margin-bottom: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #80868b;
}

.example-result {
    padding: 24px;
    background: var(--project-surface);
    border: 1px solid var(--project-line);
    border-radius: 8px;
}

.example caption,
.example figcaption {
    grid-column: 1 / -1;
    font-size: 14px;
    color: #80868b;
    line-height: 1.6;
}

/* ----------------------------------------------------------------- Tabele -- */

.data-table {
    width: 100%;
    max-width: 1000px;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.6;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--project-line);
}

.data-table th {
    font-weight: 600;
    color: var(--project-ink);
    background: var(--project-surface);
}

.data-table td {
    color: var(--project-muted);
}

.data-table td:first-child {
    color: var(--project-ink);
    font-weight: 500;
    white-space: nowrap;
}

.example-result .data-table td,
.example-result .data-table th {
    padding: 10px 0;
    background: none;
}

.example-result .data-table td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.table-scroll {
    overflow-x: auto;
}

/* ------------------------------------------------------- Liczby z opisem -- */

.results-list {
    max-width: 1000px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.results-list li {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid var(--project-line);
}

.results-list li:last-child {
    border-bottom: none;
}

.stat-figure {
    font-size: 34px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--project-accent);
    font-variant-numeric: tabular-nums;
}

.stat-label {
    color: var(--project-muted);
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.stat-label strong {
    color: var(--project-ink);
    font-weight: 600;
}

.results-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--project-accent);
    font-weight: 600;
    font-size: 15px;
}

.small-note {
    margin-top: 12px;
    font-size: 14px;
    color: #80868b;
    line-height: 1.6;
    max-width: 760px;
}

/* ------------------------------------------------- Zasady i ograniczenia -- */

/* Zwykla lista z pogrubionym poczatkiem - kolejnosc nie ma tu znaczenia. */
.plain-list {
    max-width: 760px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.plain-list li {
    padding: 14px 0;
    border-bottom: 1px solid var(--project-line);
    color: var(--project-muted);
    line-height: 1.7;
    font-size: 16px;
}

.plain-list li:last-child {
    border-bottom: none;
}

.plain-list strong {
    color: var(--project-ink);
    font-weight: 600;
}

/* ------------------------------------------------------------ Blok kodu -- */

.code-block {
    max-width: 760px;
    margin: 0 0 16px;
    padding: 20px 24px;
    background: #1f2933;
    color: #e5e7eb;
    border-radius: 10px;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    line-height: 1.7;
}

/* ------------------------------------------------------- Karta projektu -- */

.ai-project-card {
    display: block;
    max-width: 1000px;
    padding: 28px;
    background: var(--project-surface);
    border: 1px solid var(--project-line);
    border-left: 4px solid var(--project-accent);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.ai-project-card:hover {
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.ai-project-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--project-ink);
    margin-bottom: 8px;
}

.ai-project-card p {
    color: var(--project-muted);
    line-height: 1.65;
    font-size: 15px;
    margin-bottom: 14px;
}

.ai-project-meta {
    display: block;
    font-size: 13px;
    color: #80868b;
    margin-bottom: 14px;
}

.ai-project-more {
    color: var(--project-accent);
    font-weight: 600;
    font-size: 15px;
}

/* --------------------------------------------------------------- Mobile -- */

@media (max-width: 768px) {
    .flow-steps {
        grid-template-columns: 1fr;
    }

    .project-hero.project-hero--light {
        padding: 40px 0 36px;
    }

    .example {
        grid-template-columns: 1fr;
    }

    .results-list li {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .data-table td:first-child {
        white-space: normal;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .code-block {
        font-size: 13px;
        padding: 16px;
    }

    .ai-project-card {
        padding: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-project-card {
        transition: none;
    }
}
