/* 
 * Premium Single Post Styling 
 * Theme: Reloop
 */

:root {
    --post-primary: #0EAA23;
    --post-primary-hover: #0b8a1c;
    --post-text: #333333;
    --post-text-light: #666666;
    --post-bg-light: #f4f6f8;
    --post-border: #eaeaea;
    --post-font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --post-font-serif: 'Georgia', serif;
    --post-max-width: 800px;
    --sidebar-width: 340px;
}

body.single, body.single-post {
    overflow-x: hidden !important;
    width: 100%;
}

.premium-single-post {
    font-family: var(--post-font-sans);
    color: var(--post-text);
    background-color: #ffffff;
    line-height: 1.6;
    padding-bottom: 60px;
    overflow-x: hidden !important;
    max-width: 100%;
    width: 100%;
    display: block !important;
    box-sizing: border-box !important;
}

.premium-single-post * {
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.premium-single-post img {
    max-width: 100% !important;
    height: auto !important;
}

.premium-single-post .premium-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Reading Progress Bar */
#reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--post-primary);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Breadcrumbs */
.premium-breadcrumbs {
    padding: 20px 0;
    font-size: 14px;
    color: var(--post-text-light);
    border-bottom: 1px solid var(--post-border);
    margin-bottom: 40px;
}

.premium-breadcrumbs a {
    color: var(--post-text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.premium-breadcrumbs a:hover {
    color: var(--post-primary);
}

.premium-breadcrumbs i {
    font-size: 12px;
    margin: 0 8px;
    color: #ccc;
}

.premium-breadcrumbs .current {
    color: var(--post-text);
    font-weight: 500;
}

/* Hero Section */
.premium-post-hero {
    margin-bottom: 50px;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 0 15px;
}

.post-category a {
    display: inline-block;
    background-color: var(--post-bg-light);
    color: var(--post-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.post-category a:hover {
    background-color: var(--post-primary);
    color: #fff;
}

.premium-title {
    font-size: 48px;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 30px;
    color: #111;
    letter-spacing: -1px;
    word-break: break-word;
}

.premium-post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.meta-details {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: var(--post-text-light);
    flex-wrap: wrap;
    justify-content: center;
}

.meta-details i {
    margin-right: 6px;
    color: #999;
}

.premium-featured-image {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.premium-featured-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

/* Mobile TOC Accordion */
.mobile-toc-container {
    display: none;
    max-width: 1000px;
    margin: 30px auto 0;
    background: #fff;
    border: 1px solid var(--post-border);
    border-radius: 8px;
    overflow: hidden;
}

.mobile-toc-toggle {
    width: 100%;
    background: var(--post-bg-light);
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 700;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: #111;
}

.mobile-toc-toggle i {
    transition: transform 0.3s;
}

.mobile-toc-toggle.active i {
    transform: rotate(180deg);
}

.mobile-toc {
    display: none;
    padding: 20px;
    background: #fff;
}

/* Layout */
.content-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
}

/* Article Content */
.premium-article-content {
    flex: 1 1 0%;
    min-width: 0;
    max-width: var(--post-max-width);
    width: 100%;
}

.entry-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    width: 100%;
    max-width: 100% !important;
    min-width: 0;
    overflow-x: hidden;
}

.entry-content * {
    max-width: 100% !important;
}

/* Force Elementor containers to fit inside the blog post column */
.entry-content .elementor-section,
.entry-content .elementor-container,
.entry-content .elementor-widget-wrap,
.entry-content .elementor-column {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.entry-content p {
    margin-bottom: 24px;
}

.entry-content h2 {
    font-size: 32px;
    margin-top: 48px;
    margin-bottom: 24px;
    font-weight: 700;
    color: #111;
    scroll-margin-top: 100px;
}

.entry-content h3 {
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 700;
    color: #111;
    scroll-margin-top: 100px;
}

.entry-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin: 32px 0;
}

.entry-content blockquote {
    font-style: italic;
    font-size: 24px;
    line-height: 1.5;
    margin: 40px 0;
    padding: 30px 40px;
    border-left: 4px solid var(--post-primary);
    background: var(--post-bg-light);
    border-radius: 0 12px 12px 0;
    color: #111;
}

.entry-content blockquote p {
    margin: 0;
}

.entry-content ul, .entry-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.entry-content li {
    margin-bottom: 10px;
}

.entry-content a {
    color: var(--post-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
    word-break: break-word;
}

.entry-content a:hover {
    color: var(--post-primary-hover);
}

/* Custom Social Icon Support */
.custom-social-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

/* Sidebar Styling */
.premium-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

.sidebar-sticky-wrapper {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: #fff;
    border: 1px solid var(--post-border);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    max-width: 100%;
    overflow: hidden;
}

.sidebar-author-avatar {
    text-align: center;
    margin-bottom: 15px;
}

.sidebar-author-avatar img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--post-bg-light);
}

.sidebar-author-name {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #111;
}

.sidebar-author-designation {
    display: block;
    text-align: center;
    font-size: 13px;
    color: var(--post-text-light);
    margin-bottom: 15px;
}

.sidebar-author-bio {
    font-size: 14px;
    line-height: 1.6;
    color: var(--post-text-light);
    margin-bottom: 20px;
    text-align: center;
    overflow: hidden;
    word-break: break-word;
}
.sidebar-author-bio * {
    max-width: 100%;
}

.sidebar-author-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #0a66c2;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 10px;
    background: #f0f7fe;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-author-social:hover {
    background: #e1f0fe;
}

.sidebar-widget .widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #111;
    border-bottom: 2px solid var(--post-primary);
    padding-bottom: 10px;
    display: inline-block;
}

.premium-toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.premium-toc-nav li {
    margin-bottom: 12px;
}

.premium-toc-nav li.toc-h2 {
    font-size: 14px;
}

.premium-toc-nav a {
    color: var(--post-text-light);
    text-decoration: none;
    display: block;
    line-height: 1.5;
    transition: color 0.2s ease;
    border-left: 2px solid transparent;
    padding-left: 10px;
    margin-left: -12px;
}

.premium-toc-nav a:hover,
.premium-toc-nav a.active {
    color: var(--post-primary);
    border-left-color: var(--post-primary);
    font-weight: 600;
}

/* FAQs Accordion */
.premium-faqs-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--post-border);
}

.faqs-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: #111;
}

.faq-item {
    border: 1px solid var(--post-border);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: #fff;
    border: none;
    padding: 20px;
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    color: #111;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--post-bg-light);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--post-primary);
    flex-shrink: 0;
    margin-left: 15px;
}

.faq-question.active i {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #fff;
}

.faq-answer-inner {
    padding: 0 20px 20px;
    font-size: 16px;
    color: var(--post-text-light);
    line-height: 1.6;
}

/* Post Tags */
.premium-post-tags {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--post-border);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.tags-list span {
    font-weight: 600;
    margin-right: 10px;
}

.tags-list a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--post-bg-light);
    color: var(--post-text-light);
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.2s;
}

.tags-list a:hover {
    background: var(--post-primary);
    color: #fff;
}

/* Bottom Author Box (Mobile Only Initially) */
.premium-author-box {
    margin-top: 40px;
    padding: 30px;
    background: var(--post-bg-light);
    border-radius: 12px;
    display: flex;
    gap: 25px;
    align-items: center;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin: 0 0 5px 0;
    font-size: 20px;
    font-weight: 700;
}

.author-designation {
    display: block;
    color: var(--post-text-light);
    font-size: 13px;
    margin-bottom: 10px;
}

.author-bio {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    overflow: hidden;
    word-break: break-word;
}

.author-bio * {
    max-width: 100%;
}

.author-bio p:last-child {
    margin-bottom: 0;
}

.author-social.linkedin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0a66c2;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

/* Visibility Classes */
.mobile-only-author {
    display: none;
}
.desktop-only-author {
    display: block;
}
.desktop-only-toc {
    display: block;
}

/* Post Navigation */
.premium-post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--post-border);
}

.nav-prev, .nav-next {
    width: 48%;
}

.nav-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--post-text-light);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.premium-post-navigation a {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    line-height: 1.4;
    display: block;
    transition: color 0.2s;
}

.premium-post-navigation a:hover {
    color: var(--post-primary);
}

/* Related Posts */
.premium-related-posts {
    background: #f4f6f8;
    padding: 80px 0;
    margin-top: 60px;
}

.premium-related-posts .section-title {
    font-size: 28px;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 800;
}

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

.related-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.related-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.related-content {
    padding: 24px;
    flex-grow: 1;
}

.related-date {
    font-size: 13px;
    color: var(--post-text-light);
    display: block;
    margin-bottom: 10px;
}

.related-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
}

.related-title a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
}

.related-title a:hover {
    color: var(--post-primary);
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .content-layout {
        flex-direction: column;
    }
    
    .premium-sidebar {
        width: 100%;
        margin-top: 40px;
    }
    
    .sidebar-sticky-wrapper {
        position: static;
        flex-direction: column;
    }

    .mobile-only-author {
        display: flex;
    }
    
    .desktop-only-author {
        display: none;
    }

    .desktop-only-toc {
        display: none;
    }

    .mobile-toc-container {
        display: block;
    }

    .premium-title {
        font-size: 36px;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .premium-title {
        font-size: 28px;
    }

    .meta-details {
        flex-direction: column;
        gap: 10px;
    }
    
    .premium-author-box {
        flex-direction: column;
        text-align: center;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .premium-post-navigation {
        flex-direction: column;
        gap: 30px;
    }

    .nav-prev, .nav-next {
        width: 100%;
        text-align: center;
    }
    
    .entry-content {
        font-size: 16px;
    }
    
    .entry-content h2 {
        font-size: 26px;
    }
    
    .entry-content h3 {
        font-size: 22px;
    }
}

/* Responsive Overflows */
.entry-content pre, .entry-content table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}
.entry-content pre {
    white-space: pre-wrap;
    word-break: break-all;
    background: #111;
    color: #fff;
    padding: 15px;
    border-radius: 8px;
}
