.fbl-section-title {
    font-size: 28px;
    font-weight: 600;
    margin-top: 50px;
    margin-bottom: 10px;
    text-align: center;
    color: var(--text);
}

.fbl-section-desc {
    font-size: 18px;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 30px;
    color: var(--text-muted);
}

.fbl-table {
    margin-top: 25px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.fbl-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
}

.fbl-table th,
.fbl-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    text-align: right;
}

.fbl-table th {
    background: var(--input-bg);
    font-weight: 600;
    text-align: right;
}

.fbl-table tr:nth-child(even) {
    background: var(--input-bg);
}

.fbl-explanation {
    margin-top: 20px;
    padding: 18px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 16px;
    line-height: 1.55;
}

.fbl-explanation p {
    margin-bottom: 10px;
    color: var(--text-muted);
}

.fbl-explanation strong {
    color: var(--text);
}


/* ----------------------------------------------------
   THEME VARIABLES
---------------------------------------------------- */
:root {
    --bg: #0d0f12;
    --card-bg: #141a22;
    --text: #ffffff;
    --text-muted: #cfd6e2;
    --border: #1f2633;
    --input-bg: #0d1117;
    --input-border: #2c3a4a;
    --accent: #0099ff;
    --accent-hover: #33bbff;
    --modal-overlay: rgba(5, 8, 12, 0.85);
}

/* Soft Light Mode */
:root.light {
    --bg: #F7F9FC;
    --card-bg: #FFFFFF;
    --text: #1A1A1A;
    --text-muted: #4A4F57;
    --border: #D7DCE3;
    --input-bg: #FFFFFF;
    --input-border: #C8CED6;
    --accent: #0066CC;
    --accent-hover: #3388FF;
    --modal-overlay: rgba(0, 0, 0, 0.45);
}

/* Smooth transitions for theme switching */
* {
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* ----------------------------------------------------
   GLOBAL
---------------------------------------------------- */
body {
    background: var(--bg) !important;
    color: var(--text) !important;
    font-family: "Inter", sans-serif;
}

/* ----------------------------------------------------
   SUITE CONTAINER
---------------------------------------------------- */
#fbl-calculator-suite.fbl-suite-container {
    width: 100%;
    padding: 60px 40px;
    box-sizing: border-box;
    position: relative;
}

#fbl-calculator-suite .fbl-suite-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text) !important;
    margin-bottom: 10px;
}

#fbl-calculator-suite .fbl-suite-intro {
    font-size: 18px;
    max-width: 700px;
    color: var(--text-muted) !important;
    margin-bottom: 40px;
}

/* ----------------------------------------------------
   THEME TOGGLE BUTTON
---------------------------------------------------- */
.fbl-theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.25s ease;
}

.fbl-theme-toggle:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ----------------------------------------------------
   GRID LAYOUT
---------------------------------------------------- */
#fbl-calculator-suite .fbl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
}

/* ----------------------------------------------------
   CARD DESIGN
---------------------------------------------------- */
#fbl-calculator-suite .fbl-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    padding: 30px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 rgba(0, 153, 255, 0);
    border-radius: 10px;
}

#fbl-calculator-suite .fbl-card:hover {
    border-color: var(--accent) !important;
    box-shadow: 0 0 22px rgba(0, 153, 255, 0.35) !important;
    transform: translateY(-4px);
}

/* Icon neon pulse */
#fbl-calculator-suite .fbl-card:hover .fbl-icon svg {
    animation: neonPulse 1.2s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    from { filter: drop-shadow(0 0 4px var(--accent)); }
    to   { filter: drop-shadow(0 0 10px var(--accent-hover)); }
}

/* ----------------------------------------------------
   CARD CONTENT
---------------------------------------------------- */
#fbl-calculator-suite .fbl-icon {
    margin-bottom: 20px;
    color: var(--accent) !important;
}

#fbl-calculator-suite .fbl-card-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text) !important;
}

#fbl-calculator-suite .fbl-card-desc {
    font-size: 16px;
    color: var(--text-muted) !important;
    margin-bottom: 25px;
}

#fbl-calculator-suite .fbl-card-btn {
    background: var(--accent) !important;
    color: #ffffff !important;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.25s ease;
    border-radius: 6px;
}

#fbl-calculator-suite .fbl-card-btn:hover {
    background: var(--accent-hover) !important;
}

/* ----------------------------------------------------
   MODAL OVERLAY (MERGED)
---------------------------------------------------- */
.fbl-modal {
    display: none; /* Flex applied via JS */
    position: fixed;
    z-index: 99999 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-overlay) !important;
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    padding: 15px; /* Keeps modal off the edges of mobile screens */
}

/* ----------------------------------------------------
   MODAL CONTENT (FLEX + SCROLL FIX)
---------------------------------------------------- */
.fbl-modal-content {
    background: var(--card-bg) !important;
    width: 100%;
    max-width: 520px;
    max-height: 90vh; /* CRITICAL: Never taller than 90% of screen */
    border: 1px solid var(--border) !important;
    box-shadow: 0 0 28px rgba(0, 153, 255, 0.25) !important;
    animation: fadeIn 0.35s ease;
    position: relative;
    border-radius: 10px;
    display: flex;
    flex-direction: column; /* Stacks title and body */
    overflow: hidden; /* Contains the inner scrolling */
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* ----------------------------------------------------
   PINNED MODAL TITLE
---------------------------------------------------- */
.fbl-modal-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    padding: 30px 60px 20px 30px; /* Right padding leaves room for the X */
    color: var(--text) !important;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0; /* Prevents header from shrinking when scrolled */
}

/* ----------------------------------------------------
   SCROLLABLE MODAL BODY
---------------------------------------------------- */
.fbl-modal-body {
    padding: 20px 30px 30px 30px;
    overflow-y: auto; /* Enables vertical scrolling inside the modal */
    -webkit-overflow-scrolling: touch; /* Smooth iOS momentum scroll */
}

/* ----------------------------------------------------
   MODAL CLOSE BUTTON
---------------------------------------------------- */
.fbl-close {
    position: absolute;
    right: 25px;
    top: 25px;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-muted) !important;
    transition: color 0.25s ease;
    line-height: 1;
    z-index: 10;
}

.fbl-close:hover {
    color: #ef4444 !important; /* Turns red for clear UI feedback */
}

/* ----------------------------------------------------
   INPUTS
---------------------------------------------------- */
.fbl-modal-body label {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    color: var(--text-muted) !important;
}

.fbl-modal-body input {
    width: 100%;
    padding: 12px;
    margin-bottom: 18px;
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    color: var(--text) !important;
    font-size: 16px;
    border-radius: 6px;
}

/* ----------------------------------------------------
   CALCULATE BUTTON
---------------------------------------------------- */
.fbl-modal-btn {
    width: 100%;
    background: var(--accent) !important;
    color: #ffffff !important;
    padding: 14px;
    border: none;
    font-size: 17px;
    cursor: pointer;
    transition: background 0.25s ease;
    border-radius: 6px;
}

.fbl-modal-btn:hover {
    background: var(--accent-hover) !important;
}

/* ----------------------------------------------------
   RESULTS BOX
---------------------------------------------------- */
.fbl-results {
    margin-top: 25px;
    padding: 20px;
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    color: var(--text) !important;
    font-size: 17px;
    border-radius: 6px;
}

/* ----------------------------------------------------
   MOBILE POLISH
---------------------------------------------------- */
@media (max-width: 768px) {
    .fbl-modal-content {
        max-height: 95vh;
    }
    .fbl-modal-title {
        font-size: 22px;
        padding: 20px 50px 15px 20px;
    }
    .fbl-modal-body {
        padding: 15px 20px 20px 20px;
    }
    .fbl-close {
        top: 20px;
        right: 15px;
        font-size: 28px;
    }
}

/* ----------------------------------------------------
   HERO SECTION VISIBILITY FIX
---------------------------------------------------- */
.hero {
    background-color: #0f172a !important; /* Forces the deep navy background */
    position: relative;
    z-index: 1;
}

.hero .hero-content {
    position: relative;
    z-index: 10 !important; /* Forces content above any Elementor overlays */
}

.hero h1 {
    color: #ffffff !important; /* Overrides the global body !important tag */
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.6); /* Adds a drop shadow for maximum readability */
}

.hero p {
    color: #e2e8f0 !important; /* A slightly softer white/slate for the subheadline */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    font-weight: 400 !important; /* Prevents Elementor from making it too thin */
}

/* ----------------------------------------------------
   PAGE HEADER & TYPOGRAPHY TWEAKS
---------------------------------------------------- */
.fbl-suite-container h1, /* If you add an H1 for the page title */
.fbl-section-title {
    color: var(--text) !important;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.fbl-section-desc {
    color: var(--text-muted) !important;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* ----------------------------------------------------
   VALUE PROPOSITIONS (TOP SECTION)
---------------------------------------------------- */
.fbl-value-props {
    margin: 40px 0 60px 0;
}

.fbl-value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.fbl-value-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 35px 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.fbl-value-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.fbl-value-item h3 {
    color: var(--text);
    font-size: 1.25rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.fbl-value-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ----------------------------------------------------
   WHY THESE TOOLS MATTER (CALLOUT BOX)
---------------------------------------------------- */
.fbl-why {
    background: var(--input-bg);
    border-left: 5px solid var(--accent);
    padding: 40px;
    margin: 60px auto;
    border-radius: 0 12px 12px 0;
    max-width: 900px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.fbl-why .fbl-section-title {
    margin-top: 0;
    text-align: left;
    font-size: 1.8rem;
}

.fbl-why .fbl-section-desc {
    text-align: left;
    margin: 0;
    max-width: 100%;
}

/* ----------------------------------------------------
   FAQ SECTION
---------------------------------------------------- */
.fbl-faq {
    max-width: 800px;
    margin: 0 auto 60px auto;
}

.fbl-faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 25px 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.fbl-faq-item:hover {
    border-color: var(--input-border);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.fbl-faq-item h3 {
    color: var(--accent); /* Makes the question pop in the cyan/blue */
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.fbl-faq-item p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
}

/* Mobile Adjustments for the new sections */
@media (max-width: 768px) {
    .fbl-value-grid {
        grid-template-columns: 1fr;
    }
    .fbl-why {
        padding: 25px;
    }
    .fbl-faq-item {
        padding: 20px;
    }
}

/* ----------------------------------------------------
   PILLAR GUIDE LAYOUT
---------------------------------------------------- */
.fbl-pillar-wrapper {
    display: flex;
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    gap: 50px;
    align-items: flex-start; /* Crucial for sticky sidebar */
}

/* ----------------------------------------------------
   STICKY TABLE OF CONTENTS (SIDEBAR)
---------------------------------------------------- */
.fbl-sticky-toc {
    position: sticky;
    top: 40px; /* How far from the top of the screen it sticks */
    width: 280px;
    flex-shrink: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-top: 4px solid var(--accent);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.fbl-sticky-toc h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text);
    font-weight: 700;
}

.fbl-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fbl-toc-list li {
    margin-bottom: 12px;
}

.fbl-toc-list a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    display: block;
}

.fbl-toc-list a:hover {
    color: var(--accent);
    font-weight: 600;
}

/* ----------------------------------------------------
   MAIN ARTICLE CONTENT
---------------------------------------------------- */
.fbl-pillar-content {
    flex-grow: 1;
    min-width: 0; /* Prevents flexbox blowouts */
    background: var(--card-bg);
    padding: 50px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.fbl-pillar-content h1 {
    font-size: 2.5rem;
    color: var(--text);
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.2;
}

.fbl-pillar-content h2 {
    font-size: 1.8rem;
    color: var(--text);
    margin-top: 50px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.fbl-pillar-content h3 {
    font-size: 1.4rem;
    color: var(--text);
    margin-top: 35px;
    margin-bottom: 15px;
}

.fbl-pillar-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* Mid-Article Call To Action Box */
.fbl-article-cta {
    background: var(--input-bg);
    border-left: 4px solid var(--accent);
    padding: 30px;
    margin: 40px 0;
    border-radius: 0 8px 8px 0;
}

.fbl-article-cta h3 {
    margin-top: 0;
    color: var(--accent);
}

.fbl-article-cta p {
    margin-bottom: 15px;
}

.fbl-btn-inline {
    display: inline-block;
    background: var(--accent);
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.fbl-btn-inline:hover {
    background: var(--accent-hover);
}

/* Responsive collapse */
@media (max-width: 992px) {
    .fbl-pillar-wrapper {
        flex-direction: column-reverse; /* Puts TOC at the bottom on mobile, or you can hide it */
    }
    .fbl-sticky-toc {
        position: static;
        width: 100%;
    }
    .fbl-pillar-content {
        padding: 30px 20px;
    }
    .fbl-pillar-content h1 {
        font-size: 2rem;
    }
}