/* Responsive Design Enhancement */

/* Mobile First Approach */

/* Base Mobile Styles (320px - 767px) */
@media (max-width: 767px) {
    /* Typography */
    html {
        font-size: 14px;
    }
    
    /* Hero Section */
    .hero {
        min-height: 100vh;
        padding: 100px 15px 50px;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        margin-bottom: 1rem;
    }
    
    .hero-title-number {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    .hero-urgent {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .trust-badges {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .trust-badge {
        font-size: 0.85rem;
    }
    
    /* Social Proof Bar */
    .social-proof-bar {
        padding: 0.5rem;
        font-size: 0.75rem;
        top: 60px;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    /* Industries */
    .industries-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Pricing */
    .base-price-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .countdown-timer {
        padding: 0.8rem;
        gap: 0.5rem;
    }
    
    .countdown-number {
        font-size: 1.5rem;
    }
    
    /* Service Flow */
    .flow-step {
        flex-direction: column;
        text-align: center;
    }
    
    .flow-number {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .flow-connector {
        margin-left: 0;
        margin: 0 auto 2rem;
    }
    
    /* Comparison Table */
    .comparison-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .comparison-table {
        min-width: 500px;
        font-size: 0.85rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.8rem 0.5rem;
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .testimonial-impact {
        flex-direction: column;
        padding: 1rem;
    }
    
    .impact-number {
        font-size: 2rem;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    /* FAQ */
    .faq-question {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    /* CTA Section */
    .cta-content {
        padding: 2rem 1rem;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .cta-subtitle {
        font-size: 0.9rem;
    }
    
    .cta-benefits {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 1rem;
    }
    
    .cta-benefit {
        font-size: 0.85rem;
    }
    
    /* Floating CTA */
    .floating-cta-button {
        bottom: 20px;
        right: 20px;
        padding: 0.8rem 1.2rem;
        font-size: 0.85rem;
    }
    
    /* Contact Form */
    .contact-form {
        padding: 1rem;
    }
    
    /* Exit Popup */
    .exit-popup-content {
        margin: 20px;
        padding: 1.5rem;
    }
    
    /* Notification */
    .notification-popup {
        left: 10px;
        right: 10px;
        max-width: none;
        font-size: 0.85rem;
    }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Grid Layouts */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Hero */
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-title-number {
        font-size: 3.5rem;
    }
}

/* Desktop (1024px - 1439px) */
@media (min-width: 1024px) and (max-width: 1439px) {
    .container {
        max-width: 980px;
    }
    
    .features-grid,
    .industries-grid,
    .options-grid,
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-title-number {
        font-size: 5rem;
    }
    
    .feature-card {
        padding: 3rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .hover-lift:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    /* Larger tap targets */
    .btn {
        min-height: 48px;
        padding: 14px 24px;
    }
    
    .faq-question {
        min-height: 48px;
    }
    
    .mobile-menu-toggle {
        width: 48px;
        height: 48px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper borders and shadows */
    .feature-card,
    .industry-card,
    .testimonial-card {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    }
}

/* Print Styles */
@media print {
    /* Hide unnecessary elements */
    .header,
    .social-proof-bar,
    .floating-cta,
    .notification-popup,
    .exit-popup,
    .mobile-nav,
    .countdown-timer,
    .cta-qr {
        display: none !important;
    }
    
    /* Adjust colors for print */
    body {
        color: #000;
        background: #fff;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    /* Show link URLs */
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .pulse-animation,
    .float-animation,
    .icon-bounce {
        animation: none !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* You can add dark mode styles here if needed */
}

/* Orientation Changes */
@media (orientation: landscape) and (max-width: 767px) {
    .hero {
        min-height: auto;
        padding: 80px 15px 30px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}

/* Special Mobile Menu Styles */
.mobile-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    z-index: 998;
}

.mobile-nav.active {
    transform: translateY(0);
}

.mobile-nav-list {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.mobile-nav-link {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-link:hover {
    background: var(--color-base);
    color: var(--color-primary);
}

.mobile-nav-cta {
    background: var(--color-primary);
    color: white;
    margin: 1rem;
    border-radius: 10px;
    text-align: center;
}

/* Mobile Menu Toggle Animation */
.mobile-menu-toggle {
    display: none;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1000;
}

@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav {
        display: none;
    }
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--color-text);
    margin: 5px auto;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Loading State */
body:not(.loaded) {
    overflow: hidden;
}

body:not(.loaded)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 10000;
}

body:not(.loaded)::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10001;
}

/* Performance Optimizations */
img {
    max-width: 100%;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
}

/* Lazy Loading Placeholder */
.lazy-load {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Grid Layout Fallbacks */
@supports not (display: grid) {
    .features-grid,
    .industries-grid,
    .options-grid,
    .testimonials-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .feature-card,
    .industry-card,
    .option-card,
    .testimonial-card {
        flex: 0 1 calc(33.333% - 1rem);
        margin-bottom: 2rem;
    }
    
    @media (max-width: 767px) {
        .feature-card,
        .industry-card,
        .option-card,
        .testimonial-card {
            flex: 0 1 100%;
        }
    }
}
