/* ==========================================================================
   CENTRALIZED GLOBAL DESIGN SCHEME FOR ZERO-LOAD PDF SUITE
   Version: 5.0 (Ultimate SaaS Glassmorphism + Right-Aligned Icons)
   ========================================================================== */

/* =========================================================
   1. 🚀 V3: ULTIMATE 3D GLASSMORPHISM SAAS NAVIGATION
   ========================================================= */

/* The Frosted Glass Header */
.site-header {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 999;
}

/* Force Single-Row Layout (Fixes the ugly wrapping on Desktop) */
@media (min-width: 1050px) {
    .inside-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        max-width: 1350px;
        padding: 10px 20px;
    }
    .site-branding {
        margin: 0;
        flex-shrink: 0;
    }
    .main-navigation {
        flex-grow: 1;
        display: flex;
        justify-content: flex-end;
    }
}

/* The Tech Logo Typography Upgrade */
.main-title a {
    font-weight: 900;
    font-size: 26px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #0f172a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: opacity 0.3s ease;
}
.main-title a:hover {
    opacity: 0.8;
}

/* The Vibrant "App Button" Hover Pills (TOP LEVEL ONLY) */
.main-navigation .main-nav > ul > li > a {
    color: #64748b;
    font-weight: 600;
    padding: 10px 22px;
    margin: 0 5px;
    border-radius: 30px; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Vibrant Blue Gradient on Hover/Active (TOP LEVEL ONLY) */
.main-navigation .main-nav > ul > li:hover > a,
.main-navigation .main-nav > ul > li.current-menu-item > a {
    color: #ffffff !important;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    box-shadow: 0 8px 15px -3px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

/* The Floating Dropdown Panels */
.main-navigation ul ul {
    background-color: #ffffff;
    border-radius: 14px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0 !important;
    padding: 12px 0;
    top: 100%;
    margin-top: 20px; 
}

/* The Invisible Hover Bridge (Stops menu from closing accidentally) */
.main-navigation ul ul::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 0;
    width: 100%;
    height: 25px;
    background: transparent;
}

/* Remove default GeneratePress top border */
.main-navigation ul ul.toggled-on, 
.main-navigation ul ul {
    border-top: none !important; 
}

/* Dropdown Sub-Menu Sleek Slide (PROTECTED SPECIFICITY) */
.main-navigation .main-nav ul ul li > a {
    padding: 12px 24px;
    font-size: 14px;
    color: #475569 !important; /* Forces the text to stay slate gray */
    font-weight: 600;
    transition: all 0.2s ease;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    border-radius: 0;
}

.main-navigation .main-nav ul ul li:hover > a {
    background-color: #f8fafc !important;
    color: #2563eb !important; /* Forces the text to turn blue on hover */
    transform: translateX(8px) !important;
    padding-left: 24px;
    border-left: 3px solid #2563eb !important;
}

/* Dropdown Arrow Icon Adjustments */
.menu-item-has-children .dropdown-menu-toggle {
    padding-left: 5px;
    opacity: 0.8;
}

/* =========================================================
   2. GENERATEPRESS THEME OVERPOWER RULES
   ========================================================= */

/* Target the generated pages to give them a modern background */
body[class*="page-pdf-"],
body[class*="page-highlight-"] {
    background-color: #f8fafc;
}

/* Force the main content area to center and cap at a readable width */
body[class*="page-pdf-"] .site-content,
body[class*="page-highlight-"] .site-content {
    max-width: 900px !important;
    margin: 0 auto;
    padding-top: 40px;
}

/* Hard-override fallback to kill ANY theme sidebars just in case */
body[class*="page-pdf-"] #secondary,
body[class*="page-highlight-"] #secondary {
    display: none !important;
}

body[class*="page-pdf-"] #primary,
body[class*="page-highlight-"] #primary {
    width: 100% !important;
}

/* =========================================================
   3. HOMEPAGE SAAS DASHBOARD STYLES (RIGHT-ALIGNED ICONS)
   ========================================================= */

.pdf-home-hero {
    text-align: center;
    padding: 60px 20px 40px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border-radius: 12px;
    margin-bottom: 40px;
    border: 1px solid #e2e8f0;
}

.pdf-hero-h1 {
    font-size: 42px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.pdf-hero-sub {
    font-size: 18px;
    color: #475569;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.pdf-dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.pdf-tools-grid {
    display: grid;
    /* Compact 3-column layout */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
    gap: 20px;
    margin-bottom: 40px;
}

/* ⚡ CSS Grid Reordering: Icon on the right! */
.pdf-tool-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 18px;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    display: grid;
    grid-template-columns: 1fr auto; 
    grid-template-areas:
        "title icon"
        "desc desc"; 
    align-items: center;
    row-gap: 12px;
}

.pdf-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px -5px rgba(37, 99, 235, 0.15);
    border-color: #93c5fd;
}

.pdf-tc-title {
    grid-area: title;
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 !important; 
}

.pdf-tc-icon {
    grid-area: icon;
    font-size: 22px; 
    margin: 0 !important; 
    background: #eff6ff;
    width: 44px; 
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.pdf-tc-desc {
    grid-area: desc;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin: 0 !important;
}

/* Featured Tool Anchor Fix (Bottom Card) */
@media (min-width: 900px) {
    .pdf-tool-card:last-child:nth-child(3n + 1) {
        grid-column: 1 / -1;
        grid-template-columns: 1fr auto;
        grid-template-areas: 
            "title icon"
            "desc icon"; 
        background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
        border: 2px solid #bfdbfe;
        padding: 35px 40px;
        column-gap: 30px;
        row-gap: 8px;
        box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.1);
    }
    
    .pdf-tool-card:last-child:nth-child(3n + 1):hover {
        transform: translateY(-5px);
        border-color: #3b82f6;
        box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.15);
    }

    .pdf-tool-card:last-child:nth-child(3n + 1) .pdf-tc-title {
        font-size: 22px;
        color: #1e40af;
        align-self: end;
    }

    .pdf-tool-card:last-child:nth-child(3n + 1) .pdf-tc-desc {
        max-width: 900px;
        font-size: 15px;
        line-height: 1.6;
        align-self: start;
    }

    .pdf-tool-card:last-child:nth-child(3n + 1) .pdf-tc-icon {
        width: 75px;
        height: 75px;
        font-size: 35px;
        background: #dbeafe; 
    }
}

/* =========================================================
   4. 📄 DYNAMIC INNER PAGE & TYPOGRAPHY MASTER RULES
   ========================================================= */

/* Global Reading Container */
.site-main .entry-content {
    max-width: 850px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #475569;
}

/* Article Headings */
.site-main .entry-content h2,
body[class*="page-pdf-"] .site-content h2,
body[class*="page-highlight-"] .site-content h2 {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin: 50px 0 20px 0;
    letter-spacing: -0.5px;
    line-height: 1.3;
    border: none; 
}

.site-main .entry-content h3,
body[class*="page-pdf-"] .site-content h3,
body[class*="page-highlight-"] .site-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 40px 0 15px 0;
}

/* Paragraphs & Text Elements */
.site-main .entry-content p,
body[class*="page-pdf-"] .site-content p,
body[class*="page-highlight-"] .site-content p {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 24px;
}

.site-main .entry-content strong,
body[class*="page-pdf-"] .site-content strong,
body[class*="page-highlight-"] .site-content strong {
    color: #0f172a;
    font-weight: 700;
}

/* Beautiful Feature Cards (Bullet Points) */
.site-main .entry-content ul,
body[class*="page-pdf-"] .site-content ul,
body[class*="page-highlight-"] .site-content ul {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px 30px 30px 50px;
    box-shadow: 0 4px 15px -5px rgba(0,0,0,0.05);
    margin: 35px 0;
}

.site-main .entry-content ul li,
body[class*="page-pdf-"] .site-content ul li,
body[class*="page-highlight-"] .site-content ul li {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.site-main .entry-content ul li:last-child {
    margin-bottom: 0;
}

/* =========================================================
   5. INTERACTIVE TOOL UI (CANVAS, BUTTONS, DRAG & DROP)
   ========================================================= */

/* The Tool UI Box (Drag & Drop Area Wrapper) */
.pdf-ui-wrapper {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    padding: 50px 30px;
    border-radius: 24px;
    margin: 20px auto 60px auto;
    max-width: 680px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
}

.pdf-ui-wrapper:hover {
    border-color: #3b82f6;
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.15);
    background: #f8fafc;
}

.pdf-ui-wrapper h3 {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.pdf-ui-wrapper p {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 25px;
    line-height: 1.5;
}

.file-drop-zone {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    padding: 45px 20px;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.file-drop-zone:hover {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.file-drop-zone span {
    color: #3b82f6;
    font-weight: 700;
}

/* Formatted Display Layout Panels for Queue Streams */
#jl-file-list-preview, #jl-hl-preview-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-top: 25px;
    box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.02);
}

#jl-file-list-preview h4, #jl-hl-preview-box h4 {
    margin: 0 0 12px 0;
    color: #334155;
    font-size: 15px;
    font-weight: 600;
}

#jl-preview-queue {
    padding-left: 20px;
    margin: 0;
    color: #475569;
    line-height: 1.7;
    font-size: 14px;
}

.pdf-main-action-btn {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    margin-top: 20px;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.pdf-main-action-btn:hover:not(:disabled) {
    background: #2563eb;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

.pdf-main-action-btn:active:not(:disabled) {
    transform: translateY(0);
}

.pdf-main-action-btn:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

/* Advanced Canvas Engine Rules (Layer Stacking) */
#jl-canvas-container {
    background: #f8fafc;
    position: relative;
}

#jl-canvas-container canvas {
    display: block;
    margin: 0;
    padding: 0;
}

#jl-canvas-container .canvas-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 3 !important;
}

#jl-text-layer {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    opacity: 0; 
    pointer-events: none; 
    overflow: hidden;
}

#jl-text-layer span {
    position: absolute;
    color: transparent;
    cursor: text;
    transform-origin: 0% 0%;
    white-space: pre;
    line-height: 1; 
}

/* =========================================================
   6. ADSENSE & SYSTEM ALERTS
   ========================================================= */

.adsense-placeholder,
.adsense-success-placeholder {
    width: 100%;
    max-width: 728px;
    margin: 20px auto;
    text-align: center;
    display: block;
    background: transparent;
    border: none;
    min-height: 0;
    box-shadow: none;
}

#jl-status-message, 
#jl-hl-status-message, 
#jl-edit-status-message, 
#jl-split-status-message, 
#jl-rotator-status-message {
    margin: 20px 0 0 0;
    font-size: 14px;
    font-weight: 600;
    min-height: 24px;
    color: #0f172a;
}

/* =========================================================
   7. ENTERPRISE SAAS FOOTER STYLES
   ========================================================= */

/* Hide the ugly default GeneratePress footer completely */
.site-info, .site-footer {
    display: none !important;
}

.pdf-saas-footer {
    background-color: #0f172a;
    color: #e2e8f0;
    padding: 60px 20px 20px 20px;
    margin-top: 80px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.pdf-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
    padding-bottom: 30px;
    margin-bottom: 20px;
}

.pdf-footer-brand h3 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 10px 0;
}

.pdf-footer-brand p {
    color: #94a3b8;
    font-size: 14px;
    max-width: 400px;
    margin: 0;
    line-height: 1.5;
}

.pdf-footer-links {
    display: flex;
    gap: 25px;
}

.pdf-footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.pdf-footer-links a:hover {
    color: #3b82f6;
}

.pdf-footer-copyright {
    text-align: center;
    color: #64748b;
    font-size: 13px;
}


/* =========================================================
   9. HOMEPAGE SEO MATRIX & FAQ ACCORDION
   ========================================================= */
.pdf-seo-matrix {
    max-width: 900px;
    margin: 60px auto 20px auto;
    padding: 0 20px;
    text-align: left;
}

.seo-eeat-block {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 15px -5px rgba(0,0,0,0.05);
    margin-bottom: 50px;
}

.seo-eeat-block h2, .seo-faq-block h2 {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.seo-eeat-block p {
    font-size: 16px;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 15px;
}

/* The Native HTML5 Accordion */
.seo-faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.seo-faq-item:hover {
    border-color: #cbd5e1;
}

.seo-faq-item summary {
    font-size: 17px;
    font-weight: 600;
    color: #1e293b;
    padding: 20px 25px;
    cursor: pointer;
    list-style: none; /* Hides default triangle in Firefox/Chrome */
    position: relative;
    outline: none;
}

/* Custom Accordion Plus/Minus Icon */
.seo-faq-item summary::-webkit-details-marker {
    display: none; /* Hides default triangle in Safari */
}

.seo-faq-item summary::after {
    content: '+';
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #3b82f6;
    font-weight: 300;
    transition: transform 0.2s ease;
}

.seo-faq-item[open] summary::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
}

.seo-faq-item .faq-content {
    padding: 0 25px 25px 25px;
    border-top: 1px solid transparent;
}

.seo-faq-item .faq-content p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
}

/* =========================================================
   8. ⚡ STRICT MOBILE VISIBILITY PROTOCOL
   ========================================================= */
@media (max-width: 768px) {
    /* Compress the Tool UI Dropzone */
    .pdf-ui-wrapper {
        padding: 30px 20px;
        border-radius: 16px;
        margin: 10px auto 40px auto;
    }
    
    .pdf-ui-wrapper h3 {
        font-size: 22px; 
    }

    /* Shrink all article typography */
    .site-main .entry-content h2,
    body[class*="page-pdf-"] .site-content h2,
    body[class*="page-highlight-"] .site-content h2 {
        font-size: 24px; 
        margin: 30px 0 15px 0;
    }
    
    .site-main .entry-content h3,
    body[class*="page-pdf-"] .site-content h3,
    body[class*="page-highlight-"] .site-content h3 {
        font-size: 20px;
        margin: 25px 0 12px 0;
    }
    
    .site-main .entry-content p,
    .site-main .entry-content ul li,
    body[class*="page-pdf-"] .site-content p,
    body[class*="page-pdf-"] .site-content ul li,
    body[class*="page-highlight-"] .site-content p,
    body[class*="page-highlight-"] .site-content ul li {
        font-size: 15px; 
        line-height: 1.6;
    }

    /* Tighter padding for mobile feature cards */
    .site-main .entry-content ul,
    body[class*="page-pdf-"] .site-content ul,
    body[class*="page-highlight-"] .site-content ul {
        padding: 25px 25px 25px 40px;
        border-radius: 12px;
        margin: 25px 0;
    }

    /* Homepage Grid Adjustments (Right-Aligned Mobile Icons) */
    .pdf-hero-h1 { font-size: 32px; }
    .pdf-tools-grid { grid-template-columns: 1fr; gap: 15px; }
    
    .pdf-tool-card { 
        padding: 15px 20px; 
        row-gap: 0; 
    }
    .pdf-tc-icon { 
        width: 40px !important; 
        height: 40px !important; 
        font-size: 20px !important; 
    }
    .pdf-tc-desc { display: none; }

    /* Footer Tap Target Fixes */
    .pdf-footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    .pdf-footer-links {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    .pdf-footer-links a {
        display: block;
        padding: 10px 0; 
        border-bottom: 1px solid #1e293b;
    }
    
    /* ⚡ MOBILE FIX: Reclaim horizontal space for the Homepage SEO block */
    .pdf-dashboard-container + div {
        padding: 25px 15px !important; 
        margin-top: 30px !important;
    }
    
    .pdf-dashboard-container + div h2 {
        font-size: 22px !important;
        line-height: 1.4 !important;
    }
    
    .pdf-dashboard-container + div ul {
        padding: 15px 15px 15px 25px !important; 
        margin-left: 0 !important; 
    }

    /* ⚡ MOBILE FIX: Tighter padding for inner-page feature cards */
    .site-main .entry-content ul,
    body[class*="page-pdf-"] .site-content ul,
    body[class*="page-highlight-"] .site-content ul {
        padding: 20px 15px 20px 30px !important; 
    }
}