/**
 * Awerka Blog Styles
 * Matches existing Bootstrap 5 design with #FE7F2D accent color
 */

/* Blog Header */
.blog-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.blog-post-header {
    position: relative;
}

/* Blog Cards */
.blog-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
}

.blog-card-image {
    transition: transform 0.3s ease;
    height: 200px;
    object-fit: cover;
}

.blog-card:hover .blog-card-image {
    transform: scale(1.05);
}

.blog-card-image-link {
    overflow: hidden;
    display: block;
}

.blog-card-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Blog Content */
.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.blog-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #004560;
}

.blog-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.blog-content h4 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.blog-content p {
    margin-bottom: 1.25rem;
}

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

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

.blog-content a {
    color: #FE7F2D;
    text-decoration: none;
}

.blog-content a:hover {
    text-decoration: underline;
}

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

/* Rich Text Block */
.blog-rich-text {
    overflow-wrap: break-word;
}

/* Code Block */
.blog-code-block pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 0 0 0.5rem 0.5rem;
    overflow-x: auto;
    font-size: 0.9rem;
}

.blog-code-block code {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
}

.code-header {
    border-radius: 0.5rem 0.5rem 0 0;
}

/* Quote Block */
.blog-quote blockquote {
    font-size: 1.2rem;
    color: #495057;
}

/* Image Block */
.blog-image {
    max-width: 100%;
}

.blog-image.float-start,
.blog-image.float-end {
    max-width: 50%;
}

@media (max-width: 768px) {
    .blog-image.float-start,
    .blog-image.float-end {
        float: none !important;
        max-width: 100%;
        margin: 0 0 1rem 0 !important;
    }
}

/* Gallery Block */
.gallery-item {
    overflow: hidden;
    border-radius: 0.5rem;
}

.gallery-item img {
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Table of Contents */
.blog-toc {
    position: sticky;
    top: 100px;
}

.toc-list {
    padding-left: 1.25rem;
}

.toc-item {
    margin-bottom: 0.5rem;
}

.toc-item a {
    transition: color 0.2s ease;
}

.toc-item a:hover {
    color: #FE7F2D !important;
}

.toc-h3 {
    margin-left: 1rem;
    font-size: 0.9rem;
}

.toc-h4 {
    margin-left: 2rem;
    font-size: 0.85rem;
}

/* Sidebar */
.blog-sidebar .card {
    transition: box-shadow 0.2s ease;
}

.blog-sidebar .card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1) !important;
}

.sidebar-link {
    transition: color 0.2s ease;
}

.sidebar-link:hover {
    color: #FE7F2D !important;
}

.tag-badge {
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tag-badge:hover {
    background-color: #FE7F2D !important;
    color: white !important;
}

/* Comments */
.comment-item {
    transition: background-color 0.2s ease;
}

.comment-item:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.comment-content {
    word-wrap: break-word;
}

/* Buttons */
.btn-red {
    background-color: #FE7F2D;
    border-color: #FE7F2D;
    color: #fff;
}

.btn-red:hover {
    background-color: #e06920;
    border-color: #e06920;
    color: #fff;
}

.btn-red:focus {
    box-shadow: 0 0 0 0.25rem rgba(254, 127, 45, 0.5);
}

/* Pagination */
.pagination .page-item.active .page-link {
    background-color: #FE7F2D;
    border-color: #FE7F2D;
}

.pagination .page-link {
    color: #FE7F2D;
}

.pagination .page-link:hover {
    color: #e06920;
}

/* Social Share */
.btn-outline-secondary:hover {
    background-color: #FE7F2D;
    border-color: #FE7F2D;
    color: white;
}

/* Dark Mode Support */
[data-bs-theme="dark"] .blog-content h2 {
    color: #87ceeb;
}

[data-bs-theme="dark"] .blog-quote blockquote {
    color: #adb5bd;
}

[data-bs-theme="dark"] .blog-card-placeholder {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .blog-content {
        font-size: 1rem;
    }

    .blog-toc {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .blog-post-header {
        height: 300px !important;
    }

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

    .blog-card-image {
        height: 150px;
    }
}

/* Print styles */
@media print {
    .blog-sidebar,
    .blog-toc,
    .comment-form-wrapper,
    .social-share {
        display: none;
    }

    .blog-content {
        font-size: 12pt;
        line-height: 1.5;
    }
}
