/* ══════════════════════════════════════
   SalesNest CRM — Mobile Responsive CSS
   Handles sticky header, all breakpoints,
   mobile sticky CTA, table overflow, etc.
══════════════════════════════════════ */

/* ══════════════════════════════════════
   STICKY HEADER — override LeadnestLanding.css
   position:fixed + slideDown animation.
   overflow-x:clip (not hidden) keeps sticky working.
══════════════════════════════════════ */
html { overflow-x: clip !important; }
body { overflow-x: clip !important; }

.leadNav-Main-Large {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    width: 100% !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: box-shadow 0.3s ease !important;
    animation: none !important;
}
.leadNav-Main-Large.nav-hide,
.leadNav-Main-Large.nav-top,
.leadNav-Main-Large.nav-compact,
.leadNav-Main-Large.nav-show,
.leadNav-Main-Large.nav-slide-in {
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: sticky !important;
    animation: none !important;
}
.leadNav-Main-Large.nav-slide-in,
.leadNav-Main-Large.scrolled {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
}

/* Desktop: wrapper needs no padding — sticky nav is in-flow */
@media (min-width: 992px) {
    body { padding-top: 0 !important; }
    .sn-wrapper { padding-top: 0 !important; }
}

/* Mobile: nav goes fixed, body gets padding to compensate */
@media (max-width: 991px) {
    .leadNav-Main-Large {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }
    body { padding-top: 70px !important; }
    .sn-wrapper { padding-top: 0 !important; }
}

/* ══════════════════════════════════════
   MOBILE STICKY CTA
   Hidden on desktop, shown after hero
   scrolls out on mobile only
══════════════════════════════════════ */
.sn-sticky-cta {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    width: calc(100% - 48px);
    max-width: 400px;
}
.sn-sticky-cta-btn {
    width: 100%;
    padding: 16px 24px;
    background: #673AB7;
    color: white;
    border: none;
    border-radius: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(103,58,183,0.35);
    transition: all 0.2s ease;
}
.sn-sticky-cta-btn:hover { background: #5e35b1; transform: translateY(-2px); }

@media (max-width: 768px) {
    .sn-sticky-cta.sn-sticky-visible { display: block; }
}
@media (min-width: 769px) {
    .sn-sticky-cta,
    .sn-sticky-cta.sn-sticky-visible { display: none !important; }
}

/* ══════════════════════════════════════
   TABLET  ≤ 991px
══════════════════════════════════════ */
@media (max-width: 991px) {

    /* Hero */
    .sn-hero {
        height: auto !important;
        min-height: auto !important;
        padding: 60px 0 80px !important;
    }
    .sn-hero-content {
        flex-direction: column !important;
        text-align: center !important;
        gap: 40px !important;
        padding: 0 20px !important;
    }
    .sn-hero-text { width: 100%; }
    .sn-hero-text h1 { font-size: 38px !important; }
    .sn-hero-text p { margin-left: auto; margin-right: auto; }
    .sn-hero-visual {
        width: 100%;
        max-width: 540px;
        margin: 0 auto;
        animation: none !important; /* stop float jank on mobile */
    }
    .sn-hero-cta { justify-content: center; flex-wrap: wrap; }
    .sn-hero-trust { justify-content: center; flex-wrap: wrap; gap: 12px; }
    .sn-trust-divider { display: none; }

    /* Feature sections */
    .sn-feature-container {
        flex-direction: column !important;
        gap: 36px !important;
        text-align: center !important;
        padding: 0 20px !important;
    }
    .sn-feature-content,
    .sn-feature-image { width: 100%; flex: none !important; }
    .sn-feature-highlights {
        grid-template-columns: 1fr !important;
        text-align: left;
        max-width: 400px;
        margin: 0 auto;
    }
    .sn-feature-badge { display: inline-block; }

    /* Capabilities grid */
    .sn-capabilities-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 20px !important; }

    /* Pipeline nav */
    .sn-pipeline-nav { flex-direction: column; align-items: stretch; gap: 8px; }
    .sn-pipeline-step { width: 100%; justify-content: flex-start; }
    .sn-pipeline-arrow { display: none; }
    .sn-pipeline-container { padding: 60px 20px; }

    /* Comparison table — horizontal scroll */
    .sn-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .sn-comparison-table { min-width: 560px; }

    /* Stats */
    .sn-stats-container { justify-content: center; gap: 24px; }
    .sn-stat-value { font-size: 30px; }

    /* FAQ */
    .sn-faq-grid { grid-template-columns: 1fr !important; }
    .sn-faq-container { padding: 0 20px; }

    /* CTA */
    .sn-cta-container { padding: 60px 24px !important; border-radius: 28px !important; }
    .sn-cta-content h2 { font-size: 32px !important; }
    .sn-cta-content p  { font-size: 16px !important; }
    .sn-cta-buttons { flex-direction: column; align-items: center; gap: 14px; }
    .sn-btn-lg { width: 100%; max-width: 320px; justify-content: center; }

    /* Section headers */
    .sn-section-header { padding: 0 20px; }
    .sn-section-header h2 { font-size: 30px !important; }

    /* Stats band */
    .sn-stats-band { padding: 50px 20px; }

    /* Partner section */
    .sn-partner-section { padding: 50px 0; }
}

/* ══════════════════════════════════════
   MOBILE  ≤ 576px
══════════════════════════════════════ */
@media (max-width: 576px) {

    .sn-hero-text h1 { font-size: 30px !important; line-height: 1.2 !important; }
    .sn-hero-text p  { font-size: 15px !important; }

    .sn-btn-lg { padding: 14px 24px !important; font-size: 15px !important; }

    .sn-capabilities-grid { grid-template-columns: 1fr !important; }
    .sn-cap-card { padding: 28px 20px !important; }

    .sn-cta-content h2 { font-size: 26px !important; }

    .sn-feature-section { padding: 60px 0 !important; }
    .sn-capabilities-section { padding: 60px 0 !important; }
    .sn-faq-section { padding: 60px 0 !important; }
    .sn-cta-section { padding: 60px 16px !important; }

    .sn-pipeline-image { border-radius: 16px; }

    /* Comparison table smaller text */
    .sn-comparison-table th,
    .sn-comparison-table td { padding: 14px 16px !important; font-size: 13px !important; }

    .sn-stats-container { gap: 20px; }
    .sn-stat-value { font-size: 26px; }
    .sn-stat-label { font-size: 10px; }
}

/* ══════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .sn-reveal, .sn-reveal-left, .sn-reveal-right, .sn-hero-visual {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
