/* Article-Specific Styles for BFRT Safety Guide */

/* Article Header */
.article-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.breadcrumb a {
    color: #94a3b8;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: white;
}

.article-header h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.2;
}

.article-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    font-size: 0.95rem;
    color: #94a3b8;
}

.download-pdf {
    color: #60a5fa;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.download-pdf:hover {
    color: #93c5fd;
}

/* Table of Contents Sidebar */
.toc-sidebar {
    position: fixed;
    left: 2rem;
    top: 200px;
    width: 240px;
    display: none;
    z-index: 100;
}

@media (min-width: 1600px) {
    .toc-sidebar {
        display: block;
    }
    
    /* Make space for TOC so it doesn't overlap */
    .article-content .container {
        margin-left: 280px;
        margin-right: auto;
    }
}

.table-of-contents {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    transition: opacity 0.3s ease;
}

.table-of-contents::-webkit-scrollbar {
    width: 4px;
}

.table-of-contents::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-of-contents::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.table-of-contents::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.table-of-contents h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #0f172a;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 0.75rem;
}

.table-of-contents a {
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

.table-of-contents a:hover {
    color: #0f172a;
}

.table-of-contents a.active {
    color: #0f172a;
    font-weight: 600;
    border-left: 3px solid #0f172a;
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

/* Article Content */
.article-content {
    padding: 4rem 0;
    background: #f8fafc;
}

.content-section {
    background: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.content-section h2 {
    font-size: 2.5rem;
    color: #0f172a;
    margin-bottom: 2rem;
    text-align: center;
}

.content-section h3 {
    font-size: 1.75rem;
    color: #1e293b;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.content-section h4 {
    font-size: 1.35rem;
    color: #334155;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-section h5 {
    font-size: 1.15rem;
    color: #475569;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 2rem;
}

/* Full-width Images */
.full-width-image {
    margin: 3rem 0;
    text-align: center;
}

.full-width-image img {
    width: 100%;
    max-width: 1100px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.full-width-image img:hover {
    transform: scale(1.02);
}

.full-width-image figcaption {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #64748b;
    font-style: italic;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 3rem;
    margin: 3rem 0;
}

.comparison-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.comparison-item figure {
    margin-bottom: 1.5rem;
}

.comparison-item figure img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: zoom-in;
}

.comparison-item figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
}

.comparison-item .content h4 {
    margin-top: 0;
}

.note {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
}

/* Risk Tools Tabs */
.risk-tools-tabs {
    margin: 3rem 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.tab-navigation {
    display: flex;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.tab-button {
    flex: 1;
    padding: 1.25rem 2rem;
    background: transparent;
    border: none;
    font-size: 1.05rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: white;
    color: #0f172a;
}

.tab-button.active {
    background: white;
    color: #0f172a;
    border-bottom-color: #0f172a;
}

.tab-content {
    display: none;
    padding: 3rem;
}

.tab-content.active {
    display: block;
}

.tool-image {
    margin-bottom: 2rem;
}

.tool-image img {
    width: 100%;
    max-width: 1000px;
    height: auto;
    border-radius: 8px;
    cursor: zoom-in;
}

.tool-content {
    max-width: 900px;
}

/* Comparison Table */
.comparison-layout {
    max-width: 1100px;
    margin: 0 auto;
}

.comparison-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.comparison-images img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: zoom-in;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table thead {
    background: #0f172a;
    color: white;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.comparison-table th {
    font-weight: 600;
    font-size: 0.95rem;
}

.comparison-table tbody tr:hover {
    background: #f8fafc;
}

.recommendation {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    padding: 1.25rem;
    margin-top: 2rem;
    border-radius: 4px;
    font-size: 0.95rem;
}

/* Accordion */
.screening-accordion {
    margin: 3rem 0;
}

.accordion-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s;
}

.accordion-item:hover {
    border-color: #cbd5e1;
}

.accordion-header {
    width: 100%;
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.3s;
}

.accordion-header:hover {
    background: #f1f5f9;
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.35rem;
    color: #0f172a;
}

.accordion-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: #64748b;
    transition: transform 0.3s;
}

.accordion-item.expanded .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.accordion-item.expanded .accordion-content {
    max-height: 5000px;
    transition: max-height 0.6s ease-in;
}

.accordion-content.visible {
    padding: 2rem;
}

.accordion-content figure {
    margin-bottom: 2rem;
}

.accordion-content figure img {
    width: 100%;
    max-width: 1000px;
    height: auto;
    border-radius: 8px;
    cursor: zoom-in;
}

.protocol-details {
    max-width: 900px;
}

/* Special Boxes */
.warning-box,
.monitoring-box,
.emergency-box,
.clinical-pearl,
.cta-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.warning-box {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #7f1d1d;
}

.monitoring-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
}

.emergency-box {
    background: #fef2f2;
    border: 2px solid #dc2626;
    border-left: 6px solid #dc2626;
}

.emergency-box h4 {
    color: #991b1b;
    margin-top: 0;
}

.clinical-pearl {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
}

.cta-box {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    text-align: center;
}

.cta-box h3 {
    color: white;
    margin-top: 0;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.clearance-decision {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.green-status {
    color: #16a34a;
}

.yellow-status {
    color: #ca8a04;
}

.red-status {
    color: #dc2626;
}

.stop-criteria {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    padding: 1rem 1rem 1rem 1.5rem;
    margin: 1.5rem 0;
    font-weight: 500;
}

/* FAQ Section */
.faq-accordion .faq-item {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 0;
}

.faq-question {
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #0f172a;
}

.faq-icon {
    font-size: 1.5rem;
    color: #64748b;
    transition: transform 0.3s;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0;
}

.faq-question[aria-expanded="true"] + .faq-answer {
    max-height: 2000px;
    padding-top: 1.5rem;
    transition: max-height 0.5s ease-in;
}

/* Article CTA Section */
.article-cta-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 5rem 0;
    color: white;
    text-align: center;
}

.article-cta-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.article-cta-content p {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.guarantee {
    margin-top: 1.5rem !important;
    font-size: 0.95rem !important;
    color: #94a3b8 !important;
}

/* Disclaimer */
.disclaimer-section {
    background: #f8fafc;
    padding: 3rem 0;
    text-align: center;
}

.disclaimer-section h4 {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.disclaimer-section p {
    max-width: 900px;
    margin: 0 auto;
    color: #64748b;
    line-height: 1.7;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-close:hover {
    color: #cbd5e1;
}

.lightbox-caption {
    text-align: center;
    color: #cbd5e1;
    padding: 1rem;
    position: absolute;
    bottom: 20px;
    width: 100%;
    font-size: 0.95rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 1024px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-images {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .article-header h1 {
        font-size: 2rem;
    }
    
    .article-subtitle {
        font-size: 1.1rem;
    }
    
    .content-section h2 {
        font-size: 2rem;
    }
    
    .tab-navigation {
        flex-direction: column;
    }
    
    .tab-button {
        text-align: left;
    }
    
    .tab-content,
    .accordion-content.visible {
        padding: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
}
