/* ==========================================================================
   ABGuestPost Single Blog Redesign - Premium 2-Sidebar Layout & Widgets
   Brand Palette: Dark Navy (#043038), Primary Orange (#eb5d07), Accent Lime (#7be65a)
   ========================================================================== */

/* Prevent horizontal overflow without breaking CSS position: sticky */
html, body {
    overflow-x: clip !important;
}

/* Reading Progress Bar (Fixed below header) */
.article-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #eb5d07 0%, #7be65a 100%);
    z-index: 1060;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* Main Grid Row: Ensure columns stretch to match height of center article */
.blog-main-row {
    align-items: stretch !important;
}

/* Sticky Sidebars with Independent Scrolling on Desktop (lg+) */
@media (min-width: 992px) {
    .blog-sidebar-col {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 90px !important;
        align-self: flex-start !important;
        height: -moz-fit-content !important;
        height: fit-content !important;
        max-height: calc(100vh - 105px) !important;
        z-index: 20 !important;
    }

    .sticky-sidebar-desktop {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 90px !important;
        max-height: calc(100vh - 105px) !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(4, 48, 56, 0.2) transparent;
        padding-bottom: 1.5rem;
    }

    .sticky-sidebar-desktop::-webkit-scrollbar {
        width: 5px;
    }

    .sticky-sidebar-desktop::-webkit-scrollbar-track {
        background: transparent;
    }

    .sticky-sidebar-desktop::-webkit-scrollbar-thumb {
        background: rgba(4, 48, 56, 0.2);
        border-radius: 4px;
    }

    .sticky-sidebar-desktop::-webkit-scrollbar-thumb:hover {
        background: #eb5d07;
    }
}

/* Left Sidebar: Table of Contents */
.toc-card {
    border: 1px solid rgba(4, 48, 56, 0.08);
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(4, 48, 56, 0.04);
    transition: box-shadow 0.2s ease;
}

.toc-card:hover {
    box-shadow: 0 8px 30px rgba(4, 48, 56, 0.08);
}

.toc-item-link {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border-left: 3px solid #043038;
    color: #043038;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    transition: all 0.2s ease;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toc-item-link:hover {
    background: rgba(4, 48, 56, 0.04);
    color: #043038;
    border-left-color: rgba(235, 93, 7, 0.4);
}

.toc-item-link.active {
    background: rgba(235, 93, 7, 0.08);
    color: #eb5d07;
    font-weight: 600;
    border-left-color: #eb5d07;
}

/* Mobile Collapsible TOC */
.mobile-toc-card {
    border: 1px solid rgba(4, 48, 56, 0.1);
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(4, 48, 56, 0.04);
}

.mobile-toc-btn {
    background: #ffffff;
    border: 0;
    border-radius: 1rem;
    padding: 0.85rem 1.15rem;
    color: #043038;
    font-weight: 700;
    text-align: left;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s ease;
}

.mobile-toc-btn:hover {
    background: #f8fafc;
}

.mobile-toc-btn .toc-chevron {
    transition: transform 0.25s ease;
}

.mobile-toc-btn[aria-expanded="true"] .toc-chevron {
    transform: rotate(180deg);
}

/* Right Sidebar Widgets */
.widget-card {
    border: 1px solid rgba(4, 48, 56, 0.08);
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(4, 48, 56, 0.04);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.widget-card:hover {
    box-shadow: 0 8px 30px rgba(4, 48, 56, 0.08);
}

.widget-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #043038;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

/* Bulk Order Standout CTA Card */
.bulk-cta-card {
    background: linear-gradient(145deg, #043038 0%, #084c59 60%, #032329 100%);
    border: 1.5px solid rgba(123, 230, 90, 0.45);
    border-radius: 1.25rem;
    color: #ffffff;
    padding: 1.5rem 1.35rem;
    box-shadow: 0 10px 30px rgba(4, 48, 56, 0.2), 0 0 25px rgba(123, 230, 90, 0.15);
    position: relative;
    overflow: hidden;
}

.bulk-cta-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(123, 230, 90, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Latest Posts Widget */
.recent-post-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px dashed rgba(4, 48, 56, 0.08);
    text-decoration: none;
    transition: all 0.2s ease;
}

.recent-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recent-post-item:first-child {
    padding-top: 0;
}

.recent-post-thumb {
    width: 64px;
    height: 52px;
    min-width: 64px;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recent-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-post-item:hover .recent-post-thumb img {
    transform: scale(1.08);
}

.recent-post-title {
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.35;
    color: #043038;
    margin-bottom: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.recent-post-item:hover .recent-post-title {
    color: #eb5d07;
}

.recent-post-meta {
    font-size: 0.72rem;
    color: #64748b;
}

/* Contact Links */
.contact-channel-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid rgba(4, 48, 56, 0.06);
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.contact-channel-btn:last-child {
    margin-bottom: 0;
}

.contact-channel-btn:hover {
    background: #ffffff;
    border-color: rgba(235, 93, 7, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 48, 56, 0.06);
}

.contact-channel-btn .icon-box {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
}

/* Social Icon Grid */
.social-btn-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.social-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid rgba(4, 48, 56, 0.08);
    color: #043038;
    font-size: 1.15rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-icon-btn:hover {
    background: #043038;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 48, 56, 0.12);
}

.social-icon-btn.btn-twitter:hover {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.social-icon-btn.btn-linkedin:hover {
    background: #0a66c2;
    color: #ffffff;
    border-color: #0a66c2;
}

.social-icon-btn.btn-facebook:hover {
    background: #1877f2;
    color: #ffffff;
    border-color: #1877f2;
}

.social-icon-btn.btn-rss:hover {
    background: #eb5d07;
    color: #ffffff;
    border-color: #eb5d07;
}

/* Article Content Typography & Readability */
.article-main-container {
    max-width: 780px;
    margin: 0 auto;
}

.article-content {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.08rem;
    line-height: 1.85;
    color: #1e293b;
    word-wrap: break-word;
}

.article-content h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.65rem;
    color: #043038;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(4, 48, 56, 0.06);
    scroll-margin-top: 105px;
    position: relative;
}

.article-content h2:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 1.5rem;
}

.article-content h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: #043038;
    margin-top: 1.85rem;
    margin-bottom: 0.85rem;
    scroll-margin-top: 105px;
}

.article-content h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.15rem;
    color: #043038;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 10px;
}

.article-content a {
    color: #eb5d07;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.article-content a:hover {
    color: #cc4d02;
}

.article-content blockquote {
    margin: 1.85rem 0;
    padding: 1.15rem 1.5rem;
    border-left: 4px solid #eb5d07;
    background: #f8fafc;
    border-radius: 0 0.85rem 0.85rem 0;
    font-style: italic;
    color: #334155;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 16px rgba(4, 48, 56, 0.06);
}

.article-content table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.article-content table th,
.article-content table td {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(4, 48, 56, 0.1);
}

.article-content table th {
    background: #043038;
    color: #ffffff;
    font-weight: 600;
}

.article-content table tr:nth-child(even) {
    background: #f8fafc;
}

/* Status Pulse Dot */
.status-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}
