/* Blog Page Styles */

/* Scrollbar hide for category chips */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Filter category button transitions */
.filter-category {
    transition: all 0.3s ease;
}

/* Blog card hover effects */
.blog-card {
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-2px);
}

.blog-card-image {
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image {
    transform: scale(1.05);
}

/* Search input focus states */
.search-input-container {
    transition: border-color 0.3s ease;
}

/* Load more button loading state */
#load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Empty state */
.empty-state {
    transition: opacity 0.3s ease;
}

/* Sidebar widget hover effects */
.sidebar-widget-link {
    transition: all 0.3s ease;
}

.sidebar-widget-link:hover {
    transform: translateX(4px);
}

.sidebar-widget-image {
    transition: transform 0.3s ease;
}

.sidebar-widget-link:hover .sidebar-widget-image {
    transform: scale(1.1);
}

/* Newsletter widget */
.newsletter-widget {
    position: relative;
    overflow: hidden;
}

.newsletter-icon-bg {
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .blog-card:hover {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    }
}

/* ========== BLOG DETAIL PAGE ========== */

@media (min-width: 1024px) {
    .blog-main-col {
        flex: 0 0 75%;
        max-width: 75%;
    }
    .blog-side-col {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* TOC box */
.toc-box {
    background: #f3f4f6; /* gray-100 */
}
.dark .toc-box {
    background: rgba(255, 255, 255, 0.06);
}

.toc-box .toc-list {
    list-style: disc;
    padding-left: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
}
.toc-box .toc-list li {
    list-style: disc;
    margin: 0.25rem 0;
}
.toc-box .toc-list li.toc-main > a {
    font-weight: 400;
    color: #0d101b;
}
.dark .toc-box .toc-list li.toc-main > a {
    color: #fff;
}
.toc-box .toc-list li.toc-sub {
    list-style-type: circle;
    margin-left: 1rem;
}
.toc-box .toc-list li.toc-sub > a {
    color: #4c599a;
}
.dark .toc-box .toc-list li.toc-sub > a {
    color: #d1d5db;
}
.toc-box .toc-list li.toc-subsub {
    list-style-type: circle;
    margin-left: 2rem;
}
.toc-box .toc-list li.toc-subsub > a {
    color: #4c599a;
}
.dark .toc-box .toc-list li.toc-subsub > a {
    color: #d1d5db;
}

.toc-box .toc-list a:hover {
    color: #2563eb; /* primary-ish */
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Content styling inside blog detail */
#blog-content :where(h1, h2, h3, h4, h5, h6) {
    font-weight: 700;
    line-height: 1.25;
    color: #0d101b;
    margin-top: 1.25em;
    margin-bottom: 0.5em;
}
.dark #blog-content :where(h1, h2, h3, h4, h5, h6) {
    color: #fff;
}

#blog-content h1 { font-size: 1.875rem !important; }
#blog-content h2 { font-size: 1.5rem !important; }
#blog-content h3 { font-size: 1.25rem !important; }
#blog-content h4 { font-size: 1.125rem !important; }

#blog-content p {
    margin: 0.85em 0;
    color: inherit;
}

#blog-content hr {
    margin: 1.5em 0;
    border: 0;
    border-top: 1px solid #e7e9f3;
}
.dark #blog-content hr {
    border-top-color: #2a2e3f;
}

#blog-content :where(ul, ol) {
    margin: 0.85em 0;
    padding-left: 1.5em;
}
#blog-content ul { list-style: disc; }
#blog-content ol { list-style: decimal; }
#blog-content li { margin: 0.25em 0; }
#blog-content :where(ul ul, ol ol, ul ol, ol ul) {
    margin-top: 0.35em;
    margin-bottom: 0.35em;
}

#blog-content a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 3px;
}
#blog-content a:hover {
    opacity: 0.9;
}

#blog-content blockquote {
    border-left: 4px solid #2563eb;
    padding-left: 1rem;
    margin: 1.25em 0;
    color: #111827;
    font-style: italic;
}
.dark #blog-content blockquote {
    color: #e5e7eb;
}

#blog-content img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    max-width: 100%;
    height: auto;
}

@media (max-width: 767.98px) {
    #blog-content img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }
}
