/* Blog Detail Specific Styles */
.blog-detail-main {
    padding: 5rem 0;
    background-color: var(--background);
    min-height: 100vh;
}

.blog-detail-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    position: relative;
}

.blog-detail-content {
    grid-column: 1;
}

.blog-detail-sidebar {
    grid-column: 2;
    position: relative;
    
}

.sidebar-sticky-container {
  position: sticky;
  top: 120px; /* Adjust based on your header height */
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-height: fit-content;
  overflow-y: auto;
  padding-right: 10px;
}


/* Hide scrollbar but keep functionality */
.sidebar-sticky-container::-webkit-scrollbar {
    display: none;
}

.blog-detail-header {
    margin-bottom: 3rem;
}

.blog-category {
    background-color: var(--primary);
    color: var(--primary-foreground);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.blog-title {
    font-size: 2.5rem;
    color: var(--foreground);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.blog-meta {
    display: flex;
    gap: 1.5rem;
    color: #a1a1aa;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.blog-featured-image {
    height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
}

.blog-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-detail-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--foreground);
}

.blog-detail-body h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1.5rem;
    color: var(--foreground);
    position: relative;
    padding-bottom: 0.75rem;
}

.blog-detail-body h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary);
}

.blog-detail-body p {
    margin-bottom: 1.5rem;
}

.blog-navigation {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.back-to-blog {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.back-to-blog:hover {
    color: #eab308;
}

/* Sidebar Styles */
.sidebar-box {
    background-color: var(--card);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sidebar-box h3 {
    font-size: 1.25rem;
    color: var(--foreground);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-box h3 i {
    color: var(--primary);
}

.sidebar-box h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

/* Table of Contents Styles */
#tocList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#tocList li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 15px;
}

#tocList li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

#tocList li a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: block;
}

#tocList li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

#tocList li.active a {
    color: var(--primary);
    font-weight: 600;
}

#tocList li.active::before {
    background-color: var(--primary);
    transform: scale(1.5);
}
/* 
.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1rem;
}

.table-of-contents li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
}

.table-of-contents a {
    color: var(--foreground);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    display: block;
    padding: 0.25rem 0;
}

.table-of-contents a:hover {
    color: var(--primary);
    padding-left: 5px;
} */

.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.popular-post {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.popular-post:hover {
    background-color: rgba(250, 204, 21, 0.1);
    transform: translateX(3px);
}

.popular-post-image {
    width: 80px;
    height: 60px;
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.popular-post:hover .popular-post-image img {
    transform: scale(1.05);
}

.popular-post-content {
    flex: 1;
}


.popular-post-content h4 {
    font-size: 0.95rem;
    color: var(--foreground);
    margin-bottom: 5px;
    line-height: 1.4;
}

.popular-post-content span {
    font-size: 0.8rem;
    color: var(--text-gray);
}


.popular-post-title {
    font-size: 0.95rem;
    color: var(--foreground);
    margin-bottom: 0.25rem;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.popular-post:hover .popular-post-title {
    color: var(--primary);
}

.popular-post-date {
    font-size: 0.75rem;
    color: #a1a1aa;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .blog-detail-sidebar {
        grid-column: 1;
    }
    
    .sidebar-container {
        position: static;
        max-height: none;
        grid-template-columns: repeat(2, 1fr);
        display: grid;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .sidebar-container {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .blog-detail-grid {
        grid-template-columns: 1fr;
    }

    .blog-detail-sidebar {
        grid-column: 1;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .sidebar-box {
        position: static;
        margin-bottom: 0;
    }

    .blog-title {
        font-size: 2.2rem;
    }

    .blog-featured-image {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .blog-detail-sidebar {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .blog-title {
        font-size: 2rem;
    }

    .blog-featured-image {
        height: 300px;
    }

    .blog-detail-body h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .blog-detail-main {
        padding: 3rem 0;
    }

    .blog-title {
        font-size: 1.8rem;
    }

    .blog-featured-image {
        height: 250px;
    }

    .blog-meta {
        gap: 1rem;
        font-size: 0.85rem;
    }

    .popular-post {
        gap: 0.75rem;
        padding: 0.5rem;
    }

    .popular-post-image {
        width: 70px;
        height: 50px;
    }
}