/* Article Page Styles */

.article-container {
    background: var(--bg-card);
    padding: 30px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    /* font-family: 'Inter', Arial, sans-serif; */
}

.breadcrumb a {
    color: var(--primary-color);
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.article-title {
    font-size: 2.5rem;
    line-height: 1.2;
    /* font-family: 'Montserrat', Arial, sans-serif; */
    margin-bottom: 20px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    /* font-family: 'Inter', Arial, sans-serif; */
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.featured-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 35px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ARTICLE CONTENT - Professional News Website Typography */
.article-content {
    font-size: 1.0625rem;
    /* 17px - optimal for reading */
    line-height: 1.75;
    /* 1.75 for excellent readability */
    color: var(--text-main);
    /* font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; */
    letter-spacing: -0.003em;
    font-weight: 400;
}

.article-content p {
    margin-bottom: 1.5em;
    /* Generous spacing between paragraphs */
}

/* First paragraph - slightly larger and bolder */
.article-content>p:first-of-type {
    font-size: 1.1875rem;
    /* 19px */
    line-height: 1.6;
    font-weight: 400;
    color: var(--text-main);
}

/* Headings - Professional News Style */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    /* font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;  */
    font-weight: 700;
    line-height: 1.25 !important;
    color: var(--text-main);
    margin-top: 2em;
    margin-bottom: 0.75em;
    letter-spacing: -0.02em;
}

.article-content h2 {
    font-size: 1.875rem;
    /* 30px */
    margin-top: 2.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--border-color);
}

.article-content h3 {
    font-size: 1.5rem;
    /* 24px */
    margin-top: 2em;
}

.article-content h4 {
    font-size: 1.25rem;
    /* 20px */
    font-weight: 600;
}

.article-content h5 {
    font-size: 1.125rem;
    /* 18px */
    font-weight: 600;
}

.article-content h6 {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* LISTS - Professional News Style */
.article-content ul,
.article-content ol {
    margin: 1.75em 0 !important;
    padding-left: 1.75em !important;
    list-style-position: outside !important;
}

.article-content ul {
    list-style-type: none !important;
}

.article-content ol {
    list-style-type: decimal !important;
    padding-left: 2em !important;
}

.article-content ul li,
.article-content ol li {
    display: list-item !important;
    margin-bottom: 0.75em;
    padding-left: 0.5em;
    line-height: 1.7;
    position: relative;
}

/* Custom bullet points for unordered lists */
.article-content ul li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.3em;
    position: absolute;
    left: -1.2em;
    line-height: 1.3;
}

.article-content ol li {
    padding-left: 0.3em;
}

.article-content ol li::marker {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95em;
}

/* Nested lists */
.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
    margin-top: 0.5em !important;
    margin-bottom: 0.5em !important;
}

/* TABLES - Professional News Style */
.article-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2em 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.9375rem;
    /* Slightly smaller for tables */
}

@media screen and (max-width: 768px) {
    .article-content table {
        display: none;
    }
}

.article-content table thead {
    background: linear-gradient(to bottom, var(--bg-body), var(--bg-card));
}

.article-content table th {
    padding: 1rem 1.25rem;
    text-align: left;
    /* font-family: 'Montserrat', Arial, sans-serif; */
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
    border-bottom: 2px solid var(--primary-color);
}

.article-content table td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.6;
}

.article-content table tbody tr:last-child td {
    border-bottom: none;
}

.article-content table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Alternating row colors for better readability */
.article-content table tbody tr:nth-child(even) {
    background: var(--bg-body);
}

.article-content table tbody tr:nth-child(even):hover {
    background: rgba(0, 0, 0, 0.04);
}


/* Blockquotes */
.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    background: var(--bg-body);
    padding: 20px 25px;
    margin: 30px 0;
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.7;
    border-radius: 0 4px 4px 0;
}

.article-content blockquote p {
    margin-bottom: 0;
}

/* Code */
.article-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 25px 0;
    /* font-family: 'Courier New', monospace; */
}

.article-content code {
    background: var(--bg-body);
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 4px;
    /* font-family: 'Courier New', monospace; */
}

.article-content pre code {
    background: transparent;
    padding: 0;
}

/* Links */
.article-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--primary-dark);
}

.article-content strong {
    font-weight: 700;
}

.article-content em {
    font-style: italic;
}

.article-content img {
    max-width: 100%;
    border-radius: 6px;
    margin: 10px 0;
}

.article-content hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 35px 0;
}

/* Read Also Box */
.read-also-box {
    border-left: 4px solid var(--primary-color);
    background: var(--bg-body);
    padding: 15px 20px;
    margin: 35px 0;
    border-radius: 0 6px 6px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rb-label {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    font-size: 0.8rem;
    /* font-family: 'Montserrat', Arial, sans-serif; */
}

.rb-content {
    display: flex;
    gap: 15px;
    align-items: center;
}

.rb-content img {
    width: 100px;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.rb-content span {
    font-weight: 600;
    /* font-family: 'Montserrat', Arial, sans-serif; */
    font-size: 1.05rem;
    color: var(--primary-color);
}

.rb-content:hover span {
    text-decoration: underline;
}

/* Share Section */
.share-section-bottom {
    margin-top: 45px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
}

.share-title {
    font-weight: 600;
    /* font-family: 'Montserrat', Arial, sans-serif; */
    margin-bottom: 15px;
}

.share-icons {
    display: flex;
    gap: 12px;
}

.share-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: 0.2s;
}

.share-icon:hover {
    transform: translateY(-3px);
}

.si-fb {
    background: #3b5998;
}

.si-tw {
    background: #1da1f2;
}

.si-wa {
    background: #25D366;
}

.si-em {
    background: #777;
}

/* Post Navigation - Fixed Symmetric Layout */
.post-navigation {
    display: flex;
    align-items: stretch;
    gap: 15px;
    margin-top: 50px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
}

/* Sticky Navigation - Mobile Only */
@media (max-width: 768px) {
    .post-navigation.sticky {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        z-index: 999;
        background: var(--bg-card);
        border-top: 2px solid var(--primary-color);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        padding: 15px;
        animation: slideUp 0.3s ease;
    }

    /* Hide titles when sticky - keep only Previous/Next */
    .post-navigation.sticky .nav-title {
        display: none;
    }

    .post-navigation.sticky .nav-link {
        padding: 15px 20px;
    }

    .post-navigation.sticky .nav-label {
        margin-bottom: 0;
        font-size: 0.85rem;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-link {
    flex: 1;
    background: var(--bg-body);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-link.next::before {
    left: auto;
    right: 0;
}

.nav-link:hover::before {
    transform: scaleY(1);
}

.nav-link:hover {
    border-color: var(--primary-color);
    background: var(--bg-card);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-link.prev {
    text-align: left;
}

.nav-link.next {
    text-align: right;
}

.nav-link.disabled {
    opacity: 0.3;
    pointer-events: none;
    cursor: not-allowed;
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 700;
    /* font-family: 'Montserrat', Arial, sans-serif; */
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link.prev .nav-label {
    justify-content: flex-start;
}

.nav-link.next .nav-label {
    justify-content: flex-end;
}

.nav-title {
    /* font-family: 'Montserrat', Arial, sans-serif; */
    font-weight: 600;
    line-height: 1.4;
    font-size: 1rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-link:hover .nav-title {
    color: var(--primary-color);
}

/* Navigation placeholder when sticky */
.nav-placeholder {
    display: none;
}

.nav-placeholder.active {
    display: block;
    height: 100px;
}

/* Related Section */
.related-section {
    margin-top: 55px;
}

.section-heading {
    font-size: 1.75rem;
    /* font-family: 'Montserrat', Arial, sans-serif; */
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    line-height: 1.2;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-card:hover {
    transform: translateY(-4px);
}

.related-card img {
    height: 160px;
    width: 100%;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
}

.related-card h4 {
    /* font-family: 'Montserrat', Arial, sans-serif; */
    font-weight: 600;
}

.related-card:hover h4 {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 900px) {
    .article-container {
        padding: 25px 20px;
    }

    .article-title {
        font-size: 2rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .article-title {
        font-size: 1.75rem;
    }
}

/* Prevent Layout Shift (CLS) - Image Aspect Ratios */
.featured-image img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.related-card img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
}