/* Mobile-First Responsive CSS */

/* Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Touch-friendly buttons */
@media (max-width: 768px) {
    button, 
    a.button, 
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Prevent text size adjustment on mobile */
body {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Better mobile images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile form improvements */
@media (max-width: 640px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
}

/* Mobile table responsiveness */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        width: 100%;
        max-width: 100%;
    }
}

/* Card hover effects - disabled on touch devices */
@media (hover: none) {
    .hover\:-translate-y-2:hover {
        transform: none !important;
    }
}

/* Mobile navigation fixes */
@media (max-width: 768px) {
    .mobile-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 80%;
        max-width: 320px;
        z-index: 50;
    }
}

/* Prevent zoom on input focus (iOS) */
@supports (-webkit-touch-callout: none) {
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Better spacing for mobile */
@media (max-width: 640px) {
    .section-padding {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Mobile-friendly cards */
@media (max-width: 640px) {
    .card {
        border-radius: 1rem;
        margin-bottom: 1rem;
    }
}

/* Fixed header on mobile */
@media (max-width: 768px) {
    .sticky-header {
        position: sticky;
        top: 0;
        z-index: 40;
    }
}

/* Smooth transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Landscape mode optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* Safe area insets for notch devices */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

/* Better mobile typography */
@media (max-width: 640px) {
    h1 {
        line-height: 1.2;
    }
    
    h2 {
        line-height: 1.3;
    }
    
    p {
        line-height: 1.6;
    }
}

/* Loading states for mobile */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Better focus states for accessibility */
*:focus-visible {
    outline: 2px solid #ffcc33;
    outline-offset: 2px;
}

/* Mobile table alternative - stack layout */
@media (max-width: 640px) {
    .mobile-stack td {
        display: block;
        text-align: right;
        padding: 0.5rem;
    }
    
    .mobile-stack td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
    }
}




