/**
 * Blog Styles (Public)
 * Taranhaar Legal Firm Blog System
 * Frontend blog pages styling
 */

/* =====================================================
   Blog Page Header
   ===================================================== */
.blog-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--bg-dark) 100%);
    padding: 80px 0;
    position: relative;
}

.blog-header.post-details {
    padding: 60px 0;
}

.blog-header h2 {
    color: #fff;
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
}

.blog-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    margin: 0;
}

.blog-header .breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.blog-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
}

.blog-header .breadcrumb-item a:hover {
    color: #fff;
}

.blog-header .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.9);
}

.blog-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* =====================================================
   Blog Filters
   ===================================================== */
.blog-filters {
    max-width: 800px;
    margin: 0 auto;
}

.blog-filters .search-box {
    position: relative;
}

.blog-filters .search-box .form-control {
    padding-right: 50px;
    height: 50px;
    border: 2px solid var(--grey-color);
    border-radius: 8px;
}

.blog-filters .search-box .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(1, 65, 107, 0.1);
}

.blog-filters .search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-filters .search-btn:hover {
    background: var(--bg-dark);
}

.blog-filters .form-select {
    height: 50px;
    border: 2px solid var(--grey-color);
    border-radius: 8px;
}

.blog-filters .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(1, 65, 107, 0.1);
}

.search-results-info p {
    color: var(--body-color);
    font-style: italic;
}

/* =====================================================
   Blog Card
   ===================================================== */
.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.blog-card-image {
    display: block;
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.blog-card-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-grey);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--grey-color);
}

.blog-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--body-color);
}

.blog-card-meta i {
    margin-right: 4px;
    color: var(--primary-color);
}

.blog-card-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}

.blog-card-title a {
    color: var(--heading-color);
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-excerpt {
    color: var(--body-color);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.blog-card .read-more {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
}

.blog-card .read-more i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.blog-card .read-more:hover i {
    transform: translateX(5px);
}

/* Small Blog Card (Related Posts) */
.blog-card.small .blog-card-image {
    height: 140px;
}

.blog-card.small .blog-card-content {
    padding: 16px;
}

.blog-card.small .blog-card-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.blog-card.small .blog-card-date {
    font-size: 12px;
    color: var(--body-color);
}

/* =====================================================
   Empty Blog State
   ===================================================== */
.empty-blog {
    padding: 80px 20px;
}

.empty-blog i {
    font-size: 64px;
    color: var(--grey-color);
    margin-bottom: 24px;
}

.empty-blog h3 {
    font-size: 28px;
    margin-bottom: 12px;
}

.empty-blog p {
    color: var(--body-color);
    margin-bottom: 24px;
}

/* =====================================================
   Blog Pagination
   ===================================================== */
.blog-pagination .pagination {
    gap: 8px;
}

.blog-pagination .page-link {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--grey-color);
    border-radius: 8px;
    color: var(--heading-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.blog-pagination .page-link:hover {
    background: var(--bg-grey);
    border-color: var(--primary-color);
}

.blog-pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.blog-pagination .pagination-info {
    color: var(--body-color);
    font-size: 14px;
}

/* =====================================================
   Blog Post Single (Details)
   ===================================================== */
.blog-post-single {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
}

.post-featured-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.post-header {
    padding: 40px 40px 20px;
    text-align: center;
    border-bottom: 1px solid var(--grey-color);
}

.post-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--heading-color);
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    color: var(--body-color);
    font-size: 14px;
}

.post-meta i {
    color: var(--primary-color);
}

/* =====================================================
   Post Content
   ===================================================== */
.post-content {
    padding: 40px;
    font-size: 17px;
    line-height: 1.8;
    color: var(--body-color);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--heading-color);
}

.post-content h2 {
    font-size: 28px;
}

.post-content h3 {
    font-size: 24px;
}

.post-content h4 {
    font-size: 20px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content ul,
.post-content ol {
    padding-left: 24px;
    margin-bottom: 20px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 20px 30px;
    margin: 30px 0;
    background: var(--bg-grey);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
}

.post-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--bg-dark);
}

.post-content pre,
.post-content code {
    background: var(--bg-grey);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.post-content pre {
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
}

/* =====================================================
   Post Share
   ===================================================== */
.post-share {
    padding: 30px 40px;
    border-top: 1px solid var(--grey-color);
}

.post-share h4 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--heading-color);
}

.share-buttons {
    display: flex;
    gap: 12px;
}

.share-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
    color: #fff;
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #000;
}

.share-btn.linkedin {
    background: #0a66c2;
}

.share-btn.whatsapp {
    background: #25d366;
}

/* =====================================================
   Post CTA
   ===================================================== */
.post-cta {
    padding: 0 40px 40px;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--bg-dark) 100%);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    color: #fff;
}

.cta-box h3 {
    color: #fff;
    font-size: 28px;
    margin-bottom: 12px;
}

.cta-box p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
}

.cta-box .default-btn {
    background: #fff;
    color: var(--primary-color);
}

.cta-box .default-btn:hover {
    background: var(--bg-grey);
}

/* =====================================================
   Related Posts
   ===================================================== */
.related-posts {
    margin-top: 60px;
}

.related-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--heading-color);
}

/* =====================================================
   Back to Blog
   ===================================================== */
.back-to-blog .default-btn.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.back-to-blog .default-btn.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* =====================================================
   404 Error Page
   ===================================================== */
.error-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-content {
    max-width: 500px;
    margin: 0 auto;
}

.error-code {
    font-size: 120px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 16px;
}

.error-content h2 {
    font-size: 32px;
    margin-bottom: 16px;
}

.error-content p {
    color: var(--body-color);
    margin-bottom: 24px;
}

/* =====================================================
   Preview Banner (Admin)
   ===================================================== */
.preview-banner {
    background: #f59e0b;
    color: #000;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    font-size: 14px;
}

.preview-banner .btn-light {
    background: #fff;
    border: none;
}

/* =====================================================
   Responsive Styles
   ===================================================== */
@media (max-width: 992px) {
    .blog-header h2 {
        font-size: 32px;
    }
    
    .post-title {
        font-size: 28px;
    }
    
    .post-header,
    .post-content,
    .post-share,
    .post-cta {
        padding-left: 24px;
        padding-right: 24px;
    }
}

@media (max-width: 768px) {
    .blog-header {
        padding: 60px 0;
    }
    
    .blog-header h2 {
        font-size: 28px;
    }
    
    .blog-card-image {
        height: 180px;
    }
    
    .post-title {
        font-size: 24px;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .post-content {
        font-size: 16px;
    }
    
    .cta-box {
        padding: 30px 20px;
    }
    
    .cta-box h3 {
        font-size: 22px;
    }
    
    .error-code {
        font-size: 80px;
    }
}

@media (max-width: 576px) {
    .blog-filters .row {
        gap: 12px;
    }
    
    .blog-card-content {
        padding: 20px;
    }
    
    .blog-card-title {
        font-size: 18px;
    }
    
    .share-buttons {
        justify-content: center;
    }
}
