/* ==========================================================================
   SAYUSWA SINGLE POST GLOBAL TEMPLATE STYLES - CLEAN LIGHT THEME
   ========================================================================== */

/* Reading Progress Bar (Fixed Top) */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #059669 0%, #10b981 100%);
    width: 0%;
    z-index: 99999;
    transition: width 0.1s ease-out;
}

/* Single Post Container & Page Overrides */
body.single-post, body.single-post #page, body.single-post #content, body.single-post .site-content {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

.sayuswa-single-wrapper {
    background-color: #f8fafc;
    padding-top: 30px;
    padding-bottom: 80px;
}

.sayuswa-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Breadcrumbs */
.single-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.single-breadcrumbs a {
    color: #475569;
    text-decoration: none;
    transition: color 0.2s ease;
}

.single-breadcrumbs a:hover {
    color: #059669;
}

.single-breadcrumbs .separator {
    color: #cbd5e1;
}

/* Article Hero Header */
.single-post-header {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 36px 40px;
    margin-bottom: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}

.single-header-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.single-cat-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 9999px;
    background: #d1fae5;
    color: #047857;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-item {
    font-size: 0.875rem;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.single-post-title {
    font-size: clamp(1.5rem, 4vw + 0.5rem, 2.35rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    overflow-wrap: break-word;
    word-break: break-word;
}

.single-author-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.author-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #059669;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.author-info-text {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.author-role {
    font-size: 0.8rem;
    color: #64748b;
}

/* Featured Image */
.single-featured-image-wrap {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 36px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    max-height: 500px;
}

.single-featured-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 2-Column Main Layout */
.single-main-grid {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 36px;
    align-items: start;
}

/* Left Content Area */
.single-content-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: clamp(20px, 4vw, 44px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    overflow-wrap: break-word;
}

/* Content Typography */
.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155;
    overflow-wrap: break-word;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content h2 {
    font-size: clamp(1.25rem, 3.5vw, 1.65rem);
    font-weight: 800;
    color: #0f172a;
    margin-top: 2.2rem;
    margin-bottom: 1rem;
    padding-left: 14px;
    border-left: 4px solid #059669;
    line-height: 1.35;
    scroll-margin-top: 100px;
    overflow-wrap: break-word;
}

.entry-content h3 {
    font-size: clamp(1.1rem, 2.8vw, 1.3rem);
    font-weight: 700;
    color: #0f172a;
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    scroll-margin-top: 100px;
    overflow-wrap: break-word;
}

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

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

.entry-content strong {
    color: #0f172a;
    font-weight: 700;
}

.entry-content img,
.entry-content iframe,
.entry-content video,
.entry-content embed {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
}

/* Callout Boxes */
.entry-content blockquote, .engineering-callout {
    background: #f0fdf4;
    border-left: 4px solid #059669;
    padding: 20px 24px;
    border-radius: 0 12px 12px 0;
    margin: 24px 0;
    color: #065f46;
    font-size: 1rem;
}

.entry-content blockquote p {
    margin-bottom: 0;
    font-style: italic;
}

/* Code Blocks */
.entry-content pre, .code-block {
    background: #0f172a;
    color: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    font-family: 'Fira Code', Consolas, Monaco, monospace;
    font-size: 0.9rem;
    position: relative;
    margin: 24px 0;
    max-width: 100%;
}

.copy-code-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.copy-code-btn:hover {
    background: #059669;
    border-color: #059669;
}

/* Responsive Table Wrapper */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.92rem;
    display: block;
    overflow-x: auto;
    max-width: 100%;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.entry-content table th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    text-align: left;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
}

.entry-content table td {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
}

/* Right Sticky Sidebar */
.single-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}

.widget-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

/* Table of Contents (Daftar Isi) Widget */
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 10px;
}

.toc-list li.toc-h3 {
    padding-left: 16px;
    font-size: 0.875rem;
}

.toc-list a {
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    padding-left: 8px;
}

.toc-list a:hover, .toc-list a.active {
    color: #059669;
    font-weight: 700;
    border-left-color: #059669;
}

/* Hardware Store Widget */
.sidebar-product-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    transition: all 0.25s ease;
}

.sidebar-product-card:hover {
    border-color: #059669;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.1);
}

.sidebar-product-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.sidebar-product-price {
    font-size: 0.95rem;
    font-weight: 800;
    color: #059669;
    margin-bottom: 10px;
}

.btn-sidebar-buy {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px 0;
    background: #059669;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.btn-sidebar-buy:hover {
    background: #047857;
    color: #ffffff;
}

/* Social Share Links */
.share-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.share-btn.wa { background: #25d366; color: #ffffff; }
.share-btn.li { background: #0a66c2; color: #ffffff; }
.share-btn.tw { background: #1da1f2; color: #ffffff; }
.share-btn.cp { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; cursor: pointer; }

.share-btn:hover { opacity: 0.9; }

/* Author Credentials Card Below Content */
.author-bio-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    margin-top: 40px;
    display: flex;
    gap: 20px;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}

.author-bio-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    flex-shrink: 0;
}

.author-bio-details h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.author-bio-details p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* Post Navigation (Prev/Next) */
.post-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.nav-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.nav-card:hover {
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #059669;
    margin-bottom: 6px;
}

.nav-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

/* Related Posts Grid */
.related-posts-section {
    margin-top: 60px;
}

.related-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

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

.related-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: all 0.25s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    border-color: #059669;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.related-card-body {
    padding: 20px;
}

.related-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin-bottom: 8px;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .single-main-grid {
        grid-template-columns: 1fr;
    }
    .single-sidebar {
        position: static;
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .single-post-header {
        padding: 24px;
    }
    .single-post-title {
        font-size: 1.75rem;
    }
    .single-content-card {
        padding: 24px;
    }
    .post-nav-grid {
        grid-template-columns: 1fr;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
    .author-bio-card {
        flex-direction: column;
        text-align: center;
    }
}
