/* CSS Variables for the new color palette */
:root {
    --primary-color: #1B56FD;
    --primary-dark: #0118D8;
    --secondary-color: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --border-color: #e9ecef;
    --gradient-primary: linear-gradient(135deg, #1B56FD, #0118D8);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Critical CSS - Above the fold optimization */
.hero {
    background: linear-gradient(135deg, #f8fdff 0%, #e3f2fd 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.display-1 {
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

.text-primary {
    color: var(--primary-dark) !important;
}

/* Typography - Swiss Design */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: all 0.3s ease;
    will-change: box-shadow;
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-dark) !important;
}

.navbar-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-dark) !important;
}

.btn-login {
    color: var(--primary-dark) !important;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: var(--primary-color);
    color: white !important;
}

/* Buttons - Optimized for performance */
.btn-primary {
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(27, 86, 253, 0.3);
    will-change: transform;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(27, 86, 253, 0.4);
}

.btn-outline-primary {
    color: var(--primary-dark);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 1rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Hero Section Optimization */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="%231B56FD" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-visual {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    pointer-events: auto; /* Ensure clicks work */
    z-index: 1;
}

/* Ensure no overlay elements block the video */
.hero-visual {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    position: relative;
}

/* Remove any potential click blockers */
.hero-visual * {
    pointer-events: auto;
}

.hero-icon {
    font-size: 8rem;
    color: var(--primary-color);
}

/* Features Section */
.features {
    padding: 6rem 0;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;
    will-change: transform;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1.5rem;
}

/* Benefits Section */
.benefits {
    background: var(--primary-color);
    color: white;
    padding: 6rem 0;
}

.benefit-item {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.benefit-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.benefits-visual {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 3rem;
}

.benefits-icon {
    font-size: 6rem;
    opacity: 0.3;
}

/* Pricing Section */
.pricing {
    padding: 6rem 0;
    background: #f8f9fa;
}

.pricing-card {
    background: white;
    border-radius: 16px;
    padding: 3rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border: 1px solid var(--border-color);
    height: 100%;
    position: relative;
    will-change: transform;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.pricing-card.featured {
    border: 3px solid var(--primary-color);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 2rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 1rem 0;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.pricing-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.pricing-features li:last-child {
    border-bottom: none;
}

/* Customers Section */
.customers {
    padding: 4rem 0;
}

.customer-logo {
    height: 60px;
    width: 120px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 10px;
}

.customer-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Contact Section */
.contact {
    background: var(--text-dark);
    color: white;
    padding: 6rem 0;
}

.contact-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-brand .navbar-brand {
    color: white !important;
    display: block;
    text-decoration: none;
}

.footer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.social-links {
    margin-top: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.footer-divider {
    border-color: #404040;
    margin: 2rem 0;
}

.footer-copyright,
.footer-note {
    color: #adb5bd;
    font-size: 0.9rem;
}

/* WhatsApp Float Button - Optimized */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    will-change: transform;
}

.whatsapp-float:hover {
    background: #128c7e;
    transform: scale(1.1);
    color: white;
    text-decoration: none;
}

/* Performance Optimizations */
.feature-card,
.pricing-card,
.btn-primary,
.whatsapp-float {
    will-change: transform;
}

/* Mobile Responsiveness - Mobile First Approach */
@media (max-width: 576px) {
    .display-1 {
        font-size: 2.2rem;
    }
    
    .hero {
        text-align: center;
        padding: 2rem 0;
        min-height: 90vh;
    }
    
    .video-container {
        padding-bottom: 75%; /* Adjust aspect ratio for mobile */
    }
    
    .feature-card {
        margin-bottom: 2rem;
        padding: 2rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 20px;
    }
    
    .benefits {
        padding: 4rem 0;
    }
    
    .pricing {
        padding: 4rem 0;
    }
    
    .contact {
        padding: 4rem 0;
    }
    
    .footer {
        padding: 3rem 0 2rem;
    }
    
    .navbar-logo,
    .footer-logo {
        height: 32px;
    }
    
    .customer-logo {
        height: 50px;
        width: 100px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .display-1 {
        font-size: 2.8rem;
    }
    
    .hero {
        min-height: 95vh;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .display-1 {
        font-size: 3.2rem;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Critical path optimization - Load above fold content first */
.hero-content {
    position: relative;
    z-index: 2;
}

/* Defer non-critical animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* GPU acceleration for smooth animations */
.feature-card:hover,
.pricing-card:hover,
.btn-primary:hover,
.whatsapp-float:hover {
    transform: translateY(-10px);
    backface-visibility: hidden;
    perspective: 1000px;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Optimize images and icons for faster loading */
.hero-icon,
.benefits-icon {
    will-change: auto;
}

/* Critical CSS for LCP optimization */
.container {
    max-width: 1200px;
}

/* Efficient grid system */
.row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.row > * {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}