/**
 * Advanced Single Post Styles
 * Layout: 3-Column (Left Sidebar | Content | Right Sidebar)
 */

/* =====================================================
   LAYOUT GRID
   ===================================================== */
.vc-single-page-wrapper {
    background: #f8fafc;
    min-height: 100vh;
}

.vc-main-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 60px;
    padding-bottom: 80px;
    max-width: 1460px;
    /* 280 + 60 + 800 + 60 + 320 + padding */
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

@media (min-width: 1200px) {
    .vc-main-container {
        grid-template-columns: 280px minmax(0, 1fr) 320px;
        gap: 60px;
        align-items: start;
    }
}

/* Tablet: 2 Columns (Content | Right Sidebar), Left Sidebar hidden or different */
@media (min-width: 768px) and (max-width: 1199px) {
    .vc-main-container {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 40px;
    }

    .vc-sidebar-left {
        display: none;
    }
}

/* Mobile: Single Column */
@media (max-width: 767px) {
    .vc-main-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .vc-sidebar-left,
    .vc-sidebar-right {
        display: none;
        /* Or move to bottom */
    }

    .vc-sidebar-right {
        display: block;
        /* Show widgets at bottom */
    }
}

/* =====================================================
   LEFT SIDEBAR (Progress & TOC)
   ===================================================== */
.vc-sidebar-left {
    position: relative;
    height: 100%;
}

.vc-sidebar-sticky-content {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 10px;
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* Reading Progress Widget */
.vc-reading-progress-widget {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #e2e8f0;
    border-radius: 4px;
}

.vc-progress-track {
    position: relative;
    height: 100vh;
    /* Approximate track line */
    width: 100%;
}

.vc-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, #2196F3, #4CAF50);
    border-radius: 4px;
    transition: height 0.1s linear;
}

.vc-progress-indicator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: #4CAF50;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    top: 0%;
    /* Moves with fill */
    transition: top 0.1s linear;
}

/* TOC Widget */
.vc-toc-widget {
    margin-left: 24px;
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.vc-toc-header {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin-bottom: 16px;
    font-weight: 700;
}

.vc-toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vc-toc-nav li {
    margin-bottom: 10px;
    line-height: 1.4;
}

.vc-toc-nav a {
    text-decoration: none;
    color: #64748b;
    font-size: 14px;
    display: block;
    transition: color 0.2s;
    border-left: 2px solid transparent;
    padding-left: 12px;
    margin-left: -14px;
}

.vc-toc-nav a:hover,
.vc-toc-nav a.active {
    color: #2196F3;
    border-left-color: #2196F3;
    font-weight: 500;
}

.vc-toc-nav ul ul {
    padding-left: 16px;
    margin-top: 8px;
    display: none;
    /* Collapse sub-items by default */
}

.vc-toc-nav li.active>ul {
    display: block;
    /* Expand active */
}

/* =====================================================
   RIGHT SIDEBAR (Widgets)
   ===================================================== */
.vc-sidebar-right {
    height: 100%;
}

.vc-sticky-share-right {
    position: absolute;
    right: -50px;
    /* Hang outside? No, keep inside sticky container */
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* =====================================================
   CONTENT AREA
   ===================================================== */
.vc-main-content {
    background: white;
    padding: 40px;
    /* Reduced from 60 for better mobile */
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    min-width: 0;
    /* Fix Grid Overflow */
}

/* Progressive Reveal */
.vc-content-collapsed {
    max-height: 800px;
    overflow: hidden;
    position: relative;
}

.vc-read-more-trigger {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 60%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 40px;
    z-index: 10;
    pointer-events: none;
    /* Click through overlay */
}

.vc-read-more-trigger * {
    pointer-events: auto;
}

.vc-read-more-btn {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.vc-read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
}

.vc-read-more-btn .vc-btn-icon {
    transition: transform 0.3s;
}

.vc-read-more-btn:hover .vc-btn-icon {
    transform: translateX(4px);
}

.vc-btn-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 4px;
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.vc-article-hero {
    position: relative;
    height: 500px;
    background: #1e293b;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.vc-hero-image {
    position: absolute;
    inset: 0;
}

.vc-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vc-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.vc-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 60px;
}

.vc-hero-title {
    color: white;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* =====================================================
   MOBILE SHARE BAR
   ===================================================== */
.vc-mobile-share-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 12px;
    z-index: 1000;
}

@media (min-width: 1200px) {
    .vc-mobile-share-bar {
        display: none;
    }
}

.vc-share-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    margin: 0 4px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    color: white;
}

.vc-share-btn.fb {
    background: #1877f2;
}

.vc-share-btn.tw {
    background: #000;
}

.vc-share-btn.wa {
    background: #25d366;
}