:root {
    --lb-primary: #BEAF87;
    --lb-primary-hover: #847252;
    --lb-secondary: #1A1A1A;
    --lb-bg: #f8fafc;
    --lb-card: #ffffff;
    --lb-text: inherit;
    --lb-text-muted: #718096;
    --lb-border: #e2e8f0;
}

#livre-blanc-app {
    font-family: 'Outfit', 'Inter', sans-serif;
    color: var(--lb-text);
    line-height: 1.6;
}

/* Hide WP Default Page Headers if present */
header.page-header, h1.entry-title, h1.page-title {
    display: none !important;
}

/* ==========================================================================
   COVER / TABLE OF CONTENTS VIEW
   ========================================================================== */

.lb-cover-layout {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.lb-cover-header {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    color: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.lb-cover-header::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(190, 159, 88, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.lb-badge-icon {
    width: 80px;
    height: 80px;
    background: rgba(190, 159, 88, 0.15);
    border: 1px solid rgba(190, 159, 88, 0.4);
    color: var(--lb-primary);
    font-size: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px auto;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.lb-cover-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.25;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.lb-cover-description {
    font-size: 18px;
    color: #a0aec0;
    max-width: 700px;
    margin: 0 auto 35px auto;
    line-height: 1.6;
}

.lb-btn-start {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--lb-primary) !important;
    color: white !important;
    text-decoration: none !important;
    padding: 15px 35px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none !important;
}

.lb-btn-start:hover {
    background: var(--lb-primary-hover) !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: none !important;
}

.lb-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent !important;
    border: 2px solid var(--lb-primary) !important;
    color: var(--lb-primary) !important;
    text-decoration: none !important;
    padding: 13px 33px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lb-btn-secondary:hover {
    background: var(--lb-primary) !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: none !important;
}

.lb-section-heading {
    font-size: 26px;
    color: var(--lb-secondary);
    margin-bottom: 30px;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.lb-section-heading::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--lb-primary);
    border-radius: 2px;
}

.lb-toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

@media (max-width: 768px) {
    .lb-toc-grid {
        grid-template-columns: 1fr;
    }
    .lb-cover-title {
        font-size: 28px;
    }
    .lb-cover-header {
        padding: 40px 20px;
    }
}

.lb-toc-card {
    background: var(--lb-card);
    border: 1px solid var(--lb-border);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.lb-toc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
    border-color: rgba(190, 159, 88, 0.5);
}

.lb-toc-card-header {
    margin-bottom: 15px;
}

.lb-toc-number {
    font-size: 12px;
    font-weight: 700;
    color: var(--lb-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 5px;
}

.lb-toc-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--lb-secondary);
    margin: 0;
}

.lb-toc-title a {
    color: var(--lb-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.lb-toc-title a:hover {
    color: var(--lb-secondary);
}

.lb-toc-summary {
    font-size: 15px;
    color: var(--lb-text-muted);
    margin-bottom: 25px;
    flex-grow: 1;
}

.lb-toc-read-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lb-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: gap 0.2s;
}

.lb-toc-read-link:hover {
    color: var(--lb-secondary);
    gap: 12px;
}

/* ==========================================================================
   READER VIEW LAYOUT
   ========================================================================== */

.lb-reader-layout {
    display: flex;
    max-width: 1200px;
    margin: 30px auto;
    background: var(--lb-card);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--lb-border);
    overflow: hidden;
}

/* Sidebar styling */
.lb-sidebar {
    width: 320px;
    border-right: 1px solid var(--lb-border);
    background: #fafafa;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.lb-sidebar-header {
    padding: 25px;
    border-bottom: 1px solid var(--lb-border);
}

.lb-back-toc-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lb-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
}

.lb-back-toc-link:hover {
    color: var(--lb-secondary);
}

.lb-sidebar-nav {
    overflow-y: auto;
    padding: 20px 15px;
}

.lb-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lb-sidebar-menu li {
    margin-bottom: 8px;
}

.lb-sidebar-menu li a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    color: var(--lb-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.lb-sidebar-menu li a:hover {
    background: #f1f5f9;
    color: var(--lb-primary);
}

.lb-sidebar-menu li.active a {
    background: rgba(190, 159, 88, 0.08);
    color: var(--lb-primary);
    border-left: 3px solid var(--lb-primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.lb-menu-num {
    background: #edf2f7;
    color: var(--lb-text-muted);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.lb-sidebar-menu li.active .lb-menu-num {
    background: var(--lb-primary);
    color: white;
}

/* Main Reader Section */
.lb-main-content {
    flex: 1;
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.lb-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--lb-text-muted);
    margin-bottom: 30px;
}

.lb-mobile-back-btn {
    display: none;
    align-items: center;
    gap: 5px;
    color: var(--lb-primary);
    text-decoration: none;
    font-weight: 700;
    margin-right: 10px;
}

.lb-crumb-parent {
    font-weight: 600;
}

.lb-crumb-current {
    font-weight: 500;
    color: var(--lb-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-crumb-separator {
    font-size: 10px;
}

/* Article content styling */
.lb-article {
    max-width: 760px;
    margin-bottom: 50px;
}

.lb-article-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--lb-secondary);
    line-height: 1.25;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--lb-border);
    padding-bottom: 15px;
}

.lb-article-summary {
    background: #f7fafc;
    border-left: 4px solid var(--lb-primary);
    padding: 20px 25px;
    font-size: 17px;
    font-style: italic;
    color: var(--lb-text);
    margin-bottom: 35px;
    border-radius: 0 8px 8px 0;
}

.lb-article-body {
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--lb-text);
}

.lb-article-body h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--lb-secondary);
    margin-top: 40px;
    margin-bottom: 15px;
}

.lb-article-body a {
    color: var(--lb-primary);
    text-decoration: underline;
    transition: color 0.3s;
}

.lb-article-body a:hover {
    color: var(--lb-secondary);
}

.lb-article-body p {
    margin-bottom: 25px;
}

.lb-article-body ul, .lb-article-body ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

.lb-article-body li {
    margin-bottom: 10px;
}

.lb-article-body strong {
    color: #1A1A1A;
}

/* Table styled beautifully inside articles */
.lb-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 15px;
}

.lb-article-body th {
    background: #f7fafc;
    font-weight: 700;
    color: var(--lb-secondary);
    border-bottom: 2px solid var(--lb-border);
    padding: 12px 15px;
    text-align: left;
}

.lb-article-body td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--lb-border);
}

.lb-article-body tr:hover td {
    background: #f8fafc;
}

/* Navigation between chapters */
.lb-navigation-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--lb-border);
    padding-top: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.lb-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px 20px;
    border: 1px solid var(--lb-border);
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.2s;
}

.lb-nav-btn:hover {
    border-color: var(--lb-primary);
    background: #fafafa;
}

.lb-nav-prev {
    text-align: left;
}

.lb-nav-next {
    text-align: right;
}

.lb-nav-finish {
    background: rgba(190, 159, 88, 0.05);
    border-color: rgba(190, 159, 88, 0.3);
}

.lb-nav-finish:hover {
    background: var(--lb-primary);
    border-color: var(--lb-primary);
}

.lb-nav-finish:hover * {
    color: #1A1A1A !important;
}

.lb-nav-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--lb-primary);
    margin-bottom: 5px;
}

.lb-nav-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--lb-secondary);
    line-height: 1.4;
    margin-top: 2px;
}

.lb-nav-spacer {
    flex: 1;
}

/* Call to Action Banner */
.lb-cta-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 25px;
    background: var(--lb-secondary);
    color: white;
    padding: 40px 30px;
    border-radius: 15px;
    margin-top: 30px;
    border: 1px solid rgba(190, 159, 88, 0.2);
}

.lb-cta-banner.text-center {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 45px 30px;
}

.lb-cta-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--lb-primary);
    margin-top: 0;
    margin-bottom: 10px;
}

.lb-cta-content p {
    font-size: 15.5px;
    color: #cbd5e0;
    margin: 0;
}

.lb-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--lb-primary) !important;
    color: white !important;
    font-weight: bold;
    padding: 14px 28px;
    border-radius: 5px;
    text-decoration: none !important;
    transition: all 0.3s;
    font-size: 15px;
    box-shadow: none !important;
    white-space: nowrap;
}

.lb-btn-primary:hover {
    background: var(--lb-primary-hover) !important;
    color: white !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transform: translateY(-1px);
}

.mt-4 {
    margin-top: 1.5rem;
}

/* Responsive configurations */
@media (max-width: 992px) {
    .lb-reader-layout {
        flex-direction: column;
    }
    
    .lb-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--lb-border);
        max-height: 250px;
    }

    .lb-sidebar-header {
        padding: 15px;
    }

    .lb-sidebar-nav {
        padding: 10px;
    }

    .lb-sidebar-menu {
        display: flex;
        gap: 10px;
        padding-bottom: 5px;
    }

    .lb-sidebar-menu li {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .lb-sidebar-menu li a {
        padding: 8px 12px;
        white-space: nowrap;
    }

    .lb-main-content {
        padding: 30px 20px;
    }

    .lb-mobile-back-btn {
        display: inline-flex;
    }

    .lb-cta-banner {
        flex-direction: column;
        text-align: center;
        gap: 25px;
        padding: 30px 20px;
    }
}
