/* Article View Page Styling - Mosahel */

.article-body {
    max-width: 860px;
    margin: 0 auto;
    line-height: 2;
    font-size: 1.05rem;
    color: rgba(0, 0, 0, 0.7);
    word-break: break-word;
    overflow-wrap: break-word;
    position: relative;
    z-index: 5;
}

.article-inner-section {
    margin-bottom: 2.2rem;
    padding-top: 0.5rem;
}

.article-body h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0 0 1rem;
    line-height: 1.4;
}

.article-body a {
    color: var(--secondary) !important;
    text-decoration: underline !important;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.article-body a:hover {
    color: var(--primary) !important;
    opacity: 0.8;
}

.article-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 1.5rem 0 1rem;
}

.article-body ul,
.article-body ol {
    padding-right: 2rem;
    margin-bottom: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body p {
    margin-bottom: 1.5rem;
    color: inherit;
}

.article-body strong {
    color: var(--primary-dark);
    opacity: 0.9;
}

.section-body-text {
    color: inherit;
    white-space: pre-line;
}

.section-body-text p,
.section-body-text ul,
.section-body-text ol {
    white-space: normal;
}

.section-body-text p {
    margin-bottom: 1rem;
}

.section-body-text a {
    color: #cc581f !important;
    text-decoration: underline;
    font-weight: 700;
    transition: opacity 0.2s;
}

.section-body-text a:hover {
    opacity: 0.75;
    color: #cc581f !important;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 1.5rem 0;
}

.tag-badge {
    background: rgba(89, 53, 140, 0.08);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
}

.suggested-card-body p {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Suggested Articles Row */
#suggestedSection {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid #e2e8f0;
}

.suggested-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.suggested-title i {
    color: var(--secondary);
}

.suggested-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.view-all-link {
    color: var(--secondary);
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: var(--primary);
    gap: 12px;
}

.suggested-grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 10px 5px 25px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary) transparent;
}

.suggested-grid::-webkit-scrollbar {
    height: 6px;
}

.suggested-grid::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 10px;
}

.suggested-card {
    flex: 0 0 280px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
}

.suggested-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-color: var(--secondary);
}

.suggested-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.suggested-card-body {
    padding: 1.2rem;
}

.suggested-card-body span {
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
    background: var(--primary);
    padding: 3px 10px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 0.6rem;
}

.suggested-card-body h4 {
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.5;
    color: #1a202c;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-read-more-suggested {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 28px;
    background: #CC581F !important;
    color: #fff !important;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    box-shadow: 0 4px 15px rgba(204, 88, 31, 0.3);
}

.btn-read-more-suggested:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(204, 88, 31, 0.3);
    color: #fff;
}

/* FAQ Accordion Styles */
.article-faq-section {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 2px dashed #e2e8f0;
}

.article-faq-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-accordion-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-accordion-header {
    padding: 1.2rem 1.5rem;
    font-weight: 800;
    font-size: 1.05rem;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    background: #f8fafc;
    transition: background 0.3s;
}

.faq-accordion-header:hover {
    background: #f1f5f9;
}

.faq-accordion-header i {
    color: var(--primary);
    transition: transform 0.3s ease;
}

.faq-accordion-item.active .faq-accordion-header i {
    transform: rotate(180deg);
}

.faq-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
    padding: 0 1.5rem;
    color: #475569;
    font-size: 1rem;
    line-height: 1.8;
    background: #fff;
}

.faq-accordion-item.active .faq-accordion-body {
    max-height: 1000px;
    padding: 1.2rem 1.5rem 1.5rem;
    border-top: 1px solid #f1f5f9;
}

/* CTA Section Styles */
.article-cta-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    margin: 4rem 0;
    border: 1px solid #e2e8f0;
}

.article-cta-box h3 {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 1rem;
}

.article-cta-box p {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #25d366;
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

.cta-wa-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.3);
    background: #20ba5a;
    color: #fff;
}

/* TOC Styling */
.sidebar-toc {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 1rem;
}

.toc-link {
    text-decoration: none;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding-right: 18px;
    position: relative;
    line-height: 1.4;
}

.toc-link::before {
    content: '';
    position: absolute;
    right: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.4;
    transition: all 0.3s ease;
}

.toc-link:hover {
    color: var(--primary);
    padding-right: 22px;
}

.toc-link:hover::before {
    opacity: 1;
    transform: scale(1.2);
}

.toc-link.h3 {
    padding-right: 32px;
    font-size: 0.85rem;
    font-weight: 500;
}

.toc-link.h3::before {
    right: 18px;
    width: 4px;
    height: 4px;
    top: 7px;
}

.toc-link.h3:hover {
    padding-right: 36px;
}

/* Sidebar Article Card Improvements */
.sidebar-post-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    align-items: center;
}

.sidebar-post-card:hover {
    transform: translateX(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.sidebar-post-img {
    width: 65px;
    height: 65px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
}

.sidebar-post-content {
    flex: 1;
    min-width: 0;
}

.sidebar-post-content h5 {
    font-size: 0.82rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: #1a202c;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-read-more {
    font-size: 0.72rem;
    color: var(--secondary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Mobile Specific Updates */
@media (max-width: 991px) {
    .blog-post-grid {
        display: flex;
        flex-direction: column;
    }

    .blog-sidebar {
        order: 1;
        margin-bottom: 2rem;
    }

    .blog-article {
        order: 2;
    }

    .blog-article-img-fixed {
        object-fit: contain !important;
        height: auto !important;
        max-height: 400px;
        background: #f8fafc;
    }
}

/* First paragraph styling */
.article-body p:first-of-type {
    color: var(--primary-dark) !important;
    opacity: 0.6;
    font-weight: 600;
}
