/* CSS untuk Halaman Detail Artikel */

.article-detail {
    padding: 120px 0 80px;
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 14px;
}

.article-breadcrumb a {
    color: var(--text-color);
    transition: all 0.3s ease;
}

.article-breadcrumb a:hover {
    color: var(--primary-color);
}

.article-breadcrumb i {
    font-size: 12px;
    color: var(--gray-400);
}

.article-breadcrumb span {
    color: var(--primary-color);
    font-weight: 500;
}

.article-header {
    margin-bottom: 40px;
}

.article-header h1 {
    font-size: 38px;
    color: var(--dark-color);
    line-height: 1.3;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
    font-size: 14px;
}

.article-featured-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 40px;
}

.article-featured-image img {
    width: 100%;
    height: auto;
}

.article-content-wrapper {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 40px;
}

.article-content {
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 30px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h2 {
    font-size: 28px;
    color: var(--dark-color);
    margin: 40px 0 20px;
    position: relative;
    padding-bottom: 10px;
}

.article-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.article-content h3 {
    font-size: 22px;
    color: var(--dark-color);
    margin: 30px 0 15px;
}

.article-content ul, 
.article-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content blockquote {
    background-color: var(--gray-100);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-color);
}

.article-image {
    margin: 30px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: auto;
}

.image-caption {
    text-align: center;
    font-size: 14px;
    color: var(--gray-500);
    padding: 10px 0;
}

.article-table-container {
    width: 100%;
    overflow-x: auto;
    margin: 30px 0;
    position: relative;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Add shadow indicator for scrollable tables */
.article-table-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 15px;
    pointer-events: none;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(0,0,0,0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

/* Only show scroll indicator when table is scrollable */
@media (max-width: 768px) {
    .article-table-container {
        border-left: 1px solid var(--gray-200);
        border-right: 1px solid var(--gray-200);
        border-radius: var(--radius-md);
    }
    
    .article-table-container::after {
        opacity: 1;
    }
    
    .article-table {
        margin: 0;
    }
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.article-table th, 
.article-table td {
    border: 1px solid var(--gray-300);
    padding: 12px 15px;
    text-align: left;
    min-width: 120px; /* Ensure cells don't get too narrow */
}

.article-table th {
    background-color: var(--gray-100);
    color: var(--dark-color);
    font-weight: 600;
    white-space: nowrap; /* Prevent header text wrapping */
}

.article-table tr:nth-child(even) {
    background-color: var(--gray-50);
}

/* Special styling for checklist tables */
.checklist-table td {
    position: relative;
}

.checklist-table td.check::before {
    content: '✓';
    color: green;
    font-weight: bold;
    margin-right: 5px;
}

.checklist-table td.cross::before {
    content: '✗';
    color: red;
    font-weight: bold;
    margin-right: 5px;
}

.article-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 6px 15px;
    background-color: var(--gray-100);
    border-radius: var(--radius-md);
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
}

.share-btn.facebook {
    background-color: #3b5998;
}

.share-btn.twitter {
    background-color: #1da1f2;
}

.share-btn.whatsapp {
    background-color: #25d366;
}

.share-btn.telegram {
    background-color: #0088cc;
}

.share-btn.email {
    background-color: #ea4335;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.article-author {
    background-color: var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 30px;
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.author-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 20px;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.author-role {
    color: var(--primary-color);
    font-size: 14px;
    margin-bottom: 10px;
}

.author-bio {
    color: var(--text-color);
    margin-bottom: 15px;
    line-height: 1.6;
}

.author-social {
    display: flex;
    gap: 10px;
}

.author-social a {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: all 0.3s ease;
}

.author-social a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.article-navigation {
    display: flex;
    justify-content: space-between;
    padding: 30px 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 40px;
}

.prev-article,
.next-article {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 45%;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.prev-article:hover,
.next-article:hover {
    color: var(--primary-color);
}

.nav-content span {
    font-size: 14px;
    color: var(--gray-500);
    display: block;
    margin-bottom: 5px;
}

.nav-content p {
    font-weight: 500;
    color: inherit;
}

.related-articles {
    margin-bottom: 40px;
}

.related-articles h3 {
    font-size: 24px;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.related-img {
    height: 160px;
    overflow: hidden;
}

.related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover .related-img img {
    transform: scale(1.1);
}

.related-content {
    padding: 15px;
}

.related-content h4 {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--dark-color);
}

.related-meta {
    font-size: 12px;
    color: var(--gray-500);
}

/* Comments Section */
.comments-section {
    margin-top: 50px;
}

.comments-section h3 {
    font-size: 24px;
    color: var(--dark-color);
    margin-bottom: 30px;
}

.comments-list {
    margin-bottom: 50px;
}

.comment-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.comment-reply {
    margin-left: 50px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-header h4 {
    font-size: 16px;
    color: var(--dark-color);
}

.comment-date {
    font-size: 12px;
    color: var(--gray-500);
}

.comment-text {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--text-color);
}

.comment-actions a {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.comment-actions a:hover {
    color: var(--accent-color);
}

.comment-form h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 16px;
    color: var(--text-color);
}

.form-group textarea {
    resize: vertical;
}

/* Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.sidebar-widget h3 {
    font-size: 20px;
    color: var(--dark-color);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.sidebar-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.category-list {
    list-style: none;
}

.category-list li {
    border-bottom: 1px solid var(--gray-200);
    padding: 10px 0;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.category-list a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.category-list span {
    font-size: 12px;
    color: var(--gray-500);
    background-color: var(--gray-100);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.popular-posts {
    list-style: none;
}

.popular-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-200);
}

.popular-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.post-thumbnail {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-info h4 {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.post-info h4 a {
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.post-info h4 a:hover {
    color: var(--primary-color);
}

.post-meta {
    font-size: 12px;
    color: var(--gray-500);
}

.widget-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.widget-ad {
    text-align: center;
}

.widget-ad img {
    border-radius: var(--radius-md);
    max-width: 100%;
}

.newsletter-widget {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 25px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.newsletter-widget h3 {
    color: var(--white);
}

.newsletter-widget h3::after {
    background-color: var(--white);
    left: calc(50% - 20px);
}

.newsletter-widget p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.newsletter-form input {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    font-family: var(--font-primary);
}

.newsletter-form button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius-md);
    background-color: var(--secondary-color);
    color: var(--white);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background-color: #c29b27;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .article-content-wrapper {
        grid-template-columns: 2fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .article-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        position: static;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .article-detail {
        padding: 100px 0 60px;
    }
    
    .article-header h1 {
        font-size: 30px;
    }
    
    .article-navigation {
        flex-direction: column;
        gap: 20px;
    }
    
    .prev-article, 
    .next-article {
        max-width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .article-detail {
        padding: 80px 0 40px;
    }
    
    .article-header h1 {
        font-size: 24px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .article-content h2 {
        font-size: 22px;
    }
    
    .article-content h3 {
        font-size: 18px;
    }
    
    .article-author {
        flex-direction: column;
        text-align: center;
    }
    
    .author-image {
        margin: 0 auto 15px;
    }
    
    .author-social {
        justify-content: center;
    }
    
    .comment-item {
        flex-direction: column;
    }
    
    .comment-avatar {
        margin: 0 auto 10px;
    }
    
    .comment-header {
        flex-direction: column;
        text-align: center;
    }
    
    .comment-reply {
        margin-left: 20px;
    }
}