/* Mobile-First PWA Optimizations */

/* Bottom Navigation for Mobile */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 8px 0;
    z-index: 50;
    display: none;
}

.mobile-bottom-nav .nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #6b7280;
    font-size: 12px;
    min-width: 60px;
    transition: color 0.2s;
}

.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item:hover {
    color: #3b82f6;
}

.mobile-bottom-nav .nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

/* Touch-friendly targets */
.touch-target {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile-optimized buttons */
.mobile-btn {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Simplified mobile header */
.mobile-header {
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 40;
}

.mobile-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-header .logo img {
    width: 32px;
    height: 32px;
}

.mobile-header .logo span {
    font-size: 18px;
    font-weight: 700;
}

/* Mobile content spacing */
.mobile-content {
    padding: 16px;
    margin-bottom: 80px; /* Space for bottom nav */
}

/* Mobile cards */
.mobile-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
}

/* Mobile hero section */
.mobile-hero {
    padding: 24px 16px;
    text-align: center;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    margin-bottom: 24px;
}

.mobile-hero h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.mobile-hero p {
    font-size: 16px;
    margin-bottom: 20px;
    opacity: 0.9;
}

/* Mobile service grid */
.mobile-service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.mobile-service-item {
    background: white;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mobile-service-item:active {
    transform: scale(0.98);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-service-item i {
    font-size: 24px;
    color: #3b82f6;
    margin-bottom: 8px;
}

.mobile-service-item span {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

/* Mobile-specific responsive rules */
@media (max-width: 768px) {
    /* Show mobile navigation */
    .mobile-bottom-nav {
        display: block;
    }
    
    /* Hide desktop navigation */
    header nav {
        display: none;
    }
    
    /* Adjust main content */
    main {
        padding-bottom: 80px;
    }
    
    /* Mobile typography */
    h1 { font-size: 28px; line-height: 1.2; }
    h2 { font-size: 24px; line-height: 1.3; }
    h3 { font-size: 20px; line-height: 1.4; }
    
    /* Mobile spacing */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    /* Mobile forms */
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
        border-radius: 8px;
    }
    
    /* Mobile buttons */
    button, .btn {
        min-height: 48px;
        font-size: 16px;
        padding: 12px 24px;
    }
    
    /* Reduce content density */
    .py-16 { padding-top: 32px; padding-bottom: 32px; }
    .py-12 { padding-top: 24px; padding-bottom: 24px; }
    .mb-12 { margin-bottom: 24px; }
    .mb-8 { margin-bottom: 16px; }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mobile-bottom-nav {
        background: #1f2937;
        border-top-color: #374151;
    }
    
    .mobile-header {
        background: #1f2937;
        border-bottom-color: #374151;
    }
    
    .mobile-card {
        background: #1f2937;
        border-color: #374151;
    }
    
    .mobile-service-item {
        background: #1f2937;
        border-color: #374151;
    }
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Pull to refresh indicator */
.pull-to-refresh {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: top 0.3s ease;
}

.pull-to-refresh.visible {
    top: 20px;
}