/*
 * Single Sales Template Styles
 * Base styles are inherited from single-post-base.css (enqueued in functions.php)
 * This file is intended for Sales page layout fixes and typography overrides.
 */

/* 1. Remove Any Injectable Social Shares or Floating Elements */
.kadence-social-share-wrap,
.entry-sharing,
.post-share,
.post-sharing-wrap,
.floating-share-wrap,
.elite-social-share,
.elite-social-container,
.img-share-overlay {
    display: none !important;
}

/* 2. Reposition TOC */
.elite-toc,
.elite-toc-container {
    top: 35% !important;
}

/* 2. Layout Resets (Since Sidebar is removed in single-sales.php) */
#primary.no-sidebar .content-container {
    grid-template-columns: 1fr;
    max-width: 900px;
    /* Optional: Constrain reading width for a centered single column look. Max page width is often 1184px, but 900px is great for sales flow. */
    margin: 0 auto;
}

/* 3. Typography Overrides Setup - Ready for Sales Customization */
/*
.elite-article-content h1 {
    font-size: 3rem;
}
*/

/* 4. Sales Bottom Card (Conversion Elements) */
.sales-scroll-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px auto;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(121, 60, 251, 0.1), rgba(255, 138, 0, 0.1));
    border-radius: 50%;
    color: #793CFB;
    animation: bounce 2s infinite;
}

.sales-scroll-indicator .material-symbols-outlined {
    font-size: 32px;
}

.elite-bottom-card {
    position: relative;
    width: 100%;
    max-width: 960px;
    margin: 0 auto 60px;
    background: #ffffff;
    border: 1px solid rgba(240, 77, 35, 0.2);
    border-radius: 20px;
    padding: 40px;
    box-shadow: rgba(240, 77, 35, 0.4) -5px 5px, rgba(240, 77, 35, 0.3) -10px 10px, rgba(240, 77, 35, 0.2) -15px 15px, rgba(240, 77, 35, 0.1) -20px 20px, rgba(240, 77, 35, 0.05) -25px 25px;
    /* Multilayer Conversion Shadow (Brand Orange) */
    overflow: hidden;
}

/* Psychological Conversion Branding: The Gradient Top Accent */
.elite-bottom-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF8A00, #793CFB);
}

.bottom-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 20px;
}

.bottom-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.bottom-card-content {
    display: block;
    background: #ffffff;
    /* Clean canvas for pricing tables */
    border-radius: 12px;
    border: 0px solid rgba(255, 87, 34, 0.35);
    /* Subtle but solid conversion orange */
    box-shadow: rgba(0, 0, 0, 0.25) 0px 14px 28px, rgba(0, 0, 0, 0.22) 0px 10px 10px;
    /* Ambient buying glow */
    color: #333333;
    padding: 2.5rem;
    /* Generous breathing room for tables */
    margin: 1.5rem 0 2.5rem 0;
    /* Optimized spacing */
}

.bottom-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

.bottom-card-footer .footer-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bottom-card-footer .actionable {
    color: #793CFB;
    background: rgba(121, 60, 251, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@media (max-width: 768px) {
    .elite-bottom-card {
        padding: 24px;
    }

    .bottom-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* 5. Resume Layout Safeguard (ID uniqueness bypass) */
@media screen and (min-width: 1025px) {
    .elite-resume-layout {
        display: grid !important;
        grid-template-columns: 5fr 2fr !important;
        gap: 3.5em !important;
        /* Kadence XL spacing */
        align-items: start !important;
    }

    .elite-resume-layout>.site-main {
        grid-column: 1 !important;
        grid-row: 1 !important;
        min-width: 0 !important;
    }

    .elite-resume-layout>.elite-sticky-sidebar,
    .elite-resume-layout>#secondary {
        grid-column: 2 !important;
        grid-row: 1 !important;
        min-width: 0 !important;
    }
}

/* 6. Sticky Conversion Sidebar */
.elite-sticky-sidebar {
    position: relative;
    height: 100%;
}

.sticky-sidebar-inner {
    position: sticky;
    top: 120px;
    /* Offset to clear transparent/sticky top navs smoothly */
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    text-align: center;
    transition: transform 0.2s ease;
}

.sticky-sidebar-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b !important;
    margin-bottom: 12px;
    font-family: -apple-system, Nunito, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.01em;
}

.sticky-sidebar-text {
    font-size: 0.95rem;
    color: #64748b !important;
    line-height: 1.6;
    margin-bottom: 24px;
}

.sticky-buy-btn {
    box-sizing: border-box !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ff5722 !important;
    /* Forces inheritance override */
    color: #ffffff !important;
    padding: 16px 20px;
    width: 100%;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    white-space: normal !important;
    word-break: break-word !important;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3) !important;
}

.sticky-buy-btn:hover {
    background-color: #e64a19 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 87, 34, 0.4) !important;
}

@media (max-width: 1024px) {
    .sticky-sidebar-inner {
        position: relative;
        top: 0;
        margin-top: 2rem;
    }
}

/* 7. Bottom Card Custom Margins */
.resume-card-wrap {
    margin-top: -65px !important;
}

/* 8. Fix Kadence Overflow Blocking Sticky CSS */
/* CSS position: sticky mathematically fails if ANY parent element has overflow: hidden */
html,
body,
#wrapper,
#inner-wrap,
#page,
.site-content,
.content-area,
.content-container,
.elite-resume-layout {
    overflow: visible !important;
    overflow-x: visible !important;
}

/* We protect horizontal scrolling only on the top hero where glowing radial gradients exist */
.sales-blog-hero {
    overflow: hidden !important;
}

/* 9. Native Smooth Scrolling & Scroll Offsets */
html {
    scroll-behavior: smooth !important;
}

#elite-pricing-card {
    scroll-margin-top: 120px;
    /* Bypasses Kadence fixed headers upon jump */
}

.elite-final-cta-section {
    position: relative;
    width: 100%;
    max-width: 100%;
    background-color: #111827;
    /* Endless paint left/right without triggering layout scrollbars */
    box-shadow: 0 0 0 100vmax #111827;
    clip-path: inset(0 -100vmax);
    padding: 100px 24px;
    text-align: center;
    box-sizing: border-box;
}

.final-cta-container {
    max-width: 680px;
    margin: 0 auto;
}

.final-cta-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #ffffff !important;
    margin-bottom: 24px;
    line-height: 1.3;
    font-family: -apple-system, Nunito, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.01em;
}

.final-cta-desc {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7) !important;
    line-height: 1.6;
    margin-bottom: 40px;
    padding: 0 2rem;
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    /* Inherits the premium serif touch from base theme if desired */
}

.final-cta-btn {
    box-sizing: border-box !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ff5722 !important;
    color: #ffffff !important;
    padding: 18px 42px;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(240, 77, 35, 0.4) !important;
    border: none;
}

.final-cta-btn:hover {
    background-color: #e64a19 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 77, 35, 0.5) !important;
}

/* 11. Disable Breadcrumb Links */
.breadcrumb-inner a {
    pointer-events: none !important;
    cursor: default !important;
    text-decoration: none !important;
}

/* 12. Extracted Inline Layout Constraints */
@media (min-width: 1025px) {
    .elite-resume-layout {
        margin-top: 2rem !important;
        /* The original display: grid from block 5 automatically configures these columns perfectly! */
    }
}

@media (max-width: 1024px) {
    .elite-resume-layout {
        margin-top: 2rem !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 40px !important;
    }
    
    #main-resume-fixed {
        order: 1 !important;
        width: 100% !important;
    }
    
    .elite-sticky-sidebar {
        order: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

.sales-bottom-section.site-container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.bottom-card-header {
    margin-bottom: 1rem !important;
    border: none !important;
    padding-bottom: 0 !important;
}

/* 13. Mobile Bottom Sticky CTA */
.elite-mobile-sticky-cta {
    display: none; /* Hidden completely on Desktop */
}

@media (max-width: 768px) {
    /* 1. Ensure the very bottom of the page isn't permanently obscured */
    .elite-final-cta-section {
        padding-bottom: 140px !important;
    }
    
    /* 2. Affix the sticky bar to the device bottom rail */
    .elite-mobile-sticky-cta {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        padding: 12px 20px;
        box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.12);
        z-index: 9999;
        box-sizing: border-box;
        border-top: 1px solid #f1f5f9;
        padding-bottom: calc(12px + env(safe-area-inset-bottom)); /* Accommodate iPhone home swipe bar */
    }
    
    /* 3. Style the button identically to the sidebar class */
    .mobile-sticky-btn {
        box-sizing: border-box !important;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        background-color: #ff5722 !important;
        color: #ffffff !important;
        padding: 16px 20px;
        font-size: 1.1rem;
        font-weight: 700;
        border-radius: 6px;
        text-decoration: none;
        box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3) !important;
        transition: transform 0.2s ease;
        text-align: center;
    }
    
    .mobile-sticky-btn:active {
        transform: scale(0.98); /* Tactile feedback */
    }
}

@media (max-width: 768px) {
    .elite-final-cta-section {
        padding: 60px 20px;
    }

    .final-cta-title {
        font-size: 1.75rem;
    }
}