/* ==========================================
   1. HOMEPAGE GRID INDEX STYLES
   ========================================== */
.home.page-template-full-width .content.wrapper,
.home.page .site-content .entry-content {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 5% !important;
    padding-right: 5% !important;
    margin: 0 auto !important;
}

.home.page .post-navigation,
.home.page .nav-links,
.home #nav-below,
.home .entry-footer {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.home.page .wp-block-search {
    margin-top: 20px !important;
    margin-bottom: 40px !important;
    max-width: 600px;
}

/* ==========================================
   2. SURAH READING PAGES STYLES (FOOTER NAV ROUTE)
   ========================================== */
body.category .header-image,
body.category .logo-wrapper,
body.category .site-title,
body.category .site-description,
body.category header.post-header,
body.category .post-meta,
body.category footer.post-meta,
body.category .post-meta-container,
body.category .widget-area {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

body.category .archive-header,
body.category .page-header {
    display: block !important;
    visibility: visible !important;
    text-align: center !important;
    padding: 25px 20px !important; 
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important; 
    box-sizing: border-box !important;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;          
    z-index: 9999 !important;     
    background: #1a1a1a !important; 
    border-bottom: 1px solid #333333 !important; 
}

body.category .archive-title,
body.category .page-title {
    display: block !important;
    visibility: visible !important;
    font-family: "Georgia", serif !important;
    font-size: 26px !important; 
    font-weight: bold !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    max-width: 800px;
    margin: 0 auto !important;
}

body.category .content.wrapper {
    display: block !important;
    background: transparent !important;
    padding: 0px 45px !important; 
    max-width: 800px !important;
    margin: 0px auto !important; 
    float: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

body.category main.site-main,
body.category .posts {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    box-sizing: border-box !important;
    text-align: justify !important;
}

body.category article, 
body.category article.post, 
body.category .post-container, 
body.category .entry-content, 
body.category .post-content,
body.category p {
    display: inline !important;
    float: none !important;
    width: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.category .ayah-item {
    display: inline !important;
    font-family: "Georgia", serif !important;
    font-size: 19px !important;
    line-height: 2 !important;
    color: #ffffff !important;
    white-space: normal !important;
}

/* NEW FEATURE: Elegant Ritual Formatting for the Bismillah text */
body.category .quran-bismillah {
    display: block !important; /* Breaks out of inline to form its own distinct bar line */
    font-family: "Georgia", serif !important;
    font-size: 15px !important; /* Smaller text style to signify the ritual context */
    font-style: italic !important;
    color: #aaaaaa !important; /* Lighter soft gray text color */
    text-align: center !important;
    width: 100% !important;
    padding: 30px 10px 25px 10px !important; /* Generous top/bottom separation gap */
    line-height: 1.6 !important;
    letter-spacing: 0.3px;
    box-sizing: border-box !important;
}

/* ==========================================
   3. MOBILE RESPONSIVE OPTIMIZATIONS
   ========================================== */
@media screen and (max-width: 768px) {
    body.category .archive-title,
    body.category .page-title {
        font-size: 16px !important; 
        letter-spacing: 0.5px !important;
    }
    
    body.category .archive-header,
    body.category .page-header {
        padding: 12px 10px !important; 
    }
    
    /* Slightly compact bismillah layout spacing for smaller smartphone glass viewports */
    body.category .quran-bismillah {
        font-size: 13px !important;
        padding: 20px 5px 15px 5px !important;
    }
    
    body.category .quran-bottom-navigation-row {
        display: flex !important;
        flex-direction: row !important; 
        justify-content: space-between !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 15px 10px !important;
        width: 100% !important;
        margin: 40px auto 0px auto !important; 
        float: none !important;
    }
    
    body.category .quran-bottom-nav-box {
        width: 33.33% !important;
        display: block !important;
    }
    body.category .nav-box-left { text-align: left !important; }
    body.category .nav-box-center { text-align: center !important; }
    body.category .nav-box-right { text-align: right !important; }
    
    body.category .quran-nav-link-btn {
        display: inline-block !important;
        font-size: 11px !important; 
        line-height: 1.3 !important;
        text-align: center !important;
    }
    
    body.category .middle-index-btn {
        padding: 6px 8px !important;
        font-size: 10px !important;
    }
}

/* ==========================================
   4. BIBLE GATEWAY STYLED BOTTOM NAV ROW LAYOUT
   ========================================== */
body.category .quran-bottom-navigation-row {
    display: flex !important;
    position: relative !important;
    clear: both !important;
    float: left !important; 
    justify-content: space-between !important;
    align-items: center !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 60px calc(-50vw + 50%) 0px calc(-50vw + 50%) !important; 
    padding: 25px 40px !important;
    background: #1a1a1a !important; 
    border-top: 1px solid #333333 !important; 
    box-sizing: border-box !important;
}

body.category .quran-bottom-nav-box {
    display: block !important;
    width: 33.33% !important;
}
body.category .nav-box-left { text-align: left !important; }
body.category .nav-box-center { text-align: center !important; }
body.category .nav-box-right { text-align: right !important; }

body.category .quran-nav-link-btn {
    display: inline-block !important;
    color: #3399ff !important;
    text-decoration: none !important;
    font-family: "Georgia", serif !important;
    font-size: 14px !important;
    font-weight: bold !important;
    line-height: 1.4 !important;
    transition: all 0.2s ease !important;
}
body.category .quran-nav-link-btn:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

body.category .middle-index-btn {
    background: #222222 !important;
    border: 1px solid #555555 !important;
    padding: 8px 14px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
}
body.category .middle-index-btn:hover {
    background: #333333 !important;
    border-color: #3399ff !important;
    text-decoration: none !important;
}
/* ==========================================
   5. JAVASCRIPT INJECTED BISMILLAH STYLES
   ========================================== */
/* RESTORE: Fix the vertical single-word column compression layout bug entirely */
body.category .site-main,
body.category .posts,
body.category .entry-content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: justify !important;
    clear: both !important;
}

/* Style the clean JavaScript-injected Bismillah header row */
body.category .quran-js-bismillah-block {
    display: table !important;       /* CRITICAL: Creates an unbreakable structural boundary wall */
    width: 100% !important;
    max-width: 800px !important;
    margin: 25px auto 35px auto !important; /* Elegant breathing gaps above and below */
    text-align: center !important;
    clear: both !important;          /* Forcefully cuts off any floating text elements */
    position: relative !important;
    
    /* Typography style presentation settings */
    font-family: "Georgia", serif !important;
    font-style: italic !important;           /* Forces deep italic presentation */
    font-weight: normal !important;
    font-size: 16px !important;              /* Sized smaller than your 19px verses */
    line-height: 1.7 !important;
    color: #ffffff !important;               /* Pure bright white for ultimate readability */
    text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important; /* Sharp drop shadow to make white text pop */
}

/* Responsive adjustment settings for phone displays */
@media screen and (max-width: 768px) {
    body.category .quran-js-bismillah-block {
        font-size: 14px !important;
        margin: 15px auto 25px auto !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
}
/* ==========================================
   6. HOMEPAGE CONTINUAR LENDO BOOKMARK BAR
   ========================================== */
.quran-last-read-container {
    display: block !important;
    width: 100% !important;
    max-width: 600px !important; /* Locks it to the exact same width as your search panel layout */
    margin: 20px 0 30px 0 !important; /* FIX: Changed 'auto' to '0' to push the element back to the left wall */
    text-align: left !important;
}

.quran-last-read-link {
    display: inline-block !important;
    width: 100% !important; /* Forces the bar element to expand out across the full 600px width */
    background: #1e1e1e !important;
    border: 1px solid #333333 !important;
    border-left: 4px solid #3399ff !important;
    padding: 14px 20px !important;
    border-radius: 4px !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-family: "Georgia", serif !important;
    font-size: 15px !important;
    transition: all 0.2s ease-in-out !important;
    box-sizing: border-box !important;
}

.quran-last-read-link:hover {
    background: #262626 !important;
    border-color: #555555 !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

.quran-last-read-link .bookmark-icon {
    margin-right: 6px !important;
}

.quran-last-read-link strong {
    color: #3399ff !important;
    font-weight: bold !important;
}

/* NEW: Mutes the verse tracking extension elegantly so it matches your site layout balance */
.quran-last-read-link .quran-bookmark-verse {
    color: #aaaaaa !important;
    font-style: italic !important;
    margin-left: 4px !important;
}

@media screen and (max-width: 768px) {
    .quran-last-read-container {
        padding: 0 15px !important;
        margin: 15px 0 20px 0 !important;
    }
    .quran-last-read-link {
        font-size: 13px !important;
        padding: 12px 15px !important;
    }
}

/* ==========================================================
   9. WIREFRAME POPUP TOOLBAR DESIGN SYSTEM
   ========================================================== */
body.category .ayah-item.selected-highlight,
body.single .ayah-item.selected-highlight {
    background-color: rgba(51, 153, 255, 0.25) !important;
    border-radius: 3px !important;
    transition: background-color 0.2s ease-in-out !important;
}

.quran-popup-toolbar {
    position: absolute;
    display: flex;
    align-items: center;
    background: #1c1c1c !important;
    border: 1px solid #3a3a3a !important;
    border-radius: 30px !important;
    padding: 8px 16px !important; 
    box-shadow: 0 8px 30px rgba(0,0,0,0.7) !important;
    z-index: 99999 !important;
    visibility: hidden;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.quran-popup-toolbar.visible-panel { 
    visibility: visible !important; 
    opacity: 1 !important; 
    transform: translateY(0px) !important; 
}

.quran-popup-toolbar .toolbar-action-btn {
    background: transparent !important;
    border: none !important;
    color: #a0a0a0 !important; 
    padding: 6px 8px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important; /* Spacing layout buffer between SVGs and textual counters */
    transition: color 0.15s ease, transform 0.15s ease !important;
}

.quran-popup-toolbar .toolbar-svg-icon { 
    width: 18px !important; 
    height: 18px !important; 
    stroke: #ffffff !important; 
    transition: stroke 0.15s ease, fill 0.15s ease !important; 
}

/* Dynamic premium color mappings on mouse hover loops */
.quran-popup-toolbar #quran-toolbar-like-btn:hover .toolbar-svg-icon { stroke: #22c55e !important; }   /* Green Like Accent */
.quran-popup-toolbar #quran-toolbar-heart-btn:hover .toolbar-svg-icon { stroke: #ef4444 !important; }  /* Red Heart Accent */
.quran-popup-toolbar #quran-toolbar-star-btn:hover .toolbar-svg-icon { stroke: #ffcc00 !important; }   /* Yellow Star Accent */
.quran-popup-toolbar #quran-toolbar-share-btn:hover .toolbar-svg-icon { stroke: #3399ff !important; }  /* Blue Share Accent */

.quran-popup-toolbar .toolbar-divider { 
    width: 1px !important; 
    height: 16px !important; 
    background: #3a3a3a !important; 
    margin: 0 6px !important; 
}

/* Typography styles for your dynamic numeric vote tags */
.quran-popup-toolbar .toolbar-count-label {
    font-size: 11px !important;
    font-weight: bold !important;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
    display: inline-block !important;
}
.quran-popup-toolbar #quran-like-count-label { color: #22c55e !important; }   /* Green counter text */
.quran-popup-toolbar #quran-heart-count-label { color: #ef4444 !important; }  /* Red counter text */
.quran-popup-toolbar #quran-star-count-label { color: #ffcc00 !important; }   /* Yellow counter text */

/* High-fidelity fluid spring click animation */
@keyframes pulseEffect {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.animating-action .toolbar-svg-icon { 
    display: inline-block; 
    animation: pulseEffect 0.3s ease-in-out; 
}
/* ==========================================================
   10. ERASE JETPACK PLUGINS DISTRACTIONS
   ========================================================== */
.sharedaddy, #jp-relatedposts, .jetpack-likes-widget-wrapper, #jp-post-flair, body.single .entry-footer, body.single .post-navigation {
    display: none !important; visibility: hidden !important; height: 0 !important; margin: 0 !important; padding: 0 !important; border: none !important;
}
body.single .entry-content { text-align: center !important; padding-top: 40px !important; }

/* ==========================================================
   11. PREMIUM FULL-SCREEN ARTISTIC SHARING PRESENTATION OVERLAY
   ========================================================== */
.quran-art-overlay-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.quran-art-overlay-modal.active-modal { visibility: visible !important; opacity: 1 !important; }

/* Solid, clean presentation background color matching your theme background layout tones */
.quran-art-modal-backdrop {
    position: absolute;
    width: 100%; height: 100%;
    background: #111111 !important; 
}
body.modal-open-freeze { overflow: hidden !important; }

/* Minimal text button positioned out of the image field profile bounds */
.quran-art-modal-close-btn {
    position: absolute;
    top: 25px;
    background: #222222 !important;
    border: 1px solid #444444 !important;
    color: #aaaaaa !important;
    font-family: sans-serif !important;
    font-size: 12px !important;
    font-weight: bold !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    z-index: 30;
    transition: all 0.2s ease !important;
}
.quran-art-modal-close-btn:hover { color: #ffffff !important; border-color: #ffffff !important; }

/* Pristine Presentation Screenshot Card */
.quran-art-modal-content-card {
    position: relative;
    width: 90%;
    max-width: 550px;
    background: #161616 !important;
    border: 1px solid #2d2d2d !important;
    border-radius: 6px !important;
    padding: 40px 30px !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9) !important;
    transform: scale(0.95);
    transition: transform 0.25s ease;
    z-index: 20;
}
.quran-art-overlay-modal.active-modal .quran-art-modal-content-card { transform: scale(1) !important; }
.quran-art-card-inner-frame { border: 1px solid rgba(255,255,255,0.05) !important; padding: 35px 25px !important; text-align: center; }

/* Gorgeous Typography styling layout */
.quran-artistic-typography-prose {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-style: italic !important;
    font-size: 24px !important;
    line-height: 1.6 !important;
    color: #ffffff !important;
    margin-bottom: 25px !important;
}
.quran-artistic-meta-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 13px !important;
    font-weight: bold !important;
    letter-spacing: 1.5px !important;
    color: #3399ff !important; 
    text-transform: uppercase;
    margin-bottom: 30px !important;
}
.quran-art-watermark { font-family: sans-serif !important; font-size: 10px !important; letter-spacing: 2px !important; color: #444444 !important; }

/* Media query definitions for tight layouts */
@media screen and (max-width: 768px) {
    .quran-art-modal-content-card { padding: 30px 15px !important; }
    .quran-artistic-typography-prose { font-size: 19px !important; }
    .quran-art-modal-close-btn { top: 15px; padding: 6px 12px !important; }
}
/* ==========================================================
   13. TOTAL DARK MODE OVERRIDE FOR HOMEPAGE
   ========================================================== */
/* Force the body background, main sections, and entry headers to pure black */
body.home,
.home .site,
.home .site-content,
.home main.site-main,
.home .content.wrapper,
.home article,
.home header.page-header,
.home .entry-header,
.home .entry-content-wrapper {
    background-color: #111111 !important; /* Pristine core black background tone */
    background: #111111 !important;
    border: none !important;
    box-shadow: none !important;
}

/* Force all general text elements on the homepage to bright white for readability */
.home h1, 
.home h2, 
.home h3, 
.home p,
.home .page-title,
.home .entry-content {
    color: #ffffff !important;
}

/* Keep your custom download sub-label link text clean and legible against the new black background */
.home .entry-content p a {
    color: #3399ff !important; /* Matching your signature blue accent links */
    text-decoration: underline !important;
}
.home .entry-content p a:hover {
    color: #ffffff !important;
}

/* Eliminate the bright layout container line dividers built into Baskerville 2 */
.home .site-header,
.home .footer-nav-container,
.home .site-footer {
    border-color: #222222 !important;
    background-color: #111111 !important;
}
/* ==========================================================
   14. HOMEPAGE LINK CONTRAST & VERTICAL SPACING TIGHTENING
   ========================================================== */
/* FIX 1: Brighten the link text inside your columns so it stands out clearly */
.home.page .site-main a {
    color: #e0e0e0 !important; /* Premium off-white tone for high-contrast reading */
    font-size: 15px !important;
    font-weight: 500 !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.8) !important;
    transition: color 0.15s ease-in-out !important;
}

/* Brighten to your custom brand accent colors on hover */
.home.page .site-main a:hover {
    color: #3399ff !important; /* Turns your signature blue when hovered */
}

/* FIX 2: Aggressively collapse the thick vertical gaps between your layout blocks */
.home.page .site-main,
.home.page .entry-content,
.home.page .quran-last-read-container,
.home.page .wp-block-search,
.home.page .wp-block-columns,
.home.page p {
    margin-top: 5px !important;    /* Tightens the top gap margins */
    margin-bottom: 5px !important; /* Tightens the bottom gap margins */
}

/* Fine-tune specific spaces for structural balance */
.home.page .quran-last-read-container {
    margin-top: 15px !important;
    margin-bottom: 15px !important;
}
.home.page .wp-block-search {
    margin-bottom: 25px !important; /* Leaves an intentional breathing gap right above the columns */
}
/* ==========================================================
   15. AGGRESSIVE DESKTOP SPACE COLLAPSE (FIXED RAPID OVERRIDE)
   ========================================================== */
@media screen and (min-width: 768px) {
    /* Target Baskerville 2's deep inner header padding wrappers ABOVE the line */
    .home .site-header,
    .home .header-inner,
    .home .header-wrapper,
    .home .logo-wrapper {
        padding-top: 10px !important;
        padding-bottom: 0px !important;
        margin-bottom: 0px !important;
        height: auto !important;
    }

    /* Target Baskerville 2's main canvas inner content container BELOW the line */
    .home .site-content,
    .home #content,
    .home .content.wrapper,
    .home main.site-main,
    .home article,
    .home .entry-content-wrapper {
        padding-top: 0px !important;
        margin-top: 0px !important;
    }

    /* Target the exact spacing properties of your title block element */
    .home .site-title,
    .home h1.site-title {
        margin-bottom: 5px !important;
        padding-bottom: 0px !important;
    }

    /* Force your translation subtitle block up close against the top boundary */
    .home .entry-content > p:first-of-type {
        margin-top: 5px !important;
        padding-top: 0px !important;
    }
}
/* ==========================================================
   16. MINIMALIST SCROLLING VERSE HUD INDICATOR (IMMEDIATE 1.5S FADE)
   ========================================================== */
#quran-scroll-hud {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important; /* Perfect screen centering coordinates */
    
    /* Typography Style Settings */
    font-family: "Georgia", serif !important;
    font-size: 56px !important; 
    font-weight: bold !important;
    color: rgba(255, 255, 255, 0.45) !important;
    
    /* Elegant Circular Layout Configuration */
    background-color: rgba(20, 20, 20, 0.85) !important; 
    border: 2px solid rgba(255, 255, 255, 0.20) !important;
    border-radius: 50% !important; /* Perfect circle shape geometry profile wrapper */
    
    /* Strict Centering Bounds & Baseline Fix */
    width: 130px !important;
    height: 130px !important;
    display: flex !important; /* Keeps structural flex alignment active continuously */
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important; 
    box-sizing: border-box !important;
    
    /* Fine-tuned bottom padding lifts the Georgia font text up slightly for perfect centering */
    padding-top: 0px !important;
    padding-bottom: 8px !important; 
    padding-left: 0px !important;
    padding-right: 0px !important;
    
    /* Functional Layer Presentation Shadows */
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.65) !important;
    z-index: 999999 !important;
    pointer-events: none !important; /* Essential: Clicks pass right through it safely */
    user-select: none !important;
    -webkit-user-select: none;

    /* FIXED TIMING ENGINE: Starts fading immediately and takes exactly 1.5s to disappear */
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 1.5s ease-out, visibility 1.5s ease-out !important; 
}

/* Visibility state toggle helper class controlled by your script tracker */
#quran-scroll-hud.hud-active-panel {
    opacity: 1 !important;
    visibility: visible !important;
    /* Pops into view instantly upon scroll before beginning the fade transition */
    transition: none !important;
}

/* Fluid responsive layout tracking for smaller smartphone screen views */
@media screen and (max-width: 768px) {
    #quran-scroll-hud {
        font-size: 42px !important;
        width: 100px !important;
        height: 100px !important;
        border-width: 1.5px !important;
        padding-bottom: 5px !important; /* Proportional lift offset for mobile screens */
    }
}
/* ==========================================================
   23. CORE GLOBAL OVERRIDE: TOP VERSOS INDEX STICKY DASHBOARD
   ========================================================== */
/* 1. Vaporize the entire massive white theme header section and page title string completely */
body[class*="top-versos"] header.entry-header,
body[class*="top-versos"] .entry-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 2. Strip theme white background containers and shadow styling boxes entirely */
body[class*="top-versos"] .content.wrapper,
body[class*="top-versos"] .site-content,
body[class*="top-versos"] #content,
body[class*="top-versos"] article {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding-top: 0px !important;
    margin-top: 0px !important;
    max-width: 800px !important; /* Locks width perfectly to match your card grids */
    width: 100% !important;
    float: none !important;
}

/* 3. Drop theme sidebar column columns completely */
body[class*="top-versos"] .widget-area,
body[class*="top-versos"] #sidebar {
    display: none !important;
}

/* 4. Smooth background correction beneath the navigation bar */
body[class*="top-versos"] .entry-content {
    margin-top: 0px !important;
    padding-top: 20px !important;
}

/* 🌟 5. STICKY INTERACTIVE BUTTON MENU TASK FORCE (Freezes your tabs to the top) */
body[class*="top-versos"] .ranked-view-selector-tabs {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;          /* Snaps the menu tight against the very top edge of the browser glass */
    z-index: 99999 !important;    /* Keeps buttons resting safely on top of scrolling verse cards */
    background: #111111 !important; /* Matches your dark tone so words scroll underneath unseen */
    padding: 20px 10px !important;
    margin-bottom: 25px !important;
    border-bottom: 1px solid #222222 !important;
}
/* ==========================================================
   24. ULTIMATE FIX: TOP VERSOS FULL-WIDTH STICKY OVERRIDES
   ========================================================== */
/* 1. Vaporize the theme's default white title card section and header completely */
.page-template-full-width-page header.entry-header,
.page-template-full-width-page .entry-header,
.page-template-full-width header.entry-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 2. Overwrite Baskerville's core white wrapper panels to dissolve the frame borders */
.page-template-full-width-page .content.wrapper,
.page-template-full-width-page #content,
.page-template-full-width-page .site-content,
.page-template-full-width-page article {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding-top: 0px !important;
    margin-top: 0px !important;
    max-width: 800px !important; /* Locks structural width perfectly to match your card grids */
    width: 100% !important;
    float: none !important;
    margin: 0 auto !important;
}

/* 3. Drop theme sidebar widget layout trays safely */
.page-template-full-width-page .widget-area,
.page-template-full-width-page #sidebar {
    display: none !important;
    width: 0 !important;
}

/* 4. Smooth out spacing offsets directly beneath your main navigation bar menu line */
.page-template-full-width-page .entry-content {
    margin-top: 0px !important;
    padding-top: 25px !important;
}
/* 🌟 5. STICKY DYNAMIC SELECTION MENU: STRETCH FULL-SCREEN & FREEZE ON SCROLL */
.ranked-view-selector-tabs,
div.ranked-view-selector-tabs {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;               /* Snaps the button strip flush beneath your top main navigation bar menu line */
    z-index: 99999 !important;         /* Forces the selector navigation bar to stay on top of scrolling verse cards */
    
    /* Full window breakout mechanics force the bar to span edge-to-edge across the monitor screen */
    display: flex !important;
    justify-content: center !important;
    width: 100vw !important;
    max-width: 100vw !important;
    
    /* Pulls the edges back out to the browser margins to cover the side background completely */
    margin: 0 calc(-50vw + 50%) 35px calc(-50vw + 50%) !important; 
    padding: 20px 40px !important;
    
    /* Matches your deep dark charcoal background tone so passing text loops slide underneath unseen */
    background: #111111 !important;    
    border-bottom: 1px solid #222222 !important;
    box-sizing: border-box !important;
}

/* Ensure mobile browser viewport scales retain exact proportional edge dimensions */
@media screen and (max-width: 768px) {
    .ranked-view-selector-tabs,
    div.ranked-view-selector-tabs {
        padding: 15px 15px !important;
        margin-bottom: 20px !important;
        gap: 6px !important;
    }
}
/* ==========================================================
   25. DYNAMIC PAGES: FULL-WIDTH FREEZE & HEADER VAPORIZATION
   ========================================================== */
/* 1. Vaporize the ghost white page heading wrapper and default title entirely */
body[class*="top-versos"] header.entry-header,
body[class*="top-versos"] .entry-header,
body[class*="top-versos"] h1.entry-title {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* 2. Break out of Baskerville's restrictive layout boxes to clear top spacing gaps */
body[class*="top-versos"] .site-content,
body[class*="top-versos"] #content,
body[class*="top-versos"] .content.wrapper,
body[class*="top-versos"] article {
    padding-top: 0px !important;
    margin-top: 0px !important;
}

/* 🌟 3. STICKY EXPANSION FORCE: Stretch the menu full-screen and freeze it in place */
body[class*="top-versos"] .ranked-view-selector-tabs {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;               /* Snaps flush beneath your main top header menu line */
    z-index: 99999 !important;         /* Forces selection bar to stay on top of passing verses */
    
    /* Full window width breakout engineering properties */
    display: flex !important;
    justify-content: center !important;
    width: 100vw !important;
    max-width: 100vw !important;
    
    /* Shifts the bar back to the screen margins to cover the empty background completely */
    margin: 0 calc(-50vw + 50%) 35px calc(-50vw + 50%) !important; 
    padding: 20px 40px !important;
    
    /* Matches your background layout tone so scrolling words slide underneath unseen */
    background: #111111 !important;    
    border-bottom: 1px solid #222222 !important;
    box-sizing: border-box !important;
}

/* Ensure mobile browser viewport scales retain exact proportional edge dimensions */
@media screen and (max-width: 768px) {
    body[class*="top-versos"] .ranked-view-selector-tabs {
        padding: 15px 15px !important;
        margin-bottom: 20px !important;
        gap: 6px !important;
    }
}

// ==========================================================
// 26. JAVASCRIPT ENGINE: STRETCH AND FREEZE TOP VERSOS TABS
// ==========================================================
add_action( 'wp_footer', 'quran_inject_top_versos_sticky_javascript_engine' );
function quran_inject_top_versos_sticky_javascript_engine() {
    // Only execute this execution routing sequence when viewing the Top Versos list view
    if ( is_page( 'top-versos' ) || is_page_template( 'page-templates/full-width.php' ) ) {
        ?>
        <script type="text/javascript">
        jQuery(document).ready(function($) {
            var $tabs = $('.ranked-view-selector-tabs');
            if (!$tabs.length) return;

            // 1. BREAKOUT FORCE: Move the button row outside the theme's restrictive layout boxes
            var $mainContent = $('#content, .site-content').first();
            if ($mainContent.length) {
                $tabs.insertBefore($mainContent);
            }

            // 2. STICKY CALCULATOR ENGINE: Monitor vertical screen scrolling coords in real-time
            var initialMenuTopOffset = $tabs.offset().top;

            $(window).on('scroll', function() {
                var currentScrollPosition = $(window).scrollTop();

                // If user scrolls past the threshold line, lock it edge-to-edge on the top glass viewport layer
                if (currentScrollPosition >= initialMenuTopOffset) {
                    $tabs.css({
                        'position': 'fixed',
                        'top': '0',
                        'left': '0',
                        'width': '100vw',
                        'max-width': '100vw',
                        'z-index': '99999',
                        'background': '#111111',
                        'padding': '20px 0',
                        'display': 'flex',
                        'justify-content': 'center',
                        'margin': '0',
                        'border-bottom': '1px solid #222222',
                        'box-sizing': 'border-box'
                    });
                    
                    // Inject a padding cushion spacing layer so the text cards don't glitch or jump
                    $('.quran-dynamic-ranked-hub').css('padding-top', $tabs.outerHeight() + 'px');
                } else {
                    // Restore original inline structural layout boundaries if scrolled back up to the absolute top
                    $tabs.css({
                        'position': 'relative',
                        'top': 'auto',
                        'left': 'auto',
                        'width': '100%',
                        'max-width': '100%',
                        'background': 'transparent',
                        'padding': '0 0 15px 0',
                        'margin-bottom': '30px',
                        'border-bottom': '1px solid #222222',
                        'box-sizing': 'border-box'
                    });
                    $('.quran-dynamic-ranked-hub').css('padding-top', '0px');
                }
            });
        });
        </script>
        <?php
    }
}
/* ==========================================================
   30. SINGLE POST RE-ENGINEERING: SEAMLESS NO-SIDEBAR TRANSPARENCY
   ========================================================== */
/* 1. Vaporize the rigid white background panel wrapper shell block */
.single-post article.post,
.single-post .content.wrapper,
.single-post .post-container {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* 2. Vaporize the duplicate plain text page title header completely */
.single-post header.entry-header,
.single-post h1.entry-title,
.single-post .post-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 3. Drop theme sidebar widget layout trays safely to expand the content path */
.single-post .widget-area,
.single-post #sidebar {
    display: none !important;
}

/* 4. Allow your core container system block to stretch cleanly across the window */
.single-post #primary,
.single-post .site-content,
.single-post #content {
    max-width: 850px !important; /* Locks width perfectly to match your card grids layout */
    width: 100% !important;
    float: none !important;
    margin: 0 auto !important;
    background: transparent !important;
}

/* 5. Smooth background block matching for the native comment input dashboard field panels */
.single-post #respond {
    background: #161616 !important;
    border: 1px solid #2d2d2d !important;
    border-radius: 6px !important;
    padding: 35px !important;
    color: #ffffff !important;
    box-sizing: border-box !important;
}

.single-post #respond textarea,
.single-post #respond input[type="text"] {
    background: #222222 !important;
    border: 1px solid #3a3a3a !important;
    color: #ffffff !important;
    border-radius: 4px !important;
}
/* ==========================================================
   32. SINGLE POST CLEANUP: REMOVE METABOX & FLOATING SIDEBAR
   ========================================================== */
/* 1. Vaporize the author profile metadata container box completely */
.single-post div.meta-box,
.single-post .meta-box,
.single-post div.post-meta,
.single-post .entry-meta,
.single-post header + div[style*="background"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 2. Completely eliminate the lingering sidebar panel container on this view */
.single-post #sidebar,
.single-post .sidebar,
.single-post aside.widget-area,
.single-post .widget-area {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

/* 3. Center and clean up the comment form layout spacing constraints */
.single-post #comments,
.single-post #respond-wrap,
.single-post #respond {
    max-width: 900px !important;
    width: 100% !important;
    margin: 20px auto 0 auto !important;
    float: none !important;
    clear: both !important;
}
/* 🌟 THE SUPER-NUMBER SHIELD: Target and hide the superscript verse numbers inside your post card */
.quran-single-post-art-card-wrapper .ranked-artistic-verse-card p sup,
.quran-single-post-art-card-wrapper .ranked-artistic-verse-card sup {
    display: none !important;
    visibility: hidden !important;
    font-size: 0 !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}
/* ==========================================================
   33. STANDALONE VERSE VIEW: FINAL COSMETIC CLEANUP
   ========================================================== */
/* 1. Vaporize the author bio profile info box completely on this layout view */
.single-post .author-info,
.single-post .author-bio,
.single-post .meta-box,
.single-post .entry-meta,
.single-post .published-by-box,
.single-post div[class*="author"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 2. Vaporize the "Leave a Reply" / "Deixe uma Resposta" form header text title */
.single-post #reply-title,
.single-post .comment-reply-title,
.single-post #respond h3 {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 3. Smooth out top padding offsets to balance the gap above the input fields box */
.single-post #respond {
    margin-top: 10px !important;
}
