/* Article-specific styles - uses CSS variables from theme.css */

/* Article container and layout */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.article-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Article page theme toggle - minimal override for positioning */
.article-nav .theme-toggle {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    margin: 0 !important;
}

.back-link {
    background-color: var(--text-secondary);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.back-link:hover {
    background-color: #5a6268;
}

html[data-theme="light"] .back-link {
    background-color: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
}

html[data-theme="light"] .back-link:hover {
    background-color: rgba(108, 117, 125, 0.15);
    color: #495057;
    border-color: #495057;
}

.back-link::before {
    content: "← ";
}


/* Article header (different from homepage header) */
.header {
    text-align: center;
    border-bottom: 3px solid var(--accent-primary);
    margin-bottom: 40px;
    padding-bottom: 15px;
}

.header h1 {
    color: var(--heading-color);
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.2;
    white-space: nowrap;
}

.logo {
    background-color: var(--accent-primary);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 0 6px 12px rgba(30, 64, 175, 0.4);
}

.case-title {
    color: var(--heading-color);
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.2;
}

.case-meta {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.case-meta span {
    background: var(--card-bg);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.case-summary {
    color: var(--text-color);
    font-size: 1.3em;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Timeline Box Styles */
.timeline-box {
    background: var(--card-bg);
    border-left: 4px solid #dc2626;
    padding: 25px;
    margin: 20px 0;
    border-radius: 8px;
}


.timeline-box p:last-child {
    margin-bottom: 0;
}

.timeline-box h4 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 1px solid #dc2626;
    padding-bottom: 8px;
}

.timeline-box ul {
    color: var(--text-muted);
    margin-left: 25px;
}

.timeline-box li {
    margin-bottom: 8px;
}

/* Investigation Content */
.investigation-content {
    line-height: 1.8;
    max-width: none;
}

.investigation-content p {
    margin-bottom: 1.5em;
    color: var(--text-color);
    font-size: 1.1em;
}

.investigation-content h2 {
    color: var(--heading-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.investigation-content h3 {
    color: var(--heading-color);
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.investigation-content ul {
    margin-left: 30px;
    margin-bottom: 1.5em;
    color: var(--text-color);
}

.investigation-content li {
    margin-bottom: 8px;
}

.investigation-content blockquote {
    border-left: 4px solid #dc2626;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-muted);
}

/* Timeline Styles */
.timeline {
    position: relative;
    margin: 40px 0;
    padding: 20px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--accent-primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    justify-content: flex-end;
    width: 50%;
}

.timeline-item:nth-child(even) {
    left: 50%;
    justify-content: flex-start;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--accent-primary);
    border: none;
    top: 20px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -30px;
}

.timeline-item:nth-child(even)::after {
    left: -30px;
}

.timeline-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow);
    position: relative;
    margin-right: 30px;
    transition: all 0.3s ease;
    border-left: 4px solid #dc2626;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: 0;
    margin-left: 30px;
}

.timeline-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.3);
}

.timeline-content.warning:hover {
    box-shadow: 0 6px 12px rgba(245, 158, 11, 0.4);
}

.timeline-content.negligence:hover {
    box-shadow: 0 6px 12px rgba(245, 158, 11, 0.4);
}

.timeline-content.positive:hover {
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
}

.timeline-content.critical-decision:hover {
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.4);
}

.timeline-content.tragedy:hover {
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.5);
}

.timeline-date {
    color: var(--text-muted);
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.timeline-title {
    color: var(--heading-color);
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
    border-bottom: 1px solid #dc2626;
    padding-bottom: 8px;
}

.timeline-content.warning .timeline-title {
    border-bottom: 1px solid #f59e0b;
}

.timeline-content.negligence .timeline-title {
    border-bottom: 1px solid #f59e0b;
}

.timeline-content.positive .timeline-title {
    border-bottom: 1px solid var(--accent-success);
}

.timeline-text {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Timeline content styling by severity */
.timeline-content.warning {
    border-left: 4px solid #f59e0b;
}

.timeline-content.negligence {
    border-left: 4px solid #f59e0b;
}

.timeline-content.positive {
    border-left: 4px solid var(--accent-success);
}

.timeline-content.critical-decision {
    border-left: 4px solid #dc2626;
}

.timeline-content.tragedy {
    border-left: 4px solid #dc2626;
}

/* Sources Styles */
.sources-container {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.source-category {
    margin-bottom: 30px;
}

.source-category h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.3em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.source-item {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-primary);
    transition: all 0.3s ease;
}

.source-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px var(--shadow);
}

.source-item h4 {
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 1.1em;
}

.source-item p {
    color: var(--text-muted);
    margin-bottom: 10px;
    font-size: 0.95em;
}

.source-item a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.source-item a:hover {
    text-decoration: underline;
}

.source-date {
    color: var(--text-muted);
    font-size: 0.9em;
    font-style: italic;
}

/* Tab content specific padding for article */
#investigation {
    padding: 20px;
}

#investigation > *:first-child {
    margin-top: 0;
}

#investigation > *:last-child {
    margin-bottom: 0;
}

#timeline {
    padding: 20px 20px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

#timeline > *:first-child {
    margin-top: 0;
}

#timeline > *:last-child {
    margin-bottom: 0;
}

#sources {
    padding: 15px 20px 20px 20px;
}

#sources > *:first-child {
    margin-top: 0;
}

#sources > *:last-child {
    margin-bottom: 0;
}

/* Article-specific elements */
.judge-profile {
    background: var(--card-bg);
    border-left: 4px solid #dc2626;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}


.judge-profile p:last-child {
    margin-bottom: 0;
}

.judge-profile h4 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 1px solid #dc2626;
    padding-bottom: 8px;
}

.judge-profile ul {
    color: var(--text-muted);
    margin-left: 25px;
}

.judge-profile li {
    margin-bottom: 8px;
}

.judge-name {
    color: var(--text-color);
    font-weight: bold;
}

.victim-memorial {
    background: var(--card-bg);
    border-left: 4px solid #28a745;
    text-align: center;
    margin-top: 0;
}

html[data-theme="light"] .victim-memorial {
    background: var(--card-bg);
}

.victim-memorial h4 {
    border-bottom: 1px solid #28a745;
}

.path-forward h4 {
    border-bottom: 1px solid var(--accent-primary);
}

.emphasis {
    font-weight: bold;
    color: var(--text-color);
}

.quote-box {
    background: var(--card-bg);
    border-left: 4px solid var(--accent-primary);
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    font-style: italic;
    text-align: center;
}

html[data-theme="light"] .quote-box {
    background: var(--card-bg);
}

.reform-demand {
    background: var(--card-bg);
    border-left: 4px solid #dc2626;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.reform-demand p:last-child {
    margin-bottom: 0;
}

.reform-demand h4 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 1.1em;
    border-bottom: 1px solid #dc2626;
    padding-bottom: 8px;
}

.stats-comparison {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-box {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-primary);
    text-align: center;
    min-width: 150px;
}

.stat-box.good {
    border-left-color: #28a745;
}

.stat-box.bad {
    border-left-color: #dc3545;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-box.good .stat-number {
    color: #28a745;
}

.stat-box.bad .stat-number {
    color: #dc3545;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-top: 10px;
}

.path-forward {
    background: var(--card-bg);
    border-left: 4px solid var(--accent-primary);
}

.evidence-tag {
    background: var(--accent-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-top: 10px;
    display: inline-block;
}

.footer-note {
    text-align: center;
    margin: 40px 0;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #adb5bd;
    font-size: 0.9em;
}

.sources-intro {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1em;
    text-align: center;
}

.source-type {
    background: var(--accent-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-bottom: 8px;
    display: inline-block;
}

.source-title {
    color: var(--heading-color);
    font-weight: bold;
    margin-bottom: 8px;
}

.source-description {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.source-url a {
    color: var(--link-color);
    word-break: break-all;
}

.evidence-level {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7em;
    margin-left: 8px;
}

.evidence-verified {
    background: var(--accent-success);
    color: white;
}

.evidence-corroborated {
    background: #f59e0b;
    color: white;
}

.category-header {
    color: var(--heading-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.source-list {
    margin-bottom: 30px;
}

.sources-footer {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Article page specific: square tab content for bottom buttons */
.tab-content {
    border-radius: 0 !important;
}

/* Bottom tab navigation */
.bottom-tab-navigation {
    display: flex;
    background: var(--card-bg-alt);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    margin-top: -1px;
    margin-bottom: 0;
    box-shadow: 0 2px 4px var(--shadow);
}

.bottom-tab-button {
    flex: 1;
    background: var(--card-bg);
    color: var(--text-muted);
    padding: 20px 15px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    border-right: 1px solid var(--border-color);
}

.bottom-tab-button:last-child {
    border-right: none;
}

.bottom-tab-button:hover {
    background: #636e72;
    color: var(--text-color);
}

html[data-theme="light"] .bottom-tab-button:hover {
    background: #e9ecef;
    color: var(--text-color);
}

.bottom-tab-button.active {
    background: var(--accent-primary);
    color: white;
}

.sources-link {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: var(--card-bg-alt);
    border-radius: 12px;
}


.sources-link a {
    background-color: var(--accent-primary);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 4px;
    display: inline-block;
    margin: 0 5px;
    font-weight: 600;
}

.sources-link a:hover {
    background-color: #1d4ed8;
}

.sources-link .secondary {
    background-color: #6c757d;
    color: white;
}

.sources-link .secondary:hover {
    background-color: #5a6268;
}

/* Light theme styles for sources link */
:root[data-theme="light"] .sources-link a {
    background-color: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

:root[data-theme="light"] .sources-link a:hover {
    background-color: rgba(30, 64, 175, 0.1);
    color: #1d4ed8;
    border-color: #1d4ed8;
}

:root[data-theme="light"] .sources-link .secondary {
    background-color: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
}

:root[data-theme="light"] .sources-link .secondary:hover {
    background-color: rgba(108, 117, 125, 0.1);
    color: #5a6268;
    border-color: #5a6268;
}

/* Back to top button without wrapper */
.back-to-top {
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 4px;
    display: block;
    margin: 30px auto;
    font-weight: 600;
    text-align: center;
    width: fit-content;
}

.back-to-top:hover {
    background-color: #5a6268;
}

:root[data-theme="light"] .back-to-top {
    background-color: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
}

:root[data-theme="light"] .back-to-top:hover {
    background-color: rgba(108, 117, 125, 0.1);
    color: #5a6268;
    border-color: #5a6268;
}

:root[data-theme="light"] .footer-note {
    border-top: 1px solid #e1e5e9;
    color: #5a6c7d;
}

:root[data-theme="light"] .footer-note strong {
    color: #2c3e50;
}

/* Mobile specific overrides */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .case-title {
        font-size: 2em;
    }

    .case-meta span {
        font-size: 0.8em;
        padding: 4px 8px;
    }

    .case-summary {
        font-size: 1.1em;
    }

    .timeline-box {
        margin: 15px 0;
        padding: 20px;
    }

    .timeline-box h4 {
        font-size: 1.1em;
        margin-bottom: 12px;
    }

    /* Mobile timeline - vertical line at left edge */
    .timeline::after {
        left: 0;
    }

    .timeline-item {
        margin-left: 20px;
        margin-bottom: 40px;
        width: auto;
        justify-content: flex-start;
    }

    .timeline-item:nth-child(even) {
        left: 0;
        justify-content: flex-start;
    }

    .timeline-item::after {
        left: -8px;
    }

    .timeline-item:nth-child(odd)::after {
        left: -8px;
    }

    .timeline-item:nth-child(even)::after {
        left: -8px;
    }

    .timeline-content {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 0;
        margin-right: 0;
    }

    #timeline {
        padding: 12px 8px;
    }

    #sources {
        padding: 12px 8px;
    }
}