/* MDPI-Style Article Page CSS */

/* ========== Global Text Justification ========== */
.obj_article_details,
.article-mdpi-container {
    text-align: justify;
}

/* ========== Layout Structure ========== */
.article-mdpi-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
}

/* Left Navigation Sidebar */
.article-nav-sidebar {
    width: 200px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    text-align: left;
}

.article-nav-sidebar .nav-section {
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.article-nav-sidebar .nav-section h4 {
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
}

.article-nav-sidebar .nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-nav-sidebar .nav-links li {
    margin-bottom: 8px;
}

.article-nav-sidebar .nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 13px;
    display: block;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.article-nav-sidebar .nav-links a:hover,
.article-nav-sidebar .nav-links a.active {
    background: #007bff;
    color: #fff;
}

/* Main Content Area */
.article-main-content {
    flex: 1;
    min-width: 0;
    max-width: 800px;
    text-align: justify;
}

/* Right Info Sidebar */
.article-info-sidebar {
    width: 280px;
    flex-shrink: 0;
    text-align: left;
}

.article-info-sidebar .info-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.article-info-sidebar .info-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

/* ========== Article Header ========== */
.article-header {
    margin-bottom: 30px;
    text-align: left;
}

.article-header .article-type {
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.article-header h1.article-title {
    font-size: 28px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
    margin: 0 0 15px;
    text-align: left;
}

.article-header .article-subtitle {
    font-size: 18px;
    color: #555;
    font-weight: 400;
    margin-bottom: 20px;
}

/* Authors */
.article-authors {
    margin-bottom: 20px;
}

.article-authors .author {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 8px;
}

.article-authors .author-name {
    color: #007bff;
    font-weight: 500;
}

.article-authors .author-affiliation {
    font-size: 12px;
    color: #666;
    display: block;
}

/* DOI and Metrics */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
}

.article-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.article-meta .meta-item i {
    color: #007bff;
}

.article-meta .meta-item a {
    color: #007bff;
}

/* ========== Abstract Section ========== */
.article-abstract {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-left: 4px solid #007bff;
    padding: 20px 25px;
    margin-bottom: 30px;
    border-radius: 0 8px 8px 0;
}

.article-abstract h2 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px;
    text-align: left;
}

.article-abstract p {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    margin: 0;
    text-align: justify;
}

/* ========== Keywords ========== */
.article-keywords {
    margin-bottom: 25px;
    text-align: left;
}

.article-keywords h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
}

.article-keywords .keyword {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin: 4px 4px 4px 0;
    transition: all 0.2s;
}

.article-keywords .keyword:hover {
    background: #007bff;
    color: #fff;
}

/* ========== Full Text Content ========== */
.article-fulltext {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    text-align: justify;
}

.article-fulltext p {
    text-align: justify;
    margin-bottom: 15px;
}

.article-fulltext h2,
.article-fulltext h3,
.article-fulltext h4 {
    color: #222;
    margin-top: 30px;
    margin-bottom: 15px;
    text-align: left;
}

.article-fulltext h2 {
    font-size: 22px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.article-fulltext h3 {
    font-size: 18px;
}

.article-fulltext figure {
    margin: 25px 0;
    text-align: center;
}

.article-fulltext figure img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.article-fulltext figcaption {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.article-fulltext table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.article-fulltext table th,
.article-fulltext table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.article-fulltext table th {
    background: #f8f9fa;
    font-weight: 600;
}

/* ========== References ========== */
.article-references {
    text-align: justify;
}

.article-references h2 {
    text-align: left;
}

.article-references .references-list {
    padding-left: 25px;
}

.article-references .references-list li {
    margin-bottom: 10px;
    text-align: justify;
}

/* ========== Author Bios ========== */
.article-author-bios {
    text-align: justify;
}

.article-author-bios h2 {
    text-align: left;
}

.article-author-bios .author-bio {
    margin-bottom: 20px;
}

.article-author-bios .author-bio h4 {
    text-align: left;
}

/* ========== Download Buttons ========== */
.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-buttons .btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.download-buttons .btn-pdf {
    background: #dc3545;
    color: #fff;
}

.download-buttons .btn-pdf:hover {
    background: #c82333;
}

.download-buttons .btn-html {
    background: #28a745;
    color: #fff;
}

.download-buttons .btn-html:hover {
    background: #218838;
}

.download-buttons .btn-xml {
    background: #17a2b8;
    color: #fff;
}

.download-buttons .btn-xml:hover {
    background: #138496;
}

/* ========== Metrics Card ========== */
.metrics-display {
    display: flex;
    gap: 20px;
}

.metrics-display .metric {
    text-align: center;
    flex: 1;
}

.metrics-display .metric-value {
    font-size: 24px;
    font-weight: 700;
    color: #007bff;
}

.metrics-display .metric-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

/* ========== Citation Card ========== */
.citation-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #444;
    text-align: justify;
}

.citation-formats {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.citation-formats a {
    font-size: 12px;
    padding: 4px 10px;
    background: #e9ecef;
    color: #495057;
    border-radius: 4px;
    text-decoration: none;
}

.citation-formats a:hover {
    background: #007bff;
    color: #fff;
}

/* ========== Responsive Design ========== */
@media (max-width: 1200px) {
    .article-nav-sidebar {
        display: none;
    }
}

@media (max-width: 992px) {
    .article-mdpi-container {
        flex-direction: column;
    }
    
    .article-info-sidebar {
        width: 100%;
        order: -1;
    }
    
    .article-main-content {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .article-header h1.article-title {
        font-size: 22px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* Text Justification Override */
.obj_article_details,
.article-mdpi-container,
.article-main-content,
.article-main-content p,
.article-abstract,
.article-abstract p,
.article-fulltext,
.article-fulltext p,
.article-references,
.article-references li,
.article-author-bios,
.citation-box {
    text-align: justify !important;
}

