/* ============================================================================
   WHITEPAPER SECTION STYLES
   ============================================================================ */

/* Whitepaper Section */
.whitepaper-section {
    background: var(--slate-950);
    min-height: 100vh;
    padding-top: 120px;
    display: none;
}

.page-whitepaper .whitepaper-section {
    display: block;
}

.page-whitepaper .expandable-home-section {
    display: none;
}

.whitepaper-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 2rem;
}

/* Sidebar */
.whitepaper-sidebar {
    width: 350px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 120px;
    backdrop-filter: var(--blur-lg);
}

.whitepaper-sidebar h3 {
    color: var(--gold-400);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold-600);
    font-size: 0.78rem;
    font-weight: 700;
}

.chapter-list {
    list-style: none;
}

.chapter-item {
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    border-left: 3px solid transparent;
    font-weight: 500;
    font-size: 0.625rem;
    color: var(--slate-300);
}

.chapter-item:hover {
    background: rgba(234, 179, 8, 0.12);
    border-left-color: var(--gold-400);
    transform: translateX(5px);
    color: var(--slate-100);
}

.chapter-item.active {
    background: var(--gradient-gold);
    color: var(--slate-950);
    border-left-color: var(--gold-700);
    font-weight: 600;
}

.chapter-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: var(--slate-500);
}

.chapter-item.disabled:hover {
    transform: none;
    background: transparent;
    border-left-color: transparent;
}

.chapter-number {
    font-weight: 700;
    color: var(--gold-400);
    font-family: var(--font-mono);
    font-size: 0.56rem;
}

.chapter-item.active .chapter-number {
    color: var(--slate-950);
}

/* Content Area */
.whitepaper-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 3rem;
    backdrop-filter: var(--blur-lg);
    min-height: 70vh;
}

.chapter-content {
    display: none;
}

.chapter-content.active {
    display: block;
    animation: fadeInUp 0.6s var(--ease-out);
}

.chapter-title {
    font-size: 2.5rem;
    color: var(--slate-100);
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 800;
    background: linear-gradient(135deg, var(--slate-100) 0%, var(--gold-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chapter-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: rgba(234, 179, 8, 0.08);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--gold-400);
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--slate-400);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.meta-value {
    font-weight: 600;
    color: var(--gold-400);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.chapter-intro {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--slate-300);
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--gold-400);
    font-style: italic;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section-title {
    font-size: 1.75rem;
    color: var(--slate-100);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(234, 179, 8, 0.3);
    font-weight: 700;
}

.content-section-content {
    line-height: 1.8;
    color: var(--slate-300);
}

.content-section-content h3 {
    color: var(--slate-100);
    margin: 2rem 0 1rem 0;
    font-size: 1.375rem;
    font-weight: 600;
}

.content-section-content h4 {
    color: var(--slate-200);
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.content-section-content p {
    margin-bottom: 1.25rem;
}

.content-section-content ul, 
.content-section-content ol {
    margin: 1.25rem 0 1.25rem 2rem;
}

.content-section-content li {
    margin-bottom: 0.75rem;
}

/* Code blocks */
.content-section-content pre {
    background: var(--slate-900);
    color: var(--slate-100);
    padding: 2rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1.5rem 0;
    border-left: 4px solid var(--gold-400);
    font-family: var(--font-mono);
}

.content-section-content code {
    background: rgba(234, 179, 8, 0.15);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    color: var(--gold-400);
    font-size: 0.9em;
}

/* Tables */
.content-section-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.content-section-content th,
.content-section-content td {
    padding: 1.25rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.content-section-content th {
    background: var(--gradient-gold);
    color: var(--slate-950);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.content-section-content tr:hover {
    background: rgba(234, 179, 8, 0.08);
}

/* Key Takeaways */
.key-takeaways {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(234, 179, 8, 0.08));
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    margin-top: 3rem;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.key-takeaways h3 {
    color: var(--gold-400);
    margin-bottom: 1.5rem;
    font-size: 1.375rem;
    font-weight: 700;
}

.takeaways-list {
    list-style: none;
}

.takeaway-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(234, 179, 8, 0.15);
    color: var(--slate-200);
    font-weight: 500;
    line-height: 1.6;
}

.takeaway-item:last-child {
    border-bottom: none;
}

.takeaway-item::before {
    content: "→";
    margin-right: 0.75rem;
    font-weight: bold;
    color: var(--gold-400);
}

/* Navigation Controls */
.chapter-navigation,
.chapter-navigation-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chapter-navigation-top {
    margin-bottom: 3rem;
    border-bottom: 2px solid rgba(234, 179, 8, 0.3);
    border-top: none;
}

.chapter-navigation {
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
}

.nav-chapter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--slate-300);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: var(--blur-md);
    cursor: pointer;
    min-width: 200px;
    max-width: 200px;
    min-height: 60px;
    text-align: center;
    flex: 0 0 200px;
}

.nav-chapter-btn span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-chapter-btn:hover {
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(234, 179, 8, 0.3);
    color: var(--gold-400);
    transform: translateY(-2px);
}

.nav-chapter-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Whitepaper Responsive Design */
@media (max-width: 1024px) {
    .whitepaper-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .whitepaper-sidebar {
        width: 100%;
        position: static;
        max-height: 300px;
        overflow-y: auto;
    }
    
    .whitepaper-content {
        padding: 1.5rem;
    }
    
    .chapter-title {
        font-size: 1.75rem;
    }
    
    .chapter-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .chapter-navigation,
    .chapter-navigation-top {
        flex-direction: row;
        gap: 1rem;
        justify-content: space-between;
    }
    
    .nav-chapter-btn {
        min-width: 180px;
        max-width: 180px;
        flex: 0 0 180px;
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .whitepaper-section {
        padding-top: 90px;
    }
    
    .whitepaper-container {
        padding: 0 1rem;
    }
    
    .whitepaper-content {
        padding: 1rem;
    }
    
    .chapter-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .chapter-meta {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .chapter-intro {
        padding: 1.5rem;
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .content-section-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .content-section-content h3 {
        font-size: 1.125rem;
        margin: 1.5rem 0 0.75rem 0;
    }
    
    .content-section-content h4 {
        font-size: 1rem;
        margin: 1rem 0 0.5rem 0;
    }
    
    .content-section-content pre {
        padding: 1rem;
        font-size: 0.8rem;
        overflow-x: auto;
    }
    
    .content-section-content table {
        font-size: 0.85rem;
    }
    
    .content-section-content th,
    .content-section-content td {
        padding: 0.75rem;
    }
    
    .key-takeaways {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .key-takeaways h3 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
    
    .takeaway-item {
        padding: 0.75rem 0;
        font-size: 0.9rem;
    }
    
    .chapter-navigation,
    .chapter-navigation-top {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .nav-chapter-btn {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        flex: 1;
        justify-content: center;
    }
    
    .meta-item {
        min-width: 120px;
    }
    
    .meta-value {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .whitepaper-sidebar {
        padding: 1rem;
        max-height: 250px;
    }
    
    .chapter-item {
        padding: 0.5rem;
        font-size: 0.6rem;
    }
    
    .chapter-number {
        font-size: 0.5rem;
    }
    
    .whitepaper-content {
        padding: 0.75rem;
    }
    
    .chapter-title {
        font-size: 1.25rem;
    }
    
    .chapter-meta {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .meta-item {
        min-width: auto;
    }
    
    .chapter-intro {
        padding: 1rem;
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .content-section {
        margin-bottom: 2rem;
    }
    
    .content-section-title {
        font-size: 1.125rem;
    }
    
    .content-section-content {
        font-size: 0.9rem;
    }
}