/* =========================================
   SINGLE BLOG POST STYLES
   File: assets/css/blog-post.css
   ========================================= */

/* --- 1. Layout & Container --- */
.blog-post-page {
    background: #f8fafc;
    padding-top: 100px;
}

.blog-post-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px; /* Main Content + Sidebar */
    gap: 40px;
    padding: 40px 20px;
}

/* --- 2. Post Main Content --- */
.blog-post-main {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

/* Header */
.post-header {
    padding: 40px;
    background: linear-gradient(to bottom, #fff, #f8fafc);
    border-bottom: 1px solid var(--gray-100);
    text-align: center;
}

.post-category-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-50);
    color: var(--primary-700);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.post-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.2;
    margin-bottom: 24px;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--gray-500);
    font-size: 14px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-meta i {
    color: var(--primary-500);
}

/* Featured Image */
.post-featured-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

/* Content Typography */
.post-content {
    padding: 40px;
    font-size: 18px; /* High readability */
    line-height: 1.8;
    color: #334155;
    font-family: 'Inter', sans-serif;
}

.post-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-100);
}

.post-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-top: 30px;
    margin-bottom: 16px;
}

.post-content p {
    margin-bottom: 24px;
}

.post-content ul, .post-content ol {
    margin-bottom: 24px;
    padding-left: 20px;
}

.post-content li {
    margin-bottom: 10px;
}

/* Links inside post */
.post-content a {
    color: var(--primary-600);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.post-content a:hover {
    color: var(--primary-800);
}

/* Blockquotes */
.post-content blockquote {
    background: #f8fafc;
    border-left: 5px solid var(--primary-500);
    padding: 24px;
    font-style: italic;
    font-size: 1.1em;
    color: var(--gray-700);
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 16px;
}

.post-content th {
    background: var(--gray-100);
    text-align: left;
    padding: 12px;
    font-weight: 600;
}

.post-content td {
    border-bottom: 1px solid var(--gray-200);
    padding: 12px;
}

/* --- 3. Special Components (Info Boxes) --- */
.info-box {
    padding: 24px;
    border-radius: 12px;
    margin: 30px 0;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.info-box.tip {
    background: #ecfdf5; /* Green tint */
    border: 1px solid #a7f3d0;
}

.info-box.note {
    background: #eff6ff; /* Blue tint */
    border: 1px solid #bfdbfe;
}

.info-box.warning {
    background: #fff7ed; /* Orange tint */
    border: 1px solid #fed7aa;
}

.info-box i {
    font-size: 24px;
    margin-top: 4px;
}

.info-box.tip i { color: #059669; }
.info-box.note i { color: #2563eb; }
.info-box.warning i { color: #ea580c; }

/* Key Takeaways Box */
.key-takeaways {
    background: #f1f5f9;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.key-takeaways h4 {
    margin-top: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- 4. Sidebar --- */
.blog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
    color: var(--gray-900);
}

/* Table of Contents */
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 10px;
}

.toc-link {
    text-decoration: none;
    color: var(--gray-600);
    font-size: 14px;
    transition: all 0.2s;
    display: block;
    padding: 4px 0;
    border-left: 2px solid transparent;
    padding-left: 10px;
}

.toc-link:hover, .toc-link.active {
    color: var(--primary-600);
    border-left-color: var(--primary-600);
    font-weight: 500;
}

/* Related Posts (Sidebar) */
.related-post {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.related-post img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.related-post-info h5 {
    margin: 0 0 4px 0;
    font-size: 14px;
    line-height: 1.4;
}

.related-post-info h5 a {
    text-decoration: none;
    color: var(--gray-800);
    transition: color 0.2s;
}

.related-post-info h5 a:hover {
    color: var(--primary-600);
}

.related-date {
    font-size: 12px;
    color: var(--gray-500);
}

/* --- 5. Share Buttons (Sticky Bottom or Inline) --- */
.share-container {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.2s;
}

.share-btn:hover { transform: translateY(-3px); }
.share-btn.facebook { background: #3b5998; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.whatsapp { background: #25d366; }

/* --- 6. Responsive --- */
@media (max-width: 1024px) {
    .blog-post-container {
        grid-template-columns: 1fr;
    }
    .blog-sidebar {
        display: none; /* Hide sidebar on mobile or move to bottom */
    }
}

@media (max-width: 768px) {
    .post-header, .post-content {
        padding: 24px;
    }
    .post-title {
        font-size: 2rem;
    }
}
/* Author Box Styling for EEAT */
.author-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-top: 40px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.author-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 5px;
    flex-shrink: 0;
}

.author-details h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 700;
}

.author-details p {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
}

.author-link {
    font-size: 0.9rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.author-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .author-box {
        flex-direction: column;
        text-align: center;
    }
}