/* Global Mobile Formatting Styles */

/* Base responsive rules */
html {
    box-sizing: border-box;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

*, *:before, *:after {
    box-sizing: inherit;
}

/* Ensure images don't overflow */
img, video, canvas, svg {
    max-width: 100%;
    height: auto;
}

/* Mobile specific adjustments (max-width: 768px) */
@media screen and (max-width: 768px) {
    /* Prevent horizontal scrolling */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Fluid typography for common elements - Adjusted for better readability */
    h1 { font-size: clamp(2rem, 6vw, 2.75rem) !important; line-height: 1.2 !important; margin-bottom: 0.5em !important; }
    h2 { font-size: clamp(1.75rem, 5vw, 2.25rem) !important; line-height: 1.3 !important; margin-bottom: 0.5em !important; }
    h3 { font-size: clamp(1.5rem, 4vw, 1.875rem) !important; line-height: 1.4 !important; margin-bottom: 0.5em !important; }
    p, li, div { font-size: 18px !important; line-height: 1.6 !important; /* Increased legibility on mobile */ }
    
    /* Adjust padding and margins for smaller screens */
    .et_pb_section {
        padding-top: 8% !important; /* Increased breathing room */
        padding-bottom: 8% !important;
    }
    
    .et_pb_row {
        width: 92% !important; /* Slightly more edge space */
        max-width: 92% !important;
    }
    
    /* Stack columns */
    .et_pb_column {
        width: 100% !important;
        margin-bottom: 30px !important; /* Increased gap between stacked columns */
    }
    
    .et_pb_column:last-child {
        margin-bottom: 0 !important;
    }
}

/* Very small screens (max-width: 480px) */
@media screen and (max-width: 480px) {
    .et_pb_row {
        width: 96% !important;
        max-width: 96% !important;
    }
    
    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.75rem !important; }
    h3 { font-size: 1.5rem !important; }
    
    .et_pb_section {
        padding-top: 10% !important;
        padding-bottom: 10% !important;
    }
}
