/* MOBILE OVERHAUL - Clean Mobile CSS */

/* Reset any problematic base styles */
* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

/* Fix overlapping issues by disabling problematic absolute positioning */
@media (max-width: 640px) {
    /* Mobile-optimized floating CTA - always visible */
    .floating-cta {
        display: block !important;
        position: fixed !important;
        bottom: 15px !important;
        right: 15px !important;
        left: auto !important;
        z-index: 9999 !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
    
    .floating-cta button {
        background: linear-gradient(135deg, #00d4ff, #0077ff) !important;
        color: white !important;
        border: none !important;
        padding: 12px 16px !important;
        border-radius: 50px !important;
        font-weight: 600 !important;
        box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4) !important;
        cursor: pointer !important;
        font-size: 14px !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        white-space: nowrap !important;
        min-width: auto !important;
        text-decoration: none !important;
    }
    
    .floating-cta button:hover,
    .floating-cta button:active {
        transform: scale(0.98) !important;
        box-shadow: 0 6px 25px rgba(0, 212, 255, 0.5) !important;
    }
}

/* Extra small mobile devices - make CTA slightly larger and more prominent */
@media (max-width: 480px) {
    .floating-cta {
        bottom: 20px !important;
        right: 20px !important;
    }
    
    .floating-cta button {
        padding: 14px 18px !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        box-shadow: 0 6px 25px rgba(0, 212, 255, 0.5) !important;
    }
    
    .floating-cta button span {
        display: inline !important;
    }
    
    /* Pulse animation for extra attention on very small screens */
    .floating-cta::before {
        content: '';
        position: absolute;
        top: -5px;
        left: -5px;
        right: -5px;
        bottom: -5px;
        background: radial-gradient(circle, rgba(0, 212, 255, 0.3) 0%, transparent 70%);
        border-radius: 50px;
        animation: pulse-ring 2s infinite;
        z-index: -1;
    }
    
    @keyframes pulse-ring {
        0% {
            transform: scale(1);
            opacity: 0.8;
        }
        50% {
            transform: scale(1.1);
            opacity: 0.4;
        }
        100% {
            transform: scale(1.2);
            opacity: 0;
        }
    }
    
    /* Fix any absolute positioned elements */
    .service-card::before,
    .service-badge,
    .timeline-marker::after {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
    }
    
    /* Ensure proper spacing from fixed navbar */
    body {
        padding-top: 0 !important;
    }
    
    .hero {
        margin-top: 70px; /* Account for fixed navbar */
    }
}

/* Mobile Breakpoint */
@media (max-width: 640px) {
    /* Container */
    .container {
        max-width: 100%;
        padding: 0 1rem;
        margin: 0 auto;
    }
    
    /* Navigation */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-logo span {
        font-size: 0.85rem;
    }
    
    .ssv-logo {
        height: 35px;
    }
    
    .nav-menu {
        font-size: 0.85rem;
        gap: 1rem;
    }
    
    /* Hero Section */
    .hero {
        padding: 2rem 0;
        min-height: auto; /* Remove fixed height that might cut off content */
    }
    
    .hero-container {
        display: block;
        text-align: center;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 2rem;
    }
    
    /* VS Comparison - Stack vertically */
    .time-comparison {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin: 2rem 0;
        padding: 1rem;
    }
    
    .comparison-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .comparison-icon {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }
    
    .comparison-content {
        text-align: left;
    }
    
    .comparison-title {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .comparison-time {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }
    
    .comparison-desc {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .vs-divider {
        align-self: center;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin: 0.5rem 0;
    }
    
    /* Hero Stats */
    .hero-stats {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1rem; /* Reduced from 2rem */
    }
    
    .stat-item {
        padding: 1rem;
        text-align: center;
    }
    
    /* Hero CTAs */
    .hero-cta {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        margin-top: 1rem !important; /* Override main CSS 2rem with 1rem */
        margin-bottom: 0; /* Remove any bottom margin */
    }
    
    .cta-primary,
    .cta-secondary {
        width: 100%;
        max-width: 280px;
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Partnership section styling handled in main styles.css */
    
    /* Sections - CRITICAL: Prevent sections from overlapping during mobile scroll */
    section {
        padding: 3rem 0; /* Standard section padding */
        margin-bottom: 2rem; /* Separation between sections */
        position: relative;
        z-index: 1; /* Ensure proper stacking order */
    }
    
    /* CRITICAL: First section after hero needs extra top margin to prevent CTA overlap */
    .sample-dashboards {
        margin-top: 4rem !important; /* Extra spacing from hero section to prevent CTA coverage */
        position: relative !important;
        z-index: 2 !important; /* Higher z-index to stay above hero */
    }
    
    .section-header {
        margin-bottom: 3rem;
        text-align: center;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .section-header p {
        font-size: 0.95rem;
    }
    
    /* Specific section spacing */
    .hero {
        margin-bottom: 0; /* Remove large spacing from hero itself */
    }
    
    .dashboards {
        margin: 3rem 0;
    }
    
    .meet-cdo {
        margin: 3rem 0;
        padding: 3rem 0;
    }
    
    /* Sample Dashboards */
    .dashboards-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .dashboard-preview {
        padding: 1.25rem;
        margin: 0;
    }
    
    /* Services - Fix overlapping issues */
    .services {
        padding: 3rem 0;
        margin-top: 2rem;
    }
    
    .services-grid {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
        position: relative !important;
        margin-bottom: 1rem;
        background: rgba(255, 255, 255, 0.03) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 16px;
    }
    
    /* Disable service card pseudo-elements that cause overlap */
    .service-card::before,
    .service-card::after {
        display: none !important;
    }
    
    .service-badge {
        position: static !important;
        display: inline-block;
        margin-bottom: 1rem;
        top: auto !important;
        right: auto !important;
    }
    
    .service-card h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
        margin-top: 1rem;
    }
    
    .key-features {
        gap: 0.75rem;
        margin-bottom: 1.5rem;
        flex-wrap: wrap;
    }
    
    .feature-tag {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .pricing {
        font-size: 0.9rem;
        margin-top: 1rem;
    }
    
    
    /* Timeline - Completely reworked to prevent overlap */
    .timeline {
        max-width: 100%;
        margin: 2rem auto;
        padding: 0 1rem;
        position: relative;
    }
    
    /* Disable the center line on mobile */
    .timeline::before {
        display: none !important;
    }
    
    .timeline-item {
        display: block !important;
        position: static !important;
        left: auto !important;
        right: auto !important;
        margin-bottom: 3rem;
        padding: 0;
        text-align: left !important;
        width: 100% !important;
    }
    
    .timeline-item:nth-child(even) {
        left: auto !important;
        right: auto !important;
        text-align: left !important;
    }
    
    .timeline-marker {
        position: static !important;
        display: inline-block;
        margin-bottom: 1rem;
        z-index: auto;
    }
    
    /* Disable timeline marker pseudo-elements that cause overlap */
    .timeline-marker::before,
    .timeline-marker::after {
        display: none !important;
    }
    
    .timeline-content {
        padding: 1.5rem;
        margin-left: 0;
        margin-top: 0;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
    }
    
    .company-period {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        margin-bottom: 0.75rem;
    }
    
    .impact-tags {
        gap: 0.25rem;
        flex-wrap: wrap;
    }
    
    .tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    /* Footer */
    .footer-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-brand {
        margin-bottom: 1rem;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .footer-section h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-section ul {
        gap: 0.5rem;
    }
    
    .footer-section a {
        font-size: 0.85rem;
    }
    
    /* Reduce particles for mobile performance */
    #particles-js {
        opacity: 0.4;
    }
}

/* Small Mobile (phones in portrait) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-title {
        font-size: 1.5rem !important;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .photo-placeholder {
        width: 140px;
        height: 180px;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
    
    .cta-primary,
    .cta-secondary {
        font-size: 0.85rem;
        padding: 0.75rem 1.25rem;
    }
}