/* Custom CSS dla SEO CMS Portal - v2 */

/* ========================================
   BASE
   ======================================== */
html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ========================================
   HEADER - subtelny cień
   ======================================== */
header.sticky {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ========================================
   ARTICLE CARDS - hover efekty
   Targetuje: article.bg-white.rounded-lg (z article-card.php)
   ======================================== */

/* Zamiana płaskiego border na delikatny shadow */
article.bg-white.rounded-lg {
    border-color: transparent !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}

article.bg-white.rounded-lg:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    transform: translateY(-2px);
}

/* Zoom na obrazku w karcie */
article.bg-white.rounded-lg a.block {
    overflow: hidden;
}

article.bg-white.rounded-lg a.block img {
    transition: transform 0.4s ease;
}

article.bg-white.rounded-lg:hover a.block img {
    transform: scale(1.04);
}

/* Tytuł karty: ciemniejszy bazowo, niebieski na hover */
article.bg-white.rounded-lg h2.text-xl a {
    color: #202124 !important;
    transition: color 0.2s;
}

article.bg-white.rounded-lg h2.text-xl a:hover {
    color: var(--color-primary, #1a73e8) !important;
}

/* Excerpt - lepszy line-height */
article.bg-white.rounded-lg .p-6 p.text-secondary {
    line-height: 1.6;
    color: #5f6368;
}

/* Data - subtelniejsza */
article.bg-white.rounded-lg .text-xs.text-accent {
    color: #9aa0a6 !important;
    font-weight: 500;
}

/* ========================================
   ARTICLE CONTENT - typografia
   Targetuje: .article-content (z article.php)
   ======================================== */
.article-content {
    line-height: 1.85;
    font-size: 1.05rem;
    color: #3c4043;
}

/* H2 z kolorową lewą linią */
.article-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 0.85rem;
    color: #202124;
    letter-spacing: -0.01em;
    line-height: 1.3;
    padding-left: 0.85rem;
    border-left: 4px solid var(--color-primary, #1a73e8);
}

/* H3 */
.article-content h3 {
    font-size: 1.3rem;
    font-weight: 650;
    margin-top: 2rem;
    margin-bottom: 0.65rem;
    color: #202124;
    line-height: 1.35;
}

/* H4 */
.article-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #202124;
}

/* Paragrafy */
.article-content p {
    margin-bottom: 1.2rem;
    color: #3c4043;
}

.article-content strong,
.article-content b {
    color: #202124;
    font-weight: 600;
}

/* Listy - kolorowe bullet points */
.article-content ul {
    list-style: none;
    margin-bottom: 1.2rem;
    padding-left: 0;
    color: #3c4043;
}

.article-content ul li {
    position: relative;
    padding-left: 1.4rem;
    margin-bottom: 0.45rem;
}

.article-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary, #1a73e8);
}

/* Numerowane listy */
.article-content ol {
    list-style: none;
    counter-reset: ol-counter;
    margin-bottom: 1.2rem;
    padding-left: 0;
    color: #3c4043;
}

.article-content ol li {
    position: relative;
    padding-left: 1.8rem;
    margin-bottom: 0.45rem;
    counter-increment: ol-counter;
}

.article-content ol li::before {
    content: counter(ol-counter);
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 1.3em;
    height: 1.3em;
    background: var(--color-primary-light, #e8f0fe);
    color: var(--color-primary, #1a73e8);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Blockquote */
.article-content blockquote {
    border-left: 3px solid var(--color-primary, #1a73e8);
    background: #f8f9fa;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #5f6368;
}

/* Linki w treści */
.article-content a {
    color: var(--color-primary, #1a73e8);
    text-decoration: underline;
    text-decoration-color: rgba(26, 115, 232, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s;
}

.article-content a:hover {
    color: #1557b0;
    text-decoration-color: #1557b0;
}

/* Obrazki w treści */
.article-content img {
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Tabele */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.article-content table th {
    background: #f8f9fa;
    font-weight: 600;
    text-align: left;
    padding: 0.6rem 0.8rem;
    border-bottom: 2px solid #dadce0;
    color: #202124;
}

.article-content table td {
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid #e8eaed;
}

.article-content table tr:hover td {
    background: #f8f9fa;
}

/* ========================================
   FEATURED IMAGE - zaokrąglenie
   Targetuje: img.rounded-lg.shadow-lg (z article.php)
   ======================================== */
.article-content + footer,
article > header + div img.rounded-lg {
    border-radius: 12px;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
    display: flex;
    list-style: none;
    gap: 0.4rem;
    padding: 0;
    margin: 2rem 0;
    justify-content: center;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.9rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #5f6368;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination a:hover {
    background-color: #f8f9fa;
    color: var(--color-primary, #1a73e8);
    border-color: var(--color-primary, #1a73e8);
}

.pagination .active {
    background-color: var(--color-primary, #1a73e8);
    color: white;
    border-color: var(--color-primary, #1a73e8);
}

/* ========================================
   TAGS
   ======================================== */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #f8f9fa;
    color: #5f6368;
    border-radius: 9999px;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.tag:hover {
    background-color: var(--color-primary-light, #e8f0fe);
    color: var(--color-primary, #1a73e8);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .article-content h2 {
        font-size: 1.3rem;
    }

    .article-content h3 {
        font-size: 1.15rem;
    }
}

/* ========================================
   SKELETON (loading)
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
