/**
 * THRIVING ERA MOBILE OPTIMIZATION FIXES
 * Launch readiness mobile responsive improvements
 */

/* Prevent horizontal scroll */
* {
    max-width: 100%;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

/* Mobile-first responsive design */
.container, .wrap {
    max-width: 100%;
    padding: 0 20px;
}

/* Touch-friendly buttons - minimum 44px height */
.btn, .cta-button, .option-button, button[class*="btn"], 
input[type="submit"], input[type="button"], 
a[class*="button"], .tier .cta-button {
    min-height: 44px !important;
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: 12px 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Mobile form improvements */
input, textarea, select {
    min-height: 44px;
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #ddd;
    width: 100%;
    box-sizing: border-box;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--anahata);
    box-shadow: 0 0 0 3px rgba(74, 138, 107, 0.1);
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
    /* Header and navigation */
    .wrap header, header.wrap {
        padding: 15px 20px;
        flex-wrap: wrap;
    }
    
    .nav-menu {
        width: 100%;
        flex-direction: column;
        background: white;
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 8px 32px rgba(0,0,0,0.1);
        border-radius: 0 0 15px 15px;
        padding: 20px;
        z-index: 1000;
    }
    
    .nav-menu a {
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
        text-align: center;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Mobile menu toggle */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Hero sections */
    .hero, .consulting-hero, .about-hero, .success-hero {
        padding: 60px 20px 40px !important;
        text-align: center;
    }
    
    .hero-title, .hero h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem) !important;
        line-height: 1.2;
        margin-bottom: 20px;
    }
    
    .hero-subtitle, .hero p {
        font-size: clamp(1rem, 4vw, 1.2rem) !important;
        margin-bottom: 20px;
    }
    
    /* Service tiers and pricing cards */
    .service-tiers, .pricing-tiers, .cols {
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .tier, .card {
        margin-bottom: 20px;
        width: 100% !important;
        max-width: none !important;
    }
    
    .tier.featured {
        transform: none !important; /* Remove scale on mobile */
    }
    
    /* Button adjustments */
    .cta-buttons, .hero .btn-group {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .cta-button, .btn {
        width: 100% !important;
        max-width: 300px;
        margin: 5px 0 !important;
    }
    
    /* Typography adjustments */
    h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 15px;
    }
    
    h3 {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
        margin-bottom: 10px;
    }
    
    /* Spacing adjustments */
    section, .section {
        padding: 40px 20px !important;
        margin: 20px 0;
    }
    
    /* Form improvements */
    form {
        max-width: 100%;
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Image responsiveness */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Process steps */
    .process-steps {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    /* Testimonials */
    .testimonial {
        padding: 20px;
        margin: 20px 0;
    }
    
    /* Footer */
    .footer-nav {
        flex-direction: column !important;
        gap: 15px !important;
        text-align: center;
    }
    
    .footer-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Smaller mobile devices */
@media (max-width: 480px) {
    .container, .wrap {
        padding: 0 15px;
    }
    
    .hero, .consulting-hero, .about-hero {
        padding: 40px 15px 30px !important;
    }
    
    .tier, .card {
        padding: 25px 20px;
    }
    
    .cta-button, .btn {
        padding: 15px 20px !important;
        font-size: 15px !important;
    }
    
    h1 {
        font-size: 1.8rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    .tier-price {
        font-size: 2.5rem !important;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .service-tiers, .pricing-tiers {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .cols {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Focus improvements for accessibility */
button:focus, 
a:focus, 
input:focus, 
textarea:focus, 
select:focus {
    outline: 2px solid var(--anahata);
    outline-offset: 2px;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Print styles */
@media print {
    .nav-menu, .menu-toggle, .cta-button, .btn {
        display: none !important;
    }
    
    .hero, .consulting-hero, .about-hero {
        background: white !important;
        color: black !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn, .cta-button {
        border: 2px solid;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}