/* ============================================================================
   BLOG STYLES - Dedykowane style dla bloga Botie
   ============================================================================ */

/* ============================================================================
   ZMIENNE CSS - MINIMALISTYCZNE
   ============================================================================ */
:root {
    /* Blog specific colors - subtle */
    --blog-primary: var(--brand-blue);
    --blog-primary-hover: var(--brand-dark-blue);
    --blog-secondary: #6c757d;
    --blog-text-muted: #8e9297;
    --blog-border-light: #e9ecef;
    --blog-border-subtle: rgba(0, 0, 0, 0.05);

    /* Typography - smaller, cleaner */
    --blog-font-family: var(--default-font);
    --blog-heading-font: var(--heading-font);
    --blog-line-height: 1.5;
    --blog-heading-line-height: 1.3;
    --blog-font-size-sm: 0.8rem;
    --blog-font-size-base: 0.9rem;
    --blog-font-size-lg: 1rem;

    /* Spacing - more compact */
    --blog-section-padding: 2rem 0;
    --blog-card-padding: 1rem;
    --blog-sidebar-gap: 1.5rem;

    /* Minimal styling */
    --blog-border-radius: 0.25rem;
    --blog-card-shadow: none;
    --blog-card-shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.08);
    --blog-card-border: 1px solid var(--blog-border-light);

    /* Content widths */
    --blog-content-max-width: 800px;
    --blog-sidebar-width: 280px;
}

/* ============================================================================
   LAYOUT GŁÓWNY
   ============================================================================ */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.blog-header {
    background: linear-gradient(135deg, var(--blog-primary) 0%, var(--blog-primary-hover) 100%);
    color: white;
    padding: var(--blog-section-padding);
    margin-bottom: 2rem;
}

.blog-header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.blog-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* ============================================================================
   POSTY BLOGOWE - MINIMALISTYCZNE
   ============================================================================ */
.blog-post-card {
    background: transparent;
    border: var(--blog-card-border);
    border-radius: var(--blog-border-radius);
    transition: all 0.2s ease;
    overflow: hidden;
    height: 100%;
}

.blog-post-card:hover {
    box-shadow: var(--blog-card-shadow-hover);
    border-color: var(--blog-primary);
}

.blog-post-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--blog-border-radius);
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.blog-post-card:hover .blog-post-image {
    opacity: 0.9;
}

/* Layout dla kart postów */
.blog-post-layout {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.blog-post-text {
    flex: 1;
    min-width: 0; /* Pozwala na text-overflow */
}

/* Responsive layout */
@media (max-width: 768px) {
    .blog-post-layout {
        flex-direction: column;
    }

    .blog-post-image {
        width: 100%;
        max-width: 300px;
        height: 180px;
        align-self: center;
    }
}

.blog-post-content {
    padding: var(--blog-card-padding);
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: var(--blog-font-size-sm);
    color: var(--blog-text-muted);
}

.blog-post-meta .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

.blog-post-title {
    font-size: var(--blog-font-size-base);
    font-weight: 600;
    line-height: var(--blog-heading-line-height);
    margin-bottom: 0.5rem;
}

.blog-post-title a {
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-post-title a:hover {
    color: var(--blog-primary);
}

.blog-post-excerpt {
    color: var(--blog-secondary);
    line-height: var(--blog-line-height);
    margin-bottom: 0.75rem;
    font-size: var(--blog-font-size-base);
}



.blog-read-more {
    color: var(--blog-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--blog-font-size-sm);
    transition: color 0.2s ease;
}

.blog-read-more:hover {
    color: var(--blog-primary-hover);
}

/* ============================================================================
   SZCZEGÓŁY POSTA
   ============================================================================ */
.blog-post-detail {
    max-width: var(--blog-content-max-width);
    margin: 0 auto;
}

.blog-post-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.blog-post-title-detail {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: var(--blog-heading-line-height);
    margin-bottom: 0.75rem;
    color: var(--heading-color);
}

.blog-post-subtitle {
    font-size: 1rem;
    color: var(--blog-secondary);
    margin-bottom: 1rem;
}

.blog-post-meta-detail {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: var(--blog-font-size-sm);
    color: var(--blog-text-muted);
}

.blog-post-featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--blog-border-radius);
    margin-bottom: 2rem;
}

/* ============================================================================
   TREŚĆ POSTA
   ============================================================================ */
.blog-post-content-detail {
    font-size: 1.1rem;
    line-height: var(--blog-line-height);
    color: var(--default-color);
}

.blog-post-content-detail h2,
.blog-post-content-detail h3,
.blog-post-content-detail h4,
.blog-post-content-detail h5,
.blog-post-content-detail h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--heading-color);
    font-weight: 600;
}

.blog-post-content-detail h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--blog-primary);
    padding-bottom: 0.5rem;
}

.blog-post-content-detail h3 {
    font-size: 1.5rem;
}

.blog-post-content-detail h4 {
    font-size: 1.25rem;
}

.blog-post-content-detail p {
    margin-bottom: 1.5rem;
}

.blog-post-content-detail ul,
.blog-post-content-detail ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-post-content-detail li {
    margin-bottom: 0.5rem;
}

.blog-post-content-detail blockquote {
    border-left: 4px solid var(--blog-primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--blog-secondary);
}

.blog-post-content-detail code {
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: var(--blog-danger);
}

.blog-post-content-detail pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: var(--blog-border-radius);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-post-content-detail pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ============================================================================
   KLASY CSS DLA TREŚCI POSTÓW
   ============================================================================ */

/* Nagłówki */
.blog-post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.blog-post-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--blog-secondary);
    margin-bottom: 1.5rem;
}

/* Tekst */
.blog-post-lead {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--blog-secondary);
}

.blog-post-excerpt {
    font-size: 1.1rem;
    color: var(--blog-secondary);
    margin-bottom: 1.5rem;
}

/* Listy */
.blog-list {
    margin-bottom: 1.5rem;
}

.blog-list-ordered {
    list-style-type: decimal;
    padding-left: 2rem;
}

.blog-list-unordered {
    list-style-type: disc;
    padding-left: 2rem;
}

.blog-list li {
    margin-bottom: 0.5rem;
    line-height: var(--blog-line-height);
}

/* FAQ */
.blog-faq {
    margin-bottom: 2rem;
}

.blog-faq-question {
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.blog-faq-answer {
    color: var(--default-color);
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--blog-primary);
}

/* Alerty */
.blog-alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 1rem;
    border-radius: var(--blog-border-radius);
    margin: 1.5rem 0;
}

.blog-alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 1rem;
    border-radius: var(--blog-border-radius);
    margin: 1.5rem 0;
}

.blog-alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem;
    border-radius: var(--blog-border-radius);
    margin: 1.5rem 0;
}

.blog-alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: var(--blog-border-radius);
    margin: 1.5rem 0;
}

/* Obrazy */
.blog-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--blog-border-radius);
    margin: 1.5rem 0;
}

.blog-image-center {
    display: block;
    margin: 1.5rem auto;
}

.blog-image-left {
    float: left;
    margin: 0 1.5rem 1rem 0;
    max-width: 50%;
}

.blog-image-right {
    float: right;
    margin: 0 0 1rem 1.5rem;
    max-width: 50%;
}

/* Kod */
.blog-code-inline {
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--blog-danger);
}

.blog-code-block {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: var(--blog-border-radius);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #e9ecef;
}

/* ============================================================================
   SIDEBAR - MINIMALISTYCZNY
   ============================================================================ */
.blog-sidebar {
    background: transparent;
    border: var(--blog-card-border);
    border-radius: var(--blog-border-radius);
    padding: var(--blog-card-padding);
    margin-bottom: 1.5rem;
    height: fit-content;
}

.blog-sidebar h5 {
    color: var(--heading-color);
    font-weight: 600;
    font-size: var(--blog-font-size-lg);
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--blog-border-light);
}

.blog-sidebar .list-unstyled li {
    margin-bottom: 0.4rem;
}

.blog-sidebar .list-unstyled a {
    color: var(--default-color);
    text-decoration: none;
    font-size: var(--blog-font-size-base);
    transition: color 0.2s ease;
}

.blog-sidebar .list-unstyled a:hover {
    color: var(--blog-primary);
}

.blog-sidebar .badge {
    font-size: 0.65rem;
    margin-right: 0.2rem;
    margin-bottom: 0.2rem;
    padding: 0.15rem 0.3rem;
}

.blog-search-form .form-control {
    border-radius: var(--blog-border-radius);
    border: 1px solid #ced4da;
}

.blog-search-form .btn {
    border-radius: var(--blog-border-radius);
}

/* ============================================================================
   BREADCRUMBS - MINIMALISTYCZNE
   ============================================================================ */
.blog-breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
    font-size: var(--blog-font-size-sm);
}

.blog-breadcrumb .breadcrumb-item a {
    color: var(--blog-primary);
    text-decoration: none;
}

.blog-breadcrumb .breadcrumb-item a:hover {
    color: var(--blog-primary-hover);
}

.blog-breadcrumb .breadcrumb-item.active {
    color: var(--blog-text-muted);
}

/* ============================================================================
   PAGINACJA
   ============================================================================ */
.blog-pagination {
    margin-top: 3rem;
}

.blog-pagination .page-link {
    color: var(--blog-primary);
    border-color: #dee2e6;
    border-radius: var(--blog-border-radius);
    margin: 0 0.125rem;
}

.blog-pagination .page-link:hover {
    color: var(--blog-primary-hover);
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.blog-pagination .page-item.active .page-link {
    background-color: var(--blog-primary);
    border-color: var(--blog-primary);
}

/* ============================================================================
   SOCIAL SHARING
   ============================================================================ */
.blog-social-share {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--blog-border-radius);
    margin: 2rem 0;
    text-align: center;
}

.blog-social-share h6 {
    margin-bottom: 1rem;
    color: var(--heading-color);
}

.blog-social-share .btn {
    margin: 0 0.25rem;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.blog-social-share .btn-facebook {
    background-color: #3b5998;
    border-color: #3b5998;
    color: white;
}

.blog-social-share .btn-twitter {
    background-color: #1da1f2;
    border-color: #1da1f2;
    color: white;
}

.blog-social-share .btn-linkedin {
    background-color: #0077b5;
    border-color: #0077b5;
    color: white;
}

/* ============================================================================
   SPIS TREŚCI
   ============================================================================ */
.blog-toc {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--blog-border-radius);
    margin: 2rem 0;
    border-left: 4px solid var(--blog-primary);
}

.blog-toc h6 {
    color: var(--heading-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.blog-toc ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.blog-toc ul ul {
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.blog-toc li {
    margin-bottom: 0.25rem;
}

.blog-toc a {
    color: var(--blog-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.blog-toc a:hover {
    color: var(--blog-primary-hover);
}

/* ============================================================================
   POWIĄZANE POSTY
   ============================================================================ */
.blog-related-posts {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: var(--blog-border-radius);
    margin-top: 3rem;
}

.blog-related-posts h4 {
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.blog-related-post-card {
    background: white;
    border-radius: var(--blog-border-radius);
    padding: 1rem;
    height: 100%;
    transition: transform 0.3s ease;
}

.blog-related-post-card:hover {
    transform: translateY(-2px);
}

.blog-related-post-card h6 {
    margin-bottom: 0.5rem;
}

.blog-related-post-card h6 a {
    color: var(--heading-color);
    text-decoration: none;
}

.blog-related-post-card h6 a:hover {
    color: var(--blog-primary);
}

.blog-related-post-card .text-muted {
    font-size: 0.875rem;
}

/* ============================================================================
   WYSZUKIWANIE
   ============================================================================ */
.blog-search-results {
    margin-bottom: 2rem;
}

.blog-search-info {
    background: #e3f2fd;
    padding: 1rem;
    border-radius: var(--blog-border-radius);
    margin-bottom: 2rem;
    border-left: 4px solid var(--blog-primary);
}

.blog-search-suggestions {
    background: #fff3e0;
    padding: 1rem;
    border-radius: var(--blog-border-radius);
    margin-bottom: 2rem;
    border-left: 4px solid var(--blog-warning);
}

.blog-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--blog-secondary);
}

.blog-no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

/* ============================================================================
   RESPONSYWNOŚĆ
   ============================================================================ */
@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2rem;
    }

    .blog-post-title-detail {
        font-size: 2rem;
    }

    .blog-post-meta-detail {
        flex-direction: column;
        gap: 0.5rem;
    }

    .blog-sidebar {
        margin-top: 2rem;
    }

    .blog-image-left,
    .blog-image-right {
        float: none;
        margin: 1rem 0;
        max-width: 100%;
    }

    .blog-social-share .btn {
        display: block;
        margin: 0.25rem 0;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .blog-header {
        padding: 2rem 0;
    }

    .blog-header h1 {
        font-size: 1.75rem;
    }

    .blog-post-title-detail {
        font-size: 1.75rem;
    }

    .blog-post-content-detail {
        font-size: 1rem;
    }

    .blog-post-content-detail h2 {
        font-size: 1.5rem;
    }

    .blog-post-content-detail h3 {
        font-size: 1.25rem;
    }
}

/* ============================================================================
   DARK MODE SUPPORT - MINIMALISTYCZNY
   ============================================================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --blog-border-light: #374151;
        --blog-border-subtle: rgba(255, 255, 255, 0.05);
        --blog-text-muted: #9ca3af;
        --blog-secondary: #d1d5db;
    }

    .blog-post-card,
    .blog-sidebar {
        background-color: transparent;
        border-color: var(--blog-border-light);
    }

    .blog-toc,
    .blog-related-posts {
        background-color: var(--blog-card-bg);
    }

    .blog-search-form .form-control {
        background-color: var(--blog-card-bg);
        border-color: var(--blog-border-color);
        color: white;
    }
}

/* ============================================================================
   BLOG DASHBOARD STYLES
   ============================================================================ */

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-element .stat-number {
    line-height: 1;
}

.dashboard-element .stat-label {
    margin-bottom: 0;
}

/* Blog navigation active states */
.blog-navigation .moderator-tile.active {
    background-color: var(--brand-blue) !important;
    color: white !important;
    border-color: var(--brand-blue);
}

/* Table improvements for blog management */
.table th {
    border-top: none;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.table td {
    vertical-align: middle;
}

/* Card improvements */
.card.border {
    border: 1px solid var(--gray-300) !important;
}

.card.border:hover {
    border-color: var(--brand-blue) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* View toggle buttons */
.btn.active {
    background-color: var(--brand-blue) !important;
    border-color: var(--brand-blue) !important;
    color: white !important;
}
