/* ==========================================================================
   RESPONSIVE DESIGN & PWA ENHANCEMENTS
   Mobile-first approach with progressive enhancement
   ========================================================================== */

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(229, 229, 229, 0.6);
    z-index: 1001;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mobile-nav.open {
    left: 0;
}

.mobile-nav-header {
    padding: 20px;
    border-bottom: 1px solid rgba(229, 229, 229, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-logo {
    height: 32px;
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-nav-close:hover {
    background: rgba(0, 161, 224, 0.1);
    color: #00A1E0;
}

.mobile-nav-links {
    padding: 20px 0;
}

.mobile-nav-links a {
    display: block;
    padding: 16px 24px;
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 1px solid rgba(229, 229, 229, 0.3);
    transition: all 0.2s ease;
}

.mobile-nav-links a:hover {
    background: rgba(0, 161, 224, 0.05);
    color: #00A1E0;
    padding-left: 32px;
}

.mobile-nav-links a:last-child {
    border-bottom: none;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #0f172a;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: rgba(0, 161, 224, 0.1);
    color: #00A1E0;
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.show {
    opacity: 1;
}

/* Enhanced Touch Interactions */
.touch-friendly {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}

.button, .cta-primary, .cta-secondary, .add-to-cart-btn {
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0, 161, 224, 0.2);
}

/* Responsive Grid System */
.responsive-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

/* PWA Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #00A1E0, #0ea5e9);
    color: white;
    padding: 16px 20px;
    z-index: 1002;
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 20px rgba(0, 161, 224, 0.3);
}

.pwa-install-banner.show {
    bottom: 0;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.pwa-banner-text {
    flex: 1;
    margin-right: 16px;
}

.pwa-banner-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.pwa-banner-description {
    font-size: 14px;
    opacity: 0.9;
}

.pwa-banner-actions {
    display: flex;
    gap: 12px;
}

.pwa-install-btn, .pwa-dismiss-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.pwa-install-btn {
    background: white;
    color: #00A1E0;
}

.pwa-install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.pwa-dismiss-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pwa-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4444;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 1003;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.offline-indicator.show {
    opacity: 1;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 575.98px) {
    /* Ultra-small mobile optimization */
    .hero h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }
    
    .hero p {
        font-size: 1.1rem !important;
    }
    
    .cta-primary, .cta-secondary {
        padding: 14px 24px !important;
        font-size: 16px !important;
        width: 100%;
        text-align: center;
    }
    
    .product-item {
        min-width: 260px !important;
    }
    
    .feature-card {
        padding: 24px 20px !important;
    }
    
    .features-grid {
        gap: 20px !important;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .responsive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero {
        padding: 120px 40px 60px !important;
    }
    
    .cta-buttons {
        flex-direction: row !important;
        gap: 16px;
    }
    
    .cta-primary, .cta-secondary {
        flex: 1;
        max-width: 200px;
    }
    
    .product-item {
        min-width: 300px !important;
    }
}

/* Mobile devices (up to 768px) */
@media (max-width: 768px) {
    /* Header Adjustments */
    .header-content {
        padding: 0 16px !important;
        height: 64px !important;
    }
    
    .logo {
        height: 36px !important;
    }
    
    .nav-links {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: block !important;
    }
    
    .mobile-nav {
        display: block !important;
    }
    
    /* Hero Section */
    .hero {
        padding: 80px 20px 40px !important;
        min-height: 80vh !important;
    }
    
    .hero h1 {
        font-size: 3rem !important;
        margin-bottom: 20px !important;
    }
    
    .hero p {
        font-size: 1.2rem !important;
        margin-bottom: 32px !important;
    }
    
    .cta-buttons {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        margin-bottom: 40px !important;
    }
    
    /* Content Sections */
    .product-showcase, .features, .cta-section {
        padding: 60px 20px !important;
    }
    
    .showcase h2, .features h2, .cta-section h2 {
        font-size: 2.5rem !important;
        margin-bottom: 16px !important;
    }
    
    .showcase p, .features p, .cta-section p {
        font-size: 1.1rem !important;
        margin-bottom: 40px !important;
    }
    
    /* Product Carousel */
    .product-carousel {
        height: 320px !important;
        margin: 40px 0 !important;
    }
    
    .product-track {
        animation-duration: 25s !important;
        gap: 20px !important;
    }
    
    .product-item {
        min-width: 280px !important;
        padding: 20px !important;
    }
    
    .product-image {
        width: 160px !important;
        height: 160px !important;
        margin-bottom: 16px !important;
    }
    
    .product-info h3 {
        font-size: 1.1rem !important;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        margin-top: 40px !important;
    }
    
    .feature-card {
        padding: 32px 24px !important;
    }
    
    .feature-icon {
        width: 64px !important;
        height: 64px !important;
        margin-bottom: 16px !important;
    }
    
    .feature-icon svg {
        width: 32px !important;
        height: 32px !important;
    }
    
    .feature-card h3 {
        font-size: 1.3rem !important;
        margin-bottom: 12px !important;
    }
    
    /* PWA Banner Mobile */
    .pwa-banner-content {
        flex-direction: column !important;
        gap: 12px !important;
        text-align: center !important;
    }
    
    .pwa-banner-text {
        margin-right: 0 !important;
    }
    
    .pwa-banner-actions {
        width: 100% !important;
    }
    
    .pwa-install-btn, .pwa-dismiss-btn {
        flex: 1 !important;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .responsive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .product-item {
        min-width: 280px !important;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 992px) {
    .responsive-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    /* Enhanced hover effects for desktop */
    .feature-card:hover .feature-icon {
        transform: scale(1.1);
        box-shadow: 0 8px 25px rgba(0, 161, 224, 0.3);
    }
    
    .product-item:hover .product-image {
        transform: scale(1.05);
    }
}

/* Ultra-wide screens (1400px and up) */
@media (min-width: 1400px) {
    .responsive-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .hero-content {
        max-width: 1200px !important;
    }
    
    .showcase-content, .features-content, .cta-content {
        max-width: 1400px !important;
    }
}

/* ==========================================================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================================================== */

/* Focus indicators */
.button:focus,
.cta-primary:focus,
.cta-secondary:focus,
.mobile-nav-links a:focus {
    outline: 2px solid #00A1E0;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .header {
        border-bottom-width: 2px !important;
    }
    
    .feature-card, .product-item {
        border: 2px solid #e2e8f0 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .product-track {
        animation: none !important;
    }
    
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }
}

 