/* ========================================
   ARTICLE POST PAGE STYLING
   ======================================== */

/* Main Content Section untuk Post*/
.main-content-section {
    padding: 120px 0 60px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    min-height: 100vh;
}

/* Content Container */
.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Article Container dengan Grid Layout */
.article-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 35px;
    align-items: start;
}

/* Main Article Content Area */
.article-container>div:first-child {
    background: #ffffff;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
    border: 1px solid rgba(25, 135, 84, 0.08);
    overflow-x: hidden;
    max-width: 100%;
}

.article-container>div:first-child:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Featured Image Styling */
.featured-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Article Title */
#article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

/* Article Meta */
#article-meta {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

#article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(25, 135, 84, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

#article-meta i {
    color: #198754;
}

/* Article Content Typography */
#article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

#article-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #198754;
}

#article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 30px;
    margin-bottom: 15px;
}

#article-content p {
    margin-bottom: 20px;
    text-align: justify;
}

#article-content ul,
#article-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

#article-content li {
    margin-bottom: 10px;
}

#article-content a {
    color: #198754;
    text-decoration: underline;
    transition: color 0.2s ease;
}

#article-content a:hover {
    color: #146c43;
}

#article-content blockquote {
    border-left: 4px solid #198754;
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #555;
    background: #f8f9fa;
    padding: 20px;
    padding-left: 24px;
    border-radius: 4px;
}

#article-content code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

#article-content pre {
    background: #2c3e50;
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    max-width: 100%;
}

#article-content pre code {
    background: transparent;
    color: #fff;
    padding: 0;
    white-space: pre;
    word-wrap: normal;
}

/* Table Responsive */
#article-content table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

#article-content table th {
    background: linear-gradient(135deg, #198754, #146c43);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border: none;
}

#article-content table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    word-break: break-word;
}

#article-content table tbody tr {
    background-color: #ffffff;
    transition: background-color 0.2s ease;
}

#article-content table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

#article-content table tbody tr:hover {
    background-color: #e9f7ef;
}

/* Table Wrapper for Horizontal Scroll */
#article-content .table-wrapper,
#article-content>div:has(table) {
    width: 100%;
    overflow-x: auto;
    margin: 25px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Image with Caption */
#article-content figure {
    margin: 30px 0;
    text-align: center;
}

#article-content figure img {
    margin: 0 auto 10px;
}

#article-content figcaption {
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 10px;
}

/* Iframe / Video Responsive */
#article-content iframe,
#article-content video {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Video Container for 16:9 Ratio */
#article-content .video-wrapper,
#article-content .embed-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    margin: 30px 0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#article-content .video-wrapper iframe,
#article-content .embed-responsive iframe,
#article-content .video-wrapper video,
#article-content .embed-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}

/* Social Share Buttons */
.social-share {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.social-share a.btn {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.social-share a.btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.btn-telegram {
    background-color: #0088cc;
    border-color: #0088cc;
    color: #fff;
}

.btn-telegram:hover {
    background-color: #0077b3;
    border-color: #0077b3;
}

/* Disqus Comments Section */
#disqus_thread {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    margin-top: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    max-width: 100%;
}

/* Sidebar Styling */
.sidebar {
    position: sticky;
    top: 100px;
    background: #ffffff;
    padding: 25px 12px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Scrollbar Styling untuk Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #198754;
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #146c43;
}

/* Sidebar Chip Title */
.sidebar-chip {
    display: block;
    background: linear-gradient(135deg, #198754, #146c43);
    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 14px 20px;
    border-radius: 30px;
    margin-bottom: 25px;
    box-shadow: 0 6px 20px rgba(25, 135, 84, 0.25);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.sidebar-chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.sidebar-chip:hover::before {
    left: 100%;
}

/* Related Posts Container */
#post-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Related Post Item - Enhanced Design */
.related-post {
    display: flex;
    flex-direction: row;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    padding: 0;
    border-radius: 10px;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    height: auto;
    gap: 12px;
}

.related-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #198754, #20c997);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
}

.related-post:hover::before {
    transform: scaleY(1);
}

.related-post:hover {
    border-color: #198754;
    transform: translateX(3px);
    box-shadow: 0 4px 16px rgba(25, 135, 84, 0.15);
}

/* Related Post Image */
.related-post img {
    width: 90px;
    height: 90px;
    min-width: 90px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin: 10px;
}

.related-post:hover img {
    transform: scale(1.05);
}

/* Related Post Content */
.related-post-content {
    flex-grow: 1;
    padding: 12px 12px 12px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    justify-content: center;
}

/* Related Post Title */
.related-post-title {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
    word-break: break-word;
}

.related-post:hover .related-post-title {
    color: #198754;
}

/* Related Post Meta */
.related-post-meta {
    font-size: 0.75rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.related-post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(25, 135, 84, 0.08);
    padding: 3px 6px;
    border-radius: 8px;
    font-weight: 500;
    white-space: nowrap;
    font-size: 0.7rem;
}

.related-post-meta i {
    color: #198754;
    font-size: 0.65rem;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .article-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sidebar {
        position: static;
        max-height: none;
        order: 2;
    }

    .article-container>div:first-child {
        order: 1;
    }
}

@media (max-width: 768px) {
    .main-content-section {
        padding: 100px 0 40px 0;
    }

    .article-container>div:first-child {
        padding: 30px 20px;
        border-radius: 15px;
    }

    #article-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    #article-content {
        font-size: 1rem;
        line-height: 1.7;
    }

    #article-content h2 {
        font-size: 1.5rem;
        margin-top: 30px;
    }

    #article-content h3 {
        font-size: 1.25rem;
    }

    .sidebar {
        padding: 15px 10px;
    }

    .sidebar-chip {
        font-size: 1rem;
        padding: 10px 20px;
    }

    #post-list {
        gap: 10px;
    }

    .related-post img {
        width: 80px;
        height: 80px;
        min-width: 80px;
        margin: 8px;
    }

    .related-post-content {
        padding: 10px 10px 10px 0;
    }

    .related-post-title {
        font-size: 0.85rem;
        line-height: 1.3;
        -webkit-line-clamp: 2;
    }

    .related-post-meta {
        font-size: 0.7rem;
        gap: 4px;
    }

    .related-post-meta span {
        padding: 2px 5px;
        font-size: 0.65rem;
    }

    .related-post-meta i {
        font-size: 0.6rem;
    }

    #disqus_thread {
        padding: 15px;
        margin-top: 30px;
        border-radius: 8px;
    }
}

@media (max-width: 576px) {
    .main-content-section {
        padding: 90px 0 30px 0;
    }

    .content {
        padding: 0 15px;
    }

    .article-container>div:first-child {
        padding: 20px;
        border-radius: 10px;
    }

    #article-title {
        font-size: 1.75rem;
    }

    #article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .social-share a.btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .related-post img {
        width: 80px;
        height: 60px;
    }

    .related-post-title {
        font-size: 0.85rem;
    }

    .related-post-meta {
        font-size: 0.75rem;
    }
}