/* Mobile Responsive Improvements for Public Pages */

/* General Mobile Improvements */
@media (max-width: 768px) {
    /* Improve touch targets */
    .btn, button, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Prevent horizontal scrolling */
    body {
        overflow-x: hidden;
    }
    
    /* Improve text readability */
    body {
        font-size: 16px;
        line-height: 1.5;
    }
    
    /* Better spacing for mobile */
    .container {
        padding: 0 1rem;
    }
    
    /* Improve form elements */
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
        border-radius: 8px;
    }
    
    /* Better button sizing */
    .btn {
        padding: 12px 20px;
        font-size: 1rem;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    /* Smaller screens */
    .container {
        padding: 0 0.75rem;
    }
    
    /* Compact buttons */
    .btn {
        padding: 10px 16px;
        font-size: 0.95rem;
    }
    
    /* Better form spacing */
    .input-group {
        margin-bottom: 1rem;
    }
    
    /* Improve readability */
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 360px) {
    /* Very small screens */
    .container {
        padding: 0 0.5rem;
    }
    
    /* Compact everything */
    .btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    h3 {
        font-size: 1rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .btn:hover,
    .feature-card:hover,
    .problem-card:hover,
    .value-card:hover,
    .stat-card:hover,
    .signup-info-card:hover {
        transform: none;
    }
    
    /* Add active states for touch */
    .btn:active {
        transform: scale(0.98);
    }
    
    /* Improve focus states */
    .btn:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: 2px solid #004d00;
        outline-offset: 2px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    /* Reduce animations for users who prefer it */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .feature-card,
    .problem-card,
    .value-card,
    .stat-card,
    .signup-info-card {
        border: 2px solid currentColor;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Future dark mode styles can be added here */
}

/* Print styles */
@media print {
    .mobile-nav,
    .mobile-nav-toggle,
    .nav-buttons {
        display: none !important;
    }
    
    header {
        position: static !important;
        background: white !important;
    }
    
    .main-content {
        margin-top: 0 !important;
    }
}

/* Landscape orientation improvements */
@media (max-width: 768px) and (orientation: landscape) {
    /* Adjust for landscape on mobile */
    .hero {
        padding: 2rem 0;
    }
    
    .main-content {
        margin-top: 70px;
    }
    
    /* Compact sections for landscape */
    .problem-section,
    .features-section,
    .solution-section {
        padding: 2rem 0;
    }
}

/* Large screen improvements */
@media (min-width: 1200px) {
    /* Better use of large screens */
    .container {
        max-width: 1400px;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    /* Larger text on big screens */
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Focus management for keyboard navigation */
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #004d00;
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #004d00;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Loading states */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #004d00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error states */
.error-message {
    background: #fee;
    color: #c33;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #fcc;
    margin-bottom: 1rem;
}

/* Success states */
.success-message {
    background: #efe;
    color: #363;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #cfc;
    margin-bottom: 1rem;
}

/* Warning states */
.warning-message {
    background: #ffd;
    color: #663;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #fdc;
    margin-bottom: 1rem;
} 