/* blog-detail.css — blog page styles (extracted from blog-detail.php) */

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 150px;
}

/* Add scroll margin to all headings to prevent content going under header */
.blog-content h1[id],
.blog-content h2[id],
.blog-content h3[id],
.blog-content h4[id],
.blog-content h5[id],
.blog-content h6[id] {
    scroll-margin-top: 150px;
}

/* Table of contents active state */
.toc-link {
    position: relative;
    transition: all 0.3s ease;
}

.toc-link:hover {
    color: #100190;
    padding-left: 0.5rem;
}

/* Blog content styling - matching Quill editor output */
.blog-content {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #1f2937;
}

.blog-content h1 {
    font-size: 2.5em;
    font-weight: 700;
}

.blog-content h2 {
    font-size: 2em;
    font-weight: 700;
}

.blog-content h3 {
    font-size: 1.5em;
    font-weight: 600;
}

.blog-content h4 {
    font-size: 1.25em;
    font-weight: 600;
}

.blog-content h5 {
    font-size: 1.1em;
    font-weight: 600;
}

.blog-content h6 {
    font-size: 1em;
    font-weight: 600;
}

.blog-content p {
    margin-bottom: 1em;
    line-height: 1.6;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5em 0;
}

.blog-content ul,
.blog-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.blog-content ul {
    list-style-type: disc;
}

.blog-content ol {
    list-style-type: decimal;
}

.blog-content li {
    margin-bottom: 0.5em;
    line-height: 1.6;
}

.blog-content a {
    color: #100190;
    text-decoration: underline;
}

.blog-content a:hover {
    color: #0a0157;
}

.blog-content strong {
    font-weight: 700;
}

.blog-content em {
    font-style: italic;
}

.blog-content u {
    text-decoration: underline;
}

.blog-content s {
    text-decoration: line-through;
}

.blog-content blockquote {
    border-left: 4px solid #e5e7eb;
    padding-left: 1em;
    margin: 1.5em 0;
    color: #6b7280;
    font-style: italic;
}

.blog-content code {
    background-color: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #dc2626;
}

.blog-content pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1em;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5em 0;
}

.blog-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

.blog-content .ql-align-center {
    text-align: center;
}

.blog-content .ql-align-right {
    text-align: right;
}

.blog-content .ql-align-justify {
    text-align: justify;
}

.blog-content .ql-indent-1 {
    padding-left: 3em;
}

.blog-content .ql-indent-2 {
    padding-left: 6em;
}

.blog-content .ql-indent-3 {
    padding-left: 9em;
}

.blog-content iframe {
    max-width: 100%;
    margin: 1.5em 0;
}

/* Sticky table of contents */
.blog-toc-aside {
    position: relative;
    align-self: stretch;
    height: 100%;
}

.blog-toc-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 6rem;
    align-self: flex-start;
    height: fit-content;
    max-height: calc(100vh - 6rem);
    z-index: 10;
    margin-top: 1.5rem;
}

/* Ensure parent containers don't interfere with sticky */
.blog-content-grid {
    align-items: start;
}

.blog-detail-section,
.blog-detail-section > div,
.blog-detail-section > div > div {
    overflow: visible;
}

.blog-detail-section .max-w-7xl {
    overflow: visible !important;
}

.blog-detail-section .grid {
    overflow: visible !important;
}

/* Mobile table of contents toggle */
@media (max-width: 1023px) {
    .toc-mobile-toggle {
        display: block;
    }
}

/* Author card styling */
.blog-author-card {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.blog-author-title {
    margin: 0 0 1rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

.blog-author-wrap {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.blog-author-image {
    width: 84px;
    height: 84px;
    border-radius: 9999px;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
}

.blog-author-name {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.2;
    font-weight: 700;
    color: #111827;
}

.blog-author-meta {
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.blog-author-desc {
    margin-top: 0.75rem;
    color: #374151;
    line-height: 1.65;
    font-size: 0.97rem;
}

.blog-author-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.blog-author-social-link {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    color: #374151;
    background: #ffffff;
    transition: all 0.2s ease;
}

.blog-author-social-link:hover {
    border-color: #100190;
    color: #100190;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(16, 1, 144, 0.12);
}

@media (max-width: 640px) {
    .blog-author-card {
        padding: 1rem;
    }
    .blog-author-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
    .blog-author-image {
        width: 72px;
        height: 72px;
    }
}

/* Blog background pattern (replaces inline SVG) */
.blog-bg-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    overflow: hidden;
    background-image: url('../images/blog-bg.svg');
    background-size: 100% 100%;
}
