/* Article Page Styles - Integrated with Enhanced PDF Reader */
:root {
    --sage-green: #28a745;
    --border-color: #dee2e6;
    --bg-light: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--text-primary);
    background-color: #ffffff;
    line-height: 1.7;
}

/* Article Header Section */
.article-header-section {
    background-color: var(--bg-light);
    border-bottom: 3px solid var(--border-color);
    padding: 2.5rem 0;
    margin-bottom: 2rem;
}

.article-type-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background-color: #e9ecef;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
    margin-bottom: 1rem;
}

.open-access-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background-color: #ffffff;
    color: var(--sage-green);
    border: 2px solid var(--sage-green);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 3px;
    margin-left: 0.5rem;
}

.open-access-badge i {
    margin-right: 0.4rem;
}

.article-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.author-list {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.affiliation-list {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.publication-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.publication-info-item {
    display: flex;
    align-items: center;
}

.publication-info-item strong {
    margin-right: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Sidebar Styling */
.article-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-section {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.metric-item:hover {
    background-color: #f8f9fa;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.metric-item:last-child {
    border-bottom: none;
}

.metric-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.metric-label i {
    width: 16px;
    text-align: center;
}

.metric-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.metric-value.altmetric-low {
    color: #6c757d;
}

.metric-value.altmetric-medium {
    color: #ffc107;
}

.metric-value.altmetric-high {
    color: #28a745;
}

.metric-info {
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.btn-download {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--sage-green);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-download:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    color: white;
}

.btn-download i {
    margin-right: 0.5rem;
}

/* Main Content Area */
.article-content-area {
    background-color: #ffffff;
}

/* Accordion Styling */
.accordion-button {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--bg-light);
    padding: 1.25rem 1.5rem;
}

.accordion-button:not(.collapsed) {
    background-color: #e9ecef;
    color: var(--text-primary);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--border-color);
}

.accordion-body {
    padding: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.accordion-item {
    border: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

/* Keywords Styling */
.keyword-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background-color: #e9ecef;
    color: var(--text-secondary);
    border-radius: 3px;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Citation Box */
.citation-box {
    background-color: #f8f9fa;
    border-left: 4px solid var(--sage-green);
    padding: 1.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    margin: 1rem 0;
    position: relative;
}

.citation-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.citation-copy-btn:hover {
    background-color: var(--sage-green);
    color: white;
    border-color: var(--sage-green);
}

/* View Toggle Buttons */
.view-toggle-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.view-toggle-btn {
    padding: 0.75rem 1.5rem;
    background-color: #ffffff;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.view-toggle-btn:hover {
    background-color: var(--bg-light);
}

.view-toggle-btn.active {
    background-color: var(--sage-green);
    color: white;
    border-color: var(--sage-green);
}

.view-toggle-btn i {
    font-size: 1rem;
}

/* PDF Viewer Container - Updated for Enhanced Reader */
.pdf-viewer-container {
    display: none;
    margin: 1.5rem 0;
}

.pdf-viewer-container.active {
    display: block;
}

/* Enhanced PDF Reader Styles */
.enhanced-pdf-reader {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px 0;
}

/* PDF Reader Header */
.pdf-reader-header {
    background: var(--primary-gradient);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.pdf-reader-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.pdf-reader-title i {
    font-size: 1.5rem;
}

.pdf-title-text {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pdf-reader-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pdf-control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pdf-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: white;
}

.pdf-control-btn:active {
    transform: translateY(0);
}

.pdf-zoom-level {
    color: white;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    font-size: 0.9rem;
}

/* PDF Navigation Controls */
.pdf-navigation-controls {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.pdf-nav-btn {
    background: var(--sage-green);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.pdf-nav-btn:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.pdf-nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.pdf-page-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 8px 15px;
    border-radius: 6px;
    border: 2px solid #e9ecef;
}

.page-label,
.page-separator {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.pdf-page-input {
    width: 60px;
    text-align: center;
    border: 2px solid var(--sage-green);
    border-radius: 4px;
    padding: 5px 8px;
    font-weight: 600;
    color: var(--sage-green);
    font-size: 0.95rem;
}

.pdf-page-input:focus {
    outline: none;
    border-color: #218838;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.pdf-total-pages {
    font-weight: 600;
    color: var(--sage-green);
    min-width: 30px;
    text-align: center;
}

/* PDF Canvas Container */
.pdf-canvas-container {
    position: relative;
    background: #525659;
    overflow: auto;
    min-height: 600px;
    max-height: 800px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

.pdf-render-canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: white;
    display: block;
}

/* PDF Loading Overlay */
.pdf-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(82, 86, 89, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 10;
}

.pdf-loading-overlay p {
    margin: 0;
    font-weight: 500;
}

/* PDF Fallback */
.pdf-fallback {
    padding: 40px 20px;
    text-align: center;
}

/* Mobile Prompt */
.pdf-mobile-prompt {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
}

.mobile-prompt-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
}

.mobile-prompt-content i {
    font-size: 3rem;
    color: var(--sage-green);
    margin-bottom: 15px;
}

.mobile-prompt-content h5 {
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.mobile-prompt-content p {
    color: #666;
    margin-bottom: 20px;
}

.mobile-prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Fullscreen Mode */
.enhanced-pdf-reader.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    margin: 0;
    border-radius: 0;
}

.enhanced-pdf-reader.fullscreen .pdf-canvas-container {
    max-height: none;
    height: calc(100vh - 140px);
}

/* Text View Container */
.text-view-container {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 3rem;
    margin: 1.5rem 0;
    background-color: #ffffff;
    display: none;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.text-view-container.active {
    display: block;
}

.text-view-content {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-primary);
}

.text-view-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.text-view-content h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.text-view-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

.text-view-content p {
    margin-bottom: 1.25rem;
    text-align: justify;
}

.text-view-content blockquote {
    border-left: 4px solid var(--sage-green);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.text-view-content ul, .text-view-content ol {
    margin: 1rem 0 1.5rem 2rem;
}

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

.text-view-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.text-view-content table th,
.text-view-content table td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
}

.text-view-content table th {
    background-color: var(--bg-light);
    font-weight: 600;
}

.text-view-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.text-view-content code {
    background-color: #f0f0f0;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

.text-view-content pre {
    background-color: #f0f0f0;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Related Articles */
.related-article-card {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.related-article-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.related-article-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.related-article-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.related-article-title a:hover {
    color: #0056b3;
}

.related-article-authors {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

/* Social Sharing */
.social-share-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.social-btn:hover {
    background-color: var(--bg-light);
    color: var(--text-primary);
}

.social-btn i {
    margin-right: 0.5rem;
}

/* Section Headers */
.section-header {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Info Table */
.info-table {
    width: 100%;
    margin: 1rem 0;
}

.info-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.info-table td:first-child {
    font-weight: 600;
    color: var(--text-secondary);
    width: 40%;
}

/* DOI Badge */
.doi-link {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    background-color: #e9ecef;
    border-radius: 3px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.doi-link:hover {
    background-color: #dee2e6;
    color: var(--text-primary);
}

.doi-link i {
    margin-right: 0.5rem;
}

/* Altmetric Badge */
#altmetric-badge-container {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Altmetric Transparency Styles */
.formula-box {
    background: var(--primary-gradient);
    border-radius: 8px;
    padding: 1rem;
    color: white;
    margin: 1rem 0;
}

.formula-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.formula-content {
    background: rgba(255,255,255,0.1);
    padding: 0.75rem;
    border-radius: 4px;
    text-align: center;
}

.formula-content code {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    background: none;
    padding: 0;
}

/* Weight Explanation */
.weight-explanation {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    background-color: #f8f9fa;
}

.weight-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.weight-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.weight-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.weight-label i {
    width: 20px;
}

.weight-label .badge {
    margin-left: auto;
    font-size: 0.75rem;
}

.weight-desc {
    font-size: 0.8rem;
    color: #6c757d;
    padding-left: 28px;
}

/* Calculation Details */
.calculation-details {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1rem;
    font-size: 0.85rem;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.calc-row.total {
    border-top: 2px solid #28a745;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-size: 1rem;
}

.total-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #28a745;
}

/* Score Guide */
.guide-content {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1rem;
}

.guide-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.score-range {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
    font-size: 0.75rem;
}

.score-range.low {
    background-color: #e9ecef;
    color: #6c757d;
}

.score-range.medium {
    background-color: #fff3cd;
    color: #856404;
}

.score-range.high {
    background-color: #d1ecf1;
    color: #0c5460;
}

.score-range.exceptional {
    background-color: #d4edda;
    color: #155724;
}

.score-meaning {
    flex: 1;
    color: #6c757d;
}

/* Mobile Styles */
.mobile-menu-toggle {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1001;
    background: var(--sage-green);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:active {
    transform: scale(0.9);
}

.mobile-menu-toggle i {
    font-size: 1.5rem;
}

.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: white;
    z-index: 1003;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
}

.mobile-sidebar.open {
    right: 0;
}

.mobile-sidebar-header {
    position: sticky;
    top: 0;
    background: var(--sage-green);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: white;
}

.mobile-sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.mobile-sidebar-content {
    padding: 1rem;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes countUp {
    from {
        transform: scale(1.2);
    }
    to {
        transform: scale(1);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.metric-value .spinner-border {
    animation: pulse 1.5s ease-in-out infinite;
}

.metric-value[data-animated="true"] {
    animation: countUp 0.3s ease;
}

.calculation-details .calc-row {
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
}

.calculation-details .calc-row:nth-child(1) { animation-delay: 0.1s; }
.calculation-details .calc-row:nth-child(2) { animation-delay: 0.2s; }
.calculation-details .calc-row:nth-child(3) { animation-delay: 0.3s; }
.calculation-details .calc-row:nth-child(4) { animation-delay: 0.4s; }
.calculation-details .calc-row.total { animation-delay: 0.5s; }

.text-view-container.active,
.pdf-viewer-container.active {
    animation: fadeIn 0.3s ease-in-out;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .article-title {
        font-size: 1.75rem;
    }

    .article-sidebar {
        position: static;
        margin-top: 2rem;
    }

    .text-view-container {
        padding: 1.5rem;
    }

    .view-toggle-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .col-lg-3 {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .formula-content code {
        font-size: 0.75rem;
    }
    
    .weight-label {
        flex-wrap: wrap;
    }
    
    .weight-label .badge {
        margin-left: 0;
    }

    /* Enhanced PDF Reader Mobile Styles */
    .pdf-reader-header {
        padding: 12px 15px;
    }

    .pdf-title-text {
        font-size: 0.85rem;
        -webkit-line-clamp: 1;
    }

    .pdf-reader-controls {
        width: 100%;
        justify-content: center;
    }

    .pdf-control-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .pdf-navigation-controls {
        padding: 10px 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .pdf-nav-btn .btn-text {
        display: none;
    }

    .pdf-nav-btn {
        padding: 8px 15px;
    }

    .pdf-page-info {
        padding: 6px 12px;
    }

    .pdf-page-input {
        width: 50px;
        padding: 4px 6px;
        font-size: 0.9rem;
    }

    .pdf-canvas-container {
        min-height: 400px;
        max-height: 600px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .pdf-reader-title i {
        font-size: 1.2rem;
    }

    .pdf-zoom-level {
        font-size: 0.8rem;
        min-width: 45px;
    }

    .page-label,
    .page-separator {
        font-size: 0.8rem;
    }

    .pdf-canvas-container {
        min-height: 300px;
        padding: 5px;
    }

    .text-view-container {
        padding: 15px 10px;
        border-radius: 6px;
    }

    .text-view-content {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .text-view-content h2 {
        font-size: 1.2rem;
    }

    .view-toggle-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .view-toggle-btn i {
        font-size: 1rem;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle,
    .mobile-sidebar-overlay,
    .mobile-sidebar {
        display: none !important;
    }
}

/* Print Styles */
@media print {
    .view-toggle-container,
    .pdf-reader-header,
    .pdf-navigation-controls,
    .mobile-menu-toggle,
    .sidebar-section,
    .social-share-buttons {
        display: none;
    }

    .text-view-container,
    .pdf-viewer-container {
        display: block !important;
        box-shadow: none;
    }

    .pdf-canvas-container {
        max-height: none;
        overflow: visible;
    }

    .article-sidebar {
        display: none;
    }

    .col-lg-9 {
        width: 100%;
    }
}