/* Mobile First Styles (320px - 767px) */

/* Base Mobile Reset */
* {
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px; /* Base for rem units */
}

body {
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* Container Mobile Optimizations */
.container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.container-fluid {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

/* Typography Mobile Scaling */
h1 {
    font-size: var(--text-3xl);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-4);
}

h2 {
    font-size: var(--text-2xl);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-4);
}

h3 {
    font-size: var(--text-xl);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-3);
}

p {
    margin-bottom: var(--space-4);
}

.lead {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
}

/* Mobile Navigation */
.navbar {
    padding: var(--space-3) 0;
}

.navbar-brand {
    font-size: var(--text-lg);
}

.navbar-toggler {
    padding: var(--space-2);
    font-size: var(--text-lg);
}

.navbar-collapse {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin-top: var(--space-3);
    padding: var(--space-4);
    position: absolute;
    top: 100%;
    left: var(--space-4);
    right: var(--space-4);
    z-index: var(--z-40);
}

.navbar-nav {
    gap: var(--space-2);
}

.nav-link {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
}

.nav-link:hover {
    background: var(--color-gray-100);
}

/* Mobile Buttons */
.btn {
    min-height: 44px; /* Minimum touch target */
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-lg {
    min-height: 52px;
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

.btn-sm {
    min-height: 36px;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

/* Mobile Forms */
.form-control {
    min-height: 44px;
    font-size: var(--text-base);
    padding: var(--space-3) var(--space-4);
}

.form-label {
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
}

.form-check-input {
    width: 20px;
    height: 20px;
}

.form-check-label {
    font-size: var(--text-sm);
}

/* Mobile Hero Section */
.hero-section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
    min-height: 37vh;
}

.hero-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.hero-subtitle {
    font-size: var(--text-lg);
    margin-bottom: var(--space-8);
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.hero-actions .btn {
    width: 100%;
}

/* Mobile Trust Signals */
.trust-signals-section {
    padding: var(--space-8) 0;
}

.trust-card {
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.trust-icon i {
    font-size: var(--text-2xl);
}

.trust-stat {
    font-size: var(--text-3xl);
}

.trust-title {
    font-size: var(--text-base);
}

.trust-description {
    font-size: var(--text-sm);
}

/* Mobile Process Steps */
.process-section {
    padding: var(--space-8) 0;
}

.process-step {
    padding: var(--space-4);
    margin-bottom: var(--space-6);
}

.number-circle {
    width: 32px;
    height: 32px;
    font-size: var(--text-base);
}

.step-icon i {
    font-size: var(--text-xl);
}

.step-title {
    font-size: var(--text-base);
}

.step-description {
    font-size: var(--text-sm);
}

/* Mobile Features */
.features-section {
    padding: var(--space-8) 0;
}

.feature-card {
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-3);
}

.feature-icon i {
    font-size: var(--text-xl);
}

.feature-title {
    font-size: var(--text-base);
}

.feature-description {
    font-size: var(--text-sm);
}

/* Mobile Coming Soon */
.coming-soon-section {
    padding: var(--space-8) 0;
}

.product-card {
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.product-title {
    font-size: var(--text-base);
}

/* Mobile Footer */
.site-footer {
    padding-top: var(--space-8);
}

.footer-widget {
    margin-bottom: var(--space-8);
}

.footer-widget-title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-4);
}

.footer-menu li {
    margin-bottom: var(--space-2);
}

.footer-copyright {
    padding: var(--space-4) 0;
    font-size: var(--text-xs);
}

/* Mobile Cards */
.card {
    margin-bottom: var(--space-6);
}

.card-body {
    padding: var(--space-4);
}

.card-title {
    font-size: var(--text-lg);
}

/* Mobile Tables */
.table-responsive {
    margin-bottom: var(--space-4);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    font-size: var(--text-sm);
}

/* Mobile Modals */
.modal-dialog {
    margin: var(--space-4);
}

.modal-content {
    border-radius: var(--radius-lg);
}

.modal-header,
.modal-body,
.modal-footer {
    padding: var(--space-4);
}

/* Mobile Accordion */
.accordion-button {
    padding: var(--space-4);
    font-size: var(--text-base);
}

.accordion-body {
    padding: var(--space-4);
}

/* Mobile Pagination */
.pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
}

.page-link {
    min-width: 40px;
    min-height: 40px;
    font-size: var(--text-sm);
}

/* Mobile Utilities */
.d-mobile-only {
    display: block;
}

.d-mobile-hidden {
    display: none;
}

/* Touch-friendly adjustments */
a, button, input, textarea, select {
    font-size: var(--text-base);
}

/* Prevent horizontal scrolling */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Mobile-specific animations */
@media (prefers-reduced-motion: no-preference) {
    .fade-in-mobile {
        animation: fadeInMobile 0.5s ease-out;
    }
    
    @keyframes fadeInMobile {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Mobile landscape optimizations */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: 100vh;
        padding-top: var(--space-8);
        padding-bottom: var(--space-8);
    }
    
    .hero-title {
        font-size: var(--text-2xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-base);
    }
}

/* Small mobile devices (320px - 374px) */
@media (max-width: 374px) {
    .container {
        padding-left: var(--space-3);
        padding-right: var(--space-3);
    }
    
    .hero-title {
        font-size: var(--text-2xl);
    }
    
    .btn {
        padding: var(--space-3) var(--space-4);
    }
    
    .trust-card,
    .feature-card,
    .process-step {
        padding: var(--space-3);
    }
}

/* Medium mobile devices (375px - 424px) */
@media (min-width: 375px) and (max-width: 424px) {
    .hero-title {
        font-size: var(--text-2xl);
    }
}

/* Large mobile devices (425px - 767px) */
@media (min-width: 425px) and (max-width: 767px) {
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .hero-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .hero-actions .btn {
        width: auto;
        flex: 1;
        min-width: 0;
    }
}

/* Mobile performance optimizations */
@media (max-width: 767px) {
    /* Lazy load images */
    img[loading="lazy"] {
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    img[loading="lazy"].loaded {
        opacity: 1;
    }
    
    /* Reduce animations on mobile */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }
    
    /* Optimize font loading */
    body {
        font-display: swap;
    }
}

/* Mobile accessibility */
@media (max-width: 767px) {
    /* Ensure sufficient touch targets */
    button,
    [role="button"],
    input[type="submit"],
    input[type="button"],
    a.btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Increase tap target for small links */
    a:not(.btn) {
        padding: var(--space-1) 0;
    }
    
    /* Improve focus visibility */
    :focus {
        outline: 2px solid var(--color-primary);
        outline-offset: 2px;
    }
    
    /* Reduce motion preference */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation: none !important;
            transition: none !important;
        }
    }
}

/* Mobile dark mode */
@media (prefers-color-scheme: dark) and (max-width: 767px) {
    .navbar-collapse {
        background: var(--color-gray-800);
        color: var(--color-gray-100);
    }
    
    .nav-link:hover {
        background: var(--color-gray-700);
    }
    
    .modal-content {
        background: var(--color-gray-800);
        color: var(--color-gray-100);
    }
    
    .accordion-button {
        background: var(--color-gray-800);
        color: var(--color-gray-100);
    }
    
    .accordion-button:hover {
        background: var(--color-gray-700);
    }
}

/* Mobile print styles */
@media print and (max-width: 767px) {
    .no-print-mobile {
        display: none !important;
    }
    
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .hero-section {
        padding: 0 !important;
        min-height: auto !important;
    }
    
    .hero-background,
    .hero-overlay {
        display: none !important;
    }
    
    .hero-content {
        color: black !important;
        position: static !important;
    }
}