/* Mobile Optimisation Styles for ISA Website */
/* Ensures all pages are fully responsive */

/* Base Mobile Styles */
@media (max-width: 768px) {
    /* Typography adjustments */
    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
    }
    
    p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
    
    /* Container adjustments */
    .max-w-7xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Grid adjustments */
    .grid {
        gap: 1rem !important;
    }
    
    /* Card adjustments */
    .glass-card {
        padding: 1.5rem !important;
        margin-bottom: 1rem;
    }
    
    /* Button adjustments */
    button, .cta-button, .nav-cta {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.875rem !important;
        width: 100%;
        text-align: center;
    }
    
    /* Form adjustments */
    input, textarea, select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 0.75rem !important;
    }
    
    /* Navigation specific */
    nav {
        padding: 0.5rem 1rem !important;
    }
    
    .nav-links {
        display: none !important;
    }
    
    /* Hero section */
    .hero-section {
        padding: 3rem 1rem !important;
        min-height: 60vh !important;
    }
    
    .hero-headline {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Services grid */
    .services-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Stats */
    .stat-number {
        font-size: 2rem !important;
    }
    
    /* Timeline */
    .timeline-line {
        left: 20px !important;
    }
    
    .timeline-dot {
        left: 20px !important;
    }
    
    /* Footer */
    footer .grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    /* Chat widget */
    .fixed.bottom-4.right-4 {
        bottom: 1rem !important;
        right: 1rem !important;
    }
    
    /* Tables */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Code blocks */
    pre, code {
        font-size: 0.875rem !important;
        overflow-x: auto;
    }
    
    /* Images */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Modals and overlays */
    .modal, .overlay {
        padding: 1rem !important;
    }
    
    /* Animations - reduce for performance */
    .particle {
        display: none !important;
    }
    
    @keyframes float {
        0%, 100% { transform: translateY(0px); }
        50% { transform: translateY(-10px); }
    }
}

/* Small Mobile (iPhone SE, etc.) */
@media (max-width: 375px) {
    h1 {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    .glass-card {
        padding: 1rem !important;
    }
    
    button, .cta-button {
        padding: 0.5rem 1rem !important;
        font-size: 0.75rem !important;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .max-w-7xl {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 90vh !important;
        padding: 2rem 1rem !important;
    }
    
    nav {
        position: relative !important;
    }
    
    .fixed.bottom-4.right-4 {
        display: none !important;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    a, button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Remove hover effects */
    .hover\:scale-105:hover {
        transform: none !important;
    }
    
    .hover\:text-cyan-400:hover {
        color: inherit !important;
    }
    
    /* Add active states instead */
    button:active, a:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* Print styles */
@media print {
    nav, footer, .chat-widget, .mobile-menu-button {
        display: none !important;
    }
    
    body {
        font-size: 12pt !important;
        line-height: 1.5 !important;
    }
    
    .glass-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* 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;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Already dark by default, but ensure consistency */
    body {
        background: #000 !important;
        color: #fff !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .glass-card {
        border: 2px solid #fff !important;
    }
    
    button, .cta-button {
        border: 2px solid currentColor !important;
    }
    
    a {
        text-decoration: underline !important;
    }
}

/* Utility classes for mobile */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .mobile-hidden {
        display: none !important;
    }
}

/* Smooth scrolling for mobile */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden !important;
}

/* Fix for iOS Safari */
.glass-card {
    -webkit-backdrop-filter: blur(10px);
}

/* Android specific fixes */
@supports (-webkit-overflow-scrolling: touch) {
    input, textarea {
        font-size: 16px !important;
    }
}