/* ============================================================
        :: BLACK AND WHITE THEME BLOG DETAIL PAGE
        ============================================================ */
        :root {
            --primary-color: #000000;
            --secondary-color: #333333;
            --light-color: #ffffff;
            --dark-color: #111111;
            --gray-color: #666666;
            --light-gray: #f5f5f5;
            --medium-gray: #e0e0e0;
            --dark-gray: #1a1a1a;
            --text-color: #222222;
            --transition: all 0.3s ease;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: var(--light-color);
            color: var(--text-color);
            line-height: 1.6;
        }

        .container {
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* Header Styles */
        header {
            background-color: white;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
            position: sticky;
            top: 0;
            z-index: 100;
            border-bottom: 1px solid var(--medium-gray);
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 0;
        }

        .logo {
            font-size: 28px;
            font-weight: 900;
            color: var(--primary-color);
            text-decoration: none;
            letter-spacing: -1px;
        }

        .logo span {
            color: var(--secondary-color);
            font-weight: 300;
        }

        nav ul {
            display: flex;
            list-style: none;
        }

        nav ul li {
            margin-left: 30px;
        }

        nav ul li a {
            text-decoration: none;
            color: var(--dark-color);
            font-weight: 600;
            font-size: 16px;
            transition: var(--transition);
            position: relative;
        }

        nav ul li a:hover {
            color: var(--gray-color);
        }

        nav ul li a.active {
            color: var(--primary-color);
        }

        nav ul li a.active::after {
            content: '';
            position: absolute;
            width: 100%;
            height: 2px;
            background-color: var(--primary-color);
            bottom: -5px;
            left: 0;
        }

        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            font-size: 24px;
            color: var(--primary-color);
            cursor: pointer;
        }

        /* Blog Detail Hero */
        .blog-detail-hero {
            background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.9)), url('https://images.unsplash.com/photo-1555066931-4365d14bab8c?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
            background-size: cover;
            background-position: center;
            color: white;
            padding: 100px 20px;
            margin-bottom: 60px;
            text-align: center;
        }

        .blog-detail-hero h1 {
            font-size: 42px;
            margin-bottom: 20px;
            max-width: 900px;
            margin-left: auto;
            margin-right: auto;
            line-height: 1.3;
            font-weight: 800;
        }

        .blog-meta {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
            margin-bottom: 20px;
        }

        .blog-category {
            display: inline-block;
            background-color: var(--light-color);
            color: var(--primary-color);
            padding: 8px 20px;
            border-radius: 30px;
            font-size: 14px;
            font-weight: 700;
            margin-right: 20px;
            margin-bottom: 10px;
            border: 1px solid #ddd;
        }

        .blog-date, .blog-reading-time, .blog-author {
            display: flex;
            align-items: center;
            margin-right: 25px;
            margin-bottom: 10px;
            font-size: 16px;
            opacity: 0.9;
        }

        .blog-date i, .blog-reading-time i, .blog-author i {
            margin-right: 8px;
            color: #999;
        }

        /* Main Content */
        .blog-detail-container {
            display: flex;
            gap: 40px;
            margin-bottom: 80px;
        }

        .blog-content {
            flex: 1;
            min-width: 300px;
            background-color: var(--light-color);
            border-radius: 8px;
            padding: 50px;
            box-shadow: 0 5px 25px rgba(0, 0, 0, 0.03);
            border: 1px solid var(--medium-gray);
        }

        .blog-sidebar {
            width: 350px;
        }

        /* Blog Content Styles */
        .blog-featured-image {
            width: 100%;
            height: 480px;
            object-fit: cover;
            border-radius: 10px;
            margin-bottom: 40px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
            filter: grayscale(20%);
            transition: var(--transition);
        }

        .blog-content:hover .blog-featured-image {
            filter: grayscale(0%);
        }

        .blog-intro {
            font-size: 20px;
            line-height: 1.7;
            color: var(--secondary-color);
            margin-bottom: 40px;
            padding-bottom: 30px;
            border-bottom: 1px solid var(--medium-gray);
            font-weight: 500;
        }

        .blog-section {
            margin-bottom: 40px;
        }

        .blog-section h2 {
            font-size: 28px;
            color: var(--primary-color);
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--light-gray);
            font-weight: 800;
        }

        .blog-section h3 {
            font-size: 22px;
            color: var(--secondary-color);
            margin: 30px 0 15px;
            font-weight: 700;
        }

        .blog-section p {
            margin-bottom: 20px;
            font-size: 18px;
            line-height: 1.8;
            color: var(--gray-color);
        }

        .blog-section ul, .blog-section ol {
            margin-bottom: 25px;
            padding-left: 30px;
        }

        .blog-section li {
            margin-bottom: 10px;
            font-size: 18px;
            line-height: 1.7;
            color: var(--gray-color);
        }

        .highlight-box {
            background-color: rgba(0, 0, 0, 0.03);
            border-left: 4px solid var(--primary-color);
            padding: 25px;
            margin: 30px 0;
            border-radius: 0 10px 10px 0;
        }

        .highlight-box p {
            margin-bottom: 0;
            font-style: italic;
            color: var(--secondary-color);
        }

        .code-snippet {
            background-color: #1a1a1a;
            color: #abb2bf;
            padding: 25px;
            border-radius: 10px;
            margin: 30px 0;
            overflow-x: auto;
            font-family: 'Courier New', monospace;
            font-size: 16px;
            line-height: 1.5;
            border: 1px solid #333;
        }

        .blog-section img {
            width: 100%;
            border-radius: 10px;
            margin: 30px 0;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
            filter: grayscale(20%);
            transition: var(--transition);
        }

        .blog-section:hover .blog-image {
            filter: grayscale(0%);
        }

        .image-caption {
            text-align: center;
            font-style: italic;
            color: var(--gray-color);
            margin-top: -20px;
            margin-bottom: 30px;
            font-size: 16px;
        }

        .trend-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 30px;
            margin: 40px 0;
        }

        .trend-item {
            background-color: var(--light-gray);
            padding: 25px;
            border-radius: 10px;
            border-top: 4px solid var(--primary-color);
            transition: var(--transition);
            border: 1px solid #ddd;
        }

        .trend-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
            border-color: #ccc;
        }

        .trend-number {
            display: inline-block;
            background-color: var(--primary-color);
            color: var(--light-color);
            width: 40px;
            height: 40px;
            border-radius: 50%;
            text-align: center;
            line-height: 40px;
            font-weight: 900;
            margin-bottom: 15px;
        }

        .trend-item h3 {
            margin-top: 0;
            font-size: 20px;
            color: var(--primary-color);
            font-weight: 700;
        }

        .trend-item p {
            color: var(--gray-color);
        }

        /* Social Sharing */
        .social-sharing {
            display: flex;
            align-items: center;
            padding: 30px 0;
            margin: 40px 0;
            border-top: 1px solid var(--medium-gray);
            border-bottom: 1px solid var(--medium-gray);
        }

        .share-label {
            font-weight: 600;
            margin-right: 20px;
            color: var(--primary-color);
        }

        .share-icons {
            display: flex;
            gap: 15px;
        }

        .share-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 45px;
            height: 45px;
            border-radius: 50%;
            color: white;
            font-size: 18px;
            text-decoration: none;
            transition: var(--transition);
            filter: grayscale(20%);
        }

        .share-icon:hover {
            transform: translateY(-3px);
            filter: grayscale(0%);
        }

        .share-icon.facebook {
            background-color: #3b5998;
        }

        .share-icon.twitter {
            background-color: #1da1f2;
        }

        .share-icon.linkedin {
            background-color: #0077b5;
        }

        .share-icon.whatsapp {
            background-color: #25d366;
        }

        /* Author Bio */
        .author-bio {
            display: flex;
            align-items: center;
            background-color: var(--light-gray);
            padding: 30px;
            border-radius: 10px;
            margin: 40px 0;
            border: 1px solid #ddd;
        }

        .author-avatar {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            margin-right: 25px;
            object-fit: cover;
            border: 4px solid var(--light-color);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            filter: grayscale(30%);
        }

        .author-bio:hover .author-avatar {
            filter: grayscale(0%);
        }

        .author-info h3 {
            margin-bottom: 10px;
            color: var(--primary-color);
            font-weight: 700;
        }

        .author-info p {
            margin-bottom: 0;
            font-size: 16px;
            opacity: 0.9;
            color: var(--gray-color);
        }

        /* Sidebar Styles */
        .sidebar-widget {
            background-color: var(--light-color);
            border-radius: 8px;
            padding: 30px;
            margin-bottom: 30px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
            border: 1px solid var(--medium-gray);
        }

        .widget-title {
            font-size: 20px;
            color: var(--primary-color);
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid var(--light-gray);
            font-weight: 800;
        }

        .categories-list {
            list-style: none;
        }

        .categories-list li {
            margin-bottom: 15px;
        }

        .categories-list li a {
            display: flex;
            justify-content: space-between;
            color: var(--dark-color);
            text-decoration: none;
            transition: var(--transition);
            padding: 5px 0;
        }

        .categories-list li a:hover {
            color: var(--gray-color);
            transform: translateX(5px);
        }

        .categories-list li a span {
            background-color: var(--light-gray);
            padding: 2px 10px;
            border-radius: 20px;
            font-size: 14px;
            color: var(--gray-color);
            border: 1px solid #ddd;
        }

        .recent-posts li {
            display: flex;
            margin-bottom: 20px;
            padding-bottom: 20px;
            border-bottom: 1px solid var(--light-gray);
        }

        .recent-posts li:last-child {
            margin-bottom: 0;
            padding-bottom: 0;
            border-bottom: none;
        }

        .recent-post-img {
            width: 80px;
            height: 80px;
            object-fit: cover;
            border-radius: 5px;
            margin-right: 15px;
            filter: grayscale(30%);
            transition: var(--transition);
        }

        .recent-posts li:hover .recent-post-img {
            filter: grayscale(0%);
        }

        .recent-post-content h4 {
            font-size: 16px;
            margin-bottom: 8px;
            font-weight: 700;
        }

        .recent-post-content h4 a {
            color: var(--dark-color);
            text-decoration: none;
            transition: var(--transition);
        }

        .recent-post-content h4 a:hover {
            color: var(--gray-color);
        }

        .recent-post-content span {
            font-size: 14px;
            color: var(--gray-color);
        }

        .tags-container {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .tag {
            background-color: var(--light-gray);
            color: var(--dark-color);
            padding: 8px 15px;
            border-radius: 30px;
            font-size: 14px;
            text-decoration: none;
            transition: var(--transition);
            border: 1px solid #ddd;
        }

        .tag:hover {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }

        /* Related Posts */
        .related-posts {
            margin: 80px 0;
        }

        .section-title {
            font-size: 32px;
            color: var(--primary-color);
            margin-bottom: 40px;
            text-align: center;
            font-weight: 800;
        }

        .related-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 30px;
        }

        .related-post {
            background-color: var(--light-color);
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
            transition: var(--transition);
            border: 1px solid var(--medium-gray);
        }

        .related-post:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
            border-color: #ccc;
        }

        .related-post-img {
            width: 100%;
            height: 200px;
            object-fit: cover;
            filter: grayscale(20%);
            transition: var(--transition);
        }

        .related-post:hover .related-post-img {
            filter: grayscale(0%);
        }

        .related-post-content {
            padding: 25px;
        }

        .related-post-category {
            display: inline-block;
            background-color: var(--light-gray);
            color: var(--primary-color);
            padding: 5px 15px;
            border-radius: 30px;
            font-size: 14px;
            font-weight: 700;
            margin-bottom: 15px;
            border: 1px solid #ddd;
        }

        .related-post-title {
            font-size: 20px;
            margin-bottom: 15px;
            color: var(--primary-color);
            font-weight: 700;
        }

        .related-post-content p {
            color: var(--gray-color);
        }

        /* Newsletter Section */
        .newsletter {
            background-color: var(--primary-color);
            color: white;
            padding: 60px 40px;
            text-align: center;
            border-radius: 8px;
            margin: 80px 0;
        }

        .newsletter h2 {
            font-size: 36px;
            margin-bottom: 20px;
            font-weight: 800;
        }

        .newsletter p {
            max-width: 600px;
            margin: 0 auto 30px;
            opacity: 0.9;
            color: #ddd;
        }

        .newsletter-form {
            max-width: 500px;
            margin: 0 auto;
            display: flex;
        }

        .newsletter-form input {
            flex: 1;
            padding: 18px 25px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 50px 0 0 50px;
            font-size: 16px;
            background-color: rgba(255, 255, 255, 0.1);
            color: white;
        }

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

        .newsletter-form button {
            background-color: var(--light-color);
            color: var(--primary-color);
            border: none;
            border-radius: 0 50px 50px 0;
            padding: 0 35px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: var(--transition);
        }

        .newsletter-form button:hover {
            background-color: var(--light-gray);
        }

        /* Footer */
        footer {
            background-color: #111111;
            color: white;
            padding: 80px 0 40px;
            border-top: 1px solid #333;
        }

        .footer-content {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            margin-bottom: 60px;
        }

        .footer-column {
            flex: 1;
            min-width: 250px;
            margin-bottom: 40px;
            padding-right: 20px;
        }

        .footer-column h3 {
            font-size: 22px;
            margin-bottom: 25px;
            color: white;
            font-weight: 800;
        }

        .footer-column p {
            opacity: 0.7;
            margin-bottom: 25px;
            max-width: 300px;
            line-height: 1.7;
            color: #bbb;
        }

        .contact-info {
            list-style: none;
        }

        .contact-info li {
            display: flex;
            align-items: flex-start;
            margin-bottom: 20px;
            opacity: 0.8;
            color: #bbb;
        }

        .contact-info li i {
            margin-right: 15px;
            color: #bbb;
            margin-top: 5px;
        }

        .footer-links {
            list-style: none;
        }

        .footer-links li {
            margin-bottom: 15px;
        }

        .footer-links li a {
            color: rgba(255, 255, 255, 0.7);
            text-decoration: none;
            transition: var(--transition);
        }

        .footer-links li a:hover {
            color: white;
            padding-left: 5px;
        }

        .copyright {
            text-align: center;
            padding-top: 40px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            opacity: 0.5;
            font-size: 14px;
            color: #888;
        }

        /* Breadcrumb */
        .detail-breadcrumb {
            padding: 16px 0;
            font-size: 13.5px;
            color: #888;
        }
        .detail-breadcrumb a { color: #888; text-decoration: none; }
        .detail-breadcrumb a:hover { color: #000; text-decoration: underline; }
        .detail-breadcrumb .sep { margin: 0 8px; color: #ccc; }
        .detail-breadcrumb .current { color: #000; font-weight: 600; }

        /* Table of contents (auto-generated) */
        .article-toc {
            background: #f7f7f7;
            border: 1px solid #e5e5e5;
            border-radius: 12px;
            padding: 20px 24px;
            margin: 0 0 32px;
        }
        .article-toc summary {
            font-weight: 800;
            cursor: pointer;
            list-style: none;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .article-toc summary::-webkit-details-marker { display: none; }
        .article-toc summary::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 12px; transition: transform 0.2s ease; }
        .article-toc[open] summary::after { transform: rotate(180deg); }
        .article-toc ol { margin: 16px 0 0; padding-left: 20px; }
        .article-toc li { margin-bottom: 8px; }
        .article-toc a { color: #333; text-decoration: none; font-size: 14.5px; }
        .article-toc a:hover { color: #000; text-decoration: underline; }
        @media (min-width: 993px) {
            .article-toc { position: sticky; top: 24px; }
        }

        /* Copy-code button on code snippets */
        .code-block-wrap { position: relative; }
        .copy-code-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(255,255,255,0.1);
            color: #fff;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 6px;
            padding: 6px 12px;
            font-size: 12px;
            cursor: pointer;
            transition: var(--transition);
        }
        .copy-code-btn:hover { background: rgba(255,255,255,0.2); }

        /* Sidebar sticks while scrolling a long article, matches blog.php */
        @media (min-width: 993px) {
            .blog-sidebar { position: sticky; top: 24px; align-self: flex-start; }
        }

        @media print {
            header, .blog-sidebar, .related-posts, .newsletter, .social-sharing,
            .back-to-blog, #readingProgress, .detail-breadcrumb, footer { display: none !important; }
        }

        /* Back to Blog */
        .back-to-blog {
            display: inline-block;
            margin-bottom: 30px;
            color: white;
            text-decoration: none;
            font-weight: 600;
            transition: var(--transition);
        }

        .back-to-blog:hover {
            color: #ddd;
        }

        .back-to-blog i {
            margin-right: 8px;
        }

        /* Responsive Styles */
        @media (max-width: 1100px) {
            .blog-detail-container {
                flex-direction: column;
            }
            
            .blog-sidebar {
                width: 100%;
            }
            
            .related-grid {
                grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            }
        }

        @media (max-width: 768px) {
            .header-content {
                flex-direction: column;
                text-align: center;
            }
            
            nav ul {
                margin-top: 20px;
                flex-wrap: wrap;
                justify-content: center;
            }
            
            nav ul li {
                margin: 0 10px 10px;
            }
            
            .blog-detail-hero h1 {
                font-size: 32px;
            }
            
            .blog-meta {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .blog-content {
                padding: 30px;
            }
            
            .author-bio {
                flex-direction: column;
                text-align: center;
            }
            
            .author-avatar {
                margin-right: 0;
                margin-bottom: 20px;
            }
            
            .newsletter-form {
                flex-direction: column;
            }
            
            .newsletter-form input {
                border-radius: 50px;
                margin-bottom: 15px;
            }
            
            .newsletter-form button {
                border-radius: 50px;
                padding: 18px;
            }
            
            .trend-list {
                grid-template-columns: 1fr;
            }
            
            .footer-content {
                flex-direction: column;
            }
            
            .footer-column {
                padding-right: 0;
            }
        }

        @media (max-width: 576px) {
            .mobile-menu-btn {
                display: block;
                position: absolute;
                top: 25px;
                right: 20px;
            }
            
            nav {
                width: 100%;
                display: none;
            }
            
            nav.show {
                display: block;
            }
            
            nav ul {
                flex-direction: column;
                margin-top: 20px;
            }
            
            nav ul li {
                margin: 0 0 15px 0;
            }
            
            .blog-detail-hero {
                padding: 80px 20px;
            }
            
            .social-sharing {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .share-label {
                margin-bottom: 15px;
                margin-right: 0;
            }
            
            .related-grid {
                grid-template-columns: 1fr;
            }
        }
