/* ================================================================
   Blog Detail Page — Professional Layout
   ================================================================ */

/* ---------- Hero Section ---------- */
.blog-hero {
    position: relative;
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    overflow: hidden;
}
.blog-hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 600px 400px at 20% 50%, rgba(74, 222, 128, 0.08), transparent),
                radial-gradient(ellipse 500px 300px at 80% 50%, rgba(59, 130, 246, 0.06), transparent);
    pointer-events: none;
}
.blog-hero-content {
    position: relative;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}
.breadcrumb a {
    color: #4ade80;
    text-decoration: none;
    transition: opacity 0.2s;
}
.breadcrumb a:hover { opacity: 0.8; text-decoration: underline; }
.breadcrumb-sep { color: #555; }
.breadcrumb-current { color: #999; }

/* Category Badge */
.post-category-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

/* Title */
.post-title {
    font-size: 44px;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Excerpt */
.post-excerpt {
    font-size: 18px;
    color: #94a3b8;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 24px;
}

/* Meta Bar */
.post-meta-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 8px;
}
.post-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #8892b0;
}
.meta-icon { font-size: 15px; }
.post-meta-item time { color: #8892b0; }

/* ---------- Main Layout ---------- */
.blog-post-layout {
    background: #121216;
    padding: 0 0 80px;
}
.blog-post-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin-top: -40px;
    align-items: start;
}

/* ---------- Article Main ---------- */
.blog-post-main {
    min-width: 0;
}
.blog-article {
    background: #1a1a1d;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

/* Featured Image */
.featured-image-wrapper {
    position: relative;
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}
.featured-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}
.featured-image-badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* Article Content */
.article-content {
    padding: 48px;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.85;
}
.article-content p {
    margin: 0 0 1.4em;
}
.article-content h2 {
    font-size: 28px;
    color: #fff;
    margin: 2em 0 0.6em;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a2a30;
    font-weight: 700;
    scroll-margin-top: 100px;
}
.article-content h3 {
    font-size: 22px;
    color: #e2e8f0;
    margin: 1.6em 0 0.5em;
    font-weight: 600;
    scroll-margin-top: 100px;
}
.article-content h4 {
    font-size: 18px;
    color: #e2e8f0;
    margin: 1.4em 0 0.4em;
    font-weight: 600;
}
.article-content ul,
.article-content ol {
    margin: 1em 0;
    padding-left: 24px;
}
.article-content li {
    margin: 0.5em 0;
}
.article-content a {
    color: #4ade80;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s;
}
.article-content a:hover { opacity: 0.8; }

/* Table */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 15px;
}
.article-content th,
.article-content td {
    padding: 12px 16px;
    border: 1px solid #2a2a30;
    text-align: left;
}
.article-content th {
    background: #222228;
    color: #e2e8f0;
    font-weight: 600;
}
.article-content td {
    background: #16161a;
}

/* Blockquote */
.article-content blockquote {
    margin: 1.5em 0;
    padding: 16px 24px;
    border-left: 4px solid #4ade80;
    background: rgba(74, 222, 128, 0.06);
    border-radius: 0 8px 8px 0;
    color: #94a3b8;
    font-style: italic;
}

/* Code */
.article-content code {
    background: #222228;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e2e8f0;
}
.article-content pre {
    background: #111115;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    border: 1px solid #2a2a30;
    margin: 1.5em 0;
}
.article-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

/* ---------- Article Footer ---------- */
.article-tags {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 48px;
    border-top: 1px solid #2a2a30;
    flex-wrap: wrap;
}
.tags-label {
    font-size: 14px;
    color: #8892b0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tags-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.tag-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}
.tag-badge:hover {
    background: rgba(74, 222, 128, 0.2);
    border-color: #4ade80;
}

/* Author Card */
.author-card {
    display: flex;
    gap: 20px;
    padding: 32px 48px;
    border-top: 1px solid #2a2a30;
    background: #1e1e22;
}
.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4ade80, #22d3ee);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #000;
    font-weight: 800;
    flex-shrink: 0;
}
.author-info { flex: 1; }
.author-name {
    font-size: 18px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 6px;
}
.author-bio {
    font-size: 14px;
    color: #8892b0;
    line-height: 1.6;
}

/* Share Section */
.share-section {
    padding: 32px 48px;
    border-top: 1px solid #2a2a30;
}
.share-divider {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}
.share-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #2a2a30;
}
.share-divider span {
    position: relative;
    background: #1a1a1d;
    padding: 0 16px;
    color: #8892b0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #2a2a30;
    background: #1e1e22;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s;
}
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.share-twitter:hover { background: #1DA1F2; color: #fff; border-color: #1DA1F2; }
.share-facebook:hover { background: #1877F2; color: #fff; border-color: #1877F2; }
.share-whatsapp:hover { background: #25D366; color: #fff; border-color: #25D366; }
.share-copy:hover { background: #4ade80; color: #000; border-color: #4ade80; }

/* Back Navigation */
.back-nav {
    margin-top: 32px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4ade80;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: gap 0.2s;
}
.back-link:hover { gap: 12px; }

/* ---------- Sidebar ---------- */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 24px;
}
.sidebar-card {
    background: #1a1a1d;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #2a2a30;
}
.sidebar-title {
    font-size: 16px;
    color: #fff;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2a2a30;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* TOC */
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.toc-item {
    margin: 0;
}
.toc-item a {
    display: block;
    padding: 6px 0;
    color: #8892b0;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    padding-left: 12px;
}
.toc-item a:hover {
    color: #4ade80;
}
.toc-item a.toc-active {
    color: #4ade80;
    border-left-color: #4ade80;
    font-weight: 600;
}
.toc-level-2 a { padding-left: 24px; font-size: 13px; }

/* Related in Sidebar */
.sidebar-related-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sidebar-related-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    transition: all 0.2s;
}
.sidebar-related-item:hover { opacity: 0.85; }
.sidebar-related-img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.sidebar-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sidebar-related-info { flex: 1; min-width: 0; }
.sidebar-related-info h4 {
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sidebar-related-date {
    font-size: 12px;
    color: #666;
}

/* Newsletter Sidebar */
.sidebar-newsletter p {
    font-size: 14px;
    color: #8892b0;
    line-height: 1.6;
    margin-bottom: 16px;
}
.sidebar-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sidebar-newsletter-form input {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #2a2a30;
    background: #121216;
    color: #e2e8f0;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.sidebar-newsletter-form input:focus {
    border-color: #4ade80;
}
.sidebar-newsletter-form button {
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: #4ade80;
    color: #000;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.sidebar-newsletter-form button:hover {
    background: #22c55e;
    transform: translateY(-1px);
}

/* ---------- Responsive ---------- */
@media (max-width: 968px) {
    .blog-post-grid {
        grid-template-columns: 1fr;
    }
    .blog-sidebar {
        position: static;
        order: -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .post-title { font-size: 32px; }
    .article-content { padding: 32px; }
    .article-tags { padding: 20px 32px; }
    .author-card { padding: 24px 32px; }
    .share-section { padding: 24px 32px; }
}

@media (max-width: 640px) {
    .blog-hero { padding: 40px 0 40px; }
    .post-title { font-size: 26px; }
    .post-excerpt { font-size: 16px; }
    .post-meta-bar { gap: 6px 16px; }
    .post-meta-item { font-size: 13px; }
    .article-content { padding: 20px; font-size: 16px; }
    .article-content h2 { font-size: 22px; }
    .article-content h3 { font-size: 18px; }
    .article-tags { padding: 16px 20px; }
    .author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    .share-section { padding: 16px 20px; }
    .share-buttons { gap: 8px; }
    .share-btn { padding: 8px 14px; font-size: 13px; }
    .blog-sidebar { grid-template-columns: 1fr; }
}
