/**
 * Professional Blog Module Styles
 * Bike Yard Kenya - Blog Enhancement
 */

/* ============================================
   Reading Progress Bar
   ============================================ */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 9999;
}

.reading-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2196f3, #21cbf3);
    transition: width 0.1s ease;
}

/* ============================================
   Blog Listing Improvements
   ============================================ */
.blog-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1.5rem;
}

.blog-header .page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 0;
}

.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.blog-card .post-media {
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.blog-card .post-media img {
    transition: transform 0.5s ease;
}

.blog-card:hover .post-media img {
    transform: scale(1.05);
}

.post-label {
    position: absolute;
    top: 20px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    z-index: 2;
}

.label-featured {
    left: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.label-category {
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.post-meta > * {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-meta i {
    color: #2196f3;
    font-size: 14px;
}

.post-title a {
    color: #222;
    font-weight: 600;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #2196f3;
}

.post-tags-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-sm {
    font-size: 11px;
    color: #666;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.tag-sm:hover {
    background: #2196f3;
    color: #fff;
    text-decoration: none;
}

/* ============================================
   Filter Results Alert
   ============================================ */
.filter-results .alert {
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    padding: 4rem 2rem !important;
    background: #f9f9f9;
    border-radius: 8px;
}

/* ============================================
   Blog Post Detail Improvements
   ============================================ */
.blog-post-detail .post-details {
    padding: 2rem 0;
}

.blog-post-detail .post-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: #222;
}

.blog-post-detail .post-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.blog-post-detail .post-body h2,
.blog-post-detail .post-body h3,
.blog-post-detail .post-body h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #222;
}

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

.blog-post-detail .post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

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

.blog-post-detail .post-body blockquote {
    border-left: 4px solid #2196f3;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: #f9f9f9;
    font-style: italic;
    color: #555;
}

/* ============================================
   Post Navigation
   ============================================ */
.post-navigation {
    border-top: 2px solid #f0f0f0;
    border-bottom: 2px solid #f0f0f0;
    padding: 2rem 0;
}

.post-nav {
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.post-nav:hover {
    background: #2196f3;
}

.post-nav:hover * {
    color: #fff !important;
}

.post-nav a {
    text-decoration: none;
    color: #222;
}

.nav-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    color: #999;
}

.nav-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #222;
}

/* ============================================
   Related Posts
   ============================================ */
.post-related {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.post-related:hover {
    border-color: #2196f3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
}

/* ============================================
   Post Footer (Tags + Social Icons)
   ============================================ */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e5e5e5;
    padding-top: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.post-tags .tag {
    display: inline-block;
    padding: 6px 14px;
    background: #f0f0f0;
    color: #666;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.post-tags .tag:hover {
    background: #2196f3;
    color: #fff;
}

/* ============================================
   Author Bio
   ============================================ */
.post-author-detail {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
    border: 1px solid #e5e5e5;
}

.post-author-detail .author-media {
    margin-right: 1.5rem;
}

.post-author-detail .author-body {
    flex: 1;
}

.author-media img {
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.author-title {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 0.5rem;
}

/* ============================================
   Comments Section
   ============================================ */
.comments {
    border-top: 2px solid #f0f0f0;
    padding-top: 3rem;
}

.comment {
    border-bottom: 1px solid #f0f0f0;
    padding: 2rem 0;
}

.comment:last-child {
    border-bottom: none;
}

.comment-avatar img {
    border-radius: 50%;
    border: 2px solid #f0f0f0;
}

.comment-author {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #222;
}

.comment-date {
    font-size: 13px;
    color: #999;
    margin-left: 1rem;
}

.comment-form {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.comment-form .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease;
}

.comment-form .form-control:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* ============================================
   Sidebar Improvements
   ============================================ */
.sidebar-blog .widget {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebar-blog .widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #222;
    display: flex;
    align-items: center;
}

.sidebar-blog .widget-title i {
    font-size: 20px;
    color: #2196f3;
}

.category-list li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.category-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.category-list li.active a {
    color: #2196f3;
    font-weight: 600;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #444;
    transition: color 0.3s ease;
}

.category-list a:hover {
    color: #2196f3;
    text-decoration: none;
}

.category-list .count {
    font-size: 12px;
}

/* ============================================
   Tag Cloud
   ============================================ */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud .tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f0f0f0;
    color: #666;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tag-cloud .tag:hover {
    background: #2196f3;
    color: #fff;
    transform: translateY(-2px);
}

.tag-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
}

/* Tag sizes based on count */
.tag-1 {
    font-size: 12px;
}
.tag-2 {
    font-size: 13px;
}
.tag-3 {
    font-size: 14px;
}
.tag-4 {
    font-size: 15px;
}
.tag-5 {
    font-size: 16px;
    font-weight: 600;
}

/* ============================================
   Newsletter Widget
   ============================================ */
.widget-newsletter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
}

.widget-newsletter .widget-title,
.widget-newsletter p {
    color: #fff !important;
}

.widget-newsletter .form-control {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.widget-newsletter .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.widget-newsletter .form-control:focus {
    background: rgba(255, 255, 255, 0.3);
    border-color: #fff;
}

.widget-newsletter .btn-primary {
    background: #fff;
    color: #667eea;
    border: none;
    font-weight: 600;
}

.widget-newsletter .btn-primary:hover {
    background: #f0f0f0;
}

/* ============================================
   Social Share Buttons
   ============================================ */
.post-share .social-links {
    display: flex;
    gap: 10px;
}

.social-link,
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover,
.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #fff;
}

.social-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.social-facebook {
    background: #3b5998;
}
.social-twitter {
    background: #1da1f2;
}
.social-linkedin {
    background: #0077b5;
}
.social-pinterest {
    background: #bd081c;
}
.social-whatsapp {
    background: #25d366;
}
.social-instagram {
    background: linear-gradient(
        45deg,
        #f09433 0%,
        #e6683c 25%,
        #dc2743 50%,
        #cc2366 75%,
        #bc1888 100%
    );
}

/* ============================================
   Responsive Improvements
   ============================================ */
@media (max-width: 991px) {
    .blog-header .page-title {
        font-size: 2rem;
    }

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

    .post-nav {
        margin-bottom: 1rem;
    }

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

@media (max-width: 767px) {
    .blog-card .post-details {
        padding: 1.5rem;
    }

    .post-meta {
        gap: 10px;
        font-size: 12px;
    }

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

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

    .post-author-detail {
        padding: 1.5rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .reading-progress-bar,
    .breadcrumb-nav,
    .sidebar,
    .post-share,
    .post-navigation,
    .related-posts,
    .comments,
    footer {
        display: none !important;
    }

    .blog-post-detail .post-body {
        font-size: 12pt;
        line-height: 1.6;
    }
}
.page-nav {
    padding-bottom: 1rem;
    border-bottom: 1px solid #ebebeb;
    display: flex;
    align-items: center;
    width: 100%;
}
.pager-link.pager-link-prev {
    padding-right: 3rem;
    padding-left: 4.2rem;
}
.pager-link {
    position: relative;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 0 0 50%;
    max-width: 50%;
    font-weight: 400;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    font-size: 1.3rem;
    text-transform: uppercase;
    line-height: 1.5;
    transition: all 0.35s ease;
}
.pager-link-title {
    display: inline-block;
    margin-top: 0.6rem;
    flex: 0 0 auto;
    color: #222;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: none;
    transition: all 0.35s ease;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pager-link.pager-link-next {
    padding-left: 3rem;
    padding-right: 4.2rem;
    align-items: flex-end;
    text-align: right;
}
.pager-link+.pager-link {
    border-left: 0.1rem solid #ebebeb;
}
.pager-link.pager-link-prev:after {
    content: "←";
    left: 2rem;
}
.pager-link:after {
    display: block;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1;
    color: #ccc;
    transition: all 0.35s ease;
}
.pager-link.pager-link-next:after {
    content: "→";
    right: 2rem;
}
.pager-link:hover {
    background: #f9f9f9;
}
.pager-link:hover:after {
    color: #2196f3;
}
.pager-link:hover .pager-link-title {
    color: #2196f3;
}
/* Mobile responsive navigation */
@media (max-width: 767px) {
    .page-nav {
        flex-direction: column;
    }
    .pager-link {
        max-width: 100%;
        flex: 0 0 100%;
        padding: 1.5rem 2rem;
        align-items: center !important;
        text-align: center !important;
    }
    .pager-link + .pager-link {
        border-left: none;
        border-top: 1px solid #ebebeb;
    }
    .pager-link.pager-link-prev,
    .pager-link.pager-link-next {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    .pager-link-title {
        white-space: normal;
        text-align: center;
    }
}
