
/* Layout container */
.blog-layout {
    display: flex;
    min-height: 100vh;
}


/* Sidebar */
.category-sidebar {
    width: 300px;
    background-color: #f9fbff;
    padding: 30px 25px;
    border-right: 1px solid #eee;
    box-sizing: border-box;
    flex-shrink: 0;

    position: sticky;
    top: 60px; /* <-- adjust this if you have a header */
    height: calc(100vh - 60px); /* Adjust to match top offset */
    overflow-y: auto;
    align-self: flex-start;
}



/* Sidebar title */
.category-sidebar h2 {
    font-size: 20px;
    font-weight: 700;
    color: #6A1B9A;
    margin-bottom: 24px;
    border-bottom: 2px solid #0c5cac;
    padding-bottom: 6px;
}

/* Category block */
.category-item {
    margin-bottom: 16px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* Category header with chevron */
.category-header {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    transition: background 0.3s, color 0.3s;
    position: relative;
}

.category-header:hover {
    background-color: #eef4ff;
    color: #0c5cac;
}

/* Chevron icon (left side) */
.category-header::before {
    content: "▸";
    font-size: 14px;
    color: #666;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

/* Rotate chevron down when open */
.category-header.open::before {
    content: "▾";
    transform: rotate(0deg);
    color: #0c5cac;
}

/* Blog titles list */
.blog-titles {
    list-style: none;
    margin: 0;
    padding: 0 0 12px 16px;
    display: none;
}

.blog-titles.open {
    display: block;
}

.blog-titles li {
    margin: 8px 0;
    line-height: 1.5;
}

.blog-titles li a {
    font-size: 15px;
    color: #0073e6;
    text-decoration: none;
    padding: 6px 10px;
    display: inline-block;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 6px;
}

.blog-titles li a:hover {
    color: #004a99;
    background-color: #f2f7ff;
    text-decoration: none;
}

/* Active blog post title */
.blog-titles li a.active-title {
    font-weight: 600;
    color: #004a99;
    background-color: #e6f0ff;
    border-radius: 6px;
    padding: 6px 10px;
    text-decoration: none;
}


/* Scrollbar styling */
.category-sidebar::-webkit-scrollbar {
    width: 6px;
}
.category-sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}


/* Blog content */
.blog-post-container {
    flex: 1;
    padding: 40px 45px;
    box-sizing: border-box;
    background-color: #ffffff;
    overflow: visible;
    height: auto;
}

.blog-post-container h1 {
    font-size: 32px;
    font-weight: 700;
    color: #0c5cac;
    margin-bottom: 10px;
    margin-top: 0px;
    line-height: 1.3;
    font-family: 'Merriweather', serif;
}

.post-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
    font-weight: 500;
}

.post-featured-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin: 0px 0;
}

.post-content {
    font-size: 17px;
    line-height: 1.3;
    color: #333;
}

/* Content elements */
.post-content h2, .post-content h3, .post-content h4 {
    margin-top: 20px;
    margin-bottom: 0px;
    font-weight: 600;
    color: #0c5cac;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}

.post-content p {
    margin-top: 0.5em;
    margin-bottom: 1em;
    color: #333;
    line-height: 1.5;
    font-size: 1.1rem;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}

.post-content ul,
.post-content ol {
    padding-left: 20px;
    margin-bottom: 30px;
}

.post-content ul li,
.post-content ol li {
    margin-bottom: 5px;
    color: #333;
    line-height: 1.3;
    font-size: 1.1rem;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}

.post-content ul li { list-style: disc; }
.post-content ol li { list-style: decimal; }

.post-content blockquote {
    border-left: 4px solid #6A1B9A;
    padding-left: 15px;
    margin: 25px 0;
    color: #555;
    font-style: italic;
    background: #f9f9f9;
}

.post-content img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin: 20px 0;
}

.blog-post-container {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}


/* Code blocks */
.code-container {
    position: relative;
    max-width: 100%;
    overflow-x: auto;
    display: block;
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* Code blocks inside container */
.code-container pre,
.code-container pre.ql-syntax {
    white-space: pre; /* preserve code formatting */
    overflow-x: auto;
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    border-radius: 8px;
    margin: 0;
    box-sizing: border-box;
}

/* Copy button */
.copy-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    background-color: #f8f8f2;
    color: #333;
    border: none;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
    display: none;
}

/* Show copy button on hover */
.code-container:hover .copy-btn {
    display: block;
}


/* Video (Quill) */
.post-content iframe.ql-video {
    width: 80%;
    max-width: 640px;
    aspect-ratio: 16 / 9;
    height: auto;
    display: block;
    margin: 20px auto;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.video-wrapper {
    position: relative;
    width: 80%;
    max-width: 640px;
    margin: 20px auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    background-color: transparent;
    display: block;
}

/* Inline background fix */
span[style*="background-color"] {
    padding: 0px 6px;
    border-radius: 4px;
    display: inline-block;
}

.hidden-related {
    display: none;
}

/* RESPONSIVE FIX */
@media (max-width: 768px) {
    .blog-layout {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .category-sidebar {
        position: static;
        top: auto;
        height: auto;
        overflow: visible;
        padding: 8px;
        border-right: none;
        border-bottom: 1px solid #eee;
        width: 100%;
    }

    .category-sidebar h2 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .blog-post-container {
        width: 100%;
        padding: 20px 30px;
        height: auto;
        overflow: visible;
    }

    .blog-post-container h1 {
        font-size: 25px;
        margin-top: 10px;
    }

    .post-content iframe.ql-video,
    .video-wrapper {
        width: 100%;
        max-width: 100%;
    }
}


.category-header.active {
    background-color: #f3f3f3;
    font-weight: bold;
    border-left: 4px solid #007bff;
    padding-left: 8px;
}

.blog-titles.open {
    display: block;
}

.blog-titles li a.active-title {
    color: #007bff;
    font-weight: 600;
    text-decoration: underline;
}



.blog-post-container a {
    color: #007bff !important;
}






.social-share {
    margin-top: 30px;
    padding: 15px 12px;
    border: 1px solid #ddd;             
    border-radius: 10px;                
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    font-family: 'Inter', sans-serif;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.social-share::-webkit-scrollbar {
    display: none;
}

.social-share span {
    font-weight: 600;
    color: #1a73e8;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 15px;
}

.social-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ccc;
    border-radius: 50%;
    color: #1a73e8;
    font-size: 18px;
    text-decoration: none;
    transition: transform 0.2s, color 0.2s, border-color 0.2s;
    transform-origin: center;
    flex-shrink: 0;
}

.social-share a:hover {
    transform: scale(1.2);
    color: #0d47a1;
    border-color: #0d47a1;
}

@media (max-width: 480px) {
    .social-share {
        padding: 12px 10px;
        gap: 10px;
    }

    .social-share a {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .social-share span {
        font-size: 14px;
    }
}








.related-articles {
    margin-top: 40px;
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #ddd;
    border-radius: 6px;
}

.related-articles h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #222;
    font-weight: 600;
    padding-left: 8px;
    border-left: 3px solid #007bff;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.related-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    transition: transform 0.2s;
    color: inherit;
}

.related-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.related-img img {
    width: 100%;
    height: 100px; /* Smaller image */
    object-fit: cover;
    display: block;
}

.related-title {
    padding: 10px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0464ca;
    line-height: 1.3;
    height: 20px; /* Smaller overall height */
    overflow: hidden;
}
