:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --primary-color: #2e1cc9;
    --primary-hover: #1b0e91;
    --border-color: #e2e8f0;
    --radius: 12px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    /* ZMIANA SEO/WCAG: Przyciemnienie odcieni zieleni w celu uzyskania wysokiego współczynnika kontrastu z białym tekstem */
    --buy-color: #15803d;
    --buy-hover: #166534;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    padding: 20px;
}

.container { max-width: 1200px; margin: 0 auto; }
header { text-align: center; margin: 40px 0; }
header h1 { font-size: 2.2rem; color: #0f172a; margin-bottom: 12px; font-weight: 800; }
header p { color: #64748b; font-size: 1.1rem; }

/* Stylizacja logo SVG */
.logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}
.logo-wrapper svg {
    max-width: 250px;
    height: auto;
    transition: transform 0.2s ease-in-out;
}
.logo-wrapper svg:hover {
    transform: scale(1.05);
}

/* Klasa ukrywająca etykiety przed ludzkim okiem, zachowując pełną dostępność dla robotów Google PageSpeed */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Wyszukiwarka i Filtry - Pełna responsywność */
.filter-section {
    background: var(--card-bg);
    padding: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
}

.filter-form { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.filter-form input, .filter-form select, .filter-form button {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
}
.filter-form input { flex-grow: 1; min-width: 200px; }
.filter-form button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}
.filter-form button:hover { background-color: var(--primary-hover); }
.filter-form a {
    padding: 10px 14px;
    text-decoration: none;
    color: #64748b;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
}

/* Grid - optymalizacja Mobile-First */
.demo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}
@media (min-width: 640px) { .demo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .demo-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    /* OPTYMALIZACJA: Izolacja warstwy renderowania dla GPU przy animacji hover */
    will-change: transform, box-shadow;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #f59e0b;
    color: #fff;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    z-index: 2;
}

/* ULEPSZENIE OBRAZÓW: Sztywna ochrona proporcji 16:9 zapobiegająca przesunięciom układu CLS */
.card-image-wrapper { 
    width: 100%; 
    position: relative; 
    height: 0;
    padding-top: 56.25%; 
    background-color: #f8fafc; 
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}

/* POPRAWKA POZYCJONOWANIA: Wymuszenie wypełnienia kontenera bez czarnych pasów */
.card-image { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    object-position: center;
    display: block; 
    transition: opacity 0.3s ease-in-out;
    padding: 10px;
}

.card-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%; 
    display: flex; 
    align-items: center;
    justify-content: center; 
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #475569; 
    font-size: 0.9rem; 
    font-weight: 500;
}

.card-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; justify-content: space-between; gap: 15px; }
.card-meta { font-size: 0.8rem; text-transform: uppercase; color: var(--primary-color); font-weight: 700; letter-spacing: 0.05em; }
.card-title { font-size: 1.25rem; font-weight: 700; color: #0f172a; margin-top: 2px; }

.card-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
}

.btn-demo, .btn-buy {
    display: block; text-align: center; text-decoration: none; padding: 11px 5px; border-radius: 8px;
    font-weight: 600; font-size: 0.95rem; transition: background-color 0.2s;
}
.btn-demo { background-color: var(--primary-color); color: #ffffff; }
.btn-demo:hover { background-color: var(--primary-hover); }
.btn-buy { background-color: var(--buy-color); color: #ffffff; }
.btn-buy:hover { background-color: var(--buy-hover); }

.pagination { display: flex; justify-content: center; gap: 8px; margin: 40px 0; }
.pagination a, .pagination span {
    padding: 8px 14px; border: 1px solid var(--border-color);
    border-radius: 6px; text-decoration: none; color: #0f172a; font-weight: 500;
}
.pagination .active { background-color: var(--primary-color); color: #fff; border-color: var(--primary-color); }

.blog-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-top: 40px;
    content-visibility: auto;
    contain-intrinsic-size: 300px;
}
.blog-section h2, .blog-section h3 { color: #0f172a; margin-bottom: 15px; font-weight: 700; }
.blog-section p { color: #475569; margin-bottom: 15px; line-height: 1.6; }
.blog-section ul, .blog-section ol { margin-left: 20px; margin-bottom: 15px; color: #475569; }
.blog-section li { margin-bottom: 5px; }

.articles-section { 
    margin-top: 50px; 
    margin-bottom: 30px; 
    content-visibility: auto;
    contain-intrinsic-size: 500px;
}
.articles-section h2 { font-size: 1.6rem; color: #0f172a; margin-bottom: 20px; font-weight: 800; border-bottom: 2px solid var(--border-color); padding-bottom: 10px; }

.article-card-content { padding: 15px; display: flex; flex-direction: column; flex-grow: 1; justify-content: space-between; }
.article-date { font-size: 0.8rem; color: #64748b; margin-bottom: 5px; display: block; }
.article-title { font-size: 1.1rem; font-weight: 700; color: #0f172a; margin-bottom: 10px; line-height: 1.4; }
.article-excerpt { font-size: 0.9rem; color: #475569; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 15px; }

.btn-read-more { font-size: 0.9rem; color: var(--primary-color); text-decoration: none; font-weight: 600; transition: color 0.2s; }
.btn-read-more:hover { color: var(--primary-hover); text-decoration: underline; }

.blog-footer-link { text-align: center; margin-top: 30px; }
.btn-all-articles { display: inline-block; padding: 10px 20px; border: 2px solid var(--primary-color); color: var(--primary-color); text-decoration: none; border-radius: 8px; font-weight: 600; transition: all 0.2s; }
.btn-all-articles:hover { background-color: var(--primary-color); color: #fff; }

